@rpamis/comet 0.3.9 → 0.4.0-beta.10

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 (1678) hide show
  1. package/README.md +572 -257
  2. package/assets/manifest.json +46 -13
  3. package/assets/skills/comet/SKILL.md +17 -271
  4. package/assets/skills/comet/reference/auto-transition.md +1 -1
  5. package/assets/skills/comet/reference/classic-layout.md +34 -0
  6. package/assets/skills/comet/reference/comet-yaml-fields.md +22 -9
  7. package/assets/skills/comet/reference/context-recovery.md +23 -3
  8. package/assets/skills/comet/reference/debug-gate.md +17 -1
  9. package/assets/skills/comet/reference/decision-point.md +24 -2
  10. package/assets/skills/comet/reference/file-structure.md +2 -2
  11. package/assets/skills/comet/reference/intent-frame.md +74 -0
  12. package/assets/skills/comet/reference/scripts.md +101 -0
  13. package/assets/skills/comet/reference/subagent-dispatch.md +84 -27
  14. package/assets/skills/comet/rules/comet-phase-guard.en.md +44 -33
  15. package/assets/skills/comet/rules/comet-phase-guard.md +42 -33
  16. package/assets/skills/comet/rules/comet-workflow-guard.en.md +32 -0
  17. package/assets/skills/comet/rules/comet-workflow-guard.md +32 -0
  18. package/assets/skills/comet/runtime/classic/checks.yaml +6 -0
  19. package/assets/skills/comet/runtime/classic/guardrails.yaml +13 -0
  20. package/assets/skills/comet/runtime/classic/skill.yaml +122 -0
  21. package/assets/skills/comet/scripts/comet-archive.mjs +3 -0
  22. package/assets/skills/comet/scripts/comet-entry-runtime.mjs +8074 -0
  23. package/assets/skills/comet/scripts/comet-env.mjs +15 -0
  24. package/assets/skills/comet/scripts/comet-guard.mjs +3 -0
  25. package/assets/skills/comet/scripts/comet-handoff.mjs +3 -0
  26. package/assets/skills/comet/scripts/comet-hook-guard.mjs +3 -0
  27. package/assets/skills/comet/scripts/comet-hook-router.mjs +12786 -0
  28. package/assets/skills/comet/scripts/comet-intent.mjs +3 -0
  29. package/assets/skills/comet/scripts/comet-resume-probe.mjs +3 -0
  30. package/assets/skills/comet/scripts/comet-runtime.mjs +19201 -0
  31. package/assets/skills/comet/scripts/comet-state.mjs +3 -0
  32. package/assets/skills/comet/scripts/comet-yaml-validate.mjs +3 -0
  33. package/assets/skills/comet-any/SKILL.md +118 -0
  34. package/assets/skills/comet-any/reference/authored-zone-example.md +105 -0
  35. package/assets/skills/comet-any/reference/authoring-protocol.json +91 -0
  36. package/assets/skills/comet-any/reference/authoring-subagents.md +102 -0
  37. package/assets/skills/comet-any/reference/bundle-authoring.md +166 -0
  38. package/assets/skills/comet-any/reference/eval-provider.md +83 -0
  39. package/assets/skills/comet-any/reference/subagents/pause-points-author.md +78 -0
  40. package/assets/skills/comet-any/reference/subagents/reference-author.md +77 -0
  41. package/assets/skills/comet-any/reference/subagents/script-author.md +81 -0
  42. package/assets/skills/comet-any/reference/subagents/skill-core-author.md +129 -0
  43. package/assets/skills/comet-any/reference/subagents/skill-reviewer.md +126 -0
  44. package/assets/skills/comet-any/reference/subagents/workflow-entry-author.md +101 -0
  45. package/assets/skills/comet-archive/SKILL.md +81 -28
  46. package/assets/skills/comet-build/SKILL.md +97 -67
  47. package/assets/skills/comet-classic/SKILL.md +295 -0
  48. package/assets/skills/comet-design/SKILL.md +43 -43
  49. package/assets/skills/comet-hotfix/SKILL.md +71 -59
  50. package/assets/skills/comet-native/SKILL.md +133 -0
  51. package/assets/skills/comet-native/reference/artifacts.md +141 -0
  52. package/assets/skills/comet-native/reference/clarification.md +54 -0
  53. package/assets/skills/comet-native/reference/commands.md +170 -0
  54. package/assets/skills/comet-native/reference/recovery.md +96 -0
  55. package/assets/skills/comet-native/scripts/comet-native-hook-guard.mjs +4 -0
  56. package/assets/skills/comet-native/scripts/comet-native-runtime.mjs +34468 -0
  57. package/assets/skills/comet-open/SKILL.md +120 -70
  58. package/assets/skills/comet-tweak/SKILL.md +99 -68
  59. package/assets/skills/comet-verify/SKILL.md +74 -86
  60. package/assets/skills-zh/comet/SKILL.md +17 -258
  61. package/assets/skills-zh/comet/reference/auto-transition.md +3 -3
  62. package/assets/skills-zh/comet/reference/classic-layout.md +34 -0
  63. package/assets/skills-zh/comet/reference/comet-yaml-fields.md +18 -9
  64. package/assets/skills-zh/comet/reference/context-recovery.md +22 -2
  65. package/assets/skills-zh/comet/reference/debug-gate.md +17 -1
  66. package/assets/skills-zh/comet/reference/decision-point.md +24 -2
  67. package/assets/skills-zh/comet/reference/file-structure.md +2 -2
  68. package/assets/skills-zh/comet/reference/intent-frame.md +74 -0
  69. package/assets/skills-zh/comet/reference/scripts.md +101 -0
  70. package/assets/skills-zh/comet/reference/subagent-dispatch.md +72 -22
  71. package/assets/skills-zh/comet/runtime/classic/checks.yaml +6 -0
  72. package/assets/skills-zh/comet/runtime/classic/guardrails.yaml +13 -0
  73. package/assets/skills-zh/comet/runtime/classic/skill.yaml +122 -0
  74. package/assets/skills-zh/comet-any/SKILL.md +118 -0
  75. package/assets/skills-zh/comet-any/reference/authored-zone-example.md +105 -0
  76. package/assets/skills-zh/comet-any/reference/authoring-protocol.json +91 -0
  77. package/assets/skills-zh/comet-any/reference/authoring-subagents.md +107 -0
  78. package/assets/skills-zh/comet-any/reference/bundle-authoring.md +166 -0
  79. package/assets/skills-zh/comet-any/reference/eval-provider.md +66 -0
  80. package/assets/skills-zh/comet-any/reference/subagents/pause-points-author.md +81 -0
  81. package/assets/skills-zh/comet-any/reference/subagents/reference-author.md +81 -0
  82. package/assets/skills-zh/comet-any/reference/subagents/script-author.md +84 -0
  83. package/assets/skills-zh/comet-any/reference/subagents/skill-core-author.md +129 -0
  84. package/assets/skills-zh/comet-any/reference/subagents/skill-reviewer.md +126 -0
  85. package/assets/skills-zh/comet-any/reference/subagents/workflow-entry-author.md +99 -0
  86. package/assets/skills-zh/comet-archive/SKILL.md +81 -28
  87. package/assets/skills-zh/comet-build/SKILL.md +88 -71
  88. package/assets/skills-zh/comet-classic/SKILL.md +283 -0
  89. package/assets/skills-zh/comet-design/SKILL.md +43 -43
  90. package/assets/skills-zh/comet-hotfix/SKILL.md +75 -63
  91. package/assets/skills-zh/comet-native/SKILL.md +133 -0
  92. package/assets/skills-zh/comet-native/reference/artifacts.md +141 -0
  93. package/assets/skills-zh/comet-native/reference/clarification.md +54 -0
  94. package/assets/skills-zh/comet-native/reference/commands.md +170 -0
  95. package/assets/skills-zh/comet-native/reference/recovery.md +96 -0
  96. package/assets/skills-zh/comet-open/SKILL.md +121 -71
  97. package/assets/skills-zh/comet-tweak/SKILL.md +98 -66
  98. package/assets/skills-zh/comet-verify/SKILL.md +70 -80
  99. package/bin/comet.js +1 -1
  100. package/dist/app/cli/comet-banner.d.ts +25 -0
  101. package/dist/app/cli/comet-banner.d.ts.map +1 -0
  102. package/dist/app/cli/comet-banner.js +265 -0
  103. package/dist/app/cli/comet-banner.js.map +1 -0
  104. package/dist/{cli → app/cli}/index.d.ts.map +1 -1
  105. package/dist/app/cli/index.js +527 -0
  106. package/dist/app/cli/index.js.map +1 -0
  107. package/dist/app/commands/bundle.d.ts +51 -0
  108. package/dist/app/commands/bundle.d.ts.map +1 -0
  109. package/dist/app/commands/bundle.js +387 -0
  110. package/dist/app/commands/bundle.js.map +1 -0
  111. package/dist/app/commands/classic.d.ts +5 -0
  112. package/dist/app/commands/classic.d.ts.map +1 -0
  113. package/dist/app/commands/classic.js +32 -0
  114. package/dist/app/commands/classic.js.map +1 -0
  115. package/dist/app/commands/command-result.d.ts +6 -0
  116. package/dist/app/commands/command-result.d.ts.map +1 -0
  117. package/dist/app/commands/command-result.js +4 -0
  118. package/dist/app/commands/command-result.js.map +1 -0
  119. package/dist/app/commands/creator.d.ts +14 -0
  120. package/dist/app/commands/creator.d.ts.map +1 -0
  121. package/dist/app/commands/creator.js +82 -0
  122. package/dist/app/commands/creator.js.map +1 -0
  123. package/dist/app/commands/dashboard.d.ts +16 -0
  124. package/dist/app/commands/dashboard.d.ts.map +1 -0
  125. package/dist/app/commands/dashboard.js +53 -0
  126. package/dist/app/commands/dashboard.js.map +1 -0
  127. package/dist/{commands → app/commands}/doctor.d.ts +5 -1
  128. package/dist/app/commands/doctor.d.ts.map +1 -0
  129. package/dist/app/commands/doctor.js +1115 -0
  130. package/dist/app/commands/doctor.js.map +1 -0
  131. package/dist/app/commands/eval.d.ts +19 -0
  132. package/dist/app/commands/eval.d.ts.map +1 -0
  133. package/dist/app/commands/eval.js +227 -0
  134. package/dist/app/commands/eval.js.map +1 -0
  135. package/dist/app/commands/i18n.d.ts +4 -0
  136. package/dist/app/commands/i18n.d.ts.map +1 -0
  137. package/dist/{commands → app/commands}/i18n.js +40 -8
  138. package/dist/app/commands/i18n.js.map +1 -0
  139. package/dist/app/commands/init.d.ts +38 -0
  140. package/dist/app/commands/init.d.ts.map +1 -0
  141. package/dist/app/commands/init.js +891 -0
  142. package/dist/app/commands/init.js.map +1 -0
  143. package/dist/app/commands/native.d.ts +2 -0
  144. package/dist/app/commands/native.d.ts.map +1 -0
  145. package/dist/app/commands/native.js +10 -0
  146. package/dist/app/commands/native.js.map +1 -0
  147. package/dist/app/commands/platform-select-prompt.d.ts +38 -0
  148. package/dist/app/commands/platform-select-prompt.d.ts.map +1 -0
  149. package/dist/app/commands/platform-select-prompt.js +141 -0
  150. package/dist/app/commands/platform-select-prompt.js.map +1 -0
  151. package/dist/app/commands/project-scope-selection.d.ts +13 -0
  152. package/dist/app/commands/project-scope-selection.d.ts.map +1 -0
  153. package/dist/app/commands/project-scope-selection.js +35 -0
  154. package/dist/app/commands/project-scope-selection.js.map +1 -0
  155. package/dist/app/commands/publish.d.ts +7 -0
  156. package/dist/app/commands/publish.d.ts.map +1 -0
  157. package/dist/app/commands/publish.js +14 -0
  158. package/dist/app/commands/publish.js.map +1 -0
  159. package/dist/app/commands/resume-probe.d.ts +12 -0
  160. package/dist/app/commands/resume-probe.d.ts.map +1 -0
  161. package/dist/app/commands/resume-probe.js +68 -0
  162. package/dist/app/commands/resume-probe.js.map +1 -0
  163. package/dist/app/commands/skill.d.ts +23 -0
  164. package/dist/app/commands/skill.d.ts.map +1 -0
  165. package/dist/app/commands/skill.js +208 -0
  166. package/dist/app/commands/skill.js.map +1 -0
  167. package/dist/app/commands/status.d.ts.map +1 -0
  168. package/dist/app/commands/status.js +125 -0
  169. package/dist/app/commands/status.js.map +1 -0
  170. package/dist/app/commands/uninstall.d.ts +14 -0
  171. package/dist/app/commands/uninstall.d.ts.map +1 -0
  172. package/dist/app/commands/uninstall.js +343 -0
  173. package/dist/app/commands/uninstall.js.map +1 -0
  174. package/dist/app/commands/update.d.ts +54 -0
  175. package/dist/app/commands/update.d.ts.map +1 -0
  176. package/dist/app/commands/update.js +1608 -0
  177. package/dist/app/commands/update.js.map +1 -0
  178. package/dist/app/commands/workflow.d.ts +6 -0
  179. package/dist/app/commands/workflow.d.ts.map +1 -0
  180. package/dist/app/commands/workflow.js +11 -0
  181. package/dist/app/commands/workflow.js.map +1 -0
  182. package/dist/config/repository-layout.json +124 -0
  183. package/dist/domains/bundle/authoring.d.ts +82 -0
  184. package/dist/domains/bundle/authoring.d.ts.map +1 -0
  185. package/dist/domains/bundle/authoring.js +185 -0
  186. package/dist/domains/bundle/authoring.js.map +1 -0
  187. package/dist/domains/bundle/bundle-platform.d.ts +40 -0
  188. package/dist/domains/bundle/bundle-platform.d.ts.map +1 -0
  189. package/dist/domains/bundle/bundle-platform.js +293 -0
  190. package/dist/domains/bundle/bundle-platform.js.map +1 -0
  191. package/dist/domains/bundle/candidates.d.ts +29 -0
  192. package/dist/domains/bundle/candidates.d.ts.map +1 -0
  193. package/dist/domains/bundle/candidates.js +37 -0
  194. package/dist/domains/bundle/candidates.js.map +1 -0
  195. package/dist/domains/bundle/compatibility-benchmark.d.ts +12 -0
  196. package/dist/domains/bundle/compatibility-benchmark.d.ts.map +1 -0
  197. package/dist/domains/bundle/compatibility-benchmark.js +224 -0
  198. package/dist/domains/bundle/compatibility-benchmark.js.map +1 -0
  199. package/dist/domains/bundle/compiler.d.ts +5 -0
  200. package/dist/domains/bundle/compiler.d.ts.map +1 -0
  201. package/dist/domains/bundle/compiler.js +106 -0
  202. package/dist/domains/bundle/compiler.js.map +1 -0
  203. package/dist/domains/bundle/distribute.d.ts +33 -0
  204. package/dist/domains/bundle/distribute.d.ts.map +1 -0
  205. package/dist/domains/bundle/distribute.js +166 -0
  206. package/dist/domains/bundle/distribute.js.map +1 -0
  207. package/dist/domains/bundle/draft.d.ts +19 -0
  208. package/dist/domains/bundle/draft.d.ts.map +1 -0
  209. package/dist/domains/bundle/draft.js +82 -0
  210. package/dist/domains/bundle/draft.js.map +1 -0
  211. package/dist/domains/bundle/eval-manifest-runtime.d.ts +8 -0
  212. package/dist/domains/bundle/eval-manifest-runtime.d.ts.map +1 -0
  213. package/dist/domains/bundle/eval-manifest-runtime.js +118 -0
  214. package/dist/domains/bundle/eval-manifest-runtime.js.map +1 -0
  215. package/dist/domains/bundle/eval-run-result.d.ts +22 -0
  216. package/dist/domains/bundle/eval-run-result.d.ts.map +1 -0
  217. package/dist/domains/bundle/eval-run-result.js +207 -0
  218. package/dist/domains/bundle/eval-run-result.js.map +1 -0
  219. package/dist/domains/bundle/eval.d.ts +36 -0
  220. package/dist/domains/bundle/eval.d.ts.map +1 -0
  221. package/dist/domains/bundle/eval.js +498 -0
  222. package/dist/domains/bundle/eval.js.map +1 -0
  223. package/dist/domains/bundle/factory-compose.d.ts +12 -0
  224. package/dist/domains/bundle/factory-compose.d.ts.map +1 -0
  225. package/dist/domains/bundle/factory-compose.js +309 -0
  226. package/dist/domains/bundle/factory-compose.js.map +1 -0
  227. package/dist/domains/bundle/factory-guide.d.ts +37 -0
  228. package/dist/domains/bundle/factory-guide.d.ts.map +1 -0
  229. package/dist/domains/bundle/factory-guide.js +96 -0
  230. package/dist/domains/bundle/factory-guide.js.map +1 -0
  231. package/dist/domains/bundle/factory-plan.d.ts +48 -0
  232. package/dist/domains/bundle/factory-plan.d.ts.map +1 -0
  233. package/dist/domains/bundle/factory-plan.js +172 -0
  234. package/dist/domains/bundle/factory-plan.js.map +1 -0
  235. package/dist/domains/bundle/factory-proposal.d.ts +31 -0
  236. package/dist/domains/bundle/factory-proposal.d.ts.map +1 -0
  237. package/dist/domains/bundle/factory-proposal.js +225 -0
  238. package/dist/domains/bundle/factory-proposal.js.map +1 -0
  239. package/dist/domains/bundle/factory-resolve.d.ts +11 -0
  240. package/dist/domains/bundle/factory-resolve.d.ts.map +1 -0
  241. package/dist/domains/bundle/factory-resolve.js +121 -0
  242. package/dist/domains/bundle/factory-resolve.js.map +1 -0
  243. package/dist/domains/bundle/factory.d.ts +17 -0
  244. package/dist/domains/bundle/factory.d.ts.map +1 -0
  245. package/dist/domains/bundle/factory.js +504 -0
  246. package/dist/domains/bundle/factory.js.map +1 -0
  247. package/dist/domains/bundle/hash.d.ts +3 -0
  248. package/dist/domains/bundle/hash.d.ts.map +1 -0
  249. package/dist/domains/bundle/hash.js +72 -0
  250. package/dist/domains/bundle/hash.js.map +1 -0
  251. package/dist/domains/bundle/load.d.ts +4 -0
  252. package/dist/domains/bundle/load.d.ts.map +1 -0
  253. package/dist/domains/bundle/load.js +355 -0
  254. package/dist/domains/bundle/load.js.map +1 -0
  255. package/dist/domains/bundle/next-action.d.ts +37 -0
  256. package/dist/domains/bundle/next-action.d.ts.map +1 -0
  257. package/dist/domains/bundle/next-action.js +185 -0
  258. package/dist/domains/bundle/next-action.js.map +1 -0
  259. package/dist/domains/bundle/platform.d.ts +21 -0
  260. package/dist/domains/bundle/platform.d.ts.map +1 -0
  261. package/dist/domains/bundle/platform.js +170 -0
  262. package/dist/domains/bundle/platform.js.map +1 -0
  263. package/dist/domains/bundle/preferences.d.ts +11 -0
  264. package/dist/domains/bundle/preferences.d.ts.map +1 -0
  265. package/dist/domains/bundle/preferences.js +17 -0
  266. package/dist/domains/bundle/preferences.js.map +1 -0
  267. package/dist/domains/bundle/publish.d.ts +14 -0
  268. package/dist/domains/bundle/publish.d.ts.map +1 -0
  269. package/dist/domains/bundle/publish.js +159 -0
  270. package/dist/domains/bundle/publish.js.map +1 -0
  271. package/dist/domains/bundle/readiness-user-summary.d.ts +25 -0
  272. package/dist/domains/bundle/readiness-user-summary.d.ts.map +1 -0
  273. package/dist/domains/bundle/readiness-user-summary.js +186 -0
  274. package/dist/domains/bundle/readiness-user-summary.js.map +1 -0
  275. package/dist/domains/bundle/review-summary.d.ts +36 -0
  276. package/dist/domains/bundle/review-summary.d.ts.map +1 -0
  277. package/dist/domains/bundle/review-summary.js +348 -0
  278. package/dist/domains/bundle/review-summary.js.map +1 -0
  279. package/dist/domains/bundle/state.d.ts +7 -0
  280. package/dist/domains/bundle/state.d.ts.map +1 -0
  281. package/dist/domains/bundle/state.js +247 -0
  282. package/dist/domains/bundle/state.js.map +1 -0
  283. package/dist/domains/bundle/types.d.ts +347 -0
  284. package/dist/domains/bundle/types.d.ts.map +1 -0
  285. package/dist/domains/bundle/types.js.map +1 -0
  286. package/dist/domains/bundle/user-facing.d.ts +48 -0
  287. package/dist/domains/bundle/user-facing.d.ts.map +1 -0
  288. package/dist/domains/bundle/user-facing.js +73 -0
  289. package/dist/domains/bundle/user-facing.js.map +1 -0
  290. package/dist/domains/bundle/validate.d.ts +5 -0
  291. package/dist/domains/bundle/validate.d.ts.map +1 -0
  292. package/dist/domains/bundle/validate.js +292 -0
  293. package/dist/domains/bundle/validate.js.map +1 -0
  294. package/dist/domains/comet-classic/classic-archive-entry.d.ts +2 -0
  295. package/dist/domains/comet-classic/classic-archive-entry.d.ts.map +1 -0
  296. package/dist/domains/comet-classic/classic-archive-entry.js +4 -0
  297. package/dist/domains/comet-classic/classic-archive-entry.js.map +1 -0
  298. package/dist/domains/comet-classic/classic-archive-pointer.d.ts +8 -0
  299. package/dist/domains/comet-classic/classic-archive-pointer.d.ts.map +1 -0
  300. package/dist/domains/comet-classic/classic-archive-pointer.js +66 -0
  301. package/dist/domains/comet-classic/classic-archive-pointer.js.map +1 -0
  302. package/dist/domains/comet-classic/classic-archive.d.ts +4 -0
  303. package/dist/domains/comet-classic/classic-archive.d.ts.map +1 -0
  304. package/dist/domains/comet-classic/classic-archive.js +483 -0
  305. package/dist/domains/comet-classic/classic-archive.js.map +1 -0
  306. package/dist/domains/comet-classic/classic-branch-binding.d.ts +51 -0
  307. package/dist/domains/comet-classic/classic-branch-binding.d.ts.map +1 -0
  308. package/dist/domains/comet-classic/classic-branch-binding.js +107 -0
  309. package/dist/domains/comet-classic/classic-branch-binding.js.map +1 -0
  310. package/dist/domains/comet-classic/classic-cli.d.ts +17 -0
  311. package/dist/domains/comet-classic/classic-cli.d.ts.map +1 -0
  312. package/dist/domains/comet-classic/classic-cli.js +103 -0
  313. package/dist/domains/comet-classic/classic-cli.js.map +1 -0
  314. package/dist/domains/comet-classic/classic-command-checks.d.ts +20 -0
  315. package/dist/domains/comet-classic/classic-command-checks.d.ts.map +1 -0
  316. package/dist/domains/comet-classic/classic-command-checks.js +94 -0
  317. package/dist/domains/comet-classic/classic-command-checks.js.map +1 -0
  318. package/dist/domains/comet-classic/classic-command-context.d.ts +12 -0
  319. package/dist/domains/comet-classic/classic-command-context.d.ts.map +1 -0
  320. package/dist/domains/comet-classic/classic-command-context.js +42 -0
  321. package/dist/domains/comet-classic/classic-command-context.js.map +1 -0
  322. package/dist/domains/comet-classic/classic-current-change.d.ts +17 -0
  323. package/dist/domains/comet-classic/classic-current-change.d.ts.map +1 -0
  324. package/dist/domains/comet-classic/classic-current-change.js +112 -0
  325. package/dist/domains/comet-classic/classic-current-change.js.map +1 -0
  326. package/dist/domains/comet-classic/classic-diagnostics.d.ts +17 -0
  327. package/dist/domains/comet-classic/classic-diagnostics.d.ts.map +1 -0
  328. package/dist/domains/comet-classic/classic-diagnostics.js +110 -0
  329. package/dist/domains/comet-classic/classic-diagnostics.js.map +1 -0
  330. package/dist/domains/comet-classic/classic-evidence.d.ts +11 -0
  331. package/dist/domains/comet-classic/classic-evidence.d.ts.map +1 -0
  332. package/dist/domains/comet-classic/classic-evidence.js +178 -0
  333. package/dist/domains/comet-classic/classic-evidence.js.map +1 -0
  334. package/dist/domains/comet-classic/classic-guard-entry.d.ts +2 -0
  335. package/dist/domains/comet-classic/classic-guard-entry.d.ts.map +1 -0
  336. package/dist/domains/comet-classic/classic-guard-entry.js +4 -0
  337. package/dist/domains/comet-classic/classic-guard-entry.js.map +1 -0
  338. package/dist/domains/comet-classic/classic-guard.d.ts +3 -0
  339. package/dist/domains/comet-classic/classic-guard.d.ts.map +1 -0
  340. package/dist/domains/comet-classic/classic-guard.js +854 -0
  341. package/dist/domains/comet-classic/classic-guard.js.map +1 -0
  342. package/dist/domains/comet-classic/classic-handoff-entry.d.ts +2 -0
  343. package/dist/domains/comet-classic/classic-handoff-entry.d.ts.map +1 -0
  344. package/dist/domains/comet-classic/classic-handoff-entry.js +4 -0
  345. package/dist/domains/comet-classic/classic-handoff-entry.js.map +1 -0
  346. package/dist/domains/comet-classic/classic-handoff.d.ts +3 -0
  347. package/dist/domains/comet-classic/classic-handoff.d.ts.map +1 -0
  348. package/dist/domains/comet-classic/classic-handoff.js +526 -0
  349. package/dist/domains/comet-classic/classic-handoff.js.map +1 -0
  350. package/dist/domains/comet-classic/classic-hook-guard-entry.d.ts +2 -0
  351. package/dist/domains/comet-classic/classic-hook-guard-entry.d.ts.map +1 -0
  352. package/dist/domains/comet-classic/classic-hook-guard-entry.js +4 -0
  353. package/dist/domains/comet-classic/classic-hook-guard-entry.js.map +1 -0
  354. package/dist/domains/comet-classic/classic-hook-guard.d.ts +12 -0
  355. package/dist/domains/comet-classic/classic-hook-guard.d.ts.map +1 -0
  356. package/dist/domains/comet-classic/classic-hook-guard.js +654 -0
  357. package/dist/domains/comet-classic/classic-hook-guard.js.map +1 -0
  358. package/dist/domains/comet-classic/classic-intent-command.d.ts +3 -0
  359. package/dist/domains/comet-classic/classic-intent-command.d.ts.map +1 -0
  360. package/dist/domains/comet-classic/classic-intent-command.js +40 -0
  361. package/dist/domains/comet-classic/classic-intent-command.js.map +1 -0
  362. package/dist/domains/comet-classic/classic-intent-entry.d.ts +2 -0
  363. package/dist/domains/comet-classic/classic-intent-entry.d.ts.map +1 -0
  364. package/dist/domains/comet-classic/classic-intent-entry.js +4 -0
  365. package/dist/domains/comet-classic/classic-intent-entry.js.map +1 -0
  366. package/dist/domains/comet-classic/classic-intent.d.ts +79 -0
  367. package/dist/domains/comet-classic/classic-intent.d.ts.map +1 -0
  368. package/dist/domains/comet-classic/classic-intent.js +307 -0
  369. package/dist/domains/comet-classic/classic-intent.js.map +1 -0
  370. package/dist/domains/comet-classic/classic-layout-initialization.d.ts +86 -0
  371. package/dist/domains/comet-classic/classic-layout-initialization.d.ts.map +1 -0
  372. package/dist/domains/comet-classic/classic-layout-initialization.js +813 -0
  373. package/dist/domains/comet-classic/classic-layout-initialization.js.map +1 -0
  374. package/dist/domains/comet-classic/classic-layout.d.ts +47 -0
  375. package/dist/domains/comet-classic/classic-layout.d.ts.map +1 -0
  376. package/dist/domains/comet-classic/classic-layout.js +227 -0
  377. package/dist/domains/comet-classic/classic-layout.js.map +1 -0
  378. package/dist/domains/comet-classic/classic-migrate.d.ts +22 -0
  379. package/dist/domains/comet-classic/classic-migrate.d.ts.map +1 -0
  380. package/dist/domains/comet-classic/classic-migrate.js +180 -0
  381. package/dist/domains/comet-classic/classic-migrate.js.map +1 -0
  382. package/dist/domains/comet-classic/classic-openspec-command.d.ts +4 -0
  383. package/dist/domains/comet-classic/classic-openspec-command.d.ts.map +1 -0
  384. package/dist/domains/comet-classic/classic-openspec-command.js +45 -0
  385. package/dist/domains/comet-classic/classic-openspec-command.js.map +1 -0
  386. package/dist/domains/comet-classic/classic-openspec-root.d.ts +13 -0
  387. package/dist/domains/comet-classic/classic-openspec-root.d.ts.map +1 -0
  388. package/dist/domains/comet-classic/classic-openspec-root.js +47 -0
  389. package/dist/domains/comet-classic/classic-openspec-root.js.map +1 -0
  390. package/dist/domains/comet-classic/classic-paths.d.ts +18 -0
  391. package/dist/domains/comet-classic/classic-paths.d.ts.map +1 -0
  392. package/dist/domains/comet-classic/classic-paths.js +113 -0
  393. package/dist/domains/comet-classic/classic-paths.js.map +1 -0
  394. package/dist/domains/comet-classic/classic-project-config.d.ts +16 -0
  395. package/dist/domains/comet-classic/classic-project-config.d.ts.map +1 -0
  396. package/dist/domains/comet-classic/classic-project-config.js +36 -0
  397. package/dist/domains/comet-classic/classic-project-config.js.map +1 -0
  398. package/dist/domains/comet-classic/classic-protected-path.d.ts +39 -0
  399. package/dist/domains/comet-classic/classic-protected-path.d.ts.map +1 -0
  400. package/dist/domains/comet-classic/classic-protected-path.js +69 -0
  401. package/dist/domains/comet-classic/classic-protected-path.js.map +1 -0
  402. package/dist/domains/comet-classic/classic-resolver.d.ts +10 -0
  403. package/dist/domains/comet-classic/classic-resolver.d.ts.map +1 -0
  404. package/dist/domains/comet-classic/classic-resolver.js +89 -0
  405. package/dist/domains/comet-classic/classic-resolver.js.map +1 -0
  406. package/dist/domains/comet-classic/classic-resume-probe-command.d.ts +3 -0
  407. package/dist/domains/comet-classic/classic-resume-probe-command.d.ts.map +1 -0
  408. package/dist/domains/comet-classic/classic-resume-probe-command.js +59 -0
  409. package/dist/domains/comet-classic/classic-resume-probe-command.js.map +1 -0
  410. package/dist/domains/comet-classic/classic-resume-probe-entry.d.ts +2 -0
  411. package/dist/domains/comet-classic/classic-resume-probe-entry.d.ts.map +1 -0
  412. package/dist/domains/comet-classic/classic-resume-probe-entry.js +4 -0
  413. package/dist/domains/comet-classic/classic-resume-probe-entry.js.map +1 -0
  414. package/dist/domains/comet-classic/classic-resume-probe.d.ts +29 -0
  415. package/dist/domains/comet-classic/classic-resume-probe.d.ts.map +1 -0
  416. package/dist/domains/comet-classic/classic-resume-probe.js +406 -0
  417. package/dist/domains/comet-classic/classic-resume-probe.js.map +1 -0
  418. package/dist/domains/comet-classic/classic-root-command.d.ts +5 -0
  419. package/dist/domains/comet-classic/classic-root-command.d.ts.map +1 -0
  420. package/dist/domains/comet-classic/classic-root-command.js +84 -0
  421. package/dist/domains/comet-classic/classic-root-command.js.map +1 -0
  422. package/dist/domains/comet-classic/classic-root-move.d.ts +119 -0
  423. package/dist/domains/comet-classic/classic-root-move.d.ts.map +1 -0
  424. package/dist/domains/comet-classic/classic-root-move.js +1737 -0
  425. package/dist/domains/comet-classic/classic-root-move.js.map +1 -0
  426. package/dist/domains/comet-classic/classic-runtime-evals.d.ts +9 -0
  427. package/dist/domains/comet-classic/classic-runtime-evals.d.ts.map +1 -0
  428. package/dist/domains/comet-classic/classic-runtime-evals.js +45 -0
  429. package/dist/domains/comet-classic/classic-runtime-evals.js.map +1 -0
  430. package/dist/domains/comet-classic/classic-runtime-run.d.ts +8 -0
  431. package/dist/domains/comet-classic/classic-runtime-run.d.ts.map +1 -0
  432. package/dist/domains/comet-classic/classic-runtime-run.js +378 -0
  433. package/dist/domains/comet-classic/classic-runtime-run.js.map +1 -0
  434. package/dist/domains/comet-classic/classic-script-entry.d.ts +3 -0
  435. package/dist/domains/comet-classic/classic-script-entry.d.ts.map +1 -0
  436. package/dist/domains/comet-classic/classic-script-entry.js +31 -0
  437. package/dist/domains/comet-classic/classic-script-entry.js.map +1 -0
  438. package/dist/domains/comet-classic/classic-state-command.d.ts +3 -0
  439. package/dist/domains/comet-classic/classic-state-command.d.ts.map +1 -0
  440. package/dist/domains/comet-classic/classic-state-command.js +1239 -0
  441. package/dist/domains/comet-classic/classic-state-command.js.map +1 -0
  442. package/dist/domains/comet-classic/classic-state-entry.d.ts +2 -0
  443. package/dist/domains/comet-classic/classic-state-entry.d.ts.map +1 -0
  444. package/dist/domains/comet-classic/classic-state-entry.js +4 -0
  445. package/dist/domains/comet-classic/classic-state-entry.js.map +1 -0
  446. package/dist/domains/comet-classic/classic-state-events.d.ts +18 -0
  447. package/dist/domains/comet-classic/classic-state-events.d.ts.map +1 -0
  448. package/dist/domains/comet-classic/classic-state-events.js +14 -0
  449. package/dist/domains/comet-classic/classic-state-events.js.map +1 -0
  450. package/dist/domains/comet-classic/classic-state.d.ts +71 -0
  451. package/dist/domains/comet-classic/classic-state.d.ts.map +1 -0
  452. package/dist/domains/comet-classic/classic-state.js +251 -0
  453. package/dist/domains/comet-classic/classic-state.js.map +1 -0
  454. package/dist/domains/comet-classic/classic-store.d.ts +12 -0
  455. package/dist/domains/comet-classic/classic-store.d.ts.map +1 -0
  456. package/dist/domains/comet-classic/classic-store.js +140 -0
  457. package/dist/domains/comet-classic/classic-store.js.map +1 -0
  458. package/dist/domains/comet-classic/classic-transitions.d.ts +24 -0
  459. package/dist/domains/comet-classic/classic-transitions.d.ts.map +1 -0
  460. package/dist/domains/comet-classic/classic-transitions.js +158 -0
  461. package/dist/domains/comet-classic/classic-transitions.js.map +1 -0
  462. package/dist/domains/comet-classic/classic-validate-command.d.ts +3 -0
  463. package/dist/domains/comet-classic/classic-validate-command.d.ts.map +1 -0
  464. package/dist/domains/comet-classic/classic-validate-command.js +174 -0
  465. package/dist/domains/comet-classic/classic-validate-command.js.map +1 -0
  466. package/dist/domains/comet-classic/classic-validate-entry.d.ts +2 -0
  467. package/dist/domains/comet-classic/classic-validate-entry.d.ts.map +1 -0
  468. package/dist/domains/comet-classic/classic-validate-entry.js +4 -0
  469. package/dist/domains/comet-classic/classic-validate-entry.js.map +1 -0
  470. package/dist/domains/comet-classic/index.d.ts +23 -0
  471. package/dist/domains/comet-classic/index.d.ts.map +1 -0
  472. package/dist/domains/comet-classic/index.js +23 -0
  473. package/dist/domains/comet-classic/index.js.map +1 -0
  474. package/dist/domains/comet-entry/current-selection-repair.d.ts +17 -0
  475. package/dist/domains/comet-entry/current-selection-repair.d.ts.map +1 -0
  476. package/dist/domains/comet-entry/current-selection-repair.js +19 -0
  477. package/dist/domains/comet-entry/current-selection-repair.js.map +1 -0
  478. package/dist/domains/comet-entry/current-selection.d.ts +28 -0
  479. package/dist/domains/comet-entry/current-selection.d.ts.map +1 -0
  480. package/dist/domains/comet-entry/current-selection.js +114 -0
  481. package/dist/domains/comet-entry/current-selection.js.map +1 -0
  482. package/dist/domains/comet-entry/entry-runtime-entry.d.ts +2 -0
  483. package/dist/domains/comet-entry/entry-runtime-entry.d.ts.map +1 -0
  484. package/dist/domains/comet-entry/entry-runtime-entry.js +3 -0
  485. package/dist/domains/comet-entry/entry-runtime-entry.js.map +1 -0
  486. package/dist/domains/comet-entry/entry-runtime.d.ts +7 -0
  487. package/dist/domains/comet-entry/entry-runtime.d.ts.map +1 -0
  488. package/dist/domains/comet-entry/entry-runtime.js +55 -0
  489. package/dist/domains/comet-entry/entry-runtime.js.map +1 -0
  490. package/dist/domains/comet-entry/hook-adapter.d.ts +6 -0
  491. package/dist/domains/comet-entry/hook-adapter.d.ts.map +1 -0
  492. package/dist/domains/comet-entry/hook-adapter.js +202 -0
  493. package/dist/domains/comet-entry/hook-adapter.js.map +1 -0
  494. package/dist/domains/comet-entry/hook-router-entry.d.ts +8 -0
  495. package/dist/domains/comet-entry/hook-router-entry.d.ts.map +1 -0
  496. package/dist/domains/comet-entry/hook-router-entry.js +88 -0
  497. package/dist/domains/comet-entry/hook-router-entry.js.map +1 -0
  498. package/dist/domains/comet-entry/hook-router.d.ts +32 -0
  499. package/dist/domains/comet-entry/hook-router.d.ts.map +1 -0
  500. package/dist/domains/comet-entry/hook-router.js +133 -0
  501. package/dist/domains/comet-entry/hook-router.js.map +1 -0
  502. package/dist/domains/comet-entry/hook-types.d.ts +20 -0
  503. package/dist/domains/comet-entry/hook-types.d.ts.map +1 -0
  504. package/dist/domains/comet-entry/hook-types.js +2 -0
  505. package/dist/domains/comet-entry/hook-types.js.map +1 -0
  506. package/dist/domains/comet-entry/init-workflow.d.ts +19 -0
  507. package/dist/domains/comet-entry/init-workflow.d.ts.map +1 -0
  508. package/dist/domains/comet-entry/init-workflow.js +118 -0
  509. package/dist/domains/comet-entry/init-workflow.js.map +1 -0
  510. package/dist/domains/comet-entry/project-status.d.ts +3 -0
  511. package/dist/domains/comet-entry/project-status.d.ts.map +1 -0
  512. package/dist/domains/comet-entry/project-status.js +291 -0
  513. package/dist/domains/comet-entry/project-status.js.map +1 -0
  514. package/dist/domains/comet-entry/resolve-entry.d.ts +3 -0
  515. package/dist/domains/comet-entry/resolve-entry.d.ts.map +1 -0
  516. package/dist/domains/comet-entry/resolve-entry.js +18 -0
  517. package/dist/domains/comet-entry/resolve-entry.js.map +1 -0
  518. package/dist/domains/comet-entry/resume-probe.d.ts +34 -0
  519. package/dist/domains/comet-entry/resume-probe.d.ts.map +1 -0
  520. package/dist/domains/comet-entry/resume-probe.js +462 -0
  521. package/dist/domains/comet-entry/resume-probe.js.map +1 -0
  522. package/dist/domains/comet-entry/types.d.ts +60 -0
  523. package/dist/domains/comet-entry/types.d.ts.map +1 -0
  524. package/dist/domains/comet-entry/types.js +2 -0
  525. package/dist/domains/comet-entry/types.js.map +1 -0
  526. package/dist/domains/comet-entry/workflow-resolution.d.ts +8 -0
  527. package/dist/domains/comet-entry/workflow-resolution.d.ts.map +1 -0
  528. package/dist/domains/comet-entry/workflow-resolution.js +16 -0
  529. package/dist/domains/comet-entry/workflow-resolution.js.map +1 -0
  530. package/dist/domains/comet-native/index.d.ts +35 -0
  531. package/dist/domains/comet-native/index.d.ts.map +1 -0
  532. package/dist/domains/comet-native/index.js +35 -0
  533. package/dist/domains/comet-native/index.js.map +1 -0
  534. package/dist/domains/comet-native/native-acceptance.d.ts +53 -0
  535. package/dist/domains/comet-native/native-acceptance.d.ts.map +1 -0
  536. package/dist/domains/comet-native/native-acceptance.js +658 -0
  537. package/dist/domains/comet-native/native-acceptance.js.map +1 -0
  538. package/dist/domains/comet-native/native-archive-content.d.ts +26 -0
  539. package/dist/domains/comet-native/native-archive-content.d.ts.map +1 -0
  540. package/dist/domains/comet-native/native-archive-content.js +159 -0
  541. package/dist/domains/comet-native/native-archive-content.js.map +1 -0
  542. package/dist/domains/comet-native/native-archive-inspection.d.ts +9 -0
  543. package/dist/domains/comet-native/native-archive-inspection.d.ts.map +1 -0
  544. package/dist/domains/comet-native/native-archive-inspection.js +97 -0
  545. package/dist/domains/comet-native/native-archive-inspection.js.map +1 -0
  546. package/dist/domains/comet-native/native-archive-preflight.d.ts +54 -0
  547. package/dist/domains/comet-native/native-archive-preflight.d.ts.map +1 -0
  548. package/dist/domains/comet-native/native-archive-preflight.js +222 -0
  549. package/dist/domains/comet-native/native-archive-preflight.js.map +1 -0
  550. package/dist/domains/comet-native/native-archive-transaction.d.ts +20 -0
  551. package/dist/domains/comet-native/native-archive-transaction.d.ts.map +1 -0
  552. package/dist/domains/comet-native/native-archive-transaction.js +1183 -0
  553. package/dist/domains/comet-native/native-archive-transaction.js.map +1 -0
  554. package/dist/domains/comet-native/native-archive.d.ts +36 -0
  555. package/dist/domains/comet-native/native-archive.d.ts.map +1 -0
  556. package/dist/domains/comet-native/native-archive.js +422 -0
  557. package/dist/domains/comet-native/native-archive.js.map +1 -0
  558. package/dist/domains/comet-native/native-artifacts.d.ts +10 -0
  559. package/dist/domains/comet-native/native-artifacts.d.ts.map +1 -0
  560. package/dist/domains/comet-native/native-artifacts.js +204 -0
  561. package/dist/domains/comet-native/native-artifacts.js.map +1 -0
  562. package/dist/domains/comet-native/native-atomic-file.d.ts +10 -0
  563. package/dist/domains/comet-native/native-atomic-file.d.ts.map +1 -0
  564. package/dist/domains/comet-native/native-atomic-file.js +179 -0
  565. package/dist/domains/comet-native/native-atomic-file.js.map +1 -0
  566. package/dist/domains/comet-native/native-bounded-file.d.ts +19 -0
  567. package/dist/domains/comet-native/native-bounded-file.d.ts.map +1 -0
  568. package/dist/domains/comet-native/native-bounded-file.js +184 -0
  569. package/dist/domains/comet-native/native-bounded-file.js.map +1 -0
  570. package/dist/domains/comet-native/native-build-evidence.d.ts +42 -0
  571. package/dist/domains/comet-native/native-build-evidence.d.ts.map +1 -0
  572. package/dist/domains/comet-native/native-build-evidence.js +257 -0
  573. package/dist/domains/comet-native/native-build-evidence.js.map +1 -0
  574. package/dist/domains/comet-native/native-canonical-hash.d.ts +10 -0
  575. package/dist/domains/comet-native/native-canonical-hash.d.ts.map +1 -0
  576. package/dist/domains/comet-native/native-canonical-hash.js +100 -0
  577. package/dist/domains/comet-native/native-canonical-hash.js.map +1 -0
  578. package/dist/domains/comet-native/native-change-recovery.d.ts +11 -0
  579. package/dist/domains/comet-native/native-change-recovery.d.ts.map +1 -0
  580. package/dist/domains/comet-native/native-change-recovery.js +15 -0
  581. package/dist/domains/comet-native/native-change-recovery.js.map +1 -0
  582. package/dist/domains/comet-native/native-change.d.ts +66 -0
  583. package/dist/domains/comet-native/native-change.d.ts.map +1 -0
  584. package/dist/domains/comet-native/native-change.js +834 -0
  585. package/dist/domains/comet-native/native-change.js.map +1 -0
  586. package/dist/domains/comet-native/native-check-receipt-model.d.ts +63 -0
  587. package/dist/domains/comet-native/native-check-receipt-model.d.ts.map +1 -0
  588. package/dist/domains/comet-native/native-check-receipt-model.js +352 -0
  589. package/dist/domains/comet-native/native-check-receipt-model.js.map +1 -0
  590. package/dist/domains/comet-native/native-check-receipt-storage.d.ts +10 -0
  591. package/dist/domains/comet-native/native-check-receipt-storage.d.ts.map +1 -0
  592. package/dist/domains/comet-native/native-check-receipt-storage.js +200 -0
  593. package/dist/domains/comet-native/native-check-receipt-storage.js.map +1 -0
  594. package/dist/domains/comet-native/native-check-receipt.d.ts +19 -0
  595. package/dist/domains/comet-native/native-check-receipt.d.ts.map +1 -0
  596. package/dist/domains/comet-native/native-check-receipt.js +453 -0
  597. package/dist/domains/comet-native/native-check-receipt.js.map +1 -0
  598. package/dist/domains/comet-native/native-check.d.ts +24 -0
  599. package/dist/domains/comet-native/native-check.d.ts.map +1 -0
  600. package/dist/domains/comet-native/native-check.js +38 -0
  601. package/dist/domains/comet-native/native-check.js.map +1 -0
  602. package/dist/domains/comet-native/native-checkpoint-journal.d.ts +13 -0
  603. package/dist/domains/comet-native/native-checkpoint-journal.d.ts.map +1 -0
  604. package/dist/domains/comet-native/native-checkpoint-journal.js +53 -0
  605. package/dist/domains/comet-native/native-checkpoint-journal.js.map +1 -0
  606. package/dist/domains/comet-native/native-checkpoint-storage.d.ts +43 -0
  607. package/dist/domains/comet-native/native-checkpoint-storage.d.ts.map +1 -0
  608. package/dist/domains/comet-native/native-checkpoint-storage.js +487 -0
  609. package/dist/domains/comet-native/native-checkpoint-storage.js.map +1 -0
  610. package/dist/domains/comet-native/native-cli-entry.d.ts +2 -0
  611. package/dist/domains/comet-native/native-cli-entry.d.ts.map +1 -0
  612. package/dist/domains/comet-native/native-cli-entry.js +18 -0
  613. package/dist/domains/comet-native/native-cli-entry.js.map +1 -0
  614. package/dist/domains/comet-native/native-cli.d.ts +7 -0
  615. package/dist/domains/comet-native/native-cli.d.ts.map +1 -0
  616. package/dist/domains/comet-native/native-cli.js +1300 -0
  617. package/dist/domains/comet-native/native-cli.js.map +1 -0
  618. package/dist/domains/comet-native/native-config.d.ts +23 -0
  619. package/dist/domains/comet-native/native-config.d.ts.map +1 -0
  620. package/dist/domains/comet-native/native-config.js +60 -0
  621. package/dist/domains/comet-native/native-config.js.map +1 -0
  622. package/dist/domains/comet-native/native-conflict-inspection.d.ts +17 -0
  623. package/dist/domains/comet-native/native-conflict-inspection.d.ts.map +1 -0
  624. package/dist/domains/comet-native/native-conflict-inspection.js +90 -0
  625. package/dist/domains/comet-native/native-conflict-inspection.js.map +1 -0
  626. package/dist/domains/comet-native/native-conflict-radar.d.ts +75 -0
  627. package/dist/domains/comet-native/native-conflict-radar.d.ts.map +1 -0
  628. package/dist/domains/comet-native/native-conflict-radar.js +326 -0
  629. package/dist/domains/comet-native/native-conflict-radar.js.map +1 -0
  630. package/dist/domains/comet-native/native-continuation.d.ts +12 -0
  631. package/dist/domains/comet-native/native-continuation.d.ts.map +1 -0
  632. package/dist/domains/comet-native/native-continuation.js +201 -0
  633. package/dist/domains/comet-native/native-continuation.js.map +1 -0
  634. package/dist/domains/comet-native/native-contract-files.d.ts +24 -0
  635. package/dist/domains/comet-native/native-contract-files.d.ts.map +1 -0
  636. package/dist/domains/comet-native/native-contract-files.js +66 -0
  637. package/dist/domains/comet-native/native-contract-files.js.map +1 -0
  638. package/dist/domains/comet-native/native-contract.d.ts +41 -0
  639. package/dist/domains/comet-native/native-contract.d.ts.map +1 -0
  640. package/dist/domains/comet-native/native-contract.js +142 -0
  641. package/dist/domains/comet-native/native-contract.js.map +1 -0
  642. package/dist/domains/comet-native/native-controller-trust.d.ts +22 -0
  643. package/dist/domains/comet-native/native-controller-trust.d.ts.map +1 -0
  644. package/dist/domains/comet-native/native-controller-trust.js +153 -0
  645. package/dist/domains/comet-native/native-controller-trust.js.map +1 -0
  646. package/dist/domains/comet-native/native-creation-authorization.d.ts +30 -0
  647. package/dist/domains/comet-native/native-creation-authorization.d.ts.map +1 -0
  648. package/dist/domains/comet-native/native-creation-authorization.js +110 -0
  649. package/dist/domains/comet-native/native-creation-authorization.js.map +1 -0
  650. package/dist/domains/comet-native/native-diagnostics.d.ts +25 -0
  651. package/dist/domains/comet-native/native-diagnostics.d.ts.map +1 -0
  652. package/dist/domains/comet-native/native-diagnostics.js +551 -0
  653. package/dist/domains/comet-native/native-diagnostics.js.map +1 -0
  654. package/dist/domains/comet-native/native-doctor.d.ts +12 -0
  655. package/dist/domains/comet-native/native-doctor.d.ts.map +1 -0
  656. package/dist/domains/comet-native/native-doctor.js +771 -0
  657. package/dist/domains/comet-native/native-doctor.js.map +1 -0
  658. package/dist/domains/comet-native/native-evidence-retention.d.ts +37 -0
  659. package/dist/domains/comet-native/native-evidence-retention.d.ts.map +1 -0
  660. package/dist/domains/comet-native/native-evidence-retention.js +916 -0
  661. package/dist/domains/comet-native/native-evidence-retention.js.map +1 -0
  662. package/dist/domains/comet-native/native-evidence-storage.d.ts +54 -0
  663. package/dist/domains/comet-native/native-evidence-storage.d.ts.map +1 -0
  664. package/dist/domains/comet-native/native-evidence-storage.js +401 -0
  665. package/dist/domains/comet-native/native-evidence-storage.js.map +1 -0
  666. package/dist/domains/comet-native/native-file-identity.d.ts +3 -0
  667. package/dist/domains/comet-native/native-file-identity.d.ts.map +1 -0
  668. package/dist/domains/comet-native/native-file-identity.js +2 -0
  669. package/dist/domains/comet-native/native-file-identity.js.map +1 -0
  670. package/dist/domains/comet-native/native-findings.d.ts +8 -0
  671. package/dist/domains/comet-native/native-findings.d.ts.map +1 -0
  672. package/dist/domains/comet-native/native-findings.js +254 -0
  673. package/dist/domains/comet-native/native-findings.js.map +1 -0
  674. package/dist/domains/comet-native/native-guards.d.ts +8 -0
  675. package/dist/domains/comet-native/native-guards.d.ts.map +1 -0
  676. package/dist/domains/comet-native/native-guards.js +140 -0
  677. package/dist/domains/comet-native/native-guards.js.map +1 -0
  678. package/dist/domains/comet-native/native-hash.d.ts +3 -0
  679. package/dist/domains/comet-native/native-hash.d.ts.map +1 -0
  680. package/dist/domains/comet-native/native-hash.js +12 -0
  681. package/dist/domains/comet-native/native-hash.js.map +1 -0
  682. package/dist/domains/comet-native/native-hook-guard.d.ts +17 -0
  683. package/dist/domains/comet-native/native-hook-guard.d.ts.map +1 -0
  684. package/dist/domains/comet-native/native-hook-guard.js +154 -0
  685. package/dist/domains/comet-native/native-hook-guard.js.map +1 -0
  686. package/dist/domains/comet-native/native-independent-review.d.ts +28 -0
  687. package/dist/domains/comet-native/native-independent-review.d.ts.map +1 -0
  688. package/dist/domains/comet-native/native-independent-review.js +134 -0
  689. package/dist/domains/comet-native/native-independent-review.js.map +1 -0
  690. package/dist/domains/comet-native/native-lock.d.ts +47 -0
  691. package/dist/domains/comet-native/native-lock.d.ts.map +1 -0
  692. package/dist/domains/comet-native/native-lock.js +390 -0
  693. package/dist/domains/comet-native/native-lock.js.map +1 -0
  694. package/dist/domains/comet-native/native-mutation-lock.d.ts +5 -0
  695. package/dist/domains/comet-native/native-mutation-lock.d.ts.map +1 -0
  696. package/dist/domains/comet-native/native-mutation-lock.js +66 -0
  697. package/dist/domains/comet-native/native-mutation-lock.js.map +1 -0
  698. package/dist/domains/comet-native/native-paths.d.ts +10 -0
  699. package/dist/domains/comet-native/native-paths.d.ts.map +1 -0
  700. package/dist/domains/comet-native/native-paths.js +160 -0
  701. package/dist/domains/comet-native/native-paths.js.map +1 -0
  702. package/dist/domains/comet-native/native-progress-checkpoint.d.ts +13 -0
  703. package/dist/domains/comet-native/native-progress-checkpoint.d.ts.map +1 -0
  704. package/dist/domains/comet-native/native-progress-checkpoint.js +104 -0
  705. package/dist/domains/comet-native/native-progress-checkpoint.js.map +1 -0
  706. package/dist/domains/comet-native/native-protected-file.d.ts +113 -0
  707. package/dist/domains/comet-native/native-protected-file.d.ts.map +1 -0
  708. package/dist/domains/comet-native/native-protected-file.js +510 -0
  709. package/dist/domains/comet-native/native-protected-file.js.map +1 -0
  710. package/dist/domains/comet-native/native-redaction.d.ts +2 -0
  711. package/dist/domains/comet-native/native-redaction.d.ts.map +1 -0
  712. package/dist/domains/comet-native/native-redaction.js +18 -0
  713. package/dist/domains/comet-native/native-redaction.js.map +1 -0
  714. package/dist/domains/comet-native/native-repair-integration.d.ts +46 -0
  715. package/dist/domains/comet-native/native-repair-integration.d.ts.map +1 -0
  716. package/dist/domains/comet-native/native-repair-integration.js +235 -0
  717. package/dist/domains/comet-native/native-repair-integration.js.map +1 -0
  718. package/dist/domains/comet-native/native-repair-runtime.d.ts +78 -0
  719. package/dist/domains/comet-native/native-repair-runtime.d.ts.map +1 -0
  720. package/dist/domains/comet-native/native-repair-runtime.js +593 -0
  721. package/dist/domains/comet-native/native-repair-runtime.js.map +1 -0
  722. package/dist/domains/comet-native/native-repair-stagnation.d.ts +89 -0
  723. package/dist/domains/comet-native/native-repair-stagnation.d.ts.map +1 -0
  724. package/dist/domains/comet-native/native-repair-stagnation.js +308 -0
  725. package/dist/domains/comet-native/native-repair-stagnation.js.map +1 -0
  726. package/dist/domains/comet-native/native-resume-view.d.ts +14 -0
  727. package/dist/domains/comet-native/native-resume-view.d.ts.map +1 -0
  728. package/dist/domains/comet-native/native-resume-view.js +105 -0
  729. package/dist/domains/comet-native/native-resume-view.js.map +1 -0
  730. package/dist/domains/comet-native/native-review-contract.d.ts +6 -0
  731. package/dist/domains/comet-native/native-review-contract.d.ts.map +1 -0
  732. package/dist/domains/comet-native/native-review-contract.js +6 -0
  733. package/dist/domains/comet-native/native-review-contract.js.map +1 -0
  734. package/dist/domains/comet-native/native-review-identity.d.ts +50 -0
  735. package/dist/domains/comet-native/native-review-identity.d.ts.map +1 -0
  736. package/dist/domains/comet-native/native-review-identity.js +209 -0
  737. package/dist/domains/comet-native/native-review-identity.js.map +1 -0
  738. package/dist/domains/comet-native/native-review-signer.d.ts +24 -0
  739. package/dist/domains/comet-native/native-review-signer.d.ts.map +1 -0
  740. package/dist/domains/comet-native/native-review-signer.js +125 -0
  741. package/dist/domains/comet-native/native-review-signer.js.map +1 -0
  742. package/dist/domains/comet-native/native-review-trust.d.ts +35 -0
  743. package/dist/domains/comet-native/native-review-trust.d.ts.map +1 -0
  744. package/dist/domains/comet-native/native-review-trust.js +176 -0
  745. package/dist/domains/comet-native/native-review-trust.js.map +1 -0
  746. package/dist/domains/comet-native/native-revision.d.ts +20 -0
  747. package/dist/domains/comet-native/native-revision.d.ts.map +1 -0
  748. package/dist/domains/comet-native/native-revision.js +32 -0
  749. package/dist/domains/comet-native/native-revision.js.map +1 -0
  750. package/dist/domains/comet-native/native-root-move.d.ts +20 -0
  751. package/dist/domains/comet-native/native-root-move.d.ts.map +1 -0
  752. package/dist/domains/comet-native/native-root-move.js +818 -0
  753. package/dist/domains/comet-native/native-root-move.js.map +1 -0
  754. package/dist/domains/comet-native/native-run-consistency.d.ts +3 -0
  755. package/dist/domains/comet-native/native-run-consistency.d.ts.map +1 -0
  756. package/dist/domains/comet-native/native-run-consistency.js +136 -0
  757. package/dist/domains/comet-native/native-run-consistency.js.map +1 -0
  758. package/dist/domains/comet-native/native-run-store.d.ts +41 -0
  759. package/dist/domains/comet-native/native-run-store.d.ts.map +1 -0
  760. package/dist/domains/comet-native/native-run-store.js +452 -0
  761. package/dist/domains/comet-native/native-run-store.js.map +1 -0
  762. package/dist/domains/comet-native/native-runtime-package.d.ts +16 -0
  763. package/dist/domains/comet-native/native-runtime-package.d.ts.map +1 -0
  764. package/dist/domains/comet-native/native-runtime-package.js +72 -0
  765. package/dist/domains/comet-native/native-runtime-package.js.map +1 -0
  766. package/dist/domains/comet-native/native-schema-migration.d.ts +11 -0
  767. package/dist/domains/comet-native/native-schema-migration.d.ts.map +1 -0
  768. package/dist/domains/comet-native/native-schema-migration.js +900 -0
  769. package/dist/domains/comet-native/native-schema-migration.js.map +1 -0
  770. package/dist/domains/comet-native/native-selection.d.ts +12 -0
  771. package/dist/domains/comet-native/native-selection.d.ts.map +1 -0
  772. package/dist/domains/comet-native/native-selection.js +52 -0
  773. package/dist/domains/comet-native/native-selection.js.map +1 -0
  774. package/dist/domains/comet-native/native-sensitive-paths.d.ts +7 -0
  775. package/dist/domains/comet-native/native-sensitive-paths.d.ts.map +1 -0
  776. package/dist/domains/comet-native/native-sensitive-paths.js +69 -0
  777. package/dist/domains/comet-native/native-sensitive-paths.js.map +1 -0
  778. package/dist/domains/comet-native/native-snapshot.d.ts +78 -0
  779. package/dist/domains/comet-native/native-snapshot.d.ts.map +1 -0
  780. package/dist/domains/comet-native/native-snapshot.js +2609 -0
  781. package/dist/domains/comet-native/native-snapshot.js.map +1 -0
  782. package/dist/domains/comet-native/native-specs.d.ts +12 -0
  783. package/dist/domains/comet-native/native-specs.d.ts.map +1 -0
  784. package/dist/domains/comet-native/native-specs.js +270 -0
  785. package/dist/domains/comet-native/native-specs.js.map +1 -0
  786. package/dist/domains/comet-native/native-trajectory-limits.d.ts +7 -0
  787. package/dist/domains/comet-native/native-trajectory-limits.d.ts.map +1 -0
  788. package/dist/domains/comet-native/native-trajectory-limits.js +13 -0
  789. package/dist/domains/comet-native/native-trajectory-limits.js.map +1 -0
  790. package/dist/domains/comet-native/native-trajectory-recovery.d.ts +37 -0
  791. package/dist/domains/comet-native/native-trajectory-recovery.d.ts.map +1 -0
  792. package/dist/domains/comet-native/native-trajectory-recovery.js +133 -0
  793. package/dist/domains/comet-native/native-trajectory-recovery.js.map +1 -0
  794. package/dist/domains/comet-native/native-trajectory.d.ts +16 -0
  795. package/dist/domains/comet-native/native-trajectory.d.ts.map +1 -0
  796. package/dist/domains/comet-native/native-trajectory.js +27 -0
  797. package/dist/domains/comet-native/native-trajectory.js.map +1 -0
  798. package/dist/domains/comet-native/native-transaction.d.ts +45 -0
  799. package/dist/domains/comet-native/native-transaction.d.ts.map +1 -0
  800. package/dist/domains/comet-native/native-transaction.js +846 -0
  801. package/dist/domains/comet-native/native-transaction.js.map +1 -0
  802. package/dist/domains/comet-native/native-transition-evidence.d.ts +4 -0
  803. package/dist/domains/comet-native/native-transition-evidence.d.ts.map +1 -0
  804. package/dist/domains/comet-native/native-transition-evidence.js +27 -0
  805. package/dist/domains/comet-native/native-transition-evidence.js.map +1 -0
  806. package/dist/domains/comet-native/native-transition-journal.d.ts +30 -0
  807. package/dist/domains/comet-native/native-transition-journal.d.ts.map +1 -0
  808. package/dist/domains/comet-native/native-transition-journal.js +819 -0
  809. package/dist/domains/comet-native/native-transition-journal.js.map +1 -0
  810. package/dist/domains/comet-native/native-transitions.d.ts +15 -0
  811. package/dist/domains/comet-native/native-transitions.d.ts.map +1 -0
  812. package/dist/domains/comet-native/native-transitions.js +683 -0
  813. package/dist/domains/comet-native/native-transitions.js.map +1 -0
  814. package/dist/domains/comet-native/native-types.d.ts +556 -0
  815. package/dist/domains/comet-native/native-types.d.ts.map +1 -0
  816. package/dist/domains/comet-native/native-types.js +8 -0
  817. package/dist/domains/comet-native/native-types.js.map +1 -0
  818. package/dist/domains/comet-native/native-verification-evidence.d.ts +136 -0
  819. package/dist/domains/comet-native/native-verification-evidence.d.ts.map +1 -0
  820. package/dist/domains/comet-native/native-verification-evidence.js +824 -0
  821. package/dist/domains/comet-native/native-verification-evidence.js.map +1 -0
  822. package/dist/domains/comet-native/native-verification-receipt-runtime.d.ts +188 -0
  823. package/dist/domains/comet-native/native-verification-receipt-runtime.d.ts.map +1 -0
  824. package/dist/domains/comet-native/native-verification-receipt-runtime.js +1129 -0
  825. package/dist/domains/comet-native/native-verification-receipt-runtime.js.map +1 -0
  826. package/dist/domains/comet-native/native-verification-receipt.d.ts +165 -0
  827. package/dist/domains/comet-native/native-verification-receipt.d.ts.map +1 -0
  828. package/dist/domains/comet-native/native-verification-receipt.js +636 -0
  829. package/dist/domains/comet-native/native-verification-receipt.js.map +1 -0
  830. package/dist/domains/comet-native/native-verification-runtime.d.ts +61 -0
  831. package/dist/domains/comet-native/native-verification-runtime.d.ts.map +1 -0
  832. package/dist/domains/comet-native/native-verification-runtime.js +609 -0
  833. package/dist/domains/comet-native/native-verification-runtime.js.map +1 -0
  834. package/dist/domains/comet-native/native-verification-scope.d.ts +118 -0
  835. package/dist/domains/comet-native/native-verification-scope.d.ts.map +1 -0
  836. package/dist/domains/comet-native/native-verification-scope.js +1045 -0
  837. package/dist/domains/comet-native/native-verification-scope.js.map +1 -0
  838. package/dist/domains/comet-native/native-workspace.d.ts +46 -0
  839. package/dist/domains/comet-native/native-workspace.d.ts.map +1 -0
  840. package/dist/domains/comet-native/native-workspace.js +276 -0
  841. package/dist/domains/comet-native/native-workspace.js.map +1 -0
  842. package/dist/domains/dashboard/collector.d.ts +12 -0
  843. package/dist/domains/dashboard/collector.d.ts.map +1 -0
  844. package/dist/domains/dashboard/collector.js +582 -0
  845. package/dist/domains/dashboard/collector.js.map +1 -0
  846. package/dist/domains/dashboard/git.d.ts +8 -0
  847. package/dist/domains/dashboard/git.d.ts.map +1 -0
  848. package/dist/domains/dashboard/git.js +69 -0
  849. package/dist/domains/dashboard/git.js.map +1 -0
  850. package/dist/domains/dashboard/native-adapter.d.ts +157 -0
  851. package/dist/domains/dashboard/native-adapter.d.ts.map +1 -0
  852. package/dist/domains/dashboard/native-adapter.js +302 -0
  853. package/dist/domains/dashboard/native-adapter.js.map +1 -0
  854. package/dist/domains/dashboard/native-collector.d.ts +6 -0
  855. package/dist/domains/dashboard/native-collector.d.ts.map +1 -0
  856. package/dist/domains/dashboard/native-collector.js +289 -0
  857. package/dist/domains/dashboard/native-collector.js.map +1 -0
  858. package/dist/domains/dashboard/next-action.d.ts +17 -0
  859. package/dist/domains/dashboard/next-action.d.ts.map +1 -0
  860. package/dist/domains/dashboard/next-action.js +83 -0
  861. package/dist/domains/dashboard/next-action.js.map +1 -0
  862. package/dist/domains/dashboard/open-browser.d.ts +9 -0
  863. package/dist/domains/dashboard/open-browser.d.ts.map +1 -0
  864. package/dist/domains/dashboard/open-browser.js +40 -0
  865. package/dist/domains/dashboard/open-browser.js.map +1 -0
  866. package/dist/domains/dashboard/risk.d.ts +24 -0
  867. package/dist/domains/dashboard/risk.d.ts.map +1 -0
  868. package/dist/domains/dashboard/risk.js +97 -0
  869. package/dist/domains/dashboard/risk.js.map +1 -0
  870. package/dist/domains/dashboard/server.d.ts +21 -0
  871. package/dist/domains/dashboard/server.d.ts.map +1 -0
  872. package/dist/domains/dashboard/server.js +149 -0
  873. package/dist/domains/dashboard/server.js.map +1 -0
  874. package/dist/domains/dashboard/task-parser.d.ts +13 -0
  875. package/dist/domains/dashboard/task-parser.d.ts.map +1 -0
  876. package/dist/domains/dashboard/task-parser.js +82 -0
  877. package/dist/domains/dashboard/task-parser.js.map +1 -0
  878. package/dist/domains/dashboard/types.d.ts +132 -0
  879. package/dist/domains/dashboard/types.d.ts.map +1 -0
  880. package/dist/domains/dashboard/types.js +10 -0
  881. package/dist/domains/dashboard/types.js.map +1 -0
  882. package/dist/domains/dashboard/verify-parser.d.ts +18 -0
  883. package/dist/domains/dashboard/verify-parser.d.ts.map +1 -0
  884. package/dist/domains/dashboard/verify-parser.js +100 -0
  885. package/dist/domains/dashboard/verify-parser.js.map +1 -0
  886. package/dist/domains/dashboard/web/assets/_commonjsHelpers-CqkleIqs.js +1 -0
  887. package/dist/domains/dashboard/web/assets/arc-BXWNV2Qv.js +1 -0
  888. package/dist/domains/dashboard/web/assets/architectureDiagram-3BPJPVTR-CjVHPivo.js +36 -0
  889. package/dist/domains/dashboard/web/assets/blockDiagram-GPEHLZMM-P2PGImSM.js +132 -0
  890. package/dist/domains/dashboard/web/assets/c4Diagram-AAUBKEIU-fTj6Xhs1.js +10 -0
  891. package/dist/domains/dashboard/web/assets/channel--JtnhJr8.js +1 -0
  892. package/dist/domains/dashboard/web/assets/chunk-2J33WTMH-BjFDZ5yo.js +1 -0
  893. package/dist/domains/dashboard/web/assets/chunk-4BX2VUAB-BAUkbZdT.js +1 -0
  894. package/dist/domains/dashboard/web/assets/chunk-55IACEB6-DBmuiYme.js +1 -0
  895. package/dist/domains/dashboard/web/assets/chunk-727SXJPM-Do9ufCgY.js +206 -0
  896. package/dist/domains/dashboard/web/assets/chunk-AQP2D5EJ-qRQWlB5d.js +231 -0
  897. package/dist/domains/dashboard/web/assets/chunk-FMBD7UC4-BzDzeJ4_.js +15 -0
  898. package/dist/domains/dashboard/web/assets/chunk-ND2GUHAM-OQcAmIvL.js +1 -0
  899. package/dist/domains/dashboard/web/assets/chunk-QZHKN3VN-BiRfH4d2.js +1 -0
  900. package/dist/domains/dashboard/web/assets/classDiagram-4FO5ZUOK-BRGmx8Iz.js +1 -0
  901. package/dist/domains/dashboard/web/assets/classDiagram-v2-Q7XG4LA2-BRGmx8Iz.js +1 -0
  902. package/dist/domains/dashboard/web/assets/cose-bilkent-S5V4N54A-CZk37fGn.js +1 -0
  903. package/dist/domains/dashboard/web/assets/cynefin-VYW2F7L2-B3F-qRTJ.js +166 -0
  904. package/dist/domains/dashboard/web/assets/cytoscape.esm-D3_iZ_3b.js +321 -0
  905. package/dist/domains/dashboard/web/assets/dagre-BM42HDAG-D5BQ0eqN.js +4 -0
  906. package/dist/domains/dashboard/web/assets/defaultLocale-DX6XiGOO.js +1 -0
  907. package/dist/domains/dashboard/web/assets/demo-BuVau32v.js +25 -0
  908. package/dist/domains/dashboard/web/assets/diagram-2AECGRRQ-33mXstha.js +43 -0
  909. package/dist/domains/dashboard/web/assets/diagram-5GNKFQAL-BWHCMFvD.js +10 -0
  910. package/dist/domains/dashboard/web/assets/diagram-KO2AKTUF-DrPGimEt.js +3 -0
  911. package/dist/domains/dashboard/web/assets/diagram-LMA3HP47-BBlsg7jG.js +24 -0
  912. package/dist/domains/dashboard/web/assets/diagram-OG6HWLK6-CsaFSpHi.js +24 -0
  913. package/dist/domains/dashboard/web/assets/erDiagram-TEJ5UH35-CoB0mzhk.js +85 -0
  914. package/dist/domains/dashboard/web/assets/flowDiagram-I6XJVG4X-lT53XfSE.js +162 -0
  915. package/dist/domains/dashboard/web/assets/ganttDiagram-6RSMTGT7-D1SQ56fl.js +292 -0
  916. package/dist/domains/dashboard/web/assets/gitGraphDiagram-PVQCEYII-D4oDMS5x.js +106 -0
  917. package/dist/domains/dashboard/web/assets/graph--OzhPTMs.js +1 -0
  918. package/dist/domains/dashboard/web/assets/index-D-AGxvI4.css +1 -0
  919. package/dist/domains/dashboard/web/assets/index-DlSYK56b.js +139 -0
  920. package/dist/domains/dashboard/web/assets/index-Msce_H_q.js +24 -0
  921. package/dist/domains/dashboard/web/assets/index-QO0z6F4w.js +10 -0
  922. package/dist/domains/dashboard/web/assets/infoDiagram-5YYISTIA-BeICn98s.js +2 -0
  923. package/dist/domains/dashboard/web/assets/init-Gi6I4Gst.js +1 -0
  924. package/dist/domains/dashboard/web/assets/ishikawaDiagram-YF4QCWOH-Dkspu33d.js +70 -0
  925. package/dist/domains/dashboard/web/assets/journeyDiagram-JHISSGLW-C-EM1sZl.js +139 -0
  926. package/dist/domains/dashboard/web/assets/kanban-definition-UN3LZRKU-BTbB0IO2.js +89 -0
  927. package/dist/domains/dashboard/web/assets/katex-HP8lGamR.js +257 -0
  928. package/dist/domains/dashboard/web/assets/layout-SsrduOYp.js +1 -0
  929. package/dist/domains/dashboard/web/assets/linear-Cp0UrqDr.js +1 -0
  930. package/dist/domains/dashboard/web/assets/marked.esm-DECB3bxB.js +64 -0
  931. package/dist/domains/dashboard/web/assets/mermaid.core-CucmqsLW.js +301 -0
  932. package/dist/domains/dashboard/web/assets/mindmap-definition-RKZ34NQL-CjEshF1X.js +96 -0
  933. package/dist/domains/dashboard/web/assets/ordinal-Cboi1Yqb.js +1 -0
  934. package/dist/domains/dashboard/web/assets/pieDiagram-4H26LBE5-DrwFnX1b.js +30 -0
  935. package/dist/domains/dashboard/web/assets/purify.es-VaSPOPhr.js +3 -0
  936. package/dist/domains/dashboard/web/assets/quadrantDiagram-W4KKPZXB-CjG6pBR2.js +7 -0
  937. package/dist/domains/dashboard/web/assets/requirementDiagram-4Y6WPE33-BpUQVqCV.js +84 -0
  938. package/dist/domains/dashboard/web/assets/sankeyDiagram-5OEKKPKP-BeGkEvzR.js +40 -0
  939. package/dist/domains/dashboard/web/assets/sequenceDiagram-3UESZ5HK-sSTU3MCO.js +162 -0
  940. package/dist/domains/dashboard/web/assets/stateDiagram-AJRCARHV-CcFBc6qh.js +1 -0
  941. package/dist/domains/dashboard/web/assets/stateDiagram-v2-BHNVJYJU-D5zZYi4x.js +1 -0
  942. package/dist/domains/dashboard/web/assets/timeline-definition-PNZ67QCA-DCN7NjEs.js +120 -0
  943. package/dist/domains/dashboard/web/assets/vennDiagram-CIIHVFJN-DZAN1_rr.js +34 -0
  944. package/dist/domains/dashboard/web/assets/wardleyDiagram-YWT4CUSO-FfkJfr4C.js +78 -0
  945. package/dist/domains/dashboard/web/assets/xychartDiagram-2RQKCTM6-CD8B-EmR.js +7 -0
  946. package/dist/domains/dashboard/web/favicon.png +0 -0
  947. package/dist/domains/dashboard/web/index.html +16 -0
  948. package/dist/domains/dashboard/yaml.d.ts +13 -0
  949. package/dist/domains/dashboard/yaml.d.ts.map +1 -0
  950. package/dist/domains/dashboard/yaml.js +61 -0
  951. package/dist/domains/dashboard/yaml.js.map +1 -0
  952. package/dist/domains/engine/evals.d.ts +4 -0
  953. package/dist/domains/engine/evals.d.ts.map +1 -0
  954. package/dist/domains/engine/evals.js +25 -0
  955. package/dist/domains/engine/evals.js.map +1 -0
  956. package/dist/domains/engine/guardrails.d.ts +10 -0
  957. package/dist/domains/engine/guardrails.d.ts.map +1 -0
  958. package/dist/domains/engine/guardrails.js +25 -0
  959. package/dist/domains/engine/guardrails.js.map +1 -0
  960. package/dist/domains/engine/loop.d.ts +15 -0
  961. package/dist/domains/engine/loop.d.ts.map +1 -0
  962. package/dist/domains/engine/loop.js +126 -0
  963. package/dist/domains/engine/loop.js.map +1 -0
  964. package/dist/domains/engine/manual-run.d.ts +30 -0
  965. package/dist/domains/engine/manual-run.d.ts.map +1 -0
  966. package/dist/domains/engine/manual-run.js +184 -0
  967. package/dist/domains/engine/manual-run.js.map +1 -0
  968. package/dist/domains/engine/protected-run-file.d.ts +15 -0
  969. package/dist/domains/engine/protected-run-file.d.ts.map +1 -0
  970. package/dist/domains/engine/protected-run-file.js +76 -0
  971. package/dist/domains/engine/protected-run-file.js.map +1 -0
  972. package/dist/domains/engine/resolver.d.ts +20 -0
  973. package/dist/domains/engine/resolver.d.ts.map +1 -0
  974. package/dist/domains/engine/resolver.js +36 -0
  975. package/dist/domains/engine/resolver.js.map +1 -0
  976. package/dist/domains/engine/run-store.d.ts +14 -0
  977. package/dist/domains/engine/run-store.d.ts.map +1 -0
  978. package/dist/domains/engine/run-store.js +81 -0
  979. package/dist/domains/engine/run-store.js.map +1 -0
  980. package/dist/domains/engine/runtime-types.d.ts +11 -0
  981. package/dist/domains/engine/runtime-types.d.ts.map +1 -0
  982. package/dist/domains/engine/runtime-types.js +2 -0
  983. package/dist/domains/engine/runtime-types.js.map +1 -0
  984. package/dist/domains/engine/standalone-run.d.ts +13 -0
  985. package/dist/domains/engine/standalone-run.d.ts.map +1 -0
  986. package/dist/domains/engine/standalone-run.js +27 -0
  987. package/dist/domains/engine/standalone-run.js.map +1 -0
  988. package/dist/domains/engine/state.d.ts +11 -0
  989. package/dist/domains/engine/state.d.ts.map +1 -0
  990. package/dist/domains/engine/state.js +149 -0
  991. package/dist/domains/engine/state.js.map +1 -0
  992. package/dist/domains/engine/storage-layout.d.ts +14 -0
  993. package/dist/domains/engine/storage-layout.d.ts.map +1 -0
  994. package/dist/domains/engine/storage-layout.js +32 -0
  995. package/dist/domains/engine/storage-layout.js.map +1 -0
  996. package/dist/domains/engine/storage-run.d.ts +9 -0
  997. package/dist/domains/engine/storage-run.d.ts.map +1 -0
  998. package/dist/domains/engine/storage-run.js +116 -0
  999. package/dist/domains/engine/storage-run.js.map +1 -0
  1000. package/dist/domains/engine/types.d.ts +51 -0
  1001. package/dist/domains/engine/types.d.ts.map +1 -0
  1002. package/dist/domains/engine/types.js +2 -0
  1003. package/dist/domains/engine/types.js.map +1 -0
  1004. package/dist/domains/eval/index.d.ts +7 -0
  1005. package/dist/domains/eval/index.d.ts.map +1 -0
  1006. package/dist/domains/eval/index.js +11 -0
  1007. package/dist/domains/eval/index.js.map +1 -0
  1008. package/dist/domains/eval/repository-benchmarks.d.ts +6 -0
  1009. package/dist/domains/eval/repository-benchmarks.d.ts.map +1 -0
  1010. package/dist/domains/eval/repository-benchmarks.js +10 -0
  1011. package/dist/domains/eval/repository-benchmarks.js.map +1 -0
  1012. package/dist/domains/factory/artifacts.d.ts +53 -0
  1013. package/dist/domains/factory/artifacts.d.ts.map +1 -0
  1014. package/dist/domains/factory/artifacts.js +8 -0
  1015. package/dist/domains/factory/artifacts.js.map +1 -0
  1016. package/dist/domains/factory/package.d.ts +7 -0
  1017. package/dist/domains/factory/package.d.ts.map +1 -0
  1018. package/dist/domains/factory/package.js +1982 -0
  1019. package/dist/domains/factory/package.js.map +1 -0
  1020. package/dist/domains/factory/types.d.ts +127 -0
  1021. package/dist/domains/factory/types.d.ts.map +1 -0
  1022. package/dist/domains/factory/types.js +2 -0
  1023. package/dist/domains/factory/types.js.map +1 -0
  1024. package/dist/domains/integrations/codegraph.d.ts +17 -0
  1025. package/dist/domains/integrations/codegraph.d.ts.map +1 -0
  1026. package/dist/domains/integrations/codegraph.js +266 -0
  1027. package/dist/domains/integrations/codegraph.js.map +1 -0
  1028. package/dist/domains/integrations/openspec.d.ts +28 -0
  1029. package/dist/domains/integrations/openspec.d.ts.map +1 -0
  1030. package/dist/domains/integrations/openspec.js +557 -0
  1031. package/dist/domains/integrations/openspec.js.map +1 -0
  1032. package/dist/{core → domains/integrations}/superpowers.d.ts +10 -2
  1033. package/dist/domains/integrations/superpowers.d.ts.map +1 -0
  1034. package/dist/{core → domains/integrations}/superpowers.js +59 -13
  1035. package/dist/domains/integrations/superpowers.js.map +1 -0
  1036. package/dist/domains/skill/discovery.d.ts +17 -0
  1037. package/dist/domains/skill/discovery.d.ts.map +1 -0
  1038. package/dist/domains/skill/discovery.js +80 -0
  1039. package/dist/domains/skill/discovery.js.map +1 -0
  1040. package/dist/domains/skill/find.d.ts +41 -0
  1041. package/dist/domains/skill/find.d.ts.map +1 -0
  1042. package/dist/domains/skill/find.js +252 -0
  1043. package/dist/domains/skill/find.js.map +1 -0
  1044. package/dist/domains/skill/install.d.ts +11 -0
  1045. package/dist/domains/skill/install.d.ts.map +1 -0
  1046. package/dist/domains/skill/install.js +82 -0
  1047. package/dist/domains/skill/install.js.map +1 -0
  1048. package/dist/domains/skill/inventory.d.ts +19 -0
  1049. package/dist/domains/skill/inventory.d.ts.map +1 -0
  1050. package/dist/domains/skill/inventory.js +64 -0
  1051. package/dist/domains/skill/inventory.js.map +1 -0
  1052. package/dist/domains/skill/json-object.d.ts +13 -0
  1053. package/dist/domains/skill/json-object.d.ts.map +1 -0
  1054. package/dist/domains/skill/json-object.js +24 -0
  1055. package/dist/domains/skill/json-object.js.map +1 -0
  1056. package/dist/domains/skill/languages.d.ts +20 -0
  1057. package/dist/domains/skill/languages.d.ts.map +1 -0
  1058. package/dist/domains/skill/languages.js +24 -0
  1059. package/dist/domains/skill/languages.js.map +1 -0
  1060. package/dist/domains/skill/load.d.ts +5 -0
  1061. package/dist/domains/skill/load.d.ts.map +1 -0
  1062. package/dist/domains/skill/load.js +313 -0
  1063. package/dist/domains/skill/load.js.map +1 -0
  1064. package/dist/domains/skill/managed-markdown.d.ts +14 -0
  1065. package/dist/domains/skill/managed-markdown.d.ts.map +1 -0
  1066. package/dist/domains/skill/managed-markdown.js +126 -0
  1067. package/dist/domains/skill/managed-markdown.js.map +1 -0
  1068. package/dist/domains/skill/platform-inspect.d.ts +13 -0
  1069. package/dist/domains/skill/platform-inspect.d.ts.map +1 -0
  1070. package/dist/domains/skill/platform-inspect.js +193 -0
  1071. package/dist/domains/skill/platform-inspect.js.map +1 -0
  1072. package/dist/domains/skill/platform-install.d.ts +102 -0
  1073. package/dist/domains/skill/platform-install.d.ts.map +1 -0
  1074. package/dist/domains/skill/platform-install.js +1333 -0
  1075. package/dist/domains/skill/platform-install.js.map +1 -0
  1076. package/dist/domains/skill/preferences.d.ts +42 -0
  1077. package/dist/domains/skill/preferences.d.ts.map +1 -0
  1078. package/dist/domains/skill/preferences.js +118 -0
  1079. package/dist/domains/skill/preferences.js.map +1 -0
  1080. package/dist/domains/skill/project-instructions.d.ts +22 -0
  1081. package/dist/domains/skill/project-instructions.d.ts.map +1 -0
  1082. package/dist/domains/skill/project-instructions.js +69 -0
  1083. package/dist/domains/skill/project-instructions.js.map +1 -0
  1084. package/dist/domains/skill/snapshot.d.ts +8 -0
  1085. package/dist/domains/skill/snapshot.d.ts.map +1 -0
  1086. package/dist/domains/skill/snapshot.js +184 -0
  1087. package/dist/domains/skill/snapshot.js.map +1 -0
  1088. package/dist/domains/skill/types.d.ts +85 -0
  1089. package/dist/domains/skill/types.d.ts.map +1 -0
  1090. package/dist/domains/skill/types.js +2 -0
  1091. package/dist/{core → domains/skill}/types.js.map +1 -1
  1092. package/dist/domains/skill/uninstall.d.ts +19 -0
  1093. package/dist/domains/skill/uninstall.d.ts.map +1 -0
  1094. package/dist/domains/skill/uninstall.js +946 -0
  1095. package/dist/domains/skill/uninstall.js.map +1 -0
  1096. package/dist/domains/skill/validate.d.ts +3 -0
  1097. package/dist/domains/skill/validate.d.ts.map +1 -0
  1098. package/dist/domains/skill/validate.js +81 -0
  1099. package/dist/domains/skill/validate.js.map +1 -0
  1100. package/dist/domains/workflow-contract/builtins.d.ts +14 -0
  1101. package/dist/domains/workflow-contract/builtins.d.ts.map +1 -0
  1102. package/dist/domains/workflow-contract/builtins.js +372 -0
  1103. package/dist/domains/workflow-contract/builtins.js.map +1 -0
  1104. package/dist/domains/workflow-contract/contained-atomic-write.d.ts +21 -0
  1105. package/dist/domains/workflow-contract/contained-atomic-write.d.ts.map +1 -0
  1106. package/dist/domains/workflow-contract/contained-atomic-write.js +235 -0
  1107. package/dist/domains/workflow-contract/contained-atomic-write.js.map +1 -0
  1108. package/dist/domains/workflow-contract/hash.d.ts +3 -0
  1109. package/dist/domains/workflow-contract/hash.d.ts.map +1 -0
  1110. package/dist/domains/workflow-contract/hash.js +16 -0
  1111. package/dist/domains/workflow-contract/hash.js.map +1 -0
  1112. package/dist/domains/workflow-contract/index.d.ts +16 -0
  1113. package/dist/domains/workflow-contract/index.d.ts.map +1 -0
  1114. package/dist/domains/workflow-contract/index.js +11 -0
  1115. package/dist/domains/workflow-contract/index.js.map +1 -0
  1116. package/dist/domains/workflow-contract/normalize.d.ts +3 -0
  1117. package/dist/domains/workflow-contract/normalize.d.ts.map +1 -0
  1118. package/dist/domains/workflow-contract/normalize.js +165 -0
  1119. package/dist/domains/workflow-contract/normalize.js.map +1 -0
  1120. package/dist/domains/workflow-contract/project-config-reader.d.ts +24 -0
  1121. package/dist/domains/workflow-contract/project-config-reader.d.ts.map +1 -0
  1122. package/dist/domains/workflow-contract/project-config-reader.js +54 -0
  1123. package/dist/domains/workflow-contract/project-config-reader.js.map +1 -0
  1124. package/dist/domains/workflow-contract/project-config-transaction.d.ts +20 -0
  1125. package/dist/domains/workflow-contract/project-config-transaction.d.ts.map +1 -0
  1126. package/dist/domains/workflow-contract/project-config-transaction.js +293 -0
  1127. package/dist/domains/workflow-contract/project-config-transaction.js.map +1 -0
  1128. package/dist/domains/workflow-contract/project-config-writer.d.ts +13 -0
  1129. package/dist/domains/workflow-contract/project-config-writer.d.ts.map +1 -0
  1130. package/dist/domains/workflow-contract/project-config-writer.js +142 -0
  1131. package/dist/domains/workflow-contract/project-config-writer.js.map +1 -0
  1132. package/dist/domains/workflow-contract/project-config.d.ts +32 -0
  1133. package/dist/domains/workflow-contract/project-config.d.ts.map +1 -0
  1134. package/dist/domains/workflow-contract/project-config.js +1566 -0
  1135. package/dist/domains/workflow-contract/project-config.js.map +1 -0
  1136. package/dist/domains/workflow-contract/protected-project-path.d.ts +34 -0
  1137. package/dist/domains/workflow-contract/protected-project-path.d.ts.map +1 -0
  1138. package/dist/domains/workflow-contract/protected-project-path.js +162 -0
  1139. package/dist/domains/workflow-contract/protected-project-path.js.map +1 -0
  1140. package/dist/domains/workflow-contract/types.d.ts +193 -0
  1141. package/dist/domains/workflow-contract/types.d.ts.map +1 -0
  1142. package/dist/domains/workflow-contract/types.js +2 -0
  1143. package/dist/domains/workflow-contract/types.js.map +1 -0
  1144. package/dist/domains/workflow-contract/validation.d.ts +3 -0
  1145. package/dist/domains/workflow-contract/validation.d.ts.map +1 -0
  1146. package/dist/domains/workflow-contract/validation.js +189 -0
  1147. package/dist/domains/workflow-contract/validation.js.map +1 -0
  1148. package/dist/platform/fs/file-identity.d.ts +9 -0
  1149. package/dist/platform/fs/file-identity.d.ts.map +1 -0
  1150. package/dist/platform/fs/file-identity.js +21 -0
  1151. package/dist/platform/fs/file-identity.js.map +1 -0
  1152. package/dist/{utils → platform/fs}/file-system.d.ts +3 -3
  1153. package/dist/platform/fs/file-system.d.ts.map +1 -0
  1154. package/dist/{utils → platform/fs}/file-system.js +31 -17
  1155. package/dist/platform/fs/file-system.js.map +1 -0
  1156. package/dist/platform/fs/race-safe-read.d.ts +47 -0
  1157. package/dist/platform/fs/race-safe-read.d.ts.map +1 -0
  1158. package/dist/platform/fs/race-safe-read.js +132 -0
  1159. package/dist/platform/fs/race-safe-read.js.map +1 -0
  1160. package/dist/platform/fs/trusted-readonly-file.d.ts +31 -0
  1161. package/dist/platform/fs/trusted-readonly-file.d.ts.map +1 -0
  1162. package/dist/platform/fs/trusted-readonly-file.js +107 -0
  1163. package/dist/platform/fs/trusted-readonly-file.js.map +1 -0
  1164. package/dist/{core → platform/install}/detect.d.ts +5 -2
  1165. package/dist/platform/install/detect.d.ts.map +1 -0
  1166. package/dist/{core → platform/install}/detect.js +18 -5
  1167. package/dist/platform/install/detect.js.map +1 -0
  1168. package/dist/platform/install/platform-targets.d.ts +8 -0
  1169. package/dist/platform/install/platform-targets.d.ts.map +1 -0
  1170. package/dist/platform/install/platform-targets.js +31 -0
  1171. package/dist/platform/install/platform-targets.js.map +1 -0
  1172. package/dist/{core → platform/install}/platforms.d.ts +10 -1
  1173. package/dist/platform/install/platforms.d.ts.map +1 -0
  1174. package/dist/{core → platform/install}/platforms.js +68 -4
  1175. package/dist/platform/install/platforms.js.map +1 -0
  1176. package/dist/platform/install/project-registry.d.ts +38 -0
  1177. package/dist/platform/install/project-registry.d.ts.map +1 -0
  1178. package/dist/platform/install/project-registry.js +213 -0
  1179. package/dist/platform/install/project-registry.js.map +1 -0
  1180. package/dist/platform/install/skill-root-owner.d.ts +15 -0
  1181. package/dist/platform/install/skill-root-owner.d.ts.map +1 -0
  1182. package/dist/platform/install/skill-root-owner.js +68 -0
  1183. package/dist/platform/install/skill-root-owner.js.map +1 -0
  1184. package/dist/platform/install/types.d.ts +3 -0
  1185. package/dist/platform/install/types.d.ts.map +1 -0
  1186. package/dist/platform/install/types.js +2 -0
  1187. package/dist/platform/install/types.js.map +1 -0
  1188. package/dist/platform/paths/git-worktree.d.ts +10 -0
  1189. package/dist/platform/paths/git-worktree.d.ts.map +1 -0
  1190. package/dist/platform/paths/git-worktree.js +43 -0
  1191. package/dist/platform/paths/git-worktree.js.map +1 -0
  1192. package/dist/platform/paths/repository-layout.d.ts +38 -0
  1193. package/dist/platform/paths/repository-layout.d.ts.map +1 -0
  1194. package/dist/platform/paths/repository-layout.js +11 -0
  1195. package/dist/platform/paths/repository-layout.js.map +1 -0
  1196. package/dist/platform/process/command-error.d.ts.map +1 -0
  1197. package/dist/platform/process/command-error.js.map +1 -0
  1198. package/dist/platform/process/shell-quote.d.ts +22 -0
  1199. package/dist/platform/process/shell-quote.d.ts.map +1 -0
  1200. package/dist/platform/process/shell-quote.js +34 -0
  1201. package/dist/platform/process/shell-quote.js.map +1 -0
  1202. package/dist/platform/process/terminate-process-tree.d.ts +3 -0
  1203. package/dist/platform/process/terminate-process-tree.d.ts.map +1 -0
  1204. package/dist/platform/process/terminate-process-tree.js +65 -0
  1205. package/dist/platform/process/terminate-process-tree.js.map +1 -0
  1206. package/dist/platform/version/version.d.ts.map +1 -0
  1207. package/dist/{core → platform/version}/version.js +16 -3
  1208. package/dist/platform/version/version.js.map +1 -0
  1209. package/eval/CLAUDE.md +43 -0
  1210. package/eval/README.md +538 -0
  1211. package/eval/langsmith/README.md +93 -0
  1212. package/eval/langsmith/skills/README.md +5 -0
  1213. package/eval/langsmith/tasks/README.md +5 -0
  1214. package/eval/langsmith/tests/conftest.py +187 -0
  1215. package/eval/langsmith/tests/tasks/test_tasks.py +287 -0
  1216. package/eval/langsmith/treatments/README.md +5 -0
  1217. package/eval/local/README.md +130 -0
  1218. package/eval/local/regression_baseline.json +13 -0
  1219. package/eval/local/report-style-demo-assets/quality_cost.en.svg +41 -0
  1220. package/eval/local/report-style-demo-assets/quality_cost.zh.svg +41 -0
  1221. package/eval/local/report-style-demo-assets/rubric_delta.en.svg +56 -0
  1222. package/eval/local/report-style-demo-assets/rubric_delta.zh.svg +56 -0
  1223. package/eval/local/report-style-demo-assets/task_outcomes.en.svg +46 -0
  1224. package/eval/local/report-style-demo-assets/task_outcomes.zh.svg +46 -0
  1225. package/eval/local/report-style-demo.html +867 -0
  1226. package/eval/local/scripts/compare_baselines.py +1144 -0
  1227. package/eval/local/scripts/generate_report_style_demo_charts.py +322 -0
  1228. package/eval/local/scripts/regression_check.py +170 -0
  1229. package/eval/local/scripts/render_readme_benchmark_figures.py +416 -0
  1230. package/eval/local/scripts/rescore_rubric.py +120 -0
  1231. package/eval/local/skills/benchmarks/039-release/comet-classic-039/SKILL.md +282 -0
  1232. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/auto-transition.md +27 -0
  1233. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/comet-yaml-fields.md +68 -0
  1234. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/context-recovery.md +35 -0
  1235. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/debug-gate.md +17 -0
  1236. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/decision-point.md +20 -0
  1237. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/dirty-worktree.md +59 -0
  1238. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/file-structure.md +28 -0
  1239. package/eval/local/skills/benchmarks/039-release/comet-classic-039/reference/subagent-dispatch.md +113 -0
  1240. package/eval/local/skills/benchmarks/039-release/comet-classic-039/rules/comet-phase-guard.md +125 -0
  1241. package/eval/local/skills/benchmarks/039-release/comet-classic-039-archive/SKILL.md +100 -0
  1242. package/eval/local/skills/benchmarks/039-release/comet-classic-039-build/SKILL.md +304 -0
  1243. package/eval/local/skills/benchmarks/039-release/comet-classic-039-design/SKILL.md +263 -0
  1244. package/eval/local/skills/benchmarks/039-release/comet-classic-039-hotfix/SKILL.md +204 -0
  1245. package/eval/local/skills/benchmarks/039-release/comet-classic-039-open/SKILL.md +220 -0
  1246. package/eval/local/skills/benchmarks/039-release/comet-classic-039-tweak/SKILL.md +180 -0
  1247. package/eval/local/skills/benchmarks/039-release/comet-classic-039-verify/SKILL.md +234 -0
  1248. package/eval/local/skills/benchmarks/040-beta/comet/SKILL.md +261 -0
  1249. package/eval/local/skills/benchmarks/040-beta/comet/reference/auto-transition.md +27 -0
  1250. package/eval/local/skills/benchmarks/040-beta/comet/reference/comet-yaml-fields.md +73 -0
  1251. package/eval/local/skills/benchmarks/040-beta/comet/reference/context-recovery.md +45 -0
  1252. package/eval/local/skills/benchmarks/040-beta/comet/reference/debug-gate.md +33 -0
  1253. package/eval/local/skills/benchmarks/040-beta/comet/reference/decision-point.md +31 -0
  1254. package/eval/local/skills/benchmarks/040-beta/comet/reference/dirty-worktree.md +59 -0
  1255. package/eval/local/skills/benchmarks/040-beta/comet/reference/file-structure.md +28 -0
  1256. package/eval/local/skills/benchmarks/040-beta/comet/reference/intent-frame.md +74 -0
  1257. package/eval/local/skills/benchmarks/040-beta/comet/reference/scripts.md +69 -0
  1258. package/eval/local/skills/benchmarks/040-beta/comet/reference/subagent-dispatch.md +169 -0
  1259. package/eval/local/skills/benchmarks/040-beta/comet/rules/comet-phase-guard.md +130 -0
  1260. package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/checks.yaml +6 -0
  1261. package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/guardrails.yaml +13 -0
  1262. package/eval/local/skills/benchmarks/040-beta/comet/runtime/classic/skill.yaml +122 -0
  1263. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-archive.mjs +9515 -0
  1264. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-env.mjs +15 -0
  1265. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-guard.mjs +10173 -0
  1266. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-handoff.mjs +9491 -0
  1267. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-hook-guard.mjs +9175 -0
  1268. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-intent.mjs +404 -0
  1269. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-state.mjs +9273 -0
  1270. package/eval/local/skills/benchmarks/040-beta/comet/scripts/comet-yaml-validate.mjs +7627 -0
  1271. package/eval/local/skills/benchmarks/040-beta/comet-archive/SKILL.md +110 -0
  1272. package/eval/local/skills/benchmarks/040-beta/comet-build/SKILL.md +315 -0
  1273. package/eval/local/skills/benchmarks/040-beta/comet-design/SKILL.md +260 -0
  1274. package/eval/local/skills/benchmarks/040-beta/comet-hotfix/SKILL.md +190 -0
  1275. package/eval/local/skills/benchmarks/040-beta/comet-open/SKILL.md +210 -0
  1276. package/eval/local/skills/benchmarks/040-beta/comet-tweak/SKILL.md +183 -0
  1277. package/eval/local/skills/benchmarks/040-beta/comet-verify/SKILL.md +230 -0
  1278. package/eval/local/skills/benchmarks/dependency/claude-md/comet-workflow/CLAUDE.md +12 -0
  1279. package/eval/local/skills/benchmarks/dependency/openspec/openspec-apply-change/SKILL.md +156 -0
  1280. package/eval/local/skills/benchmarks/dependency/openspec/openspec-archive-change/SKILL.md +114 -0
  1281. package/eval/local/skills/benchmarks/dependency/openspec/openspec-bulk-archive-change/SKILL.md +246 -0
  1282. package/eval/local/skills/benchmarks/dependency/openspec/openspec-continue-change/SKILL.md +118 -0
  1283. package/eval/local/skills/benchmarks/dependency/openspec/openspec-explore/SKILL.md +288 -0
  1284. package/eval/local/skills/benchmarks/dependency/openspec/openspec-ff-change/SKILL.md +101 -0
  1285. package/eval/local/skills/benchmarks/dependency/openspec/openspec-new-change/SKILL.md +74 -0
  1286. package/eval/local/skills/benchmarks/dependency/openspec/openspec-onboard/SKILL.md +554 -0
  1287. package/eval/local/skills/benchmarks/dependency/openspec/openspec-propose/SKILL.md +110 -0
  1288. package/eval/local/skills/benchmarks/dependency/openspec/openspec-sync-specs/SKILL.md +138 -0
  1289. package/eval/local/skills/benchmarks/dependency/openspec/openspec-verify-change/SKILL.md +168 -0
  1290. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/SKILL.md +159 -0
  1291. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/frame-template.html +213 -0
  1292. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/helper.js +167 -0
  1293. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/server.cjs +723 -0
  1294. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/start-server.sh +209 -0
  1295. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/scripts/stop-server.sh +120 -0
  1296. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/spec-document-reviewer-prompt.md +49 -0
  1297. package/eval/local/skills/benchmarks/dependency/superpowers/brainstorming/visual-companion.md +291 -0
  1298. package/eval/local/skills/benchmarks/dependency/superpowers/dispatching-parallel-agents/SKILL.md +185 -0
  1299. package/eval/local/skills/benchmarks/dependency/superpowers/executing-plans/SKILL.md +70 -0
  1300. package/eval/local/skills/benchmarks/dependency/superpowers/finishing-a-development-branch/SKILL.md +241 -0
  1301. package/eval/local/skills/benchmarks/dependency/superpowers/receiving-code-review/SKILL.md +213 -0
  1302. package/eval/local/skills/benchmarks/dependency/superpowers/requesting-code-review/SKILL.md +103 -0
  1303. package/eval/local/skills/benchmarks/dependency/superpowers/requesting-code-review/code-reviewer.md +172 -0
  1304. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/SKILL.md +418 -0
  1305. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/implementer-prompt.md +139 -0
  1306. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/review-package +44 -0
  1307. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/sdd-workspace +22 -0
  1308. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/scripts/task-brief +40 -0
  1309. package/eval/local/skills/benchmarks/dependency/superpowers/subagent-driven-development/task-reviewer-prompt.md +188 -0
  1310. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
  1311. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/SKILL.md +296 -0
  1312. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
  1313. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
  1314. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/defense-in-depth.md +122 -0
  1315. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/find-polluter.sh +63 -0
  1316. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
  1317. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-academic.md +14 -0
  1318. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-1.md +58 -0
  1319. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-2.md +68 -0
  1320. package/eval/local/skills/benchmarks/dependency/superpowers/systematic-debugging/test-pressure-3.md +69 -0
  1321. package/eval/local/skills/benchmarks/dependency/superpowers/test-driven-development/SKILL.md +371 -0
  1322. package/eval/local/skills/benchmarks/dependency/superpowers/test-driven-development/testing-anti-patterns.md +299 -0
  1323. package/eval/local/skills/benchmarks/dependency/superpowers/using-git-worktrees/SKILL.md +202 -0
  1324. package/eval/local/skills/benchmarks/dependency/superpowers/verification-before-completion/SKILL.md +139 -0
  1325. package/eval/local/skills/benchmarks/dependency/superpowers/writing-plans/SKILL.md +174 -0
  1326. package/eval/local/skills/benchmarks/dependency/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
  1327. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/SKILL.md +689 -0
  1328. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
  1329. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  1330. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/graphviz-conventions.dot +172 -0
  1331. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/persuasion-principles.md +187 -0
  1332. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/render-graphs.js +168 -0
  1333. package/eval/local/skills/benchmarks/dependency/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
  1334. package/eval/local/tasks/authoring-skill-smoke/environment/Dockerfile +14 -0
  1335. package/eval/local/tasks/authoring-skill-smoke/instruction.md +4 -0
  1336. package/eval/local/tasks/authoring-skill-smoke/task.toml +21 -0
  1337. package/eval/local/tasks/authoring-skill-smoke/validation/test_authoring_skill_smoke.py +54 -0
  1338. package/eval/local/tasks/comet-agent-memory-routing/environment/Dockerfile +26 -0
  1339. package/eval/local/tasks/comet-agent-memory-routing/environment/agent_system.py +40 -0
  1340. package/eval/local/tasks/comet-agent-memory-routing/environment/test_agent_system.py +29 -0
  1341. package/eval/local/tasks/comet-agent-memory-routing/instruction.md +20 -0
  1342. package/eval/local/tasks/comet-agent-memory-routing/task.toml +24 -0
  1343. package/eval/local/tasks/comet-agent-memory-routing/validation/test_agent_memory_routing.py +24 -0
  1344. package/eval/local/tasks/comet-api-cache-ttl/environment/Dockerfile +35 -0
  1345. package/eval/local/tasks/comet-api-cache-ttl/environment/cache.py +39 -0
  1346. package/eval/local/tasks/comet-api-cache-ttl/environment/test_cache.py +81 -0
  1347. package/eval/local/tasks/comet-api-cache-ttl/instruction.md +33 -0
  1348. package/eval/local/tasks/comet-api-cache-ttl/task.toml +24 -0
  1349. package/eval/local/tasks/comet-api-cache-ttl/validation/test_api_cache_ttl.py +58 -0
  1350. package/eval/local/tasks/comet-classic-layout-lifecycle/environment/.include-current-comet-cli +1 -0
  1351. package/eval/local/tasks/comet-classic-layout-lifecycle/environment/Dockerfile +45 -0
  1352. package/eval/local/tasks/comet-classic-layout-lifecycle/environment/current-comet-package.json +18 -0
  1353. package/eval/local/tasks/comet-classic-layout-lifecycle/environment/current-comet.sh +14 -0
  1354. package/eval/local/tasks/comet-classic-layout-lifecycle/environment/test_wordcount.py +29 -0
  1355. package/eval/local/tasks/comet-classic-layout-lifecycle/environment/wordcount.py +40 -0
  1356. package/eval/local/tasks/comet-classic-layout-lifecycle/instruction.md +18 -0
  1357. package/eval/local/tasks/comet-classic-layout-lifecycle/task.toml +23 -0
  1358. package/eval/local/tasks/comet-classic-layout-lifecycle/validation/test_classic_layout_lifecycle.py +604 -0
  1359. package/eval/local/tasks/comet-cross-file-refactor/environment/Dockerfile +15 -0
  1360. package/eval/local/tasks/comet-cross-file-refactor/environment/cli.py +13 -0
  1361. package/eval/local/tasks/comet-cross-file-refactor/environment/counting.py +13 -0
  1362. package/eval/local/tasks/comet-cross-file-refactor/environment/test_textkit.py +21 -0
  1363. package/eval/local/tasks/comet-cross-file-refactor/instruction.md +16 -0
  1364. package/eval/local/tasks/comet-cross-file-refactor/task.toml +20 -0
  1365. package/eval/local/tasks/comet-cross-file-refactor/validation/test_cross_file_refactor.py +20 -0
  1366. package/eval/local/tasks/comet-dependency-confusion/environment/Dockerfile +25 -0
  1367. package/eval/local/tasks/comet-dependency-confusion/environment/app.py +8 -0
  1368. package/eval/local/tasks/comet-dependency-confusion/environment/settings_loader.py +14 -0
  1369. package/eval/local/tasks/comet-dependency-confusion/environment/test_settings_service.py +19 -0
  1370. package/eval/local/tasks/comet-dependency-confusion/instruction.md +18 -0
  1371. package/eval/local/tasks/comet-dependency-confusion/task.toml +24 -0
  1372. package/eval/local/tasks/comet-dependency-confusion/validation/test_dependency_confusion.py +24 -0
  1373. package/eval/local/tasks/comet-fix-median/environment/Dockerfile +46 -0
  1374. package/eval/local/tasks/comet-fix-median/environment/stats.py +54 -0
  1375. package/eval/local/tasks/comet-fix-median/environment/test_stats.py +68 -0
  1376. package/eval/local/tasks/comet-fix-median/instruction.md +25 -0
  1377. package/eval/local/tasks/comet-fix-median/task.toml +24 -0
  1378. package/eval/local/tasks/comet-fix-median/validation/test_fix_median.py +60 -0
  1379. package/eval/local/tasks/comet-framework-selection/environment/Dockerfile +25 -0
  1380. package/eval/local/tasks/comet-framework-selection/environment/architecture.py +12 -0
  1381. package/eval/local/tasks/comet-framework-selection/environment/test_architecture.py +30 -0
  1382. package/eval/local/tasks/comet-framework-selection/instruction.md +22 -0
  1383. package/eval/local/tasks/comet-framework-selection/task.toml +24 -0
  1384. package/eval/local/tasks/comet-framework-selection/validation/test_framework_selection.py +24 -0
  1385. package/eval/local/tasks/comet-full-workflow/environment/Dockerfile +49 -0
  1386. package/eval/local/tasks/comet-full-workflow/environment/test_wordcount.py +29 -0
  1387. package/eval/local/tasks/comet-full-workflow/environment/wordcount.py +40 -0
  1388. package/eval/local/tasks/comet-full-workflow/instruction.md +18 -0
  1389. package/eval/local/tasks/comet-full-workflow/task.toml +24 -0
  1390. package/eval/local/tasks/comet-full-workflow/validation/test_full_workflow.py +171 -0
  1391. package/eval/local/tasks/comet-graph-execution-review/environment/Dockerfile +25 -0
  1392. package/eval/local/tasks/comet-graph-execution-review/environment/pipeline.py +19 -0
  1393. package/eval/local/tasks/comet-graph-execution-review/environment/test_pipeline.py +53 -0
  1394. package/eval/local/tasks/comet-graph-execution-review/instruction.md +21 -0
  1395. package/eval/local/tasks/comet-graph-execution-review/task.toml +24 -0
  1396. package/eval/local/tasks/comet-graph-execution-review/validation/test_graph_execution_review.py +24 -0
  1397. package/eval/local/tasks/comet-human-approval-flow/environment/Dockerfile +15 -0
  1398. package/eval/local/tasks/comet-human-approval-flow/environment/approvals.py +17 -0
  1399. package/eval/local/tasks/comet-human-approval-flow/environment/test_approvals.py +30 -0
  1400. package/eval/local/tasks/comet-human-approval-flow/instruction.md +15 -0
  1401. package/eval/local/tasks/comet-human-approval-flow/task.toml +20 -0
  1402. package/eval/local/tasks/comet-human-approval-flow/validation/test_human_approval_flow.py +20 -0
  1403. package/eval/local/tasks/comet-layered-streaming-fix/environment/Dockerfile +17 -0
  1404. package/eval/local/tasks/comet-layered-streaming-fix/environment/chat_app.py +19 -0
  1405. package/eval/local/tasks/comet-layered-streaming-fix/environment/test_chat_app.py +15 -0
  1406. package/eval/local/tasks/comet-layered-streaming-fix/instruction.md +14 -0
  1407. package/eval/local/tasks/comet-layered-streaming-fix/task.toml +20 -0
  1408. package/eval/local/tasks/comet-layered-streaming-fix/validation/test_layered_streaming_fix.py +20 -0
  1409. package/eval/local/tasks/comet-native-clarification/environment/Dockerfile +25 -0
  1410. package/eval/local/tasks/comet-native-clarification/environment/test_wordcount.py +25 -0
  1411. package/eval/local/tasks/comet-native-clarification/environment/wordcount.py +36 -0
  1412. package/eval/local/tasks/comet-native-clarification/instruction.md +7 -0
  1413. package/eval/local/tasks/comet-native-clarification/task.toml +40 -0
  1414. package/eval/local/tasks/comet-native-clarification/validation/test_native_clarification.py +193 -0
  1415. package/eval/local/tasks/comet-native-clarification-depth/environment/Dockerfile +25 -0
  1416. package/eval/local/tasks/comet-native-clarification-depth/environment/test_wordcount.py +25 -0
  1417. package/eval/local/tasks/comet-native-clarification-depth/environment/wordcount.py +36 -0
  1418. package/eval/local/tasks/comet-native-clarification-depth/instruction.md +17 -0
  1419. package/eval/local/tasks/comet-native-clarification-depth/task.toml +47 -0
  1420. package/eval/local/tasks/comet-native-clarification-depth/validation/test_native_clarification_depth.py +618 -0
  1421. package/eval/local/tasks/comet-native-clarification-modes/environment/Dockerfile +25 -0
  1422. package/eval/local/tasks/comet-native-clarification-modes/environment/test_wordcount.py +25 -0
  1423. package/eval/local/tasks/comet-native-clarification-modes/environment/wordcount.py +36 -0
  1424. package/eval/local/tasks/comet-native-clarification-modes/instruction.md +13 -0
  1425. package/eval/local/tasks/comet-native-clarification-modes/task.toml +39 -0
  1426. package/eval/local/tasks/comet-native-clarification-modes/validation/test_native_clarification_modes.py +235 -0
  1427. package/eval/local/tasks/comet-native-interrupted-transition/environment/.comet/config.yaml +6 -0
  1428. package/eval/local/tasks/comet-native-interrupted-transition/environment/Dockerfile +26 -0
  1429. package/eval/local/tasks/comet-native-interrupted-transition/environment/docs/comet/changes/add-character-counting/brief.md +17 -0
  1430. package/eval/local/tasks/comet-native-interrupted-transition/environment/docs/comet/changes/add-character-counting/comet-state.yaml +12 -0
  1431. package/eval/local/tasks/comet-native-interrupted-transition/environment/docs/comet/changes/add-character-counting/runtime/transition.json +69 -0
  1432. package/eval/local/tasks/comet-native-interrupted-transition/environment/docs/comet/changes/add-character-counting/specs/character-counting/spec.md +3 -0
  1433. package/eval/local/tasks/comet-native-interrupted-transition/environment/test_wordcount.py +20 -0
  1434. package/eval/local/tasks/comet-native-interrupted-transition/environment/wordcount.py +27 -0
  1435. package/eval/local/tasks/comet-native-interrupted-transition/instruction.md +7 -0
  1436. package/eval/local/tasks/comet-native-interrupted-transition/task.toml +35 -0
  1437. package/eval/local/tasks/comet-native-interrupted-transition/validation/test_native_interrupted_transition.py +63 -0
  1438. package/eval/local/tasks/comet-native-repository-fact/environment/Dockerfile +24 -0
  1439. package/eval/local/tasks/comet-native-repository-fact/environment/PRODUCT_RULES.md +3 -0
  1440. package/eval/local/tasks/comet-native-repository-fact/environment/test_wordcount.py +20 -0
  1441. package/eval/local/tasks/comet-native-repository-fact/environment/wordcount.py +27 -0
  1442. package/eval/local/tasks/comet-native-repository-fact/instruction.md +7 -0
  1443. package/eval/local/tasks/comet-native-repository-fact/task.toml +35 -0
  1444. package/eval/local/tasks/comet-native-repository-fact/validation/test_native_repository_fact.py +53 -0
  1445. package/eval/local/tasks/comet-native-wave-b-decision-resume/environment/Dockerfile +25 -0
  1446. package/eval/local/tasks/comet-native-wave-b-decision-resume/environment/test_wordcount.py +27 -0
  1447. package/eval/local/tasks/comet-native-wave-b-decision-resume/environment/wordcount.py +36 -0
  1448. package/eval/local/tasks/comet-native-wave-b-decision-resume/instruction.md +9 -0
  1449. package/eval/local/tasks/comet-native-wave-b-decision-resume/task.toml +40 -0
  1450. package/eval/local/tasks/comet-native-wave-b-decision-resume/validation/test_native_wave_b_decision_resume.py +208 -0
  1451. package/eval/local/tasks/comet-native-wave-c-verification-integrity/environment/Dockerfile +25 -0
  1452. package/eval/local/tasks/comet-native-wave-c-verification-integrity/environment/test_wordcount.py +27 -0
  1453. package/eval/local/tasks/comet-native-wave-c-verification-integrity/environment/wordcount.py +36 -0
  1454. package/eval/local/tasks/comet-native-wave-c-verification-integrity/instruction.md +11 -0
  1455. package/eval/local/tasks/comet-native-wave-c-verification-integrity/task.toml +36 -0
  1456. package/eval/local/tasks/comet-native-wave-c-verification-integrity/validation/test_native_wave_c_verification_integrity.py +344 -0
  1457. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/environment/Dockerfile +25 -0
  1458. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/environment/test_wordcount.py +27 -0
  1459. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/environment/wordcount.py +36 -0
  1460. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/instruction.md +11 -0
  1461. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/task.toml +37 -0
  1462. package/eval/local/tasks/comet-native-wave-d-stagnation-stop/validation/test_native_wave_d_stagnation_stop.py +284 -0
  1463. package/eval/local/tasks/comet-native-wave-e-parallel-safety/environment/.include-trusted-native-runtime +1 -0
  1464. package/eval/local/tasks/comet-native-wave-e-parallel-safety/environment/Dockerfile +25 -0
  1465. package/eval/local/tasks/comet-native-wave-e-parallel-safety/environment/test_wordcount.py +27 -0
  1466. package/eval/local/tasks/comet-native-wave-e-parallel-safety/environment/wordcount.py +36 -0
  1467. package/eval/local/tasks/comet-native-wave-e-parallel-safety/instruction.md +9 -0
  1468. package/eval/local/tasks/comet-native-wave-e-parallel-safety/task.toml +37 -0
  1469. package/eval/local/tasks/comet-native-wave-e-parallel-safety/validation/test_native_wave_e_parallel_safety.py +309 -0
  1470. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/.include-current-comet-cli +1 -0
  1471. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/Dockerfile +29 -0
  1472. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/current-comet-package.json +18 -0
  1473. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/current-comet.sh +14 -0
  1474. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/test_wordcount.py +27 -0
  1475. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/environment/wordcount.py +36 -0
  1476. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/instruction.md +7 -0
  1477. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/task.toml +36 -0
  1478. package/eval/local/tasks/comet-native-wave-f-dashboard-readonly/validation/test_native_wave_f_dashboard_readonly.py +483 -0
  1479. package/eval/local/tasks/comet-native-workflow/environment/.include-trusted-native-review-fixture +1 -0
  1480. package/eval/local/tasks/comet-native-workflow/environment/.include-trusted-native-runtime +1 -0
  1481. package/eval/local/tasks/comet-native-workflow/environment/Dockerfile +26 -0
  1482. package/eval/local/tasks/comet-native-workflow/environment/test_wordcount.py +25 -0
  1483. package/eval/local/tasks/comet-native-workflow/environment/wordcount.py +36 -0
  1484. package/eval/local/tasks/comet-native-workflow/instruction.md +36 -0
  1485. package/eval/local/tasks/comet-native-workflow/task.toml +36 -0
  1486. package/eval/local/tasks/comet-native-workflow/validation/test_native_workflow.py +680 -0
  1487. package/eval/local/tasks/comet-noise-distractor/environment/Dockerfile +15 -0
  1488. package/eval/local/tasks/comet-noise-distractor/environment/distractor.md +4 -0
  1489. package/eval/local/tasks/comet-noise-distractor/environment/invoice.py +5 -0
  1490. package/eval/local/tasks/comet-noise-distractor/environment/test_invoice.py +18 -0
  1491. package/eval/local/tasks/comet-noise-distractor/instruction.md +17 -0
  1492. package/eval/local/tasks/comet-noise-distractor/task.toml +20 -0
  1493. package/eval/local/tasks/comet-noise-distractor/validation/test_noise_distractor.py +20 -0
  1494. package/eval/local/tasks/comet-observability-env-template/environment/Dockerfile +15 -0
  1495. package/eval/local/tasks/comet-observability-env-template/environment/env_writer.py +17 -0
  1496. package/eval/local/tasks/comet-observability-env-template/environment/test_env_writer.py +17 -0
  1497. package/eval/local/tasks/comet-observability-env-template/instruction.md +20 -0
  1498. package/eval/local/tasks/comet-observability-env-template/task.toml +20 -0
  1499. package/eval/local/tasks/comet-observability-env-template/validation/test_observability_env_template.py +46 -0
  1500. package/eval/local/tasks/comet-perf-dedupe/environment/Dockerfile +35 -0
  1501. package/eval/local/tasks/comet-perf-dedupe/environment/dedupe.py +22 -0
  1502. package/eval/local/tasks/comet-perf-dedupe/environment/test_dedupe.py +43 -0
  1503. package/eval/local/tasks/comet-perf-dedupe/instruction.md +25 -0
  1504. package/eval/local/tasks/comet-perf-dedupe/task.toml +24 -0
  1505. package/eval/local/tasks/comet-perf-dedupe/validation/test_perf_dedupe.py +40 -0
  1506. package/eval/local/tasks/comet-persistence-threading/environment/Dockerfile +15 -0
  1507. package/eval/local/tasks/comet-persistence-threading/environment/session_store.py +15 -0
  1508. package/eval/local/tasks/comet-persistence-threading/environment/test_session_store.py +21 -0
  1509. package/eval/local/tasks/comet-persistence-threading/instruction.md +14 -0
  1510. package/eval/local/tasks/comet-persistence-threading/task.toml +20 -0
  1511. package/eval/local/tasks/comet-persistence-threading/validation/test_persistence_threading.py +20 -0
  1512. package/eval/local/tasks/comet-refactor-counter/environment/Dockerfile +35 -0
  1513. package/eval/local/tasks/comet-refactor-counter/environment/test_text_processor.py +57 -0
  1514. package/eval/local/tasks/comet-refactor-counter/environment/text_processor.py +49 -0
  1515. package/eval/local/tasks/comet-refactor-counter/instruction.md +31 -0
  1516. package/eval/local/tasks/comet-refactor-counter/task.toml +24 -0
  1517. package/eval/local/tasks/comet-refactor-counter/validation/test_refactor_counter.py +75 -0
  1518. package/eval/local/tasks/comet-robust-config/environment/Dockerfile +35 -0
  1519. package/eval/local/tasks/comet-robust-config/environment/config_loader.py +56 -0
  1520. package/eval/local/tasks/comet-robust-config/environment/test_config_loader.py +72 -0
  1521. package/eval/local/tasks/comet-robust-config/instruction.md +30 -0
  1522. package/eval/local/tasks/comet-robust-config/task.toml +24 -0
  1523. package/eval/local/tasks/comet-robust-config/validation/test_robust_config.py +37 -0
  1524. package/eval/local/tasks/generic-skill-smoke/environment/Dockerfile +14 -0
  1525. package/eval/local/tasks/generic-skill-smoke/instruction.md +7 -0
  1526. package/eval/local/tasks/generic-skill-smoke/task.toml +21 -0
  1527. package/eval/local/tasks/generic-skill-smoke/validation/test_generic_skill_smoke.py +41 -0
  1528. package/eval/local/tasks/index.yaml +229 -0
  1529. package/eval/local/tasks/workflow-overlay-contract/environment/Dockerfile +16 -0
  1530. package/eval/local/tasks/workflow-overlay-contract/instruction.md +5 -0
  1531. package/eval/local/tasks/workflow-overlay-contract/task.toml +21 -0
  1532. package/eval/local/tasks/workflow-overlay-contract/validation/test_workflow_overlay_contract.py +235 -0
  1533. package/eval/local/tasks/workflow-route-conformance/environment/Dockerfile +14 -0
  1534. package/eval/local/tasks/workflow-route-conformance/instruction.md +5 -0
  1535. package/eval/local/tasks/workflow-route-conformance/task.toml +21 -0
  1536. package/eval/local/tasks/workflow-route-conformance/validation/test_workflow_route_conformance.py +84 -0
  1537. package/eval/local/tests/conftest.py +1946 -0
  1538. package/eval/local/tests/scaffold/test_aligned_comparison.py +1012 -0
  1539. package/eval/local/tests/scaffold/test_attribution.py +48 -0
  1540. package/eval/local/tests/scaffold/test_compare_baselines.py +999 -0
  1541. package/eval/local/tests/scaffold/test_conftest_helpers.py +980 -0
  1542. package/eval/local/tests/scaffold/test_evidence.py +15 -0
  1543. package/eval/local/tests/scaffold/test_langsmith_conftest.py +244 -0
  1544. package/eval/local/tests/scaffold/test_logging.py +377 -0
  1545. package/eval/local/tests/scaffold/test_manifests.py +134 -0
  1546. package/eval/local/tests/scaffold/test_native_aligned_eval.py +353 -0
  1547. package/eval/local/tests/scaffold/test_native_wave_evaluations.py +2183 -0
  1548. package/eval/local/tests/scaffold/test_profiles.py +1149 -0
  1549. package/eval/local/tests/scaffold/test_regression_check.py +19 -0
  1550. package/eval/local/tests/scaffold/test_report_style_demo_charts.py +45 -0
  1551. package/eval/local/tests/scaffold/test_sample_quality.py +268 -0
  1552. package/eval/local/tests/scaffold/test_tasks.py +1013 -0
  1553. package/eval/local/tests/scaffold/test_treatments.py +353 -0
  1554. package/eval/local/tests/scaffold/test_utils.py +561 -0
  1555. package/eval/local/tests/tasks/__init__.py +1 -0
  1556. package/eval/local/tests/tasks/test_tasks.py +474 -0
  1557. package/eval/local/tests/tasks/test_validation_scripts.py +787 -0
  1558. package/eval/local/treatments/comet/comet_classic_docs_layout.yaml +121 -0
  1559. package/eval/local/treatments/comet/comet_full_039.yaml +141 -0
  1560. package/eval/local/treatments/comet/comet_full_040_beta.yaml +140 -0
  1561. package/eval/local/treatments/comet/comet_native_phase1.yaml +66 -0
  1562. package/eval/local/treatments/common/control.yaml +4 -0
  1563. package/eval/pyproject.toml +41 -0
  1564. package/eval/report-html-config.json +6 -0
  1565. package/eval/scaffold/__init__.py +67 -0
  1566. package/eval/scaffold/python/__init__.py +95 -0
  1567. package/eval/scaffold/python/aligned_comparison.py +1632 -0
  1568. package/eval/scaffold/python/attribution.py +43 -0
  1569. package/eval/scaffold/python/evidence.py +38 -0
  1570. package/eval/scaffold/python/external_data_handler.py +18 -0
  1571. package/eval/scaffold/python/generic_llm_judge.py +237 -0
  1572. package/eval/scaffold/python/judge_config.py +168 -0
  1573. package/eval/scaffold/python/llm_judge.py +188 -0
  1574. package/eval/scaffold/python/logging.py +804 -0
  1575. package/eval/scaffold/python/manifests.py +131 -0
  1576. package/eval/scaffold/python/native_eval.py +143 -0
  1577. package/eval/scaffold/python/paper_charts.py +25 -0
  1578. package/eval/scaffold/python/pass_at_k.py +106 -0
  1579. package/eval/scaffold/python/paths.py +56 -0
  1580. package/eval/scaffold/python/profiles.py +127 -0
  1581. package/eval/scaffold/python/report_outputs.py +1573 -0
  1582. package/eval/scaffold/python/sample_quality.py +382 -0
  1583. package/eval/scaffold/python/schema.py +39 -0
  1584. package/eval/scaffold/python/skill_parser.py +469 -0
  1585. package/eval/scaffold/python/tasks.py +343 -0
  1586. package/eval/scaffold/python/treatments.py +271 -0
  1587. package/eval/scaffold/python/utils.py +460 -0
  1588. package/eval/scaffold/python/validation/__init__.py +31 -0
  1589. package/eval/scaffold/python/validation/authoring_rubric.py +328 -0
  1590. package/eval/scaffold/python/validation/comet_workflow.py +227 -0
  1591. package/eval/scaffold/python/validation/core.py +264 -0
  1592. package/eval/scaffold/python/validation/dataset.py +337 -0
  1593. package/eval/scaffold/python/validation/docker.py +106 -0
  1594. package/eval/scaffold/python/validation/evaluator.py +549 -0
  1595. package/eval/scaffold/python/validation/generic_rubric.py +198 -0
  1596. package/eval/scaffold/python/validation/native_wave.py +2154 -0
  1597. package/eval/scaffold/python/validation/native_workflow.py +252 -0
  1598. package/eval/scaffold/python/validation/rubric.py +780 -0
  1599. package/eval/scaffold/python/validation/runner.py +237 -0
  1600. package/eval/scaffold/python/validation/scripts.py +58 -0
  1601. package/eval/scaffold/python/validation/tracing.py +313 -0
  1602. package/eval/scaffold/shell/common.sh +126 -0
  1603. package/eval/scaffold/shell/completion-point.sh +18 -0
  1604. package/eval/scaffold/shell/decision-point.sh +35 -0
  1605. package/eval/scaffold/shell/docker.sh +716 -0
  1606. package/eval/scaffold/shell/native-review-signer-daemon.mjs +144 -0
  1607. package/eval/scaffold/shell/native-review-verifier-daemon.mjs +178 -0
  1608. package/eval/scaffold/shell/run-claude-loop.sh +234 -0
  1609. package/eval/scaffold/shell/setup.sh +259 -0
  1610. package/eval/simulator-instruction.md +9 -0
  1611. package/package.json +98 -18
  1612. package/dist/cli/index.js +0 -84
  1613. package/dist/cli/index.js.map +0 -1
  1614. package/dist/commands/doctor.d.ts.map +0 -1
  1615. package/dist/commands/doctor.js +0 -234
  1616. package/dist/commands/doctor.js.map +0 -1
  1617. package/dist/commands/i18n.d.ts +0 -4
  1618. package/dist/commands/i18n.d.ts.map +0 -1
  1619. package/dist/commands/i18n.js.map +0 -1
  1620. package/dist/commands/init.d.ts +0 -26
  1621. package/dist/commands/init.d.ts.map +0 -1
  1622. package/dist/commands/init.js +0 -352
  1623. package/dist/commands/init.js.map +0 -1
  1624. package/dist/commands/status.d.ts.map +0 -1
  1625. package/dist/commands/status.js +0 -108
  1626. package/dist/commands/status.js.map +0 -1
  1627. package/dist/commands/uninstall.d.ts +0 -9
  1628. package/dist/commands/uninstall.d.ts.map +0 -1
  1629. package/dist/commands/uninstall.js +0 -132
  1630. package/dist/commands/uninstall.js.map +0 -1
  1631. package/dist/commands/update.d.ts +0 -29
  1632. package/dist/commands/update.d.ts.map +0 -1
  1633. package/dist/commands/update.js +0 -293
  1634. package/dist/commands/update.js.map +0 -1
  1635. package/dist/core/codegraph.d.ts +0 -6
  1636. package/dist/core/codegraph.d.ts.map +0 -1
  1637. package/dist/core/codegraph.js +0 -118
  1638. package/dist/core/codegraph.js.map +0 -1
  1639. package/dist/core/command-error.d.ts.map +0 -1
  1640. package/dist/core/command-error.js.map +0 -1
  1641. package/dist/core/detect.d.ts.map +0 -1
  1642. package/dist/core/detect.js.map +0 -1
  1643. package/dist/core/openspec.d.ts +0 -11
  1644. package/dist/core/openspec.d.ts.map +0 -1
  1645. package/dist/core/openspec.js +0 -271
  1646. package/dist/core/openspec.js.map +0 -1
  1647. package/dist/core/platforms.d.ts.map +0 -1
  1648. package/dist/core/platforms.js.map +0 -1
  1649. package/dist/core/skills.d.ts +0 -58
  1650. package/dist/core/skills.d.ts.map +0 -1
  1651. package/dist/core/skills.js +0 -562
  1652. package/dist/core/skills.js.map +0 -1
  1653. package/dist/core/superpowers.d.ts.map +0 -1
  1654. package/dist/core/superpowers.js.map +0 -1
  1655. package/dist/core/types.d.ts +0 -2
  1656. package/dist/core/types.d.ts.map +0 -1
  1657. package/dist/core/uninstall.d.ts +0 -28
  1658. package/dist/core/uninstall.d.ts.map +0 -1
  1659. package/dist/core/uninstall.js +0 -421
  1660. package/dist/core/uninstall.js.map +0 -1
  1661. package/dist/core/version.d.ts.map +0 -1
  1662. package/dist/core/version.js.map +0 -1
  1663. package/dist/utils/file-system.d.ts.map +0 -1
  1664. package/dist/utils/file-system.js.map +0 -1
  1665. /package/dist/{cli → app/cli}/index.d.ts +0 -0
  1666. /package/dist/{commands → app/commands}/status.d.ts +0 -0
  1667. /package/dist/{core → domains/bundle}/types.js +0 -0
  1668. /package/dist/{core → platform/process}/command-error.d.ts +0 -0
  1669. /package/dist/{core → platform/process}/command-error.js +0 -0
  1670. /package/dist/{core → platform/version}/version.d.ts +0 -0
  1671. /package/{assets/skills/comet → eval/local/skills/benchmarks/039-release/comet-classic-039}/scripts/comet-archive.sh +0 -0
  1672. /package/{assets/skills/comet → eval/local/skills/benchmarks/039-release/comet-classic-039}/scripts/comet-env.sh +0 -0
  1673. /package/{assets/skills/comet → eval/local/skills/benchmarks/039-release/comet-classic-039}/scripts/comet-guard.sh +0 -0
  1674. /package/{assets/skills/comet → eval/local/skills/benchmarks/039-release/comet-classic-039}/scripts/comet-handoff.sh +0 -0
  1675. /package/{assets/skills/comet → eval/local/skills/benchmarks/039-release/comet-classic-039}/scripts/comet-hook-guard.sh +0 -0
  1676. /package/{assets/skills/comet → eval/local/skills/benchmarks/039-release/comet-classic-039}/scripts/comet-state.sh +0 -0
  1677. /package/{assets/skills/comet → eval/local/skills/benchmarks/039-release/comet-classic-039}/scripts/comet-yaml-validate.sh +0 -0
  1678. /package/scripts/{postinstall.js → install/postinstall.js} +0 -0
@@ -0,0 +1,2154 @@
1
+ """Shared hard checks for the Comet Native wave B-F evaluations.
2
+
3
+ The wave tasks intentionally exercise different runtime contracts, but their
4
+ evidence is all machine-readable JSON. Keeping the parsing here prevents each
5
+ task validator from inventing a slightly different interpretation of Native
6
+ state, compare-and-swap outcomes, or Dashboard projections.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import json
12
+ import hashlib
13
+ import os
14
+ import re
15
+ import subprocess
16
+ import sys
17
+ import unicodedata
18
+ from collections.abc import Iterable
19
+ from datetime import datetime
20
+ from pathlib import Path
21
+ from pathlib import PurePosixPath
22
+ from typing import Any
23
+
24
+
25
+ HASH_PATTERN = re.compile(r"^[a-f0-9]{64}$")
26
+ ACCEPTANCE_ID_PATTERN = re.compile(r"^acceptance-[a-f0-9]{64}$")
27
+ SCOPE_ID_PATTERN = re.compile(r"^scope:[a-f0-9]{64}$")
28
+ CHANGE_NAME_PATTERN = re.compile(r"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$")
29
+ MAX_EVIDENCE_BYTES = 1024 * 1024
30
+ MAX_SAFE_INTEGER = 2**53 - 1
31
+
32
+
33
+ class NativeEvidenceError(ValueError):
34
+ """Raised when an eval artifact is not an exact Native runtime document."""
35
+
36
+
37
+ def canonical_json(value: Any) -> str:
38
+ """Mirror Native's canonical JSON for JSON-domain eval documents."""
39
+ try:
40
+ return json.dumps(
41
+ value,
42
+ ensure_ascii=False,
43
+ allow_nan=False,
44
+ separators=(",", ":"),
45
+ sort_keys=True,
46
+ )
47
+ except (TypeError, ValueError) as error:
48
+ raise NativeEvidenceError(f"Value is not canonical JSON: {error}") from error
49
+
50
+
51
+ def canonical_hash(tag: str, value: Any) -> str:
52
+ if not tag or "\n" in tag or "\r" in tag:
53
+ raise NativeEvidenceError("Canonical hash tag is invalid")
54
+ return hashlib.sha256(f"{tag}\n{canonical_json(value)}".encode()).hexdigest()
55
+
56
+
57
+ NATIVE_CHECK_LIMITS = {
58
+ "maxFiles": 256,
59
+ "maxFileBytes": 1024 * 1024,
60
+ "maxTotalBytes": 8 * 1024 * 1024,
61
+ "maxIssues": 128,
62
+ }
63
+ NATIVE_CHECKER_HASH = canonical_hash(
64
+ "comet.native.checker-policy.v1",
65
+ {
66
+ "policy": "scoped-text-safety",
67
+ "version": 1,
68
+ "limits": NATIVE_CHECK_LIMITS,
69
+ "checks": ["conflict-marker", "space-before-tab", "trailing-whitespace"],
70
+ "binaryHandling": "skip-and-count",
71
+ },
72
+ )
73
+ NATIVE_CHECK_ISSUE_KINDS = (
74
+ "conflict-marker",
75
+ "trailing-whitespace",
76
+ "space-before-tab",
77
+ "scope-mismatch",
78
+ "unsafe-file",
79
+ "scan-limit",
80
+ )
81
+ NATIVE_CHECK_STALE_REASONS = (
82
+ "contract-before-does-not-match-scope",
83
+ "implementation-before-does-not-match-scope",
84
+ "contract-changed-during-check",
85
+ "implementation-changed-during-check",
86
+ "contract-after-does-not-match-scope",
87
+ "implementation-after-does-not-match-scope",
88
+ )
89
+
90
+
91
+ def _record(value: Any, label: str) -> dict[str, Any]:
92
+ if not isinstance(value, dict):
93
+ raise NativeEvidenceError(f"{label} must be an object")
94
+ return value
95
+
96
+
97
+ def _exact_keys(
98
+ value: dict[str, Any],
99
+ required: Iterable[str],
100
+ optional: Iterable[str] = (),
101
+ *,
102
+ label: str,
103
+ ) -> None:
104
+ required_set = set(required)
105
+ allowed = required_set | set(optional)
106
+ missing = sorted(required_set - set(value))
107
+ unknown = sorted(set(value) - allowed)
108
+ if missing or unknown:
109
+ raise NativeEvidenceError(
110
+ f"{label} fields are invalid: missing={missing}, unknown={unknown}"
111
+ )
112
+
113
+
114
+ def _hash(value: Any, label: str) -> str:
115
+ if not isinstance(value, str) or not HASH_PATTERN.fullmatch(value):
116
+ raise NativeEvidenceError(f"{label} must be a SHA-256 hash")
117
+ return value
118
+
119
+
120
+ def _positive_int(value: Any, label: str) -> int:
121
+ if (
122
+ isinstance(value, bool)
123
+ or not isinstance(value, int)
124
+ or value < 1
125
+ or value > MAX_SAFE_INTEGER
126
+ ):
127
+ raise NativeEvidenceError(f"{label} must be a positive integer")
128
+ return value
129
+
130
+
131
+ def _nonnegative_int(value: Any, label: str) -> int:
132
+ if (
133
+ isinstance(value, bool)
134
+ or not isinstance(value, int)
135
+ or value < 0
136
+ or value > MAX_SAFE_INTEGER
137
+ ):
138
+ raise NativeEvidenceError(f"{label} must be a non-negative integer")
139
+ return value
140
+
141
+
142
+ def _timestamp(value: Any, label: str) -> str:
143
+ if not isinstance(value, str) or not re.fullmatch(
144
+ r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z", value
145
+ ):
146
+ raise NativeEvidenceError(f"{label} must be a canonical ISO timestamp")
147
+ try:
148
+ parsed = datetime.fromisoformat(value.removesuffix("Z") + "+00:00")
149
+ except ValueError as error:
150
+ raise NativeEvidenceError(f"{label} must be a canonical ISO timestamp") from error
151
+ if parsed.isoformat(timespec="milliseconds").replace("+00:00", "Z") != value:
152
+ raise NativeEvidenceError(f"{label} must be a canonical ISO timestamp")
153
+ return value
154
+
155
+
156
+ def portable_ref(value: Any, label: str) -> str:
157
+ if not isinstance(value, str) or not value or value != value.strip():
158
+ raise NativeEvidenceError(f"{label} must be a non-empty relative ref")
159
+ if "\\" in value or any(
160
+ ord(character) <= 0x1F or ord(character) == 0x7F for character in value
161
+ ):
162
+ raise NativeEvidenceError(f"{label} must be portable")
163
+ ref = PurePosixPath(value)
164
+ if ref.is_absolute() or ".." in ref.parts or "." in ref.parts or str(ref) != value:
165
+ raise NativeEvidenceError(f"{label} must be a normalized relative ref")
166
+ if re.match(r"^(?:[A-Za-z]:|~)", value) or value.endswith("/"):
167
+ raise NativeEvidenceError(f"{label} must be a normalized relative ref")
168
+ return value
169
+
170
+
171
+ def _assert_real_directory_chain(root: Path, target: Path, label: str) -> None:
172
+ root = root.absolute()
173
+ target = target.absolute()
174
+ try:
175
+ relative = target.relative_to(root)
176
+ except ValueError as error:
177
+ raise NativeEvidenceError(f"{label} escapes its root") from error
178
+ cursor = root
179
+ if cursor.is_symlink() or not cursor.is_dir():
180
+ raise NativeEvidenceError(f"{label} root must be a real directory")
181
+ for part in relative.parts:
182
+ cursor = cursor / part
183
+ if cursor.is_symlink():
184
+ raise NativeEvidenceError(f"{label} crosses a symbolic link: {cursor}")
185
+
186
+
187
+ def contained_file(root: Path, ref: Any, label: str) -> Path:
188
+ reference = portable_ref(ref, label)
189
+ target = root.joinpath(*PurePosixPath(reference).parts)
190
+ _assert_real_directory_chain(root, target.parent, label)
191
+ if target.is_symlink() or not target.is_file():
192
+ raise NativeEvidenceError(f"{label} is not a real regular file: {reference}")
193
+ try:
194
+ target.resolve(strict=True).relative_to(root.resolve(strict=True))
195
+ except (OSError, ValueError) as error:
196
+ raise NativeEvidenceError(f"{label} resolves outside its root") from error
197
+ return target
198
+
199
+
200
+ def read_contained_json(root: Path, ref: Any, label: str) -> Any:
201
+ target = contained_file(root, ref, label)
202
+ if target.stat().st_size > MAX_EVIDENCE_BYTES:
203
+ raise NativeEvidenceError(f"{label} exceeds its byte budget")
204
+ try:
205
+ return json.loads(target.read_text(encoding="utf-8"))
206
+ except (OSError, UnicodeDecodeError, json.JSONDecodeError) as error:
207
+ raise NativeEvidenceError(f"{label} is invalid JSON: {error}") from error
208
+
209
+
210
+ def sha256_file(path: Path) -> str:
211
+ digest = hashlib.sha256()
212
+ with path.open("rb") as handle:
213
+ for chunk in iter(lambda: handle.read(64 * 1024), b""):
214
+ digest.update(chunk)
215
+ return digest.hexdigest()
216
+
217
+
218
+ def passed(check: str, message: str = "") -> dict[str, str]:
219
+ result = {"check": check, "status": "passed"}
220
+ if message:
221
+ result["message"] = message
222
+ return result
223
+
224
+
225
+ def failed(check: str, reason: str) -> dict[str, str]:
226
+ return {"check": check, "status": "failed", "reason": reason}
227
+
228
+
229
+ def read_json(path: Path) -> Any:
230
+ return json.loads(path.read_text(encoding="utf-8"))
231
+
232
+
233
+ def parse_runtime_envelope(
234
+ path: Path,
235
+ *,
236
+ command: str | None = None,
237
+ exit_code: int | None = None,
238
+ ) -> dict[str, Any]:
239
+ if path.is_symlink() or not path.is_file():
240
+ raise NativeEvidenceError(f"Missing real runtime JSON evidence: {path}")
241
+ if path.stat().st_size > MAX_EVIDENCE_BYTES:
242
+ raise NativeEvidenceError(f"Runtime envelope exceeds its byte budget: {path.name}")
243
+ try:
244
+ payload = read_json(path)
245
+ except (OSError, UnicodeDecodeError, json.JSONDecodeError) as error:
246
+ raise NativeEvidenceError(f"Invalid runtime JSON in {path.name}: {error}") from error
247
+ envelope = _record(payload, f"Runtime envelope {path.name}")
248
+ _exact_keys(
249
+ envelope,
250
+ ["command", "exitCode", "data"],
251
+ ["error"],
252
+ label=f"Runtime envelope {path.name}",
253
+ )
254
+ if not isinstance(envelope["command"], str) or not envelope["command"]:
255
+ raise NativeEvidenceError(f"{path.name} has no exact command")
256
+ if (
257
+ isinstance(envelope["exitCode"], bool)
258
+ or not isinstance(envelope["exitCode"], int)
259
+ or not isinstance(envelope["data"], dict)
260
+ ):
261
+ raise NativeEvidenceError(f"{path.name} has an invalid exitCode/data envelope")
262
+ if "error" in envelope:
263
+ error = _record(envelope["error"], f"Runtime error {path.name}")
264
+ _exact_keys(error, ["code", "message"], label=f"Runtime error {path.name}")
265
+ if error["code"] not in {"usage", "invalid-data", "blocked", "conflict", "internal"}:
266
+ raise NativeEvidenceError(f"{path.name} has an invalid runtime error code")
267
+ if not isinstance(error["message"], str) or not error["message"]:
268
+ raise NativeEvidenceError(f"{path.name} has an invalid runtime error message")
269
+ if command is not None and envelope["command"] != command:
270
+ raise NativeEvidenceError(
271
+ f"{path.name} expected command {command!r}; observed {envelope['command']!r}"
272
+ )
273
+ if exit_code is not None and envelope["exitCode"] != exit_code:
274
+ raise NativeEvidenceError(
275
+ f"{path.name} expected exit {exit_code}; observed {envelope['exitCode']!r}"
276
+ )
277
+ return envelope
278
+
279
+
280
+ def _walk(value: Any) -> Iterable[Any]:
281
+ yield value
282
+ if isinstance(value, dict):
283
+ for child in value.values():
284
+ yield from _walk(child)
285
+ elif isinstance(value, list):
286
+ for child in value:
287
+ yield from _walk(child)
288
+
289
+
290
+ def _normalise_token(value: Any) -> str:
291
+ return str(value).strip().lower().replace("_", "-").replace(" ", "-")
292
+
293
+
294
+ def check_json_state(path: Path, expected_state: str) -> dict[str, str]:
295
+ """Require an exact state token anywhere in a JSON evidence payload."""
296
+ check = f"json_state_{expected_state}"
297
+ if not path.is_file():
298
+ return failed(check, f"Missing evidence file: {path}")
299
+ try:
300
+ payload = read_json(path)
301
+ except (OSError, json.JSONDecodeError) as error:
302
+ return failed(check, f"Invalid JSON in {path.name}: {error}")
303
+
304
+ expected = _normalise_token(expected_state)
305
+ tokens = {
306
+ _normalise_token(value)
307
+ for value in _walk(payload)
308
+ if isinstance(value, (str, int, float, bool))
309
+ }
310
+ if expected not in tokens:
311
+ return failed(check, f"Expected state {expected_state!r}; observed {sorted(tokens)}")
312
+ return passed(check)
313
+
314
+
315
+ def check_runtime_envelopes(paths: Iterable[Path]) -> dict[str, str]:
316
+ """Require exact Native CLI JSON envelopes instead of prose reconstructions."""
317
+ check = "runtime_json_envelopes"
318
+ for path in paths:
319
+ try:
320
+ parse_runtime_envelope(path)
321
+ except NativeEvidenceError as error:
322
+ return failed(check, str(error))
323
+ return passed(check)
324
+
325
+
326
+ def _normalize_acceptance_text(value: str) -> str:
327
+ return re.sub(r"\s+", " ", unicodedata.normalize("NFC", value)).strip()
328
+
329
+
330
+ def _heading(line: str) -> tuple[int, str] | None:
331
+ match = re.fullmatch(r" {0,3}(#{1,6})[ \t]+(.+?)[ \t]*", line)
332
+ if not match:
333
+ return None
334
+ text = re.sub(r"[ \t]+#+[ \t]*$", "", match.group(2)).strip()
335
+ return len(match.group(1)), text
336
+
337
+
338
+ def _scanned_markdown(markdown: str) -> list[tuple[str, bool]]:
339
+ scanned: list[tuple[str, bool]] = []
340
+ fence: tuple[str, int] | None = None
341
+ html_comment = False
342
+ html_tag: str | None = None
343
+ for line in markdown.replace("\r\n", "\n").replace("\r", "\n").split("\n"):
344
+ scanned.append((line, fence is None and not html_comment and html_tag is None))
345
+ fence_match = re.match(r"^ {0,3}(`{3,}|~{3,})(.*)$", line)
346
+ if fence is not None:
347
+ if (
348
+ fence_match
349
+ and fence_match.group(1)[0] == fence[0]
350
+ and len(fence_match.group(1)) >= fence[1]
351
+ and not fence_match.group(2).strip()
352
+ ):
353
+ fence = None
354
+ continue
355
+ if html_comment:
356
+ if "-->" in line:
357
+ html_comment = False
358
+ continue
359
+ if html_tag is not None:
360
+ if re.search(rf"</{re.escape(html_tag)}\s*>", line, re.IGNORECASE):
361
+ html_tag = None
362
+ continue
363
+ if fence_match:
364
+ fence = (fence_match.group(1)[0], len(fence_match.group(1)))
365
+ continue
366
+ trimmed = line.lstrip()
367
+ if trimmed.startswith("<!--") and "-->" not in trimmed:
368
+ html_comment = True
369
+ continue
370
+ html_start = re.match(r"<([A-Za-z][A-Za-z0-9-]*)\b[^>]*>", trimmed)
371
+ if (
372
+ html_start
373
+ and not trimmed.startswith("</")
374
+ and not trimmed.endswith("/>")
375
+ and not re.search(rf"</{re.escape(html_start.group(1))}\s*>", trimmed, re.IGNORECASE)
376
+ ):
377
+ html_tag = html_start.group(1)
378
+ return scanned
379
+
380
+
381
+ def _criterion(kind: str, source: str, text: str, context: list[str] | None = None) -> dict:
382
+ normalized = {
383
+ "kind": kind,
384
+ "source": portable_ref(source, "Acceptance source"),
385
+ "context": [_normalize_acceptance_text(item) for item in (context or [])],
386
+ "text": _normalize_acceptance_text(text),
387
+ }
388
+ if not normalized["text"]:
389
+ raise NativeEvidenceError("Acceptance criterion text is empty")
390
+ return {
391
+ "id": f"acceptance-{canonical_hash('comet.native.acceptance.v1', normalized)}",
392
+ **normalized,
393
+ }
394
+
395
+
396
+ def _brief_acceptance(markdown: str, source: str) -> list[dict]:
397
+ lines = _scanned_markdown(markdown)
398
+ starts = [
399
+ index
400
+ for index, (line, body) in enumerate(lines)
401
+ if body
402
+ and (candidate := _heading(line)) is not None
403
+ and candidate[0] == 1
404
+ and candidate[1].lower() == "acceptance examples"
405
+ ]
406
+ if not starts:
407
+ return []
408
+ if len(starts) != 1:
409
+ raise NativeEvidenceError("Brief must contain exactly one Acceptance examples section")
410
+ start = starts[0] + 1
411
+ end = len(lines)
412
+ for index in range(start, len(lines)):
413
+ heading = _heading(lines[index][0]) if lines[index][1] else None
414
+ if heading and heading[0] == 1:
415
+ end = index
416
+ break
417
+ section = lines[start:end]
418
+ indents = [
419
+ len(match.group(1))
420
+ for line, body in section
421
+ if body and (match := re.match(r"^( {0,3})[-*+][ \t]+", line))
422
+ ]
423
+ if not indents:
424
+ return []
425
+ top = min(indents)
426
+ items: list[list[str]] = []
427
+ active: list[str] | None = None
428
+ for line, body in section:
429
+ match = re.match(r"^( {0,3})[-*+][ \t]+(.*)$", line) if body else None
430
+ if match and len(match.group(1)) == top:
431
+ if active is not None:
432
+ items.append(active)
433
+ active = [match.group(2)]
434
+ elif active is not None:
435
+ active.append(line)
436
+ if active is not None:
437
+ items.append(active)
438
+ return [_criterion("brief-example", source, "\n".join(item)) for item in items]
439
+
440
+
441
+ def _spec_acceptance(markdown: str, source: str) -> list[dict]:
442
+ criteria: list[dict] = []
443
+ ancestry: list[tuple[int, str]] = []
444
+ active: dict[str, Any] | None = None
445
+
446
+ def flush() -> None:
447
+ nonlocal active
448
+ if active is not None:
449
+ criteria.append(
450
+ _criterion(
451
+ "spec-scenario",
452
+ source,
453
+ "\n".join([active["title"], *active["body"]]),
454
+ active["context"],
455
+ )
456
+ )
457
+ active = None
458
+
459
+ for line, body in _scanned_markdown(markdown):
460
+ heading = _heading(line) if body else None
461
+ scenario = (
462
+ re.match(r"^Scenario\s*:\s*(.*)$", heading[1], re.IGNORECASE) if heading else None
463
+ )
464
+ if scenario:
465
+ flush()
466
+ while ancestry and ancestry[-1][0] >= heading[0]:
467
+ ancestry.pop()
468
+ title = _normalize_acceptance_text(scenario.group(1))
469
+ if not title:
470
+ raise NativeEvidenceError("Scenario title is empty")
471
+ active = {
472
+ "level": heading[0],
473
+ "title": title,
474
+ "body": [],
475
+ "context": [item[1] for item in ancestry],
476
+ }
477
+ continue
478
+ if heading:
479
+ if active is not None and heading[0] <= active["level"]:
480
+ flush()
481
+ while ancestry and ancestry[-1][0] >= heading[0]:
482
+ ancestry.pop()
483
+ ancestry.append((heading[0], _normalize_acceptance_text(heading[1])))
484
+ elif active is not None:
485
+ active["body"].append(line)
486
+ flush()
487
+ return criteria
488
+
489
+
490
+ def build_contract_from_change(change_root: Path, state: dict[str, Any]) -> dict[str, Any]:
491
+ brief_ref = portable_ref(state.get("brief"), "Native brief ref")
492
+ brief_path = contained_file(change_root, brief_ref, "Native brief")
493
+ brief_markdown = brief_path.read_text(encoding="utf-8")
494
+ raw_specs = state.get("spec_changes")
495
+ if not isinstance(raw_specs, list) or not raw_specs or len(raw_specs) > 64:
496
+ raise NativeEvidenceError("Native spec_changes are missing or exceed their budget")
497
+ specs: list[dict[str, Any]] = []
498
+ acceptance = _brief_acceptance(brief_markdown, brief_ref)
499
+ seen_capabilities: set[str] = set()
500
+ seen_sources = {brief_ref}
501
+ for index, raw in enumerate(raw_specs):
502
+ spec = _record(raw, f"Native spec change {index}")
503
+ _exact_keys(
504
+ spec,
505
+ ["capability", "operation", "source", "base_hash"],
506
+ label=f"Native spec change {index}",
507
+ )
508
+ capability = spec["capability"]
509
+ operation = spec["operation"]
510
+ if not isinstance(capability, str) or not CHANGE_NAME_PATTERN.fullmatch(capability):
511
+ raise NativeEvidenceError(f"Native spec change {index} capability is invalid")
512
+ if capability in seen_capabilities:
513
+ raise NativeEvidenceError("Native contract has duplicate capabilities")
514
+ seen_capabilities.add(capability)
515
+ if operation == "remove":
516
+ if spec["source"] is not None:
517
+ raise NativeEvidenceError("Remove spec cannot have a source")
518
+ base_hash = _hash(spec["base_hash"], "Remove spec base hash")
519
+ specs.append(
520
+ {
521
+ "capability": capability,
522
+ "operation": operation,
523
+ "source": None,
524
+ "baseHash": base_hash,
525
+ "contentHash": None,
526
+ }
527
+ )
528
+ continue
529
+ if operation not in {"create", "replace"}:
530
+ raise NativeEvidenceError(f"Native spec change {index} operation is invalid")
531
+ source = portable_ref(spec["source"], f"Native spec change {index} source")
532
+ if source in seen_sources:
533
+ raise NativeEvidenceError("Native contract has duplicate artifact sources")
534
+ seen_sources.add(source)
535
+ markdown = contained_file(change_root, source, "Native target spec").read_text(
536
+ encoding="utf-8"
537
+ )
538
+ base_hash = None if operation == "create" else _hash(spec["base_hash"], "Replace base hash")
539
+ if operation == "create" and spec["base_hash"] is not None:
540
+ raise NativeEvidenceError("Create spec must have a null base hash")
541
+ specs.append(
542
+ {
543
+ "capability": capability,
544
+ "operation": operation,
545
+ "source": source,
546
+ "baseHash": base_hash,
547
+ "contentHash": canonical_hash(
548
+ "comet.native.contract-content.v1",
549
+ markdown.replace("\r\n", "\n").replace("\r", "\n"),
550
+ ),
551
+ }
552
+ )
553
+ acceptance.extend(_spec_acceptance(markdown, source))
554
+ acceptance.sort(key=lambda item: item["id"])
555
+ if not acceptance or len(acceptance) > 1024:
556
+ raise NativeEvidenceError("Native contract acceptance set is empty or over budget")
557
+ ids = [item["id"] for item in acceptance]
558
+ if len(ids) != len(set(ids)):
559
+ raise NativeEvidenceError("Native contract has duplicate acceptance IDs")
560
+ specs.sort(key=lambda item: item["capability"])
561
+ acceptance_hash = canonical_hash("comet.native.acceptance-set.v1", acceptance)
562
+ content = {
563
+ "schema": "comet.native.contract.v1",
564
+ "brief": {
565
+ "source": brief_ref,
566
+ "contentHash": canonical_hash(
567
+ "comet.native.contract-content.v1",
568
+ brief_markdown.replace("\r\n", "\n").replace("\r", "\n"),
569
+ ),
570
+ },
571
+ "specs": specs,
572
+ "acceptance": acceptance,
573
+ "acceptanceHash": acceptance_hash,
574
+ }
575
+ return {**content, "contractHash": canonical_hash("comet.native.contract.v1", content)}
576
+
577
+
578
+ def _parse_snapshot_projection(value: Any, expected_hash: str) -> dict[str, Any]:
579
+ projection = _record(value, "Native snapshot projection")
580
+ _exact_keys(
581
+ projection,
582
+ ["schema", "origin", "complete", "limits", "entries", "omitted", "omittedCount"],
583
+ ["omissionOverflow"],
584
+ label="Native snapshot projection",
585
+ )
586
+ if projection["schema"] != "comet.native.content-snapshot-projection.v1":
587
+ raise NativeEvidenceError("Native snapshot projection schema is invalid")
588
+ if projection["origin"] not in {"change-created", "legacy-migration", "explicit"}:
589
+ raise NativeEvidenceError("Native snapshot projection origin is invalid")
590
+ if not isinstance(projection["complete"], bool):
591
+ raise NativeEvidenceError("Native snapshot projection completeness is invalid")
592
+ limits = _record(projection["limits"], "Native snapshot limits")
593
+ _exact_keys(
594
+ limits,
595
+ ["maxFiles", "maxFileBytes", "maxTotalBytes", "maxManifestBytes"],
596
+ label="Native snapshot limits",
597
+ )
598
+ for key, value in limits.items():
599
+ _positive_int(value, f"Native snapshot {key}")
600
+ entries = projection["entries"]
601
+ omitted = projection["omitted"]
602
+ if not isinstance(entries, list) or not isinstance(omitted, list):
603
+ raise NativeEvidenceError("Native snapshot entries/omissions are invalid")
604
+ parsed_entries = []
605
+ for index, raw in enumerate(entries):
606
+ entry = _record(raw, f"Native snapshot entry {index}")
607
+ _exact_keys(entry, ["path", "hash", "size", "type"], label=f"Native snapshot entry {index}")
608
+ parsed_entries.append(
609
+ {
610
+ "path": portable_ref(entry["path"], f"Native snapshot entry {index} path"),
611
+ "hash": _hash(entry["hash"], f"Native snapshot entry {index} hash"),
612
+ "size": _nonnegative_int(entry["size"], f"Native snapshot entry {index} size"),
613
+ "type": entry["type"],
614
+ }
615
+ )
616
+ if entry["type"] != "file":
617
+ raise NativeEvidenceError(f"Native snapshot entry {index} type is invalid")
618
+ if len({entry["path"] for entry in parsed_entries}) != len(parsed_entries):
619
+ raise NativeEvidenceError("Native snapshot has duplicate paths")
620
+ if parsed_entries != sorted(
621
+ parsed_entries,
622
+ key=lambda item: (item["path"], item["hash"], item["size"]),
623
+ ):
624
+ raise NativeEvidenceError("Native snapshot entries are not canonical")
625
+ if len(parsed_entries) > limits["maxFiles"] or any(
626
+ entry["size"] > limits["maxFileBytes"] for entry in parsed_entries
627
+ ):
628
+ raise NativeEvidenceError("Native snapshot entries exceed their limits")
629
+ if sum(entry["size"] for entry in parsed_entries) > limits["maxTotalBytes"]:
630
+ raise NativeEvidenceError("Native snapshot entries exceed their total byte limit")
631
+
632
+ omission_types = {"file", "directory", "other"}
633
+ omission_reasons = {
634
+ "file-size",
635
+ "file-count",
636
+ "total-size",
637
+ "manifest-size",
638
+ "changed-during-read",
639
+ "unreadable",
640
+ }
641
+ parsed_omitted = []
642
+ for index, raw in enumerate(omitted):
643
+ omission = _record(raw, f"Native snapshot omission {index}")
644
+ _exact_keys(
645
+ omission,
646
+ ["path", "size", "type", "reason"],
647
+ label=f"Native snapshot omission {index}",
648
+ )
649
+ if omission["type"] not in omission_types:
650
+ raise NativeEvidenceError(f"Native snapshot omission {index} type is invalid")
651
+ if omission["reason"] not in omission_reasons:
652
+ raise NativeEvidenceError(f"Native snapshot omission {index} reason is invalid")
653
+ parsed_omitted.append(
654
+ {
655
+ "path": portable_ref(omission["path"], f"Native snapshot omission {index} path"),
656
+ "size": (
657
+ None
658
+ if omission["size"] is None
659
+ else _nonnegative_int(
660
+ omission["size"], f"Native snapshot omission {index} size"
661
+ )
662
+ ),
663
+ "type": omission["type"],
664
+ "reason": omission["reason"],
665
+ }
666
+ )
667
+ if parsed_omitted != sorted(
668
+ parsed_omitted,
669
+ key=lambda item: (
670
+ item["path"],
671
+ item["reason"],
672
+ item["type"],
673
+ -1 if item["size"] is None else item["size"],
674
+ ),
675
+ ):
676
+ raise NativeEvidenceError("Native snapshot omissions are not canonical")
677
+ omitted_count = _nonnegative_int(projection["omittedCount"], "Native omitted count")
678
+ if len(parsed_omitted) > 1000 or omitted_count < len(parsed_omitted):
679
+ raise NativeEvidenceError("Native snapshot omission count is invalid")
680
+ overflow_count = omitted_count - len(parsed_omitted)
681
+ overflow = projection.get("omissionOverflow")
682
+ if overflow is not None:
683
+ overflow = _record(overflow, "Native snapshot omission overflow")
684
+ _exact_keys(
685
+ overflow,
686
+ ["ref", "hash", "count"],
687
+ label="Native snapshot omission overflow",
688
+ )
689
+ overflow_hash = _hash(overflow["hash"], "Native snapshot omission overflow hash")
690
+ if (
691
+ overflow["ref"] != f"native-snapshot://omitted-overflow/{overflow_hash}"
692
+ or _positive_int(overflow["count"], "Native snapshot omission overflow count")
693
+ != overflow_count
694
+ ):
695
+ raise NativeEvidenceError("Native snapshot omission overflow is inconsistent")
696
+ if (
697
+ (overflow_count == 0 and overflow is not None)
698
+ or (overflow_count > 0 and overflow is None)
699
+ or projection["complete"] != (omitted_count == 0)
700
+ ):
701
+ raise NativeEvidenceError("Native snapshot omission state is inconsistent")
702
+ if canonical_hash("comet.native.content-snapshot-projection.v1", projection) != expected_hash:
703
+ raise NativeEvidenceError("Native snapshot projection content hash mismatch")
704
+ return projection
705
+
706
+
707
+ def _parse_declared_artifact(value: Any, label: str) -> dict[str, str]:
708
+ artifact = _record(value, label)
709
+ _exact_keys(artifact, ["path", "kind"], label=label)
710
+ if artifact["kind"] not in {"file", "directory"}:
711
+ raise NativeEvidenceError(f"{label} kind is invalid")
712
+ return {"path": portable_ref(artifact["path"], f"{label} path"), "kind": artifact["kind"]}
713
+
714
+
715
+ def _parse_identity(value: Any, label: str) -> dict[str, Any] | None:
716
+ if value is None:
717
+ return None
718
+ identity = _record(value, label)
719
+ _exact_keys(identity, ["hash", "size"], label=label)
720
+ return {
721
+ "hash": _hash(identity["hash"], f"{label} hash"),
722
+ "size": _nonnegative_int(identity["size"], f"{label} size"),
723
+ }
724
+
725
+
726
+ def _snapshot_changes(baseline: dict, current: dict) -> list[dict[str, Any]]:
727
+ before = {
728
+ entry["path"]: {"hash": entry["hash"], "size": entry["size"]}
729
+ for entry in baseline["entries"]
730
+ }
731
+ after = {
732
+ entry["path"]: {"hash": entry["hash"], "size": entry["size"]}
733
+ for entry in current["entries"]
734
+ }
735
+ result = []
736
+ for path in sorted(set(before) | set(after)):
737
+ if before.get(path) == after.get(path):
738
+ continue
739
+ result.append(
740
+ {
741
+ "path": path,
742
+ "kind": "added"
743
+ if path not in before
744
+ else "removed"
745
+ if path not in after
746
+ else "modified",
747
+ "before": before.get(path),
748
+ "after": after.get(path),
749
+ }
750
+ )
751
+ return result
752
+
753
+
754
+ def _artifact_covers(artifact: dict[str, str], path: str) -> bool:
755
+ return artifact["path"] == path or (
756
+ artifact["kind"] == "directory" and path.startswith(f"{artifact['path']}/")
757
+ )
758
+
759
+
760
+ def _derived_unresolved_scope(identity: dict[str, Any], reason: str) -> dict[str, Any]:
761
+ return {
762
+ "id": ("scope:" + canonical_hash("comet.native.unresolved-scope-id.v1", identity)),
763
+ "kind": identity["kind"],
764
+ "source": identity["source"],
765
+ "path": identity["path"],
766
+ "reason": reason,
767
+ }
768
+
769
+
770
+ def _snapshot_omission_scopes(source: str, projection: dict[str, Any]) -> list[dict[str, Any]]:
771
+ scopes = [
772
+ _derived_unresolved_scope(
773
+ {
774
+ "kind": "snapshot-omission",
775
+ "source": source,
776
+ "path": omission["path"],
777
+ "evidence": {
778
+ "reason": omission["reason"],
779
+ "size": omission["size"],
780
+ "type": omission["type"],
781
+ },
782
+ },
783
+ f"{source} snapshot omitted {omission['path']}: {omission['reason']}",
784
+ )
785
+ for omission in projection["omitted"]
786
+ ]
787
+ if not projection["complete"]:
788
+ scopes.append(
789
+ _derived_unresolved_scope(
790
+ {
791
+ "kind": "snapshot-incomplete",
792
+ "source": source,
793
+ "path": None,
794
+ "evidence": {"omittedCount": projection["omittedCount"]},
795
+ },
796
+ f"{source} snapshot is incomplete",
797
+ )
798
+ )
799
+ overflow = projection.get("omissionOverflow")
800
+ if overflow is not None:
801
+ scopes.append(
802
+ _derived_unresolved_scope(
803
+ {
804
+ "kind": "snapshot-omission-overflow",
805
+ "source": source,
806
+ "path": None,
807
+ "evidence": {
808
+ "count": overflow["count"],
809
+ "hash": overflow["hash"],
810
+ "ref": overflow["ref"],
811
+ },
812
+ },
813
+ f"{source} snapshot has {overflow['count']} unlisted omissions",
814
+ )
815
+ )
816
+ return scopes
817
+
818
+
819
+ def _unresolved_sort_key(item: dict[str, Any]) -> tuple[str, str, tuple[int, str], str]:
820
+ path = item["path"]
821
+ return (
822
+ item["kind"],
823
+ item["source"],
824
+ (0, "") if path is None else (1, path),
825
+ item["id"],
826
+ )
827
+
828
+
829
+ def parse_scope_bundle(
830
+ change_root: Path,
831
+ scope_ref: Any,
832
+ *,
833
+ project_root: Path | None = None,
834
+ ) -> dict[str, Any]:
835
+ reference = portable_ref(scope_ref, "Implementation scope ref")
836
+ match = re.fullmatch(r"runtime/evidence/scopes/([a-f0-9]{64})\.json", reference)
837
+ if not match:
838
+ raise NativeEvidenceError("Implementation scope ref is not content addressed")
839
+ expected_hash = match.group(1)
840
+ scope = _record(
841
+ read_contained_json(change_root, reference, "Implementation scope"), "Implementation scope"
842
+ )
843
+ _exact_keys(
844
+ scope,
845
+ [
846
+ "schema",
847
+ "contractHash",
848
+ "baselineProjectionRef",
849
+ "baselineProjectionHash",
850
+ "currentProjectionRef",
851
+ "currentProjectionHash",
852
+ "complete",
853
+ "declaredArtifacts",
854
+ "changes",
855
+ "unattributed",
856
+ "unresolvedScopes",
857
+ "noCodeReason",
858
+ "scopeHash",
859
+ ],
860
+ ["gitAdvisory"],
861
+ label="Implementation scope",
862
+ )
863
+ if scope["schema"] != "comet.native.implementation-scope.v2":
864
+ raise NativeEvidenceError("Implementation scope schema is invalid")
865
+ if scope.get("gitAdvisory") is not None:
866
+ advisory = _record(scope["gitAdvisory"], "Implementation scope Git advisory")
867
+ _exact_keys(
868
+ advisory,
869
+ [
870
+ "advisoryOnly",
871
+ "changedPaths",
872
+ "pathsPresentInSnapshotChanges",
873
+ "pathsAbsentFromSnapshotChanges",
874
+ ],
875
+ label="Implementation scope Git advisory",
876
+ )
877
+ if advisory["advisoryOnly"] is not True:
878
+ raise NativeEvidenceError("Implementation scope Git advisory is not advisory-only")
879
+ contract_hash = _hash(scope["contractHash"], "Implementation scope contract hash")
880
+ baseline_hash = _hash(scope["baselineProjectionHash"], "Baseline projection hash")
881
+ current_hash = _hash(scope["currentProjectionHash"], "Current projection hash")
882
+ expected_baseline_ref = f"runtime/evidence/snapshots/{baseline_hash}.json"
883
+ expected_current_ref = f"runtime/evidence/snapshots/{current_hash}.json"
884
+ if (
885
+ scope["baselineProjectionRef"] != expected_baseline_ref
886
+ or scope["currentProjectionRef"] != expected_current_ref
887
+ ):
888
+ raise NativeEvidenceError("Implementation scope snapshot ref/hash binding is invalid")
889
+ baseline = _parse_snapshot_projection(
890
+ read_contained_json(change_root, expected_baseline_ref, "Baseline projection"),
891
+ baseline_hash,
892
+ )
893
+ current = _parse_snapshot_projection(
894
+ read_contained_json(change_root, expected_current_ref, "Current projection"), current_hash
895
+ )
896
+ if not isinstance(scope["complete"], bool):
897
+ raise NativeEvidenceError("Implementation scope completeness is invalid")
898
+ if not all(
899
+ isinstance(scope[key], list)
900
+ for key in ("declaredArtifacts", "changes", "unattributed", "unresolvedScopes")
901
+ ):
902
+ raise NativeEvidenceError("Implementation scope collections are invalid")
903
+ declared = [
904
+ _parse_declared_artifact(item, f"Declared artifact {index}")
905
+ for index, item in enumerate(scope["declaredArtifacts"])
906
+ ]
907
+ if declared != sorted(declared, key=lambda item: (item["path"], item["kind"])) or len(
908
+ {item["path"] for item in declared}
909
+ ) != len(declared):
910
+ raise NativeEvidenceError("Declared artifacts are not sorted and unique")
911
+ expected_changes = _snapshot_changes(baseline, current)
912
+ parsed_changes = []
913
+ for index, raw in enumerate(scope["changes"]):
914
+ change = _record(raw, f"Implementation change {index}")
915
+ _exact_keys(
916
+ change,
917
+ ["path", "kind", "before", "after", "attributedTo"],
918
+ label=f"Implementation change {index}",
919
+ )
920
+ path = portable_ref(change["path"], f"Implementation change {index} path")
921
+ if not isinstance(change["attributedTo"], list):
922
+ raise NativeEvidenceError(f"Implementation change {index} attribution must be an array")
923
+ attributed = [
924
+ _parse_declared_artifact(
925
+ item, f"Implementation change {index} attribution {item_index}"
926
+ )
927
+ for item_index, item in enumerate(change["attributedTo"])
928
+ ]
929
+ expected_attribution = [item for item in declared if _artifact_covers(item, path)]
930
+ parsed_changes.append(
931
+ {
932
+ "path": path,
933
+ "kind": change["kind"],
934
+ "before": _parse_identity(
935
+ change["before"], f"Implementation change {index} before"
936
+ ),
937
+ "after": _parse_identity(change["after"], f"Implementation change {index} after"),
938
+ "attributedTo": attributed,
939
+ }
940
+ )
941
+ if attributed != expected_attribution:
942
+ raise NativeEvidenceError(f"Implementation change {path} attribution is forged")
943
+ expected_with_attribution = [
944
+ {
945
+ **item,
946
+ "attributedTo": [
947
+ artifact for artifact in declared if _artifact_covers(artifact, item["path"])
948
+ ],
949
+ }
950
+ for item in expected_changes
951
+ ]
952
+ if parsed_changes != expected_with_attribution:
953
+ raise NativeEvidenceError("Implementation scope changes do not match its snapshots")
954
+ expected_unattributed = [item for item in parsed_changes if not item["attributedTo"]]
955
+ if scope["unattributed"] != expected_unattributed:
956
+ raise NativeEvidenceError("Implementation scope unattributed changes are inconsistent")
957
+ no_code_reason = scope["noCodeReason"]
958
+ if no_code_reason is not None and (
959
+ not isinstance(no_code_reason, str)
960
+ or not no_code_reason
961
+ or no_code_reason != no_code_reason.strip()
962
+ ):
963
+ raise NativeEvidenceError("Implementation scope no-code reason is invalid")
964
+
965
+ unresolved_kinds = {
966
+ "unattributed-change",
967
+ "snapshot-omission",
968
+ "snapshot-incomplete",
969
+ "snapshot-omission-overflow",
970
+ "missing-no-code-reason",
971
+ }
972
+ unresolved_sources = {"baseline", "current", "implementation-scope"}
973
+ parsed_unresolved = []
974
+ for index, raw in enumerate(scope["unresolvedScopes"]):
975
+ unresolved = _record(raw, f"Unresolved scope {index}")
976
+ _exact_keys(
977
+ unresolved,
978
+ ["id", "kind", "source", "path", "reason"],
979
+ label=f"Unresolved scope {index}",
980
+ )
981
+ if not isinstance(unresolved["id"], str) or not SCOPE_ID_PATTERN.fullmatch(
982
+ unresolved["id"]
983
+ ):
984
+ raise NativeEvidenceError(f"Unresolved scope {index} id is invalid")
985
+ if unresolved["kind"] not in unresolved_kinds:
986
+ raise NativeEvidenceError(f"Unresolved scope {index} kind is invalid")
987
+ if unresolved["source"] not in unresolved_sources:
988
+ raise NativeEvidenceError(f"Unresolved scope {index} source is invalid")
989
+ path = unresolved["path"]
990
+ if path is not None:
991
+ path = portable_ref(path, f"Unresolved scope {index} path")
992
+ reason = unresolved["reason"]
993
+ if not isinstance(reason, str) or not reason or reason != reason.strip():
994
+ raise NativeEvidenceError(f"Unresolved scope {index} reason is invalid")
995
+ parsed_unresolved.append(
996
+ {
997
+ "id": unresolved["id"],
998
+ "kind": unresolved["kind"],
999
+ "source": unresolved["source"],
1000
+ "path": path,
1001
+ "reason": reason,
1002
+ }
1003
+ )
1004
+
1005
+ expected_unresolved = [
1006
+ *(
1007
+ _derived_unresolved_scope(
1008
+ {
1009
+ "kind": "unattributed-change",
1010
+ "source": "implementation-scope",
1011
+ "path": change["path"],
1012
+ "evidence": {
1013
+ "after": change["after"],
1014
+ "before": change["before"],
1015
+ "changeKind": change["kind"],
1016
+ },
1017
+ },
1018
+ f"Changed path is not covered by a declared artifact: {change['path']}",
1019
+ )
1020
+ for change in expected_unattributed
1021
+ ),
1022
+ *_snapshot_omission_scopes("baseline", baseline),
1023
+ *_snapshot_omission_scopes("current", current),
1024
+ ]
1025
+ if not parsed_changes and no_code_reason is None:
1026
+ expected_unresolved.append(
1027
+ _derived_unresolved_scope(
1028
+ {
1029
+ "kind": "missing-no-code-reason",
1030
+ "source": "implementation-scope",
1031
+ "path": None,
1032
+ "evidence": {
1033
+ "baselineProjectionHash": baseline_hash,
1034
+ "currentProjectionHash": current_hash,
1035
+ },
1036
+ },
1037
+ "A non-empty no-code reason is required when the snapshots contain no changes",
1038
+ )
1039
+ )
1040
+ expected_unresolved = sorted(
1041
+ {item["id"]: item for item in expected_unresolved}.values(),
1042
+ key=_unresolved_sort_key,
1043
+ )
1044
+ unresolved_ids = [item["id"] for item in parsed_unresolved]
1045
+ if (
1046
+ len(unresolved_ids) != len(set(unresolved_ids))
1047
+ or parsed_unresolved != sorted(parsed_unresolved, key=_unresolved_sort_key)
1048
+ or parsed_unresolved != expected_unresolved
1049
+ ):
1050
+ raise NativeEvidenceError(
1051
+ "Implementation scope unresolved entries do not match the Runtime-derived scope"
1052
+ )
1053
+ if scope["complete"] != (len(parsed_unresolved) == 0):
1054
+ raise NativeEvidenceError("Implementation scope completeness is inconsistent")
1055
+ content = {key: value for key, value in scope.items() if key != "scopeHash"}
1056
+ scope_hash = _hash(scope["scopeHash"], "Implementation scope hash")
1057
+ if (
1058
+ scope_hash != expected_hash
1059
+ or canonical_hash("comet.native.implementation-scope.v2", content) != scope_hash
1060
+ ):
1061
+ raise NativeEvidenceError("Implementation scope filename/content hash mismatch")
1062
+ if project_root is not None:
1063
+ for entry in current["entries"]:
1064
+ target = contained_file(project_root, entry["path"], "Current snapshot project entry")
1065
+ if target.stat().st_size != entry["size"] or sha256_file(target) != entry["hash"]:
1066
+ raise NativeEvidenceError(
1067
+ f"Current snapshot project entry drifted: {entry['path']}"
1068
+ )
1069
+ return {"scope": scope, "baseline": baseline, "current": current, "contractHash": contract_hash}
1070
+
1071
+
1072
+ def parse_partial_allowance(
1073
+ change_root: Path,
1074
+ allowance_ref: Any,
1075
+ *,
1076
+ expected_change: str,
1077
+ ) -> dict[str, Any]:
1078
+ reference = portable_ref(allowance_ref, "Partial allowance ref")
1079
+ match = re.fullmatch(r"runtime/evidence/allowances/([a-f0-9]{64})\.json", reference)
1080
+ if not match:
1081
+ raise NativeEvidenceError("Partial allowance ref is not content addressed")
1082
+ allowance = _record(
1083
+ read_contained_json(change_root, reference, "Partial allowance"), "Partial allowance"
1084
+ )
1085
+ _exact_keys(
1086
+ allowance,
1087
+ [
1088
+ "schema",
1089
+ "change",
1090
+ "scopeHash",
1091
+ "scopeIds",
1092
+ "reason",
1093
+ "confirmedSummary",
1094
+ "sourceRevision",
1095
+ "confirmedAt",
1096
+ "allowanceHash",
1097
+ ],
1098
+ label="Partial allowance",
1099
+ )
1100
+ if (
1101
+ allowance["schema"] != "comet.native.partial-allowance.v1"
1102
+ or allowance["change"] != expected_change
1103
+ ):
1104
+ raise NativeEvidenceError("Partial allowance schema/change binding is invalid")
1105
+ scope_hash = _hash(allowance["scopeHash"], "Partial allowance scope hash")
1106
+ scope_ids = allowance["scopeIds"]
1107
+ if (
1108
+ not isinstance(scope_ids, list)
1109
+ or not scope_ids
1110
+ or any(
1111
+ not isinstance(item, str) or not SCOPE_ID_PATTERN.fullmatch(item) for item in scope_ids
1112
+ )
1113
+ or scope_ids != sorted(set(scope_ids))
1114
+ ):
1115
+ raise NativeEvidenceError("Partial allowance scope IDs are invalid")
1116
+ for key in ("reason", "confirmedSummary"):
1117
+ if (
1118
+ not isinstance(allowance[key], str)
1119
+ or not allowance[key]
1120
+ or allowance[key] != allowance[key].strip()
1121
+ ):
1122
+ raise NativeEvidenceError(f"Partial allowance {key} is invalid")
1123
+ _positive_int(allowance["sourceRevision"], "Partial allowance source revision")
1124
+ _timestamp(allowance["confirmedAt"], "Partial allowance timestamp")
1125
+ content = {key: value for key, value in allowance.items() if key != "allowanceHash"}
1126
+ allowance_hash = _hash(allowance["allowanceHash"], "Partial allowance hash")
1127
+ if (
1128
+ allowance_hash != match.group(1)
1129
+ or canonical_hash("comet.native.partial-allowance.v1", content) != allowance_hash
1130
+ ):
1131
+ raise NativeEvidenceError("Partial allowance filename/content hash mismatch")
1132
+ scope_bundle = parse_scope_bundle(change_root, f"runtime/evidence/scopes/{scope_hash}.json")
1133
+ scope = scope_bundle["scope"]
1134
+ expected_ids = sorted(item["id"] for item in scope["unresolvedScopes"])
1135
+ if scope["complete"] or scope_ids != expected_ids:
1136
+ raise NativeEvidenceError("Partial allowance does not bind the unresolved scope")
1137
+ return allowance
1138
+
1139
+
1140
+ def _parse_acceptance_trace(
1141
+ value: Any,
1142
+ *,
1143
+ contract: dict[str, Any],
1144
+ project_root: Path,
1145
+ ) -> dict[str, Any]:
1146
+ trace = _record(value, "Native acceptance trace")
1147
+ _exact_keys(
1148
+ trace,
1149
+ [
1150
+ "schema",
1151
+ "nativeRootRef",
1152
+ "criteriaHash",
1153
+ "total",
1154
+ "evidenced",
1155
+ "skipped",
1156
+ "entries",
1157
+ "traceHash",
1158
+ ],
1159
+ label="Native acceptance trace",
1160
+ )
1161
+ if trace["schema"] != "comet.native.acceptance-trace.v1":
1162
+ raise NativeEvidenceError("Native acceptance trace schema is invalid")
1163
+ native_root_ref = portable_ref(trace["nativeRootRef"], "Native root ref")
1164
+ criteria_hash = _hash(trace["criteriaHash"], "Acceptance criteria hash")
1165
+ if criteria_hash != contract["acceptanceHash"]:
1166
+ raise NativeEvidenceError("Acceptance trace is not bound to the contract")
1167
+ entries = trace["entries"]
1168
+ if not isinstance(entries, list):
1169
+ raise NativeEvidenceError("Acceptance trace entries are invalid")
1170
+ expected_by_id = {item["id"]: item for item in contract["acceptance"]}
1171
+ parsed = []
1172
+ for index, raw in enumerate(entries):
1173
+ entry = _record(raw, f"Acceptance trace entry {index}")
1174
+ _exact_keys(
1175
+ entry,
1176
+ ["acceptanceId", "kind", "source", "evidenceRefs", "skippedReason"],
1177
+ label=f"Acceptance trace entry {index}",
1178
+ )
1179
+ acceptance_id = entry["acceptanceId"]
1180
+ if not isinstance(acceptance_id, str) or not ACCEPTANCE_ID_PATTERN.fullmatch(acceptance_id):
1181
+ raise NativeEvidenceError(f"Acceptance trace entry {index} has a forged ID")
1182
+ criterion = expected_by_id.get(acceptance_id)
1183
+ if (
1184
+ criterion is None
1185
+ or entry["kind"] != criterion["kind"]
1186
+ or entry["source"] != criterion["source"]
1187
+ ):
1188
+ raise NativeEvidenceError(f"Acceptance trace entry {index} is not in the contract")
1189
+ refs = entry["evidenceRefs"]
1190
+ if (
1191
+ not isinstance(refs, list)
1192
+ or any(not isinstance(ref, str) for ref in refs)
1193
+ or refs != sorted(set(refs))
1194
+ ):
1195
+ raise NativeEvidenceError(f"Acceptance trace entry {index} refs are not canonical")
1196
+ skipped = entry["skippedReason"]
1197
+ if (not refs) == (skipped is None):
1198
+ raise NativeEvidenceError(f"Acceptance trace entry {index} evidence state is invalid")
1199
+ if skipped is not None and (
1200
+ not isinstance(skipped, str) or not skipped or skipped != skipped.strip()
1201
+ ):
1202
+ raise NativeEvidenceError(f"Acceptance trace entry {index} skipped reason is invalid")
1203
+ for evidence_ref in refs:
1204
+ reference = portable_ref(evidence_ref, f"Acceptance evidence ref {acceptance_id}")
1205
+ lower = reference.lower()
1206
+ if (
1207
+ lower.startswith((".cache/", ".git/", ".env"))
1208
+ or lower == native_root_ref.lower()
1209
+ or lower.startswith(f"{native_root_ref.lower()}/")
1210
+ ):
1211
+ raise NativeEvidenceError(
1212
+ f"Acceptance evidence ref is workflow/sensitive metadata: {reference}"
1213
+ )
1214
+ contained_file(project_root, reference, f"Acceptance evidence ref {acceptance_id}")
1215
+ parsed.append(entry)
1216
+ if parsed != sorted(parsed, key=lambda item: item["acceptanceId"]) or len(
1217
+ {item["acceptanceId"] for item in parsed}
1218
+ ) != len(parsed):
1219
+ raise NativeEvidenceError("Acceptance trace entries are not sorted and unique")
1220
+ if set(item["acceptanceId"] for item in parsed) != set(expected_by_id):
1221
+ raise NativeEvidenceError("Acceptance trace does not cover the exact contract")
1222
+ total = _nonnegative_int(trace["total"], "Acceptance trace total")
1223
+ evidenced = _nonnegative_int(trace["evidenced"], "Acceptance trace evidenced")
1224
+ skipped_count = _nonnegative_int(trace["skipped"], "Acceptance trace skipped")
1225
+ if (
1226
+ total != len(parsed)
1227
+ or evidenced != sum(bool(item["evidenceRefs"]) for item in parsed)
1228
+ or skipped_count != sum(item["skippedReason"] is not None for item in parsed)
1229
+ ):
1230
+ raise NativeEvidenceError("Acceptance trace counts are inconsistent")
1231
+ content = {key: value for key, value in trace.items() if key != "traceHash"}
1232
+ trace_hash = _hash(trace["traceHash"], "Acceptance trace hash")
1233
+ if canonical_hash("comet.native.acceptance-trace.v1", content) != trace_hash:
1234
+ raise NativeEvidenceError("Acceptance trace content hash mismatch")
1235
+ return trace
1236
+
1237
+
1238
+ def _parse_check_receipt(
1239
+ *,
1240
+ change_root: Path,
1241
+ receipt_ref: Any,
1242
+ expected_change: str,
1243
+ expected_source_revision: int,
1244
+ expected_result: str,
1245
+ expected_contract_hash: str,
1246
+ scope: dict[str, Any],
1247
+ ) -> dict[str, Any]:
1248
+ reference = portable_ref(receipt_ref, "Verification receipt ref")
1249
+ match = re.fullmatch(r"runtime/evidence/check-receipts/([a-f0-9]{64})\.json", reference)
1250
+ if not match:
1251
+ raise NativeEvidenceError("Verification receipt ref is invalid")
1252
+ receipt_file = contained_file(change_root, reference, "Verification receipt")
1253
+ if receipt_file.stat().st_size > 512 * 1024:
1254
+ raise NativeEvidenceError("Native check receipt exceeds its byte budget")
1255
+ try:
1256
+ receipt = _record(
1257
+ json.loads(receipt_file.read_text(encoding="utf-8")),
1258
+ "Native check receipt",
1259
+ )
1260
+ except (OSError, UnicodeDecodeError, json.JSONDecodeError) as error:
1261
+ raise NativeEvidenceError(f"Native check receipt is invalid JSON: {error}") from error
1262
+ _exact_keys(
1263
+ receipt,
1264
+ [
1265
+ "schema",
1266
+ "change",
1267
+ "sourceRevision",
1268
+ "checker",
1269
+ "inputHash",
1270
+ "status",
1271
+ "startedAt",
1272
+ "endedAt",
1273
+ "contract",
1274
+ "implementation",
1275
+ "counts",
1276
+ "issues",
1277
+ "issuesTruncated",
1278
+ "stale",
1279
+ "staleReasons",
1280
+ "receiptHash",
1281
+ ],
1282
+ label="Native check receipt",
1283
+ )
1284
+ change = receipt["change"]
1285
+ if (
1286
+ receipt["schema"] != "comet.native.check-receipt.v1"
1287
+ or not isinstance(change, str)
1288
+ or len(change.encode("utf-8")) > 128
1289
+ or not CHANGE_NAME_PATTERN.fullmatch(change)
1290
+ ):
1291
+ raise NativeEvidenceError("Native check receipt schema/change is invalid")
1292
+ source_revision = _positive_int(
1293
+ receipt["sourceRevision"], "Native check receipt source revision"
1294
+ )
1295
+
1296
+ checker = _record(receipt["checker"], "Native check receipt checker")
1297
+ _exact_keys(
1298
+ checker,
1299
+ ["policy", "version", "hash", "limits"],
1300
+ label="Native check receipt checker",
1301
+ )
1302
+ limits = _record(checker["limits"], "Native check receipt limits")
1303
+ _exact_keys(
1304
+ limits,
1305
+ ["maxFiles", "maxFileBytes", "maxTotalBytes", "maxIssues"],
1306
+ label="Native check receipt limits",
1307
+ )
1308
+ if (
1309
+ checker["policy"] != "scoped-text-safety"
1310
+ or isinstance(checker["version"], bool)
1311
+ or not isinstance(checker["version"], int)
1312
+ or checker["version"] != 1
1313
+ or checker["hash"] != NATIVE_CHECKER_HASH
1314
+ or any(
1315
+ isinstance(limits[key], bool) or not isinstance(limits[key], int)
1316
+ for key in NATIVE_CHECK_LIMITS
1317
+ )
1318
+ or limits != NATIVE_CHECK_LIMITS
1319
+ ):
1320
+ raise NativeEvidenceError("Native check receipt checker policy is unsupported")
1321
+
1322
+ contract = _record(receipt["contract"], "Native check receipt contract")
1323
+ _exact_keys(
1324
+ contract,
1325
+ ["expectedHash", "beforeHash", "afterHash"],
1326
+ label="Native check receipt contract",
1327
+ )
1328
+ parsed_contract = {
1329
+ "expectedHash": _hash(
1330
+ contract["expectedHash"], "Native check receipt expected contract hash"
1331
+ ),
1332
+ "beforeHash": _hash(contract["beforeHash"], "Native check receipt before contract hash"),
1333
+ "afterHash": _hash(contract["afterHash"], "Native check receipt after contract hash"),
1334
+ }
1335
+ implementation = _record(receipt["implementation"], "Native check receipt implementation")
1336
+ _exact_keys(
1337
+ implementation,
1338
+ [
1339
+ "scopeHash",
1340
+ "expectedSnapshotHash",
1341
+ "beforeSnapshotHash",
1342
+ "afterSnapshotHash",
1343
+ ],
1344
+ label="Native check receipt implementation",
1345
+ )
1346
+ parsed_implementation = {
1347
+ "scopeHash": _hash(implementation["scopeHash"], "Native check receipt scope hash"),
1348
+ "expectedSnapshotHash": _hash(
1349
+ implementation["expectedSnapshotHash"],
1350
+ "Native check receipt expected snapshot hash",
1351
+ ),
1352
+ "beforeSnapshotHash": _hash(
1353
+ implementation["beforeSnapshotHash"],
1354
+ "Native check receipt before snapshot hash",
1355
+ ),
1356
+ "afterSnapshotHash": _hash(
1357
+ implementation["afterSnapshotHash"],
1358
+ "Native check receipt after snapshot hash",
1359
+ ),
1360
+ }
1361
+ expected_input_hash = canonical_hash(
1362
+ "comet.native.check-input.v1",
1363
+ {
1364
+ "change": change,
1365
+ "sourceRevision": source_revision,
1366
+ "checkerHash": checker["hash"],
1367
+ "contractHash": parsed_contract["expectedHash"],
1368
+ "scopeHash": parsed_implementation["scopeHash"],
1369
+ "snapshotHash": parsed_implementation["expectedSnapshotHash"],
1370
+ },
1371
+ )
1372
+ if _hash(receipt["inputHash"], "Native check receipt input hash") != expected_input_hash:
1373
+ raise NativeEvidenceError("Native check receipt input hash mismatch")
1374
+ if receipt["status"] not in {"passed", "failed"}:
1375
+ raise NativeEvidenceError("Native check receipt status is invalid")
1376
+ started_at = _timestamp(receipt["startedAt"], "Native check receipt startedAt")
1377
+ ended_at = _timestamp(receipt["endedAt"], "Native check receipt endedAt")
1378
+ if ended_at < started_at:
1379
+ raise NativeEvidenceError("Native check receipt endedAt precedes startedAt")
1380
+
1381
+ counts = _record(receipt["counts"], "Native check receipt counts")
1382
+ _exact_keys(
1383
+ counts,
1384
+ [
1385
+ "filesSelected",
1386
+ "filesScanned",
1387
+ "binaryFilesSkipped",
1388
+ "bytesScanned",
1389
+ "issueCount",
1390
+ "recordedIssueCount",
1391
+ ],
1392
+ label="Native check receipt counts",
1393
+ )
1394
+ parsed_counts = {
1395
+ key: _nonnegative_int(value, f"Native check receipt {key}") for key, value in counts.items()
1396
+ }
1397
+ if (
1398
+ parsed_counts["filesScanned"] + parsed_counts["binaryFilesSkipped"]
1399
+ > parsed_counts["filesSelected"]
1400
+ or parsed_counts["filesScanned"] + parsed_counts["binaryFilesSkipped"]
1401
+ > NATIVE_CHECK_LIMITS["maxFiles"]
1402
+ or parsed_counts["bytesScanned"] > NATIVE_CHECK_LIMITS["maxTotalBytes"]
1403
+ or parsed_counts["recordedIssueCount"] > parsed_counts["issueCount"]
1404
+ or parsed_counts["recordedIssueCount"] > NATIVE_CHECK_LIMITS["maxIssues"]
1405
+ ):
1406
+ raise NativeEvidenceError("Native check receipt count accounting is invalid")
1407
+
1408
+ raw_issues = receipt["issues"]
1409
+ if not isinstance(raw_issues, list) or len(raw_issues) > NATIVE_CHECK_LIMITS["maxIssues"]:
1410
+ raise NativeEvidenceError("Native check receipt issues are not a bounded array")
1411
+ issue_rank = {kind: index for index, kind in enumerate(NATIVE_CHECK_ISSUE_KINDS)}
1412
+ issues = []
1413
+ for index, raw in enumerate(raw_issues):
1414
+ issue = _record(raw, f"Native check receipt issue {index}")
1415
+ _exact_keys(
1416
+ issue,
1417
+ ["path", "line", "kind"],
1418
+ label=f"Native check receipt issue {index}",
1419
+ )
1420
+ path = portable_ref(issue["path"], f"Native check receipt issue {index} path")
1421
+ if len(path.encode("utf-8")) > 2048:
1422
+ raise NativeEvidenceError(f"Native check receipt issue {index} path is too long")
1423
+ if issue["kind"] not in issue_rank:
1424
+ raise NativeEvidenceError(f"Native check receipt issue {index} kind is invalid")
1425
+ issues.append(
1426
+ {
1427
+ "path": path,
1428
+ "line": _positive_int(issue["line"], f"Native check receipt issue {index} line"),
1429
+ "kind": issue["kind"],
1430
+ }
1431
+ )
1432
+ if issues != sorted(
1433
+ issues,
1434
+ key=lambda issue: (issue["path"], issue["line"], issue_rank[issue["kind"]]),
1435
+ ):
1436
+ raise NativeEvidenceError("Native check receipt issues are not canonical")
1437
+ if parsed_counts["recordedIssueCount"] != len(issues):
1438
+ raise NativeEvidenceError("Native check receipt recorded issue count is inconsistent")
1439
+ if not isinstance(receipt["issuesTruncated"], bool) or receipt["issuesTruncated"] != (
1440
+ parsed_counts["issueCount"] > len(issues)
1441
+ ):
1442
+ raise NativeEvidenceError("Native check receipt issue truncation is inconsistent")
1443
+
1444
+ stale_reasons = receipt["staleReasons"]
1445
+ if (
1446
+ not isinstance(stale_reasons, list)
1447
+ or any(reason not in NATIVE_CHECK_STALE_REASONS for reason in stale_reasons)
1448
+ or len(stale_reasons) != len(set(stale_reasons))
1449
+ or stale_reasons
1450
+ != [reason for reason in NATIVE_CHECK_STALE_REASONS if reason in stale_reasons]
1451
+ ):
1452
+ raise NativeEvidenceError("Native check receipt stale reasons are not canonical")
1453
+ if not isinstance(receipt["stale"], bool) or receipt["stale"] != bool(stale_reasons):
1454
+ raise NativeEvidenceError("Native check receipt stale state is inconsistent")
1455
+ expected_status = (
1456
+ "passed" if parsed_counts["issueCount"] == 0 and not receipt["stale"] else "failed"
1457
+ )
1458
+ if receipt["status"] != expected_status:
1459
+ raise NativeEvidenceError("Native check receipt status is inconsistent")
1460
+ if receipt["status"] == "passed" and (
1461
+ parsed_counts["filesSelected"] > NATIVE_CHECK_LIMITS["maxFiles"]
1462
+ or parsed_counts["filesScanned"] + parsed_counts["binaryFilesSkipped"]
1463
+ != parsed_counts["filesSelected"]
1464
+ ):
1465
+ raise NativeEvidenceError("Native check receipt passed without full file coverage")
1466
+ if parsed_counts["filesSelected"] > NATIVE_CHECK_LIMITS["maxFiles"] and not any(
1467
+ issue["kind"] == "scan-limit" for issue in issues
1468
+ ):
1469
+ raise NativeEvidenceError("Native check receipt exceeded its budget without an issue")
1470
+
1471
+ content = {
1472
+ "schema": "comet.native.check-receipt.v1",
1473
+ "change": change,
1474
+ "sourceRevision": source_revision,
1475
+ "checker": {
1476
+ "policy": "scoped-text-safety",
1477
+ "version": 1,
1478
+ "hash": NATIVE_CHECKER_HASH,
1479
+ "limits": dict(NATIVE_CHECK_LIMITS),
1480
+ },
1481
+ "inputHash": expected_input_hash,
1482
+ "status": receipt["status"],
1483
+ "startedAt": started_at,
1484
+ "endedAt": ended_at,
1485
+ "contract": parsed_contract,
1486
+ "implementation": parsed_implementation,
1487
+ "counts": parsed_counts,
1488
+ "issues": issues,
1489
+ "issuesTruncated": receipt["issuesTruncated"],
1490
+ "stale": receipt["stale"],
1491
+ "staleReasons": stale_reasons,
1492
+ }
1493
+ receipt_hash = _hash(receipt["receiptHash"], "Native check receipt content hash")
1494
+ if (
1495
+ receipt_hash != match.group(1)
1496
+ or canonical_hash("comet.native.check-receipt.v1", content) != receipt_hash
1497
+ ):
1498
+ raise NativeEvidenceError("Native check receipt filename/content hash mismatch")
1499
+
1500
+ selected_files = [entry for entry in scope["changes"] if entry["after"] is not None]
1501
+ selected_bytes = sum(entry["after"]["size"] for entry in selected_files)
1502
+ if (
1503
+ receipt["stale"]
1504
+ or change != expected_change
1505
+ or source_revision != expected_source_revision
1506
+ or set(parsed_contract.values()) != {expected_contract_hash}
1507
+ or parsed_implementation["scopeHash"] != scope["scopeHash"]
1508
+ or set(
1509
+ (
1510
+ parsed_implementation["expectedSnapshotHash"],
1511
+ parsed_implementation["beforeSnapshotHash"],
1512
+ parsed_implementation["afterSnapshotHash"],
1513
+ )
1514
+ )
1515
+ != {scope["currentProjectionHash"]}
1516
+ or parsed_counts["filesSelected"] != len(selected_files)
1517
+ or (
1518
+ receipt["status"] == "passed"
1519
+ and (
1520
+ parsed_counts["filesScanned"] + parsed_counts["binaryFilesSkipped"]
1521
+ != len(selected_files)
1522
+ or parsed_counts["bytesScanned"] != selected_bytes
1523
+ )
1524
+ )
1525
+ ):
1526
+ raise NativeEvidenceError("Native check receipt is not bound to the verification facts")
1527
+ if expected_result == "pass" and receipt["status"] != "passed":
1528
+ raise NativeEvidenceError("Native check receipt outcome does not support a pass")
1529
+ return {**content, "receiptHash": receipt_hash}
1530
+
1531
+
1532
+ def parse_verification_bundle(
1533
+ *,
1534
+ project_root: Path,
1535
+ change_root: Path,
1536
+ evidence_ref: Any,
1537
+ state: dict[str, Any],
1538
+ expected_result: str | None = None,
1539
+ expected_freshness: str | None = None,
1540
+ verify_current_files: bool = False,
1541
+ ) -> dict[str, Any]:
1542
+ change = state.get("name")
1543
+ if not isinstance(change, str) or not CHANGE_NAME_PATTERN.fullmatch(change):
1544
+ raise NativeEvidenceError("Native change name is invalid")
1545
+ reference = portable_ref(evidence_ref, "Verification evidence ref")
1546
+ match = re.fullmatch(r"runtime/evidence/verifications/([a-f0-9]{64})\.json", reference)
1547
+ if not match:
1548
+ raise NativeEvidenceError("Verification evidence ref is not content addressed")
1549
+ envelope = _record(
1550
+ read_contained_json(change_root, reference, "Verification envelope"),
1551
+ "Verification envelope",
1552
+ )
1553
+ _exact_keys(
1554
+ envelope,
1555
+ [
1556
+ "schema",
1557
+ "change",
1558
+ "sourceRevision",
1559
+ "result",
1560
+ "freshness",
1561
+ "contractHash",
1562
+ "acceptanceCriteriaHash",
1563
+ "implementationScopeRef",
1564
+ "implementationScopeHash",
1565
+ "reportRef",
1566
+ "reportHash",
1567
+ "acceptanceTrace",
1568
+ "partialAllowanceRef",
1569
+ "partialAllowanceHash",
1570
+ "receiptRef",
1571
+ "createdAt",
1572
+ "envelopeHash",
1573
+ ],
1574
+ label="Verification envelope",
1575
+ )
1576
+ if (
1577
+ envelope["schema"] != "comet.native.verification-evidence.v1"
1578
+ or envelope["change"] != change
1579
+ ):
1580
+ raise NativeEvidenceError("Verification envelope schema/change binding is invalid")
1581
+ _positive_int(envelope["sourceRevision"], "Verification source revision")
1582
+ if envelope["result"] not in {"pass", "fail"} or envelope["freshness"] not in {
1583
+ "complete",
1584
+ "partial",
1585
+ }:
1586
+ raise NativeEvidenceError("Verification result/freshness is invalid")
1587
+ if expected_result is not None and envelope["result"] != expected_result:
1588
+ raise NativeEvidenceError("Verification envelope has the wrong result")
1589
+ if expected_freshness is not None and envelope["freshness"] != expected_freshness:
1590
+ raise NativeEvidenceError("Verification envelope has the wrong freshness")
1591
+ contract = build_contract_from_change(change_root, state)
1592
+ contract_hash = _hash(envelope["contractHash"], "Verification contract hash")
1593
+ acceptance_hash = _hash(envelope["acceptanceCriteriaHash"], "Verification acceptance hash")
1594
+ if contract_hash != contract["contractHash"] or acceptance_hash != contract["acceptanceHash"]:
1595
+ raise NativeEvidenceError("Verification envelope is not bound to the archived contract")
1596
+ scope_bundle = parse_scope_bundle(
1597
+ change_root,
1598
+ envelope["implementationScopeRef"],
1599
+ project_root=project_root if verify_current_files else None,
1600
+ )
1601
+ scope = scope_bundle["scope"]
1602
+ if (
1603
+ envelope["implementationScopeHash"] != scope["scopeHash"]
1604
+ or scope["contractHash"] != contract_hash
1605
+ or envelope["freshness"] != ("complete" if scope["complete"] else "partial")
1606
+ ):
1607
+ raise NativeEvidenceError("Verification envelope/scope binding is invalid")
1608
+ _parse_acceptance_trace(
1609
+ envelope["acceptanceTrace"], contract=contract, project_root=project_root
1610
+ )
1611
+ report_ref = portable_ref(envelope["reportRef"], "Verification report ref")
1612
+ report_hash = _hash(envelope["reportHash"], "Verification report hash")
1613
+ report_snapshot = read_contained_json(
1614
+ change_root,
1615
+ f"runtime/evidence/reports/{report_hash}.json",
1616
+ "Verification report snapshot",
1617
+ )
1618
+ if (
1619
+ not isinstance(report_snapshot, dict)
1620
+ or set(report_snapshot) != {"schema", "reportHash", "content"}
1621
+ or report_snapshot.get("schema") != "comet.native.verification-report.v1"
1622
+ or report_snapshot.get("reportHash") != report_hash
1623
+ or not isinstance(report_snapshot.get("content"), str)
1624
+ or hashlib.sha256(report_snapshot["content"].encode()).hexdigest() != report_hash
1625
+ ):
1626
+ raise NativeEvidenceError("Verification report snapshot hash mismatch")
1627
+ report_text = report_snapshot["content"]
1628
+ if verify_current_files:
1629
+ report = contained_file(change_root, report_ref, "Verification report")
1630
+ if sha256_file(report) != report_hash:
1631
+ raise NativeEvidenceError("Verification report content hash mismatch")
1632
+ for criterion in contract["acceptance"]:
1633
+ if criterion["id"] not in report_text:
1634
+ raise NativeEvidenceError("Verification report does not preserve every acceptance ID")
1635
+ allowance_ref = envelope["partialAllowanceRef"]
1636
+ allowance_hash = envelope["partialAllowanceHash"]
1637
+ if envelope["freshness"] == "complete":
1638
+ if allowance_ref is not None or allowance_hash is not None:
1639
+ raise NativeEvidenceError("Complete evidence unexpectedly has a partial allowance")
1640
+ else:
1641
+ allowance = parse_partial_allowance(change_root, allowance_ref, expected_change=change)
1642
+ if (
1643
+ allowance_hash != allowance["allowanceHash"]
1644
+ or allowance["scopeHash"] != scope["scopeHash"]
1645
+ or allowance["sourceRevision"] >= envelope["sourceRevision"]
1646
+ ):
1647
+ raise NativeEvidenceError("Verification envelope/allowance binding is invalid")
1648
+ receipt_ref = envelope["receiptRef"]
1649
+ if receipt_ref is not None:
1650
+ _parse_check_receipt(
1651
+ change_root=change_root,
1652
+ receipt_ref=receipt_ref,
1653
+ expected_change=change,
1654
+ expected_source_revision=envelope["sourceRevision"],
1655
+ expected_result=envelope["result"],
1656
+ expected_contract_hash=contract_hash,
1657
+ scope=scope,
1658
+ )
1659
+ _timestamp(envelope["createdAt"], "Verification timestamp")
1660
+ content = {key: value for key, value in envelope.items() if key != "envelopeHash"}
1661
+ envelope_hash = _hash(envelope["envelopeHash"], "Verification envelope hash")
1662
+ if (
1663
+ envelope_hash != match.group(1)
1664
+ or canonical_hash("comet.native.verification-evidence.v1", content) != envelope_hash
1665
+ ):
1666
+ raise NativeEvidenceError("Verification envelope filename/content hash mismatch")
1667
+ return {"envelope": envelope, "scope": scope, "contract": contract}
1668
+
1669
+
1670
+ def check_archive_transaction(
1671
+ workspace: Path,
1672
+ commit_data: Any,
1673
+ expected_change: str,
1674
+ expected_preflight_hash: str,
1675
+ ) -> dict[str, str]:
1676
+ """Bind a successful Archive envelope to its durable v2 transaction journal."""
1677
+ check = "archive_transaction"
1678
+ try:
1679
+ commit = _record(commit_data, "Archive commit data")
1680
+ transaction_id = commit.get("transactionId")
1681
+ if not isinstance(transaction_id, str) or not re.fullmatch(
1682
+ r"[a-f0-9-]{8,}", transaction_id
1683
+ ):
1684
+ raise NativeEvidenceError("Archive commit has no valid transactionId")
1685
+ if commit.get("preflightHash") != expected_preflight_hash:
1686
+ raise NativeEvidenceError("Archive commit does not match the expected preflight hash")
1687
+ native_root = workspace / "docs" / "comet"
1688
+ journal_ref = f"runtime/transactions/{transaction_id}/transaction.json"
1689
+ journal = _record(
1690
+ read_contained_json(native_root, journal_ref, "Archive transaction journal"),
1691
+ "Archive transaction journal",
1692
+ )
1693
+ _exact_keys(
1694
+ journal,
1695
+ [
1696
+ "schema",
1697
+ "id",
1698
+ "kind",
1699
+ "status",
1700
+ "change",
1701
+ "createdAt",
1702
+ "preflightHash",
1703
+ "operations",
1704
+ ],
1705
+ label="Archive transaction journal",
1706
+ )
1707
+ if (
1708
+ journal["schema"] != "comet.native.transaction.v2"
1709
+ or journal["id"] != transaction_id
1710
+ or journal["kind"] != "archive"
1711
+ or journal["status"] != "committed"
1712
+ or journal["change"] != expected_change
1713
+ or journal["preflightHash"] != expected_preflight_hash
1714
+ ):
1715
+ raise NativeEvidenceError("Archive envelope is not bound to one committed v2 journal")
1716
+ _timestamp(journal["createdAt"], "Archive transaction timestamp")
1717
+ operations = journal["operations"]
1718
+ if not isinstance(operations, list) or not operations or len(operations) > 65:
1719
+ raise NativeEvidenceError("Archive transaction operations are invalid")
1720
+ operation_ids: list[str] = []
1721
+ for index, raw in enumerate(operations):
1722
+ operation = _record(raw, f"Archive transaction operation {index}")
1723
+ _exact_keys(
1724
+ operation,
1725
+ ["id", "type", "target", "expectedTargetHash"],
1726
+ ["source", "staged", "backup", "expectedSourceHash", "stagedHash"],
1727
+ label=f"Archive transaction operation {index}",
1728
+ )
1729
+ operation_id = operation["id"]
1730
+ if not isinstance(operation_id, str) or not re.fullmatch(
1731
+ r"[a-z0-9][a-z0-9-]*", operation_id
1732
+ ):
1733
+ raise NativeEvidenceError(f"Archive transaction operation {index} id is invalid")
1734
+ operation_ids.append(operation_id)
1735
+ portable_ref(operation["target"], f"Archive transaction operation {index} target")
1736
+ for field in ("source", "staged", "backup"):
1737
+ if field in operation:
1738
+ portable_ref(operation[field], f"Archive transaction operation {index} {field}")
1739
+ if operation["expectedTargetHash"] is not None:
1740
+ _hash(
1741
+ operation["expectedTargetHash"],
1742
+ f"Archive transaction operation {index} target hash",
1743
+ )
1744
+ if operation["type"] == "write":
1745
+ if (
1746
+ "staged" not in operation
1747
+ or "source" in operation
1748
+ or "expectedSourceHash" in operation
1749
+ ):
1750
+ raise NativeEvidenceError("Archive write operation shape is invalid")
1751
+ _hash(operation.get("stagedHash"), "Archive staged hash")
1752
+ if (operation["expectedTargetHash"] is None) != ("backup" not in operation):
1753
+ raise NativeEvidenceError("Archive write backup binding is invalid")
1754
+ elif operation["type"] == "remove":
1755
+ if (
1756
+ any(
1757
+ field in operation
1758
+ for field in ("source", "staged", "stagedHash", "expectedSourceHash")
1759
+ )
1760
+ or "backup" not in operation
1761
+ or operation["expectedTargetHash"] is None
1762
+ ):
1763
+ raise NativeEvidenceError("Archive remove operation shape is invalid")
1764
+ elif operation["type"] == "move":
1765
+ if (
1766
+ "source" not in operation
1767
+ or any(field in operation for field in ("staged", "stagedHash", "backup"))
1768
+ or operation["expectedTargetHash"] is not None
1769
+ ):
1770
+ raise NativeEvidenceError("Archive move operation shape is invalid")
1771
+ _hash(operation.get("expectedSourceHash"), "Archive move source hash")
1772
+ else:
1773
+ raise NativeEvidenceError("Archive transaction operation type is invalid")
1774
+ if len(set(operation_ids)) != len(operation_ids):
1775
+ raise NativeEvidenceError("Archive transaction operation IDs are not unique")
1776
+ move = operations[-1]
1777
+ target = move.get("target")
1778
+ if (
1779
+ move.get("id") != "archive-change"
1780
+ or move.get("type") != "move"
1781
+ or move.get("source") != f"changes/{expected_change}"
1782
+ or not isinstance(target, str)
1783
+ or not re.fullmatch(
1784
+ rf"archive/\d{{4}}-\d{{2}}-\d{{2}}-{re.escape(expected_change)}", target
1785
+ )
1786
+ ):
1787
+ raise NativeEvidenceError(
1788
+ "Committed Archive journal has no exact content-bound final move"
1789
+ )
1790
+ for operation in operations[:-1]:
1791
+ if operation["type"] == "move" or not re.fullmatch(
1792
+ r"specs/[a-z][a-z0-9]*(?:-[a-z0-9]+)*/spec\.md", operation["target"]
1793
+ ):
1794
+ raise NativeEvidenceError("Archive transaction has a non-canonical spec operation")
1795
+ archive_dir = native_root.joinpath(*PurePosixPath(target).parts)
1796
+ _assert_real_directory_chain(native_root, archive_dir, "Archived change directory")
1797
+ if archive_dir.is_symlink() or not archive_dir.is_dir():
1798
+ raise NativeEvidenceError(
1799
+ "Archive transaction target is not the live archive directory"
1800
+ )
1801
+ events_path = contained_file(
1802
+ native_root,
1803
+ f"runtime/transactions/{transaction_id}/events.jsonl",
1804
+ "Archive transaction events",
1805
+ )
1806
+ events = []
1807
+ for line_number, line in enumerate(events_path.read_text(encoding="utf-8").splitlines(), 1):
1808
+ if not line:
1809
+ raise NativeEvidenceError("Archive transaction events contain a blank line")
1810
+ event = _record(json.loads(line), f"Archive transaction event {line_number}")
1811
+ _exact_keys(
1812
+ event,
1813
+ ["sequence", "timestamp", "type"],
1814
+ ["operationId"],
1815
+ label=f"Archive transaction event {line_number}",
1816
+ )
1817
+ if event["sequence"] != line_number:
1818
+ raise NativeEvidenceError("Archive transaction event sequence is invalid")
1819
+ _timestamp(event["timestamp"], f"Archive transaction event {line_number} timestamp")
1820
+ events.append(event)
1821
+ expected_events: list[tuple[str, str | None]] = [("prepared", None)]
1822
+ for operation in operations:
1823
+ expected_events.extend(
1824
+ [("operation-started", operation["id"]), ("operation-completed", operation["id"])]
1825
+ )
1826
+ expected_events.extend(
1827
+ [("archive-finalization-started", None), ("archive-finalized", None), ("commit", None)]
1828
+ )
1829
+ actual_events = [(event["type"], event.get("operationId")) for event in events]
1830
+ if actual_events != expected_events:
1831
+ raise NativeEvidenceError(
1832
+ "Archive transaction event lifecycle is incomplete or reordered"
1833
+ )
1834
+ serialized = canonical_json(journal)
1835
+ if str(workspace) in serialized or "\\workspace" in serialized:
1836
+ raise NativeEvidenceError(
1837
+ "Archive transaction journal exposed an absolute workspace path"
1838
+ )
1839
+ except (NativeEvidenceError, OSError, UnicodeDecodeError, json.JSONDecodeError) as error:
1840
+ return failed(check, str(error))
1841
+ return passed(check)
1842
+
1843
+
1844
+ def check_checkpoint_cas_envelopes(paths: Iterable[Path]) -> dict[str, str]:
1845
+ """Require two raw checkpoint envelopes from one revision with one winner."""
1846
+ check = "cas_single_winner"
1847
+ evidence_paths = list(paths)
1848
+ if len(evidence_paths) != 2:
1849
+ return failed(
1850
+ check, f"Expected exactly two checkpoint envelopes, found {len(evidence_paths)}"
1851
+ )
1852
+ envelopes: list[dict[str, Any]] = []
1853
+ for path in evidence_paths:
1854
+ if not path.is_file():
1855
+ return failed(check, f"Missing checkpoint evidence file: {path}")
1856
+ try:
1857
+ payload = read_json(path)
1858
+ except (OSError, json.JSONDecodeError) as error:
1859
+ return failed(check, f"Invalid checkpoint evidence in {path.name}: {error}")
1860
+ if not isinstance(payload, dict) or payload.get("command") != "checkpoint":
1861
+ return failed(check, f"{path.name} is not a raw Native checkpoint envelope")
1862
+ if not isinstance(payload.get("data"), dict):
1863
+ return failed(check, f"{path.name} has no structured checkpoint data")
1864
+ envelopes.append(payload)
1865
+
1866
+ winners = [item for item in envelopes if item.get("exitCode") == 0]
1867
+ conflicts = [item for item in envelopes if item.get("exitCode") == 73]
1868
+ if len(winners) != 1 or len(conflicts) != 1:
1869
+ return failed(
1870
+ check,
1871
+ f"Expected one exit 0 and one exit 73; observed {[item.get('exitCode') for item in envelopes]}",
1872
+ )
1873
+
1874
+ winner = winners[0]["data"]
1875
+ conflict = conflicts[0]["data"]
1876
+ expected = winner.get("expectedRevision")
1877
+ winner_change = winner.get("change")
1878
+ if not isinstance(expected, int) or isinstance(expected, bool) or expected < 1:
1879
+ return failed(check, "Checkpoint winner has no positive expectedRevision")
1880
+ if (
1881
+ winner.get("outcome") != "recorded"
1882
+ or winner.get("previousRevision") != expected
1883
+ or winner.get("revision") != expected + 1
1884
+ or not isinstance(winner_change, dict)
1885
+ or not isinstance(winner_change.get("name"), str)
1886
+ or winner_change.get("revision") != expected + 1
1887
+ ):
1888
+ return failed(check, f"Checkpoint winner has inconsistent CAS data: {winner!r}")
1889
+ if (
1890
+ conflict.get("outcome") != "revision-conflict"
1891
+ or conflict.get("change") != winner_change.get("name")
1892
+ or conflict.get("expectedRevision") != expected
1893
+ or conflict.get("actualRevision") != expected + 1
1894
+ ):
1895
+ return failed(check, f"Checkpoint conflict has inconsistent CAS data: {conflict!r}")
1896
+ return passed(check)
1897
+
1898
+
1899
+ def _get_first(mapping: dict[str, Any], *keys: str) -> Any:
1900
+ for key in keys:
1901
+ if key in mapping:
1902
+ return mapping[key]
1903
+ return None
1904
+
1905
+
1906
+ def _normalise_projection(value: Any) -> dict[str, Any] | None:
1907
+ if not isinstance(value, dict):
1908
+ return None
1909
+ name = _get_first(value, "name", "change", "changeName", "change_name")
1910
+ phase = _get_first(value, "phase", "currentPhase", "current_phase")
1911
+ if not isinstance(name, str) or phase is None:
1912
+ return None
1913
+
1914
+ verification = _get_first(value, "verificationResult", "verification_result")
1915
+ if verification is None and isinstance(value.get("verification"), dict):
1916
+ verification = _get_first(value["verification"], "result", "status")
1917
+ next_command = _get_first(
1918
+ value,
1919
+ "nextCommand",
1920
+ "next_command",
1921
+ "nextAction",
1922
+ "next_action",
1923
+ "next",
1924
+ )
1925
+ finding_source = value.get("findingSummary") or value.get("finding_summary")
1926
+ if not isinstance(finding_source, dict):
1927
+ finding_source = value.get("findings") if isinstance(value.get("findings"), dict) else {}
1928
+ finding_codes = finding_source.get("codes")
1929
+ if not isinstance(finding_codes, list):
1930
+ finding_codes = []
1931
+ continuation = value.get("continuation")
1932
+ continuation_projection = None
1933
+ if isinstance(continuation, dict):
1934
+ required_inputs = continuation.get(
1935
+ "requiredInputs", continuation.get("required_inputs", [])
1936
+ )
1937
+ continuation_projection = {
1938
+ "disposition": continuation.get("disposition"),
1939
+ "action": continuation.get("action"),
1940
+ "command": continuation.get("command"),
1941
+ "requiresUserDecision": continuation.get(
1942
+ "requiresUserDecision", continuation.get("requires_user_decision")
1943
+ ),
1944
+ "requiredInputs": sorted(required_inputs) if isinstance(required_inputs, list) else [],
1945
+ "requiredInputsTruncated": continuation.get("requiredInputsTruncated", False)
1946
+ is True,
1947
+ }
1948
+ finding_projection = {
1949
+ "total": finding_source.get("total", 0),
1950
+ "errors": finding_source.get("errors", 0),
1951
+ "warnings": finding_source.get("warnings", 0),
1952
+ "info": finding_source.get("info", 0),
1953
+ "requiresUserDecision": finding_source.get(
1954
+ "requiresUserDecision", finding_source.get("requires_user_decision", False)
1955
+ )
1956
+ is True,
1957
+ "codes": sorted(item for item in finding_codes if isinstance(item, str)),
1958
+ "truncated": finding_source.get("truncated", False) is True,
1959
+ }
1960
+ return {
1961
+ "name": name,
1962
+ "phase": phase,
1963
+ "revision": value.get("revision"),
1964
+ "selected": value.get("selected", False) is True,
1965
+ "nextCommand": next_command,
1966
+ "verificationResult": verification,
1967
+ "archiveReady": value.get("archiveReady", value.get("archive_ready")),
1968
+ "findings": finding_projection,
1969
+ "continuation": continuation_projection,
1970
+ }
1971
+
1972
+
1973
+ def _projection_records(payload: Any, *, dashboard: bool) -> list[dict[str, Any]]:
1974
+ if not isinstance(payload, dict):
1975
+ return []
1976
+ root = payload.get("data", payload)
1977
+ candidates: Any = None
1978
+ if dashboard:
1979
+ if isinstance(root, dict) and isinstance(root.get("native"), dict):
1980
+ candidates = root["native"].get("changes")
1981
+ elif isinstance(root, dict) and isinstance(root.get("snapshot"), dict):
1982
+ snapshot = root["snapshot"]
1983
+ if isinstance(snapshot.get("native"), dict):
1984
+ candidates = snapshot["native"].get("changes")
1985
+ else:
1986
+ candidates = snapshot.get("changes")
1987
+ elif isinstance(root, dict):
1988
+ candidates = root.get("changes")
1989
+ elif isinstance(root, dict) and root.get("schema") == "comet.native.status-page.v1":
1990
+ candidates = root.get("items")
1991
+ elif isinstance(root, list):
1992
+ candidates = root
1993
+ else:
1994
+ candidates = [root]
1995
+ if not isinstance(candidates, list):
1996
+ return []
1997
+ result = []
1998
+ for candidate in candidates:
1999
+ projection = _normalise_projection(candidate)
2000
+ if projection is not None:
2001
+ result.append(projection)
2002
+ return result
2003
+
2004
+
2005
+ def check_dashboard_projection(
2006
+ cli_path: Path,
2007
+ dashboard_path: Path,
2008
+ *,
2009
+ comparison_dashboard: bool = True,
2010
+ ) -> dict[str, str]:
2011
+ """Require Dashboard's Native projection to match the CLI projection."""
2012
+ check = "dashboard_projection"
2013
+ missing = [str(path) for path in (cli_path, dashboard_path) if not path.is_file()]
2014
+ if missing:
2015
+ return failed(check, f"Missing projection evidence: {', '.join(missing)}")
2016
+ try:
2017
+ cli = _projection_records(read_json(cli_path), dashboard=False)
2018
+ dashboard = _projection_records(
2019
+ read_json(dashboard_path), dashboard=comparison_dashboard
2020
+ )
2021
+ except (OSError, json.JSONDecodeError) as error:
2022
+ return failed(check, f"Invalid projection evidence: {error}")
2023
+ if not cli:
2024
+ return failed(check, "CLI evidence has no Native change projection")
2025
+ if not dashboard:
2026
+ return failed(check, "Dashboard evidence has no Native change projection")
2027
+
2028
+ if len({item["name"] for item in cli}) != len(cli):
2029
+ return failed(check, "CLI evidence repeats a Native change projection")
2030
+ if len({item["name"] for item in dashboard}) != len(dashboard):
2031
+ return failed(check, "Dashboard evidence repeats a Native change projection")
2032
+ dashboard_by_name = {item["name"]: item for item in dashboard}
2033
+ cli_names = {item["name"] for item in cli}
2034
+ dashboard_names = set(dashboard_by_name)
2035
+ mismatches = []
2036
+ for cli_item in cli:
2037
+ dashboard_item = dashboard_by_name.get(cli_item["name"])
2038
+ if dashboard_item is None:
2039
+ mismatches.append(f"{cli_item['name']}: missing from Dashboard")
2040
+ elif dashboard_item != cli_item:
2041
+ mismatches.append(f"{cli_item['name']}: CLI={cli_item!r}, Dashboard={dashboard_item!r}")
2042
+ for extra in sorted(dashboard_names - cli_names):
2043
+ mismatches.append(f"{extra}: unexpected Dashboard-only change")
2044
+ if mismatches:
2045
+ return failed(check, "; ".join(mismatches))
2046
+ return passed(check)
2047
+
2048
+
2049
+ def active_changes(workspace: Path) -> list[Path]:
2050
+ root = workspace / "docs" / "comet" / "changes"
2051
+ if not root.exists():
2052
+ return []
2053
+ _assert_real_directory_chain(workspace, root, "Native active changes root")
2054
+ return sorted(path for path in root.iterdir() if path.is_dir() and not path.is_symlink())
2055
+
2056
+
2057
+ def archive_changes(workspace: Path) -> list[Path]:
2058
+ root = workspace / "docs" / "comet" / "archive"
2059
+ if not root.exists():
2060
+ return []
2061
+ _assert_real_directory_chain(workspace, root, "Native archive root")
2062
+ return sorted(
2063
+ path
2064
+ for path in root.iterdir()
2065
+ if path.is_dir() and not path.is_symlink() and "-" in path.name
2066
+ )
2067
+
2068
+
2069
+ def check_pytest(workspace: Path, check: str = "project_tests") -> dict[str, str]:
2070
+ try:
2071
+ result = subprocess.run(
2072
+ [sys.executable, "-m", "pytest", "-q"],
2073
+ cwd=workspace,
2074
+ capture_output=True,
2075
+ text=True,
2076
+ timeout=30,
2077
+ check=False,
2078
+ )
2079
+ except Exception as error:
2080
+ return failed(check, str(error))
2081
+ if result.returncode != 0:
2082
+ detail = (result.stdout + "\n" + result.stderr).strip()
2083
+ return failed(check, detail[-2000:] or f"pytest exited {result.returncode}")
2084
+ return passed(check)
2085
+
2086
+
2087
+ def check_cli_feature(
2088
+ workspace: Path,
2089
+ flag: str,
2090
+ input_text: str,
2091
+ expected_output: str,
2092
+ test_marker: str,
2093
+ ) -> dict[str, str]:
2094
+ check = f"feature_{flag.lstrip('-').replace('-', '_')}"
2095
+ project_tests = check_pytest(workspace, check)
2096
+ if project_tests["status"] == "failed":
2097
+ return project_tests
2098
+ try:
2099
+ result = subprocess.run(
2100
+ [sys.executable, "wordcount.py", flag],
2101
+ cwd=workspace,
2102
+ input=input_text,
2103
+ capture_output=True,
2104
+ text=True,
2105
+ timeout=10,
2106
+ check=False,
2107
+ )
2108
+ except Exception as error:
2109
+ return failed(check, str(error))
2110
+ if result.returncode != 0 or expected_output not in result.stdout:
2111
+ return failed(
2112
+ check,
2113
+ f"Expected {expected_output!r}; exit={result.returncode}, stdout={result.stdout!r}",
2114
+ )
2115
+ tests = workspace / "test_wordcount.py"
2116
+ if not tests.is_file() or test_marker.lower() not in tests.read_text(encoding="utf-8").lower():
2117
+ return failed(check, f"No focused test marker {test_marker!r} was found")
2118
+ return passed(check)
2119
+
2120
+
2121
+ def check_native_isolation(workspace: Path) -> dict[str, str]:
2122
+ check = "native_isolation"
2123
+ comet_config_dir = workspace / ".comet"
2124
+ hidden_entries = (
2125
+ {path.name for path in comet_config_dir.iterdir()}
2126
+ if comet_config_dir.is_dir()
2127
+ else set()
2128
+ )
2129
+ present = []
2130
+ if (workspace / "openspec").exists():
2131
+ present.append("openspec")
2132
+ present.extend(f".comet/{name}" for name in sorted(hidden_entries - {"config.yaml"}))
2133
+ if present:
2134
+ return failed(check, f"Forbidden workflow artifacts exist: {present}")
2135
+ return passed(check)
2136
+
2137
+
2138
+ def write_results(
2139
+ results: list[dict[str, str]],
2140
+ workspace: Path,
2141
+ results_file: str | None = None,
2142
+ ) -> int:
2143
+ output = {
2144
+ "passed": [result["check"] for result in results if result["status"] == "passed"],
2145
+ "failed": [
2146
+ f"{result['check']}: {result.get('reason', '')}"
2147
+ for result in results
2148
+ if result["status"] == "failed"
2149
+ ],
2150
+ }
2151
+ target = results_file or os.environ.get("BENCH_TEST_RESULTS", "_test_results.json")
2152
+ (workspace / target).write_text(json.dumps(output, indent=2), encoding="utf-8")
2153
+ print(json.dumps(output))
2154
+ return 1 if output["failed"] else 0