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
@@ -223,11 +223,11 @@ function runShow(argv) {
223
223
  if (runIds.length > 0) {
224
224
  const rendered = [];
225
225
  for (const runId of runIds) {
226
- const document = yield* select("run.overview", () => (0, index_ts_1.selectInspectionOperation)(opened, {
227
- kind: "run.overview",
226
+ const document = yield* select("run.get", () => (0, index_ts_1.selectInspectionOperation)(opened, {
227
+ kind: "run.get",
228
228
  runId,
229
229
  }));
230
- rendered.push((0, render_ts_1.renderRun)(yield* project("run.overview", () => (0, model_ts_1.projectRun)(document))));
230
+ rendered.push((0, render_ts_1.renderRun)(yield* project("run.get", () => (0, model_ts_1.projectRun)(document))));
231
231
  }
232
232
  yield* write("stdout", rendered.join(""));
233
233
  return 0;
@@ -1 +1 @@
1
- {"version":3,"file":"contribution.js","sourceRoot":"","sources":["contribution.ts"],"names":[],"mappings":";;;AAAA,mCAAgD;AAChD,0DAA+G;AAC/G,4DAAuF;AACvF,qDAAgS;AAChS,mEAAkF;AAClF,8DAA4D;AAC5D,8EAAuE;AACvE,8DAAyE;AACzE,uEAA2E;AAC3E,2CAAgL;AAChL,yCAAyL;AACzL,MAAM,IAAI,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,QAAiB,EAAE,CAAC,CAAC;AAC5F,MAAM,MAAM,GAAG,CAAC,KAA0B,EAAuB,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5E,QAAA,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,IAAI,CAAC,2CAA2C,CAAC;KAC1D,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;QACR,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,IAAI,CAAC,2CAA2C,CAAC;KAC1D,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,IAAI,CAAC,2CAA2C,CAAC;KAC1D,CAAC;IACF,GAA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B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AACY,QAAA,cAAc,GAAgD,MAAM,CAAC,MAAM,CAAC;IACrF,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,iCAAiC;IAC1C,OAAO,EAAE,wBAAgB;IACzB,GAAG,EAAE,OAAO;CACf,CAAC,CAAC","sourcesContent":["import { Effect, Result, Schema } from \"effect\";\nimport { CliArguments, CliInvocationFacts, CliOutput, type CliOptionDefinition, } from \"../cli/application.ts\";\nimport { CliFeatureError, type CliCommandContribution, } from \"../cli/contribution.ts\";\nimport { InspectionIntegrityError, InspectionOperationError, externalInspectionSource, openInspectionSource, operationalInspectionSource, selectInspectionOperation, type InspectionFactSource, type InspectionOperationFor, type InspectionSuccessDocumentFor, } from \"../inspection/index.ts\";\nimport { ExperimentIdSchema, RunIdSchema, } from \"../record/codec/identifiers.ts\";\nimport { parseAttemptLocator } from \"../attempt-locator.ts\";\nimport { ProjectConfiguration } from \"../cli/project-configuration.ts\";\nimport { CurrentTargetUnavailable } from \"../experiment/host/current.ts\";\nimport { openCurrentProjectSource } from \"../inspection/project-source.ts\";\nimport { renderAttempt, renderDiff, renderExperiment, renderOverview, renderRun, renderSources, renderTiming, renderTrace, renderTraceDetail, renderUsage, } from \"./render.ts\";\nimport { projectAttempt, projectDiff, projectExperiment, projectOverview, projectRun, projectSources, projectTiming, projectTrace, projectTraceDetail, projectUsage, } from \"./model.ts\";\nconst help = (summary: string) => Object.freeze({ summary, visibility: \"public\" as const });\nconst option = (value: CliOptionDefinition): CliOptionDefinition => Object.freeze(value);\nexport const SHOW_CLI_OPTIONS = Object.freeze({\n record: option({\n type: \"string\",\n help: help(\"Read an external canonical SQLite Record.\"),\n }),\n run: option({\n type: \"string\",\n multiple: true,\n help: help(\"Show one sealed Run; repeat to show more.\"),\n }),\n experiment: option({\n type: \"string\",\n multiple: true,\n help: help(\"Show one Experiment; repeat to show more.\"),\n }),\n all: option({\n type: \"boolean\",\n help: help(\"Show Attempts hidden by the compact Results view.\"),\n }),\n source: option({\n type: \"boolean\",\n help: help(\"Show captured source facts for one Attempt locator.\"),\n }),\n execution: option({\n type: \"boolean\",\n help: help(\"Show the execution outline for one Attempt locator.\"),\n }),\n actor: option({ type: \"string\", help: help(\"Filter execution events by exact actor ID.\") }),\n type: option({ type: \"string\", help: help(\"Filter execution events by exact event type.\") }),\n continuation: option({ type: \"string\", help: help(\"Read the next execution page with the same filters.\") }),\n timing: option({\n type: \"boolean\",\n help: help(\"Show captured timing for one Attempt locator.\"),\n }),\n usage: option({\n type: \"boolean\",\n help: help(\"Show captured usage for one Attempt locator.\"),\n }),\n diff: option({\n type: \"boolean\",\n help: help(\"Show captured file changes for one Attempt locator.\"),\n }),\n expand: option({\n type: \"string\",\n help: help(\"Expand one stable execution identity.\"),\n }),\n help: option({ type: \"boolean\", short: \"h\", help: help(\"Print show help.\") }),\n} satisfies Readonly<Record<string, CliOptionDefinition>>);\nconst SHOW_HELP = `niceeval show — inspect results in the terminal\n\nUsage:\n niceeval show [--all] [--record <file>]\n niceeval show --run <run-id>... [--record <file>]\n niceeval show --experiment <experiment-id>... [--record <file>]\n niceeval show @<locator> [--record <file>]\n niceeval show @<locator> --source\n niceeval show @<locator> --execution [--expand <stable-id>]\n niceeval show @<locator> --execution [--actor <id>] [--type <event-type>] [--continuation <token>]\n niceeval show @<locator> --timing\n niceeval show @<locator> --usage\n niceeval show @<locator> --diff\n\nSelectors:\n --record <file> Read an external canonical SQLite Record.\n --run <run-id> Show one exact sealed Run; repeatable.\n --experiment <experiment-id> Show one exact Experiment; repeatable.\n --all Show Attempts hidden by compact Results.\n\nAttempt details:\n --source Show captured sources and Assertion sites.\n --execution Show the bounded execution outline.\n --actor <id> Filter execution events by exact actor ID.\n --type <event-type> Filter execution events by exact type.\n --continuation <token> Read the next page using the same filters.\n --expand <stable-id> Expand an execution event/evidence ID, itemId,\n toolOccurrenceId, or commandId.\n --timing Show captured timing activities.\n --usage Show captured usage totals and observations.\n --diff Show captured file-change windows.\n\n --help, -h Print show help.\n`;\ntype Requirements = CliArguments | CliInvocationFacts | CliOutput | ProjectConfiguration;\ntype Error = CliFeatureError;\nconst failure = (operation: string, cause: unknown) => {\n const detail = cause instanceof CurrentTargetUnavailable || cause instanceof InspectionOperationError && cause.code === \"current-target-unavailable\"\n ? `current-target-unavailable: ${cause.reason}\\nRead fixed history: niceeval show --run <run-id>`\n : cause instanceof InspectionIntegrityError\n ? `Record integrity failure for sealed Run ${cause.runId}.`\n : cause instanceof InspectionOperationError &&\n cause.code === \"inspection-record-integrity-failure\"\n ? `Record integrity failure${cause.identity === undefined ? \"\" : ` for sealed Run ${cause.identity.runId}`}.`\n : cause instanceof InspectionOperationError\n ? cause.code === \"inspection-selection-missing\" ||\n cause.code === \"inspection-result-invalid\"\n ? cause.reason\n : \"The Inspection operation could not be completed.\"\n : undefined;\n return new CliFeatureError({\n feature: \"show\",\n operation,\n cause,\n exitCode: 1,\n ...(detail === undefined\n ? {}\n : { display: `show ${operation} failed: ${detail}\\n` }),\n });\n};\nconst write = (channel: \"stdout\" | \"stderr\", value: string) => Effect.flatMap(CliOutput, (output) => channel === \"stdout\"\n ? output.writeStdout(value)\n : output.writeStderr(value)).pipe(Effect.mapError((cause) => failure(`write ${channel}`, cause)));\nconst usage = (message: string) => write(\"stderr\", `${message}\\n`).pipe(Effect.as(1));\nfunction runShow(argv: readonly string[]): Effect.Effect<number, Error, Requirements> {\n return Effect.gen(function* () {\n const parser = yield* CliArguments;\n const parsedResult = yield* Effect.try({\n try: () => parser.parse(argv, SHOW_CLI_OPTIONS),\n catch: (cause) => failure(\"parse arguments\", cause),\n }).pipe(Effect.result);\n if (Result.isFailure(parsedResult))\n return yield* usage(reason(parsedResult.failure.cause));\n const parsed = parsedResult.success;\n if (parsed.values.help === true) {\n yield* write(\"stdout\", SHOW_HELP);\n return 0;\n }\n const locator = parsed.positionals[0];\n if (parsed.positionals.length > 1)\n return yield* usage(\"niceeval show accepts at most one Attempt locator.\");\n const decodedLocator = locator === undefined\n ? undefined\n : parseAttemptLocator(locator);\n if (decodedLocator !== undefined && !decodedLocator.valid)\n return yield* usage(`Invalid Attempt locator ${JSON.stringify(locator)}; expected canonical @<locator>.`);\n const runIds = parseRunIds(parsed.values.run);\n if (typeof runIds === \"string\")\n return yield* usage(runIds);\n const experimentIds = parseExperimentIds(parsed.values.experiment);\n if (typeof experimentIds === \"string\")\n return yield* usage(experimentIds);\n const source = parsed.values.source === true;\n const execution = parsed.values.execution === true;\n const timing = parsed.values.timing === true;\n const showUsage = parsed.values.usage === true;\n const diff = parsed.values.diff === true;\n const all = parsed.values.all === true;\n const detailModes = [source, execution, timing, showUsage, diff].filter(Boolean).length;\n const expand = typeof parsed.values.expand === \"string\"\n ? parsed.values.expand\n : undefined;\n const actorId = typeof parsed.values.actor === \"string\" ? parsed.values.actor : undefined;\n const eventType = typeof parsed.values.type === \"string\" ? parsed.values.type : undefined;\n const continuation = typeof parsed.values.continuation === \"string\" ? parsed.values.continuation : undefined;\n const listOptions = [actorId === undefined ? undefined : \"--actor\", eventType === undefined ? undefined : \"--type\", continuation === undefined ? undefined : \"--continuation\"]\n .filter((value) => value !== undefined);\n if (listOptions.length > 0 && !execution)\n return yield* usage(`${listOptions.join(\", \")} require --execution.`);\n if (listOptions.length > 0 && expand !== undefined)\n return yield* usage(`--expand cannot be combined with ${listOptions.join(\", \")}.`);\n if (detailModes > 1)\n return yield* usage(\"--source, --execution, --timing, --usage, and --diff are mutually exclusive.\");\n if (detailModes > 0 && locator === undefined)\n return yield* usage(\"--source, --execution, --timing, --usage, and --diff require one Attempt locator.\");\n if (expand !== undefined && !execution)\n return yield* usage(\"--expand requires --execution.\");\n if (expand !== undefined && /^(?:t\\d+\\.c\\d+|cmd\\d+)$/u.test(expand))\n return yield* usage(\"Legacy positional execution handles are not accepted; use a stable itemId, toolOccurrenceId, or commandId from the outline.\");\n if (locator !== undefined && (runIds.length > 0 || experimentIds.length > 0))\n return yield* usage(\"An Attempt locator, --run, and --experiment are mutually exclusive.\");\n if (runIds.length > 0 && experimentIds.length > 0)\n return yield* usage(\"--run and --experiment are mutually exclusive.\");\n if (all &&\n (locator !== undefined || runIds.length > 0 || experimentIds.length > 0))\n return yield* usage(\"--all applies only to Results, not --experiment, --run, or an Attempt locator.\");\n const facts = yield* Effect.flatMap(CliInvocationFacts, ({ facts }) => facts).pipe(Effect.mapError((cause) => failure(\"read invocation facts\", cause)));\n const inspectionSource = typeof parsed.values.record === \"string\"\n ? externalInspectionSource(facts.cwd, parsed.values.record)\n : operationalInspectionSource(facts.cwd);\n return yield* Effect.scoped(Effect.gen(function* () {\n const current = decodedLocator === undefined && runIds.length === 0 && experimentIds.length === 0 && typeof parsed.values.record !== \"string\";\n const prepare = current ? Effect.gen(function* () {\n const project = yield* ProjectConfiguration;\n const config = yield* project.load(facts.cwd).pipe(Effect.mapError((cause) => new CurrentTargetUnavailable({ code: \"current-target-unavailable\", reason: String(cause), cause })));\n return yield* openCurrentProjectSource({ cwd: facts.cwd, config });\n }) : openInspectionSource(inspectionSource);\n const opened = yield* prepare.pipe(Effect.mapError((cause) => failure(\"open Record source\", cause)));\n const select = <A>(operation: string, evaluate: () => A): Effect.Effect<A, Error> => Effect.try({\n try: evaluate,\n catch: (cause) => failure(`execute ${operation}`, cause),\n });\n const project = <A>(operation: string, evaluate: () => A): Effect.Effect<A, Error> => Effect.try({\n try: evaluate,\n catch: (cause) => failure(`project ${operation} result`, cause),\n });\n if (decodedLocator === undefined &&\n runIds.length === 0 &&\n experimentIds.length === 0) {\n if (current) {\n const document = yield* select(\"project.get\", () => selectInspectionOperation(opened, { kind: \"project.get\" }));\n // The presentation model only extracts already-closed aggregate fields.\n const view = yield* project(\"project.get\", () => projectOverview({ ...document, operation: \"overview.get\", overview: document.project }));\n yield* write(\"stdout\", renderOverview(view, { all, current: document.project }));\n return 0;\n }\n const document = yield* select(\"overview.get\", () => selectInspectionOperation(opened, { kind: \"overview.get\" }));\n yield* write(\"stdout\", renderOverview(yield* project(\"overview.get\", () => projectOverview(document)), { all, recorded: true }));\n return 0;\n }\n if (runIds.length > 0) {\n const rendered: string[] = [];\n for (const runId of runIds) {\n const document = yield* select(\"run.overview\", () => selectInspectionOperation(opened, {\n kind: \"run.overview\",\n runId,\n }));\n rendered.push(renderRun(yield* project(\"run.overview\", () => projectRun(document))));\n }\n yield* write(\"stdout\", rendered.join(\"\"));\n return 0;\n }\n if (experimentIds.length > 0) {\n const rendered: string[] = [];\n for (const experimentId of experimentIds) {\n const document = yield* select(\"experiment.get\", () => selectInspectionOperation(opened, {\n kind: \"experiment.get\",\n experimentId,\n }));\n rendered.push(renderExperiment(yield* project(\"experiment.get\", () => projectExperiment(document))));\n }\n yield* write(\"stdout\", rendered.join(\"\"));\n return 0;\n }\n const selectedLocator = decodedLocator!.locator;\n if (source) {\n const document = yield* select(\"attempt.sources\", () => selectInspectionOperation(opened, {\n kind: \"attempt.sources\",\n locator: selectedLocator,\n }));\n yield* write(\"stdout\", renderSources(yield* project(\"attempt.sources\", () => projectSources(document, selectedLocator))));\n return 0;\n }\n if (execution) {\n if (expand !== undefined) {\n const detail = yield* select(\"attempt.trace.detail\", () => selectTraceDetailByStableId(opened, selectedLocator, expand));\n yield* write(\"stdout\", renderTraceDetail(yield* project(\"attempt.trace.detail\", () => projectTraceDetail(detail, selectedLocator))));\n return 0;\n }\n const outline = yield* select(\"attempt.trace\", () => selectInspectionOperation(opened, {\n kind: \"attempt.trace\",\n locator: selectedLocator,\n ...(actorId === undefined ? {} : { actorId }),\n ...(eventType === undefined ? {} : { eventType }),\n ...(continuation === undefined ? {} : { continuation }),\n }));\n const trace = yield* project(\"attempt.trace\", () => projectTrace(outline, selectedLocator));\n yield* write(\"stdout\", renderTrace(trace));\n return 0;\n }\n if (timing) {\n const document = yield* select(\"attempt.timing\", () => selectInspectionOperation(opened, {\n kind: \"attempt.timing\",\n locator: selectedLocator,\n }));\n yield* write(\"stdout\", renderTiming(yield* project(\"attempt.timing\", () => projectTiming(document, selectedLocator))));\n return 0;\n }\n if (showUsage) {\n const document = yield* select(\"attempt.usage\", () => selectInspectionOperation(opened, {\n kind: \"attempt.usage\",\n locator: selectedLocator,\n }));\n yield* write(\"stdout\", renderUsage(yield* project(\"attempt.usage\", () => projectUsage(document, selectedLocator))));\n return 0;\n }\n if (diff) {\n const document = yield* select(\"attempt.diff\", () => selectInspectionOperation(opened, {\n kind: \"attempt.diff\",\n locator: selectedLocator,\n }));\n yield* write(\"stdout\", renderDiff(yield* project(\"attempt.diff\", () => projectDiff(document, selectedLocator))));\n return 0;\n }\n const document = yield* select(\"attempt.get\", () => selectInspectionOperation(opened, {\n kind: \"attempt.get\",\n locator: selectedLocator,\n }));\n const usage = yield* select(\"attempt.usage\", () => selectInspectionOperation(opened, { kind: \"attempt.usage\", locator: selectedLocator }));\n yield* write(\"stdout\", renderAttempt(yield* project(\"attempt.get\", () => projectAttempt(document, usage))));\n return 0;\n }));\n });\n}\nfunction selectTraceDetailByStableId(source: InspectionFactSource, locator: string, stableId: string): InspectionSuccessDocumentFor<\"attempt.trace.detail\"> {\n type DetailSelector = InspectionOperationFor<\"attempt.trace.detail\">[\"selector\"];\n const selectors = Object.freeze([\n { kind: \"execution-event\", eventId: stableId },\n { kind: \"execution-evidence\", evidenceId: stableId },\n { kind: \"item\", itemId: stableId },\n { kind: \"tool-occurrence\", toolOccurrenceId: stableId },\n { kind: \"command\", commandId: stableId },\n ]) as unknown as readonly DetailSelector[];\n for (const selector of selectors) {\n try {\n return selectInspectionOperation(source, {\n kind: \"attempt.trace.detail\",\n locator,\n selector,\n });\n }\n catch (cause) {\n if (cause instanceof InspectionOperationError && cause.code === \"inspection-selection-missing\")\n continue;\n throw cause;\n }\n }\n throw new InspectionOperationError({\n code: \"inspection-selection-missing\",\n operation: \"attempt.trace.detail\",\n reason: `Stable execution identity ${JSON.stringify(stableId)} was not found.`,\n });\n}\nfunction parseRunIds(value: string | boolean | string[] | undefined): readonly Schema.Schema.Type<typeof RunIdSchema>[] | string {\n const values = typeof value === \"string\" ? [value] : Array.isArray(value) ? value : [];\n const output: Schema.Schema.Type<typeof RunIdSchema>[] = [];\n for (const candidate of values) {\n const decoded = Schema.decodeUnknownResult(RunIdSchema)(candidate);\n if (Result.isFailure(decoded))\n return `Invalid --run value ${JSON.stringify(candidate)}.`;\n if (!output.includes(decoded.success))\n output.push(decoded.success);\n }\n return Object.freeze(output.sort(compareIdentity));\n}\nfunction parseExperimentIds(value: string | boolean | string[] | undefined): readonly Schema.Schema.Type<typeof ExperimentIdSchema>[] | string {\n const values = typeof value === \"string\" ? [value] : Array.isArray(value) ? value : [];\n const output: Schema.Schema.Type<typeof ExperimentIdSchema>[] = [];\n for (const candidate of values) {\n const decoded = Schema.decodeUnknownResult(ExperimentIdSchema)(candidate);\n if (Result.isFailure(decoded))\n return `Invalid --experiment value ${JSON.stringify(candidate)}.`;\n if (!output.includes(decoded.success))\n output.push(decoded.success);\n }\n return Object.freeze(output.sort(compareIdentity));\n}\nfunction compareIdentity(left: string, right: string): number {\n return left < right ? -1 : left > right ? 1 : 0;\n}\nfunction reason(value: unknown): string {\n return value instanceof Error ? value.message : String(value);\n}\nexport const showCliCommand: CliCommandContribution<Requirements, Error> = Object.freeze({\n name: \"show\",\n summary: \"inspect results in the terminal\",\n options: SHOW_CLI_OPTIONS,\n run: runShow,\n});\n"]}
1
+ {"version":3,"file":"contribution.js","sourceRoot":"","sources":["contribution.ts"],"names":[],"mappings":";;;AAAA,mCAAgD;AAChD,0DAA+G;AAC/G,4DAAuF;AACvF,qDAAgS;AAChS,mEAAkF;AAClF,8DAA4D;AAC5D,8EAAuE;AACvE,8DAAyE;AACzE,uEAA2E;AAC3E,2CAAgL;AAChL,yCAAyL;AACzL,MAAM,IAAI,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,U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AAM,CAAC,SAAS,CAAC,OAAO,CAAC;YACzB,OAAO,8BAA8B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC;QACtE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;AACvD,CAAC;AACD,SAAS,eAAe,CAAC,IAAY,EAAE,KAAa;IAChD,OAAO,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AACD,SAAS,MAAM,CAAC,KAAc;IAC1B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AACY,QAAA,cAAc,GAAgD,MAAM,CAAC,MAAM,CAAC;IACrF,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,iCAAiC;IAC1C,OAAO,EAAE,wBAAgB;IACzB,GAAG,EAAE,OAAO;CACf,CAAC,CAAC","sourcesContent":["import { Effect, Result, Schema } from \"effect\";\nimport { CliArguments, CliInvocationFacts, CliOutput, type CliOptionDefinition, } from \"../cli/application.ts\";\nimport { CliFeatureError, type CliCommandContribution, } from \"../cli/contribution.ts\";\nimport { InspectionIntegrityError, InspectionOperationError, externalInspectionSource, openInspectionSource, operationalInspectionSource, selectInspectionOperation, type InspectionFactSource, type InspectionOperationFor, type InspectionSuccessDocumentFor, } from \"../inspection/index.ts\";\nimport { ExperimentIdSchema, RunIdSchema, } from \"../record/codec/identifiers.ts\";\nimport { parseAttemptLocator } from \"../attempt-locator.ts\";\nimport { ProjectConfiguration } from \"../cli/project-configuration.ts\";\nimport { CurrentTargetUnavailable } from \"../experiment/host/current.ts\";\nimport { openCurrentProjectSource } from \"../inspection/project-source.ts\";\nimport { renderAttempt, renderDiff, renderExperiment, renderOverview, renderRun, renderSources, renderTiming, renderTrace, renderTraceDetail, renderUsage, } from \"./render.ts\";\nimport { projectAttempt, projectDiff, projectExperiment, projectOverview, projectRun, projectSources, projectTiming, projectTrace, projectTraceDetail, projectUsage, } from \"./model.ts\";\nconst help = (summary: string) => Object.freeze({ summary, visibility: \"public\" as const });\nconst option = (value: CliOptionDefinition): CliOptionDefinition => Object.freeze(value);\nexport const SHOW_CLI_OPTIONS = Object.freeze({\n record: option({\n type: \"string\",\n help: help(\"Read an external canonical SQLite Record.\"),\n }),\n run: option({\n type: \"string\",\n multiple: true,\n help: help(\"Show one sealed Run; repeat to show more.\"),\n }),\n experiment: option({\n type: \"string\",\n multiple: true,\n help: help(\"Show one Experiment; repeat to show more.\"),\n }),\n all: option({\n type: \"boolean\",\n help: help(\"Show Attempts hidden by the compact Results view.\"),\n }),\n source: option({\n type: \"boolean\",\n help: help(\"Show captured source facts for one Attempt locator.\"),\n }),\n execution: option({\n type: \"boolean\",\n help: help(\"Show the execution outline for one Attempt locator.\"),\n }),\n actor: option({ type: \"string\", help: help(\"Filter execution events by exact actor ID.\") }),\n type: option({ type: \"string\", help: help(\"Filter execution events by exact event type.\") }),\n continuation: option({ type: \"string\", help: help(\"Read the next execution page with the same filters.\") }),\n timing: option({\n type: \"boolean\",\n help: help(\"Show captured timing for one Attempt locator.\"),\n }),\n usage: option({\n type: \"boolean\",\n help: help(\"Show captured usage for one Attempt locator.\"),\n }),\n diff: option({\n type: \"boolean\",\n help: help(\"Show captured file changes for one Attempt locator.\"),\n }),\n expand: option({\n type: \"string\",\n help: help(\"Expand one stable execution identity.\"),\n }),\n help: option({ type: \"boolean\", short: \"h\", help: help(\"Print show help.\") }),\n} satisfies Readonly<Record<string, CliOptionDefinition>>);\nconst SHOW_HELP = `niceeval show — inspect results in the terminal\n\nUsage:\n niceeval show [--all] [--record <file>]\n niceeval show --run <run-id>... [--record <file>]\n niceeval show --experiment <experiment-id>... [--record <file>]\n niceeval show @<locator> [--record <file>]\n niceeval show @<locator> --source\n niceeval show @<locator> --execution [--expand <stable-id>]\n niceeval show @<locator> --execution [--actor <id>] [--type <event-type>] [--continuation <token>]\n niceeval show @<locator> --timing\n niceeval show @<locator> --usage\n niceeval show @<locator> --diff\n\nSelectors:\n --record <file> Read an external canonical SQLite Record.\n --run <run-id> Show one exact sealed Run; repeatable.\n --experiment <experiment-id> Show one exact Experiment; repeatable.\n --all Show Attempts hidden by compact Results.\n\nAttempt details:\n --source Show captured sources and Assertion sites.\n --execution Show the bounded execution outline.\n --actor <id> Filter execution events by exact actor ID.\n --type <event-type> Filter execution events by exact type.\n --continuation <token> Read the next page using the same filters.\n --expand <stable-id> Expand an execution event/evidence ID, itemId,\n toolOccurrenceId, or commandId.\n --timing Show captured timing activities.\n --usage Show captured usage totals and observations.\n --diff Show captured file-change windows.\n\n --help, -h Print show help.\n`;\ntype Requirements = CliArguments | CliInvocationFacts | CliOutput | ProjectConfiguration;\ntype Error = CliFeatureError;\nconst failure = (operation: string, cause: unknown) => {\n const detail = cause instanceof CurrentTargetUnavailable || cause instanceof InspectionOperationError && cause.code === \"current-target-unavailable\"\n ? `current-target-unavailable: ${cause.reason}\\nRead fixed history: niceeval show --run <run-id>`\n : cause instanceof InspectionIntegrityError\n ? `Record integrity failure for sealed Run ${cause.runId}.`\n : cause instanceof InspectionOperationError &&\n cause.code === \"inspection-record-integrity-failure\"\n ? `Record integrity failure${cause.identity === undefined ? \"\" : ` for sealed Run ${cause.identity.runId}`}.`\n : cause instanceof InspectionOperationError\n ? cause.code === \"inspection-selection-missing\" ||\n cause.code === \"inspection-result-invalid\"\n ? cause.reason\n : \"The Inspection operation could not be completed.\"\n : undefined;\n return new CliFeatureError({\n feature: \"show\",\n operation,\n cause,\n exitCode: 1,\n ...(detail === undefined\n ? {}\n : { display: `show ${operation} failed: ${detail}\\n` }),\n });\n};\nconst write = (channel: \"stdout\" | \"stderr\", value: string) => Effect.flatMap(CliOutput, (output) => channel === \"stdout\"\n ? output.writeStdout(value)\n : output.writeStderr(value)).pipe(Effect.mapError((cause) => failure(`write ${channel}`, cause)));\nconst usage = (message: string) => write(\"stderr\", `${message}\\n`).pipe(Effect.as(1));\nfunction runShow(argv: readonly string[]): Effect.Effect<number, Error, Requirements> {\n return Effect.gen(function* () {\n const parser = yield* CliArguments;\n const parsedResult = yield* Effect.try({\n try: () => parser.parse(argv, SHOW_CLI_OPTIONS),\n catch: (cause) => failure(\"parse arguments\", cause),\n }).pipe(Effect.result);\n if (Result.isFailure(parsedResult))\n return yield* usage(reason(parsedResult.failure.cause));\n const parsed = parsedResult.success;\n if (parsed.values.help === true) {\n yield* write(\"stdout\", SHOW_HELP);\n return 0;\n }\n const locator = parsed.positionals[0];\n if (parsed.positionals.length > 1)\n return yield* usage(\"niceeval show accepts at most one Attempt locator.\");\n const decodedLocator = locator === undefined\n ? undefined\n : parseAttemptLocator(locator);\n if (decodedLocator !== undefined && !decodedLocator.valid)\n return yield* usage(`Invalid Attempt locator ${JSON.stringify(locator)}; expected canonical @<locator>.`);\n const runIds = parseRunIds(parsed.values.run);\n if (typeof runIds === \"string\")\n return yield* usage(runIds);\n const experimentIds = parseExperimentIds(parsed.values.experiment);\n if (typeof experimentIds === \"string\")\n return yield* usage(experimentIds);\n const source = parsed.values.source === true;\n const execution = parsed.values.execution === true;\n const timing = parsed.values.timing === true;\n const showUsage = parsed.values.usage === true;\n const diff = parsed.values.diff === true;\n const all = parsed.values.all === true;\n const detailModes = [source, execution, timing, showUsage, diff].filter(Boolean).length;\n const expand = typeof parsed.values.expand === \"string\"\n ? parsed.values.expand\n : undefined;\n const actorId = typeof parsed.values.actor === \"string\" ? parsed.values.actor : undefined;\n const eventType = typeof parsed.values.type === \"string\" ? parsed.values.type : undefined;\n const continuation = typeof parsed.values.continuation === \"string\" ? parsed.values.continuation : undefined;\n const listOptions = [actorId === undefined ? undefined : \"--actor\", eventType === undefined ? undefined : \"--type\", continuation === undefined ? undefined : \"--continuation\"]\n .filter((value) => value !== undefined);\n if (listOptions.length > 0 && !execution)\n return yield* usage(`${listOptions.join(\", \")} require --execution.`);\n if (listOptions.length > 0 && expand !== undefined)\n return yield* usage(`--expand cannot be combined with ${listOptions.join(\", \")}.`);\n if (detailModes > 1)\n return yield* usage(\"--source, --execution, --timing, --usage, and --diff are mutually exclusive.\");\n if (detailModes > 0 && locator === undefined)\n return yield* usage(\"--source, --execution, --timing, --usage, and --diff require one Attempt locator.\");\n if (expand !== undefined && !execution)\n return yield* usage(\"--expand requires --execution.\");\n if (expand !== undefined && /^(?:t\\d+\\.c\\d+|cmd\\d+)$/u.test(expand))\n return yield* usage(\"Legacy positional execution handles are not accepted; use a stable itemId, toolOccurrenceId, or commandId from the outline.\");\n if (locator !== undefined && (runIds.length > 0 || experimentIds.length > 0))\n return yield* usage(\"An Attempt locator, --run, and --experiment are mutually exclusive.\");\n if (runIds.length > 0 && experimentIds.length > 0)\n return yield* usage(\"--run and --experiment are mutually exclusive.\");\n if (all &&\n (locator !== undefined || runIds.length > 0 || experimentIds.length > 0))\n return yield* usage(\"--all applies only to Results, not --experiment, --run, or an Attempt locator.\");\n const facts = yield* Effect.flatMap(CliInvocationFacts, ({ facts }) => facts).pipe(Effect.mapError((cause) => failure(\"read invocation facts\", cause)));\n const inspectionSource = typeof parsed.values.record === \"string\"\n ? externalInspectionSource(facts.cwd, parsed.values.record)\n : operationalInspectionSource(facts.cwd);\n return yield* Effect.scoped(Effect.gen(function* () {\n const current = decodedLocator === undefined && runIds.length === 0 && experimentIds.length === 0 && typeof parsed.values.record !== \"string\";\n const prepare = current ? Effect.gen(function* () {\n const project = yield* ProjectConfiguration;\n const config = yield* project.load(facts.cwd).pipe(Effect.mapError((cause) => new CurrentTargetUnavailable({ code: \"current-target-unavailable\", reason: String(cause), cause })));\n return yield* openCurrentProjectSource({ cwd: facts.cwd, config });\n }) : openInspectionSource(inspectionSource);\n const opened = yield* prepare.pipe(Effect.mapError((cause) => failure(\"open Record source\", cause)));\n const select = <A>(operation: string, evaluate: () => A): Effect.Effect<A, Error> => Effect.try({\n try: evaluate,\n catch: (cause) => failure(`execute ${operation}`, cause),\n });\n const project = <A>(operation: string, evaluate: () => A): Effect.Effect<A, Error> => Effect.try({\n try: evaluate,\n catch: (cause) => failure(`project ${operation} result`, cause),\n });\n if (decodedLocator === undefined &&\n runIds.length === 0 &&\n experimentIds.length === 0) {\n if (current) {\n const document = yield* select(\"project.get\", () => selectInspectionOperation(opened, { kind: \"project.get\" }));\n // The presentation model only extracts already-closed aggregate fields.\n const view = yield* project(\"project.get\", () => projectOverview({ ...document, operation: \"overview.get\", overview: document.project }));\n yield* write(\"stdout\", renderOverview(view, { all, current: document.project }));\n return 0;\n }\n const document = yield* select(\"overview.get\", () => selectInspectionOperation(opened, { kind: \"overview.get\" }));\n yield* write(\"stdout\", renderOverview(yield* project(\"overview.get\", () => projectOverview(document)), { all, recorded: true }));\n return 0;\n }\n if (runIds.length > 0) {\n const rendered: string[] = [];\n for (const runId of runIds) {\n const document = yield* select(\"run.get\", () => selectInspectionOperation(opened, {\n kind: \"run.get\",\n runId,\n }));\n rendered.push(renderRun(yield* project(\"run.get\", () => projectRun(document))));\n }\n yield* write(\"stdout\", rendered.join(\"\"));\n return 0;\n }\n if (experimentIds.length > 0) {\n const rendered: string[] = [];\n for (const experimentId of experimentIds) {\n const document = yield* select(\"experiment.get\", () => selectInspectionOperation(opened, {\n kind: \"experiment.get\",\n experimentId,\n }));\n rendered.push(renderExperiment(yield* project(\"experiment.get\", () => projectExperiment(document))));\n }\n yield* write(\"stdout\", rendered.join(\"\"));\n return 0;\n }\n const selectedLocator = decodedLocator!.locator;\n if (source) {\n const document = yield* select(\"attempt.sources\", () => selectInspectionOperation(opened, {\n kind: \"attempt.sources\",\n locator: selectedLocator,\n }));\n yield* write(\"stdout\", renderSources(yield* project(\"attempt.sources\", () => projectSources(document, selectedLocator))));\n return 0;\n }\n if (execution) {\n if (expand !== undefined) {\n const detail = yield* select(\"attempt.trace.detail\", () => selectTraceDetailByStableId(opened, selectedLocator, expand));\n yield* write(\"stdout\", renderTraceDetail(yield* project(\"attempt.trace.detail\", () => projectTraceDetail(detail, selectedLocator))));\n return 0;\n }\n const outline = yield* select(\"attempt.trace\", () => selectInspectionOperation(opened, {\n kind: \"attempt.trace\",\n locator: selectedLocator,\n ...(actorId === undefined ? {} : { actorId }),\n ...(eventType === undefined ? {} : { eventType }),\n ...(continuation === undefined ? {} : { continuation }),\n }));\n const trace = yield* project(\"attempt.trace\", () => projectTrace(outline, selectedLocator));\n yield* write(\"stdout\", renderTrace(trace));\n return 0;\n }\n if (timing) {\n const document = yield* select(\"attempt.timing\", () => selectInspectionOperation(opened, {\n kind: \"attempt.timing\",\n locator: selectedLocator,\n }));\n yield* write(\"stdout\", renderTiming(yield* project(\"attempt.timing\", () => projectTiming(document, selectedLocator))));\n return 0;\n }\n if (showUsage) {\n const document = yield* select(\"attempt.usage\", () => selectInspectionOperation(opened, {\n kind: \"attempt.usage\",\n locator: selectedLocator,\n }));\n yield* write(\"stdout\", renderUsage(yield* project(\"attempt.usage\", () => projectUsage(document, selectedLocator))));\n return 0;\n }\n if (diff) {\n const document = yield* select(\"attempt.diff\", () => selectInspectionOperation(opened, {\n kind: \"attempt.diff\",\n locator: selectedLocator,\n }));\n yield* write(\"stdout\", renderDiff(yield* project(\"attempt.diff\", () => projectDiff(document, selectedLocator))));\n return 0;\n }\n const document = yield* select(\"attempt.get\", () => selectInspectionOperation(opened, {\n kind: \"attempt.get\",\n locator: selectedLocator,\n }));\n const usage = yield* select(\"attempt.usage\", () => selectInspectionOperation(opened, { kind: \"attempt.usage\", locator: selectedLocator }));\n yield* write(\"stdout\", renderAttempt(yield* project(\"attempt.get\", () => projectAttempt(document, usage))));\n return 0;\n }));\n });\n}\nfunction selectTraceDetailByStableId(source: InspectionFactSource, locator: string, stableId: string): InspectionSuccessDocumentFor<\"attempt.trace.detail\"> {\n type DetailSelector = InspectionOperationFor<\"attempt.trace.detail\">[\"selector\"];\n const selectors = Object.freeze([\n { kind: \"execution-event\", eventId: stableId },\n { kind: \"execution-evidence\", evidenceId: stableId },\n { kind: \"item\", itemId: stableId },\n { kind: \"tool-occurrence\", toolOccurrenceId: stableId },\n { kind: \"command\", commandId: stableId },\n ]) as unknown as readonly DetailSelector[];\n for (const selector of selectors) {\n try {\n return selectInspectionOperation(source, {\n kind: \"attempt.trace.detail\",\n locator,\n selector,\n });\n }\n catch (cause) {\n if (cause instanceof InspectionOperationError && cause.code === \"inspection-selection-missing\")\n continue;\n throw cause;\n }\n }\n throw new InspectionOperationError({\n code: \"inspection-selection-missing\",\n operation: \"attempt.trace.detail\",\n reason: `Stable execution identity ${JSON.stringify(stableId)} was not found.`,\n });\n}\nfunction parseRunIds(value: string | boolean | string[] | undefined): readonly Schema.Schema.Type<typeof RunIdSchema>[] | string {\n const values = typeof value === \"string\" ? [value] : Array.isArray(value) ? value : [];\n const output: Schema.Schema.Type<typeof RunIdSchema>[] = [];\n for (const candidate of values) {\n const decoded = Schema.decodeUnknownResult(RunIdSchema)(candidate);\n if (Result.isFailure(decoded))\n return `Invalid --run value ${JSON.stringify(candidate)}.`;\n if (!output.includes(decoded.success))\n output.push(decoded.success);\n }\n return Object.freeze(output.sort(compareIdentity));\n}\nfunction parseExperimentIds(value: string | boolean | string[] | undefined): readonly Schema.Schema.Type<typeof ExperimentIdSchema>[] | string {\n const values = typeof value === \"string\" ? [value] : Array.isArray(value) ? value : [];\n const output: Schema.Schema.Type<typeof ExperimentIdSchema>[] = [];\n for (const candidate of values) {\n const decoded = Schema.decodeUnknownResult(ExperimentIdSchema)(candidate);\n if (Result.isFailure(decoded))\n return `Invalid --experiment value ${JSON.stringify(candidate)}.`;\n if (!output.includes(decoded.success))\n output.push(decoded.success);\n }\n return Object.freeze(output.sort(compareIdentity));\n}\nfunction compareIdentity(left: string, right: string): number {\n return left < right ? -1 : left > right ? 1 : 0;\n}\nfunction reason(value: unknown): string {\n return value instanceof Error ? value.message : String(value);\n}\nexport const showCliCommand: CliCommandContribution<Requirements, Error> = Object.freeze({\n name: \"show\",\n summary: \"inspect results in the terminal\",\n options: SHOW_CLI_OPTIONS,\n run: runShow,\n});\n"]}
@@ -63,23 +63,24 @@ function projectExperiment(document) {
63
63
  // @concord-code ne-surface-project-run-view
64
64
  // @concord-implements docs/feature/inspection/use-case/inspection-check-completeness.md
65
65
  function projectRun(document) {
66
- const value = document.runOverview;
66
+ const detail = document.run;
67
+ const value = detail.value;
67
68
  return {
68
- runId: value.identity.runId,
69
- experimentId: value.identity.experimentId,
70
- adapter: value.identity.adapter,
69
+ runId: value.runId,
70
+ experimentId: value.experimentId,
71
+ adapter: value.context?.execution.adapter ?? null,
71
72
  state: value.state,
72
73
  startedAt: value.startedAt,
73
74
  ...(value.completedAt === undefined ? {} : { completedAt: value.completedAt }),
74
- expected: value.denominator.expected,
75
- observed: value.denominator.observed,
76
- coverage: value.coverage,
77
- usage: value.usage,
78
- limitations: value.limitations,
79
- members: value.members.map((member) => ({
80
- slotId: member.slot.slotId,
81
- evalId: member.slot.evalId,
82
- attemptOrdinal: member.slot.attemptOrdinal,
75
+ expected: detail.denominator.expected,
76
+ observed: detail.denominator.published,
77
+ coverage: detail.coverage,
78
+ usage: detail.usage,
79
+ limitations: detail.limitations,
80
+ members: detail.slots.map((member) => ({
81
+ slotId: member.slotId,
82
+ evalId: member.evalId,
83
+ attemptOrdinal: member.attemptOrdinal,
83
84
  locator: member.locator,
84
85
  state: member.state,
85
86
  relation: member.relation,
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["model.ts"],"names":[],"mappings":";;AAqSA,0CAWC;AACD,8CAQC;AAGD,gCA6BC;AAGD,wCA4BC;AACD,wCAqBC;AACD,oCAuCC;AACD,gDAgBC;AACD,sCAE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CAAC,IAAI,KAAK,SAAS;oBACrB,CAAC,CAAC,IAAI,CAAC,SAAS;oBAChB,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,iBAAiB;wBAC7B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO;wBACpB,CAAC,CAAC,IAAI,CAAC,UAAU;QACjC,IAAI;KACP,CAAC;AACN,CAAC;AACD,SAAgB,aAAa,CAAC,QAAwD,EAAE,OAAe;IACnG,OAAO,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;AAC3C,CAAC;AACD,SAAgB,YAAY,CAAC,QAAuD,EAAE,OAAe;IACjG,OAAO,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;AAC1C,CAAC;AACD,SAAgB,WAAW,CAAC,QAAsD,EAAE,OAAe;IAC/F,OAAO,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;AACzC,CAAC","sourcesContent":["// @concord-file ne-surface-show-model\n// @concord-implements docs/feature/inspection/cli.md\n// @concord-implements docs/feature/run-inspection/README.md\nimport type { InspectionOverviewResult, InspectionScoredValue, InspectionSuccessDocumentFor, InspectionTraceDetailResult, } from \"../inspection/index.ts\";\nimport type { AttemptOutcome as RecordAttemptOutcome, MembershipAction as RecordMembershipAction } from \"../record/model/core.ts\";\nimport type { AdapterIdentity } from \"../record/model/run-context.ts\";\nimport type { Verdict as PublicVerdict } from \"../shared/types.ts\";\nimport type { AgentTurnOutcome as ReceiptAgentTurnOutcome, SANDBOX_COMMAND_PHASES } from \"../record/family/protocol-values.ts\";\nexport type MetricState = \"available\" | \"partial\" | \"unavailable\" | \"empty\" | \"unsupported\" | \"failed\";\nexport type Verdict = PublicVerdict;\nexport type MembershipAction = RecordMembershipAction;\nexport type AttemptOutcome = RecordAttemptOutcome;\nexport type AgentTurnOutcome = ReceiptAgentTurnOutcome;\nexport type SectionState = \"available\" | \"not-recorded\" | \"partial\" | \"unavailable\";\nexport type ProjectionState = \"complete\" | \"partial\" | \"not-recorded\" | \"invalid\";\nexport type SourceState = \"available\" | \"not-recorded\" | \"invalid\";\nexport type ScoredValue = InspectionScoredValue;\nexport type SourceContent = {\n readonly state: \"available\";\n readonly text: string;\n} | {\n readonly state: \"omitted\";\n readonly reason: \"inspection-result-byte-limit\";\n readonly byteLength: number;\n readonly byteLimit: number;\n};\nexport type AssertionSource = {\n readonly state: \"mapped\";\n readonly sourceItemId: string;\n readonly sha256: string;\n} | {\n readonly state: \"unmapped\";\n readonly reason: \"source-snapshot-not-recorded\" | \"position-unrepresentable\";\n};\nexport type CommandPhase = (typeof SANDBOX_COMMAND_PHASES)[number];\nexport type CommandOutcome = \"exited\" | \"terminated\" | \"not-started\";\nexport type Metric = {\n readonly state: MetricState;\n readonly value: number | null;\n};\nexport type ExecutionValue = {\n readonly state: \"available\";\n readonly value: string;\n} | {\n readonly state: \"mixed\";\n} | {\n readonly state: \"unavailable\";\n};\nexport type AdapterValue = {\n readonly state: \"available\";\n readonly value: AdapterIdentity;\n} | {\n readonly state: \"mixed\";\n};\nexport type Aggregate = {\n readonly evaluationKind: \"pass\" | \"points\" | \"mixed\";\n readonly expected: number;\n readonly observed: number;\n readonly passed: number;\n readonly failed: number;\n readonly errored: number;\n readonly skipped: number;\n readonly passRate: Metric;\n readonly score: Metric;\n readonly durationMs: Metric;\n readonly tokens: Metric;\n};\nexport interface OverviewView {\n readonly totals: Aggregate;\n readonly experiments: readonly {\n readonly experimentId: string;\n readonly adapter: AdapterValue;\n readonly model: ExecutionValue;\n readonly aggregate: Aggregate;\n }[];\n readonly cells: readonly {\n readonly experimentId: string;\n readonly evalId: string;\n readonly aggregate: Aggregate;\n readonly members: readonly {\n readonly publication: {\n readonly state: \"pending\";\n } | {\n readonly state: \"absent\";\n readonly reason: string;\n } | {\n readonly state: \"published\";\n readonly action: MembershipAction;\n readonly attemptId: string;\n readonly attemptLocator: string;\n readonly originRunId: string;\n readonly originSlotId: string;\n readonly verdict: Verdict | null;\n readonly score: Metric;\n readonly durationMs: Metric;\n readonly tokens: Metric;\n };\n }[];\n }[];\n}\nexport interface ExperimentView {\n readonly experimentId: string;\n readonly aggregate: Aggregate;\n readonly cells: OverviewView[\"cells\"];\n readonly costSummary: InspectionSuccessDocumentFor<\"experiment.get\">[\"experiment\"][\"costSummary\"];\n readonly modelUsage: InspectionSuccessDocumentFor<\"experiment.get\">[\"experiment\"][\"modelUsage\"];\n}\nexport interface RunView {\n readonly runId: string;\n readonly experimentId: string;\n readonly adapter: AdapterIdentity | null;\n readonly state: \"active\" | \"completed\" | \"interrupted\" | \"failed\";\n readonly startedAt: number;\n readonly completedAt?: number;\n readonly expected: number;\n readonly observed: number;\n readonly coverage: InspectionSuccessDocumentFor<\"run.overview\">[\"runOverview\"][\"coverage\"];\n readonly usage: InspectionSuccessDocumentFor<\"run.overview\">[\"runOverview\"][\"usage\"];\n readonly limitations: InspectionSuccessDocumentFor<\"run.overview\">[\"runOverview\"][\"limitations\"];\n readonly members: readonly {\n readonly slotId: string;\n readonly evalId: string;\n readonly attemptOrdinal: number;\n readonly locator: string | null;\n readonly state: MembershipAction | \"pending\";\n readonly relation: \"origin\" | \"reference\" | null;\n readonly outcome: AttemptOutcome | null;\n readonly verdict: Verdict | null;\n readonly score: ScoredValue | null;\n readonly coverage: InspectionSuccessDocumentFor<\"run.overview\">[\"runOverview\"][\"members\"][number][\"coverage\"];\n readonly usage: InspectionSuccessDocumentFor<\"run.overview\">[\"runOverview\"][\"members\"][number][\"usage\"];\n readonly limitations: InspectionSuccessDocumentFor<\"run.overview\">[\"runOverview\"][\"members\"][number][\"limitations\"];\n }[];\n}\nexport interface AttemptView {\n readonly totalCosts?: InspectionSuccessDocumentFor<\"attempt.usage\">[\"usage\"][\"totalCosts\"];\n readonly locator: string;\n readonly verdict: Verdict | null;\n readonly attemptId: string;\n readonly evalId: string;\n readonly slotId: string;\n readonly outcome: AttemptOutcome;\n readonly originRunId: string;\n readonly experimentId: string;\n readonly score: ScoredValue;\n readonly sections: {\n readonly assertions: SectionState;\n readonly sources: SectionState;\n readonly trace: SectionState;\n readonly timing: SectionState;\n readonly usage: SectionState;\n readonly diff: SectionState;\n };\n readonly assertions: {\n readonly state: SourceState;\n readonly entries: readonly {\n readonly entryId: string;\n readonly label?: string;\n readonly key?: string;\n readonly groupPath: readonly string[];\n }[];\n };\n readonly evidenceCoverage: readonly string[];\n readonly limitations: readonly string[];\n}\nexport interface SourcesView {\n readonly locator: string;\n readonly state: SourceState;\n readonly items: readonly {\n readonly path: string;\n readonly sourceItemId: string;\n readonly byteLength: number;\n readonly content: SourceContent;\n }[];\n readonly assertions: {\n readonly state: SourceState;\n readonly sites: readonly {\n readonly entryId: string;\n readonly role: \"declaration\" | \"threshold\" | \"score\" | \"gate\" | \"optional\" | \"stop\";\n readonly start: {\n readonly line: number;\n readonly column: number;\n };\n readonly end: {\n readonly line: number;\n readonly column: number;\n };\n readonly source: AssertionSource;\n }[];\n readonly hasMoreSourceSites: boolean;\n readonly omittedSourceSiteCount: number;\n };\n readonly hasMore: boolean;\n readonly omittedItemCount: number;\n}\ntype WithoutTurnId<Value> = Value extends unknown ? Omit<Value, \"turnId\"> : never;\nexport type TraceItem = WithoutTurnId<InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"conversation\"][\"items\"][number]>;\nexport interface TraceView {\n readonly locator: string;\n readonly execution: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"execution\"];\n readonly conversation: {\n readonly state: ProjectionState;\n readonly limitations: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"conversation\"][\"limitations\"];\n readonly limitationsTruncated: boolean;\n readonly omittedLimitationCount: number;\n readonly turnsTruncated: boolean;\n readonly omittedTurnCount: number;\n readonly itemCount: number;\n readonly itemsTruncated: boolean;\n readonly omittedItemCount: number;\n readonly turns: readonly {\n readonly turnId: string;\n readonly sequence: number;\n readonly outcome: AgentTurnOutcome;\n readonly items: readonly TraceItem[];\n }[];\n };\n readonly commands: {\n readonly state: ProjectionState;\n readonly limitations: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"commands\"][\"limitations\"];\n readonly limitationsTruncated: boolean;\n readonly omittedLimitationCount: number;\n readonly hasMore: boolean;\n readonly omittedCommandCount: number;\n readonly items: readonly {\n readonly commandId: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"commands\"][\"items\"][number][\"commandId\"];\n readonly phase: CommandPhase;\n readonly outcome: CommandOutcome;\n }[];\n };\n readonly diagnostics: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"diagnostics\"];\n readonly identities: {\n readonly itemIds: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"identityIndex\"][\"itemIds\"];\n readonly toolOccurrenceIds: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"identityIndex\"][\"toolOccurrenceIds\"][\"ids\"];\n readonly commandIds: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"identityIndex\"][\"commandIds\"];\n readonly omittedItemIdCount: number;\n readonly omittedToolOccurrenceIdCount: number;\n readonly omittedCommandIdCount: number;\n };\n}\nexport interface TraceDetailView {\n readonly locator: string;\n readonly kind: InspectionTraceDetailResult[\"kind\"];\n readonly stableId: string;\n readonly body: InspectionTraceDetailResult;\n}\nexport type ExecutionDisplayPreviewBlock = Extract<TraceView[\"execution\"][\"events\"][number][\"display\"], {\n state: \"present\";\n}>[\"blocks\"][number];\nexport type ExecutionDisplayDetailBlock = NonNullable<Extract<TraceDetailView[\"body\"], {\n kind: \"execution-event\";\n}>[\"event\"][\"display\"]>[number];\nexport type TimingView = {\n readonly locator: string;\n} & InspectionSuccessDocumentFor<\"attempt.timing\">[\"timing\"];\nexport type UsageView = {\n readonly locator: string;\n} & InspectionSuccessDocumentFor<\"attempt.usage\">[\"usage\"];\nexport type DiffView = {\n readonly locator: string;\n} & InspectionSuccessDocumentFor<\"attempt.diff\">[\"diff\"];\nconst metric = (value: {\n readonly state: MetricState;\n readonly value: number | null;\n}): Metric => ({ state: value.state, value: value.value });\nconst aggregate = (value: InspectionOverviewResult[\"totals\"]): Aggregate => ({\n evaluationKind: value.evaluationKind,\n expected: value.denominator.expected,\n observed: value.denominator.observed,\n passed: value.verdict.tally.passed,\n failed: value.verdict.tally.failed,\n errored: value.verdict.tally.errored,\n skipped: value.verdict.tally.skipped,\n passRate: metric(value.verdict.passRate),\n score: metric(value.score),\n durationMs: metric(value.durationMs),\n tokens: metric(value.tokens),\n});\nconst cells = (values: InspectionOverviewResult[\"cells\"]): OverviewView[\"cells\"] => values.map((cell) => ({\n experimentId: cell.experimentId,\n evalId: cell.evalId,\n aggregate: aggregate(cell),\n members: cell.members.map((member) => ({\n publication: member.publication.state === \"published\"\n ? {\n ...member.publication,\n score: metric(member.publication.score),\n durationMs: metric(member.publication.durationMs),\n tokens: metric(member.publication.tokens),\n }\n : member.publication,\n })),\n}));\nexport function projectOverview(document: InspectionSuccessDocumentFor<\"overview.get\">): OverviewView {\n return {\n totals: aggregate(document.overview.totals),\n experiments: document.overview.experiments.map((experiment) => ({\n experimentId: experiment.experimentId,\n adapter: experiment.adapter,\n model: experiment.model,\n aggregate: aggregate(experiment),\n })),\n cells: cells(document.overview.cells),\n };\n}\nexport function projectExperiment(document: InspectionSuccessDocumentFor<\"experiment.get\">): ExperimentView {\n return {\n experimentId: document.experiment.experiment.experimentId,\n aggregate: aggregate(document.experiment.experiment),\n cells: cells(document.experiment.cells),\n costSummary: document.experiment.costSummary,\n modelUsage: document.experiment.modelUsage,\n };\n}\n// @concord-code ne-surface-project-run-view\n// @concord-implements docs/feature/inspection/use-case/inspection-check-completeness.md\nexport function projectRun(document: InspectionSuccessDocumentFor<\"run.overview\">): RunView {\n const value = document.runOverview;\n return {\n runId: value.identity.runId,\n experimentId: value.identity.experimentId,\n adapter: value.identity.adapter,\n state: value.state,\n startedAt: value.startedAt,\n ...(value.completedAt === undefined ? {} : { completedAt: value.completedAt }),\n expected: value.denominator.expected,\n observed: value.denominator.observed,\n coverage: value.coverage,\n usage: value.usage,\n limitations: value.limitations,\n members: value.members.map((member) => ({\n slotId: member.slot.slotId,\n evalId: member.slot.evalId,\n attemptOrdinal: member.slot.attemptOrdinal,\n locator: member.locator,\n state: member.state,\n relation: member.relation,\n outcome: member.outcome,\n verdict: member.verdict,\n score: member.score,\n coverage: member.coverage,\n usage: member.usage,\n limitations: member.limitations,\n })),\n };\n}\n// @concord-code ne-surface-project-attempt-view\n// @concord-implements docs/feature/inspection/cli.md\nexport function projectAttempt(document: InspectionSuccessDocumentFor<\"attempt.get\">, usage?: InspectionSuccessDocumentFor<\"attempt.usage\">): AttemptView {\n const value = document.attempt;\n return {\n locator: value.locator,\n totalCosts: usage?.usage.totalCosts,\n verdict: value.verdict,\n attemptId: value.core.attemptId,\n evalId: value.core.evalId,\n slotId: value.core.slotId,\n outcome: value.core.outcome,\n originRunId: value.core.originRunId,\n experimentId: value.originRun.experimentId,\n score: value.score,\n sections: {\n assertions: value.sections.assertions.state,\n sources: value.sections.sources.state,\n trace: value.sections.trace.state,\n timing: value.sections.timing.state,\n usage: value.sections.usage.state,\n diff: value.sections.diff.state,\n },\n assertions: {\n state: value.assertions.state,\n entries: value.assertions.entries.map((entry) => ({ entryId: entry.entryId, ...entry.display })),\n },\n evidenceCoverage: value.evidenceCoverage.map((entry) => JSON.stringify(entry)),\n limitations: value.limitations.map((entry) => JSON.stringify(entry)),\n };\n}\nexport function projectSources(document: InspectionSuccessDocumentFor<\"attempt.sources\">, locator: string): SourcesView {\n const value = document.sources;\n return {\n locator,\n state: value.state,\n items: value.items.map((item) => ({ path: item.path, sourceItemId: item.sourceItemId, byteLength: item.byteLength, content: item.content })),\n assertions: {\n state: value.assertions.state,\n sites: value.assertions.sourceSites.map((site) => ({\n entryId: site.entryId,\n role: site.role,\n start: site.start,\n end: site.end,\n source: site.source,\n })),\n hasMoreSourceSites: value.assertions.hasMoreSourceSites,\n omittedSourceSiteCount: value.assertions.omittedSourceSiteCount,\n },\n hasMore: value.hasMore,\n omittedItemCount: value.omittedItemCount,\n };\n}\nexport function projectTrace(document: InspectionSuccessDocumentFor<\"attempt.trace\">, locator: string): TraceView {\n const value = document.trace;\n return {\n locator,\n execution: value.execution,\n conversation: {\n state: value.conversation.state,\n limitations: value.conversation.limitations,\n limitationsTruncated: value.conversation.limitationsTruncated,\n omittedLimitationCount: value.conversation.omittedLimitationCount,\n turnsTruncated: value.conversation.turnsTruncated,\n omittedTurnCount: value.conversation.omittedTurnCount,\n itemCount: value.conversation.items.length,\n itemsTruncated: value.conversation.itemsTruncated,\n omittedItemCount: value.conversation.omittedItemCount,\n turns: value.conversation.turns.map((turn) => ({\n ...turn,\n items: value.conversation.items.filter((item) => item.turnId === turn.turnId).map(({ turnId: _turnId, ...item }) => item),\n })),\n },\n commands: {\n state: value.commands.state,\n limitations: value.commands.limitations,\n limitationsTruncated: value.commands.limitationsTruncated,\n omittedLimitationCount: value.commands.omittedLimitationCount,\n hasMore: value.commands.hasMore,\n omittedCommandCount: value.commands.omittedCommandCount,\n items: value.commands.items.map((command) => ({ commandId: command.commandId, phase: command.phase, outcome: command.outcome.kind })),\n },\n diagnostics: value.diagnostics,\n identities: {\n itemIds: value.identityIndex.itemIds,\n toolOccurrenceIds: value.identityIndex.toolOccurrenceIds.ids,\n commandIds: value.identityIndex.commandIds,\n omittedItemIdCount: value.identityIndex.omittedItemIdCount,\n omittedToolOccurrenceIdCount: value.identityIndex.toolOccurrenceIds.omittedIdCount,\n omittedCommandIdCount: value.identityIndex.omittedCommandIdCount,\n },\n };\n}\nexport function projectTraceDetail(document: InspectionSuccessDocumentFor<\"attempt.trace.detail\">, locator: string): TraceDetailView {\n const body = document.detail;\n return {\n locator,\n kind: body.kind,\n stableId: body.kind === \"item\"\n ? body.itemId\n : body.kind === \"tool-occurrence\"\n ? body.toolOccurrenceId\n : body.kind === \"command\"\n ? body.commandId\n : body.kind === \"execution-event\"\n ? body.event.eventId\n : body.evidenceId,\n body,\n };\n}\nexport function projectTiming(document: InspectionSuccessDocumentFor<\"attempt.timing\">, locator: string): TimingView {\n return { locator, ...document.timing };\n}\nexport function projectUsage(document: InspectionSuccessDocumentFor<\"attempt.usage\">, locator: string): UsageView {\n return { locator, ...document.usage };\n}\nexport function projectDiff(document: InspectionSuccessDocumentFor<\"attempt.diff\">, locator: string): DiffView {\n return { locator, ...document.diff };\n}\n"]}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["model.ts"],"names":[],"mappings":";;AAqSA,0CAWC;AACD,8CAQC;AAGD,gCA8BC;AAGD,wCA4BC;AACD,wCAqBC;AACD,oCAuCC;AACD,gDAgBC;AACD,sCAEC;AACD,oCAEC;AACD,kCAEC;AA5MD,MAAM,MAAM,GAAG,CAAC,KAGf,EAAU,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;AAC3D,MAAM,SAAS,GAAG,CAAC,KAAyC,EAAa,EAAE,CAAC,CAAC;IACzE,cAAc,EAAE,KAAK,CAAC,cAAc;IACpC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,QAAQ;IACpC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,QAAQ;IACpC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM;IAClC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM;IAClC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO;IACpC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO;IACpC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC;IACpC,MAAM,EA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EAAE,KAAK,CAAC,aAAa,CAAC,qBAAqB;SACnE;KACJ,CAAC;AACN,CAAC;AACD,SAAgB,kBAAkB,CAAC,QAA8D,EAAE,OAAe;IAC9G,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC7B,OAAO;QACH,OAAO;QACP,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,MAAM;YAC1B,CAAC,CAAC,IAAI,CAAC,MAAM;YACb,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,iBAAiB;gBAC7B,CAAC,CAAC,IAAI,CAAC,gBAAgB;gBACvB,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS;oBACrB,CAAC,CAAC,IAAI,CAAC,SAAS;oBAChB,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,iBAAiB;wBAC7B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO;wBACpB,CAAC,CAAC,IAAI,CAAC,UAAU;QACjC,IAAI;KACP,CAAC;AACN,CAAC;AACD,SAAgB,aAAa,CAAC,QAAwD,EAAE,OAAe;IACnG,OAAO,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;AAC3C,CAAC;AACD,SAAgB,YAAY,CAAC,QAAuD,EAAE,OAAe;IACjG,OAAO,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;AAC1C,CAAC;AACD,SAAgB,WAAW,CAAC,QAAsD,EAAE,OAAe;IAC/F,OAAO,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;AACzC,CAAC","sourcesContent":["// @concord-file ne-surface-show-model\n// @concord-implements docs/feature/inspection/cli.md\n// @concord-implements docs/feature/run-inspection/README.md\nimport type { InspectionOverviewResult, InspectionScoredValue, InspectionSuccessDocumentFor, InspectionTraceDetailResult, } from \"../inspection/index.ts\";\nimport type { AttemptOutcome as RecordAttemptOutcome, MembershipAction as RecordMembershipAction } from \"../record/model/core.ts\";\nimport type { AdapterIdentity } from \"../record/model/run-context.ts\";\nimport type { Verdict as PublicVerdict } from \"../shared/types.ts\";\nimport type { AgentTurnOutcome as ReceiptAgentTurnOutcome, SANDBOX_COMMAND_PHASES } from \"../record/family/protocol-values.ts\";\nexport type MetricState = \"available\" | \"partial\" | \"unavailable\" | \"empty\" | \"unsupported\" | \"failed\";\nexport type Verdict = PublicVerdict;\nexport type MembershipAction = RecordMembershipAction;\nexport type AttemptOutcome = RecordAttemptOutcome;\nexport type AgentTurnOutcome = ReceiptAgentTurnOutcome;\nexport type SectionState = \"available\" | \"not-recorded\" | \"partial\" | \"unavailable\";\nexport type ProjectionState = \"complete\" | \"partial\" | \"not-recorded\" | \"invalid\";\nexport type SourceState = \"available\" | \"not-recorded\" | \"invalid\";\nexport type ScoredValue = InspectionScoredValue;\nexport type SourceContent = {\n readonly state: \"available\";\n readonly text: string;\n} | {\n readonly state: \"omitted\";\n readonly reason: \"inspection-result-byte-limit\";\n readonly byteLength: number;\n readonly byteLimit: number;\n};\nexport type AssertionSource = {\n readonly state: \"mapped\";\n readonly sourceItemId: string;\n readonly sha256: string;\n} | {\n readonly state: \"unmapped\";\n readonly reason: \"source-snapshot-not-recorded\" | \"position-unrepresentable\";\n};\nexport type CommandPhase = (typeof SANDBOX_COMMAND_PHASES)[number];\nexport type CommandOutcome = \"exited\" | \"terminated\" | \"not-started\";\nexport type Metric = {\n readonly state: MetricState;\n readonly value: number | null;\n};\nexport type ExecutionValue = {\n readonly state: \"available\";\n readonly value: string;\n} | {\n readonly state: \"mixed\";\n} | {\n readonly state: \"unavailable\";\n};\nexport type AdapterValue = {\n readonly state: \"available\";\n readonly value: AdapterIdentity;\n} | {\n readonly state: \"mixed\";\n};\nexport type Aggregate = {\n readonly evaluationKind: \"pass\" | \"points\" | \"mixed\";\n readonly expected: number;\n readonly observed: number;\n readonly passed: number;\n readonly failed: number;\n readonly errored: number;\n readonly skipped: number;\n readonly passRate: Metric;\n readonly score: Metric;\n readonly durationMs: Metric;\n readonly tokens: Metric;\n};\nexport interface OverviewView {\n readonly totals: Aggregate;\n readonly experiments: readonly {\n readonly experimentId: string;\n readonly adapter: AdapterValue;\n readonly model: ExecutionValue;\n readonly aggregate: Aggregate;\n }[];\n readonly cells: readonly {\n readonly experimentId: string;\n readonly evalId: string;\n readonly aggregate: Aggregate;\n readonly members: readonly {\n readonly publication: {\n readonly state: \"pending\";\n } | {\n readonly state: \"absent\";\n readonly reason: string;\n } | {\n readonly state: \"published\";\n readonly action: MembershipAction;\n readonly attemptId: string;\n readonly attemptLocator: string;\n readonly originRunId: string;\n readonly originSlotId: string;\n readonly verdict: Verdict | null;\n readonly score: Metric;\n readonly durationMs: Metric;\n readonly tokens: Metric;\n };\n }[];\n }[];\n}\nexport interface ExperimentView {\n readonly experimentId: string;\n readonly aggregate: Aggregate;\n readonly cells: OverviewView[\"cells\"];\n readonly costSummary: InspectionSuccessDocumentFor<\"experiment.get\">[\"experiment\"][\"costSummary\"];\n readonly modelUsage: InspectionSuccessDocumentFor<\"experiment.get\">[\"experiment\"][\"modelUsage\"];\n}\nexport interface RunView {\n readonly runId: string;\n readonly experimentId: string;\n readonly adapter: AdapterIdentity | null;\n readonly state: \"active\" | \"completed\" | \"interrupted\" | \"failed\";\n readonly startedAt: number;\n readonly completedAt?: number;\n readonly expected: number;\n readonly observed: number;\n readonly coverage: InspectionSuccessDocumentFor<\"run.get\">[\"run\"][\"coverage\"];\n readonly usage: InspectionSuccessDocumentFor<\"run.get\">[\"run\"][\"usage\"];\n readonly limitations: InspectionSuccessDocumentFor<\"run.get\">[\"run\"][\"limitations\"];\n readonly members: readonly {\n readonly slotId: string;\n readonly evalId: string;\n readonly attemptOrdinal: number;\n readonly locator: string | null;\n readonly state: MembershipAction | \"pending\";\n readonly relation: \"origin\" | \"reference\" | null;\n readonly outcome: AttemptOutcome | null;\n readonly verdict: Verdict | null;\n readonly score: ScoredValue | null;\n readonly coverage: InspectionSuccessDocumentFor<\"run.get\">[\"run\"][\"slots\"][number][\"coverage\"];\n readonly usage: InspectionSuccessDocumentFor<\"run.get\">[\"run\"][\"slots\"][number][\"usage\"];\n readonly limitations: InspectionSuccessDocumentFor<\"run.get\">[\"run\"][\"slots\"][number][\"limitations\"];\n }[];\n}\nexport interface AttemptView {\n readonly totalCosts?: InspectionSuccessDocumentFor<\"attempt.usage\">[\"usage\"][\"totalCosts\"];\n readonly locator: string;\n readonly verdict: Verdict | null;\n readonly attemptId: string;\n readonly evalId: string;\n readonly slotId: string;\n readonly outcome: AttemptOutcome;\n readonly originRunId: string;\n readonly experimentId: string;\n readonly score: ScoredValue;\n readonly sections: {\n readonly assertions: SectionState;\n readonly sources: SectionState;\n readonly trace: SectionState;\n readonly timing: SectionState;\n readonly usage: SectionState;\n readonly diff: SectionState;\n };\n readonly assertions: {\n readonly state: SourceState;\n readonly entries: readonly {\n readonly entryId: string;\n readonly label?: string;\n readonly key?: string;\n readonly groupPath: readonly string[];\n }[];\n };\n readonly evidenceCoverage: readonly string[];\n readonly limitations: readonly string[];\n}\nexport interface SourcesView {\n readonly locator: string;\n readonly state: SourceState;\n readonly items: readonly {\n readonly path: string;\n readonly sourceItemId: string;\n readonly byteLength: number;\n readonly content: SourceContent;\n }[];\n readonly assertions: {\n readonly state: SourceState;\n readonly sites: readonly {\n readonly entryId: string;\n readonly role: \"declaration\" | \"threshold\" | \"score\" | \"gate\" | \"optional\" | \"stop\";\n readonly start: {\n readonly line: number;\n readonly column: number;\n };\n readonly end: {\n readonly line: number;\n readonly column: number;\n };\n readonly source: AssertionSource;\n }[];\n readonly hasMoreSourceSites: boolean;\n readonly omittedSourceSiteCount: number;\n };\n readonly hasMore: boolean;\n readonly omittedItemCount: number;\n}\ntype WithoutTurnId<Value> = Value extends unknown ? Omit<Value, \"turnId\"> : never;\nexport type TraceItem = WithoutTurnId<InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"conversation\"][\"items\"][number]>;\nexport interface TraceView {\n readonly locator: string;\n readonly execution: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"execution\"];\n readonly conversation: {\n readonly state: ProjectionState;\n readonly limitations: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"conversation\"][\"limitations\"];\n readonly limitationsTruncated: boolean;\n readonly omittedLimitationCount: number;\n readonly turnsTruncated: boolean;\n readonly omittedTurnCount: number;\n readonly itemCount: number;\n readonly itemsTruncated: boolean;\n readonly omittedItemCount: number;\n readonly turns: readonly {\n readonly turnId: string;\n readonly sequence: number;\n readonly outcome: AgentTurnOutcome;\n readonly items: readonly TraceItem[];\n }[];\n };\n readonly commands: {\n readonly state: ProjectionState;\n readonly limitations: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"commands\"][\"limitations\"];\n readonly limitationsTruncated: boolean;\n readonly omittedLimitationCount: number;\n readonly hasMore: boolean;\n readonly omittedCommandCount: number;\n readonly items: readonly {\n readonly commandId: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"commands\"][\"items\"][number][\"commandId\"];\n readonly phase: CommandPhase;\n readonly outcome: CommandOutcome;\n }[];\n };\n readonly diagnostics: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"diagnostics\"];\n readonly identities: {\n readonly itemIds: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"identityIndex\"][\"itemIds\"];\n readonly toolOccurrenceIds: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"identityIndex\"][\"toolOccurrenceIds\"][\"ids\"];\n readonly commandIds: InspectionSuccessDocumentFor<\"attempt.trace\">[\"trace\"][\"identityIndex\"][\"commandIds\"];\n readonly omittedItemIdCount: number;\n readonly omittedToolOccurrenceIdCount: number;\n readonly omittedCommandIdCount: number;\n };\n}\nexport interface TraceDetailView {\n readonly locator: string;\n readonly kind: InspectionTraceDetailResult[\"kind\"];\n readonly stableId: string;\n readonly body: InspectionTraceDetailResult;\n}\nexport type ExecutionDisplayPreviewBlock = Extract<TraceView[\"execution\"][\"events\"][number][\"display\"], {\n state: \"present\";\n}>[\"blocks\"][number];\nexport type ExecutionDisplayDetailBlock = NonNullable<Extract<TraceDetailView[\"body\"], {\n kind: \"execution-event\";\n}>[\"event\"][\"display\"]>[number];\nexport type TimingView = {\n readonly locator: string;\n} & InspectionSuccessDocumentFor<\"attempt.timing\">[\"timing\"];\nexport type UsageView = {\n readonly locator: string;\n} & InspectionSuccessDocumentFor<\"attempt.usage\">[\"usage\"];\nexport type DiffView = {\n readonly locator: string;\n} & InspectionSuccessDocumentFor<\"attempt.diff\">[\"diff\"];\nconst metric = (value: {\n readonly state: MetricState;\n readonly value: number | null;\n}): Metric => ({ state: value.state, value: value.value });\nconst aggregate = (value: InspectionOverviewResult[\"totals\"]): Aggregate => ({\n evaluationKind: value.evaluationKind,\n expected: value.denominator.expected,\n observed: value.denominator.observed,\n passed: value.verdict.tally.passed,\n failed: value.verdict.tally.failed,\n errored: value.verdict.tally.errored,\n skipped: value.verdict.tally.skipped,\n passRate: metric(value.verdict.passRate),\n score: metric(value.score),\n durationMs: metric(value.durationMs),\n tokens: metric(value.tokens),\n});\nconst cells = (values: InspectionOverviewResult[\"cells\"]): OverviewView[\"cells\"] => values.map((cell) => ({\n experimentId: cell.experimentId,\n evalId: cell.evalId,\n aggregate: aggregate(cell),\n members: cell.members.map((member) => ({\n publication: member.publication.state === \"published\"\n ? {\n ...member.publication,\n score: metric(member.publication.score),\n durationMs: metric(member.publication.durationMs),\n tokens: metric(member.publication.tokens),\n }\n : member.publication,\n })),\n}));\nexport function projectOverview(document: InspectionSuccessDocumentFor<\"overview.get\">): OverviewView {\n return {\n totals: aggregate(document.overview.totals),\n experiments: document.overview.experiments.map((experiment) => ({\n experimentId: experiment.experimentId,\n adapter: experiment.adapter,\n model: experiment.model,\n aggregate: aggregate(experiment),\n })),\n cells: cells(document.overview.cells),\n };\n}\nexport function projectExperiment(document: InspectionSuccessDocumentFor<\"experiment.get\">): ExperimentView {\n return {\n experimentId: document.experiment.experiment.experimentId,\n aggregate: aggregate(document.experiment.experiment),\n cells: cells(document.experiment.cells),\n costSummary: document.experiment.costSummary,\n modelUsage: document.experiment.modelUsage,\n };\n}\n// @concord-code ne-surface-project-run-view\n// @concord-implements docs/feature/inspection/use-case/inspection-check-completeness.md\nexport function projectRun(document: InspectionSuccessDocumentFor<\"run.get\">): RunView {\n const detail = document.run;\n const value = detail.value;\n return {\n runId: value.runId,\n experimentId: value.experimentId,\n adapter: value.context?.execution.adapter ?? null,\n state: value.state,\n startedAt: value.startedAt,\n ...(value.completedAt === undefined ? {} : { completedAt: value.completedAt }),\n expected: detail.denominator.expected,\n observed: detail.denominator.published,\n coverage: detail.coverage,\n usage: detail.usage,\n limitations: detail.limitations,\n members: detail.slots.map((member) => ({\n slotId: member.slotId,\n evalId: member.evalId,\n attemptOrdinal: member.attemptOrdinal,\n locator: member.locator,\n state: member.state,\n relation: member.relation,\n outcome: member.outcome,\n verdict: member.verdict,\n score: member.score,\n coverage: member.coverage,\n usage: member.usage,\n limitations: member.limitations,\n })),\n };\n}\n// @concord-code ne-surface-project-attempt-view\n// @concord-implements docs/feature/inspection/cli.md\nexport function projectAttempt(document: InspectionSuccessDocumentFor<\"attempt.get\">, usage?: InspectionSuccessDocumentFor<\"attempt.usage\">): AttemptView {\n const value = document.attempt;\n return {\n locator: value.locator,\n totalCosts: usage?.usage.totalCosts,\n verdict: value.verdict,\n attemptId: value.core.attemptId,\n evalId: value.core.evalId,\n slotId: value.core.slotId,\n outcome: value.core.outcome,\n originRunId: value.core.originRunId,\n experimentId: value.originRun.experimentId,\n score: value.score,\n sections: {\n assertions: value.sections.assertions.state,\n sources: value.sections.sources.state,\n trace: value.sections.trace.state,\n timing: value.sections.timing.state,\n usage: value.sections.usage.state,\n diff: value.sections.diff.state,\n },\n assertions: {\n state: value.assertions.state,\n entries: value.assertions.entries.map((entry) => ({ entryId: entry.entryId, ...entry.display })),\n },\n evidenceCoverage: value.evidenceCoverage.map((entry) => JSON.stringify(entry)),\n limitations: value.limitations.map((entry) => JSON.stringify(entry)),\n };\n}\nexport function projectSources(document: InspectionSuccessDocumentFor<\"attempt.sources\">, locator: string): SourcesView {\n const value = document.sources;\n return {\n locator,\n state: value.state,\n items: value.items.map((item) => ({ path: item.path, sourceItemId: item.sourceItemId, byteLength: item.byteLength, content: item.content })),\n assertions: {\n state: value.assertions.state,\n sites: value.assertions.sourceSites.map((site) => ({\n entryId: site.entryId,\n role: site.role,\n start: site.start,\n end: site.end,\n source: site.source,\n })),\n hasMoreSourceSites: value.assertions.hasMoreSourceSites,\n omittedSourceSiteCount: value.assertions.omittedSourceSiteCount,\n },\n hasMore: value.hasMore,\n omittedItemCount: value.omittedItemCount,\n };\n}\nexport function projectTrace(document: InspectionSuccessDocumentFor<\"attempt.trace\">, locator: string): TraceView {\n const value = document.trace;\n return {\n locator,\n execution: value.execution,\n conversation: {\n state: value.conversation.state,\n limitations: value.conversation.limitations,\n limitationsTruncated: value.conversation.limitationsTruncated,\n omittedLimitationCount: value.conversation.omittedLimitationCount,\n turnsTruncated: value.conversation.turnsTruncated,\n omittedTurnCount: value.conversation.omittedTurnCount,\n itemCount: value.conversation.items.length,\n itemsTruncated: value.conversation.itemsTruncated,\n omittedItemCount: value.conversation.omittedItemCount,\n turns: value.conversation.turns.map((turn) => ({\n ...turn,\n items: value.conversation.items.filter((item) => item.turnId === turn.turnId).map(({ turnId: _turnId, ...item }) => item),\n })),\n },\n commands: {\n state: value.commands.state,\n limitations: value.commands.limitations,\n limitationsTruncated: value.commands.limitationsTruncated,\n omittedLimitationCount: value.commands.omittedLimitationCount,\n hasMore: value.commands.hasMore,\n omittedCommandCount: value.commands.omittedCommandCount,\n items: value.commands.items.map((command) => ({ commandId: command.commandId, phase: command.phase, outcome: command.outcome.kind })),\n },\n diagnostics: value.diagnostics,\n identities: {\n itemIds: value.identityIndex.itemIds,\n toolOccurrenceIds: value.identityIndex.toolOccurrenceIds.ids,\n commandIds: value.identityIndex.commandIds,\n omittedItemIdCount: value.identityIndex.omittedItemIdCount,\n omittedToolOccurrenceIdCount: value.identityIndex.toolOccurrenceIds.omittedIdCount,\n omittedCommandIdCount: value.identityIndex.omittedCommandIdCount,\n },\n };\n}\nexport function projectTraceDetail(document: InspectionSuccessDocumentFor<\"attempt.trace.detail\">, locator: string): TraceDetailView {\n const body = document.detail;\n return {\n locator,\n kind: body.kind,\n stableId: body.kind === \"item\"\n ? body.itemId\n : body.kind === \"tool-occurrence\"\n ? body.toolOccurrenceId\n : body.kind === \"command\"\n ? body.commandId\n : body.kind === \"execution-event\"\n ? body.event.eventId\n : body.evidenceId,\n body,\n };\n}\nexport function projectTiming(document: InspectionSuccessDocumentFor<\"attempt.timing\">, locator: string): TimingView {\n return { locator, ...document.timing };\n}\nexport function projectUsage(document: InspectionSuccessDocumentFor<\"attempt.usage\">, locator: string): UsageView {\n return { locator, ...document.usage };\n}\nexport function projectDiff(document: InspectionSuccessDocumentFor<\"attempt.diff\">, locator: string): DiffView {\n return { locator, ...document.diff };\n}\n"]}
@@ -111,9 +111,9 @@ export interface RunView {
111
111
  readonly completedAt?: number;
112
112
  readonly expected: number;
113
113
  readonly observed: number;
114
- readonly coverage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["coverage"];
115
- readonly usage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["usage"];
116
- readonly limitations: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["limitations"];
114
+ readonly coverage: InspectionSuccessDocumentFor<"run.get">["run"]["coverage"];
115
+ readonly usage: InspectionSuccessDocumentFor<"run.get">["run"]["usage"];
116
+ readonly limitations: InspectionSuccessDocumentFor<"run.get">["run"]["limitations"];
117
117
  readonly members: readonly {
118
118
  readonly slotId: string;
119
119
  readonly evalId: string;
@@ -124,9 +124,9 @@ export interface RunView {
124
124
  readonly outcome: AttemptOutcome | null;
125
125
  readonly verdict: Verdict | null;
126
126
  readonly score: ScoredValue | null;
127
- readonly coverage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["members"][number]["coverage"];
128
- readonly usage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["members"][number]["usage"];
129
- readonly limitations: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["members"][number]["limitations"];
127
+ readonly coverage: InspectionSuccessDocumentFor<"run.get">["run"]["slots"][number]["coverage"];
128
+ readonly usage: InspectionSuccessDocumentFor<"run.get">["run"]["slots"][number]["usage"];
129
+ readonly limitations: InspectionSuccessDocumentFor<"run.get">["run"]["slots"][number]["limitations"];
130
130
  }[];
131
131
  }
132
132
  export interface AttemptView {
@@ -258,7 +258,7 @@ export type DiffView = {
258
258
  } & InspectionSuccessDocumentFor<"attempt.diff">["diff"];
259
259
  export declare function projectOverview(document: InspectionSuccessDocumentFor<"overview.get">): OverviewView;
260
260
  export declare function projectExperiment(document: InspectionSuccessDocumentFor<"experiment.get">): ExperimentView;
261
- export declare function projectRun(document: InspectionSuccessDocumentFor<"run.overview">): RunView;
261
+ export declare function projectRun(document: InspectionSuccessDocumentFor<"run.get">): RunView;
262
262
  export declare function projectAttempt(document: InspectionSuccessDocumentFor<"attempt.get">, usage?: InspectionSuccessDocumentFor<"attempt.usage">): AttemptView;
263
263
  export declare function projectSources(document: InspectionSuccessDocumentFor<"attempt.sources">, locator: string): SourcesView;
264
264
  export declare function projectTrace(document: InspectionSuccessDocumentFor<"attempt.trace">, locator: string): TraceView;
@@ -111,9 +111,9 @@ export interface RunView {
111
111
  readonly completedAt?: number;
112
112
  readonly expected: number;
113
113
  readonly observed: number;
114
- readonly coverage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["coverage"];
115
- readonly usage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["usage"];
116
- readonly limitations: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["limitations"];
114
+ readonly coverage: InspectionSuccessDocumentFor<"run.get">["run"]["coverage"];
115
+ readonly usage: InspectionSuccessDocumentFor<"run.get">["run"]["usage"];
116
+ readonly limitations: InspectionSuccessDocumentFor<"run.get">["run"]["limitations"];
117
117
  readonly members: readonly {
118
118
  readonly slotId: string;
119
119
  readonly evalId: string;
@@ -124,9 +124,9 @@ export interface RunView {
124
124
  readonly outcome: AttemptOutcome | null;
125
125
  readonly verdict: Verdict | null;
126
126
  readonly score: ScoredValue | null;
127
- readonly coverage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["members"][number]["coverage"];
128
- readonly usage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["members"][number]["usage"];
129
- readonly limitations: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["members"][number]["limitations"];
127
+ readonly coverage: InspectionSuccessDocumentFor<"run.get">["run"]["slots"][number]["coverage"];
128
+ readonly usage: InspectionSuccessDocumentFor<"run.get">["run"]["slots"][number]["usage"];
129
+ readonly limitations: InspectionSuccessDocumentFor<"run.get">["run"]["slots"][number]["limitations"];
130
130
  }[];
131
131
  }
132
132
  export interface AttemptView {
@@ -258,7 +258,7 @@ export type DiffView = {
258
258
  } & InspectionSuccessDocumentFor<"attempt.diff">["diff"];
259
259
  export declare function projectOverview(document: InspectionSuccessDocumentFor<"overview.get">): OverviewView;
260
260
  export declare function projectExperiment(document: InspectionSuccessDocumentFor<"experiment.get">): ExperimentView;
261
- export declare function projectRun(document: InspectionSuccessDocumentFor<"run.overview">): RunView;
261
+ export declare function projectRun(document: InspectionSuccessDocumentFor<"run.get">): RunView;
262
262
  export declare function projectAttempt(document: InspectionSuccessDocumentFor<"attempt.get">, usage?: InspectionSuccessDocumentFor<"attempt.usage">): AttemptView;
263
263
  export declare function projectSources(document: InspectionSuccessDocumentFor<"attempt.sources">, locator: string): SourcesView;
264
264
  export declare function projectTrace(document: InspectionSuccessDocumentFor<"attempt.trace">, locator: string): TraceView;
@@ -111,9 +111,9 @@ export interface RunView {
111
111
  readonly completedAt?: number;
112
112
  readonly expected: number;
113
113
  readonly observed: number;
114
- readonly coverage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["coverage"];
115
- readonly usage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["usage"];
116
- readonly limitations: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["limitations"];
114
+ readonly coverage: InspectionSuccessDocumentFor<"run.get">["run"]["coverage"];
115
+ readonly usage: InspectionSuccessDocumentFor<"run.get">["run"]["usage"];
116
+ readonly limitations: InspectionSuccessDocumentFor<"run.get">["run"]["limitations"];
117
117
  readonly members: readonly {
118
118
  readonly slotId: string;
119
119
  readonly evalId: string;
@@ -124,9 +124,9 @@ export interface RunView {
124
124
  readonly outcome: AttemptOutcome | null;
125
125
  readonly verdict: Verdict | null;
126
126
  readonly score: ScoredValue | null;
127
- readonly coverage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["members"][number]["coverage"];
128
- readonly usage: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["members"][number]["usage"];
129
- readonly limitations: InspectionSuccessDocumentFor<"run.overview">["runOverview"]["members"][number]["limitations"];
127
+ readonly coverage: InspectionSuccessDocumentFor<"run.get">["run"]["slots"][number]["coverage"];
128
+ readonly usage: InspectionSuccessDocumentFor<"run.get">["run"]["slots"][number]["usage"];
129
+ readonly limitations: InspectionSuccessDocumentFor<"run.get">["run"]["slots"][number]["limitations"];
130
130
  }[];
131
131
  }
132
132
  export interface AttemptView {
@@ -258,7 +258,7 @@ export type DiffView = {
258
258
  } & InspectionSuccessDocumentFor<"attempt.diff">["diff"];
259
259
  export declare function projectOverview(document: InspectionSuccessDocumentFor<"overview.get">): OverviewView;
260
260
  export declare function projectExperiment(document: InspectionSuccessDocumentFor<"experiment.get">): ExperimentView;
261
- export declare function projectRun(document: InspectionSuccessDocumentFor<"run.overview">): RunView;
261
+ export declare function projectRun(document: InspectionSuccessDocumentFor<"run.get">): RunView;
262
262
  export declare function projectAttempt(document: InspectionSuccessDocumentFor<"attempt.get">, usage?: InspectionSuccessDocumentFor<"attempt.usage">): AttemptView;
263
263
  export declare function projectSources(document: InspectionSuccessDocumentFor<"attempt.sources">, locator: string): SourcesView;
264
264
  export declare function projectTrace(document: InspectionSuccessDocumentFor<"attempt.trace">, locator: string): TraceView;
@@ -1420,6 +1420,19 @@ function totalCostBlocks(costs) {
1420
1420
  rows: costs.values.map((cost) => [cost.currency, cost.value, cost.source]), overflow: "wrap" }]),
1421
1421
  ];
1422
1422
  }
1423
+ function cacheReadBlocks(report) {
1424
+ if (report === undefined)
1425
+ return [];
1426
+ const row = (label, summary) => [
1427
+ label, summary.rate.state === "exact" ? `${(summary.rate.value * 100).toFixed(2)}%` : "Unavailable",
1428
+ `${summary.coveredCalls}/${summary.recordedCalls}`, summary.collectionComplete ? "Complete" : "Incomplete",
1429
+ summary.reasons.join(", ") || "—",
1430
+ ];
1431
+ return [{ kind: "divider", title: "Cache read rate" }, { kind: "table",
1432
+ columns: [{ header: "Scope" }, { header: "Rate" }, { header: "Covered calls" }, { header: "Collection" }, { header: "Reasons" }],
1433
+ rows: [row("Total", report.total), ...report.modelSlots.map((group) => row(`Slot: ${group.modelSlot ?? "not-recorded"}`, group)),
1434
+ ...report.models.map((group) => row(`${group.modelSlot ?? "not-recorded"} / ${group.provider ?? "not-recorded"} / ${group.model ?? "not-recorded"}`, group))], overflow: "wrap" }];
1435
+ }
1423
1436
  function modelUsageBlocks(value) {
1424
1437
  const configured = value.configuredModels;
1425
1438
  const groups = value.modelGroups;
@@ -1438,6 +1451,7 @@ function modelUsageBlocks(value) {
1438
1451
  : [{ kind: "table", columns: [{ header: "Slot" }, { header: "Configured model" }, { header: "Effort" }, { header: "Recorded calls" }],
1439
1452
  rows: configured.bindings.map((binding) => [binding.modelSlot, binding.model ?? "—", binding.reasoningEffort ?? "—", recordedCalls(binding.recordedCalls)]), overflow: "wrap" }];
1440
1453
  return [
1454
+ ...cacheReadBlocks(value.cacheRead),
1441
1455
  { kind: "divider", title: "Configured model slots" },
1442
1456
  ...configurationBlocks,
1443
1457
  { kind: "divider", title: "Actual model usage" },