@vedprakash-m/tenet 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (924) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +104 -2
  3. package/dist/cli.d.ts +53 -0
  4. package/dist/cli.js +389 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/commands/bless.d.ts +2 -0
  7. package/dist/commands/bless.js +27 -0
  8. package/dist/commands/bless.js.map +1 -0
  9. package/dist/commands/board.d.ts +32 -0
  10. package/dist/commands/board.js +31 -0
  11. package/dist/commands/board.js.map +1 -0
  12. package/dist/commands/check.d.ts +2 -0
  13. package/dist/commands/check.js +35 -0
  14. package/dist/commands/check.js.map +1 -0
  15. package/dist/commands/context.d.ts +45 -0
  16. package/dist/commands/context.js +49 -0
  17. package/dist/commands/context.js.map +1 -0
  18. package/dist/commands/doctor.d.ts +8 -0
  19. package/dist/commands/doctor.js +47 -0
  20. package/dist/commands/doctor.js.map +1 -0
  21. package/dist/commands/fix.d.ts +2 -0
  22. package/dist/commands/fix.js +25 -0
  23. package/dist/commands/fix.js.map +1 -0
  24. package/dist/commands/index.d.ts +12 -0
  25. package/dist/commands/index.js +13 -0
  26. package/dist/commands/index.js.map +1 -0
  27. package/dist/commands/init.d.ts +11 -0
  28. package/dist/commands/init.js +215 -0
  29. package/dist/commands/init.js.map +1 -0
  30. package/dist/commands/onboard.d.ts +45 -0
  31. package/dist/commands/onboard.js +66 -0
  32. package/dist/commands/onboard.js.map +1 -0
  33. package/dist/commands/remove.d.ts +8 -0
  34. package/dist/commands/remove.js +56 -0
  35. package/dist/commands/remove.js.map +1 -0
  36. package/dist/commands/split.d.ts +2 -0
  37. package/dist/commands/split.js +20 -0
  38. package/dist/commands/split.js.map +1 -0
  39. package/dist/commands/upgrade.d.ts +8 -0
  40. package/dist/commands/upgrade.js +69 -0
  41. package/dist/commands/upgrade.js.map +1 -0
  42. package/dist/commands/verify.d.ts +33 -0
  43. package/dist/commands/verify.js +147 -0
  44. package/dist/commands/verify.js.map +1 -0
  45. package/dist/context/index.d.ts +61 -0
  46. package/dist/context/index.js +401 -0
  47. package/dist/context/index.js.map +1 -0
  48. package/dist/core/clock.d.ts +3 -0
  49. package/dist/core/clock.js +16 -0
  50. package/dist/core/clock.js.map +1 -0
  51. package/dist/core/commands.d.ts +38 -0
  52. package/dist/core/commands.js +2 -0
  53. package/dist/core/commands.js.map +1 -0
  54. package/dist/core/fs.d.ts +7 -0
  55. package/dist/core/fs.js +97 -0
  56. package/dist/core/fs.js.map +1 -0
  57. package/dist/core/git.d.ts +11 -0
  58. package/dist/core/git.js +223 -0
  59. package/dist/core/git.js.map +1 -0
  60. package/dist/core/hash.d.ts +6 -0
  61. package/dist/core/hash.js +123 -0
  62. package/dist/core/hash.js.map +1 -0
  63. package/dist/core/messages.d.ts +276 -0
  64. package/dist/core/messages.js +289 -0
  65. package/dist/core/messages.js.map +1 -0
  66. package/dist/core/output.d.ts +22 -0
  67. package/dist/core/output.js +78 -0
  68. package/dist/core/output.js.map +1 -0
  69. package/dist/core/schema.d.ts +14 -0
  70. package/dist/core/schema.js +138 -0
  71. package/dist/core/schema.js.map +1 -0
  72. package/dist/core/yaml.d.ts +1 -0
  73. package/dist/core/yaml.js +16 -0
  74. package/dist/core/yaml.js.map +1 -0
  75. package/dist/install/doctor.d.ts +3 -0
  76. package/dist/install/doctor.js +365 -0
  77. package/dist/install/doctor.js.map +1 -0
  78. package/dist/install/environment.d.ts +4 -0
  79. package/dist/install/environment.js +47 -0
  80. package/dist/install/environment.js.map +1 -0
  81. package/dist/install/hosts.d.ts +5 -0
  82. package/dist/install/hosts.js +105 -0
  83. package/dist/install/hosts.js.map +1 -0
  84. package/dist/install/init.d.ts +2 -0
  85. package/dist/install/init.js +80 -0
  86. package/dist/install/init.js.map +1 -0
  87. package/dist/install/integrity.d.ts +24 -0
  88. package/dist/install/integrity.js +200 -0
  89. package/dist/install/integrity.js.map +1 -0
  90. package/dist/install/manifest.d.ts +27 -0
  91. package/dist/install/manifest.js +276 -0
  92. package/dist/install/manifest.js.map +1 -0
  93. package/dist/install/preflight.d.ts +3 -0
  94. package/dist/install/preflight.js +558 -0
  95. package/dist/install/preflight.js.map +1 -0
  96. package/dist/install/remove.d.ts +2 -0
  97. package/dist/install/remove.js +668 -0
  98. package/dist/install/remove.js.map +1 -0
  99. package/dist/install/types.d.ts +303 -0
  100. package/dist/install/types.js +2 -0
  101. package/dist/install/types.js.map +1 -0
  102. package/dist/install/upgrade.d.ts +2 -0
  103. package/dist/install/upgrade.js +307 -0
  104. package/dist/install/upgrade.js.map +1 -0
  105. package/dist/install/writes.d.ts +15 -0
  106. package/dist/install/writes.js +1200 -0
  107. package/dist/install/writes.js.map +1 -0
  108. package/dist/mcp/index.d.ts +13 -0
  109. package/dist/mcp/index.js +437 -0
  110. package/dist/mcp/index.js.map +1 -0
  111. package/dist/onboard/assignment.d.ts +22 -0
  112. package/dist/onboard/assignment.js +102 -0
  113. package/dist/onboard/assignment.js.map +1 -0
  114. package/dist/onboard/bless.d.ts +104 -0
  115. package/dist/onboard/bless.js +729 -0
  116. package/dist/onboard/bless.js.map +1 -0
  117. package/dist/onboard/card.d.ts +31 -0
  118. package/dist/onboard/card.js +175 -0
  119. package/dist/onboard/card.js.map +1 -0
  120. package/dist/onboard/findings.d.ts +3 -0
  121. package/dist/onboard/findings.js +185 -0
  122. package/dist/onboard/findings.js.map +1 -0
  123. package/dist/onboard/inventory.d.ts +21 -0
  124. package/dist/onboard/inventory.js +302 -0
  125. package/dist/onboard/inventory.js.map +1 -0
  126. package/dist/onboard/preflight.d.ts +32 -0
  127. package/dist/onboard/preflight.js +156 -0
  128. package/dist/onboard/preflight.js.map +1 -0
  129. package/dist/onboard/refresh.d.ts +28 -0
  130. package/dist/onboard/refresh.js +65 -0
  131. package/dist/onboard/refresh.js.map +1 -0
  132. package/dist/policy/errors.d.ts +12 -0
  133. package/dist/policy/errors.js +25 -0
  134. package/dist/policy/errors.js.map +1 -0
  135. package/dist/policy/index.d.ts +4 -0
  136. package/dist/policy/index.js +4 -0
  137. package/dist/policy/index.js.map +1 -0
  138. package/dist/policy/kit.d.ts +12 -0
  139. package/dist/policy/kit.js +162 -0
  140. package/dist/policy/kit.js.map +1 -0
  141. package/dist/policy/load.d.ts +15 -0
  142. package/dist/policy/load.js +415 -0
  143. package/dist/policy/load.js.map +1 -0
  144. package/dist/policy/selectors.d.ts +2 -0
  145. package/dist/policy/selectors.js +43 -0
  146. package/dist/policy/selectors.js.map +1 -0
  147. package/dist/policy/types.d.ts +40 -0
  148. package/dist/policy/types.js +2 -0
  149. package/dist/policy/types.js.map +1 -0
  150. package/dist/reports/acceptance.d.ts +2 -0
  151. package/dist/reports/acceptance.js +79 -0
  152. package/dist/reports/acceptance.js.map +1 -0
  153. package/dist/reports/declared.d.ts +6 -0
  154. package/dist/reports/declared.js +114 -0
  155. package/dist/reports/declared.js.map +1 -0
  156. package/dist/reports/errors.d.ts +8 -0
  157. package/dist/reports/errors.js +12 -0
  158. package/dist/reports/errors.js.map +1 -0
  159. package/dist/reports/index.d.ts +8 -0
  160. package/dist/reports/index.js +8 -0
  161. package/dist/reports/index.js.map +1 -0
  162. package/dist/reports/items.d.ts +6 -0
  163. package/dist/reports/items.js +85 -0
  164. package/dist/reports/items.js.map +1 -0
  165. package/dist/reports/read-types.d.ts +7 -0
  166. package/dist/reports/read-types.js +2 -0
  167. package/dist/reports/read-types.js.map +1 -0
  168. package/dist/reports/read.d.ts +3 -0
  169. package/dist/reports/read.js +96 -0
  170. package/dist/reports/read.js.map +1 -0
  171. package/dist/reports/registry.d.ts +32 -0
  172. package/dist/reports/registry.js +372 -0
  173. package/dist/reports/registry.js.map +1 -0
  174. package/dist/reports/scan.d.ts +23 -0
  175. package/dist/reports/scan.js +406 -0
  176. package/dist/reports/scan.js.map +1 -0
  177. package/dist/reports/tags.d.ts +4 -0
  178. package/dist/reports/tags.js +53 -0
  179. package/dist/reports/tags.js.map +1 -0
  180. package/dist/reports/types.d.ts +90 -0
  181. package/dist/reports/types.js +2 -0
  182. package/dist/reports/types.js.map +1 -0
  183. package/dist/reports/weakening.d.ts +5 -0
  184. package/dist/reports/weakening.js +260 -0
  185. package/dist/reports/weakening.js.map +1 -0
  186. package/dist/sdk.d.ts +8 -0
  187. package/dist/sdk.js +8 -0
  188. package/dist/sdk.js.map +1 -0
  189. package/dist/specs/anchors.d.ts +44 -0
  190. package/dist/specs/anchors.js +171 -0
  191. package/dist/specs/anchors.js.map +1 -0
  192. package/dist/specs/check.d.ts +19 -0
  193. package/dist/specs/check.js +656 -0
  194. package/dist/specs/check.js.map +1 -0
  195. package/dist/specs/citations.d.ts +5 -0
  196. package/dist/specs/citations.js +65 -0
  197. package/dist/specs/citations.js.map +1 -0
  198. package/dist/specs/deltas.d.ts +10 -0
  199. package/dist/specs/deltas.js +110 -0
  200. package/dist/specs/deltas.js.map +1 -0
  201. package/dist/specs/fix.d.ts +11 -0
  202. package/dist/specs/fix.js +583 -0
  203. package/dist/specs/fix.js.map +1 -0
  204. package/dist/specs/flags.d.ts +25 -0
  205. package/dist/specs/flags.js +100 -0
  206. package/dist/specs/flags.js.map +1 -0
  207. package/dist/specs/ladder.d.ts +13 -0
  208. package/dist/specs/ladder.js +105 -0
  209. package/dist/specs/ladder.js.map +1 -0
  210. package/dist/specs/parse.d.ts +58 -0
  211. package/dist/specs/parse.js +565 -0
  212. package/dist/specs/parse.js.map +1 -0
  213. package/dist/specs/sections.d.ts +2 -0
  214. package/dist/specs/sections.js +36 -0
  215. package/dist/specs/sections.js.map +1 -0
  216. package/dist/specs/split.d.ts +8 -0
  217. package/dist/specs/split.js +264 -0
  218. package/dist/specs/split.js.map +1 -0
  219. package/dist/specs/touched.d.ts +11 -0
  220. package/dist/specs/touched.js +376 -0
  221. package/dist/specs/touched.js.map +1 -0
  222. package/dist/types/generated.d.ts +547 -0
  223. package/dist/types/generated.js +4 -0
  224. package/dist/types/generated.js.map +1 -0
  225. package/dist/verify/bundle.d.ts +104 -0
  226. package/dist/verify/bundle.js +212 -0
  227. package/dist/verify/bundle.js.map +1 -0
  228. package/dist/verify/card.d.ts +7 -0
  229. package/dist/verify/card.js +105 -0
  230. package/dist/verify/card.js.map +1 -0
  231. package/dist/verify/forge.d.ts +56 -0
  232. package/dist/verify/forge.js +173 -0
  233. package/dist/verify/forge.js.map +1 -0
  234. package/dist/verify/record.d.ts +63 -0
  235. package/dist/verify/record.js +539 -0
  236. package/dist/verify/record.js.map +1 -0
  237. package/dist/verify/records.d.ts +33 -0
  238. package/dist/verify/records.js +107 -0
  239. package/dist/verify/records.js.map +1 -0
  240. package/dist/verify/run-checks.d.ts +22 -0
  241. package/dist/verify/run-checks.js +149 -0
  242. package/dist/verify/run-checks.js.map +1 -0
  243. package/dist/views/specs-board.d.ts +43 -0
  244. package/dist/views/specs-board.js +427 -0
  245. package/dist/views/specs-board.js.map +1 -0
  246. package/kit/CHANGELOG.md +42 -0
  247. package/kit/README.md +18 -0
  248. package/kit/TENET.md +83 -0
  249. package/kit/agents/drafter.md +78 -0
  250. package/kit/agents/spec-reviewer.md +75 -0
  251. package/kit/defaults/tenet.yaml +25 -0
  252. package/kit/hooks/pre-commit +7 -0
  253. package/kit/packs/minimal/pack.yaml +54 -0
  254. package/kit/practices/default.md +6 -0
  255. package/kit/schemas/agent-card.json +280 -0
  256. package/kit/schemas/assignment.json +128 -0
  257. package/kit/schemas/board.json +563 -0
  258. package/kit/schemas/bundle.json +148 -0
  259. package/kit/schemas/finding.json +59 -0
  260. package/kit/schemas/interview.json +48 -0
  261. package/kit/schemas/inventory.json +409 -0
  262. package/kit/schemas/lock.json +37 -0
  263. package/kit/schemas/manifest-local.json +31 -0
  264. package/kit/schemas/manifest.json +109 -0
  265. package/kit/schemas/pack.json +190 -0
  266. package/kit/schemas/packet.json +94 -0
  267. package/kit/schemas/proof-card.json +526 -0
  268. package/kit/schemas/results/bless.json +14 -0
  269. package/kit/schemas/results/board.json +169 -0
  270. package/kit/schemas/results/check.json +42 -0
  271. package/kit/schemas/results/context.json +169 -0
  272. package/kit/schemas/results/doctor.json +22 -0
  273. package/kit/schemas/results/fix.json +33 -0
  274. package/kit/schemas/results/init.json +102 -0
  275. package/kit/schemas/results/mcp.json +173 -0
  276. package/kit/schemas/results/onboard.json +72 -0
  277. package/kit/schemas/results/remove.json +34 -0
  278. package/kit/schemas/results/split.json +21 -0
  279. package/kit/schemas/results/upgrade.json +23 -0
  280. package/kit/schemas/results/verify.json +34 -0
  281. package/kit/schemas/spec-front-matter.json +218 -0
  282. package/kit/schemas/tenet-yaml.json +356 -0
  283. package/kit/schemas/test-report.json +77 -0
  284. package/kit/skills/draft-specs/SKILL.md +38 -0
  285. package/kit/skills/review-with-findings/SKILL.md +21 -0
  286. package/kit/skills/work-a-change/SKILL.md +30 -0
  287. package/kit/templates/agents-block.md +47 -0
  288. package/kit/templates/design.md +43 -0
  289. package/kit/templates/escalation.md +34 -0
  290. package/kit/templates/experience.md +33 -0
  291. package/kit/templates/intent.md +56 -0
  292. package/kit/templates/plan.md +35 -0
  293. package/kit/templates/pull-request.md +25 -0
  294. package/kit/templates/requirements.md +43 -0
  295. package/kit/templates/vision.md +69 -0
  296. package/kit/workflows/existing-ci-step.yml +83 -0
  297. package/kit/workflows/tenet-tests.yml +88 -0
  298. package/kit/workflows/tenet.yml +87 -0
  299. package/package.json +67 -4
  300. package/pkg/conformance/alg-02/README.md +18 -0
  301. package/pkg/conformance/alg-02/n01-duplicate-slug/expected.json +5 -0
  302. package/pkg/conformance/alg-02/n01-duplicate-slug/input.json +5 -0
  303. package/pkg/conformance/alg-02/n02-ambiguous-rename/expected.json +12 -0
  304. package/pkg/conformance/alg-02/n02-ambiguous-rename/input.json +20 -0
  305. package/pkg/conformance/alg-02/n03-missing-front/expected.json +12 -0
  306. package/pkg/conformance/alg-02/n03-missing-front/input.json +5 -0
  307. package/pkg/conformance/alg-02/n04-invalid-origin/expected.json +4 -0
  308. package/pkg/conformance/alg-02/n04-invalid-origin/input.json +9 -0
  309. package/pkg/conformance/alg-02/p01-leading-preamble/expected.json +15 -0
  310. package/pkg/conformance/alg-02/p01-leading-preamble/input.json +5 -0
  311. package/pkg/conformance/alg-02/p02-four-backtick-fence/expected.json +11 -0
  312. package/pkg/conformance/alg-02/p02-four-backtick-fence/input.json +5 -0
  313. package/pkg/conformance/alg-02/p03-unicode-and-empty-slug/expected.json +14 -0
  314. package/pkg/conformance/alg-02/p03-unicode-and-empty-slug/input.json +5 -0
  315. package/pkg/conformance/alg-02/p04-normalized-bodies/expected.json +6 -0
  316. package/pkg/conformance/alg-02/p04-normalized-bodies/input.json +7 -0
  317. package/pkg/conformance/alg-02/p05-rename-digest/expected.json +10 -0
  318. package/pkg/conformance/alg-02/p05-rename-digest/input.json +16 -0
  319. package/pkg/conformance/alg-02/p06-requirement-prefix/expected.json +14 -0
  320. package/pkg/conformance/alg-02/p06-requirement-prefix/input.json +7 -0
  321. package/pkg/conformance/alg-03/README.md +20 -0
  322. package/pkg/conformance/alg-03/n01-ambiguous-relocation/expected.json +3 -0
  323. package/pkg/conformance/alg-03/n01-ambiguous-relocation/input.json +8 -0
  324. package/pkg/conformance/alg-03/n02-missing-source/expected.json +5 -0
  325. package/pkg/conformance/alg-03/n02-missing-source/input.json +12 -0
  326. package/pkg/conformance/alg-03/n03-edited-intent/expected.json +5 -0
  327. package/pkg/conformance/alg-03/n03-edited-intent/input.json +14 -0
  328. package/pkg/conformance/alg-03/n04-unblessed-stale-metadata/expected.json +3 -0
  329. package/pkg/conformance/alg-03/n04-unblessed-stale-metadata/input.json +12 -0
  330. package/pkg/conformance/alg-03/n05-ambiguous-moved-anchor/expected.json +5 -0
  331. package/pkg/conformance/alg-03/n05-ambiguous-moved-anchor/input.json +14 -0
  332. package/pkg/conformance/alg-03/p01-path-anchor/expected.json +8 -0
  333. package/pkg/conformance/alg-03/p01-path-anchor/input.json +15 -0
  334. package/pkg/conformance/alg-03/p02-peer-test-anchor/expected.json +8 -0
  335. package/pkg/conformance/alg-03/p02-peer-test-anchor/input.json +15 -0
  336. package/pkg/conformance/alg-03/p03-doc-anchor/expected.json +8 -0
  337. package/pkg/conformance/alg-03/p03-doc-anchor/input.json +15 -0
  338. package/pkg/conformance/alg-03/p04-unique-relocation/expected.json +4 -0
  339. package/pkg/conformance/alg-03/p04-unique-relocation/input.json +8 -0
  340. package/pkg/conformance/alg-03/p05-clean-moved-anchor/expected.json +3 -0
  341. package/pkg/conformance/alg-03/p05-clean-moved-anchor/input.json +14 -0
  342. package/pkg/conformance/alg-03/p06-owner-precedence/expected.json +5 -0
  343. package/pkg/conformance/alg-03/p06-owner-precedence/input.json +7 -0
  344. package/pkg/conformance/alg-03/p07-owner-last-match/expected.json +6 -0
  345. package/pkg/conformance/alg-03/p07-owner-last-match/input.json +6 -0
  346. package/pkg/conformance/alg-04/README.md +19 -0
  347. package/pkg/conformance/alg-04/n01-missing-file/expected.json +10 -0
  348. package/pkg/conformance/alg-04/n01-missing-file/input.json +6 -0
  349. package/pkg/conformance/alg-04/n02-backward-range/expected.json +10 -0
  350. package/pkg/conformance/alg-04/n02-backward-range/input.json +8 -0
  351. package/pkg/conformance/alg-04/n03-missing-heading/expected.json +10 -0
  352. package/pkg/conformance/alg-04/n03-missing-heading/input.json +8 -0
  353. package/pkg/conformance/alg-04/n04-reversed-test-segments/expected.json +10 -0
  354. package/pkg/conformance/alg-04/n04-reversed-test-segments/input.json +8 -0
  355. package/pkg/conformance/alg-04/n05-out-of-range/expected.json +10 -0
  356. package/pkg/conformance/alg-04/n05-out-of-range/input.json +8 -0
  357. package/pkg/conformance/alg-04/p01-single-line/expected.json +3 -0
  358. package/pkg/conformance/alg-04/p01-single-line/input.json +8 -0
  359. package/pkg/conformance/alg-04/p02-full-range/expected.json +3 -0
  360. package/pkg/conformance/alg-04/p02-full-range/input.json +8 -0
  361. package/pkg/conformance/alg-04/p03-doc-heading/expected.json +3 -0
  362. package/pkg/conformance/alg-04/p03-doc-heading/input.json +8 -0
  363. package/pkg/conformance/alg-04/p04-nested-test/expected.json +3 -0
  364. package/pkg/conformance/alg-04/p04-nested-test/input.json +8 -0
  365. package/pkg/conformance/alg-04/p05-python-test/expected.json +3 -0
  366. package/pkg/conformance/alg-04/p05-python-test/input.json +8 -0
  367. package/pkg/conformance/alg-04/p06-go-test/expected.json +3 -0
  368. package/pkg/conformance/alg-04/p06-go-test/input.json +8 -0
  369. package/pkg/conformance/alg-08/cases.json +263 -0
  370. package/pkg/conformance/alg-09/cases.json +95 -0
  371. package/pkg/conformance/alg-10/README.md +24 -0
  372. package/pkg/conformance/alg-10/n01-no-blessed-material/expected.json +7 -0
  373. package/pkg/conformance/alg-10/n01-no-blessed-material/input.json +23 -0
  374. package/pkg/conformance/alg-10/n02-rejected-section/expected.json +7 -0
  375. package/pkg/conformance/alg-10/n02-rejected-section/input.json +24 -0
  376. package/pkg/conformance/alg-10/n03-broken-blessed-copy/expected.json +7 -0
  377. package/pkg/conformance/alg-10/n03-broken-blessed-copy/input.json +27 -0
  378. package/pkg/conformance/alg-10/n04-local-omitted/expected.json +12 -0
  379. package/pkg/conformance/alg-10/n04-local-omitted/input.json +27 -0
  380. package/pkg/conformance/alg-10/n05-over-budget-explicit-id/expected.json +10 -0
  381. package/pkg/conformance/alg-10/n05-over-budget-explicit-id/input.json +26 -0
  382. package/pkg/conformance/alg-10/n06-unknown-method/expected.json +11 -0
  383. package/pkg/conformance/alg-10/n06-unknown-method/input.json +32 -0
  384. package/pkg/conformance/alg-10/p01-path-admitted/expected.json +14 -0
  385. package/pkg/conformance/alg-10/p01-path-admitted/input.json +26 -0
  386. package/pkg/conformance/alg-10/p02-retry-once-source-changed/expected.json +15 -0
  387. package/pkg/conformance/alg-10/p02-retry-once-source-changed/input.json +26 -0
  388. package/pkg/conformance/alg-10/p03-id-and-path-deduplicate/expected.json +13 -0
  389. package/pkg/conformance/alg-10/p03-id-and-path-deduplicate/input.json +30 -0
  390. package/pkg/conformance/alg-10/p04-include-draft-with-blessing/expected.json +17 -0
  391. package/pkg/conformance/alg-10/p04-include-draft-with-blessing/input.json +27 -0
  392. package/pkg/conformance/alg-10/p05-no-inputs-global-and-index/expected.json +16 -0
  393. package/pkg/conformance/alg-10/p05-no-inputs-global-and-index/input.json +21 -0
  394. package/pkg/conformance/alg-10/p06-checked-policy-rule/expected.json +20 -0
  395. package/pkg/conformance/alg-10/p06-checked-policy-rule/input.json +26 -0
  396. package/pkg/conformance/alg-10/p07-mcp-session/expected.json +60 -0
  397. package/pkg/conformance/alg-10/p07-mcp-session/input.json +65 -0
  398. package/pkg/conformance/alg-10/p08-applies-to-prose/expected.json +12 -0
  399. package/pkg/conformance/alg-10/p08-applies-to-prose/input.json +25 -0
  400. package/pkg/conformance/alg-10/p09-global-beyond-reserve/expected.json +14 -0
  401. package/pkg/conformance/alg-10/p09-global-beyond-reserve/input.json +27 -0
  402. package/pkg/conformance/alg-10/p10-query-case-insensitive/expected.json +11 -0
  403. package/pkg/conformance/alg-10/p10-query-case-insensitive/input.json +23 -0
  404. package/pkg/conformance/alg-11/README.md +29 -0
  405. package/pkg/conformance/alg-11/n01-no-commits-refused/expected.json +11 -0
  406. package/pkg/conformance/alg-11/n01-no-commits-refused/input.json +13 -0
  407. package/pkg/conformance/alg-11/n02-secrets-and-env-skipped/expected.json +153 -0
  408. package/pkg/conformance/alg-11/n02-secrets-and-env-skipped/input.json +20 -0
  409. package/pkg/conformance/alg-11/n03-generated-vendored-and-tests-excluded-from-size/expected.json +171 -0
  410. package/pkg/conformance/alg-11/n03-generated-vendored-and-tests-excluded-from-size/input.json +22 -0
  411. package/pkg/conformance/alg-11/n04-binary-oversize-and-onboard-exclude-skipped/expected.json +137 -0
  412. package/pkg/conformance/alg-11/n04-binary-oversize-and-onboard-exclude-skipped/input.json +20 -0
  413. package/pkg/conformance/alg-11/n05-uncommitted-worktree-source-ignored/expected.json +124 -0
  414. package/pkg/conformance/alg-11/n05-uncommitted-worktree-source-ignored/input.json +17 -0
  415. package/pkg/conformance/alg-11/p01-small-one-file-service/expected.json +145 -0
  416. package/pkg/conformance/alg-11/p01-small-one-file-service/input.json +18 -0
  417. package/pkg/conformance/alg-11/p02-four-codeowners-areas-separate/expected.json +255 -0
  418. package/pkg/conformance/alg-11/p02-four-codeowners-areas-separate/input.json +17 -0
  419. package/pkg/conformance/alg-11/p03-twenty-thousand-lines-separate/expected.json +169 -0
  420. package/pkg/conformance/alg-11/p03-twenty-thousand-lines-separate/input.json +14 -0
  421. package/pkg/conformance/alg-11/p04-merge-small-unit-into-neighbor/expected.json +186 -0
  422. package/pkg/conformance/alg-11/p04-merge-small-unit-into-neighbor/input.json +15 -0
  423. package/pkg/conformance/alg-11/p05-layout-override/expected.json +128 -0
  424. package/pkg/conformance/alg-11/p05-layout-override/input.json +14 -0
  425. package/pkg/conformance/alg-11/p06-cli-kind-and-instruction-files/expected.json +154 -0
  426. package/pkg/conformance/alg-11/p06-cli-kind-and-instruction-files/input.json +18 -0
  427. package/pkg/conformance/alg-11/p07-local-test-report-in-observations/expected.json +131 -0
  428. package/pkg/conformance/alg-11/p07-local-test-report-in-observations/input.json +17 -0
  429. package/pkg/conformance/alg-11/p08-first-findings-all-four-kinds/expected.json +207 -0
  430. package/pkg/conformance/alg-11/p08-first-findings-all-four-kinds/input.json +20 -0
  431. package/pkg/conformance/alg-14/README.md +21 -0
  432. package/pkg/conformance/alg-14/n01-draft-implements/expected.json +3 -0
  433. package/pkg/conformance/alg-14/n01-draft-implements/input.json +12 -0
  434. package/pkg/conformance/alg-14/n02-outside-replacement/expected.json +8 -0
  435. package/pkg/conformance/alg-14/n02-outside-replacement/input.json +12 -0
  436. package/pkg/conformance/alg-14/n03-insertion-at-end/expected.json +8 -0
  437. package/pkg/conformance/alg-14/n03-insertion-at-end/input.json +12 -0
  438. package/pkg/conformance/alg-14/n04-same-owner-different-rule/expected.json +3 -0
  439. package/pkg/conformance/alg-14/n04-same-owner-different-rule/input.json +16 -0
  440. package/pkg/conformance/alg-14/n05-missing-implements/expected.json +3 -0
  441. package/pkg/conformance/alg-14/n05-missing-implements/input.json +12 -0
  442. package/pkg/conformance/alg-14/p01-implements-first/expected.json +8 -0
  443. package/pkg/conformance/alg-14/p01-implements-first/input.json +14 -0
  444. package/pkg/conformance/alg-14/p02-overlapping-replacement/expected.json +8 -0
  445. package/pkg/conformance/alg-14/p02-overlapping-replacement/input.json +12 -0
  446. package/pkg/conformance/alg-14/p03-interior-insertion/expected.json +8 -0
  447. package/pkg/conformance/alg-14/p03-interior-insertion/input.json +12 -0
  448. package/pkg/conformance/alg-14/p04-text-changed/expected.json +8 -0
  449. package/pkg/conformance/alg-14/p04-text-changed/input.json +10 -0
  450. package/pkg/conformance/alg-14/p05-same-folder/expected.json +8 -0
  451. package/pkg/conformance/alg-14/p05-same-folder/input.json +14 -0
  452. package/pkg/conformance/alg-14/p06-codeowners-priority/expected.json +8 -0
  453. package/pkg/conformance/alg-14/p06-codeowners-priority/input.json +18 -0
  454. package/pkg/conformance/alg-14/p07-same-area-cap/expected.json +44 -0
  455. package/pkg/conformance/alg-14/p07-same-area-cap/input.json +14 -0
  456. package/pkg/conformance/alg-14/p08-deleted-document/expected.json +8 -0
  457. package/pkg/conformance/alg-14/p08-deleted-document/input.json +13 -0
  458. package/pkg/conformance/board/README.md +19 -0
  459. package/pkg/conformance/board/n01-no-specifications/expected.json +8 -0
  460. package/pkg/conformance/board/n01-no-specifications/expected.md +1 -0
  461. package/pkg/conformance/board/n01-no-specifications/input.json +19 -0
  462. package/pkg/conformance/board/n02-broken-citation/expected.json +14 -0
  463. package/pkg/conformance/board/n02-broken-citation/expected.md +1 -0
  464. package/pkg/conformance/board/n02-broken-citation/input.json +24 -0
  465. package/pkg/conformance/board/n03-untested-requirement/expected.json +12 -0
  466. package/pkg/conformance/board/n03-untested-requirement/expected.md +1 -0
  467. package/pkg/conformance/board/n03-untested-requirement/input.json +23 -0
  468. package/pkg/conformance/board/n04-over-budget/expected.json +14 -0
  469. package/pkg/conformance/board/n04-over-budget/expected.md +1 -0
  470. package/pkg/conformance/board/n04-over-budget/input.json +20 -0
  471. package/pkg/conformance/board/p01-fresh-draft/expected.json +22 -0
  472. package/pkg/conformance/board/p01-fresh-draft/expected.md +2 -0
  473. package/pkg/conformance/board/p01-fresh-draft/input.json +20 -0
  474. package/pkg/conformance/board/p02-half-blessed/expected.json +34 -0
  475. package/pkg/conformance/board/p02-half-blessed/expected.md +3 -0
  476. package/pkg/conformance/board/p02-half-blessed/input.json +25 -0
  477. package/pkg/conformance/board/p03-sources-changed/expected.json +18 -0
  478. package/pkg/conformance/board/p03-sources-changed/expected.md +2 -0
  479. package/pkg/conformance/board/p03-sources-changed/input.json +24 -0
  480. package/pkg/conformance/board/p04-clean-all/expected.json +17 -0
  481. package/pkg/conformance/board/p04-clean-all/expected.md +1 -0
  482. package/pkg/conformance/board/p04-clean-all/input.json +25 -0
  483. package/pkg/conformance/board/p05-clean-default/expected.json +7 -0
  484. package/pkg/conformance/board/p05-clean-default/expected.md +1 -0
  485. package/pkg/conformance/board/p05-clean-default/input.json +25 -0
  486. package/pkg/conformance/board/p06-edited-only/expected.json +18 -0
  487. package/pkg/conformance/board/p06-edited-only/expected.md +2 -0
  488. package/pkg/conformance/board/p06-edited-only/input.json +23 -0
  489. package/pkg/conformance/board/p07-ux-part-2/expected.json +47 -0
  490. package/pkg/conformance/board/p07-ux-part-2/expected.md +7 -0
  491. package/pkg/conformance/board/p07-ux-part-2/input.json +26 -0
  492. package/pkg/conformance/card/README.md +34 -0
  493. package/pkg/conformance/card/n01-no-acceptance-block/expected.json +62 -0
  494. package/pkg/conformance/card/n01-no-acceptance-block/expected.md +7 -0
  495. package/pkg/conformance/card/n01-no-acceptance-block/input.json +94 -0
  496. package/pkg/conformance/card/n02-malformed-acceptance-block/expected.json +64 -0
  497. package/pkg/conformance/card/n02-malformed-acceptance-block/expected.md +8 -0
  498. package/pkg/conformance/card/n02-malformed-acceptance-block/input.json +99 -0
  499. package/pkg/conformance/card/n03-report-missing-not-checked/expected.json +85 -0
  500. package/pkg/conformance/card/n03-report-missing-not-checked/expected.md +9 -0
  501. package/pkg/conformance/card/n03-report-missing-not-checked/input.json +97 -0
  502. package/pkg/conformance/card/n04-nonzero-exit-after-passing-report/expected.json +84 -0
  503. package/pkg/conformance/card/n04-nonzero-exit-after-passing-report/expected.md +8 -0
  504. package/pkg/conformance/card/n04-nonzero-exit-after-passing-report/input.json +99 -0
  505. package/pkg/conformance/card/n05-bundle-refused-and-records-not-kept/expected.json +83 -0
  506. package/pkg/conformance/card/n05-bundle-refused-and-records-not-kept/expected.md +8 -0
  507. package/pkg/conformance/card/n05-bundle-refused-and-records-not-kept/input.json +98 -0
  508. package/pkg/conformance/card/n06-policy-load-failure-fallback/expected.json +93 -0
  509. package/pkg/conformance/card/n06-policy-load-failure-fallback/expected.md +9 -0
  510. package/pkg/conformance/card/n06-policy-load-failure-fallback/input.json +105 -0
  511. package/pkg/conformance/card/p01-clean-pass-success/expected.json +93 -0
  512. package/pkg/conformance/card/p01-clean-pass-success/expected.md +8 -0
  513. package/pkg/conformance/card/p01-clean-pass-success/input.json +101 -0
  514. package/pkg/conformance/card/p02-no-blessed-intent-badge/expected.json +62 -0
  515. package/pkg/conformance/card/p02-no-blessed-intent-badge/expected.md +5 -0
  516. package/pkg/conformance/card/p02-no-blessed-intent-badge/input.json +92 -0
  517. package/pkg/conformance/card/p03-matrix-shards-and-retry-merge/expected.json +93 -0
  518. package/pkg/conformance/card/p03-matrix-shards-and-retry-merge/expected.md +8 -0
  519. package/pkg/conformance/card/p03-matrix-shards-and-retry-merge/input.json +137 -0
  520. package/pkg/conformance/card/p04-blessings-changed-and-requirement-deltas/expected.json +122 -0
  521. package/pkg/conformance/card/p04-blessings-changed-and-requirement-deltas/expected.md +11 -0
  522. package/pkg/conformance/card/p04-blessings-changed-and-requirement-deltas/input.json +102 -0
  523. package/pkg/conformance/card/p05-workflow-and-protected-surfaces-would-block/expected.json +88 -0
  524. package/pkg/conformance/card/p05-workflow-and-protected-surfaces-would-block/expected.md +8 -0
  525. package/pkg/conformance/card/p05-workflow-and-protected-surfaces-would-block/input.json +101 -0
  526. package/pkg/conformance/card/p06-test-weakening-would-block/expected.json +99 -0
  527. package/pkg/conformance/card/p06-test-weakening-would-block/expected.md +8 -0
  528. package/pkg/conformance/card/p06-test-weakening-would-block/input.json +101 -0
  529. package/pkg/conformance/card/p07-only-skipped-cases/expected.json +80 -0
  530. package/pkg/conformance/card/p07-only-skipped-cases/expected.md +7 -0
  531. package/pkg/conformance/card/p07-only-skipped-cases/input.json +99 -0
  532. package/pkg/conformance/card/p08-coverage-not-confirmed/expected.json +80 -0
  533. package/pkg/conformance/card/p08-coverage-not-confirmed/expected.md +7 -0
  534. package/pkg/conformance/card/p08-coverage-not-confirmed/input.json +99 -0
  535. package/pkg/conformance/check/README.md +26 -0
  536. package/pkg/conformance/check/n01-missing-citation-file/expected.json +15 -0
  537. package/pkg/conformance/check/n01-missing-citation-file/input.json +25 -0
  538. package/pkg/conformance/check/n02-citation-out-of-range/expected.json +15 -0
  539. package/pkg/conformance/check/n02-citation-out-of-range/input.json +26 -0
  540. package/pkg/conformance/check/n03-missing-citation-heading/expected.json +15 -0
  541. package/pkg/conformance/check/n03-missing-citation-heading/input.json +26 -0
  542. package/pkg/conformance/check/n04-missing-citation-test/expected.json +15 -0
  543. package/pkg/conformance/check/n04-missing-citation-test/input.json +26 -0
  544. package/pkg/conformance/check/n05-changed-blessed-copy/expected.json +12 -0
  545. package/pkg/conformance/check/n05-changed-blessed-copy/input.json +29 -0
  546. package/pkg/conformance/check/n06-missing-blessed-copy/expected.json +12 -0
  547. package/pkg/conformance/check/n06-missing-blessed-copy/input.json +27 -0
  548. package/pkg/conformance/check/n07-two-blessed-ids/expected.json +12 -0
  549. package/pkg/conformance/check/n07-two-blessed-ids/input.json +32 -0
  550. package/pkg/conformance/check/n08-uncovered-vision/expected.json +8 -0
  551. package/pkg/conformance/check/n08-uncovered-vision/input.json +27 -0
  552. package/pkg/conformance/check/n09-ci-budget-crossing/expected.json +13 -0
  553. package/pkg/conformance/check/n09-ci-budget-crossing/input.json +47 -0
  554. package/pkg/conformance/check/n10-kit-edited/expected.json +12 -0
  555. package/pkg/conformance/check/n10-kit-edited/input.json +31 -0
  556. package/pkg/conformance/check/n11-lock-version-mismatch/expected.json +13 -0
  557. package/pkg/conformance/check/n11-lock-version-mismatch/input.json +31 -0
  558. package/pkg/conformance/check/n12-local-budget-warning/expected.json +10 -0
  559. package/pkg/conformance/check/n12-local-budget-warning/input.json +29 -0
  560. package/pkg/conformance/check/p01-covered-vision/expected.json +6 -0
  561. package/pkg/conformance/check/p01-covered-vision/input.json +29 -0
  562. package/pkg/conformance/check/p02-path-citation/expected.json +6 -0
  563. package/pkg/conformance/check/p02-path-citation/input.json +26 -0
  564. package/pkg/conformance/check/p03-doc-and-test-citations/expected.json +6 -0
  565. package/pkg/conformance/check/p03-doc-and-test-citations/input.json +27 -0
  566. package/pkg/conformance/check/p04-valid-blessed-copy/expected.json +6 -0
  567. package/pkg/conformance/check/p04-valid-blessed-copy/input.json +30 -0
  568. package/pkg/conformance/check/p05-unique-across-documents/expected.json +6 -0
  569. package/pkg/conformance/check/p05-unique-across-documents/input.json +32 -0
  570. package/pkg/conformance/check/p06-matching-lock-and-kit/expected.json +6 -0
  571. package/pkg/conformance/check/p06-matching-lock-and-kit/input.json +31 -0
  572. package/pkg/conformance/install/.gitattributes +1 -0
  573. package/pkg/conformance/install/README.md +40 -0
  574. package/pkg/conformance/install/environment.json +29 -0
  575. package/pkg/conformance/install/n01-git-executable-missing/args.json +17 -0
  576. package/pkg/conformance/install/n01-git-executable-missing/before/README.md +1 -0
  577. package/pkg/conformance/install/n02-not-a-git-repository/args.json +15 -0
  578. package/pkg/conformance/install/n02-not-a-git-repository/before/README.md +1 -0
  579. package/pkg/conformance/install/n02-not-a-git-repository/expected/01-init/result.json +4 -0
  580. package/pkg/conformance/install/n03-remove-recorded-parent-path/args.json +14 -0
  581. package/pkg/conformance/install/n03-remove-recorded-parent-path/before/.tenet/manifest.json +12 -0
  582. package/pkg/conformance/install/n03-remove-recorded-parent-path/before/README.md +1 -0
  583. package/pkg/conformance/install/n03-remove-recorded-parent-path/before/tenet.yaml +1 -0
  584. package/pkg/conformance/install/n03-remove-recorded-parent-path/expected/01-remove/result.json +4 -0
  585. package/pkg/conformance/install/n04-init-symlink-outside/args.json +22 -0
  586. package/pkg/conformance/install/n04-init-symlink-outside/before/package-lock.json +15 -0
  587. package/pkg/conformance/install/n04-init-symlink-outside/before/package.json +11 -0
  588. package/pkg/conformance/install/n04-init-symlink-outside/before/src/retry.ts +1 -0
  589. package/pkg/conformance/install/n04-init-symlink-outside/before/test/retry.test.ts +3 -0
  590. package/pkg/conformance/install/n04-init-symlink-outside/expected/01-init/result.json +4 -0
  591. package/pkg/conformance/install/n05-conflicting-created-workflow/args.json +12 -0
  592. package/pkg/conformance/install/n05-conflicting-created-workflow/before/.github/workflows/tenet.yml +3 -0
  593. package/pkg/conformance/install/n05-conflicting-created-workflow/before/package-lock.json +15 -0
  594. package/pkg/conformance/install/n05-conflicting-created-workflow/before/package.json +11 -0
  595. package/pkg/conformance/install/n05-conflicting-created-workflow/before/src/retry.ts +1 -0
  596. package/pkg/conformance/install/n05-conflicting-created-workflow/before/test/retry.test.ts +3 -0
  597. package/pkg/conformance/install/n05-conflicting-created-workflow/expected/01-init/result.json +4 -0
  598. package/pkg/conformance/install/n06-interrupted-plan-drift/args.json +27 -0
  599. package/pkg/conformance/install/n06-interrupted-plan-drift/before/AGENTS.md +1 -0
  600. package/pkg/conformance/install/n06-interrupted-plan-drift/before/package-lock.json +15 -0
  601. package/pkg/conformance/install/n06-interrupted-plan-drift/before/package.json +11 -0
  602. package/pkg/conformance/install/n06-interrupted-plan-drift/before/src/retry.ts +1 -0
  603. package/pkg/conformance/install/n06-interrupted-plan-drift/before/test/retry.test.ts +3 -0
  604. package/pkg/conformance/install/n07-doctor-missing-lock/args.json +11 -0
  605. package/pkg/conformance/install/n07-doctor-missing-lock/before/README.md +1 -0
  606. package/pkg/conformance/install/n07-doctor-missing-lock/before/tenet.yaml +2 -0
  607. package/pkg/conformance/install/n07-doctor-missing-lock/expected/01-doctor/tree/README.md +1 -0
  608. package/pkg/conformance/install/n07-doctor-missing-lock/expected/01-doctor/tree/tenet.yaml +2 -0
  609. package/pkg/conformance/install/n08-preflight-declined/args.json +14 -0
  610. package/pkg/conformance/install/n08-preflight-declined/before/AGENTS.md +1 -0
  611. package/pkg/conformance/install/n08-preflight-declined/before/package-lock.json +15 -0
  612. package/pkg/conformance/install/n08-preflight-declined/before/package.json +11 -0
  613. package/pkg/conformance/install/n08-preflight-declined/before/src/retry.ts +1 -0
  614. package/pkg/conformance/install/n08-preflight-declined/before/test/retry.test.ts +3 -0
  615. package/pkg/conformance/install/n08-preflight-declined/expected/01-init/tree/AGENTS.md +1 -0
  616. package/pkg/conformance/install/n08-preflight-declined/expected/01-init/tree/package-lock.json +15 -0
  617. package/pkg/conformance/install/n08-preflight-declined/expected/01-init/tree/package.json +11 -0
  618. package/pkg/conformance/install/n08-preflight-declined/expected/01-init/tree/src/retry.ts +1 -0
  619. package/pkg/conformance/install/n08-preflight-declined/expected/01-init/tree/test/retry.test.ts +3 -0
  620. package/pkg/conformance/install/p01-empty/args.json +15 -0
  621. package/pkg/conformance/install/p01-empty/before/.gitkeep +0 -0
  622. package/pkg/conformance/install/p02-node-vitest/args.json +12 -0
  623. package/pkg/conformance/install/p02-node-vitest/before/.nvmrc +1 -0
  624. package/pkg/conformance/install/p02-node-vitest/before/package-lock.json +15 -0
  625. package/pkg/conformance/install/p02-node-vitest/before/package.json +11 -0
  626. package/pkg/conformance/install/p02-node-vitest/before/src/retry.ts +1 -0
  627. package/pkg/conformance/install/p02-node-vitest/before/test/retry.test.ts +3 -0
  628. package/pkg/conformance/install/p03-node-existing-ci/args.json +12 -0
  629. package/pkg/conformance/install/p03-node-existing-ci/before/.github/workflows/ci.yml +10 -0
  630. package/pkg/conformance/install/p03-node-existing-ci/before/package-lock.json +15 -0
  631. package/pkg/conformance/install/p03-node-existing-ci/before/package.json +11 -0
  632. package/pkg/conformance/install/p03-node-existing-ci/before/src/retry.ts +1 -0
  633. package/pkg/conformance/install/p03-node-existing-ci/before/test/retry.test.ts +3 -0
  634. package/pkg/conformance/install/p04-node-matrix/args.json +12 -0
  635. package/pkg/conformance/install/p04-node-matrix/before/.github/workflows/ci.yml +13 -0
  636. package/pkg/conformance/install/p04-node-matrix/before/package-lock.json +15 -0
  637. package/pkg/conformance/install/p04-node-matrix/before/package.json +11 -0
  638. package/pkg/conformance/install/p04-node-matrix/before/src/retry.ts +1 -0
  639. package/pkg/conformance/install/p04-node-matrix/before/test/retry.test.ts +3 -0
  640. package/pkg/conformance/install/p05-python-pytest/args.json +12 -0
  641. package/pkg/conformance/install/p05-python-pytest/before/.python-version +1 -0
  642. package/pkg/conformance/install/p05-python-pytest/before/requirements.txt +1 -0
  643. package/pkg/conformance/install/p05-python-pytest/before/tests/test_retry.py +2 -0
  644. package/pkg/conformance/install/p06-go/args.json +12 -0
  645. package/pkg/conformance/install/p06-go/before/go.mod +3 -0
  646. package/pkg/conformance/install/p06-go/before/retry_test.go +5 -0
  647. package/pkg/conformance/install/p07-existing-agents-md/args.json +12 -0
  648. package/pkg/conformance/install/p07-existing-agents-md/before/AGENTS.md +7 -0
  649. package/pkg/conformance/install/p07-existing-agents-md/before/package-lock.json +15 -0
  650. package/pkg/conformance/install/p07-existing-agents-md/before/package.json +11 -0
  651. package/pkg/conformance/install/p07-existing-agents-md/before/src/retry.ts +1 -0
  652. package/pkg/conformance/install/p07-existing-agents-md/before/test/retry.test.ts +3 -0
  653. package/pkg/conformance/install/p08-existing-mcp/args.json +12 -0
  654. package/pkg/conformance/install/p08-existing-mcp/before/.mcp.json +18 -0
  655. package/pkg/conformance/install/p08-existing-mcp/before/CLAUDE.md +1 -0
  656. package/pkg/conformance/install/p08-existing-mcp/before/package-lock.json +15 -0
  657. package/pkg/conformance/install/p08-existing-mcp/before/package.json +11 -0
  658. package/pkg/conformance/install/p08-existing-mcp/before/src/retry.ts +1 -0
  659. package/pkg/conformance/install/p08-existing-mcp/before/test/retry.test.ts +3 -0
  660. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/args.json +33 -0
  661. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/.gitattributes +1 -0
  662. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/.github/pull_request_template.md +1 -0
  663. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/.mcp.json +18 -0
  664. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/AGENTS.md +3 -0
  665. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/CLAUDE.md +3 -0
  666. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/package-lock.json +15 -0
  667. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/package.json +11 -0
  668. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/src/retry.ts +1 -0
  669. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/tenet/intent.md +3 -0
  670. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/test/retry.test.ts +3 -0
  671. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/.gitattributes +1 -0
  672. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/.github/pull_request_template.md +1 -0
  673. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/.mcp.json +18 -0
  674. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/AGENTS.md +3 -0
  675. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/CLAUDE.md +3 -0
  676. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/package-lock.json +15 -0
  677. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/package.json +11 -0
  678. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/src/retry.ts +1 -0
  679. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/tenet/intent.md +3 -0
  680. package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/test/retry.test.ts +3 -0
  681. package/pkg/conformance/install/p10-remove-keeps-user-edits/args.json +24 -0
  682. package/pkg/conformance/install/p10-remove-keeps-user-edits/before/.mcp.json +18 -0
  683. package/pkg/conformance/install/p10-remove-keeps-user-edits/before/CLAUDE.md +1 -0
  684. package/pkg/conformance/install/p10-remove-keeps-user-edits/before/package-lock.json +15 -0
  685. package/pkg/conformance/install/p10-remove-keeps-user-edits/before/package.json +11 -0
  686. package/pkg/conformance/install/p10-remove-keeps-user-edits/before/src/retry.ts +1 -0
  687. package/pkg/conformance/install/p10-remove-keeps-user-edits/before/tenet/intent.md +1 -0
  688. package/pkg/conformance/install/p10-remove-keeps-user-edits/before/test/retry.test.ts +3 -0
  689. package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/.mcp.json +16 -0
  690. package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/CLAUDE.md +1 -0
  691. package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/package-lock.json +15 -0
  692. package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/package.json +11 -0
  693. package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/src/retry.ts +1 -0
  694. package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/tenet/intent.md +1 -0
  695. package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/tenet.yaml +2 -0
  696. package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/test/retry.test.ts +3 -0
  697. package/pkg/conformance/install/p11-interrupted-install-resumes/args.json +24 -0
  698. package/pkg/conformance/install/p11-interrupted-install-resumes/before/.mcp.json +18 -0
  699. package/pkg/conformance/install/p11-interrupted-install-resumes/before/CLAUDE.md +1 -0
  700. package/pkg/conformance/install/p11-interrupted-install-resumes/before/package-lock.json +15 -0
  701. package/pkg/conformance/install/p11-interrupted-install-resumes/before/package.json +11 -0
  702. package/pkg/conformance/install/p11-interrupted-install-resumes/before/src/retry.ts +1 -0
  703. package/pkg/conformance/install/p11-interrupted-install-resumes/before/test/retry.test.ts +3 -0
  704. package/pkg/conformance/install/p12-windows-local-host/args.json +26 -0
  705. package/pkg/conformance/install/p12-windows-local-host/before/.vscode/mcp.json +10 -0
  706. package/pkg/conformance/install/p12-windows-local-host/before/CLAUDE.md +1 -0
  707. package/pkg/conformance/install/p12-windows-local-host/before/package-lock.json +15 -0
  708. package/pkg/conformance/install/p12-windows-local-host/before/package.json +11 -0
  709. package/pkg/conformance/install/p12-windows-local-host/before/src/retry.ts +1 -0
  710. package/pkg/conformance/install/p12-windows-local-host/before/test/retry.test.ts +3 -0
  711. package/pkg/conformance/install/p13-existing-ci-with-services/args.json +12 -0
  712. package/pkg/conformance/install/p13-existing-ci-with-services/before/.github/workflows/ci.yml +16 -0
  713. package/pkg/conformance/install/p13-existing-ci-with-services/before/package-lock.json +15 -0
  714. package/pkg/conformance/install/p13-existing-ci-with-services/before/package.json +11 -0
  715. package/pkg/conformance/install/p13-existing-ci-with-services/before/src/retry.ts +1 -0
  716. package/pkg/conformance/install/p13-existing-ci-with-services/before/test/retry.test.ts +3 -0
  717. package/pkg/conformance/install/p14-reusable-workflow/args.json +12 -0
  718. package/pkg/conformance/install/p14-reusable-workflow/before/.github/workflows/ci.yml +5 -0
  719. package/pkg/conformance/install/p14-reusable-workflow/before/.github/workflows/reusable.yml +10 -0
  720. package/pkg/conformance/install/p14-reusable-workflow/before/package-lock.json +15 -0
  721. package/pkg/conformance/install/p14-reusable-workflow/before/package.json +11 -0
  722. package/pkg/conformance/install/p14-reusable-workflow/before/src/retry.ts +1 -0
  723. package/pkg/conformance/install/p14-reusable-workflow/before/test/retry.test.ts +3 -0
  724. package/pkg/conformance/install/p15-non-github-forge/args.json +15 -0
  725. package/pkg/conformance/install/p15-non-github-forge/before/package-lock.json +15 -0
  726. package/pkg/conformance/install/p15-non-github-forge/before/package.json +11 -0
  727. package/pkg/conformance/install/p15-non-github-forge/before/src/retry.ts +1 -0
  728. package/pkg/conformance/install/p15-non-github-forge/before/test/retry.test.ts +3 -0
  729. package/pkg/conformance/install/p16-vendor-fresh-clone/args.json +20 -0
  730. package/pkg/conformance/install/p16-vendor-fresh-clone/before/package-lock.json +15 -0
  731. package/pkg/conformance/install/p16-vendor-fresh-clone/before/package.json +11 -0
  732. package/pkg/conformance/install/p16-vendor-fresh-clone/before/src/retry.ts +1 -0
  733. package/pkg/conformance/install/p16-vendor-fresh-clone/before/test/retry.test.ts +3 -0
  734. package/pkg/conformance/install/p17-upgrade-pins-and-policy/args.json +24 -0
  735. package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/.cursor/mcp.json +10 -0
  736. package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/.mcp.json +18 -0
  737. package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/CLAUDE.md +1 -0
  738. package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/package-lock.json +15 -0
  739. package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/package.json +11 -0
  740. package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/src/retry.ts +1 -0
  741. package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/test/retry.test.ts +3 -0
  742. package/pkg/conformance/install/p18-accepted-reporter-edit/args.json +15 -0
  743. package/pkg/conformance/install/p18-accepted-reporter-edit/before/.github/workflows/ci.yml +9 -0
  744. package/pkg/conformance/install/p18-accepted-reporter-edit/before/package-lock.json +15 -0
  745. package/pkg/conformance/install/p18-accepted-reporter-edit/before/package.json +11 -0
  746. package/pkg/conformance/install/p18-accepted-reporter-edit/before/src/retry.ts +1 -0
  747. package/pkg/conformance/install/p18-accepted-reporter-edit/before/test/retry.test.ts +3 -0
  748. package/pkg/conformance/scenarios/README.md +34 -0
  749. package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/kit/TENET.md +3 -0
  750. package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/src/retry.ts +3 -0
  751. package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/tenet/blessed/tenet__intent.md/requirements.md +1 -0
  752. package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/tenet/blessed/tenet__intent.md/requirements.md.anchors.json +10 -0
  753. package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/tenet/intent.md +7 -0
  754. package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/tenet.lock +7 -0
  755. package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/tenet.yaml +20 -0
  756. package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/test/retry.test.ts +2 -0
  757. package/pkg/conformance/scenarios/s01-tagged-test-never-ran/expected/04-card.md +9 -0
  758. package/pkg/conformance/scenarios/s01-tagged-test-never-ran/expected/04-verify.json +92 -0
  759. package/pkg/conformance/scenarios/s01-tagged-test-never-ran/steps.json +88 -0
  760. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/kit/TENET.md +3 -0
  761. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/src/retry.ts +6 -0
  762. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/tenet/blessed/tenet__intent.md/requirements.md +2 -0
  763. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/tenet/blessed/tenet__intent.md/requirements.md.anchors.json +15 -0
  764. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/tenet/intent.md +8 -0
  765. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/tenet.lock +7 -0
  766. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/tenet.yaml +20 -0
  767. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/test/retry.test.ts +2 -0
  768. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/expected/04-card.md +9 -0
  769. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/expected/04-verify.json +92 -0
  770. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/expected/05-card.md +10 -0
  771. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/expected/05-verify.json +107 -0
  772. package/pkg/conformance/scenarios/s02-implements-changed-same-commit/steps.json +101 -0
  773. package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/before/kit/TENET.md +3 -0
  774. package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/before/tenet/intent.md +7 -0
  775. package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/before/tenet.lock +7 -0
  776. package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/before/tenet.yaml +24 -0
  777. package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/expected/01-gate-fixture.json +48 -0
  778. package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/expected/02-check.json +106 -0
  779. package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/steps.json +79 -0
  780. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/kit/TENET.md +3 -0
  781. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/src/retry.ts +3 -0
  782. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/blessed/tenet__specs__prd.md/requirements.md +1 -0
  783. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/blessed/tenet__specs__prd.md/requirements.md.anchors.json +7 -0
  784. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/blessed/tenet__vision.md/vision.md +1 -0
  785. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/blessed/tenet__vision.md/vision.md.anchors.json +1 -0
  786. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/specs/plan.md +7 -0
  787. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/specs/prd.md +7 -0
  788. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/specs/tech-spec.md +7 -0
  789. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/specs/ux-spec.md +7 -0
  790. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/vision.md +7 -0
  791. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet.lock +7 -0
  792. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet.yaml +20 -0
  793. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/expected/02-board.json +72 -0
  794. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/expected/03-context.json +46 -0
  795. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/expected/04-mcp.json +71 -0
  796. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/expected/05-bless.json +13 -0
  797. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/expected/06-context-sdk.json +38 -0
  798. package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/steps.json +98 -0
  799. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/kit/TENET.md +3 -0
  800. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/src/checkout/pay.ts +1 -0
  801. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/blessed/tenet__specs__prd.md/requirements.md +3 -0
  802. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/blessed/tenet__specs__prd.md/requirements.md.anchors.json +5 -0
  803. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/blessed/tenet__vision.md/vision.md +1 -0
  804. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/blessed/tenet__vision.md/vision.md.anchors.json +1 -0
  805. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/specs/plan.md +7 -0
  806. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/specs/prd.md +9 -0
  807. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/specs/tech-spec.md +7 -0
  808. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/specs/ux-spec.md +7 -0
  809. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/vision.md +7 -0
  810. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet.lock +7 -0
  811. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet.yaml +20 -0
  812. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/expected/01-context-tight.json +54 -0
  813. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/expected/02-mcp.json +79 -0
  814. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/expected/03-context-explicit.json +52 -0
  815. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/expected/04-context-zero.json +17 -0
  816. package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/steps.json +79 -0
  817. package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/CODEOWNERS +2 -0
  818. package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/kit/TENET.md +3 -0
  819. package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/src/api/handler.ts +2007 -0
  820. package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/src/billing/charge.ts +2007 -0
  821. package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/src/shared/http.ts +3 -0
  822. package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/tenet/blessed/tenet__intent.md/requirements.md +2 -0
  823. package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/tenet/blessed/tenet__intent.md/requirements.md.anchors.json +11 -0
  824. package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/tenet/intent.md +8 -0
  825. package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/tenet.lock +7 -0
  826. package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/tenet.yaml +20 -0
  827. package/pkg/conformance/scenarios/s06-change-to-shared-helper/expected/01-onboard-initial.json +240 -0
  828. package/pkg/conformance/scenarios/s06-change-to-shared-helper/expected/05-onboard-refresh.json +252 -0
  829. package/pkg/conformance/scenarios/s06-change-to-shared-helper/expected/06-card.md +8 -0
  830. package/pkg/conformance/scenarios/s06-change-to-shared-helper/expected/06-verify.json +77 -0
  831. package/pkg/conformance/scenarios/s06-change-to-shared-helper/steps.json +122 -0
  832. package/pkg/conformance/scenarios/s07-install-interrupted-part-way/before/.mcp.json +10 -0
  833. package/pkg/conformance/scenarios/s07-install-interrupted-part-way/before/AGENTS.md +3 -0
  834. package/pkg/conformance/scenarios/s07-install-interrupted-part-way/before/package.json +11 -0
  835. package/pkg/conformance/scenarios/s07-install-interrupted-part-way/before/src/index.ts +1 -0
  836. package/pkg/conformance/scenarios/s07-install-interrupted-part-way/before/test/index.test.ts +2 -0
  837. package/pkg/conformance/scenarios/s07-install-interrupted-part-way/expected/01-interrupted-init.json +4 -0
  838. package/pkg/conformance/scenarios/s07-install-interrupted-part-way/expected/02-init-resume.json +75 -0
  839. package/pkg/conformance/scenarios/s07-install-interrupted-part-way/expected/03-doctor.json +40 -0
  840. package/pkg/conformance/scenarios/s07-install-interrupted-part-way/expected/04-remove.json +44 -0
  841. package/pkg/conformance/scenarios/s07-install-interrupted-part-way/steps.json +56 -0
  842. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/kit/TENET.md +3 -0
  843. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/src/retry.ts +3 -0
  844. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/blessed/tenet__specs__prd.md/requirements.md +1 -0
  845. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/blessed/tenet__specs__prd.md/requirements.md.anchors.json +7 -0
  846. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/blessed/tenet__vision.md/vision.md +1 -0
  847. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/blessed/tenet__vision.md/vision.md.anchors.json +1 -0
  848. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/specs/plan.md +7 -0
  849. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/specs/prd.md +7 -0
  850. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/specs/tech-spec.md +7 -0
  851. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/specs/ux-spec.md +7 -0
  852. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/vision.md +7 -0
  853. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet.lock +7 -0
  854. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet.yaml +20 -0
  855. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/expected/02-context-clean.json +38 -0
  856. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/expected/04-context-drift.json +40 -0
  857. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/expected/05-bless.json +13 -0
  858. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/expected/05-log-entry.json +15 -0
  859. package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/steps.json +80 -0
  860. package/pkg/conformance/scenarios/s09-renamed-heading/before/kit/TENET.md +3 -0
  861. package/pkg/conformance/scenarios/s09-renamed-heading/before/src/retry.ts +3 -0
  862. package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/blessed/tenet__specs__prd.md/checkout-retries.md +1 -0
  863. package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/blessed/tenet__specs__prd.md/checkout-retries.md.anchors.json +5 -0
  864. package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/blessed/tenet__vision.md/vision.md +1 -0
  865. package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/blessed/tenet__vision.md/vision.md.anchors.json +1 -0
  866. package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/specs/plan.md +7 -0
  867. package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/specs/prd.md +7 -0
  868. package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/specs/tech-spec.md +7 -0
  869. package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/specs/ux-spec.md +7 -0
  870. package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/vision.md +7 -0
  871. package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet.lock +7 -0
  872. package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet.yaml +20 -0
  873. package/pkg/conformance/scenarios/s09-renamed-heading/before/test/retry.test.ts +2 -0
  874. package/pkg/conformance/scenarios/s09-renamed-heading/expected/02-fix.json +34 -0
  875. package/pkg/conformance/scenarios/s09-renamed-heading/expected/03-check.json +14 -0
  876. package/pkg/conformance/scenarios/s09-renamed-heading/expected/04-board.json +56 -0
  877. package/pkg/conformance/scenarios/s09-renamed-heading/expected/05-context.json +38 -0
  878. package/pkg/conformance/scenarios/s09-renamed-heading/steps.json +58 -0
  879. package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/kit/TENET.md +3 -0
  880. package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/src/retry.ts +3 -0
  881. package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/tenet/blessed/tenet__intent.md/requirements.md +1 -0
  882. package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/tenet/blessed/tenet__intent.md/requirements.md.anchors.json +7 -0
  883. package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/tenet/intent.md +7 -0
  884. package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/tenet.lock +7 -0
  885. package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/tenet.yaml +20 -0
  886. package/pkg/conformance/scenarios/s10-pr-closed-without-merging/expected/04-card.md +8 -0
  887. package/pkg/conformance/scenarios/s10-pr-closed-without-merging/expected/04-verify.json +77 -0
  888. package/pkg/conformance/scenarios/s10-pr-closed-without-merging/expected/05-verify-closed.json +6 -0
  889. package/pkg/conformance/scenarios/s10-pr-closed-without-merging/steps.json +108 -0
  890. package/pkg/conformance/scenarios/s11-readme-walkthrough/before/README.md +3 -0
  891. package/pkg/conformance/scenarios/s11-readme-walkthrough/before/package.json +8 -0
  892. package/pkg/conformance/scenarios/s11-readme-walkthrough/before/src/retry.ts +3 -0
  893. package/pkg/conformance/scenarios/s11-readme-walkthrough/before/test/retry.test.ts +2 -0
  894. package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/01-init.json +75 -0
  895. package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/02-onboard-inventory.json +141 -0
  896. package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/06-card.md +7 -0
  897. package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/06-onboard-card.json +10 -0
  898. package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/07-bless.json +13 -0
  899. package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/08-remove.json +57 -0
  900. package/pkg/conformance/scenarios/s11-readme-walkthrough/steps.json +93 -0
  901. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/.claude/settings.json +1 -0
  902. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/.github/workflows/ci.yml +8 -0
  903. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/CODEOWNERS +1 -0
  904. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/README.md +3 -0
  905. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/docs/adr/0001-retries.md +1 -0
  906. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/docs/adr/0002-timeouts.md +1 -0
  907. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/docs/architecture.md +3 -0
  908. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/package.json +11 -0
  909. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/src/retry.ts +6 -0
  910. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/test/checkout.retry.test.ts +4 -0
  911. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/01-init.json +103 -0
  912. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/02-onboard-inventory.json +233 -0
  913. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/06-card.md +9 -0
  914. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/06-onboard-card.json +10 -0
  915. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/07-bless.json +13 -0
  916. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/08-board.json +34 -0
  917. package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/steps.json +98 -0
  918. package/pkg/conformance/scenarios/s13-ux-walkthrough-new/before/.gitkeep +0 -0
  919. package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/01-init.json +82 -0
  920. package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/04-onboard-inventory.json +188 -0
  921. package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/05-card.md +12 -0
  922. package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/05-onboard-card.json +10 -0
  923. package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/06-bless.json +13 -0
  924. package/pkg/conformance/scenarios/s13-ux-walkthrough-new/steps.json +76 -0
@@ -0,0 +1,212 @@
1
+ import { mkdtemp, readFile, readdir, rm, writeFile, mkdir, lstat } from "node:fs/promises";
2
+ import { tmpdir } from "node:os";
3
+ import path from "node:path";
4
+ import { inflateRawSync } from "node:zlib";
5
+ import { sha256 } from "../core/hash.js";
6
+ import { message } from "../core/messages.js";
7
+ import { validate } from "../core/schema.js";
8
+ import { readReport } from "../reports/index.js";
9
+ export const bundleLimit = 50 * 1024 * 1024;
10
+ export function refusedBundle(runId, reason) {
11
+ const code = "TN-RECORD-BUNDLE";
12
+ const text = message(code, { run_id: runId, reason });
13
+ return Object.assign(new Error(text.message), { code, fix: text.fix });
14
+ }
15
+ export function safeEntry(name) {
16
+ if (!name || name.includes("\\") || /^[A-Za-z]:/.test(name) || name.split("/").some((part) => !part || part === "." || part === ".." || part.includes(":") || Array.from(part).some((char) => char.charCodeAt(0) < 32))) {
17
+ throw new Error("unsafe bundle path");
18
+ }
19
+ return name;
20
+ }
21
+ function limitedFiles(files) {
22
+ let size = 0;
23
+ for (const [name, contents] of files) {
24
+ safeEntry(name);
25
+ size += contents.length;
26
+ if (size > bundleLimit)
27
+ throw new Error("bundle exceeds 50 MB");
28
+ }
29
+ }
30
+ function jsonDepth(value) {
31
+ const visit = (entry, depth) => {
32
+ if (entry === null || typeof entry !== "object")
33
+ return;
34
+ if (depth > 64)
35
+ throw new Error("JSON nesting exceeds 64 levels");
36
+ for (const child of Object.values(entry))
37
+ visit(child, depth + 1);
38
+ };
39
+ visit(value, 1);
40
+ }
41
+ export function decodeBundle(files) {
42
+ limitedFiles(files);
43
+ const manifest = files.get("bundle.json");
44
+ if (!manifest)
45
+ throw new Error("bundle.json is missing");
46
+ const body = JSON.parse(manifest.toString("utf8"));
47
+ jsonDepth(body);
48
+ const result = validate("bundle", body);
49
+ if (!result.ok)
50
+ throw new Error("bundle.json does not match its schema");
51
+ const bundle = body;
52
+ const names = new Set();
53
+ for (const check of bundle.checks) {
54
+ if (names.has(check.name))
55
+ throw new Error("duplicate check in bundle");
56
+ names.add(check.name);
57
+ if (check.report === "none") {
58
+ if (check.report_sha256 !== sha256(Buffer.alloc(0)))
59
+ throw new Error("empty report digest differs");
60
+ continue;
61
+ }
62
+ const report = files.get(safeEntry(check.report));
63
+ if (!report || sha256(report) !== check.report_sha256)
64
+ throw new Error("report digest differs or file is missing");
65
+ }
66
+ return { bundle, files };
67
+ }
68
+ export async function writeBundle(directory, bundle, files) {
69
+ const all = new Map(files).set("bundle.json", Buffer.from(`${JSON.stringify(bundle, null, 2)}\n`));
70
+ const data = decodeBundle(all);
71
+ await mkdir(directory, { recursive: true });
72
+ for (const [name, value] of all) {
73
+ const target = path.join(directory, name);
74
+ await mkdir(path.dirname(target), { recursive: true });
75
+ await writeFile(target, value, { flag: "wx" });
76
+ }
77
+ return data;
78
+ }
79
+ export async function readBundle(directory) {
80
+ const files = new Map();
81
+ let bytes = 0;
82
+ if (!(await lstat(directory)).isDirectory())
83
+ throw new Error("bundle directory is unavailable");
84
+ async function visit(root, depth) {
85
+ if (depth > 64)
86
+ throw new Error("bundle directory nesting exceeds 64 levels");
87
+ for (const entry of await readdir(root, { withFileTypes: true })) {
88
+ const filename = path.join(root, entry.name);
89
+ const name = safeEntry(path.relative(directory, filename).split(path.sep).join("/"));
90
+ if (entry.isDirectory())
91
+ await visit(filename, depth + 1);
92
+ else if (entry.isFile()) {
93
+ bytes += (await lstat(filename)).size;
94
+ if (bytes > bundleLimit)
95
+ throw new Error("bundle exceeds 50 MB");
96
+ files.set(name, await readFile(filename));
97
+ }
98
+ else
99
+ throw new Error("bundle contains a link or unsupported file");
100
+ }
101
+ }
102
+ await visit(directory, 0);
103
+ return decodeBundle(files);
104
+ }
105
+ // GitHub artifacts are ZIP files. Only the central directory describes the
106
+ // accepted files. No archive entry is ever extracted to a user-selected path.
107
+ export function readArtifact(zip) {
108
+ if (zip.length > bundleLimit || zip.length < 22)
109
+ throw new Error("invalid artifact size");
110
+ let end = zip.length - 22;
111
+ while (end >= Math.max(0, zip.length - 65_557)) {
112
+ if (zip.readUInt32LE(end) === 0x06054b50 && end + 22 + zip.readUInt16LE(end + 20) === zip.length)
113
+ break;
114
+ end -= 1;
115
+ }
116
+ if (end < Math.max(0, zip.length - 65_557) || zip.readUInt32LE(end + 4) !== 0)
117
+ throw new Error("invalid ZIP directory");
118
+ const count = zip.readUInt16LE(end + 10);
119
+ let offset = zip.readUInt32LE(end + 16);
120
+ if (count !== zip.readUInt16LE(end + 8) || offset + zip.readUInt32LE(end + 12) !== end)
121
+ throw new Error("invalid ZIP bounds");
122
+ const directoryStart = offset;
123
+ const files = new Map();
124
+ const entries = new Set();
125
+ let size = 0;
126
+ for (let index = 0; index < count; index += 1) {
127
+ if (offset + 46 > end || zip.readUInt32LE(offset) !== 0x02014b50)
128
+ throw new Error("invalid ZIP entry");
129
+ const flags = zip.readUInt16LE(offset + 8);
130
+ const method = zip.readUInt16LE(offset + 10);
131
+ const packed = zip.readUInt32LE(offset + 20);
132
+ const unpacked = zip.readUInt32LE(offset + 24);
133
+ const nameLength = zip.readUInt16LE(offset + 28);
134
+ const next = offset + 46 + nameLength + zip.readUInt16LE(offset + 30) + zip.readUInt16LE(offset + 32);
135
+ const mode = zip.readUInt32LE(offset + 38) >>> 16;
136
+ const local = zip.readUInt32LE(offset + 42);
137
+ if (next > end || (flags & 1) !== 0 || (mode & 0xf000) === 0xa000)
138
+ throw new Error("unsupported ZIP entry");
139
+ const name = zip.toString("utf8", offset + 46, offset + 46 + nameLength);
140
+ offset = next;
141
+ const dir = name.endsWith("/");
142
+ safeEntry(dir ? name.slice(0, -1) : name);
143
+ if (entries.has(name))
144
+ throw new Error("duplicate ZIP entry");
145
+ entries.add(name);
146
+ if (dir && !packed && !unpacked)
147
+ continue;
148
+ size += unpacked;
149
+ if (dir || size > bundleLimit || local + 30 > directoryStart || zip.readUInt32LE(local) !== 0x04034b50)
150
+ throw new Error("invalid ZIP entry size");
151
+ const localLength = zip.readUInt16LE(local + 26);
152
+ const start = local + 30 + localLength + zip.readUInt16LE(local + 28);
153
+ if (start + packed > directoryStart || zip.toString("utf8", local + 30, local + 30 + localLength) !== name)
154
+ throw new Error("invalid ZIP local header");
155
+ const payload = zip.subarray(start, start + packed);
156
+ const value = method === 0 ? payload : method === 8 ? inflateRawSync(payload, { maxOutputLength: Math.max(unpacked, 1) }) : undefined;
157
+ if (!value || value.length !== unpacked)
158
+ throw new Error("invalid ZIP payload");
159
+ files.set(name, value);
160
+ }
161
+ if (offset !== end)
162
+ throw new Error("invalid ZIP directory length");
163
+ return decodeBundle(files);
164
+ }
165
+ export async function parseBundledReport(kind, bytes, prefix) {
166
+ if (kind === "ctrf" || kind === "jest-json")
167
+ jsonDepth(JSON.parse(bytes.toString("utf8")));
168
+ if (kind === "go-test-json") {
169
+ for (const line of bytes.toString("utf8").split("\n"))
170
+ if (line.trim())
171
+ jsonDepth(JSON.parse(line));
172
+ }
173
+ const dir = await mkdtemp(path.join(tmpdir(), "tenet-report-"));
174
+ try {
175
+ const file = path.join(dir, "report");
176
+ await writeFile(file, bytes);
177
+ return readReport(kind, file, { prefix });
178
+ }
179
+ finally {
180
+ await rm(dir, { recursive: true, force: true });
181
+ }
182
+ }
183
+ const rank = { pass: 0, skip: 1, fail: 2, error: 3 };
184
+ export function mergeMatrix(reports) {
185
+ const cases = new Map();
186
+ for (const report of reports) {
187
+ for (const entry of report.cases) {
188
+ const previous = cases.get(entry.full_name);
189
+ if (!previous) {
190
+ cases.set(entry.full_name, { ...entry, tags: [...entry.tags], attempts: [...entry.attempts] });
191
+ if (cases.size > 20_000)
192
+ throw new Error("matrix exceeds 20,000 cases");
193
+ continue;
194
+ }
195
+ if (rank[entry.status] > rank[previous.status])
196
+ previous.status = entry.status;
197
+ previous.attempts.push(...entry.attempts);
198
+ previous.tags = [...new Set([...previous.tags, ...entry.tags])];
199
+ if (!previous.file && entry.file)
200
+ previous.file = entry.file;
201
+ if (entry.duration_ms !== undefined)
202
+ previous.duration_ms = (previous.duration_ms ?? 0) + entry.duration_ms;
203
+ }
204
+ }
205
+ return {
206
+ runner: reports[0]?.runner ?? "none",
207
+ cases: [...cases.values()],
208
+ teardown_failed: reports.some((report) => report.teardown_failed),
209
+ inconclusive: cases.size === 0,
210
+ };
211
+ }
212
+ //# sourceMappingURL=bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../src/verify/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EA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WAAW,KAAK,SAAS;gBAAE,QAAQ,CAAC,WAAW,GAAG,CAAC,QAAQ,CAAC,WAAW,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC;QAC9G,CAAC;IACH,CAAC;IACD,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,MAAM;QACpC,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1B,eAAe,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;QACjE,YAAY,EAAE,KAAK,CAAC,IAAI,KAAK,CAAC;KAC/B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ProofCard } from "../types/generated.js";
2
+ export declare function renderCard(model: ProofCard): string;
3
+ export declare class SummaryOverflow extends RangeError {
4
+ readonly essential: string;
5
+ constructor(essential: string);
6
+ }
7
+ export declare function renderCheckSummary(model: ProofCard, limit?: number): string;
@@ -0,0 +1,105 @@
1
+ const badgeLabel = {
2
+ advisory: "advisory",
3
+ "verified-on-ci": "verified on CI",
4
+ "intent-not-yet-blessed": "advisory · intent not yet blessed",
5
+ };
6
+ const authorshipLabel = {
7
+ "written-here": "written in this change",
8
+ "tag-added-here": "tag added here",
9
+ unknown: "existing test",
10
+ };
11
+ function singleLine(value) { return value.replace(/[\r\n]+/g, " "); }
12
+ function requirementTests(tests) {
13
+ if (tests.failed)
14
+ return `${tests.failed} tagged test(s) failed`;
15
+ if (tests.not_run)
16
+ return `${tests.not_run} tagged test(s) not run`;
17
+ return `${tests.passed} tagged test${tests.passed === 1 ? "" : "s"} passed`;
18
+ }
19
+ function itemLine(item, omitPassingNames) {
20
+ const names = item.names.join(", ");
21
+ switch (item.result) {
22
+ case "passed":
23
+ return ` ✓ ${item.id} · test passed on this commit · ${authorshipLabel[item.authorship]}${omitPassingNames ? "" : ` · ${names}`}`;
24
+ case "failed":
25
+ return ` ✗ ${item.id} · test failed on this commit · ${authorshipLabel[item.authorship]} · ${item.first_failure ?? names}`;
26
+ case "no-test": return ` ! ${item.id} · no test · nothing tagged [${item.id}]`;
27
+ case "skipped": return ` ! ${item.id} · skipped · ${names}`;
28
+ case "not-run": return item.tests.passed > 0
29
+ ? ` ! ${item.id} · coverage not confirmed · ${item.tests.passed}/${item.tests.expected} tagged tests ran`
30
+ : ` ! ${item.id} · not run · ${item.tests.expected} tagged test(s) did not run`;
31
+ }
32
+ }
33
+ function markdown(model, omitPassingNames) {
34
+ const lines = [
35
+ `### Tenet proof · ${model.tested.commit.slice(0, 6).toLowerCase()} (${model.tested.kind === "merge-candidate" ? "merge candidate" : "head"}) · ${badgeLabel[model.badge]}`,
36
+ ];
37
+ if (model.requirements.length) {
38
+ lines.push("Your intent this change touches");
39
+ for (const item of model.requirements) {
40
+ if (item.why !== "same-area")
41
+ lines.push(` ${item.id} ${item.state} · "${item.excerpt}" · ${item.why} · ${requirementTests(item.tests)}`);
42
+ }
43
+ const same = model.requirements.filter((item) => item.why === "same-area").map((item) => item.id);
44
+ if (same.length)
45
+ lines.push(` ${same.join(", ")} blessed · may be affected (same area)`);
46
+ }
47
+ lines.push("Acceptance");
48
+ if (!model.items.length)
49
+ lines.push(" ! no acceptance items · add the block from the template");
50
+ else
51
+ lines.push(...model.items.map((item) => itemLine(item, omitPassingNames)));
52
+ const tests = model.tests;
53
+ const testsClause = tests.report !== "ok" ? `not checked (report ${tests.report})` :
54
+ tests.failed || tests.skipped ? `${tests.passed} passed, ${tests.failed} failed, ${tests.skipped} skipped` : `${tests.passed} passed`;
55
+ const weakening = model.weakening;
56
+ const unchecked = weakening.not_checked.length ? ` (not checked: ${weakening.not_checked.join(", ")})` : "";
57
+ const weakened = weakening.found
58
+ ? `! weakening detected: ${weakening.by.map((entry) => `${entry.finding} in ${entry.file} (${entry.names.join(", ")})`).join("; ")}${unchecked}`
59
+ : `✓ no weakening detected by these checks${unchecked}`;
60
+ const protectedFiles = model.protected.length || model.workflow_changed
61
+ ? `! protected files touched: ${model.protected.join(", ")}${model.workflow_changed ? " (test workflow changed)" : ""}`
62
+ : "✓ no protected files touched";
63
+ lines.push(`Tests ${testsClause} · ${weakened} · ${protectedFiles}`);
64
+ if (model.blessings_changed.length) {
65
+ lines.push(`Blessings changed: ${model.blessings_changed.map((item) => `${item.doc}#${item.section} blessed by ${item.blessed_by} (committed by ${item.commit_author})`).join(", ")}`);
66
+ }
67
+ if (model.deltas.length)
68
+ lines.push(`Spec deltas: ${model.deltas.map((item) => `${item.doc} (+${item.added} ~${item.modified} -${item.removed})`).join(", ")}`);
69
+ const blocked = model.rules.filter((rule) => rule.would_block);
70
+ if (blocked.length)
71
+ lines.push(`Would have blocked: ${blocked.map((rule) => rule.reason).join(" · ")}`);
72
+ if (model.degraded.length)
73
+ lines.push(`Degraded: ${model.degraded.join(" · ")}`);
74
+ if (model.why.length)
75
+ lines.push(`Why: ${model.why.map((reason) => `${reason.text} [${reason.class}]`).join(" · ")}`);
76
+ return `${lines.map(singleLine).join("\n")}\n`;
77
+ }
78
+ export function renderCard(model) { return markdown(model, false); }
79
+ export class SummaryOverflow extends RangeError {
80
+ essential;
81
+ constructor(essential) {
82
+ super("required proof details exceed the check summary limit");
83
+ this.essential = essential;
84
+ }
85
+ }
86
+ export function renderCheckSummary(model, limit = 60_000) {
87
+ const full = renderCard(model);
88
+ if (full.length <= limit)
89
+ return full;
90
+ const prominent = { ...model, requirements: model.requirements.filter(({ why }) => why !== "same-area") };
91
+ const withoutSameArea = markdown(prominent, false);
92
+ if (withoutSameArea.length <= limit)
93
+ return withoutSameArea;
94
+ const withoutPassingNames = markdown(prominent, true);
95
+ if (withoutPassingNames.length <= limit)
96
+ return withoutPassingNames;
97
+ const essential = markdown({
98
+ ...prominent, requirements: prominent.requirements.filter(({ tests }) => tests.expected === 0 ||
99
+ tests.failed > 0 || tests.not_run > 0 || tests.passed < tests.expected),
100
+ }, true);
101
+ if (essential.length > limit)
102
+ throw new SummaryOverflow(essential);
103
+ return essential;
104
+ }
105
+ //# sourceMappingURL=card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/verify/card.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAG;IACjB,QAAQ,EAAE,UAAU;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,wBAAwB,EAAE,mCAAmC;CACrD,CAAC;AAEX,MAAM,eAAe,GAAG;IACtB,cAAc,EAAE,wBAAwB;IACxC,gBAAgB,EAAE,gBAAgB;IAClC,OAAO,EAAE,eAAe;CAChB,CAAC;AAEX,SAAS,UAAU,CAAC,KAAa,IAAY,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAErF,SAAS,gBAAgB,CAAC,KAAiD;IACzE,IAAI,KAAK,CAAC,MAAM;QAAE,OAAO,GAAG,KAAK,CAAC,MAAM,wBAAwB,CAAC;IACjE,IAAI,KAAK,CAAC,OAAO;QAAE,OAAO,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC;IACpE,OAAO,GAAG,KAAK,CAAC,MAAM,eAAe,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;AAC9E,CAAC;AAED,SAAS,QAAQ,CAAC,IAAgC,EAAE,gBAAyB;IAC3E,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;QACpB,KAAK,QAAQ;YACX,OAAO,OAAO,IAAI,CAAC,EAAE,mCAAmC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;QACrI,KAAK,QAAQ;YACX,OAAO,OAAO,IAAI,CAA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undle.js";
2
+ export type PullRequest = {
3
+ number: number;
4
+ body: string;
5
+ head: string;
6
+ base: string;
7
+ };
8
+ export type WorkflowRun = {
9
+ id: string;
10
+ attempt: number;
11
+ workflow: string;
12
+ head: string;
13
+ repository: string;
14
+ startedAt: string;
15
+ };
16
+ export type Conclusion = "success" | "neutral" | "failure";
17
+ export type Downloaded = {
18
+ total: number;
19
+ missing: number;
20
+ bundles: BundleData[];
21
+ expiredAt?: string;
22
+ };
23
+ export interface ForgeAdapter {
24
+ findPullRequests(head: string): Promise<PullRequest[]>;
25
+ getPullRequest(number: number): Promise<PullRequest>;
26
+ upsertCheckRun(check: {
27
+ head: string;
28
+ conclusion: Conclusion;
29
+ summary: string;
30
+ }): Promise<void>;
31
+ downloadBundles(run: WorkflowRun): Promise<Downloaded>;
32
+ latestRun(head: string, workflow: string): Promise<WorkflowRun | null>;
33
+ }
34
+ export type ForgeRequest = (method: string, resource: string, body?: unknown) => Promise<{
35
+ status: number;
36
+ data: unknown;
37
+ }>;
38
+ export declare function workflowRun(value: unknown): WorkflowRun;
39
+ export declare class GitHubForge implements ForgeAdapter {
40
+ private readonly repository;
41
+ private readonly request;
42
+ private readonly prefix;
43
+ constructor(repository: string, request: ForgeRequest);
44
+ private call;
45
+ private pages;
46
+ findPullRequests(head: string): Promise<PullRequest[]>;
47
+ getPullRequest(number: number): Promise<PullRequest>;
48
+ upsertCheckRun(check: {
49
+ head: string;
50
+ conclusion: Conclusion;
51
+ summary: string;
52
+ }): Promise<void>;
53
+ latestRun(head: string, workflow: string): Promise<WorkflowRun | null>;
54
+ downloadBundles(run: WorkflowRun): Promise<Downloaded>;
55
+ }
56
+ export declare function githubRequest(token: string, server?: string, fetcher?: typeof fetch): ForgeRequest;
@@ -0,0 +1,173 @@
1
+ import { bundleLimit, readArtifact } from "./bundle.js";
2
+ function object(value) {
3
+ return value && typeof value === "object" ? value : {};
4
+ }
5
+ function text(value) { return typeof value === "string" ? value : ""; }
6
+ export function workflowRun(value) {
7
+ const raw = object(value);
8
+ const repo = object(raw.repository);
9
+ const id = raw.id;
10
+ const attempt = raw.run_attempt;
11
+ const workflow = text(raw.name);
12
+ const head = text(raw.head_sha);
13
+ const repository = text(repo.full_name);
14
+ const startedAt = text(raw.run_started_at) || text(raw.created_at);
15
+ if (typeof id !== "number" && typeof id !== "string" || !/^\d+$/.test(String(id)) ||
16
+ typeof attempt !== "number" || !Number.isInteger(attempt) || attempt < 1 ||
17
+ !workflow || !/^[a-f0-9]{40,64}$/.test(head) || !repository || !Number.isFinite(Date.parse(startedAt))) {
18
+ throw new Error("invalid workflow run metadata");
19
+ }
20
+ return { id: String(id), attempt, workflow, head, repository, startedAt };
21
+ }
22
+ function pullRequest(value) {
23
+ const raw = object(value);
24
+ const head = text(object(raw.head).sha);
25
+ const base = text(object(raw.base).sha);
26
+ const number = raw.number;
27
+ if (typeof number !== "number" || !Number.isSafeInteger(number) || number < 1 ||
28
+ !/^[a-f0-9]{40,64}$/.test(head) || !/^[a-f0-9]{40,64}$/.test(base))
29
+ throw new Error("invalid pull request metadata");
30
+ return { number, head, base, body: text(raw.body) };
31
+ }
32
+ export class GitHubForge {
33
+ repository;
34
+ request;
35
+ prefix;
36
+ constructor(repository, request) {
37
+ this.repository = repository;
38
+ this.request = request;
39
+ const parts = repository.split("/");
40
+ if (parts.length !== 2 || parts.some((part) => !/^[A-Za-z0-9][A-Za-z0-9_.-]*$/.test(part))) {
41
+ throw new Error("invalid GitHub repository");
42
+ }
43
+ this.prefix = `/repos/${repository}`;
44
+ }
45
+ async call(method, resource, body) {
46
+ const response = await this.request(method, this.prefix + resource, body);
47
+ if (response.status < 200 || response.status >= 300)
48
+ throw new Error(`GitHub returned ${response.status}`);
49
+ return response.data;
50
+ }
51
+ async pages(resource, key) {
52
+ const result = [];
53
+ for (let page = 1;; page += 1) {
54
+ const response = await this.call("GET", `${resource + (resource.includes("?") ? "&" : "?")}per_page=100&page=${page}`);
55
+ const entries = key ? object(response)[key] : response;
56
+ if (!Array.isArray(entries))
57
+ throw new Error("GitHub returned an invalid list");
58
+ result.push(...entries);
59
+ if (entries.length < 100)
60
+ return result;
61
+ }
62
+ }
63
+ async findPullRequests(head) {
64
+ return (await this.pages("/pulls?state=open")).map(pullRequest).filter((pr) => pr.head === head);
65
+ }
66
+ async getPullRequest(number) {
67
+ if (!Number.isSafeInteger(number) || number < 1)
68
+ throw new Error("invalid pull request number");
69
+ return pullRequest(await this.call("GET", `/pulls/${number}`));
70
+ }
71
+ async upsertCheckRun(check) {
72
+ const runs = await this.pages(`/commits/${encodeURIComponent(check.head)}/check-runs?check_name=Tenet&filter=all`, "check_runs");
73
+ const existing = runs.map(object).find((entry) => entry.name === "Tenet" && entry.head_sha === check.head && typeof entry.id === "number");
74
+ const body = { name: "Tenet", status: "completed", conclusion: check.conclusion, output: { title: "Tenet", summary: check.summary } };
75
+ if (existing)
76
+ await this.call("PATCH", `/check-runs/${String(existing.id)}`, body);
77
+ else
78
+ await this.call("POST", "/check-runs", { ...body, head_sha: check.head });
79
+ }
80
+ async latestRun(head, workflow) {
81
+ const candidates = (await this.pages(`/actions/runs?head_sha=${encodeURIComponent(head)}&status=completed`, "workflow_runs"))
82
+ .filter((row) => object(row).name === workflow).map(workflowRun)
83
+ .filter((run) => run.head === head && run.repository === this.repository);
84
+ return candidates.sort((a, b) => Date.parse(b.startedAt) - Date.parse(a.startedAt) || b.attempt - a.attempt)[0] ?? null;
85
+ }
86
+ async downloadBundles(run) {
87
+ if (run.repository !== this.repository || !/^\d+$/.test(run.id))
88
+ throw new Error("workflow belongs to another repository");
89
+ const entries = (await this.pages(`/actions/runs/${run.id}/artifacts`, "artifacts"))
90
+ .map(object).filter((entry) => text(entry.name).startsWith("tenet-bundle-"));
91
+ const result = { total: entries.length, missing: 0, bundles: [] };
92
+ for (const artifact of entries) {
93
+ if (artifact.expired === true) {
94
+ result.missing += 1;
95
+ const expiry = text(artifact.created_at);
96
+ if (Number.isFinite(Date.parse(expiry)))
97
+ result.expiredAt = expiry.slice(0, 10);
98
+ continue;
99
+ }
100
+ if (typeof artifact.id !== "number" || !Number.isSafeInteger(artifact.id) || artifact.id < 1 ||
101
+ typeof artifact.size_in_bytes !== "number" || artifact.size_in_bytes > bundleLimit)
102
+ throw new Error("invalid artifact metadata or size");
103
+ let buffer;
104
+ for (let attempt = 0; attempt < 3 && !buffer; attempt += 1) {
105
+ try {
106
+ const raw = await this.call("GET", `/actions/artifacts/${artifact.id}/zip`);
107
+ if (Buffer.isBuffer(raw))
108
+ buffer = raw;
109
+ }
110
+ catch (error) {
111
+ if (error instanceof RangeError)
112
+ throw error;
113
+ }
114
+ }
115
+ if (!buffer) {
116
+ result.missing += 1;
117
+ continue;
118
+ }
119
+ result.bundles.push(readArtifact(buffer));
120
+ }
121
+ return result;
122
+ }
123
+ }
124
+ export function githubRequest(token, server = "https://api.github.com", fetcher = fetch) {
125
+ const root = new URL(server);
126
+ if (root.protocol !== "https:" || root.username || root.password)
127
+ throw new Error("invalid GitHub API endpoint");
128
+ return async (method, resource, body) => {
129
+ const url = new URL(root.href.replace(/\/$/, "") + resource);
130
+ const headers = { authorization: `Bearer ${token}`, accept: "application/vnd.github+json", "content-type": "application/json" };
131
+ let response = await fetcher(url, { method, headers, redirect: "manual",
132
+ ...(body === undefined ? {} : { body: JSON.stringify(body) }),
133
+ signal: AbortSignal.timeout(30_000),
134
+ });
135
+ const artifact = resource.endsWith("/zip");
136
+ if (artifact && response.status >= 300 && response.status < 400) {
137
+ const location = response.headers.get("location");
138
+ if (!location)
139
+ throw new Error("GitHub did not return an artifact location");
140
+ const download = new URL(location, url);
141
+ if (download.protocol !== "https:" || download.username || download.password)
142
+ throw new Error("invalid artifact download URL");
143
+ response = await fetcher(download, { redirect: "error", signal: AbortSignal.timeout(30_000) });
144
+ }
145
+ if (!response.ok)
146
+ return { status: response.status, data: null };
147
+ if (!artifact)
148
+ return { status: response.status, data: await response.json() };
149
+ const chunks = [];
150
+ let bytes = 0;
151
+ if (!response.body)
152
+ throw new Error("artifact response is empty");
153
+ const reader = response.body.getReader();
154
+ try {
155
+ for (;;) {
156
+ const next = await reader.read();
157
+ if (next.done)
158
+ break;
159
+ bytes += next.value.length;
160
+ if (bytes > bundleLimit) {
161
+ await reader.cancel();
162
+ throw new RangeError("artifact exceeds 50 MB");
163
+ }
164
+ chunks.push(Buffer.from(next.value));
165
+ }
166
+ }
167
+ finally {
168
+ reader.releaseLock();
169
+ }
170
+ return { status: response.status, data: Buffer.concat(chunks) };
171
+ };
172
+ }
173
+ //# sourceMappingURL=forge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forge.js","sourceRoot":"","sources":["../../src/verify/forge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAmB,MAAM,aAAa,CAAC;AAiBzE,SAAS,MAAM,CAAC,KAAc;IAC5B,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAgC,CAAC,CAAC,CAAC,EAAE,CAAC;AACpF,CAAC;AACD,SAAS,IAAI,CAAC,KAAc,IAAY,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAExF,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC;IAClB,MAAM,OAAO,GAAG,GAAG,CAAC,WAAW,CAAC;IAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAChC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxC,MAAM,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