oh-my-knowledge 1.0.0-beta.8 → 1.0.0-beta.9

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 (390) hide show
  1. package/dist/assets/agent-skills/omk/SKILL.md +16 -8
  2. package/dist/assets/agent-skills/omk/references/commands.md +12 -18
  3. package/dist/cli/commands/sample.js +2 -2
  4. package/dist/cli/lib/actor.js +1 -1
  5. package/dist/cli/lib/core-report-service.js +5 -4
  6. package/dist/cli/templates/init-samples.js +42 -42
  7. package/dist/dsh-plugin/index.js +3 -3
  8. package/dist/eval-runtime/adapters/command-executor.d.ts +1 -1
  9. package/dist/eval-runtime/adapters/command-executor.js +1 -1
  10. package/dist/eval-runtime/evaluation/prepare.js +1 -1
  11. package/dist/eval-runtime/evaluators/exact-match.d.ts +2 -0
  12. package/dist/eval-runtime/evaluators/exact-match.js +3 -2
  13. package/dist/eval-runtime/index.d.ts +36 -0
  14. package/dist/eval-runtime/index.js +21 -0
  15. package/dist/eval-runtime/runner.d.ts +2 -2
  16. package/dist/eval-runtime/runner.js +4 -4
  17. package/dist/eval-workflows/hosts/adapters/anthropic/api.js +5 -5
  18. package/dist/eval-workflows/hosts/adapters/anthropic/input.d.ts +7 -0
  19. package/dist/eval-workflows/hosts/adapters/anthropic/input.js +28 -0
  20. package/dist/eval-workflows/hosts/adapters/anthropic/protocol.d.ts +1 -1
  21. package/dist/eval-workflows/hosts/adapters/anthropic/protocol.js +1 -1
  22. package/dist/eval-workflows/hosts/adapters/codex/reference-executor.d.ts +1 -1
  23. package/dist/eval-workflows/hosts/adapters/codex/reference-executor.js +1 -1
  24. package/dist/eval-workflows/hosts/adapters/custom/{command.d.ts → executor.d.ts} +21 -21
  25. package/dist/eval-workflows/hosts/adapters/custom/{command.js → executor.js} +93 -93
  26. package/dist/eval-workflows/hosts/adapters/openai/api.js +5 -5
  27. package/dist/eval-workflows/hosts/adapters/openai/input.d.ts +7 -0
  28. package/dist/eval-workflows/hosts/adapters/openai/input.js +19 -0
  29. package/dist/eval-workflows/hosts/adapters/openai/protocol.d.ts +1 -1
  30. package/dist/eval-workflows/hosts/adapters/openai/protocol.js +1 -1
  31. package/dist/eval-workflows/hosts/adapters/shared/api-protocol-core.js +6 -3
  32. package/dist/eval-workflows/hosts/adapters/shared/sample-input.d.ts +18 -0
  33. package/dist/eval-workflows/hosts/adapters/shared/sample-input.js +40 -0
  34. package/dist/eval-workflows/hosts/adapters/shared/stateless-api-resources.d.ts +8 -2
  35. package/dist/eval-workflows/hosts/adapters/shared/stateless-api-resources.js +22 -3
  36. package/dist/eval-workflows/hosts/composition/builtins.js +22 -0
  37. package/dist/eval-workflows/hosts/composition/node-runtime.js +6 -6
  38. package/dist/eval-workflows/hosts/composition/runtime-registry.d.ts +4 -4
  39. package/dist/eval-workflows/hosts/composition/runtime-registry.js +7 -7
  40. package/dist/eval-workflows/hosts/input-resolution/node-cli-evaluation-resolver.js +34 -14
  41. package/dist/eval-workflows/inputs/append-samples.js +2 -1
  42. package/dist/eval-workflows/inputs/contracts/sample-input.d.ts +35 -0
  43. package/dist/eval-workflows/inputs/contracts/sample.d.ts +33 -4
  44. package/dist/eval-workflows/inputs/contracts/schemas/{v2 → v3}/eval-sample-set.schema.json +598 -216
  45. package/dist/eval-workflows/inputs/eval-samples.d.ts +3 -2
  46. package/dist/eval-workflows/inputs/eval-samples.js +3 -2
  47. package/dist/eval-workflows/inputs/load-samples.d.ts +1 -1
  48. package/dist/eval-workflows/inputs/load-samples.js +10 -8
  49. package/dist/eval-workflows/inputs/rubric-contract.d.ts +1 -1
  50. package/dist/eval-workflows/inputs/rubric-contract.js +1 -1
  51. package/dist/eval-workflows/inputs/sample-contract.js +28 -5
  52. package/dist/eval-workflows/inputs/sample-document.js +7 -2
  53. package/dist/eval-workflows/inputs/sample-mapping.d.ts +4 -0
  54. package/dist/eval-workflows/inputs/sample-mapping.js +26 -0
  55. package/dist/eval-workflows/inputs/schemas/error.d.ts +5 -0
  56. package/dist/eval-workflows/inputs/schemas/error.js +12 -0
  57. package/dist/eval-workflows/inputs/schemas/json-schema.js +8 -2
  58. package/dist/eval-workflows/inputs/schemas/sample-input.d.ts +6 -0
  59. package/dist/eval-workflows/inputs/schemas/sample-input.js +102 -0
  60. package/dist/eval-workflows/inputs/schemas/sample-set.d.ts +7 -4
  61. package/dist/eval-workflows/inputs/schemas/sample-set.js +69 -9
  62. package/dist/eval-workflows/measurement/analysis/assertion-layer-node.d.ts +1 -1
  63. package/dist/eval-workflows/measurement/analysis/assertion-layer-node.js +11 -8
  64. package/dist/eval-workflows/measurement/analysis/assertion-layer-parameters.d.ts +5 -3
  65. package/dist/eval-workflows/measurement/analysis/assertion-layer-parameters.js +12 -3
  66. package/dist/eval-workflows/measurement/analysis/assertion-layer.d.ts +11 -11
  67. package/dist/eval-workflows/measurement/analysis/assertion-layer.js +18 -6
  68. package/dist/eval-workflows/orchestration/measurement-design.js +42 -10
  69. package/dist/eval-workflows/orchestration/sample-content-resolution.d.ts +1 -1
  70. package/dist/eval-workflows/orchestration/sample-content-resolution.js +4 -7
  71. package/dist/eval-workflows/sample-generation/generator.js +46 -36
  72. package/dist/eval-workflows/sample-generation/skill-samples.js +2 -2
  73. package/dist/eval-workflows/sample-generation/trace-drafts.js +2 -2
  74. package/dist/knowledge-artifacts/doctor/rules.js +1 -1
  75. package/dist/knowledge-artifacts/sources/artifact-resolution.js +19 -7
  76. package/dist/observability/contracts/experience-evidence-schema.d.ts +5 -5
  77. package/dist/observability/inbox/feedback-matchers.d.ts +3 -4
  78. package/dist/observability/inbox/feedback-matchers.js +3 -4
  79. package/dist/observability/inbox/metric-semantics.d.ts +2 -3
  80. package/dist/observability/inbox/metric-semantics.js +2 -3
  81. package/dist/observability/inbox/review-semantics.d.ts +22 -3
  82. package/dist/observability/inbox/review-semantics.js +15 -0
  83. package/dist/observability/inbox/severity-reason.js +1 -2
  84. package/dist/observability/inbox/signal-semantics.d.ts +2 -3
  85. package/dist/observability/inbox/skill-rollups.d.ts +3 -4
  86. package/dist/observability/inbox/skill-rollups.js +1 -1
  87. package/dist/observability/inbox/view-model.d.ts +0 -24
  88. package/dist/observability/inbox/view-model.js +0 -31
  89. package/dist/studio/application/conversation-activity.d.ts +1 -2
  90. package/dist/studio/application/conversation-activity.js +1 -1
  91. package/dist/studio/application/core-run-format.d.ts +28 -0
  92. package/dist/studio/application/core-run-format.js +99 -0
  93. package/dist/studio/application/doctor-format.d.ts +49 -0
  94. package/dist/studio/application/doctor-format.js +73 -0
  95. package/dist/studio/application/health-format.d.ts +154 -0
  96. package/dist/studio/application/health-format.js +231 -0
  97. package/dist/studio/application/inline-markdown.d.ts +0 -3
  98. package/dist/studio/application/inline-markdown.js +2 -2
  99. package/dist/studio/application/knowledge-reports.d.ts +0 -5
  100. package/dist/studio/application/knowledge-reports.js +1 -48
  101. package/dist/studio/application/managed-format.d.ts +59 -0
  102. package/dist/studio/application/managed-format.js +113 -0
  103. package/dist/studio/application/replay/format.d.ts +0 -2
  104. package/dist/studio/application/replay/format.js +2 -2
  105. package/dist/studio/application/replay/routing.d.ts +1 -18
  106. package/dist/studio/application/replay/routing.js +10 -26
  107. package/dist/studio/application/skill-health.d.ts +0 -2
  108. package/dist/studio/application/skill-health.js +0 -45
  109. package/dist/studio/application/trajectory-evidence.d.ts +0 -1
  110. package/dist/studio/application/trajectory-evidence.js +0 -3
  111. package/dist/studio/http/contracts.d.ts +12 -3
  112. package/dist/studio/http/errors.d.ts +0 -1
  113. package/dist/studio/http/errors.js +0 -4
  114. package/dist/studio/http/health-page.d.ts +37 -0
  115. package/dist/studio/http/health-page.js +52 -0
  116. package/dist/studio/http/knowledge-page.d.ts +8 -2
  117. package/dist/studio/http/knowledge-page.js +24 -2
  118. package/dist/studio/http/managed-page.d.ts +29 -0
  119. package/dist/studio/http/managed-page.js +45 -0
  120. package/dist/studio/http/managed-root.d.ts +12 -0
  121. package/dist/studio/http/managed-root.js +19 -0
  122. package/dist/studio/http/next-context.d.ts +4 -0
  123. package/dist/studio/http/next-context.js +2 -0
  124. package/dist/studio/http/next-server.js +91 -10
  125. package/dist/studio/http/request-handler.d.ts +1 -1
  126. package/dist/studio/http/request-handler.js +12 -16
  127. package/dist/studio/http/routes/contracts.d.ts +0 -2
  128. package/dist/studio/http/routes/conversations.js +1 -55
  129. package/dist/studio/http/routes/core-runs.d.ts +4 -5
  130. package/dist/studio/http/routes/core-runs.js +19 -63
  131. package/dist/studio/http/routes/knowledge.d.ts +1 -2
  132. package/dist/studio/http/routes/knowledge.js +8 -157
  133. package/dist/studio/http/routes/observations.js +1 -72
  134. package/dist/studio/index.d.ts +0 -1
  135. package/dist/studio/index.js +0 -1
  136. package/dist/studio/view-models/skill-index.d.ts +3 -4
  137. package/dist/studio/web/.next/BUILD_ID +1 -1
  138. package/dist/studio/web/.next/app-path-routes-manifest.json +8 -2
  139. package/dist/studio/web/.next/build-manifest.json +6 -6
  140. package/dist/studio/web/.next/prerender-manifest.json +4 -4
  141. package/dist/studio/web/.next/routes-manifest.json +42 -0
  142. package/dist/studio/web/.next/server/app/_global-error/page.js +2 -2
  143. package/dist/studio/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  144. package/dist/studio/web/.next/server/app/_global-error.html +1 -1
  145. package/dist/studio/web/.next/server/app/_global-error.rsc +9 -9
  146. package/dist/studio/web/.next/server/app/_global-error.segments/_full.segment.rsc +9 -9
  147. package/dist/studio/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +8 -8
  148. package/dist/studio/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  149. package/dist/studio/web/.next/server/app/_not-found/page.js +1 -1
  150. package/dist/studio/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  151. package/dist/studio/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  152. package/dist/studio/web/.next/server/app/knowledge/managed/[managedId]/page.js +1 -0
  153. package/dist/studio/web/.next/server/app/knowledge/managed/[managedId]/page.js.nft.json +1 -0
  154. package/dist/studio/web/.next/server/app/knowledge/managed/[managedId]/page_client-reference-manifest.js +1 -0
  155. package/dist/studio/web/.next/server/app/knowledge/managed/page.js +1 -0
  156. package/dist/studio/web/.next/server/app/knowledge/managed/page.js.nft.json +1 -0
  157. package/dist/studio/web/.next/server/app/knowledge/managed/page_client-reference-manifest.js +1 -0
  158. package/dist/studio/web/.next/server/app/knowledge/page.js +1 -1
  159. package/dist/studio/web/.next/server/app/knowledge/page.js.nft.json +1 -1
  160. package/dist/studio/web/.next/server/app/knowledge/page_client-reference-manifest.js +1 -1
  161. package/dist/studio/web/.next/server/app/knowledge/skills/[skillName]/page.js +1 -1
  162. package/dist/studio/web/.next/server/app/knowledge/skills/[skillName]/page.js.nft.json +1 -1
  163. package/dist/studio/web/.next/server/app/knowledge/skills/[skillName]/page_client-reference-manifest.js +1 -1
  164. package/dist/studio/web/.next/server/app/measure/[runId]/page.js +1 -1
  165. package/dist/studio/web/.next/server/app/measure/[runId]/page.js.nft.json +1 -1
  166. package/dist/studio/web/.next/server/app/measure/[runId]/page_client-reference-manifest.js +1 -1
  167. package/dist/studio/web/.next/server/app/measure/page.js +1 -1
  168. package/dist/studio/web/.next/server/app/measure/page.js.nft.json +1 -1
  169. package/dist/studio/web/.next/server/app/measure/page_client-reference-manifest.js +1 -1
  170. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/page.js +1 -1
  171. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/page.js.nft.json +1 -1
  172. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/page_client-reference-manifest.js +1 -1
  173. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/tasks/[turnId]/page.js +1 -1
  174. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/tasks/[turnId]/page.js.nft.json +1 -1
  175. package/dist/studio/web/.next/server/app/observe/conversations/[threadId]/tasks/[turnId]/page_client-reference-manifest.js +1 -1
  176. package/dist/studio/web/.next/server/app/observe/health/[analysisId]/page.js +1 -0
  177. package/dist/studio/web/.next/server/app/observe/health/[analysisId]/page.js.nft.json +1 -0
  178. package/dist/studio/web/.next/server/app/observe/health/[analysisId]/page_client-reference-manifest.js +1 -0
  179. package/dist/studio/web/.next/server/app/observe/health/page.js +1 -0
  180. package/dist/studio/web/.next/server/app/observe/health/page.js.nft.json +1 -0
  181. package/dist/studio/web/.next/server/app/observe/health/page_client-reference-manifest.js +1 -0
  182. package/dist/studio/web/.next/server/app/observe/health-diff/page.js +1 -0
  183. package/dist/studio/web/.next/server/app/observe/health-diff/page.js.nft.json +1 -0
  184. package/dist/studio/web/.next/server/app/observe/health-diff/page_client-reference-manifest.js +1 -0
  185. package/dist/studio/web/.next/server/app/observe/inbox/page.js +8 -8
  186. package/dist/studio/web/.next/server/app/observe/inbox/page.js.nft.json +1 -1
  187. package/dist/studio/web/.next/server/app/observe/inbox/page_client-reference-manifest.js +1 -1
  188. package/dist/studio/web/.next/server/app/observe/page.js +1 -1
  189. package/dist/studio/web/.next/server/app/observe/page.js.nft.json +1 -1
  190. package/dist/studio/web/.next/server/app/observe/page_client-reference-manifest.js +1 -1
  191. package/dist/studio/web/.next/server/app/observe/skill-trend/[skillName]/page.js +1 -0
  192. package/dist/studio/web/.next/server/app/observe/skill-trend/[skillName]/page.js.nft.json +1 -0
  193. package/dist/studio/web/.next/server/app/observe/skill-trend/[skillName]/page_client-reference-manifest.js +1 -0
  194. package/dist/studio/web/.next/server/app-paths-manifest.json +8 -2
  195. package/dist/studio/web/.next/server/chunks/211.js +153 -0
  196. package/dist/studio/web/.next/server/chunks/340.js +1 -0
  197. package/dist/studio/web/.next/server/chunks/428.js +1 -0
  198. package/dist/studio/web/.next/server/chunks/464.js +9 -0
  199. package/dist/studio/web/.next/server/chunks/60.js +1 -0
  200. package/dist/studio/web/.next/server/chunks/629.js +24 -0
  201. package/dist/studio/web/.next/server/chunks/634.js +8 -0
  202. package/dist/studio/web/.next/server/chunks/761.js +1 -0
  203. package/dist/studio/web/.next/server/chunks/781.js +6 -0
  204. package/dist/studio/web/.next/server/chunks/820.js +1 -0
  205. package/dist/studio/web/.next/server/chunks/843.js +16 -0
  206. package/dist/studio/web/.next/server/chunks/864.js +1 -0
  207. package/dist/studio/web/.next/server/chunks/881.js +1 -0
  208. package/dist/studio/web/.next/server/middleware-build-manifest.js +1 -1
  209. package/dist/studio/web/.next/server/pages/500.html +1 -1
  210. package/dist/studio/web/.next/server/server-reference-manifest.json +1 -1
  211. package/dist/studio/web/.next/static/chunks/0937d497-e4b3c577da4da67b.js +1 -0
  212. package/dist/studio/web/.next/static/chunks/1794-b0b73323eb0b61cd.js +1 -0
  213. package/dist/studio/web/.next/static/chunks/1858-53aecb176156ec2f.js +52 -0
  214. package/dist/studio/web/.next/static/chunks/1987-971296df54e43ab1.js +16 -0
  215. package/dist/studio/web/.next/static/chunks/2038-ccf8a4a844645002.js +1 -0
  216. package/dist/studio/web/.next/static/chunks/258-98725438cc459d4c.js +10 -0
  217. package/dist/studio/web/.next/static/chunks/2765-54f4c40540e205f1.js +153 -0
  218. package/dist/studio/web/.next/static/chunks/{230-7633e724f4432c34.js → 3230-60c074bff83af5ae.js} +1 -1
  219. package/dist/studio/web/.next/static/chunks/3884-e86dedc2ed19774a.js +1 -0
  220. package/dist/studio/web/.next/static/chunks/4684-581ca8c487980c6e.js +1 -0
  221. package/dist/studio/web/.next/static/chunks/5810-c7b66ea2d2c8dad9.js +8 -0
  222. package/dist/studio/web/.next/static/chunks/5834-a9faf21ab3427baa.js +1 -0
  223. package/dist/studio/web/.next/static/chunks/6250-ec299731b6849371.js +1 -0
  224. package/dist/studio/web/.next/static/chunks/6868-16b9a6bb44398ac2.js +6 -0
  225. package/dist/studio/web/.next/static/chunks/7210-bb171d6e87b8aaf8.js +4 -0
  226. package/dist/studio/web/.next/static/chunks/7492-e0a1f9bb373f8e34.js +57 -0
  227. package/dist/studio/web/.next/static/chunks/805-21d1a5581dbcc7b9.js +13 -0
  228. package/dist/studio/web/.next/static/chunks/8202-d22828e45db31cd7.js +1 -0
  229. package/dist/studio/web/.next/static/chunks/9321-39cec3eb17db7d45.js +1 -0
  230. package/dist/studio/web/.next/static/chunks/9658-ca86f15af46ed3b6.js +66 -0
  231. package/dist/studio/web/.next/static/chunks/9688-a11fe7d1bb540a55.js +1 -0
  232. package/dist/studio/web/.next/static/chunks/9934-c067935398279115.js +1 -0
  233. package/dist/studio/web/.next/static/chunks/9953-16d4db818b625532.js +1 -0
  234. package/dist/studio/web/.next/static/chunks/9978-b4a2af6d5c721928.js +9 -0
  235. package/dist/studio/web/.next/static/chunks/app/_global-error/page-e609dd5f58d4d1da.js +1 -0
  236. package/dist/studio/web/.next/static/chunks/app/_not-found/page-e609dd5f58d4d1da.js +1 -0
  237. package/dist/studio/web/.next/static/chunks/app/error-55e2496e263eb053.js +1 -0
  238. package/dist/studio/web/.next/static/chunks/app/knowledge/managed/[managedId]/page-5fa90f6251a53a66.js +1 -0
  239. package/dist/studio/web/.next/static/chunks/app/knowledge/managed/page-d6b23d06985b27be.js +1 -0
  240. package/dist/studio/web/.next/static/chunks/app/knowledge/page-401b42b337f35cb2.js +1 -0
  241. package/dist/studio/web/.next/static/chunks/app/knowledge/skills/[skillName]/page-89a6aae95545c30f.js +1 -0
  242. package/dist/studio/web/.next/static/chunks/app/layout-3ac390eeabe225ae.js +1 -0
  243. package/dist/studio/web/.next/static/chunks/app/loading-cf7b92a0b9a3d539.js +1 -0
  244. package/dist/studio/web/.next/static/chunks/app/measure/[runId]/page-759183f4a8355396.js +1 -0
  245. package/dist/studio/web/.next/static/chunks/app/measure/page-d105ed6e46b66203.js +1 -0
  246. package/dist/studio/web/.next/static/chunks/app/not-found-845deb67422d6b1c.js +1 -0
  247. package/dist/studio/web/.next/static/chunks/app/observe/conversations/[threadId]/page-0389657b0e5738fe.js +1 -0
  248. package/dist/studio/web/.next/static/chunks/app/observe/conversations/[threadId]/tasks/[turnId]/page-779abb5f7c49f132.js +1 -0
  249. package/dist/studio/web/.next/static/chunks/app/observe/health/[analysisId]/page-85d38aa58d79b97f.js +1 -0
  250. package/dist/studio/web/.next/static/chunks/app/observe/health/page-b725a73a0d71a14d.js +1 -0
  251. package/dist/studio/web/.next/static/chunks/app/observe/health-diff/page-4c28b86850c88ca1.js +1 -0
  252. package/dist/studio/web/.next/static/chunks/app/observe/inbox/page-73887f7fd8fe691e.js +1 -0
  253. package/dist/studio/web/.next/static/chunks/app/observe/page-81dc705ad95f7bb2.js +1 -0
  254. package/dist/studio/web/.next/static/chunks/app/observe/skill-trend/[skillName]/page-c7c42d498385dd11.js +1 -0
  255. package/dist/studio/web/.next/static/chunks/framework-5229529bf08fbe0d.js +1 -0
  256. package/dist/studio/web/.next/static/chunks/main-app-679042091c356b7b.js +1 -0
  257. package/dist/studio/web/.next/static/chunks/main-c86d24af6df62a67.js +5 -0
  258. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/app-error-e609dd5f58d4d1da.js +1 -0
  259. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/forbidden-e609dd5f58d4d1da.js +1 -0
  260. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/global-error-fb3b4a28100823de.js +1 -0
  261. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/unauthorized-e609dd5f58d4d1da.js +1 -0
  262. package/dist/studio/web/.next/static/chunks/{webpack-2895e3ce1a584f68.js → webpack-040077c7c5b63775.js} +1 -1
  263. package/dist/studio/web/.next/static/css/5161ba759fc0d07f.css +1 -0
  264. package/dist/studio/web/.next/static/z5Z1oaZbCQ47WIPuI9Vg-/_buildManifest.js +1 -0
  265. package/dist/studio/web/.next/trace +3 -3
  266. package/dist/studio/web/.next/trace-build +1 -1
  267. package/package.json +9 -41
  268. package/dist/eval-runtime/advanced.d.ts +0 -38
  269. package/dist/eval-runtime/advanced.js +0 -18
  270. package/dist/eval-runtime/contracts.d.ts +0 -4
  271. package/dist/eval-runtime/contracts.js +0 -2
  272. package/dist/observability/inbox/feedback-projection.d.ts +0 -20
  273. package/dist/observability/inbox/feedback-projection.js +0 -19
  274. package/dist/studio/http/chart-asset.d.ts +0 -1
  275. package/dist/studio/http/chart-asset.js +0 -21
  276. package/dist/studio/presentation/conversation-renderer.d.ts +0 -4
  277. package/dist/studio/presentation/conversation-renderer.js +0 -467
  278. package/dist/studio/presentation/core-run-renderer.d.ts +0 -12
  279. package/dist/studio/presentation/core-run-renderer.js +0 -428
  280. package/dist/studio/presentation/doctor-detail-renderer.d.ts +0 -4
  281. package/dist/studio/presentation/doctor-detail-renderer.js +0 -142
  282. package/dist/studio/presentation/icons.d.ts +0 -29
  283. package/dist/studio/presentation/icons.js +0 -71
  284. package/dist/studio/presentation/inline-markdown.d.ts +0 -5
  285. package/dist/studio/presentation/inline-markdown.js +0 -60
  286. package/dist/studio/presentation/knowledge-debugger-renderer.d.ts +0 -9
  287. package/dist/studio/presentation/knowledge-debugger-renderer.js +0 -1390
  288. package/dist/studio/presentation/knowledge-reports-renderer.d.ts +0 -5
  289. package/dist/studio/presentation/knowledge-reports-renderer.js +0 -196
  290. package/dist/studio/presentation/layout.d.ts +0 -20
  291. package/dist/studio/presentation/layout.js +0 -789
  292. package/dist/studio/presentation/managed-history-renderer.d.ts +0 -5
  293. package/dist/studio/presentation/managed-history-renderer.js +0 -333
  294. package/dist/studio/presentation/observation-inbox/client-script.d.ts +0 -2
  295. package/dist/studio/presentation/observation-inbox/client-script.js +0 -1805
  296. package/dist/studio/presentation/observation-inbox/experience-workspace-renderer.d.ts +0 -35
  297. package/dist/studio/presentation/observation-inbox/experience-workspace-renderer.js +0 -1721
  298. package/dist/studio/presentation/observation-inbox/helpers.d.ts +0 -13
  299. package/dist/studio/presentation/observation-inbox/helpers.js +0 -74
  300. package/dist/studio/presentation/observation-inbox/metric-renderer.d.ts +0 -164
  301. package/dist/studio/presentation/observation-inbox/metric-renderer.js +0 -325
  302. package/dist/studio/presentation/observation-inbox/page-renderer.d.ts +0 -12
  303. package/dist/studio/presentation/observation-inbox/page-renderer.js +0 -275
  304. package/dist/studio/presentation/observation-inbox/process-workspace-renderer.d.ts +0 -63
  305. package/dist/studio/presentation/observation-inbox/process-workspace-renderer.js +0 -323
  306. package/dist/studio/presentation/observation-inbox/review-renderer.d.ts +0 -28
  307. package/dist/studio/presentation/observation-inbox/review-renderer.js +0 -292
  308. package/dist/studio/presentation/observation-inbox/reviewer-report.d.ts +0 -8
  309. package/dist/studio/presentation/observation-inbox/reviewer-report.js +0 -451
  310. package/dist/studio/presentation/observation-inbox/signal-renderer.d.ts +0 -20
  311. package/dist/studio/presentation/observation-inbox/signal-renderer.js +0 -93
  312. package/dist/studio/presentation/observation-inbox/skill-chain-renderer.d.ts +0 -17
  313. package/dist/studio/presentation/observation-inbox/skill-chain-renderer.js +0 -740
  314. package/dist/studio/presentation/observation-inbox/styles/experience.d.ts +0 -1
  315. package/dist/studio/presentation/observation-inbox/styles/experience.js +0 -943
  316. package/dist/studio/presentation/observation-inbox/styles/metrics.d.ts +0 -1
  317. package/dist/studio/presentation/observation-inbox/styles/metrics.js +0 -679
  318. package/dist/studio/presentation/observation-inbox/styles/review.d.ts +0 -1
  319. package/dist/studio/presentation/observation-inbox/styles/review.js +0 -1422
  320. package/dist/studio/presentation/observation-inbox/styles/shell.d.ts +0 -1
  321. package/dist/studio/presentation/observation-inbox/styles/shell.js +0 -844
  322. package/dist/studio/presentation/observation-inbox/styles/trajectory.d.ts +0 -1
  323. package/dist/studio/presentation/observation-inbox/styles/trajectory.js +0 -1299
  324. package/dist/studio/presentation/observation-inbox/styles.d.ts +0 -2
  325. package/dist/studio/presentation/observation-inbox/styles.js +0 -11
  326. package/dist/studio/presentation/observation-inbox/timeline.d.ts +0 -18
  327. package/dist/studio/presentation/observation-inbox/timeline.js +0 -773
  328. package/dist/studio/presentation/observation-inbox-renderer.d.ts +0 -4
  329. package/dist/studio/presentation/observation-inbox-renderer.js +0 -130
  330. package/dist/studio/presentation/report-shell.d.ts +0 -45
  331. package/dist/studio/presentation/report-shell.js +0 -230
  332. package/dist/studio/presentation/skill-detail-renderer.d.ts +0 -3
  333. package/dist/studio/presentation/skill-detail-renderer.js +0 -33
  334. package/dist/studio/presentation/skill-health-renderer.d.ts +0 -19
  335. package/dist/studio/presentation/skill-health-renderer.js +0 -315
  336. package/dist/studio/presentation/skill-list-renderer.d.ts +0 -3
  337. package/dist/studio/presentation/skill-list-renderer.js +0 -36
  338. package/dist/studio/presentation/trajectory-live.d.ts +0 -43
  339. package/dist/studio/presentation/trajectory-live.js +0 -273
  340. package/dist/studio/presentation/trajectory-routing.d.ts +0 -1
  341. package/dist/studio/presentation/trajectory-routing.js +0 -19
  342. package/dist/studio/view-models/report-context.d.ts +0 -33
  343. package/dist/studio/web/.next/server/chunks/106.js +0 -168
  344. package/dist/studio/web/.next/server/chunks/150.js +0 -1
  345. package/dist/studio/web/.next/server/chunks/304.js +0 -1
  346. package/dist/studio/web/.next/server/chunks/380.js +0 -1
  347. package/dist/studio/web/.next/server/chunks/564.js +0 -24
  348. package/dist/studio/web/.next/server/chunks/747.js +0 -6
  349. package/dist/studio/web/.next/server/chunks/772.js +0 -8
  350. package/dist/studio/web/.next/server/chunks/892.js +0 -1
  351. package/dist/studio/web/.next/static/chunks/0937d497-4bac4f7c73c04ac9.js +0 -1
  352. package/dist/studio/web/.next/static/chunks/111-d4b1e0d6247794ae.js +0 -57
  353. package/dist/studio/web/.next/static/chunks/250-ca16280838cdcfb2.js +0 -1
  354. package/dist/studio/web/.next/static/chunks/318-168841393bdaa8dd.js +0 -1
  355. package/dist/studio/web/.next/static/chunks/321-518bc727ce5b7333.js +0 -1
  356. package/dist/studio/web/.next/static/chunks/613-caa316c474dc3d66.js +0 -1
  357. package/dist/studio/web/.next/static/chunks/658-b29b1018111cdce8.js +0 -66
  358. package/dist/studio/web/.next/static/chunks/75-765230248b2aa7c3.js +0 -10
  359. package/dist/studio/web/.next/static/chunks/79-8fde571ae151dc77.js +0 -168
  360. package/dist/studio/web/.next/static/chunks/794-7f0ee86c0dc20482.js +0 -1
  361. package/dist/studio/web/.next/static/chunks/805-72d1d862ddb0aaf7.js +0 -13
  362. package/dist/studio/web/.next/static/chunks/810-bc57185c5bbe49f0.js +0 -8
  363. package/dist/studio/web/.next/static/chunks/858-0ff0c6a27bd5ed08.js +0 -52
  364. package/dist/studio/web/.next/static/chunks/868-2f9d5e42b712e805.js +0 -6
  365. package/dist/studio/web/.next/static/chunks/913-3b71b0d79bab222a.js +0 -4
  366. package/dist/studio/web/.next/static/chunks/app/_global-error/page-29993d7ce06ded15.js +0 -1
  367. package/dist/studio/web/.next/static/chunks/app/_not-found/page-29993d7ce06ded15.js +0 -1
  368. package/dist/studio/web/.next/static/chunks/app/error-54c470c75b81c772.js +0 -1
  369. package/dist/studio/web/.next/static/chunks/app/knowledge/page-4a23fe29d9a452d6.js +0 -1
  370. package/dist/studio/web/.next/static/chunks/app/knowledge/skills/[skillName]/page-4a23fe29d9a452d6.js +0 -1
  371. package/dist/studio/web/.next/static/chunks/app/layout-c8c1ba3381b66bea.js +0 -1
  372. package/dist/studio/web/.next/static/chunks/app/loading-d10eee48a75f2b12.js +0 -1
  373. package/dist/studio/web/.next/static/chunks/app/measure/[runId]/page-efd2fe3cf9a1fcc4.js +0 -1
  374. package/dist/studio/web/.next/static/chunks/app/measure/page-7c1a2923758fc2bb.js +0 -1
  375. package/dist/studio/web/.next/static/chunks/app/not-found-18281623b9a3c198.js +0 -1
  376. package/dist/studio/web/.next/static/chunks/app/observe/conversations/[threadId]/page-83d2777a89f631e7.js +0 -1
  377. package/dist/studio/web/.next/static/chunks/app/observe/conversations/[threadId]/tasks/[turnId]/page-d5900e1c74c0dce6.js +0 -1
  378. package/dist/studio/web/.next/static/chunks/app/observe/inbox/page-c159d5573caddac1.js +0 -1
  379. package/dist/studio/web/.next/static/chunks/app/observe/page-f5be9a9b66d7697e.js +0 -1
  380. package/dist/studio/web/.next/static/chunks/framework-a728c95a64c9352d.js +0 -1
  381. package/dist/studio/web/.next/static/chunks/main-12dcc6d4dacdbcea.js +0 -5
  382. package/dist/studio/web/.next/static/chunks/main-app-2cb213cabc9d7ea8.js +0 -1
  383. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/app-error-29993d7ce06ded15.js +0 -1
  384. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/forbidden-29993d7ce06ded15.js +0 -1
  385. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/global-error-916165c397dfccfe.js +0 -1
  386. package/dist/studio/web/.next/static/chunks/next/dist/client/components/builtin/unauthorized-29993d7ce06ded15.js +0 -1
  387. package/dist/studio/web/.next/static/cnCcATSim0kBaeNDgIhxj/_buildManifest.js +0 -1
  388. package/dist/studio/web/.next/static/css/763e4c18d841d615.css +0 -1
  389. /package/dist/{studio/view-models/report-context.js → eval-workflows/inputs/contracts/sample-input.js} +0 -0
  390. /package/dist/studio/web/.next/static/{cnCcATSim0kBaeNDgIhxj → z5Z1oaZbCQ47WIPuI9Vg-}/_ssgManifest.js +0 -0
@@ -191,7 +191,7 @@ omk studio --host 0.0.0.0 # 局域网访问(默认 127.0.0.1
191
191
  omk studio --no-open # 不自动开浏览器
192
192
  ```
193
193
 
194
- Studio 首页直接索引本机 Codex 对话。先选择对话,再选择任务查看四泳道任务轨迹;进行中的任务支持实时跟随。顶部「知识载体」入口用于浏览 doctor / eval / observe 报告,`/observe-inbox` 用于复核 observation。无需为了浏览本机 Codex 对话而先运行 `omk observe ingest`。
194
+ Studio 首页直接索引本机 Codex 对话。先选择对话,再选择任务查看四泳道任务轨迹;进行中的任务支持实时跟随。顶部「知识载体」入口用于浏览 doctor / eval / observe 报告,`/observe/inbox` 用于复核 observation。无需为了浏览本机 Codex 对话而先运行 `omk observe ingest`。
195
195
 
196
196
  ## 第五步:解读结果
197
197
 
@@ -227,15 +227,23 @@ v2 比 v1 更好(verdict: PROGRESS,Δ=+0.7,95% CI [+0.3, +1.1]):
227
227
 
228
228
  ## 指定工作目录(cwd)
229
229
 
230
- 当评测用例需要模型读取特定仓库的代码时,可在 sample 中设置 `cwd` 字段:
230
+ 当评测用例需要模型读取特定仓库的代码时,可在 sample 中设置 `executionContext.cwd` 字段:
231
231
 
232
232
  ```yaml
233
- - sample_id: task-001
234
- prompt: "实现用户登录功能,要求支持手机号和邮箱两种方式"
235
- cwd: "/path/to/target-repo"
236
- assertions:
237
- - type: contains_all
238
- values: ["auth.ts", "login.tsx"]
233
+ schemaVersion: omk.eval-sample-set/v3
234
+ samples:
235
+ - sampleId: task-001
236
+ input:
237
+ inputKind: text
238
+ text: 实现用户登录功能,要求支持手机号和邮箱两种方式
239
+ executionContext:
240
+ cwd: /path/to/target-repo
241
+ evaluationContext:
242
+ assertions:
243
+ - type: contains_all
244
+ values:
245
+ - auth.ts
246
+ - login.tsx
239
247
  ```
240
248
 
241
249
  `cwd` 会作为 executor 的工作目录,Codex / Claude 等 agent runtime 会在该目录下运行并读取仓库代码。适用于「给一个任务 query,断言应该修改哪些文件」的 A/B 评测场景。
@@ -594,7 +594,7 @@ omk sample [skillPath] [flags]
594
594
 
595
595
  **Flags:**
596
596
 
597
- - `--append` `boolean`:在已有用例文件上追加新生成的用例(撞 sample_id 自动加后缀去重,保留原 json/yaml 格式)。仅单 skill 模式,不支持 --batch / --from-traces。不传则已有文件时报错保护。常配 --focus 补特定场景。
597
+ - `--append` `boolean`:在已有用例文件上追加新生成的用例(撞 sampleId 自动加后缀去重,保留原 json/yaml 格式)。仅单 skill 模式,不支持 --batch / --from-traces。不传则已有文件时报错保护。常配 --focus 补特定场景。
598
598
  - `--batch` `boolean`:批量模式:扫 --skill-dir 下所有缺 samples 的 skill,逐个生成。
599
599
  - `--count` `option`:生成用例条数。不传由 LLM 按 skill 类型自动决定。
600
600
  - `--executor` `option`:执行器名。Codex 任务内自动用 codex;也可用 OMK_EXECUTOR 设置环境偏好。
@@ -667,21 +667,15 @@ omk studio --port 8080 --no-open
667
667
 
668
668
  ## eval-samples 字段参考
669
669
 
670
+ 只使用 `omk.eval-sample-set/v3`;v2 不兼容,不自动改写旧文件。每个样本包含:
671
+
670
672
  | 字段 | 必填 | 说明 |
671
- |------|------|------|
672
- | `sample_id` | 是 | 唯一标识 |
673
- | `prompt` | 是 | 用户提示词 |
674
- | `context` | 否 | 附加上下文(代码片段等) |
675
- | `cwd` | 否 | executor 工作目录,用于指定目标仓库路径 |
676
- | `rubric` | 否 | LLM 评分标准 |
677
- | `assertions` | 否 | 断言数组(含 `mock_hit` 等新 v0.30 类型) |
678
- | `dimensions` | 否 | 多维度评分 `{ 维度名: 评分标准 }` |
679
- | `capability` | 否 | 能力标签(HF Dataset Cards 风) |
680
- | `difficulty` | 否 | 难度等级 |
681
- | `construct` | 否 | 测的是什么构念 |
682
- | `provenance` | 否 | 用例来源(`omk sample` 自动打) |
683
- | `mocks` | 否 | 工具调用 mock 返回(sandbox 评测) |
684
- | `environment` | 否 | 题设环境声明(仅注入 prompt,不物化) |
685
- | `tripwire` | 否 | 标记为「故意诱错」用例并作为 Core Sample annotation 保留;不改变评分或 Decision |
686
-
687
- 完整 schema 见 [docs/specs/sample-design-spec.md](https://github.com/lizhiyao/oh-my-knowledge/blob/main/docs/specs/sample-design-spec.md)。
673
+ | --- | --- | --- |
674
+ | `sampleId` | 是 | 唯一标识 |
675
+ | `input` | 是 | 文本、结构化 JSON 或消息历史;API 执行器支持 JSON 和普通角色历史;工具历史使用 custom-executor |
676
+ | `executionContext` | 否 | `cwd`、工具控制、mocks、题设 environment 和应用 `data` |
677
+ | `expected` | 否 | 仅供评分器使用的参考结果 |
678
+ | `evaluationContext` | 否 | `rubric`、`assertions`、评分 `reference`、结构化 `checks` |
679
+ | `annotations` | 否 | 来源、难度、能力、覆盖锚点和诱错标记 |
680
+
681
+ 完整契约与能力边界见 [样本格式](https://github.com/lizhiyao/oh-my-knowledge/blob/main/docs/zh/reference/eval-sample-format.md)。
@@ -286,8 +286,8 @@ export default class Sample extends BaseCommand {
286
286
  }),
287
287
  append: Flags.boolean({
288
288
  description: bilingual({
289
- zh: '在已有用例文件上追加新生成的用例(撞 sample_id 自动加后缀去重,保留原 json/yaml 格式)。仅单 skill 模式,不支持 --batch / --from-traces。不传则已有文件时报错保护。常配 --focus 补特定场景。',
290
- en: 'Append newly generated samples to the existing samples file (colliding sample_id auto-suffixed, original json/yaml shape kept). Single-skill mode only; not supported with --batch / --from-traces. Without it, an existing file errors out. Often paired with --focus.',
289
+ zh: '在已有用例文件上追加新生成的用例(撞 sampleId 自动加后缀去重,保留原 json/yaml 格式)。仅单 skill 模式,不支持 --batch / --from-traces。不传则已有文件时报错保护。常配 --focus 补特定场景。',
290
+ en: 'Append newly generated samples to the existing samples file (colliding sampleId auto-suffixed, original json/yaml shape kept). Single-skill mode only; not supported with --batch / --from-traces. Without it, an existing file errors out. Often paired with --focus.',
291
291
  }),
292
292
  default: false,
293
293
  }),
@@ -4,7 +4,7 @@ export function resolveActor(flagActor) {
4
4
  if (flagActor && flagActor.trim())
5
5
  return flagActor.trim();
6
6
  try {
7
- const name = execFileSync('git', ['config', 'user.name'], { encoding: 'utf-8', stdio: ['ignore', 'pipe', 'ignore'] }).trim();
7
+ const name = execFileSync('git', ['config', 'user.name'], { encoding: 'utf-8', stdio: ['ignore', 'pipe', 'ignore'], timeout: 5_000 }).trim();
8
8
  if (name)
9
9
  return name;
10
10
  }
@@ -19,11 +19,12 @@ export async function announceCoreReport(artifacts, store, outputDirectory, serv
19
19
  return;
20
20
  }
21
21
  const { createCoreStudioCatalog } = await import('../../studio/application/core-run-catalog.js');
22
- const { createReportServer } = await import('../../studio/http/report-server.js');
23
- const server = createReportServer({
22
+ const { createNextStudioServer } = await import('../../studio/http/next-server.js');
23
+ const server = createNextStudioServer({
24
24
  coreStudioCatalog: createCoreStudioCatalog(store),
25
- // 评测预览宿主只服务 /measure 报告页,裁剪收件箱路由(#839 批次 0)。
26
- observationInbox: false,
25
+ // 评测预览宿主按设计只服务本次运行的 /measure 报告页:不挂观测/知识页面组,
26
+ // 壳层据此不渲染指向本宿主没有的一级导航。
27
+ studioPages: false,
27
28
  });
28
29
  const serverUrl = await server.start();
29
30
  let closing = false;
@@ -1,4 +1,4 @@
1
- import { createEvalSampleSetDocument } from '../../eval-workflows/inputs/schemas/sample-set.js';
1
+ import { createWorkflowSampleSetDocument } from '../../eval-workflows/inputs/schemas/sample-set.js';
2
2
  export const DEFAULT_INIT_SAMPLE_COUNT = 3;
3
3
  export const FULL_INIT_SAMPLE_COUNT = 20;
4
4
  /**
@@ -10,8 +10,8 @@ export const FULL_INIT_SAMPLE_COUNT = 20;
10
10
  const INIT_CURATED_SAMPLES = [
11
11
  {
12
12
  sample_id: 's001',
13
- prompt: '审查以下代码',
14
- context: "function authenticate(username, password) {\n const query = `SELECT * FROM users WHERE name='${username}' AND pass='${password}'`;\n return db.execute(query);\n}",
13
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nfunction authenticate(username, password) {\n const query = `SELECT * FROM users WHERE name='${username}' AND pass='${password}'`;\n return db.execute(query);\n}\n```" },
14
+ reference: "function authenticate(username, password) {\n const query = `SELECT * FROM users WHERE name='${username}' AND pass='${password}'`;\n return db.execute(query);\n}",
15
15
  rubric: {
16
16
  security: { criterion: '是否准确识别 SQL 注入漏洞并说明攻击影响', weight: 0.5 },
17
17
  actionability: { criterion: '是否给出可直接采用的参数化查询修复', weight: 0.5 },
@@ -26,8 +26,8 @@ const INIT_CURATED_SAMPLES = [
26
26
  },
27
27
  {
28
28
  sample_id: 's002',
29
- prompt: '审查以下代码',
30
- context: 'async function fetchData(url) {\n const res = await fetch(url);\n const data = await res.json();\n return data;\n}',
29
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nasync function fetchData(url) {\n const res = await fetch(url);\n const data = await res.json();\n return data;\n}\n```" },
30
+ reference: 'async function fetchData(url) {\n const res = await fetch(url);\n const data = await res.json();\n return data;\n}',
31
31
  rubric: {
32
32
  robustness: { criterion: '是否覆盖主要失败路径并区分错误来源', weight: 0.5 },
33
33
  actionability: { criterion: '是否给出完整且不过度复杂的修复方案', weight: 0.5 },
@@ -42,8 +42,8 @@ const INIT_CURATED_SAMPLES = [
42
42
  },
43
43
  {
44
44
  sample_id: 's003',
45
- prompt: '审查以下代码',
46
- context: "function renderComment(comment) {\n document.getElementById('output').innerHTML = '<p>' + comment + '</p>';\n}",
45
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nfunction renderComment(comment) {\n document.getElementById('output').innerHTML = '<p>' + comment + '</p>';\n}\n```" },
46
+ reference: "function renderComment(comment) {\n document.getElementById('output').innerHTML = '<p>' + comment + '</p>';\n}",
47
47
  rubric: {
48
48
  security: { criterion: '是否准确识别 XSS 漏洞及其数据流', weight: 0.5 },
49
49
  actionability: { criterion: '是否给出安全且适配当前场景的渲染方式', weight: 0.5 },
@@ -59,8 +59,8 @@ const INIT_CURATED_SAMPLES = [
59
59
  },
60
60
  {
61
61
  sample_id: 's004',
62
- prompt: '审查以下代码',
63
- context: "import { exec } from 'node:child_process';\n\nexport function archive(name) {\n exec(`tar -czf ${name}.tgz uploads/${name}`);\n}",
62
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nimport { exec } from 'node:child_process';\n\nexport function archive(name) {\n exec(`tar -czf ${name}.tgz uploads/${name}`);\n}\n```" },
63
+ reference: "import { exec } from 'node:child_process';\n\nexport function archive(name) {\n exec(`tar -czf ${name}.tgz uploads/${name}`);\n}",
64
64
  rubric: {
65
65
  security: { criterion: '是否识别出模板字符串进入 shell 的命令注入路径', weight: 0.5 },
66
66
  actionability: { criterion: '是否使用参数数组和输入约束消除注入面', weight: 0.5 },
@@ -75,8 +75,8 @@ const INIT_CURATED_SAMPLES = [
75
75
  },
76
76
  {
77
77
  sample_id: 's005',
78
- prompt: '审查以下代码',
79
- context: "import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nexport async function download(req) {\n return readFile(join('/srv/files', req.query.name));\n}",
78
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nimport { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nexport async function download(req) {\n return readFile(join('/srv/files', req.query.name));\n}\n```" },
79
+ reference: "import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nexport async function download(req) {\n return readFile(join('/srv/files', req.query.name));\n}",
80
80
  rubric: {
81
81
  security: { criterion: '是否识别编码、绝对路径和上级目录绕过风险', weight: 0.5 },
82
82
  actionability: { criterion: '是否给出基于解析后路径的边界校验', weight: 0.5 },
@@ -91,8 +91,8 @@ const INIT_CURATED_SAMPLES = [
91
91
  },
92
92
  {
93
93
  sample_id: 's006',
94
- prompt: '审查以下代码',
95
- context: "export async function findUser(db, email) {\n return db.query('SELECT id, name FROM users WHERE email = ?', [email]);\n}",
94
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nexport async function findUser(db, email) {\n return db.query('SELECT id, name FROM users WHERE email = ?', [email]);\n}\n```" },
95
+ reference: "export async function findUser(db, email) {\n return db.query('SELECT id, name FROM users WHERE email = ?', [email]);\n}",
96
96
  rubric: {
97
97
  precision: { criterion: '是否避免把安全的参数化查询误报为注入漏洞', weight: 0.5 },
98
98
  reasoning: { criterion: '是否区分确定缺陷、条件性风险和可选改进', weight: 0.5 },
@@ -104,8 +104,8 @@ const INIT_CURATED_SAMPLES = [
104
104
  },
105
105
  {
106
106
  sample_id: 's007',
107
- prompt: '审查以下代码',
108
- context: 'function displayName(user) {\n return user.profile.name.trim();\n}',
107
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nfunction displayName(user) {\n return user.profile.name.trim();\n}\n```" },
108
+ reference: 'function displayName(user) {\n return user.profile.name.trim();\n}',
109
109
  rubric: {
110
110
  robustness: { criterion: '是否完整定位 user、profile、name 的空值边界', weight: 0.5 },
111
111
  actionability: { criterion: '是否给出默认值、显式校验或可选链的合理选择', weight: 0.5 },
@@ -117,8 +117,8 @@ const INIT_CURATED_SAMPLES = [
117
117
  },
118
118
  {
119
119
  sample_id: 's008',
120
- prompt: '审查以下代码',
121
- context: "export function loadConfig(raw) {\n const config = JSON.parse(raw);\n return config.database.host.toLowerCase();\n}",
120
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nexport function loadConfig(raw) {\n const config = JSON.parse(raw);\n return config.database.host.toLowerCase();\n}\n```" },
121
+ reference: "export function loadConfig(raw) {\n const config = JSON.parse(raw);\n return config.database.host.toLowerCase();\n}",
122
122
  rubric: {
123
123
  robustness: { criterion: '是否覆盖解析失败和解析成功但结构错误两类路径', weight: 0.5 },
124
124
  actionability: { criterion: '是否提供可定位字段问题的校验与错误信息', weight: 0.5 },
@@ -133,8 +133,8 @@ const INIT_CURATED_SAMPLES = [
133
133
  },
134
134
  {
135
135
  sample_id: 's009',
136
- prompt: '审查以下代码',
137
- context: 'export async function getProfile(id) {\n for (;;) {\n try {\n return await fetch(`/profiles/${id}`).then(r => r.json());\n } catch {}\n }\n}',
136
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nexport async function getProfile(id) {\n for (;;) {\n try {\n return await fetch(`/profiles/${id}`).then(r => r.json());\n } catch {}\n }\n}\n```" },
137
+ reference: 'export async function getProfile(id) {\n for (;;) {\n try {\n return await fetch(`/profiles/${id}`).then(r => r.json());\n } catch {}\n }\n}',
138
138
  rubric: {
139
139
  robustness: { criterion: '是否覆盖无限循环、错误可观测性和服务放大效应', weight: 0.5 },
140
140
  actionability: { criterion: '是否给出上限、退避、超时和取消的完整策略', weight: 0.5 },
@@ -149,8 +149,8 @@ const INIT_CURATED_SAMPLES = [
149
149
  },
150
150
  {
151
151
  sample_id: 's010',
152
- prompt: '审查以下代码',
153
- context: "export async function loadUser(id, signal) {\n const res = await fetch(`/users/${encodeURIComponent(id)}`, { signal });\n if (!res.ok) throw new Error(`HTTP ${res.status}`);\n return await res.json();\n}",
152
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nexport async function loadUser(id, signal) {\n const res = await fetch(`/users/${encodeURIComponent(id)}`, { signal });\n if (!res.ok) throw new Error(`HTTP ${res.status}`);\n return await res.json();\n}\n```" },
153
+ reference: "export async function loadUser(id, signal) {\n const res = await fetch(`/users/${encodeURIComponent(id)}`, { signal });\n if (!res.ok) throw new Error(`HTTP ${res.status}`);\n return await res.json();\n}",
154
154
  rubric: {
155
155
  precision: { criterion: '是否避免否定代码已经具备的健壮性措施', weight: 0.5 },
156
156
  reasoning: { criterion: '是否把确定事实与依赖业务上下文的增强建议分开', weight: 0.5 },
@@ -162,8 +162,8 @@ const INIT_CURATED_SAMPLES = [
162
162
  },
163
163
  {
164
164
  sample_id: 's011',
165
- prompt: '审查以下代码',
166
- context: 'function shippingFee(weight) {\n if (weight > 30) return 999;\n return weight * 7.35 + 12;\n}',
165
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nfunction shippingFee(weight) {\n if (weight > 30) return 999;\n return weight * 7.35 + 12;\n}\n```" },
166
+ reference: 'function shippingFee(weight) {\n if (weight > 30) return 999;\n return weight * 7.35 + 12;\n}',
167
167
  rubric: {
168
168
  maintainability: { criterion: '是否解释 30、999、7.35、12 的语义和变更风险', weight: 0.5 },
169
169
  actionability: { criterion: '是否给出命名、单位和规则归位的具体方案', weight: 0.5 },
@@ -175,8 +175,8 @@ const INIT_CURATED_SAMPLES = [
175
175
  },
176
176
  {
177
177
  sample_id: 's012',
178
- prompt: '审查以下代码',
179
- context: "function createUser(input) {\n if (!input.email.includes('@')) throw new Error('bad email');\n return db.users.insert(input);\n}\nfunction updateUser(input) {\n if (!input.email.includes('@')) throw new Error('bad email');\n return db.users.update(input);\n}",
178
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nfunction createUser(input) {\n if (!input.email.includes('@')) throw new Error('bad email');\n return db.users.insert(input);\n}\nfunction updateUser(input) {\n if (!input.email.includes('@')) throw new Error('bad email');\n return db.users.update(input);\n}\n```" },
179
+ reference: "function createUser(input) {\n if (!input.email.includes('@')) throw new Error('bad email');\n return db.users.insert(input);\n}\nfunction updateUser(input) {\n if (!input.email.includes('@')) throw new Error('bad email');\n return db.users.update(input);\n}",
180
180
  rubric: {
181
181
  maintainability: { criterion: '是否识别重复逻辑与未来规则不一致的风险', weight: 0.5 },
182
182
  actionability: { criterion: '是否提出职责清晰、易测试且不过度抽象的重构', weight: 0.5 },
@@ -188,8 +188,8 @@ const INIT_CURATED_SAMPLES = [
188
188
  },
189
189
  {
190
190
  sample_id: 's013',
191
- prompt: '审查以下代码',
192
- context: "export async function completeOrder(order, user) {\n if (!user.admin && user.id !== order.userId) throw new Error('forbidden');\n order.status = 'complete';\n await db.orders.save(order);\n await mail.send(user.email, renderReceipt(order));\n metrics.increment('orders.complete');\n return JSON.stringify(order);\n}",
191
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nexport async function completeOrder(order, user) {\n if (!user.admin && user.id !== order.userId) throw new Error('forbidden');\n order.status = 'complete';\n await db.orders.save(order);\n await mail.send(user.email, renderReceipt(order));\n metrics.increment('orders.complete');\n return JSON.stringify(order);\n}\n```" },
192
+ reference: "export async function completeOrder(order, user) {\n if (!user.admin && user.id !== order.userId) throw new Error('forbidden');\n order.status = 'complete';\n await db.orders.save(order);\n await mail.send(user.email, renderReceipt(order));\n metrics.increment('orders.complete');\n return JSON.stringify(order);\n}",
193
193
  rubric: {
194
194
  maintainability: { criterion: '是否识别职责耦合以及失败时产生的部分完成状态', weight: 0.5 },
195
195
  actionability: { criterion: '是否在拆分职责的同时保留事务和副作用顺序', weight: 0.5 },
@@ -201,8 +201,8 @@ const INIT_CURATED_SAMPLES = [
201
201
  },
202
202
  {
203
203
  sample_id: 's014',
204
- prompt: '审查以下代码',
205
- context: 'function renderReport(data, compact, includeHeader, sortDescending, useUtc) {\n // formatting logic\n}',
204
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nfunction renderReport(data, compact, includeHeader, sortDescending, useUtc) {\n // formatting logic\n}\n```" },
205
+ reference: 'function renderReport(data, compact, includeHeader, sortDescending, useUtc) {\n // formatting logic\n}',
206
206
  rubric: {
207
207
  maintainability: { criterion: '是否解释调用点可读性和新增选项时的演进问题', weight: 0.5 },
208
208
  actionability: { criterion: '是否给出类型明确且可兼容默认值的参数设计', weight: 0.5 },
@@ -217,8 +217,8 @@ const INIT_CURATED_SAMPLES = [
217
217
  },
218
218
  {
219
219
  sample_id: 's015',
220
- prompt: '审查以下代码',
221
- context: 'export function clamp(value, min, max) {\n return Math.min(max, Math.max(min, value));\n}',
220
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nexport function clamp(value, min, max) {\n return Math.min(max, Math.max(min, value));\n}\n```" },
221
+ reference: 'export function clamp(value, min, max) {\n return Math.min(max, Math.max(min, value));\n}',
222
222
  rubric: {
223
223
  precision: { criterion: '是否避免为了展示审查深度而虚构维护性问题', weight: 0.5 },
224
224
  proportionality: { criterion: '建议的复杂度是否与这个小型纯函数相称', weight: 0.5 },
@@ -230,8 +230,8 @@ const INIT_CURATED_SAMPLES = [
230
230
  },
231
231
  {
232
232
  sample_id: 's016',
233
- prompt: '审查以下代码',
234
- context: 'export async function listOrders(users) {\n const rows = [];\n for (const user of users) {\n rows.push(...await db.orders.findByUser(user.id));\n }\n return rows;\n}',
233
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nexport async function listOrders(users) {\n const rows = [];\n for (const user of users) {\n rows.push(...await db.orders.findByUser(user.id));\n }\n return rows;\n}\n```" },
234
+ reference: 'export async function listOrders(users) {\n const rows = [];\n for (const user of users) {\n rows.push(...await db.orders.findByUser(user.id));\n }\n return rows;\n}',
235
235
  rubric: {
236
236
  performance: { criterion: '是否识别查询次数和串行延迟随用户数增长的问题', weight: 0.5 },
237
237
  actionability: { criterion: '是否给出符合数据库边界的批量读取方案', weight: 0.5 },
@@ -246,8 +246,8 @@ const INIT_CURATED_SAMPLES = [
246
246
  },
247
247
  {
248
248
  sample_id: 's017',
249
- prompt: '审查以下代码',
250
- context: 'export async function hydrate(ids) {\n const result = [];\n for (const id of ids) {\n result.push(await fetch(`/items/${id}`).then(r => r.json()));\n }\n return result;\n}',
249
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nexport async function hydrate(ids) {\n const result = [];\n for (const id of ids) {\n result.push(await fetch(`/items/${id}`).then(r => r.json()));\n }\n return result;\n}\n```" },
250
+ reference: 'export async function hydrate(ids) {\n const result = [];\n for (const id of ids) {\n result.push(await fetch(`/items/${id}`).then(r => r.json()));\n }\n return result;\n}',
251
251
  rubric: {
252
252
  performance: { criterion: '是否同时看见串行瓶颈和无界并发的反向风险', weight: 0.5 },
253
253
  actionability: { criterion: '是否给出可调并发度、错误策略和顺序语义', weight: 0.5 },
@@ -262,8 +262,8 @@ const INIT_CURATED_SAMPLES = [
262
262
  },
263
263
  {
264
264
  sample_id: 's018',
265
- prompt: '审查以下代码',
266
- context: 'function commonIds(left, right) {\n return left.filter(item => right.some(other => other.id === item.id));\n}',
265
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nfunction commonIds(left, right) {\n return left.filter(item => right.some(other => other.id === item.id));\n}\n```" },
266
+ reference: 'function commonIds(left, right) {\n return left.filter(item => right.some(other => other.id === item.id));\n}',
267
267
  rubric: {
268
268
  performance: { criterion: '是否准确分析时间复杂度而不是泛泛声称性能差', weight: 0.5 },
269
269
  actionability: { criterion: '是否根据唯一性和内存取舍选择合适索引结构', weight: 0.5 },
@@ -278,8 +278,8 @@ const INIT_CURATED_SAMPLES = [
278
278
  },
279
279
  {
280
280
  sample_id: 's019',
281
- prompt: '审查以下代码',
282
- context: 'const cache = new Map();\nexport async function resolveTenant(id) {\n if (!cache.has(id)) cache.set(id, await loadTenant(id));\n return cache.get(id);\n}',
281
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nconst cache = new Map();\nexport async function resolveTenant(id) {\n if (!cache.has(id)) cache.set(id, await loadTenant(id));\n return cache.get(id);\n}\n```" },
282
+ reference: 'const cache = new Map();\nexport async function resolveTenant(id) {\n if (!cache.has(id)) cache.set(id, await loadTenant(id));\n return cache.get(id);\n}',
283
283
  rubric: {
284
284
  performance: { criterion: '是否覆盖内存增长与并发 cache miss 两个独立问题', weight: 0.5 },
285
285
  actionability: { criterion: '是否给出与数据新鲜度和容量约束匹配的缓存策略', weight: 0.5 },
@@ -291,8 +291,8 @@ const INIT_CURATED_SAMPLES = [
291
291
  },
292
292
  {
293
293
  sample_id: 's020',
294
- prompt: '审查以下代码',
295
- context: 'export function indexById(items) {\n const index = new Map();\n for (const item of items) index.set(item.id, item);\n return index;\n}',
294
+ input: { inputKind: 'text', text: "审查以下代码\n\n```\nexport function indexById(items) {\n const index = new Map();\n for (const item of items) index.set(item.id, item);\n return index;\n}\n```" },
295
+ reference: 'export function indexById(items) {\n const index = new Map();\n for (const item of items) index.set(item.id, item);\n return index;\n}',
296
296
  rubric: {
297
297
  precision: { criterion: '是否避免把正常的 O(n) 工作误报为性能缺陷', weight: 0.5 },
298
298
  reasoning: { criterion: '是否把重复键语义作为条件性业务问题而非确定 bug', weight: 0.5 },
@@ -304,5 +304,5 @@ const INIT_CURATED_SAMPLES = [
304
304
  },
305
305
  ];
306
306
  export function serializeInitSamples(count) {
307
- return `${JSON.stringify(createEvalSampleSetDocument(INIT_CURATED_SAMPLES.slice(0, count)), null, 2)}\n`;
307
+ return `${JSON.stringify(createWorkflowSampleSetDocument(INIT_CURATED_SAMPLES.slice(0, count)), null, 2)}\n`;
308
308
  }
@@ -99,12 +99,12 @@ async function studioUrl(invocation, state) {
99
99
  return state.serverUrl;
100
100
  const cwd = invocation.agent.session.header.cwd ?? process.cwd();
101
101
  const layout = projectLayout(cwd);
102
- const { createReportServer } = await import('../studio/http/report-server.js');
102
+ const { createNextStudioServer } = await import('../studio/http/next-server.js');
103
103
  const { createNodeCoreContentStore, createNodeCoreRunArtifactStore, } = await import('../eval-workflows/artifact-store/index.js');
104
104
  const { createCoreStudioCatalog } = await import('../studio/application/core-run-catalog.js');
105
105
  const reportsDir = layout.evalDir;
106
106
  const contentStore = createNodeCoreContentStore(join(reportsDir, 'content'));
107
- state.server = createReportServer({
107
+ state.server = createNextStudioServer({
108
108
  port: 0,
109
109
  coreStudioCatalog: createCoreStudioCatalog(createNodeCoreRunArtifactStore(reportsDir, {
110
110
  contentResolver: contentStore,
@@ -114,7 +114,7 @@ async function studioUrl(invocation, state) {
114
114
  observationsDir: layout.observeInboxDir,
115
115
  managedDir: layout.managedDir,
116
116
  conversationCatalog: state.catalog,
117
- // DSH 宿主无收件箱页面入口(输出落盘路径),裁剪收件箱路由(#839 批次 0)。
117
+ // DSH 宿主无收件箱页面入口(输出落盘路径),裁剪收件箱页面与 API(#839 批次 0)。
118
118
  observationInbox: false,
119
119
  });
120
120
  state.serverUrl = await state.server.start();
@@ -3,7 +3,7 @@ import { type JsonValue } from '../../eval-core/contracts/index.js';
3
3
  import type { Executor, ExecutorCapabilities } from '../evaluation/contracts.js';
4
4
  /**
5
5
  * Façade-level subprocess exchange. Deliberately distinct from the sealed host-seam protocol
6
- * `omk.custom-command-exchange/v1`: a canonical invocation carries no runId, trialId, attemptId,
6
+ * `omk.custom-executor-exchange/v1`: a canonical invocation carries no runId, trialId, attemptId,
7
7
  * isolation key or execution plan digest, and this adapter never fabricates them. Hosts that need
8
8
  * plan-bound isolation, workspace overlays, native MCP config or mock interception must compose the
9
9
  * advanced execution seam instead.
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  import { IdentifierSchema, JsonValueSchema, UsageRecordSchema, canonicalizeJson, digestCanonicalJson, } from '../../eval-core/contracts/index.js';
4
4
  /**
5
5
  * Façade-level subprocess exchange. Deliberately distinct from the sealed host-seam protocol
6
- * `omk.custom-command-exchange/v1`: a canonical invocation carries no runId, trialId, attemptId,
6
+ * `omk.custom-executor-exchange/v1`: a canonical invocation carries no runId, trialId, attemptId,
7
7
  * isolation key or execution plan digest, and this adapter never fabricates them. Hosts that need
8
8
  * plan-bound isolation, workspace overlays, native MCP config or mock interception must compose the
9
9
  * advanced execution seam instead.
@@ -10,7 +10,7 @@ import { captureDataset, captureVariant, } from './capture-input.js';
10
10
  import { createEvaluationRuntime, EvaluationRuntimeAssemblyError, } from '../runtime.js';
11
11
  import { createEvaluationEngine as createCoreEvaluationEngine, } from '../../eval-core/engine/index.js';
12
12
  import { randomUUID, } from 'node:crypto';
13
- import { runPreparedEvaluation, EvaluationEventConsumptionError as AdvancedEvaluationEventConsumptionError, } from '../runner.js';
13
+ import { runPreparedEvaluation, HostEvaluationEventConsumptionError as AdvancedEvaluationEventConsumptionError, } from '../runner.js';
14
14
  import { attachDefinition, corePreparedEvaluations, } from './result-state.js';
15
15
  import { captureEvaluators, } from './capture-evaluators.js';
16
16
  import { createGeneralDefinition, } from './definition.js';
@@ -4,12 +4,14 @@ export declare const EXACT_MATCH_EVALUATOR_IMPLEMENTATION_ID: "omk.eval-runtime.
4
4
  export interface CreateExactMatchEvaluatorInput {
5
5
  readonly metricId?: string;
6
6
  readonly actualBindingId?: string;
7
+ readonly actualSourceKind?: 'output' | 'trace';
7
8
  readonly expectedBindingId?: string;
8
9
  readonly sessionIsolationKey?: string;
9
10
  }
10
11
  export declare function createExactMatchEvaluatorIdentity(input?: Readonly<{
11
12
  metricId?: string;
12
13
  actualBindingId?: string;
14
+ actualSourceKind?: 'output' | 'trace';
13
15
  expectedBindingId?: string;
14
16
  }>): RuntimeIdentity;
15
17
  /** Creates the deterministic exact-match Evaluator used by the convenience Definition builder. */
@@ -13,7 +13,7 @@ export function createExactMatchEvaluatorIdentity(input = {}) {
13
13
  implementationId: EXACT_MATCH_EVALUATOR_IMPLEMENTATION_ID,
14
14
  version: '1.0.0',
15
15
  capabilities: {
16
- inputSourceKinds: ['expected', 'output'],
16
+ inputSourceKinds: ['expected', input.actualSourceKind ?? 'output'],
17
17
  metricValueTypes: ['boolean'],
18
18
  schemas: [],
19
19
  },
@@ -22,6 +22,7 @@ export function createExactMatchEvaluatorIdentity(input = {}) {
22
22
  metricId,
23
23
  actualBindingId,
24
24
  expectedBindingId,
25
+ ...(input.actualSourceKind === 'trace' ? { actualSourceKind: 'trace' } : {}),
25
26
  },
26
27
  });
27
28
  }
@@ -31,7 +32,7 @@ export function createExactMatchEvaluator(input = {}) {
31
32
  const actualBindingId = input.actualBindingId ?? 'actual';
32
33
  const expectedBindingId = input.expectedBindingId ?? 'expected';
33
34
  return createSameProcessEvaluatorAdapter({
34
- identity: createExactMatchEvaluatorIdentity({ metricId, actualBindingId, expectedBindingId }),
35
+ identity: createExactMatchEvaluatorIdentity({ metricId, actualBindingId, expectedBindingId, actualSourceKind: input.actualSourceKind }),
35
36
  sessionIsolationKey: input.sessionIsolationKey ?? 'omk.eval-runtime.exact-match/v1',
36
37
  resourceLeases: { forRun: () => undefined },
37
38
  implementation: {
@@ -24,3 +24,39 @@ export type { McpConfigAccess, McpConfigDescriptor, McpConfigInput, McpConfigLea
24
24
  export type { AllowedToolsInput, AllowedToolsPlan, } from './tool-policy.js';
25
25
  export type { WorkspaceAccess, WorkspaceDescriptor, WorkspaceInput, WorkspaceLease, WorkspaceOpenRequest, WorkspacePlan, WorkspaceProvider, } from './workspace.js';
26
26
  export type { CustomEvaluator, CustomEvaluatorBinding, CustomEvaluatorContent, CustomEvaluatorInvocation, CustomEvaluatorResult, Metric, } from './custom-evaluator.js';
27
+ export { createExactMatchDefinition } from './builders/exact-match.js';
28
+ export type { ExactMatchDefinitionBuilderInput, ExactMatchTarget, } from './builders/exact-match.js';
29
+ export { createMeasurementPolicy } from './builders/policy.js';
30
+ export type { MeasurementEventDeliveryInput, MeasurementFailurePolicyInput, MeasurementAttemptBudgetScopeInput, MeasurementBudgetPolicyInput, MeasurementBudgetScopeInput, MeasurementCachePolicyInput, MeasurementEvidencePolicyInput, MeasurementPolicyBuilderInput, MeasurementProviderCostLimitInput, MeasurementRetryBackoffInput, MeasurementRetryPolicyInput, MeasurementRunBudgetScopeInput, MeasurementStagePolicyInput, } from './builders/policy.js';
31
+ export { createPairedComparisonDefinition } from './builders/paired-comparison.js';
32
+ export type { EvaluationRuntimeTarget, PairedComparisonDefinitionBuilderInput, } from './builders/paired-comparison.js';
33
+ export { EXACT_MATCH_EVALUATOR_IMPLEMENTATION_ID, createExactMatchEvaluator, createExactMatchEvaluatorIdentity, } from './evaluators/exact-match.js';
34
+ export type { CreateExactMatchEvaluatorInput } from './evaluators/exact-match.js';
35
+ export { createRubricJudgeCriterion, createRubricJudgeEvaluator, createRubricJudgeEvaluatorDefinition, createRubricJudgeEvaluatorIdentity, createRubricJudgeEvaluatorRegistration, createRubricJudgeInstrument, createRubricJudgeMetricDefinition, createRubricJudgeRuntimeConfig, rubricJudgeInstrumentId, } from './judges/rubric-judge.js';
36
+ export type { CreateRubricJudgeEvaluatorInput, RubricJudgeEvaluatorBinding, RubricJudgeEvaluatorDefinitionBuilderInput, } from './judges/rubric-judge.js';
37
+ export { createRubricJudgeEvaluationContext, createRubricJudgeKit, createRubricJudgeRegistration, } from './judges/rubric-kit.js';
38
+ export type { CreateRubricJudgeKitInput, RubricJudgeKit, } from './judges/rubric-kit.js';
39
+ export { HostEvaluationEventConsumptionError, runEvaluation, } from './runner.js';
40
+ export type { EvaluationEventObserver, RunEvaluationInput, } from './runner.js';
41
+ export { createInvokeExecutorIdentity, createRuntimeIdentity, createSessionExecutorIdentity, } from './identity.js';
42
+ export type { InvokeExecutorIdentityDeclaration, RuntimeIdentityDeclaration, SessionExecutorIdentityDeclaration, } from './identity.js';
43
+ export { EvaluationRuntimeAssemblyError, createEvaluationRuntime, } from './runtime.js';
44
+ export type { CreateEvaluationRuntimeInput } from './runtime.js';
45
+ export { createJsonExecutorAdapter, createJsonSessionExecutorAdapter, } from './adapters/json-executor.js';
46
+ export type { CreateJsonExecutorAdapterInput, CreateJsonSessionExecutorAdapterInput, JsonExecutorInvocation, JsonExecutorInvocationResult, JsonExecutorSession, JsonSessionExecutorAttempt, JsonSessionExecutorContext, RuntimeValueParser, } from './adapters/json-executor.js';
47
+ export { DEFAULT_SUBPROCESS_COMMAND_MAX_OUTPUT_BYTES, SUBPROCESS_COMMAND_EXCHANGE_SCHEMA_VERSION, createSubprocessCommandExecutor, } from './adapters/command-executor.js';
48
+ export type { CreateSubprocessCommandExecutorInput, SubprocessCommandConfiguration, SubprocessCommandValueParser, } from './adapters/command-executor.js';
49
+ export type { OmkLlmJudgeEffort, OmkLlmJudgeInvocationPort, OmkLlmJudgeInvocationRequest, OmkLlmJudgeInvocationResult, } from './judges/invocation.js';
50
+ export { RuntimeConformanceError, assertExecutorConformance, runExecutorConformance, } from './conformance/executor.js';
51
+ export type { ExecutorConformanceProbeInput, ExecutorConformanceResult, } from './conformance/executor.js';
52
+ export { createNodeEvaluationClock } from './clock.js';
53
+ export { INVOKE_JSON_INPUT_SCHEMA, INVOKE_JSON_OUTPUT_SCHEMA, INVOKE_JSON_TRACE_SCHEMA, SESSION_JSON_INPUT_SCHEMA, SESSION_JSON_OUTPUT_SCHEMA, SESSION_JSON_TRACE_SCHEMA, } from './identity.js';
54
+ export type { EvaluationRuntimeSupportPorts, RuntimePortRegistration, } from './runtime.js';
55
+ export { createExecutorFnAdapter } from './adapters/executor-fn.js';
56
+ export type { CreateExecutorFnAdapterInput, ExecResult, ExecutorFn, ExecutorFnInputMapper, ExecutorFnResultMapper, ExecutorInput, } from './adapters/executor-fn.js';
57
+ export { createSameProcessEvaluatorAdapter, createSameProcessExecutorAdapter, } from './adapters/same-process.js';
58
+ export type { CreateSameProcessEvaluatorAdapterInput, CreateSameProcessExecutorAdapterInput, SameProcessEvaluatorImplementation, SameProcessExecutorImplementation, SameProcessOperationScope, SameProcessResourceLeaseAccess, SameProcessRunScope, } from './adapters/same-process.js';
59
+ export { RUBRIC_JUDGE_BINDINGS, RUBRIC_JUDGE_CONTEXT_SCHEMA, RUBRIC_JUDGE_CONTEXT_SCHEMA_VERSION, RUBRIC_JUDGE_EVALUATOR_IMPLEMENTATION_ID, RUBRIC_JUDGE_EVIDENCE_SCHEMA, RUBRIC_JUDGE_EVIDENCE_SCHEMA_VERSION, RUBRIC_JUDGE_INSTRUMENT_SCHEMA, RUBRIC_JUDGE_INSTRUMENT_SCHEMA_VERSION, } from './judges/rubric-contracts.js';
60
+ export type { RubricJudgeConfig, RubricJudgeCriterion, RubricJudgeInstrument, RubricJudgeRuntimeConfig, RubricJudgeTracePolicy, } from './judges/rubric-contracts.js';
61
+ export { SOURCE_NEUTRAL_TRACE_SCHEMA_DESCRIPTOR, SOURCE_NEUTRAL_TRACE_SCHEMA_VERSION, SOURCE_NEUTRAL_TRACE_WITHOUT_MOCKS_SCHEMA_DESCRIPTOR, SourceNeutralMockStatsSchema, SourceNeutralTraceSchema, SourceNeutralTraceWithoutMocksSchema, attachSourceNeutralMockStats, parseSourceNeutralTrace, } from './traces/source-neutral.js';
62
+ export type { SourceNeutralMockStats, SourceNeutralTrace, } from './traces/source-neutral.js';
@@ -4,3 +4,24 @@ export { EVALUATION_RESULT_MEDIA_TYPE, EvaluationResultStoreError, loadEvaluatio
4
4
  export { EXECUTED_EVALUATION_MEDIA_TYPE, ExecutedEvaluationStoreError, loadExecutedEvaluation, saveExecutedEvaluation, } from './executed-store.js';
5
5
  export { RUNTIME_CHECK_RESULT_SCHEMA_VERSION, checkRuntime, } from './conformance/runtime.js';
6
6
  export { MOCK_INTERCEPTION_PLAN_MEDIA_TYPE } from './mock-interception.js';
7
+ // Imperative builders for assembling Definitions, Policies, and Evaluators directly.
8
+ export { createExactMatchDefinition } from './builders/exact-match.js';
9
+ export { createMeasurementPolicy } from './builders/policy.js';
10
+ export { createPairedComparisonDefinition } from './builders/paired-comparison.js';
11
+ export { EXACT_MATCH_EVALUATOR_IMPLEMENTATION_ID, createExactMatchEvaluator, createExactMatchEvaluatorIdentity, } from './evaluators/exact-match.js';
12
+ export { createRubricJudgeCriterion, createRubricJudgeEvaluator, createRubricJudgeEvaluatorDefinition, createRubricJudgeEvaluatorIdentity, createRubricJudgeEvaluatorRegistration, createRubricJudgeInstrument, createRubricJudgeMetricDefinition, createRubricJudgeRuntimeConfig, rubricJudgeInstrumentId, } from './judges/rubric-judge.js';
13
+ export { createRubricJudgeEvaluationContext, createRubricJudgeKit, createRubricJudgeRegistration, } from './judges/rubric-kit.js';
14
+ // Host assembly SPI (formerly eval-runtime/advanced).
15
+ export { HostEvaluationEventConsumptionError, runEvaluation, } from './runner.js';
16
+ export { createInvokeExecutorIdentity, createRuntimeIdentity, createSessionExecutorIdentity, } from './identity.js';
17
+ export { EvaluationRuntimeAssemblyError, createEvaluationRuntime, } from './runtime.js';
18
+ export { createJsonExecutorAdapter, createJsonSessionExecutorAdapter, } from './adapters/json-executor.js';
19
+ export { DEFAULT_SUBPROCESS_COMMAND_MAX_OUTPUT_BYTES, SUBPROCESS_COMMAND_EXCHANGE_SCHEMA_VERSION, createSubprocessCommandExecutor, } from './adapters/command-executor.js';
20
+ export { RuntimeConformanceError, assertExecutorConformance, runExecutorConformance, } from './conformance/executor.js';
21
+ export { createNodeEvaluationClock } from './clock.js';
22
+ export { INVOKE_JSON_INPUT_SCHEMA, INVOKE_JSON_OUTPUT_SCHEMA, INVOKE_JSON_TRACE_SCHEMA, SESSION_JSON_INPUT_SCHEMA, SESSION_JSON_OUTPUT_SCHEMA, SESSION_JSON_TRACE_SCHEMA, } from './identity.js';
23
+ export { createExecutorFnAdapter } from './adapters/executor-fn.js';
24
+ export { createSameProcessEvaluatorAdapter, createSameProcessExecutorAdapter, } from './adapters/same-process.js';
25
+ // Wire contracts (formerly eval-runtime/contracts).
26
+ export { RUBRIC_JUDGE_BINDINGS, RUBRIC_JUDGE_CONTEXT_SCHEMA, RUBRIC_JUDGE_CONTEXT_SCHEMA_VERSION, RUBRIC_JUDGE_EVALUATOR_IMPLEMENTATION_ID, RUBRIC_JUDGE_EVIDENCE_SCHEMA, RUBRIC_JUDGE_EVIDENCE_SCHEMA_VERSION, RUBRIC_JUDGE_INSTRUMENT_SCHEMA, RUBRIC_JUDGE_INSTRUMENT_SCHEMA_VERSION, } from './judges/rubric-contracts.js';
27
+ export { SOURCE_NEUTRAL_TRACE_SCHEMA_DESCRIPTOR, SOURCE_NEUTRAL_TRACE_SCHEMA_VERSION, SOURCE_NEUTRAL_TRACE_WITHOUT_MOCKS_SCHEMA_DESCRIPTOR, SourceNeutralMockStatsSchema, SourceNeutralTraceSchema, SourceNeutralTraceWithoutMocksSchema, attachSourceNeutralMockStats, parseSourceNeutralTrace, } from './traces/source-neutral.js';
@@ -30,12 +30,12 @@ export interface RunPreparedEvaluationInput {
30
30
  readonly eventBufferCapacity?: number;
31
31
  readonly onEvent?: EvaluationEventObserver;
32
32
  }
33
- export declare class EvaluationEventConsumptionError extends Error {
33
+ export declare class HostEvaluationEventConsumptionError extends Error {
34
34
  readonly code: 'EVAL_RUNTIME_EVENT_OBSERVER_FAILED' | 'EVAL_RUNTIME_EVENT_STREAM_FAILED';
35
35
  readonly runResult?: EvaluationRunResult;
36
36
  readonly cause: unknown;
37
37
  constructor(input: Readonly<{
38
- code: EvaluationEventConsumptionError['code'];
38
+ code: HostEvaluationEventConsumptionError['code'];
39
39
  message: string;
40
40
  cause: unknown;
41
41
  runResult?: EvaluationRunResult;
@@ -1,11 +1,11 @@
1
1
  import { createEvaluationEngine as createCoreEvaluationEngine } from '../eval-core/engine/index.js';
2
- export class EvaluationEventConsumptionError extends Error {
2
+ export class HostEvaluationEventConsumptionError extends Error {
3
3
  code;
4
4
  runResult;
5
5
  cause;
6
6
  constructor(input) {
7
7
  super(input.message);
8
- this.name = 'EvaluationEventConsumptionError';
8
+ this.name = 'HostEvaluationEventConsumptionError';
9
9
  this.code = input.code;
10
10
  this.cause = input.cause;
11
11
  this.runResult = input.runResult;
@@ -62,7 +62,7 @@ async function consumeEvaluationRun(start, input) {
62
62
  throw resultOutcome.reason;
63
63
  const result = resultOutcome.value;
64
64
  if (observerFailed) {
65
- throw new EvaluationEventConsumptionError({
65
+ throw new HostEvaluationEventConsumptionError({
66
66
  code: 'EVAL_RUNTIME_EVENT_OBSERVER_FAILED',
67
67
  message: 'Evaluation event observer 执行失败;评测保持 Core 终态并完成清理。',
68
68
  cause: observerFailure,
@@ -70,7 +70,7 @@ async function consumeEvaluationRun(start, input) {
70
70
  });
71
71
  }
72
72
  if (streamFailed) {
73
- throw new EvaluationEventConsumptionError({
73
+ throw new HostEvaluationEventConsumptionError({
74
74
  code: 'EVAL_RUNTIME_EVENT_STREAM_FAILED',
75
75
  message: 'Evaluation event stream 消费失败;评测已取消并完成清理。',
76
76
  cause: streamFailure,
@@ -1,3 +1,5 @@
1
+ import { projectAnthropicApiInput } from './input.js';
2
+ import { STATELESS_API_SAMPLE_INPUT_POLICY } from '../shared/sample-input.js';
1
3
  import { z } from 'zod';
2
4
  import { RuntimeIdentitySchema, canonicalizeJson, deepFreezeCanonicalJson, digestCanonicalJson, } from '../../../../eval-core/contracts/index.js';
3
5
  import { ExecutionPortFailure, } from '../../../../eval-core/execution/index.js';
@@ -81,7 +83,8 @@ function identityManifest(configuration, target, policy) {
81
83
  facetId: 'adapter.input-projection',
82
84
  value: {
83
85
  directoryEntrypoint: 'SKILL.md',
84
- promptTransport: 'messages-user-text',
86
+ authoredInput: STATELESS_API_SAMPLE_INPUT_POLICY,
87
+ promptTransport: 'messages-text-or-native-history',
85
88
  supportingFiles: 'canonical-user-envelope',
86
89
  systemInstructions: 'top-level-system',
87
90
  version: RESOURCE_PROFILE.promptSchemaVersion,
@@ -153,11 +156,8 @@ function requestBody(target, policy, runState, trialState) {
153
156
  return JSON.stringify({
154
157
  model: target.binding.qualification.model,
155
158
  max_tokens: policy.maxOutputTokens,
156
- messages: [{ role: 'user', content: trialState.prompt }],
159
+ ...projectAnthropicApiInput(runState, trialState),
157
160
  stream: false,
158
- ...(runState.systemInstructions === undefined
159
- ? {}
160
- : { system: runState.systemInstructions }),
161
161
  ...(target.binding.qualification.effort === undefined
162
162
  ? {}
163
163
  : { output_config: { effort: target.binding.qualification.effort } }),