@hawkeyexl/manni 4.5.0 → 4.7.0

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 (215) hide show
  1. package/README.md +1 -1
  2. package/dist/batch-U6S2JUUN.js +41 -0
  3. package/dist/build-4RN6WBCP.js +32 -0
  4. package/dist/calibrate-6VIZYR4L.js +36 -0
  5. package/dist/capture-DP3NXAZE.js +34 -0
  6. package/dist/{check-RQIIIURI.js → check-ERVNGKLC.js} +13 -14
  7. package/dist/check-IWHUPAZM.js +886 -0
  8. package/dist/check-IWHUPAZM.js.map +1 -0
  9. package/dist/{check-ESNS7ZBC.js → check-OAJWC3WD.js} +7 -5
  10. package/dist/check-STHXZIZO.js +26 -0
  11. package/dist/{chunk-TA42STP7.js → chunk-2ZWTSRE5.js} +4 -4
  12. package/dist/{chunk-F2OVHJNC.js → chunk-4Z2MN5FR.js} +11 -11
  13. package/dist/{chunk-HVFR66GQ.js → chunk-5UB47BEV.js} +3280 -283
  14. package/dist/chunk-5UB47BEV.js.map +1 -0
  15. package/dist/{chunk-TCC737IS.js → chunk-5VWDIWOH.js} +4 -4
  16. package/dist/{chunk-B7XUEQF3.js → chunk-6KKZXB2O.js} +7 -5
  17. package/dist/{chunk-B7XUEQF3.js.map → chunk-6KKZXB2O.js.map} +1 -1
  18. package/dist/{chunk-ELZ2IIOF.js → chunk-6URSCTTX.js} +2 -2
  19. package/dist/{chunk-K3U5F2QT.js → chunk-6VDBP5UV.js} +12 -12
  20. package/dist/chunk-7EL5LLKD.js +233 -0
  21. package/dist/chunk-7EL5LLKD.js.map +1 -0
  22. package/dist/{chunk-C3KI45RF.js → chunk-7XZ6INKO.js} +4 -4
  23. package/dist/{chunk-ZX43SRZR.js → chunk-AMEILOVV.js} +8 -6
  24. package/dist/{chunk-ZX43SRZR.js.map → chunk-AMEILOVV.js.map} +1 -1
  25. package/dist/{chunk-SNEHX4VE.js → chunk-B5CMM57M.js} +2 -2
  26. package/dist/chunk-BWCWTHYS.js +146 -0
  27. package/dist/chunk-BWCWTHYS.js.map +1 -0
  28. package/dist/{chunk-QLUMKWQQ.js → chunk-C2TJG5KV.js} +10 -6
  29. package/dist/{chunk-QLUMKWQQ.js.map → chunk-C2TJG5KV.js.map} +1 -1
  30. package/dist/{chunk-GAZFKZHM.js → chunk-CEVU3GFF.js} +6 -6
  31. package/dist/chunk-CI55ABCK.js +502 -0
  32. package/dist/chunk-CI55ABCK.js.map +1 -0
  33. package/dist/{chunk-QCBICNKC.js → chunk-CR3HZERW.js} +202 -54
  34. package/dist/chunk-CR3HZERW.js.map +1 -0
  35. package/dist/chunk-CU57HT2E.js +116 -0
  36. package/dist/chunk-CU57HT2E.js.map +1 -0
  37. package/dist/chunk-CWXZ2MRT.js +222 -0
  38. package/dist/chunk-CWXZ2MRT.js.map +1 -0
  39. package/dist/chunk-D2LBN44V.js +134 -0
  40. package/dist/chunk-D2LBN44V.js.map +1 -0
  41. package/dist/chunk-D6RO54QD.js +674 -0
  42. package/dist/chunk-D6RO54QD.js.map +1 -0
  43. package/dist/{chunk-52PDIZKV.js → chunk-ECVQNGTH.js} +3 -3
  44. package/dist/chunk-FQGLRJGX.js +174 -0
  45. package/dist/chunk-FQGLRJGX.js.map +1 -0
  46. package/dist/{chunk-NGK3N6F2.js → chunk-GCC52YZD.js} +3 -3
  47. package/dist/chunk-HX44GB4Z.js +30 -0
  48. package/dist/chunk-HX44GB4Z.js.map +1 -0
  49. package/dist/{chunk-NN4ASVTY.js → chunk-IIFADWWI.js} +4 -4
  50. package/dist/{chunk-OIZ3XMKB.js → chunk-IOL74S4J.js} +4 -4
  51. package/dist/{chunk-UK2I3ACY.js → chunk-IZBBXKMJ.js} +4 -4
  52. package/dist/{chunk-YA63PVWI.js → chunk-K52CS4KT.js} +12 -10
  53. package/dist/{chunk-YA63PVWI.js.map → chunk-K52CS4KT.js.map} +1 -1
  54. package/dist/{chunk-7OQAU4EA.js → chunk-LDKIIZDW.js} +16 -12
  55. package/dist/{chunk-7OQAU4EA.js.map → chunk-LDKIIZDW.js.map} +1 -1
  56. package/dist/{chunk-QY3DOZMS.js → chunk-LONRQBGV.js} +4 -4
  57. package/dist/{chunk-EL2BZTDL.js → chunk-LXJEAV2V.js} +13 -11
  58. package/dist/{chunk-EL2BZTDL.js.map → chunk-LXJEAV2V.js.map} +1 -1
  59. package/dist/{chunk-XWFNO5PO.js → chunk-MIBWI5H7.js} +3 -3
  60. package/dist/{chunk-527HHQPS.js → chunk-MSMB6XOS.js} +6 -4
  61. package/dist/{chunk-527HHQPS.js.map → chunk-MSMB6XOS.js.map} +1 -1
  62. package/dist/{chunk-C6HZ6C5T.js → chunk-NIFEEIGQ.js} +2 -2
  63. package/dist/{chunk-JQU7FHYH.js → chunk-NZ6TNSCU.js} +10 -10
  64. package/dist/{chunk-3R5Y3XOL.js → chunk-OOEMKOX6.js} +29 -591
  65. package/dist/chunk-OOEMKOX6.js.map +1 -0
  66. package/dist/{chunk-MZC62HPZ.js → chunk-PAOVVHQX.js} +2 -2
  67. package/dist/chunk-PNX43DYW.js +849 -0
  68. package/dist/chunk-PNX43DYW.js.map +1 -0
  69. package/dist/chunk-QCHVR4ZM.js +286 -0
  70. package/dist/chunk-QCHVR4ZM.js.map +1 -0
  71. package/dist/{chunk-SJO2FTPG.js → chunk-QP5X66TO.js} +73 -1304
  72. package/dist/chunk-QP5X66TO.js.map +1 -0
  73. package/dist/{chunk-HQFVJDEN.js → chunk-QQNPVW3J.js} +19 -19
  74. package/dist/chunk-TPVOOTMN.js +532 -0
  75. package/dist/chunk-TPVOOTMN.js.map +1 -0
  76. package/dist/{chunk-IA7BMIPE.js → chunk-UZKQSWHJ.js} +2 -2
  77. package/dist/chunk-WQWKYAAK.js +86 -0
  78. package/dist/chunk-WQWKYAAK.js.map +1 -0
  79. package/dist/{chunk-CP4ZM43V.js → chunk-WTEILBKC.js} +2 -2
  80. package/dist/{chunk-LJ2RDH3F.js → chunk-XG6PVB5S.js} +1 -23
  81. package/dist/chunk-XG6PVB5S.js.map +1 -0
  82. package/dist/{chunk-Q35YIDBV.js → chunk-XKBEHKWO.js} +29 -264
  83. package/dist/chunk-XKBEHKWO.js.map +1 -0
  84. package/dist/{chunk-BOIF2XGG.js → chunk-XXDXIIQ4.js} +2 -2
  85. package/dist/{chunk-6XTQDFGP.js → chunk-YSCZL4U5.js} +3 -3
  86. package/dist/{chunk-6XTQDFGP.js.map → chunk-YSCZL4U5.js.map} +1 -1
  87. package/dist/{chunk-7ZUCEMCY.js → chunk-ZEXGGGLW.js} +9 -11
  88. package/dist/{chunk-7ZUCEMCY.js.map → chunk-ZEXGGGLW.js.map} +1 -1
  89. package/dist/{chunk-DX32P2DT.js → chunk-ZKAKA54B.js} +2 -2
  90. package/dist/{chunk-TVIX653Q.js → chunk-ZKCNPKUO.js} +4 -4
  91. package/dist/{chunk-DE7JSWXV.js → chunk-ZNE25EAR.js} +8 -6
  92. package/dist/{chunk-DE7JSWXV.js.map → chunk-ZNE25EAR.js.map} +1 -1
  93. package/dist/{chunk-FLF6AECQ.js → chunk-ZPP75QWG.js} +17 -15
  94. package/dist/{chunk-FLF6AECQ.js.map → chunk-ZPP75QWG.js.map} +1 -1
  95. package/dist/{cli-PRZHQ3QB.js → cli-37SRAYNE.js} +14 -15
  96. package/dist/{cli-PRZHQ3QB.js.map → cli-37SRAYNE.js.map} +1 -1
  97. package/dist/{cli-TYGOHJOJ.js → cli-HXWYUKGJ.js} +225 -58
  98. package/dist/cli-HXWYUKGJ.js.map +1 -0
  99. package/dist/{cli-HUIMNJT6.js → cli-IRHPPUFJ.js} +19 -20
  100. package/dist/{cli-HUIMNJT6.js.map → cli-IRHPPUFJ.js.map} +1 -1
  101. package/dist/{cli-6PGVHP7Y.js → cli-KIID535Y.js} +17 -19
  102. package/dist/{cli-6PGVHP7Y.js.map → cli-KIID535Y.js.map} +1 -1
  103. package/dist/{cli-AAG3N4NB.js → cli-MTDGQIIV.js} +17 -18
  104. package/dist/{cli-AAG3N4NB.js.map → cli-MTDGQIIV.js.map} +1 -1
  105. package/dist/{cli-E3H6ZP4I.js → cli-NM6FZ54R.js} +5 -3
  106. package/dist/{cli-E3H6ZP4I.js.map → cli-NM6FZ54R.js.map} +1 -1
  107. package/dist/{cli-MHTYPVOD.js → cli-XIODOEUG.js} +113 -20
  108. package/dist/{cli-MHTYPVOD.js.map → cli-XIODOEUG.js.map} +1 -1
  109. package/dist/{cli-YW6VWBHX.js → cli-YL3IDR52.js} +10 -10
  110. package/dist/{cli-QKIJOXGW.js → cli-ZQUJYQBA.js} +17 -17
  111. package/dist/cli.js +11 -11
  112. package/dist/config-O6UBGEDK.js +26 -0
  113. package/dist/conformance-ALLPNGEQ.js +18 -0
  114. package/dist/docmeta.js +9 -9
  115. package/dist/github-UCYLM3DR.js +26 -0
  116. package/dist/github-VEJFO6JJ.js +31 -0
  117. package/dist/host-6GURH5HE.js +23 -0
  118. package/dist/index.d.ts +72 -4
  119. package/dist/index.js +176 -166
  120. package/dist/index.js.map +1 -1
  121. package/dist/{json-4DCKDGUV.js → json-6F52FSXZ.js} +12 -13
  122. package/dist/lint-X2GNINK6.js +29 -0
  123. package/dist/list-DP3O3CWB.js +30 -0
  124. package/dist/list-P77RZFZF.js +28 -0
  125. package/dist/{page-QEDB7EVU.js → page-WQCMBNRD.js} +11 -12
  126. package/dist/prepare-52QOK7M4.js +155 -0
  127. package/dist/prepare-52QOK7M4.js.map +1 -0
  128. package/dist/{pretty-SQX33UM2.js → pretty-5MMMNSWF.js} +13 -14
  129. package/dist/{pretty-5DGEBZSV.js → pretty-H4DQREMW.js} +12 -13
  130. package/dist/provider-AMGRDY6V.js +34 -0
  131. package/dist/release-CTYRHZL4.js +36 -0
  132. package/dist/release-CTYRHZL4.js.map +1 -0
  133. package/dist/{reporters-YELDDYJD.js → reporters-SU3VUKKX.js} +7 -5
  134. package/dist/{reporters-OHSI3RMV.js → reporters-WIHBEMPG.js} +11 -12
  135. package/dist/reporters-WIHBEMPG.js.map +1 -0
  136. package/dist/run-L2DWJ26K.js +32 -0
  137. package/dist/run-L2DWJ26K.js.map +1 -0
  138. package/dist/{term-2WMDZ4PY.js → term-PJIJQZNF.js} +16 -17
  139. package/dist/{term-2WMDZ4PY.js.map → term-PJIJQZNF.js.map} +1 -1
  140. package/dist/validate-XCDSPURG.js +17 -0
  141. package/dist/validate-XCDSPURG.js.map +1 -0
  142. package/package.json +2 -2
  143. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  144. package/plugin/manni/hooks/hooks.json +47 -0
  145. package/dist/batch-GOE3UXOD.js +0 -36
  146. package/dist/build-M7BMEHL2.js +0 -33
  147. package/dist/calibrate-6RRAILUY.js +0 -31
  148. package/dist/capture-RJPQ6B4N.js +0 -32
  149. package/dist/check-BQD64X3N.js +0 -27
  150. package/dist/chunk-3R5Y3XOL.js.map +0 -1
  151. package/dist/chunk-3YHAYXBC.js +0 -164
  152. package/dist/chunk-3YHAYXBC.js.map +0 -1
  153. package/dist/chunk-HVFR66GQ.js.map +0 -1
  154. package/dist/chunk-LJ2RDH3F.js.map +0 -1
  155. package/dist/chunk-NAZRLJAK.js +0 -3090
  156. package/dist/chunk-NAZRLJAK.js.map +0 -1
  157. package/dist/chunk-Q35YIDBV.js.map +0 -1
  158. package/dist/chunk-QCBICNKC.js.map +0 -1
  159. package/dist/chunk-SJO2FTPG.js.map +0 -1
  160. package/dist/chunk-TU2WUBVZ.js +0 -2
  161. package/dist/cli-TYGOHJOJ.js.map +0 -1
  162. package/dist/github-3WMSTNTK.js +0 -32
  163. package/dist/github-OXSJQ4PS.js +0 -27
  164. package/dist/lint-YDHVVZHT.js +0 -30
  165. package/dist/list-3ZO2NIYO.js +0 -31
  166. package/dist/list-EJH6VAOW.js +0 -29
  167. package/dist/run-IP6NZHAG.js +0 -33
  168. package/dist/validate-G6HH3YXL.js +0 -16
  169. /package/dist/{batch-GOE3UXOD.js.map → batch-U6S2JUUN.js.map} +0 -0
  170. /package/dist/{build-M7BMEHL2.js.map → build-4RN6WBCP.js.map} +0 -0
  171. /package/dist/{calibrate-6RRAILUY.js.map → calibrate-6VIZYR4L.js.map} +0 -0
  172. /package/dist/{capture-RJPQ6B4N.js.map → capture-DP3NXAZE.js.map} +0 -0
  173. /package/dist/{check-BQD64X3N.js.map → check-ERVNGKLC.js.map} +0 -0
  174. /package/dist/{check-ESNS7ZBC.js.map → check-OAJWC3WD.js.map} +0 -0
  175. /package/dist/{check-RQIIIURI.js.map → check-STHXZIZO.js.map} +0 -0
  176. /package/dist/{chunk-TA42STP7.js.map → chunk-2ZWTSRE5.js.map} +0 -0
  177. /package/dist/{chunk-F2OVHJNC.js.map → chunk-4Z2MN5FR.js.map} +0 -0
  178. /package/dist/{chunk-TCC737IS.js.map → chunk-5VWDIWOH.js.map} +0 -0
  179. /package/dist/{chunk-ELZ2IIOF.js.map → chunk-6URSCTTX.js.map} +0 -0
  180. /package/dist/{chunk-K3U5F2QT.js.map → chunk-6VDBP5UV.js.map} +0 -0
  181. /package/dist/{chunk-C3KI45RF.js.map → chunk-7XZ6INKO.js.map} +0 -0
  182. /package/dist/{chunk-SNEHX4VE.js.map → chunk-B5CMM57M.js.map} +0 -0
  183. /package/dist/{chunk-GAZFKZHM.js.map → chunk-CEVU3GFF.js.map} +0 -0
  184. /package/dist/{chunk-52PDIZKV.js.map → chunk-ECVQNGTH.js.map} +0 -0
  185. /package/dist/{chunk-NGK3N6F2.js.map → chunk-GCC52YZD.js.map} +0 -0
  186. /package/dist/{chunk-NN4ASVTY.js.map → chunk-IIFADWWI.js.map} +0 -0
  187. /package/dist/{chunk-OIZ3XMKB.js.map → chunk-IOL74S4J.js.map} +0 -0
  188. /package/dist/{chunk-UK2I3ACY.js.map → chunk-IZBBXKMJ.js.map} +0 -0
  189. /package/dist/{chunk-QY3DOZMS.js.map → chunk-LONRQBGV.js.map} +0 -0
  190. /package/dist/{chunk-XWFNO5PO.js.map → chunk-MIBWI5H7.js.map} +0 -0
  191. /package/dist/{chunk-C6HZ6C5T.js.map → chunk-NIFEEIGQ.js.map} +0 -0
  192. /package/dist/{chunk-JQU7FHYH.js.map → chunk-NZ6TNSCU.js.map} +0 -0
  193. /package/dist/{chunk-MZC62HPZ.js.map → chunk-PAOVVHQX.js.map} +0 -0
  194. /package/dist/{chunk-HQFVJDEN.js.map → chunk-QQNPVW3J.js.map} +0 -0
  195. /package/dist/{chunk-IA7BMIPE.js.map → chunk-UZKQSWHJ.js.map} +0 -0
  196. /package/dist/{chunk-CP4ZM43V.js.map → chunk-WTEILBKC.js.map} +0 -0
  197. /package/dist/{chunk-BOIF2XGG.js.map → chunk-XXDXIIQ4.js.map} +0 -0
  198. /package/dist/{chunk-DX32P2DT.js.map → chunk-ZKAKA54B.js.map} +0 -0
  199. /package/dist/{chunk-TVIX653Q.js.map → chunk-ZKCNPKUO.js.map} +0 -0
  200. /package/dist/{chunk-TU2WUBVZ.js.map → cli-YL3IDR52.js.map} +0 -0
  201. /package/dist/{cli-QKIJOXGW.js.map → cli-ZQUJYQBA.js.map} +0 -0
  202. /package/dist/{cli-YW6VWBHX.js.map → config-O6UBGEDK.js.map} +0 -0
  203. /package/dist/{github-3WMSTNTK.js.map → conformance-ALLPNGEQ.js.map} +0 -0
  204. /package/dist/{github-OXSJQ4PS.js.map → github-UCYLM3DR.js.map} +0 -0
  205. /package/dist/{json-4DCKDGUV.js.map → github-VEJFO6JJ.js.map} +0 -0
  206. /package/dist/{lint-YDHVVZHT.js.map → host-6GURH5HE.js.map} +0 -0
  207. /package/dist/{list-3ZO2NIYO.js.map → json-6F52FSXZ.js.map} +0 -0
  208. /package/dist/{list-EJH6VAOW.js.map → lint-X2GNINK6.js.map} +0 -0
  209. /package/dist/{page-QEDB7EVU.js.map → list-DP3O3CWB.js.map} +0 -0
  210. /package/dist/{pretty-5DGEBZSV.js.map → list-P77RZFZF.js.map} +0 -0
  211. /package/dist/{pretty-SQX33UM2.js.map → page-WQCMBNRD.js.map} +0 -0
  212. /package/dist/{reporters-OHSI3RMV.js.map → pretty-5MMMNSWF.js.map} +0 -0
  213. /package/dist/{reporters-YELDDYJD.js.map → pretty-H4DQREMW.js.map} +0 -0
  214. /package/dist/{run-IP6NZHAG.js.map → provider-AMGRDY6V.js.map} +0 -0
  215. /package/dist/{validate-G6HH3YXL.js.map → reporters-SU3VUKKX.js.map} +0 -0
@@ -3,573 +3,26 @@ import {
3
3
  configDir
4
4
  } from "./chunk-4TSWU2SU.js";
5
5
  import {
6
- TracevalsError
7
- } from "./chunk-UKZNLVJW.js";
8
- import {
9
- EXECUTION_GRANTS,
10
- configuredGrants,
11
- isExecutionGrant,
12
- unknownGrantsMessage
13
- } from "./chunk-YNHZHSSM.js";
6
+ MANIFEST_VERSION
7
+ } from "./chunk-CU57HT2E.js";
14
8
  import {
15
9
  metaProvenanceEntries
16
- } from "./chunk-3YHAYXBC.js";
10
+ } from "./chunk-CR3HZERW.js";
17
11
  import {
18
12
  __default4 as __default,
19
13
  extractFrontmatter
20
- } from "./chunk-527HHQPS.js";
21
- import {
22
- FAMILY_CONFIG_NAMES,
23
- assertKnownProvider,
24
- findConfigFileSync,
25
- readConfigFileSync
26
- } from "./chunk-Q35YIDBV.js";
27
- import {
28
- errorMessage
29
- } from "./chunk-G3T47CFV.js";
30
-
31
- // src/tracevals/calibrate/labels.ts
32
- import { readFile } from "node:fs/promises";
33
- import { dirname, resolve } from "node:path";
34
- import { Ajv2020 } from "ajv/dist/2020.js";
35
- import { parse as parseYaml } from "yaml";
36
-
37
- // src/tracevals/calibrate/labels-schema.json
38
- var labels_schema_default = {
39
- $schema: "https://json-schema.org/draft/2020-12/schema",
40
- $id: "manni:tracevals:calibration-labels",
41
- title: "manni tracevals calibration labels",
42
- description: "Ground truth for `manni tracevals calibrate`: what a human decided a given eval should have produced on a given trace. A sidecar rather than an eval field, because a label belongs to a corpus and a reviewer, not to the artifact \u2014 and because the eval vocabulary is docmeta's, vendored byte-identical, with `inlineEval` closed to additions (ADR 01010).",
43
- type: "object",
44
- additionalProperties: false,
45
- required: ["version", "labels"],
46
- properties: {
47
- version: {
48
- const: 1,
49
- description: "Format version. Pinned so a future shape change is an explicit migration rather than a silently-reinterpreted file."
50
- },
51
- labels: {
52
- type: "array",
53
- minItems: 1,
54
- description: "One entry per (trace, artifact, eval) you have judged by hand.",
55
- items: {
56
- type: "object",
57
- additionalProperties: false,
58
- required: ["trace", "artifact", "eval", "expected"],
59
- properties: {
60
- trace: {
61
- type: "string",
62
- minLength: 1,
63
- description: "Path to the trace file, resolved against this file's own directory \u2014 not the working directory."
64
- },
65
- artifact: {
66
- type: "string",
67
- minLength: 1,
68
- description: "Artifact name as the report shows it: a skill name, a subagent_type, or a project-rules filename such as CLAUDE.md."
69
- },
70
- type: {
71
- enum: ["skill", "agent", "project-rules", "slash-command"],
72
- description: "Optional disambiguator, needed when one name resolves to two kinds of artifact \u2014 a skill and an agent, or a skill and the slash command that types it. Every `ArtifactType` the resolver can produce belongs here: a label whose type this rejects has no way to name the artifact it means."
73
- },
74
- eval: {
75
- type: "string",
76
- minLength: 1,
77
- description: "The eval's id. Shorthand entries with no declared id get a positional one (eval-1, eval-2, ...), so labelling those is only as stable as the order they are written in."
78
- },
79
- expected: {
80
- enum: ["pass", "fail", "needs-review"],
81
- description: "What you decided. `needs-review` means you found it genuinely ambiguous and want the tool to defer too."
82
- },
83
- note: {
84
- type: "string",
85
- description: "Why you decided that. Carried into the disagreement report, where it is the whole reason a disagreement is actionable."
86
- }
87
- }
88
- }
89
- }
90
- }
91
- };
92
-
93
- // src/tracevals/calibrate/labels.ts
94
- var labelsSchema = labels_schema_default;
95
- var DEFAULT_LABELS_FILE = "tracevals/labels.yaml";
96
- var ajv = new Ajv2020({ allErrors: true });
97
- var validate = ajv.compile(labelsSchema);
98
- var labelKey = (traceFile, artifact, evalName, type) => `${traceFile}\0${type ?? ""}\0${artifact}\0${evalName}`;
99
- function parseLabels(text, file) {
100
- let raw;
101
- try {
102
- raw = parseYaml(text);
103
- } catch (err) {
104
- throw new TracevalsError(
105
- `could not parse ${file}: ${errorMessage(err)}`
106
- );
107
- }
108
- if (raw === null || raw === void 0) {
109
- throw new TracevalsError(`invalid labels file ${file}: it is empty`);
110
- }
111
- if (!validate(raw)) {
112
- const detail = (validate.errors ?? []).map((e) => `${e.instancePath || "/"} ${e.message ?? "invalid"}`).join("; ");
113
- const empty2 = (validate.errors ?? []).some(
114
- (e) => e.instancePath === "/labels" && e.keyword === "minItems"
115
- );
116
- throw new TracevalsError(
117
- empty2 ? `invalid labels file ${file}: it must carry at least one label \u2014 an empty one measures nothing` : `invalid labels file ${file}: ${detail}`
118
- );
119
- }
120
- const base = dirname(resolve(file));
121
- const labels = [];
122
- const seen = /* @__PURE__ */ new Set();
123
- for (const entry of raw.labels) {
124
- const traceFile = resolve(base, entry.trace);
125
- const type = entry.type;
126
- const key = labelKey(
127
- traceFile,
128
- entry.artifact,
129
- entry.eval,
130
- type
131
- );
132
- if (seen.has(key)) {
133
- throw new TracevalsError(
134
- `invalid labels file ${file}: duplicate label for ${entry.artifact ?? "?"} \u203A ${entry.eval ?? "?"} on ${entry.trace ?? "?"}`
135
- );
136
- }
137
- seen.add(key);
138
- labels.push({
139
- trace: entry.trace,
140
- traceFile,
141
- artifact: entry.artifact,
142
- ...type !== void 0 ? { type } : {},
143
- eval: entry.eval,
144
- expected: entry.expected,
145
- ...entry.note !== void 0 ? { note: entry.note } : {}
146
- });
147
- }
148
- return labels;
149
- }
150
- async function loadLabels(file) {
151
- let text;
152
- try {
153
- text = await readFile(file, "utf-8");
154
- } catch (err) {
155
- throw new TracevalsError(
156
- `could not read labels file ${file}: ${errorMessage(err)}`
157
- );
158
- }
159
- return parseLabels(text, file);
160
- }
161
-
162
- // src/tracevals/core/config.ts
163
- import { Ajv2020 as Ajv20202 } from "ajv/dist/2020.js";
164
-
165
- // src/tracevals/core/config-schema.json
166
- var config_schema_default = {
167
- $schema: "https://json-schema.org/draft/2020-12/schema",
168
- $id: "manni:tracevals:config",
169
- title: "tracevals section of manni.config.yaml",
170
- description: "Settings for manni tracevals, held under the `tracevals` key of the config file shared by the manni family of tools. Sibling keys belong to other tools and are not validated here.",
171
- type: "object",
172
- additionalProperties: false,
173
- properties: {
174
- provider: {
175
- type: "string",
176
- minLength: 1,
177
- description: "Which provider judges: auto, anthropic, openai, claude-cli, or llama-cpp. Overrides the family's top-level `providers.provider` for tracevals only. Connection settings \u2014 an endpoint, an API key's environment variable, the Claude CLI command \u2014 live in that top-level `providers:` map, never here."
178
- },
179
- model: {
180
- type: "string",
181
- minLength: 1,
182
- description: "The model within `provider`, which must be named at this level. Unset, the inference library's default for the winning provider is used; manni pins no model id of its own."
183
- },
184
- judge: {
185
- type: "object",
186
- additionalProperties: false,
187
- properties: {
188
- ensembleRuns: { type: "integer", minimum: 1 },
189
- temperature: { type: "number", minimum: 0, maximum: 2 },
190
- zones: {
191
- type: "object",
192
- additionalProperties: false,
193
- properties: {
194
- autoPass: { type: "number", minimum: 0, maximum: 1 },
195
- autoFail: { type: "number", minimum: 0, maximum: 1 }
196
- }
197
- },
198
- cacheDir: { type: "string" },
199
- maxTurns: { type: "integer", minimum: 1, description: "Stop after this many ensemble runs. A cached ensemble spends none. Unset means unbounded; the remaining evals report `skipped` with the reason `turn budget` rather than aborting the run." },
200
- redact: {
201
- type: "array",
202
- description: "Extra regular expressions scrubbed from the session digest before it is sent to a judge provider. Applied on top of the built-in secret shapes, never instead of them; each source is compiled with the `g` flag, and a match is replaced with `[redacted]`. Pattern matching is best-effort \u2014 --deterministic-only is the only setting that guarantees nothing leaves the machine.",
203
- items: { type: "string", minLength: 1 }
204
- }
205
- }
206
- },
207
- execution: {
208
- type: "object",
209
- additionalProperties: false,
210
- description: "Operator grant for executing content-authored code.",
211
- properties: {
212
- allow: {
213
- type: "array",
214
- items: { enum: ["frontmatter-commands"] },
215
- default: ["frontmatter-commands"],
216
- description: "Which content-authored code a run may execute. Absent, every grant holds; list fewer to narrow it, or write [] to run none. frontmatter-commands lets `command` evals declared in an artifact's front matter run; without it they report `skipped` with a reason, never `pass`."
217
- }
218
- }
219
- },
220
- render: {
221
- type: "object",
222
- additionalProperties: false,
223
- properties: {
224
- maxBlockChars: { type: "integer", minimum: 100 },
225
- maxTotalChars: {
226
- type: "integer",
227
- minimum: 1e3,
228
- description: "Upper bound on the rendered digest, in characters. The timeline always keeps at least 200 characters, so a very long header can push the digest past this bound by up to 200."
229
- }
230
- }
231
- },
232
- history: {
233
- type: "object",
234
- additionalProperties: false,
235
- properties: {
236
- file: { type: "string" }
237
- }
238
- },
239
- capture: {
240
- type: "object",
241
- additionalProperties: false,
242
- description: "Session manifests \u2014 sha256 of every instruction artifact plus the git SHA, recorded at session start by `manni tracevals capture` and read back by `run` to make staleness exact instead of an mtime guess. See ADR 01024.",
243
- properties: {
244
- dir: {
245
- type: "string",
246
- minLength: 1,
247
- description: "Directory manifests are written to and looked for, resolved against the project root. `run` also accepts one placed beside the trace as `<trace>.manifest.json`, and --manifest names one outright."
248
- }
249
- }
250
- },
251
- fill: {
252
- type: "object",
253
- additionalProperties: false,
254
- properties: {
255
- confidenceThreshold: { type: "number", minimum: 0, maximum: 1 },
256
- maxEvalsPerArtifact: { type: "integer", minimum: 1 },
257
- temperature: { type: "number", minimum: 0, maximum: 2 },
258
- cacheDir: { type: "string" },
259
- maxTurns: { type: "integer", minimum: 1, description: "Stop after this many inference calls, one per artifact filled. A cached artifact spends none. Unset means unbounded." }
260
- }
261
- },
262
- calibrate: {
263
- type: "object",
264
- additionalProperties: false,
265
- description: "Settings for `manni tracevals calibrate` \u2014 measuring the tool's verdicts against a human's answers. See ADR 01022.",
266
- properties: {
267
- labels: {
268
- type: "string",
269
- minLength: 1,
270
- description: "Default labels sidecar, resolved against this config file's directory. Overridden by --labels."
271
- },
272
- maxFalsePass: {
273
- type: "integer",
274
- minimum: 0,
275
- description: "Fail the calibration run (exit 1) above this many false passes \u2014 labelled fail, judged pass. Unset by default: a calibration run is a measurement, not a gate."
276
- },
277
- maxFalseFail: {
278
- type: "integer",
279
- minimum: 0,
280
- description: "Fail the calibration run above this many false fails \u2014 labelled pass, judged fail."
281
- },
282
- maxReview: {
283
- type: "integer",
284
- minimum: 0,
285
- description: "Fail the calibration run above this many needs-review outcomes across the whole corpus."
286
- },
287
- sweep: {
288
- type: "object",
289
- additionalProperties: false,
290
- description: "Values --sweep tries on each axis, one axis at a time with the others held at their configured value. The corpus is judged once at the largest ensembleRuns here and every cell is re-scored from those cached runs, so the grid costs nothing beyond that one run.",
291
- properties: {
292
- ensembleRuns: {
293
- type: "array",
294
- minItems: 1,
295
- items: { type: "integer", minimum: 1 }
296
- },
297
- autoPass: {
298
- type: "array",
299
- minItems: 1,
300
- items: { type: "number", minimum: 0, maximum: 1 }
301
- },
302
- autoFail: {
303
- type: "array",
304
- minItems: 1,
305
- items: { type: "number", minimum: 0, maximum: 1 }
306
- }
307
- }
308
- }
309
- }
310
- },
311
- failOnReview: { type: "boolean" },
312
- plugins: {
313
- type: "array",
314
- description: "Modules imported before evals are planned, so one calling registerGrader() can add a grader kind the built-ins do not cover. A relative or absolute path resolves against this file's directory, not the working directory; a bare package name resolves the way an import from this file's directory would. Load order is significant: a later entry wins a colliding kind.",
315
- items: { type: "string", minLength: 1 }
316
- },
317
- reportUnusedArtifacts: {
318
- type: "boolean",
319
- description: "List every skill and agent the session was offered and never used, rather than only counting them. Off by default: a real roster runs to hundreds of skills."
320
- }
321
- }
322
- };
323
-
324
- // src/tracevals/judge/redact.ts
325
- var SECRET_NAME = "(?:(?:[A-Za-z0-9]+[_\\-.])*(?:api[_\\-.]?key|access[_\\-.]?key|secret[_\\-.]?key|auth[_\\-.]?token|access[_\\-.]?token|refresh[_\\-.]?token|client[_\\-.]?secret|session[_\\-.]?token|key|token|secret|password|passwd|passphrase|credentials?|authorization)|AWS_[A-Za-z0-9_]+)";
326
- var REDACTION_PATTERNS = [
327
- {
328
- label: "private-key",
329
- pattern: /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,
330
- replacement: "[redacted:private-key]"
331
- },
332
- {
333
- // `sk-`, `sk-ant-…`, `pk-`, `rk-`: the OpenAI/Anthropic/Stripe family.
334
- label: "api-key",
335
- pattern: /\b[sprk]k-(?:[A-Za-z0-9]+-)*[A-Za-z0-9_-]{16,}/g,
336
- replacement: "[redacted:api-key]"
337
- },
338
- {
339
- label: "aws-access-key-id",
340
- pattern: /\b(?:AKIA|ASIA|AROA|AIDA)[0-9A-Z]{16}\b/g,
341
- replacement: "[redacted:aws-access-key-id]"
342
- },
343
- {
344
- label: "github-token",
345
- pattern: /\b(?:gh[pousr]_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{20,})\b/g,
346
- replacement: "[redacted:github-token]"
347
- },
348
- {
349
- label: "slack-token",
350
- pattern: /\bxox[abeoprs]-[A-Za-z0-9-]{10,}/g,
351
- replacement: "[redacted:slack-token]"
352
- },
353
- {
354
- label: "google-api-key",
355
- pattern: /\bAIza[0-9A-Za-z_-]{35}\b/g,
356
- replacement: "[redacted:google-api-key]"
357
- },
358
- {
359
- label: "jwt",
360
- pattern: /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,
361
- replacement: "[redacted:jwt]"
362
- },
363
- {
364
- // `Authorization: Bearer …`, `Basic …`, `Token …`. The scheme is kept so
365
- // the judge can still see that authentication happened.
366
- //
367
- // Deliberately *not* case-insensitive as a whole: `basic` and `token` are
368
- // ordinary English words, and `/i` would redact "basic configuration" as an
369
- // auth header. `bearer` is not, so it gets both spellings.
370
- label: "auth-token",
371
- pattern: /\b([Bb]earer|Basic|Token)\s+[A-Za-z0-9\-._~+/]{12,}={0,2}/g,
372
- replacement: "$1 [redacted:auth-token]"
373
- },
374
- {
375
- // JSON member — the shape a tool input renders as.
376
- label: "secret-member",
377
- pattern: new RegExp(`("${SECRET_NAME}"\\s*:\\s*)"[^"]*"`, "gi"),
378
- replacement: '$1"[redacted:secret-value]"'
379
- },
380
- {
381
- // Shell / `.env` assignment. The variable name is kept: knowing that a
382
- // secret was set, and which one, is often the adherence question.
383
- label: "secret-assignment",
384
- pattern: new RegExp(
385
- `\\b(${SECRET_NAME})(\\s*=\\s*)(?:"[^"\\n]*"|'[^'\\n]*'|[^\\s"'\\n]+)`,
386
- "gi"
387
- ),
388
- replacement: "$1$2[redacted:secret-value]"
389
- }
390
- ];
391
- var CUSTOM_PLACEHOLDER = "[redacted]";
392
- function makeRedactor(extra = []) {
393
- const custom = compileRedactPatterns(extra).map(
394
- (pattern) => [pattern, CUSTOM_PLACEHOLDER]
395
- );
396
- const all = [
397
- ...REDACTION_PATTERNS.map(
398
- ({ pattern, replacement }) => [pattern, replacement]
399
- ),
400
- ...custom
401
- ];
402
- return (text) => {
403
- let out = text;
404
- for (const [pattern, replacement] of all) {
405
- out = out.replace(pattern, replacement);
406
- }
407
- return out;
408
- };
409
- }
410
- function compileRedactPatterns(sources) {
411
- return sources.map((source) => {
412
- try {
413
- return new RegExp(source, "g");
414
- } catch (err) {
415
- throw new TracevalsError(
416
- `invalid config: judge.redact pattern ${JSON.stringify(source)} is not a valid regular expression: ${err instanceof Error ? err.message : String(err)}`
417
- );
418
- }
419
- });
420
- }
421
-
422
- // src/tracevals/capture/types.ts
423
- var MANIFEST_VERSION = 1;
424
- var DEFAULT_CAPTURE_DIR = ".manni/tracevals/sessions";
425
-
426
- // src/tracevals/core/config.ts
427
- var configSchema = config_schema_default;
428
- var DEFAULT_CONFIG_FILENAME = FAMILY_CONFIG_NAMES[0] ?? "manni.config.yaml";
429
- var CONFIG_SECTION_KEY = "tracevals";
430
- var CONFIG_SECTION_KEY_PATH = `/${CONFIG_SECTION_KEY}`;
431
- var CONFIG_FILE = {
432
- section: CONFIG_SECTION_KEY,
433
- legacyNames: [],
434
- toError: (message) => new TracevalsError(message)
435
- };
436
- var ajv2 = new Ajv20202({ allErrors: true, verbose: true });
437
- var validate2 = ajv2.compile(configSchema);
438
- function camelCaseHint(key, parentSchema) {
439
- const camel = key.replace(/-([a-z0-9])/g, (_, c) => c.toUpperCase());
440
- if (camel === key || parentSchema === null || typeof parentSchema !== "object") {
441
- return "";
442
- }
443
- const properties = parentSchema.properties;
444
- return properties !== null && typeof properties === "object" && Object.hasOwn(properties, camel) ? `; did you mean "${camel}"?` : "";
445
- }
446
- function movedProviderHint(instancePath, keyword) {
447
- return instancePath === "/provider" && keyword === "type" ? `; "provider" is now a provider name; per-provider settings moved to the top-level providers: map` : "";
448
- }
449
- function parseConfig(raw, file = {}) {
450
- const source = file.source ?? DEFAULT_CONFIG_FILENAME;
451
- const unknownGrants = configuredGrants(raw).filter((g) => !isExecutionGrant(g));
452
- if (unknownGrants.length > 0) {
453
- throw new TracevalsError(`${source}: ${unknownGrantsMessage(unknownGrants)}`);
454
- }
455
- if (!validate2(raw)) {
456
- const detail = (validate2.errors ?? []).map((e) => {
457
- const extra = e.keyword === "additionalProperties" ? e.params.additionalProperty : void 0;
458
- return extra !== void 0 ? `unknown key "${extra}"${camelCaseHint(extra, e.parentSchema)}` : `${CONFIG_SECTION_KEY_PATH}${e.instancePath} ${e.message ?? "is invalid"}` + movedProviderHint(e.instancePath, e.keyword);
459
- }).join("; ");
460
- throw new TracevalsError(`${source}: ${detail}`);
461
- }
462
- const r = raw;
463
- const provider = r.provider ?? null;
464
- if (provider !== null) {
465
- assertKnownProvider(provider, (message) => new TracevalsError(message));
466
- }
467
- const config = {
468
- provider,
469
- model: r.model ?? null,
470
- providers: file.providers ?? {},
471
- configSource: source,
472
- judge: {
473
- ensembleRuns: r.judge?.ensembleRuns ?? 3,
474
- temperature: r.judge?.temperature ?? 0,
475
- zones: {
476
- autoPass: r.judge?.zones?.autoPass ?? 0.8,
477
- autoFail: r.judge?.zones?.autoFail ?? 0.8
478
- },
479
- cacheDir: r.judge?.cacheDir ?? ".manni/tracevals/cache",
480
- // `null`, not a number: unbounded is a state, and any number here would
481
- // be a ceiling nobody asked for.
482
- maxTurns: r.judge?.maxTurns ?? null,
483
- // Always a list: the render site concatenates nothing onto it, but a
484
- // hole here would be a special case in every consumer.
485
- redact: [...r.judge?.redact ?? []]
486
- },
487
- render: {
488
- maxBlockChars: r.render?.maxBlockChars ?? 2e3,
489
- maxTotalChars: r.render?.maxTotalChars ?? 15e4
490
- },
491
- execution: { allow: [...r.execution?.allow ?? EXECUTION_GRANTS] },
492
- history: {
493
- file: r.history?.file ?? ".manni/tracevals/history.jsonl"
494
- },
495
- capture: {
496
- // Beside the judge cache, under the state directory that already travels
497
- // with the project — which is what puts a manifest next to its trace in
498
- // the CI patterns the docs describe.
499
- dir: r.capture?.dir ?? DEFAULT_CAPTURE_DIR
500
- },
501
- fill: {
502
- // 0.7 matches the manuscript's calibration bar for judged agreement.
503
- confidenceThreshold: r.fill?.confidenceThreshold ?? 0.7,
504
- maxEvalsPerArtifact: r.fill?.maxEvalsPerArtifact ?? 8,
505
- temperature: r.fill?.temperature ?? 0,
506
- // Separate from the judge cache: different key scheme and value shape.
507
- cacheDir: r.fill?.cacheDir ?? ".manni/tracevals/cache/fill",
508
- maxTurns: r.fill?.maxTurns ?? null
509
- },
510
- calibrate: {
511
- labels: r.calibrate?.labels ?? DEFAULT_LABELS_FILE,
512
- sweep: {
513
- // Spans the range rather than filling it: the first sweep judges the
514
- // corpus at the largest value here, so a wide grid is the one part of
515
- // calibration that does cost money.
516
- ensembleRuns: [...r.calibrate?.sweep?.ensembleRuns ?? [1, 3, 5]],
517
- autoPass: [
518
- ...r.calibrate?.sweep?.autoPass ?? [0.5, 0.6, 0.7, 0.8, 0.9, 0.95]
519
- ],
520
- autoFail: [
521
- ...r.calibrate?.sweep?.autoFail ?? [0.5, 0.6, 0.7, 0.8, 0.9, 0.95]
522
- ]
523
- }
524
- },
525
- failOnReview: r.failOnReview ?? true,
526
- // Always a list, never undefined: the read site concatenates `--require`
527
- // onto it, and a hole there would be a special case in every caller.
528
- plugins: [...r.plugins ?? []],
529
- // An observation, not a gate: listing it is opt-in because a real roster
530
- // runs to hundreds of skills (ADR 01016).
531
- reportUnusedArtifacts: r.reportUnusedArtifacts ?? false
532
- };
533
- compileRedactPatterns(config.judge.redact);
534
- for (const key of ["maxFalsePass", "maxFalseFail", "maxReview"]) {
535
- if (typeof r.calibrate?.[key] === "number") {
536
- config.calibrate[key] = r.calibrate[key];
537
- }
538
- }
539
- return config;
540
- }
541
- async function discoverConfig(dir = process.cwd(), lookup = {}) {
542
- if (lookup.noConfig === true) {
543
- return { config: parseConfig({}), dir, collections: [] };
544
- }
545
- const file = await Promise.resolve().then(
546
- () => lookup.configPath === void 0 ? findConfigFileSync(dir, CONFIG_FILE) : readConfigFileSync(lookup.configPath, dir, CONFIG_FILE)
547
- );
548
- if (file === null) return { config: parseConfig({}), dir, collections: [] };
549
- return {
550
- config: parseConfig(file.value ?? {}, {
551
- source: file.source,
552
- ...file.providers !== void 0 ? { providers: file.providers } : {}
553
- }),
554
- dir: file.dir,
555
- collections: file.collections,
556
- path: file.path
557
- };
558
- }
559
- async function loadConfig(dir = process.cwd(), lookup = {}) {
560
- return (await discoverConfig(dir, lookup)).config;
561
- }
14
+ } from "./chunk-MSMB6XOS.js";
562
15
 
563
16
  // src/tracevals/capture/manifest.ts
564
17
  import { createHash } from "node:crypto";
565
- import { mkdir, readFile as readFile2, writeFile } from "node:fs/promises";
18
+ import { mkdir, readFile, writeFile } from "node:fs/promises";
566
19
  import {
567
- dirname as dirname2,
20
+ dirname,
568
21
  extname,
569
22
  isAbsolute,
570
23
  join,
571
24
  relative,
572
- resolve as resolve2,
25
+ resolve,
573
26
  sep
574
27
  } from "node:path";
575
28
  function sha256Hex(data) {
@@ -577,13 +30,13 @@ function sha256Hex(data) {
577
30
  }
578
31
  async function hashFile(path) {
579
32
  try {
580
- return sha256Hex(await readFile2(path));
33
+ return sha256Hex(await readFile(path));
581
34
  } catch {
582
35
  return null;
583
36
  }
584
37
  }
585
38
  function relPosix(root, path) {
586
- const rel = relative(resolve2(root), resolve2(path));
39
+ const rel = relative(resolve(root), resolve(path));
587
40
  if (rel === "" || rel.startsWith("..") || isAbsolute(rel)) return null;
588
41
  return rel.split(sep).join("/");
589
42
  }
@@ -600,7 +53,7 @@ function siblingManifestPath(tracePath) {
600
53
  return `${stem}.manifest.json`;
601
54
  }
602
55
  async function writeManifest(path, manifest) {
603
- await mkdir(dirname2(resolve2(path)), { recursive: true });
56
+ await mkdir(dirname(resolve(path)), { recursive: true });
604
57
  await writeFile(path, `${JSON.stringify(manifest, null, 2)}
605
58
  `, "utf-8");
606
59
  }
@@ -614,7 +67,7 @@ function isManifestArtifact(value) {
614
67
  async function readManifest(path) {
615
68
  let raw;
616
69
  try {
617
- raw = await readFile2(path, "utf-8");
70
+ raw = await readFile(path, "utf-8");
618
71
  } catch {
619
72
  return null;
620
73
  }
@@ -648,11 +101,11 @@ async function findManifest(options) {
648
101
  if (options.sessionId !== void 0) {
649
102
  candidates.push(
650
103
  manifestPathFor(
651
- resolve2(dirname2(options.tracePath), options.captureDir),
104
+ resolve(dirname(options.tracePath), options.captureDir),
652
105
  options.sessionId
653
106
  ),
654
107
  manifestPathFor(
655
- resolve2(options.projectDir, options.captureDir),
108
+ resolve(options.projectDir, options.captureDir),
656
109
  options.sessionId
657
110
  )
658
111
  );
@@ -993,8 +446,8 @@ function firstLine(description) {
993
446
  }
994
447
 
995
448
  // src/tracevals/artifacts/fs.ts
996
- import { access, readdir, readFile as readFile3, stat } from "node:fs/promises";
997
- import { dirname as dirname3, join as join2, resolve as resolve3, sep as sep2 } from "node:path";
449
+ import { access, readdir, readFile as readFile2, stat } from "node:fs/promises";
450
+ import { dirname as dirname2, join as join2, resolve as resolve2, sep as sep2 } from "node:path";
998
451
  function segments(path) {
999
452
  return path.split(sep2).join("/").split("/");
1000
453
  }
@@ -1010,14 +463,14 @@ var PRUNED_DIRS = /* @__PURE__ */ new Set([
1010
463
  ".venv"
1011
464
  ]);
1012
465
  async function findGitRoot(start) {
1013
- let current = resolve3(start);
466
+ let current = resolve2(start);
1014
467
  for (let depth = 0; depth < 64; depth += 1) {
1015
468
  try {
1016
469
  await access(join2(current, ".git"));
1017
470
  return current;
1018
471
  } catch {
1019
472
  }
1020
- const parent = dirname3(current);
473
+ const parent = dirname2(current);
1021
474
  if (parent === current) return null;
1022
475
  current = parent;
1023
476
  }
@@ -1025,7 +478,7 @@ async function findGitRoot(start) {
1025
478
  }
1026
479
  async function safeRead(path) {
1027
480
  try {
1028
- return await readFile3(path, "utf-8");
481
+ return await readFile2(path, "utf-8");
1029
482
  } catch {
1030
483
  return null;
1031
484
  }
@@ -1074,12 +527,12 @@ async function listInTree(root, match, options = {}) {
1074
527
  }
1075
528
  }
1076
529
  }
1077
- await walk(resolve3(root), 0);
530
+ await walk(resolve2(root), 0);
1078
531
  return found.sort();
1079
532
  }
1080
533
 
1081
534
  // src/tracevals/artifacts/resolve.ts
1082
- import { basename, dirname as dirname4, join as join3, resolve as resolve4 } from "node:path";
535
+ import { basename, dirname as dirname3, join as join3, resolve as resolve3 } from "node:path";
1083
536
  var PROJECT_RULES_FILENAMES = [
1084
537
  "CLAUDE.md",
1085
538
  "AGENTS.md",
@@ -1094,9 +547,9 @@ var BUILTIN_AGENTS = /* @__PURE__ */ new Set([
1094
547
  "fork"
1095
548
  ]);
1096
549
  async function resolveArtifacts(trace, options = {}) {
1097
- const projectDir = resolve4(options.projectDir ?? trace.cwd);
550
+ const projectDir = resolve3(options.projectDir ?? trace.cwd);
1098
551
  const userDir = configDir(options.env);
1099
- const projectRoot = resolve4(
552
+ const projectRoot = resolve3(
1100
553
  options.projectRoot ?? await findGitRoot(projectDir) ?? projectDir
1101
554
  );
1102
555
  const artifacts = [];
@@ -1375,7 +828,7 @@ async function resolveSkill(name, projectDir, userDir) {
1375
828
  tried.push(join3(pluginRoot, "**", "skills", shortName, "SKILL.md"));
1376
829
  const found = await findInTree(
1377
830
  pluginRoot,
1378
- (path) => basename(path) === "SKILL.md" && basename(dirname4(path)) === shortName && (pluginName === null || hasPathSegment(path, pluginName))
831
+ (path) => basename(path) === "SKILL.md" && basename(dirname3(path)) === shortName && (pluginName === null || hasPathSegment(path, pluginName))
1379
832
  );
1380
833
  if (found) {
1381
834
  const content = await safeRead(found);
@@ -1472,7 +925,7 @@ async function resolveProjectRules(projectDir, projectRoot) {
1472
925
  for (let depth = 0; depth < 32; depth += 1) {
1473
926
  dirs.push(current);
1474
927
  if (current === projectRoot) break;
1475
- const parent = dirname4(current);
928
+ const parent = dirname3(current);
1476
929
  if (parent === current) break;
1477
930
  current = parent;
1478
931
  }
@@ -1497,12 +950,12 @@ async function resolveProjectRules(projectDir, projectRoot) {
1497
950
  }
1498
951
 
1499
952
  // src/tracevals/evals/schema.ts
1500
- import { Ajv2020 as Ajv20203 } from "ajv/dist/2020.js";
953
+ import { Ajv2020 } from "ajv/dist/2020.js";
1501
954
  var artifactEvalsSchema = __default;
1502
955
  var ARTIFACT_EVALS_SCHEMA_ID = __default.$id;
1503
- var ajv3 = new Ajv20203({ allErrors: true, allowUnionTypes: true });
1504
- ajv3.addKeyword({ keyword: "x-manni-location" });
1505
- var validateArtifact = ajv3.compile(artifactEvalsSchema);
956
+ var ajv = new Ajv2020({ allErrors: true, allowUnionTypes: true });
957
+ ajv.addKeyword({ keyword: "x-manni-location" });
958
+ var validateArtifact = ajv.compile(artifactEvalsSchema);
1506
959
  function subjectOf(e) {
1507
960
  switch (e.keyword) {
1508
961
  case "required":
@@ -1684,21 +1137,6 @@ function anchorList(raw) {
1684
1137
  }
1685
1138
 
1686
1139
  export {
1687
- REDACTION_PATTERNS,
1688
- CUSTOM_PLACEHOLDER,
1689
- makeRedactor,
1690
- compileRedactPatterns,
1691
- MANIFEST_VERSION,
1692
- DEFAULT_CAPTURE_DIR,
1693
- DEFAULT_LABELS_FILE,
1694
- labelKey,
1695
- parseLabels,
1696
- loadLabels,
1697
- DEFAULT_CONFIG_FILENAME,
1698
- CONFIG_SECTION_KEY,
1699
- parseConfig,
1700
- discoverConfig,
1701
- loadConfig,
1702
1140
  newAvailability,
1703
1141
  availableAt,
1704
1142
  offeredNames,
@@ -1730,4 +1168,4 @@ export {
1730
1168
  ARTIFACT_EVALS_SCHEMA_ID,
1731
1169
  extractEvals
1732
1170
  };
1733
- //# sourceMappingURL=chunk-3R5Y3XOL.js.map
1171
+ //# sourceMappingURL=chunk-OOEMKOX6.js.map