audit-tools 0.55.20 → 0.56.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (784) hide show
  1. package/dist/audit/cli/auditStep.d.ts.map +1 -1
  2. package/dist/audit/cli/auditStep.js +6 -8
  3. package/dist/audit/cli/auditStep.js.map +1 -1
  4. package/dist/audit/cli/charterExtractionPrompt.d.ts +2 -4
  5. package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
  6. package/dist/audit/cli/charterExtractionPrompt.js +15 -0
  7. package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
  8. package/dist/audit/cli/cleanup.js +2 -2
  9. package/dist/audit/cli/cleanup.js.map +1 -1
  10. package/dist/audit/cli/cleanupCommand.d.ts.map +1 -1
  11. package/dist/audit/cli/cleanupCommand.js +11 -10
  12. package/dist/audit/cli/cleanupCommand.js.map +1 -1
  13. package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
  14. package/dist/audit/cli/conceptualDispatch.js +26 -20
  15. package/dist/audit/cli/conceptualDispatch.js.map +1 -1
  16. package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
  17. package/dist/audit/cli/confirmIntentStep.js +3 -5
  18. package/dist/audit/cli/confirmIntentStep.js.map +1 -1
  19. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
  20. package/dist/audit/cli/dispatch/hostHandoff.js +46 -68
  21. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
  22. package/dist/audit/cli/explainTaskCommand.d.ts.map +1 -1
  23. package/dist/audit/cli/explainTaskCommand.js +3 -2
  24. package/dist/audit/cli/explainTaskCommand.js.map +1 -1
  25. package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
  26. package/dist/audit/cli/fanoutLanes.js +7 -6
  27. package/dist/audit/cli/fanoutLanes.js.map +1 -1
  28. package/dist/audit/cli/laneSubmissions.d.ts +0 -13
  29. package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
  30. package/dist/audit/cli/laneSubmissions.js +28 -19
  31. package/dist/audit/cli/laneSubmissions.js.map +1 -1
  32. package/dist/audit/cli/laneValidators.d.ts +7 -1
  33. package/dist/audit/cli/laneValidators.d.ts.map +1 -1
  34. package/dist/audit/cli/laneValidators.js +15 -10
  35. package/dist/audit/cli/laneValidators.js.map +1 -1
  36. package/dist/audit/cli/lineIndex.d.ts.map +1 -1
  37. package/dist/audit/cli/lineIndex.js +4 -3
  38. package/dist/audit/cli/lineIndex.js.map +1 -1
  39. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  40. package/dist/audit/cli/nextStepCommand.js +6 -7
  41. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  42. package/dist/audit/cli/nextStepHelpers.d.ts +29 -17
  43. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  44. package/dist/audit/cli/nextStepHelpers.js +75 -130
  45. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  46. package/dist/audit/cli/recoverSubmissionCommand.d.ts.map +1 -1
  47. package/dist/audit/cli/recoverSubmissionCommand.js +5 -4
  48. package/dist/audit/cli/recoverSubmissionCommand.js.map +1 -1
  49. package/dist/audit/cli/resynthesizeCommand.d.ts.map +1 -1
  50. package/dist/audit/cli/resynthesizeCommand.js +3 -1
  51. package/dist/audit/cli/resynthesizeCommand.js.map +1 -1
  52. package/dist/audit/cli/reviewRun.d.ts +0 -6
  53. package/dist/audit/cli/reviewRun.d.ts.map +1 -1
  54. package/dist/audit/cli/reviewRun.js +11 -18
  55. package/dist/audit/cli/reviewRun.js.map +1 -1
  56. package/dist/audit/cli/reviewSubmission.d.ts.map +1 -1
  57. package/dist/audit/cli/reviewSubmission.js +16 -8
  58. package/dist/audit/cli/reviewSubmission.js.map +1 -1
  59. package/dist/audit/cli/semanticReviewStep.d.ts +5 -5
  60. package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
  61. package/dist/audit/cli/semanticReviewStep.js +5 -0
  62. package/dist/audit/cli/semanticReviewStep.js.map +1 -1
  63. package/dist/audit/cli/statusCommand.d.ts.map +1 -1
  64. package/dist/audit/cli/statusCommand.js +3 -2
  65. package/dist/audit/cli/statusCommand.js.map +1 -1
  66. package/dist/audit/cli/steps.d.ts +11 -11
  67. package/dist/audit/cli/steps.d.ts.map +1 -1
  68. package/dist/audit/cli/steps.js +11 -11
  69. package/dist/audit/cli/steps.js.map +1 -1
  70. package/dist/audit/cli/submitCommand.d.ts.map +1 -1
  71. package/dist/audit/cli/submitCommand.js +9 -4
  72. package/dist/audit/cli/submitCommand.js.map +1 -1
  73. package/dist/audit/cli/submitGateResult.d.ts.map +1 -1
  74. package/dist/audit/cli/submitGateResult.js +2 -1
  75. package/dist/audit/cli/submitGateResult.js.map +1 -1
  76. package/dist/audit/cli/unacceptResultsCommand.d.ts +3 -2
  77. package/dist/audit/cli/unacceptResultsCommand.d.ts.map +1 -1
  78. package/dist/audit/cli/unacceptResultsCommand.js +8 -6
  79. package/dist/audit/cli/unacceptResultsCommand.js.map +1 -1
  80. package/dist/audit/cli/validateResultsCommand.d.ts.map +1 -1
  81. package/dist/audit/cli/validateResultsCommand.js +5 -4
  82. package/dist/audit/cli/validateResultsCommand.js.map +1 -1
  83. package/dist/audit/cli.d.ts +0 -2
  84. package/dist/audit/cli.d.ts.map +1 -1
  85. package/dist/audit/cli.js +2 -2
  86. package/dist/audit/cli.js.map +1 -1
  87. package/dist/audit/decompose/buildStructureDecomposition.d.ts.map +1 -1
  88. package/dist/audit/decompose/buildStructureDecomposition.js +5 -5
  89. package/dist/audit/decompose/buildStructureDecomposition.js.map +1 -1
  90. package/dist/audit/extractors/analyzers/merge.d.ts.map +1 -1
  91. package/dist/audit/extractors/analyzers/merge.js +4 -11
  92. package/dist/audit/extractors/analyzers/merge.js.map +1 -1
  93. package/dist/audit/extractors/analyzers/typescript.d.ts.map +1 -1
  94. package/dist/audit/extractors/analyzers/typescript.js +3 -14
  95. package/dist/audit/extractors/analyzers/typescript.js.map +1 -1
  96. package/dist/audit/extractors/browserExtension.d.ts.map +1 -1
  97. package/dist/audit/extractors/browserExtension.js +3 -2
  98. package/dist/audit/extractors/browserExtension.js.map +1 -1
  99. package/dist/audit/extractors/commentDecomposition.d.ts +1 -1
  100. package/dist/audit/extractors/commentDecomposition.d.ts.map +1 -1
  101. package/dist/audit/extractors/commentDecomposition.js +16 -33
  102. package/dist/audit/extractors/commentDecomposition.js.map +1 -1
  103. package/dist/audit/extractors/dataStateCoupling.d.ts +4 -0
  104. package/dist/audit/extractors/dataStateCoupling.d.ts.map +1 -1
  105. package/dist/audit/extractors/dataStateCoupling.js +26 -12
  106. package/dist/audit/extractors/dataStateCoupling.js.map +1 -1
  107. package/dist/audit/extractors/designAssessment.js +1 -1
  108. package/dist/audit/extractors/designAssessment.js.map +1 -1
  109. package/dist/audit/extractors/disposition.d.ts.map +1 -1
  110. package/dist/audit/extractors/disposition.js +24 -40
  111. package/dist/audit/extractors/disposition.js.map +1 -1
  112. package/dist/audit/extractors/docsDigest.js +1 -1
  113. package/dist/audit/extractors/docsDigest.js.map +1 -1
  114. package/dist/audit/extractors/flows.d.ts.map +1 -1
  115. package/dist/audit/extractors/flows.js +23 -19
  116. package/dist/audit/extractors/flows.js.map +1 -1
  117. package/dist/audit/extractors/fsIntake.d.ts.map +1 -1
  118. package/dist/audit/extractors/fsIntake.js +8 -5
  119. package/dist/audit/extractors/fsIntake.js.map +1 -1
  120. package/dist/audit/extractors/gitHistory.d.ts +6 -6
  121. package/dist/audit/extractors/gitHistory.d.ts.map +1 -1
  122. package/dist/audit/extractors/gitHistory.js +6 -6
  123. package/dist/audit/extractors/gitHistory.js.map +1 -1
  124. package/dist/audit/extractors/graph.d.ts +3 -1
  125. package/dist/audit/extractors/graph.d.ts.map +1 -1
  126. package/dist/audit/extractors/graph.js +15 -17
  127. package/dist/audit/extractors/graph.js.map +1 -1
  128. package/dist/audit/extractors/graphManifestEdges/packageJson.d.ts.map +1 -1
  129. package/dist/audit/extractors/graphManifestEdges/packageJson.js +23 -40
  130. package/dist/audit/extractors/graphManifestEdges/packageJson.js.map +1 -1
  131. package/dist/audit/extractors/graphPathUtils.d.ts +9 -0
  132. package/dist/audit/extractors/graphPathUtils.d.ts.map +1 -1
  133. package/dist/audit/extractors/graphPathUtils.js +35 -16
  134. package/dist/audit/extractors/graphPathUtils.js.map +1 -1
  135. package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
  136. package/dist/audit/extractors/graphRoutes.js +3 -7
  137. package/dist/audit/extractors/graphRoutes.js.map +1 -1
  138. package/dist/audit/extractors/graphSignals.d.ts.map +1 -1
  139. package/dist/audit/extractors/graphSignals.js +40 -29
  140. package/dist/audit/extractors/graphSignals.js.map +1 -1
  141. package/dist/audit/extractors/graphSuites.d.ts.map +1 -1
  142. package/dist/audit/extractors/graphSuites.js +4 -7
  143. package/dist/audit/extractors/graphSuites.js.map +1 -1
  144. package/dist/audit/extractors/graphTestSources.d.ts.map +1 -1
  145. package/dist/audit/extractors/graphTestSources.js +3 -10
  146. package/dist/audit/extractors/graphTestSources.js.map +1 -1
  147. package/dist/audit/extractors/pathPatterns.d.ts +4 -2
  148. package/dist/audit/extractors/pathPatterns.d.ts.map +1 -1
  149. package/dist/audit/extractors/pathPatterns.js +13 -21
  150. package/dist/audit/extractors/pathPatterns.js.map +1 -1
  151. package/dist/audit/extractors/risk.d.ts.map +1 -1
  152. package/dist/audit/extractors/risk.js +7 -7
  153. package/dist/audit/extractors/risk.js.map +1 -1
  154. package/dist/audit/extractors/surfaces.d.ts.map +1 -1
  155. package/dist/audit/extractors/surfaces.js +3 -9
  156. package/dist/audit/extractors/surfaces.js.map +1 -1
  157. package/dist/audit/io/artifacts.d.ts +1 -3
  158. package/dist/audit/io/artifacts.d.ts.map +1 -1
  159. package/dist/audit/io/artifacts.js +9 -9
  160. package/dist/audit/io/artifacts.js.map +1 -1
  161. package/dist/audit/io/rollover.d.ts.map +1 -1
  162. package/dist/audit/io/rollover.js +0 -1
  163. package/dist/audit/io/rollover.js.map +1 -1
  164. package/dist/audit/io/runArtifacts.d.ts +30 -2
  165. package/dist/audit/io/runArtifacts.d.ts.map +1 -1
  166. package/dist/audit/io/runArtifacts.js +23 -23
  167. package/dist/audit/io/runArtifacts.js.map +1 -1
  168. package/dist/audit/io/runSnapshot.js +2 -2
  169. package/dist/audit/io/runSnapshot.js.map +1 -1
  170. package/dist/audit/io/toolingManifest.d.ts.map +1 -1
  171. package/dist/audit/io/toolingManifest.js +7 -9
  172. package/dist/audit/io/toolingManifest.js.map +1 -1
  173. package/dist/audit/orchestrator/advance.d.ts +6 -0
  174. package/dist/audit/orchestrator/advance.d.ts.map +1 -1
  175. package/dist/audit/orchestrator/advance.js +70 -95
  176. package/dist/audit/orchestrator/advance.js.map +1 -1
  177. package/dist/audit/orchestrator/architectureDiscovery.d.ts +6 -2
  178. package/dist/audit/orchestrator/architectureDiscovery.d.ts.map +1 -1
  179. package/dist/audit/orchestrator/architectureDiscovery.js +19 -14
  180. package/dist/audit/orchestrator/architectureDiscovery.js.map +1 -1
  181. package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
  182. package/dist/audit/orchestrator/artifactMetadata.js +12 -15
  183. package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
  184. package/dist/audit/orchestrator/auditTaskUtils.d.ts +13 -0
  185. package/dist/audit/orchestrator/auditTaskUtils.d.ts.map +1 -1
  186. package/dist/audit/orchestrator/auditTaskUtils.js +10 -3
  187. package/dist/audit/orchestrator/auditTaskUtils.js.map +1 -1
  188. package/dist/audit/orchestrator/autoFixExecutor.d.ts.map +1 -1
  189. package/dist/audit/orchestrator/autoFixExecutor.js +2 -8
  190. package/dist/audit/orchestrator/autoFixExecutor.js.map +1 -1
  191. package/dist/audit/orchestrator/charterClarificationExecutor.d.ts +4 -2
  192. package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
  193. package/dist/audit/orchestrator/charterClarificationExecutor.js +12 -20
  194. package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
  195. package/dist/audit/orchestrator/charterComparisonExecutor.d.ts.map +1 -1
  196. package/dist/audit/orchestrator/charterComparisonExecutor.js +5 -9
  197. package/dist/audit/orchestrator/charterComparisonExecutor.js.map +1 -1
  198. package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +5 -0
  199. package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
  200. package/dist/audit/orchestrator/charterExtractionExecutor.js +10 -5
  201. package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
  202. package/dist/audit/orchestrator/charterFidelityPacket.d.ts.map +1 -1
  203. package/dist/audit/orchestrator/charterFidelityPacket.js +1 -2
  204. package/dist/audit/orchestrator/charterFidelityPacket.js.map +1 -1
  205. package/dist/audit/orchestrator/charterPacketArchive.d.ts.map +1 -1
  206. package/dist/audit/orchestrator/charterPacketArchive.js +11 -7
  207. package/dist/audit/orchestrator/charterPacketArchive.js.map +1 -1
  208. package/dist/audit/orchestrator/charterPackets.d.ts.map +1 -1
  209. package/dist/audit/orchestrator/charterPackets.js +30 -69
  210. package/dist/audit/orchestrator/charterPackets.js.map +1 -1
  211. package/dist/audit/orchestrator/dependencyMap.d.ts +0 -1
  212. package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
  213. package/dist/audit/orchestrator/dependencyMap.js +0 -7
  214. package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
  215. package/dist/audit/orchestrator/dependencySlices.d.ts +20 -0
  216. package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
  217. package/dist/audit/orchestrator/dependencySlices.js +20 -20
  218. package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
  219. package/dist/audit/orchestrator/designReviewProjection.d.ts +1 -3
  220. package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
  221. package/dist/audit/orchestrator/designReviewProjection.js +8 -2
  222. package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
  223. package/dist/audit/orchestrator/designReviewPrompt.d.ts +2 -11
  224. package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
  225. package/dist/audit/orchestrator/designReviewPrompt.js +10 -25
  226. package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
  227. package/dist/audit/orchestrator/designReviewSnapshot.d.ts.map +1 -1
  228. package/dist/audit/orchestrator/designReviewSnapshot.js +1 -2
  229. package/dist/audit/orchestrator/designReviewSnapshot.js.map +1 -1
  230. package/dist/audit/orchestrator/designReviewTask.d.ts.map +1 -1
  231. package/dist/audit/orchestrator/designReviewTask.js +2 -2
  232. package/dist/audit/orchestrator/designReviewTask.js.map +1 -1
  233. package/dist/audit/orchestrator/edgeReasoning.d.ts.map +1 -1
  234. package/dist/audit/orchestrator/edgeReasoning.js +1 -3
  235. package/dist/audit/orchestrator/edgeReasoning.js.map +1 -1
  236. package/dist/audit/orchestrator/executorResult.d.ts +3 -32
  237. package/dist/audit/orchestrator/executorResult.d.ts.map +1 -1
  238. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  239. package/dist/audit/orchestrator/executorRunners.js +33 -43
  240. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  241. package/dist/audit/orchestrator/executors.d.ts +34 -0
  242. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  243. package/dist/audit/orchestrator/executors.js +19 -4
  244. package/dist/audit/orchestrator/executors.js.map +1 -1
  245. package/dist/audit/orchestrator/fileIntegrity.d.ts.map +1 -1
  246. package/dist/audit/orchestrator/fileIntegrity.js +4 -3
  247. package/dist/audit/orchestrator/fileIntegrity.js.map +1 -1
  248. package/dist/audit/orchestrator/flowPlanning.d.ts.map +1 -1
  249. package/dist/audit/orchestrator/flowPlanning.js +2 -2
  250. package/dist/audit/orchestrator/flowPlanning.js.map +1 -1
  251. package/dist/audit/orchestrator/flowRequeue.d.ts.map +1 -1
  252. package/dist/audit/orchestrator/flowRequeue.js +2 -3
  253. package/dist/audit/orchestrator/flowRequeue.js.map +1 -1
  254. package/dist/audit/orchestrator/graphEnrichmentExecutor.d.ts.map +1 -1
  255. package/dist/audit/orchestrator/graphEnrichmentExecutor.js +5 -18
  256. package/dist/audit/orchestrator/graphEnrichmentExecutor.js.map +1 -1
  257. package/dist/audit/orchestrator/hostInputPause.d.ts +4 -20
  258. package/dist/audit/orchestrator/hostInputPause.d.ts.map +1 -1
  259. package/dist/audit/orchestrator/hostInputPause.js +4 -3
  260. package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
  261. package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
  262. package/dist/audit/orchestrator/ingestionExecutors.js +5 -17
  263. package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
  264. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +1 -2
  265. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
  266. package/dist/audit/orchestrator/intentCheckpointExecutor.js +42 -53
  267. package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
  268. package/dist/audit/orchestrator/intentCheckpointGate.d.ts +1 -1
  269. package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
  270. package/dist/audit/orchestrator/intentCheckpointGate.js +12 -8
  271. package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
  272. package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts.map +1 -1
  273. package/dist/audit/orchestrator/intentEquivalenceExecutor.js +13 -22
  274. package/dist/audit/orchestrator/intentEquivalenceExecutor.js.map +1 -1
  275. package/dist/audit/orchestrator/lineCounts.d.ts +2 -0
  276. package/dist/audit/orchestrator/lineCounts.d.ts.map +1 -1
  277. package/dist/audit/orchestrator/lineCounts.js +4 -0
  278. package/dist/audit/orchestrator/lineCounts.js.map +1 -1
  279. package/dist/audit/orchestrator/obligationPolicy.d.ts.map +1 -1
  280. package/dist/audit/orchestrator/obligationPolicy.js +46 -48
  281. package/dist/audit/orchestrator/obligationPolicy.js.map +1 -1
  282. package/dist/audit/orchestrator/pendingTasks.d.ts.map +1 -1
  283. package/dist/audit/orchestrator/pendingTasks.js +4 -3
  284. package/dist/audit/orchestrator/pendingTasks.js.map +1 -1
  285. package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
  286. package/dist/audit/orchestrator/planningExecutors.js +5 -1
  287. package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
  288. package/dist/audit/orchestrator/requeue.d.ts.map +1 -1
  289. package/dist/audit/orchestrator/requeue.js +2 -2
  290. package/dist/audit/orchestrator/requeue.js.map +1 -1
  291. package/dist/audit/orchestrator/requeueCommand.d.ts.map +1 -1
  292. package/dist/audit/orchestrator/requeueCommand.js +13 -21
  293. package/dist/audit/orchestrator/requeueCommand.js.map +1 -1
  294. package/dist/audit/orchestrator/resultIngestion.d.ts.map +1 -1
  295. package/dist/audit/orchestrator/resultIngestion.js +3 -4
  296. package/dist/audit/orchestrator/resultIngestion.js.map +1 -1
  297. package/dist/audit/orchestrator/reviewPacketGraphContext.js +1 -1
  298. package/dist/audit/orchestrator/reviewPacketGraphContext.js.map +1 -1
  299. package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts +2 -8
  300. package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts.map +1 -1
  301. package/dist/audit/orchestrator/reviewPacketGraphEdges.js +6 -38
  302. package/dist/audit/orchestrator/reviewPacketGraphEdges.js.map +1 -1
  303. package/dist/audit/orchestrator/reviewPacketMetrics.d.ts.map +1 -1
  304. package/dist/audit/orchestrator/reviewPacketMetrics.js +7 -68
  305. package/dist/audit/orchestrator/reviewPacketMetrics.js.map +1 -1
  306. package/dist/audit/orchestrator/reviewPacketShared.d.ts +0 -2
  307. package/dist/audit/orchestrator/reviewPacketShared.d.ts.map +1 -1
  308. package/dist/audit/orchestrator/reviewPacketShared.js.map +1 -1
  309. package/dist/audit/orchestrator/reviewPacketSizing.d.ts +1 -3
  310. package/dist/audit/orchestrator/reviewPacketSizing.d.ts.map +1 -1
  311. package/dist/audit/orchestrator/reviewPacketSizing.js +3 -13
  312. package/dist/audit/orchestrator/reviewPacketSizing.js.map +1 -1
  313. package/dist/audit/orchestrator/reviewPackets.d.ts +7 -8
  314. package/dist/audit/orchestrator/reviewPackets.d.ts.map +1 -1
  315. package/dist/audit/orchestrator/reviewPackets.js +17 -32
  316. package/dist/audit/orchestrator/reviewPackets.js.map +1 -1
  317. package/dist/audit/orchestrator/runtimeValidation.js +2 -2
  318. package/dist/audit/orchestrator/runtimeValidation.js.map +1 -1
  319. package/dist/audit/orchestrator/scope.d.ts.map +1 -1
  320. package/dist/audit/orchestrator/scope.js +3 -2
  321. package/dist/audit/orchestrator/scope.js.map +1 -1
  322. package/dist/audit/orchestrator/scopeIndexBaseline.d.ts.map +1 -1
  323. package/dist/audit/orchestrator/scopeIndexBaseline.js +1 -2
  324. package/dist/audit/orchestrator/scopeIndexBaseline.js.map +1 -1
  325. package/dist/audit/orchestrator/selectiveDeepening/conflict.d.ts.map +1 -1
  326. package/dist/audit/orchestrator/selectiveDeepening/conflict.js +2 -2
  327. package/dist/audit/orchestrator/selectiveDeepening/conflict.js.map +1 -1
  328. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts +3 -5
  329. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -1
  330. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +8 -6
  331. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -1
  332. package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.d.ts.map +1 -1
  333. package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js +15 -11
  334. package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js.map +1 -1
  335. package/dist/audit/orchestrator/selectiveDeepening/index.d.ts +3 -3
  336. package/dist/audit/orchestrator/selectiveDeepening/index.d.ts.map +1 -1
  337. package/dist/audit/orchestrator/selectiveDeepening/index.js +50 -77
  338. package/dist/audit/orchestrator/selectiveDeepening/index.js.map +1 -1
  339. package/dist/audit/orchestrator/selectiveDeepening/lensVerification.d.ts.map +1 -1
  340. package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js +27 -18
  341. package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js.map +1 -1
  342. package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts +1 -2
  343. package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts.map +1 -1
  344. package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js +6 -3
  345. package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js.map +1 -1
  346. package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +12 -9
  347. package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -1
  348. package/dist/audit/orchestrator/selectiveDeepening/shared.js +15 -35
  349. package/dist/audit/orchestrator/selectiveDeepening/shared.js.map +1 -1
  350. package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.d.ts.map +1 -1
  351. package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js +9 -16
  352. package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js.map +1 -1
  353. package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
  354. package/dist/audit/orchestrator/staleness.js +40 -36
  355. package/dist/audit/orchestrator/staleness.js.map +1 -1
  356. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  357. package/dist/audit/orchestrator/state.js +16 -17
  358. package/dist/audit/orchestrator/state.js.map +1 -1
  359. package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -1
  360. package/dist/audit/orchestrator/structureExecutors.js +5 -4
  361. package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
  362. package/dist/audit/orchestrator/taskAffinityGraph.d.ts.map +1 -1
  363. package/dist/audit/orchestrator/taskAffinityGraph.js +19 -15
  364. package/dist/audit/orchestrator/taskAffinityGraph.js.map +1 -1
  365. package/dist/audit/orchestrator/taskBuilder.d.ts.map +1 -1
  366. package/dist/audit/orchestrator/taskBuilder.js +2 -3
  367. package/dist/audit/orchestrator/taskBuilder.js.map +1 -1
  368. package/dist/audit/orchestrator/trivialAudit.d.ts.map +1 -1
  369. package/dist/audit/orchestrator/trivialAudit.js +2 -1
  370. package/dist/audit/orchestrator/trivialAudit.js.map +1 -1
  371. package/dist/audit/reporting/mergeFindings.d.ts.map +1 -1
  372. package/dist/audit/reporting/mergeFindings.js +6 -4
  373. package/dist/audit/reporting/mergeFindings.js.map +1 -1
  374. package/dist/audit/reporting/synthesis.d.ts.map +1 -1
  375. package/dist/audit/reporting/synthesis.js +5 -10
  376. package/dist/audit/reporting/synthesis.js.map +1 -1
  377. package/dist/audit/reporting/workBlocks.d.ts +0 -1
  378. package/dist/audit/reporting/workBlocks.d.ts.map +1 -1
  379. package/dist/audit/reporting/workBlocks.js +8 -15
  380. package/dist/audit/reporting/workBlocks.js.map +1 -1
  381. package/dist/audit/systemic/reviewFileMap.js +2 -2
  382. package/dist/audit/systemic/reviewFileMap.js.map +1 -1
  383. package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
  384. package/dist/audit/systemic/secondOrderAdversaryPrompt.js +2 -2
  385. package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
  386. package/dist/audit/systemic/systemicChallengeLoop.js +3 -3
  387. package/dist/audit/systemic/systemicChallengeLoop.js.map +1 -1
  388. package/dist/audit/types/reviewPlanning.d.ts +10 -8
  389. package/dist/audit/types/reviewPlanning.d.ts.map +1 -1
  390. package/dist/audit/types/reviewPlanning.js +3 -1
  391. package/dist/audit/types/reviewPlanning.js.map +1 -1
  392. package/dist/remediate/contractPipeline/executionPlan.d.ts +3 -0
  393. package/dist/remediate/contractPipeline/executionPlan.d.ts.map +1 -1
  394. package/dist/remediate/contractPipeline/executionPlan.js +27 -22
  395. package/dist/remediate/contractPipeline/executionPlan.js.map +1 -1
  396. package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts +1 -0
  397. package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts.map +1 -1
  398. package/dist/remediate/contractPipeline/runtimePlanAuthority.js +4 -3
  399. package/dist/remediate/contractPipeline/runtimePlanAuthority.js.map +1 -1
  400. package/dist/remediate/dedup/crossLensDedup.d.ts +0 -2
  401. package/dist/remediate/dedup/crossLensDedup.d.ts.map +1 -1
  402. package/dist/remediate/dedup/crossLensDedup.js +1 -4
  403. package/dist/remediate/dedup/crossLensDedup.js.map +1 -1
  404. package/dist/remediate/droppedFindingsRecord.d.ts.map +1 -1
  405. package/dist/remediate/droppedFindingsRecord.js +3 -1
  406. package/dist/remediate/droppedFindingsRecord.js.map +1 -1
  407. package/dist/remediate/index.d.ts +2 -3
  408. package/dist/remediate/index.d.ts.map +1 -1
  409. package/dist/remediate/index.js +51 -27
  410. package/dist/remediate/index.js.map +1 -1
  411. package/dist/remediate/intake.d.ts +9 -8
  412. package/dist/remediate/intake.d.ts.map +1 -1
  413. package/dist/remediate/intake.js +9 -5
  414. package/dist/remediate/intake.js.map +1 -1
  415. package/dist/remediate/intakeSelection.js +3 -3
  416. package/dist/remediate/intakeSelection.js.map +1 -1
  417. package/dist/remediate/intent/intentOrdering.d.ts +10 -9
  418. package/dist/remediate/intent/intentOrdering.d.ts.map +1 -1
  419. package/dist/remediate/intent/intentOrdering.js +10 -9
  420. package/dist/remediate/intent/intentOrdering.js.map +1 -1
  421. package/dist/remediate/intent/intentPersistence.d.ts +1 -0
  422. package/dist/remediate/intent/intentPersistence.d.ts.map +1 -1
  423. package/dist/remediate/intent/intentPersistence.js +18 -10
  424. package/dist/remediate/intent/intentPersistence.js.map +1 -1
  425. package/dist/remediate/phases/close.d.ts +16 -15
  426. package/dist/remediate/phases/close.d.ts.map +1 -1
  427. package/dist/remediate/phases/close.js +172 -163
  428. package/dist/remediate/phases/close.js.map +1 -1
  429. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +1 -1
  430. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
  431. package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -1
  432. package/dist/remediate/phases/closeVerifyHeadEvidence.js +11 -11
  433. package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -1
  434. package/dist/remediate/phases/closeVerifyLandingGates.d.ts +6 -0
  435. package/dist/remediate/phases/closeVerifyLandingGates.d.ts.map +1 -1
  436. package/dist/remediate/phases/closeVerifyLandingGates.js +10 -6
  437. package/dist/remediate/phases/closeVerifyLandingGates.js.map +1 -1
  438. package/dist/remediate/phases/grounding.d.ts +1 -1
  439. package/dist/remediate/phases/grounding.d.ts.map +1 -1
  440. package/dist/remediate/phases/triage.d.ts.map +1 -1
  441. package/dist/remediate/phases/triage.js +19 -25
  442. package/dist/remediate/phases/triage.js.map +1 -1
  443. package/dist/remediate/phases/triageConformance.d.ts.map +1 -1
  444. package/dist/remediate/phases/triageConformance.js +11 -15
  445. package/dist/remediate/phases/triageConformance.js.map +1 -1
  446. package/dist/remediate/review/autonomousGate.d.ts +5 -5
  447. package/dist/remediate/review/autonomousGate.d.ts.map +1 -1
  448. package/dist/remediate/review/autonomousGate.js +5 -0
  449. package/dist/remediate/review/autonomousGate.js.map +1 -1
  450. package/dist/remediate/review/reviewGate.d.ts.map +1 -1
  451. package/dist/remediate/review/reviewGate.js +12 -11
  452. package/dist/remediate/review/reviewGate.js.map +1 -1
  453. package/dist/remediate/riskSignal.d.ts +0 -1
  454. package/dist/remediate/riskSignal.d.ts.map +1 -1
  455. package/dist/remediate/riskSignal.js.map +1 -1
  456. package/dist/remediate/state/decisionConsumption.d.ts +2 -0
  457. package/dist/remediate/state/decisionConsumption.d.ts.map +1 -1
  458. package/dist/remediate/state/decisionConsumption.js +12 -10
  459. package/dist/remediate/state/decisionConsumption.js.map +1 -1
  460. package/dist/remediate/state/itemStatus.d.ts +3 -3
  461. package/dist/remediate/state/itemStatus.js +5 -5
  462. package/dist/remediate/state/store.d.ts +4 -3
  463. package/dist/remediate/state/store.d.ts.map +1 -1
  464. package/dist/remediate/state/store.js +11 -24
  465. package/dist/remediate/state/store.js.map +1 -1
  466. package/dist/remediate/state/types.d.ts +2 -2
  467. package/dist/remediate/state/types.d.ts.map +1 -1
  468. package/dist/remediate/state/types.js +12 -14
  469. package/dist/remediate/state/types.js.map +1 -1
  470. package/dist/remediate/steps/clarificationResolution.d.ts.map +1 -1
  471. package/dist/remediate/steps/clarificationResolution.js +4 -2
  472. package/dist/remediate/steps/clarificationResolution.js.map +1 -1
  473. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  474. package/dist/remediate/steps/contractPipeline.js +26 -23
  475. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  476. package/dist/remediate/steps/contractPipelinePrompts.d.ts +1 -1
  477. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  478. package/dist/remediate/steps/contractPipelinePrompts.js +3 -2
  479. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  480. package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +8 -3
  481. package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts.map +1 -1
  482. package/dist/remediate/steps/dispatch/contractConformanceReview.js +15 -12
  483. package/dist/remediate/steps/dispatch/contractConformanceReview.js.map +1 -1
  484. package/dist/remediate/steps/dispatch/hostContracts.d.ts +2 -0
  485. package/dist/remediate/steps/dispatch/hostContracts.d.ts.map +1 -1
  486. package/dist/remediate/steps/dispatch/hostContracts.js +6 -3
  487. package/dist/remediate/steps/dispatch/hostContracts.js.map +1 -1
  488. package/dist/remediate/steps/dispatch/hostCorroboration.d.ts +11 -12
  489. package/dist/remediate/steps/dispatch/hostCorroboration.d.ts.map +1 -1
  490. package/dist/remediate/steps/dispatch/hostCorroboration.js +13 -6
  491. package/dist/remediate/steps/dispatch/hostCorroboration.js.map +1 -1
  492. package/dist/remediate/steps/dispatch/hostHandoff.d.ts +5 -7
  493. package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
  494. package/dist/remediate/steps/dispatch/hostHandoff.js +162 -265
  495. package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
  496. package/dist/remediate/steps/dispatch/requiredTests.d.ts +18 -0
  497. package/dist/remediate/steps/dispatch/requiredTests.d.ts.map +1 -1
  498. package/dist/remediate/steps/dispatch/requiredTests.js +9 -11
  499. package/dist/remediate/steps/dispatch/requiredTests.js.map +1 -1
  500. package/dist/remediate/steps/finalGate.d.ts +1 -1
  501. package/dist/remediate/steps/finalGate.d.ts.map +1 -1
  502. package/dist/remediate/steps/finalGate.js +12 -12
  503. package/dist/remediate/steps/finalGate.js.map +1 -1
  504. package/dist/remediate/steps/frictionCloseout.d.ts.map +1 -1
  505. package/dist/remediate/steps/frictionCloseout.js +0 -1
  506. package/dist/remediate/steps/frictionCloseout.js.map +1 -1
  507. package/dist/remediate/steps/gateCommands.d.ts +5 -10
  508. package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
  509. package/dist/remediate/steps/gateCommands.js +8 -12
  510. package/dist/remediate/steps/gateCommands.js.map +1 -1
  511. package/dist/remediate/steps/intakeResolver.d.ts +5 -7
  512. package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
  513. package/dist/remediate/steps/intakeResolver.js +30 -33
  514. package/dist/remediate/steps/intakeResolver.js.map +1 -1
  515. package/dist/remediate/steps/nextStep.d.ts +1 -1
  516. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  517. package/dist/remediate/steps/nextStep.js +134 -158
  518. package/dist/remediate/steps/nextStep.js.map +1 -1
  519. package/dist/remediate/steps/prompts.d.ts +4 -30
  520. package/dist/remediate/steps/prompts.d.ts.map +1 -1
  521. package/dist/remediate/steps/prompts.js +5 -114
  522. package/dist/remediate/steps/prompts.js.map +1 -1
  523. package/dist/remediate/steps/recoverIngest.d.ts +5 -13
  524. package/dist/remediate/steps/recoverIngest.d.ts.map +1 -1
  525. package/dist/remediate/steps/recoverIngest.js +20 -26
  526. package/dist/remediate/steps/recoverIngest.js.map +1 -1
  527. package/dist/remediate/steps/stepWriter.d.ts +5 -4
  528. package/dist/remediate/steps/stepWriter.d.ts.map +1 -1
  529. package/dist/remediate/steps/stepWriter.js +8 -5
  530. package/dist/remediate/steps/stepWriter.js.map +1 -1
  531. package/dist/remediate/steps/submitGateResult.d.ts +0 -5
  532. package/dist/remediate/steps/submitGateResult.d.ts.map +1 -1
  533. package/dist/remediate/steps/submitGateResult.js +8 -8
  534. package/dist/remediate/steps/submitGateResult.js.map +1 -1
  535. package/dist/remediate/steps/types.d.ts +1 -1
  536. package/dist/remediate/steps/types.d.ts.map +1 -1
  537. package/dist/remediate/steps/types.js +0 -1
  538. package/dist/remediate/steps/types.js.map +1 -1
  539. package/dist/remediate/validation/artifacts.d.ts.map +1 -1
  540. package/dist/remediate/validation/artifacts.js +11 -9
  541. package/dist/remediate/validation/artifacts.js.map +1 -1
  542. package/dist/remediate/validation/remediationState.d.ts +0 -2
  543. package/dist/remediate/validation/remediationState.d.ts.map +1 -1
  544. package/dist/remediate/validation/remediationState.js +9 -46
  545. package/dist/remediate/validation/remediationState.js.map +1 -1
  546. package/dist/shared/accessMemory.d.ts +3 -9
  547. package/dist/shared/accessMemory.d.ts.map +1 -1
  548. package/dist/shared/accessMemory.js +2 -4
  549. package/dist/shared/accessMemory.js.map +1 -1
  550. package/dist/shared/affinityArtifacts.d.ts.map +1 -1
  551. package/dist/shared/affinityArtifacts.js +5 -7
  552. package/dist/shared/affinityArtifacts.js.map +1 -1
  553. package/dist/shared/agentReflections.d.ts.map +1 -1
  554. package/dist/shared/agentReflections.js +11 -14
  555. package/dist/shared/agentReflections.js.map +1 -1
  556. package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
  557. package/dist/shared/analyzers/binaryAcquisition.js +2 -1
  558. package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
  559. package/dist/shared/analyzers/candidates.js +1 -1
  560. package/dist/shared/analyzers/candidates.js.map +1 -1
  561. package/dist/shared/analyzers/clippy.d.ts +2 -25
  562. package/dist/shared/analyzers/clippy.d.ts.map +1 -1
  563. package/dist/shared/analyzers/clippy.js +1 -17
  564. package/dist/shared/analyzers/clippy.js.map +1 -1
  565. package/dist/shared/analyzers/normalizeExternal.d.ts +0 -15
  566. package/dist/shared/analyzers/normalizeExternal.d.ts.map +1 -1
  567. package/dist/shared/analyzers/normalizeExternal.js +2 -1
  568. package/dist/shared/analyzers/normalizeExternal.js.map +1 -1
  569. package/dist/shared/analyzers/rubocop.d.ts +1 -19
  570. package/dist/shared/analyzers/rubocop.d.ts.map +1 -1
  571. package/dist/shared/analyzers/rubocop.js +0 -23
  572. package/dist/shared/analyzers/rubocop.js.map +1 -1
  573. package/dist/shared/artifactFreshness.d.ts.map +1 -1
  574. package/dist/shared/artifactFreshness.js +4 -6
  575. package/dist/shared/artifactFreshness.js.map +1 -1
  576. package/dist/shared/chunkByBudget.d.ts +1 -24
  577. package/dist/shared/chunkByBudget.d.ts.map +1 -1
  578. package/dist/shared/chunkByBudget.js +2 -13
  579. package/dist/shared/chunkByBudget.js.map +1 -1
  580. package/dist/shared/compareCodeUnits.d.ts +2 -0
  581. package/dist/shared/compareCodeUnits.d.ts.map +1 -1
  582. package/dist/shared/compareCodeUnits.js +5 -0
  583. package/dist/shared/compareCodeUnits.js.map +1 -1
  584. package/dist/shared/contentKey.d.ts.map +1 -1
  585. package/dist/shared/contentKey.js +3 -1
  586. package/dist/shared/contentKey.js.map +1 -1
  587. package/dist/shared/countBy.d.ts.map +1 -1
  588. package/dist/shared/countBy.js +4 -3
  589. package/dist/shared/countBy.js.map +1 -1
  590. package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
  591. package/dist/shared/decompose/charterExtraction.js +11 -20
  592. package/dist/shared/decompose/charterExtraction.js.map +1 -1
  593. package/dist/shared/decompose/consensus.d.ts.map +1 -1
  594. package/dist/shared/decompose/consensus.js +4 -12
  595. package/dist/shared/decompose/consensus.js.map +1 -1
  596. package/dist/shared/decompose/contentCoherence.d.ts.map +1 -1
  597. package/dist/shared/decompose/contentCoherence.js +12 -15
  598. package/dist/shared/decompose/contentCoherence.js.map +1 -1
  599. package/dist/shared/decompose/modularity.d.ts.map +1 -1
  600. package/dist/shared/decompose/modularity.js +7 -19
  601. package/dist/shared/decompose/modularity.js.map +1 -1
  602. package/dist/shared/decompose/systemicChallenge.d.ts +8 -0
  603. package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
  604. package/dist/shared/decompose/systemicChallenge.js +8 -8
  605. package/dist/shared/decompose/systemicChallenge.js.map +1 -1
  606. package/dist/shared/findingIdentitySignature.d.ts +6 -1
  607. package/dist/shared/findingIdentitySignature.d.ts.map +1 -1
  608. package/dist/shared/findingIdentitySignature.js +8 -6
  609. package/dist/shared/findingIdentitySignature.js.map +1 -1
  610. package/dist/shared/findingSimilarity.d.ts.map +1 -1
  611. package/dist/shared/findingSimilarity.js +9 -14
  612. package/dist/shared/findingSimilarity.js.map +1 -1
  613. package/dist/shared/findings/dedupe.d.ts.map +1 -1
  614. package/dist/shared/findings/dedupe.js +1 -10
  615. package/dist/shared/findings/dedupe.js.map +1 -1
  616. package/dist/shared/friction/captureFrictionEvent.d.ts +1 -1
  617. package/dist/shared/friction/captureFrictionEvent.d.ts.map +1 -1
  618. package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
  619. package/dist/shared/friction/frictionRecord.js +3 -2
  620. package/dist/shared/friction/frictionRecord.js.map +1 -1
  621. package/dist/shared/friction/stepBoundaryCapture.d.ts +1 -2
  622. package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
  623. package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
  624. package/dist/shared/friction/triage.d.ts.map +1 -1
  625. package/dist/shared/friction/triage.js +4 -3
  626. package/dist/shared/friction/triage.js.map +1 -1
  627. package/dist/shared/git.d.ts +2 -10
  628. package/dist/shared/git.d.ts.map +1 -1
  629. package/dist/shared/git.js +6 -17
  630. package/dist/shared/git.js.map +1 -1
  631. package/dist/shared/graph/graphPaths.d.ts +2 -5
  632. package/dist/shared/graph/graphPaths.d.ts.map +1 -1
  633. package/dist/shared/graph/graphPaths.js +5 -6
  634. package/dist/shared/graph/graphPaths.js.map +1 -1
  635. package/dist/shared/index.d.ts +41 -61
  636. package/dist/shared/index.d.ts.map +1 -1
  637. package/dist/shared/index.js +25 -7
  638. package/dist/shared/index.js.map +1 -1
  639. package/dist/shared/intent/pathScope.d.ts +5 -0
  640. package/dist/shared/intent/pathScope.d.ts.map +1 -1
  641. package/dist/shared/intent/pathScope.js +17 -8
  642. package/dist/shared/intent/pathScope.js.map +1 -1
  643. package/dist/shared/io/auditToolsPaths.d.ts +9 -16
  644. package/dist/shared/io/auditToolsPaths.d.ts.map +1 -1
  645. package/dist/shared/io/auditToolsPaths.js +9 -18
  646. package/dist/shared/io/auditToolsPaths.js.map +1 -1
  647. package/dist/shared/io/frictionCapture.d.ts.map +1 -1
  648. package/dist/shared/io/frictionCapture.js +3 -2
  649. package/dist/shared/io/frictionCapture.js.map +1 -1
  650. package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
  651. package/dist/shared/io/stepContractWriter.js +10 -8
  652. package/dist/shared/io/stepContractWriter.js.map +1 -1
  653. package/dist/shared/mcp/submitServer.d.ts.map +1 -1
  654. package/dist/shared/mcp/submitServer.js +21 -29
  655. package/dist/shared/mcp/submitServer.js.map +1 -1
  656. package/dist/shared/observability/rootLogObservations.d.ts.map +1 -1
  657. package/dist/shared/observability/rootLogObservations.js +3 -2
  658. package/dist/shared/observability/rootLogObservations.js.map +1 -1
  659. package/dist/shared/parsing/toml.d.ts.map +1 -1
  660. package/dist/shared/parsing/toml.js +3 -4
  661. package/dist/shared/parsing/toml.js.map +1 -1
  662. package/dist/shared/reporting/auditDeliverable.d.ts.map +1 -1
  663. package/dist/shared/reporting/auditDeliverable.js +6 -15
  664. package/dist/shared/reporting/auditDeliverable.js.map +1 -1
  665. package/dist/shared/reporting/lensCoverage.d.ts.map +1 -1
  666. package/dist/shared/reporting/lensCoverage.js +4 -5
  667. package/dist/shared/reporting/lensCoverage.js.map +1 -1
  668. package/dist/shared/reporting/markdown.d.ts +3 -0
  669. package/dist/shared/reporting/markdown.d.ts.map +1 -0
  670. package/dist/shared/reporting/markdown.js +6 -0
  671. package/dist/shared/reporting/markdown.js.map +1 -0
  672. package/dist/shared/sessionConfig.d.ts.map +1 -1
  673. package/dist/shared/sessionConfig.js +3 -7
  674. package/dist/shared/sessionConfig.js.map +1 -1
  675. package/dist/shared/submission/handRecovery.d.ts.map +1 -1
  676. package/dist/shared/submission/handRecovery.js +3 -2
  677. package/dist/shared/submission/handRecovery.js.map +1 -1
  678. package/dist/shared/submission/hostResultOutcomes.d.ts +1 -1
  679. package/dist/shared/submission/hostResultOutcomes.js +2 -2
  680. package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
  681. package/dist/shared/submission/submissionClassifier.d.ts.map +1 -1
  682. package/dist/shared/submission/submissionClassifier.js +4 -3
  683. package/dist/shared/submission/submissionClassifier.js.map +1 -1
  684. package/dist/shared/submission/submissionIdentity.d.ts.map +1 -1
  685. package/dist/shared/submission/submissionIdentity.js +3 -1
  686. package/dist/shared/submission/submissionIdentity.js.map +1 -1
  687. package/dist/shared/submission/submissionLedger.d.ts +1 -0
  688. package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
  689. package/dist/shared/submission/submissionLedger.js +9 -5
  690. package/dist/shared/submission/submissionLedger.js.map +1 -1
  691. package/dist/shared/tooling/allowlistedExec.d.ts.map +1 -1
  692. package/dist/shared/tooling/allowlistedExec.js +35 -67
  693. package/dist/shared/tooling/allowlistedExec.js.map +1 -1
  694. package/dist/shared/tooling/analyzerDeps.d.ts.map +1 -1
  695. package/dist/shared/tooling/analyzerDeps.js +2 -1
  696. package/dist/shared/tooling/analyzerDeps.js.map +1 -1
  697. package/dist/shared/tooling/exec.d.ts +1 -1
  698. package/dist/shared/tooling/exec.d.ts.map +1 -1
  699. package/dist/shared/tooling/exec.js +3 -2
  700. package/dist/shared/tooling/exec.js.map +1 -1
  701. package/dist/shared/tooling/landingGates.d.ts +3 -3
  702. package/dist/shared/tooling/landingGates.js +3 -3
  703. package/dist/shared/tooling/ownedProcessLifecycle.d.ts +0 -1
  704. package/dist/shared/tooling/ownedProcessLifecycle.d.ts.map +1 -1
  705. package/dist/shared/tooling/ownedProcessLifecycle.js +1 -1
  706. package/dist/shared/tooling/ownedProcessLifecycle.js.map +1 -1
  707. package/dist/shared/tooling/projectTestAdmission.d.ts +7 -12
  708. package/dist/shared/tooling/projectTestAdmission.d.ts.map +1 -1
  709. package/dist/shared/tooling/projectTestAdmission.js.map +1 -1
  710. package/dist/shared/tooling/testCommand.d.ts +0 -14
  711. package/dist/shared/tooling/testCommand.d.ts.map +1 -1
  712. package/dist/shared/tooling/testCommand.js +2 -3
  713. package/dist/shared/tooling/testCommand.js.map +1 -1
  714. package/dist/shared/tooling/windowsOwnedJob.d.ts +2 -1
  715. package/dist/shared/tooling/windowsOwnedJob.d.ts.map +1 -1
  716. package/dist/shared/types/accessMemory.d.ts +3 -19
  717. package/dist/shared/types/accessMemory.d.ts.map +1 -1
  718. package/dist/shared/types/accessMemory.js +3 -19
  719. package/dist/shared/types/accessMemory.js.map +1 -1
  720. package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
  721. package/dist/shared/types/intentCheckpoint.js +2 -1
  722. package/dist/shared/types/intentCheckpoint.js.map +1 -1
  723. package/dist/shared/types/lens.d.ts +5 -0
  724. package/dist/shared/types/lens.d.ts.map +1 -1
  725. package/dist/shared/types/lens.js +13 -0
  726. package/dist/shared/types/lens.js.map +1 -1
  727. package/dist/shared/types/remediationOutcome.d.ts +10 -0
  728. package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
  729. package/dist/shared/types/remediationOutcome.js +3 -0
  730. package/dist/shared/types/remediationOutcome.js.map +1 -1
  731. package/dist/shared/validation/contractConstructionSites.d.ts.map +1 -1
  732. package/dist/shared/validation/contractConstructionSites.js +2 -1
  733. package/dist/shared/validation/contractConstructionSites.js.map +1 -1
  734. package/dist/shared/validation/findingGrounding.d.ts +2 -1
  735. package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
  736. package/dist/shared/validation/findingGrounding.js +9 -5
  737. package/dist/shared/validation/findingGrounding.js.map +1 -1
  738. package/dist/shared/validation/findingsReport.d.ts +6 -0
  739. package/dist/shared/validation/findingsReport.d.ts.map +1 -1
  740. package/dist/shared/validation/findingsReport.js +29 -19
  741. package/dist/shared/validation/findingsReport.js.map +1 -1
  742. package/docs/audit-pkg/contracts.md +73 -6
  743. package/docs/audit-pkg/operator-guide.md +10 -2
  744. package/docs/audit-pkg/product.md +1 -1
  745. package/package.json +1 -3
  746. package/remediate-code.mjs +13 -5
  747. package/scripts/audit/postinstall.mjs +6 -21
  748. package/scripts/remediate/postinstall.mjs +2 -17
  749. package/scripts/shared/install-host-assets.mjs +11 -3
  750. package/scripts/shared/primitives.mjs +14 -3
  751. package/wrapper/audit-code-wrapper-build.mjs +21 -18
  752. package/wrapper/audit-code-wrapper-install-hosts.mjs +6 -120
  753. package/wrapper/audit-code-wrapper-lib.mjs +28 -42
  754. package/wrapper/audit-code-wrapper-opencode.mjs +11 -24
  755. package/wrapper/installer-verb-help.mjs +21 -8
  756. package/wrapper/remediate-code-wrapper-install-hosts.mjs +15 -130
  757. package/wrapper/remediate-code-wrapper-opencode.mjs +11 -24
  758. package/wrapper/repo-root.mjs +2 -2
  759. package/wrapper/shared-install-hosts.mjs +119 -0
  760. package/wrapper/shared-project-opencode.mjs +22 -0
  761. package/dist/audit/io/runArtifactTypes.d.ts +0 -8
  762. package/dist/audit/io/runArtifactTypes.d.ts.map +0 -1
  763. package/dist/audit/io/runArtifactTypes.js +0 -2
  764. package/dist/audit/io/runArtifactTypes.js.map +0 -1
  765. package/dist/audit/orchestrator/accessMemory.d.ts +0 -35
  766. package/dist/audit/orchestrator/accessMemory.d.ts.map +0 -1
  767. package/dist/audit/orchestrator/accessMemory.js +0 -54
  768. package/dist/audit/orchestrator/accessMemory.js.map +0 -1
  769. package/dist/audit/orchestrator/reviewPacketGraph.d.ts +0 -4
  770. package/dist/audit/orchestrator/reviewPacketGraph.d.ts.map +0 -1
  771. package/dist/audit/orchestrator/reviewPacketGraph.js +0 -7
  772. package/dist/audit/orchestrator/reviewPacketGraph.js.map +0 -1
  773. package/dist/shared/continuityScore.d.ts +0 -13
  774. package/dist/shared/continuityScore.d.ts.map +0 -1
  775. package/dist/shared/continuityScore.js +0 -164
  776. package/dist/shared/continuityScore.js.map +0 -1
  777. package/dist/shared/graph/directedCycles.d.ts +0 -61
  778. package/dist/shared/graph/directedCycles.d.ts.map +0 -1
  779. package/dist/shared/graph/directedCycles.js +0 -190
  780. package/dist/shared/graph/directedCycles.js.map +0 -1
  781. package/dist/shared/io/pathIdentity.d.ts +0 -26
  782. package/dist/shared/io/pathIdentity.d.ts.map +0 -1
  783. package/dist/shared/io/pathIdentity.js +0 -50
  784. package/dist/shared/io/pathIdentity.js.map +0 -1
@@ -1,7 +1,8 @@
1
- import { mkdir, mkdtemp, readFile, rm, stat, unlink } from 'node:fs/promises';
1
+ // sites-pinned: tests/shared/install-bootstrap-opencode-stability.test.ts
2
+ import { mkdir, mkdtemp, readFile, rm, unlink } from 'node:fs/promises';
3
+ import { assertDirectoryExists, collectVerifyCheck, ensureFile, getFlag, hasFlag, normalizeNewlines, renderPromptFile, requireFlagValue, splitFrontmatter, toRepoRelativePath } from './shared-install-hosts.mjs';
2
4
  import { tmpdir } from 'node:os';
3
5
  import { dirname, join, relative, resolve } from 'node:path';
4
- import { fileURLToPath } from 'node:url';
5
6
  import {
6
7
  fileExists,
7
8
  INSTALL_MARKER_END,
@@ -30,7 +31,7 @@ import {
30
31
  INSTALLED_PROMPT_FILENAME,
31
32
  } from './remediate-code-wrapper-install-renderers.mjs';
32
33
 
33
- const repoRoot = join(dirname(fileURLToPath(import.meta.url)), '..');
34
+ const repoRoot = join(import.meta.dirname, '..');
34
35
  const promptAssetPath = join(repoRoot, 'skills', 'remediate-code', 'remediate-code.prompt.md');
35
36
  const skillAssetPath = join(repoRoot, 'skills', 'remediate-code', 'SKILL.md');
36
37
  const INSTALL_GUIDE_FILENAME = 'GETTING-STARTED.md';
@@ -38,74 +39,6 @@ const INSTALL_MANIFEST_FILENAME = 'manifest.json';
38
39
  const DEFAULT_INSTALL_HOST = 'all';
39
40
  const INSTALL_DIR = '.remediate-code';
40
41
 
41
- function hasFlag(argv, name) {
42
- return argv.includes(name);
43
- }
44
-
45
- function getFlag(argv, name) {
46
- const index = argv.indexOf(name);
47
- if (index < 0) return undefined;
48
- return argv[index + 1];
49
- }
50
-
51
- function requireFlagValue(argv, name) {
52
- const value = getFlag(argv, name);
53
- if (!value) {
54
- throw new Error(`${name} requires a value.`);
55
- }
56
- return value;
57
- }
58
-
59
- function normalizeNewlines(value) {
60
- return value.replace(/\r\n/g, '\n');
61
- }
62
-
63
- function splitFrontmatter(markdown) {
64
- const normalized = normalizeNewlines(markdown);
65
- const match = normalized.match(/^---\n([\s\S]*?)\n---\n?/u);
66
- if (!match) {
67
- return { frontmatter: null, body: normalized };
68
- }
69
-
70
- return {
71
- frontmatter: match[1],
72
- body: normalized.slice(match[0].length),
73
- };
74
- }
75
-
76
- function renderFrontmatter(fields) {
77
- const entries = Object.entries(fields).filter(([, value]) => {
78
- if (value === undefined || value === null) {
79
- return false;
80
- }
81
-
82
- if (typeof value === 'string') {
83
- return value.length > 0;
84
- }
85
-
86
- return true;
87
- });
88
- if (entries.length === 0) {
89
- return '';
90
- }
91
-
92
- return [
93
- '---',
94
- ...entries.map(([key, value]) => `${key}: ${value}`),
95
- '---',
96
- '',
97
- ].join('\n');
98
- }
99
-
100
- function renderPromptFile(fields, body) {
101
- return `${renderFrontmatter(fields)}${body.trimStart()}`;
102
- }
103
-
104
- function toRepoRelativePath(root, targetPath) {
105
- const value = relative(root, targetPath).replace(/\\/g, '/');
106
- return value.length > 0 ? value : '.';
107
- }
108
-
109
42
  function buildInstallDirective(relativePromptPath) {
110
43
  return [
111
44
  INSTALL_MARKER_START,
@@ -477,51 +410,6 @@ export function renderInstallGuide({
477
410
  return lines.join('\n');
478
411
  }
479
412
 
480
- async function assertDirectoryExists(path, description) {
481
- let stats;
482
- try {
483
- stats = await stat(path);
484
- } catch {
485
- throw new Error(`${description} does not exist: ${path}`);
486
- }
487
-
488
- if (!stats.isDirectory()) {
489
- throw new Error(`${description} is not a directory: ${path}`);
490
- }
491
- }
492
-
493
- async function collectVerifyCheck(target, id, fn) {
494
- try {
495
- const details = await fn();
496
- target.push({
497
- id,
498
- status: 'ok',
499
- ...(details ?? {}),
500
- });
501
- } catch (error) {
502
- target.push({
503
- id,
504
- status: 'error',
505
- summary: error instanceof Error ? error.message : String(error),
506
- });
507
- }
508
- }
509
-
510
- async function ensureFile(path, description) {
511
- let stats;
512
- try {
513
- stats = await stat(path);
514
- } catch {
515
- throw new Error(`${description} does not exist: ${path}`);
516
- }
517
-
518
- if (!stats.isFile()) {
519
- throw new Error(`${description} is not a file: ${path}`);
520
- }
521
-
522
- return stats;
523
- }
524
-
525
413
  export async function writeCoreInstallAssets(root, assetPaths, promptSource, skillSource) {
526
414
  const results = [];
527
415
  const legacyInstalledPromptPath = join(root, INSTALL_DIR, 'install', 'remediate-code.prompt.md');
@@ -605,8 +493,8 @@ export async function installBootstrap(argv, options = {}) {
605
493
  const root = resolveWrapperRoot(getFlag(argv, '--root'));
606
494
  await assertDirectoryExists(root, 'Target repository root');
607
495
  const profile = getInstallProfile(host);
608
- const promptSource = (await readFile(promptAssetPath, 'utf8')).replace(/\r\n/g, '\n');
609
- const skillSource = (await readFile(skillAssetPath, 'utf8')).replace(/\r\n/g, '\n');
496
+ const promptSource = normalizeNewlines(await readFile(promptAssetPath, 'utf8'));
497
+ const skillSource = normalizeNewlines(await readFile(skillAssetPath, 'utf8'));
610
498
  const { body: promptBody } = splitFrontmatter(promptSource);
611
499
  const assetPaths = buildInstallAssetPaths(root, profile);
612
500
  const {
@@ -945,8 +833,8 @@ export async function verifyInstalledBootstrap(argv) {
945
833
  await collectVerifyCheck(generalChecks, 'installed_prompt', async () => {
946
834
  await ensureFile(assetPaths.installedPromptPath, 'Installed prompt asset');
947
835
  const installedPrompt = await readFile(assetPaths.installedPromptPath, 'utf8');
948
- const sourcePrompt = await readFile(promptAssetPath, 'utf8');
949
- if (installedPrompt !== sourcePrompt) {
836
+ const sourcePrompt = normalizeNewlines(await readFile(promptAssetPath, 'utf8'));
837
+ if (normalizeNewlines(installedPrompt) !== sourcePrompt) {
950
838
  throw new Error(
951
839
  `Installed prompt is out of sync with the source prompt. Run "remediate-code install" from ${root}.`,
952
840
  );
@@ -959,8 +847,8 @@ export async function verifyInstalledBootstrap(argv) {
959
847
 
960
848
  await collectVerifyCheck(generalChecks, 'installed_skill', async () => {
961
849
  await ensureFile(assetPaths.installedSkillPath, 'Installed skill asset');
962
- const installedSkill = (await readFile(assetPaths.installedSkillPath, 'utf8')).replace(/\r\n/g, '\n');
963
- const sourceSkill = (await readFile(skillAssetPath, 'utf8')).replace(/\r\n/g, '\n');
850
+ const installedSkill = normalizeNewlines(await readFile(assetPaths.installedSkillPath, 'utf8'));
851
+ const sourceSkill = normalizeNewlines(await readFile(skillAssetPath, 'utf8'));
964
852
  if (installedSkill !== sourceSkill) {
965
853
  throw new Error(
966
854
  `Installed skill is out of sync with the source skill. Run "remediate-code install" from ${root}.`,
@@ -1089,8 +977,8 @@ export async function detectBootstrapRefreshReason(root, host) {
1089
977
  if (installedPrompt === null) {
1090
978
  return 'missing_installed_prompt';
1091
979
  }
1092
- const sourcePrompt = await readFile(promptAssetPath, 'utf8');
1093
- if (installedPrompt !== sourcePrompt) {
980
+ const sourcePrompt = normalizeNewlines(await readFile(promptAssetPath, 'utf8'));
981
+ if (normalizeNewlines(installedPrompt) !== sourcePrompt) {
1094
982
  return 'stale_installed_prompt';
1095
983
  }
1096
984
  const { body: sourcePromptBody } = splitFrontmatter(sourcePrompt);
@@ -1099,8 +987,8 @@ export async function detectBootstrapRefreshReason(root, host) {
1099
987
  if (installedSkill === null) {
1100
988
  return 'missing_installed_skill';
1101
989
  }
1102
- const sourceSkill = (await readFile(skillAssetPath, 'utf8')).replace(/\r\n/g, '\n');
1103
- if (installedSkill.replace(/\r\n/g, '\n') !== sourceSkill) {
990
+ const sourceSkill = normalizeNewlines(await readFile(skillAssetPath, 'utf8'));
991
+ if (normalizeNewlines(installedSkill) !== sourceSkill) {
1104
992
  return 'stale_installed_skill';
1105
993
  }
1106
994
 
@@ -1144,7 +1032,7 @@ export async function detectBootstrapRefreshReason(root, host) {
1144
1032
  return 'missing_host_asset:antigravity:skill';
1145
1033
  }
1146
1034
  const antigravitySkill = await readTextIfExists(expectedSkillPath);
1147
- if (antigravitySkill !== null && antigravitySkill.replace(/\r\n/g, '\n') !== sourceSkill) {
1035
+ if (antigravitySkill !== null && normalizeNewlines(antigravitySkill) !== sourceSkill) {
1148
1036
  return 'stale_host_asset:antigravity:skill';
1149
1037
  }
1150
1038
  break;
@@ -1217,9 +1105,6 @@ export async function installHostPrompt(argv) {
1217
1105
  await installBootstrap(argv);
1218
1106
  }
1219
1107
 
1220
- // Underscore-aliased re-exports consumed by host-bootstrap-descriptors tests
1221
- // via remediate-code-wrapper-lib.mjs. Keep these so the test import chain resolves
1222
- // without modification to the test file.
1223
1108
  export {
1224
1109
  INSTALL_HOST_ORDER as _INSTALL_HOST_ORDER,
1225
1110
  INSTALL_HOST_DEFINITIONS as _INSTALL_HOST_DEFINITIONS,
@@ -1,22 +1,13 @@
1
- // Best-effort import of shared OpenCode permission helpers.
2
- // On a fresh checkout before `npm run build`, the dist may not exist yet;
3
- // buildMergedOpenCodeProjectConfig throws a clear error in that case.
4
- let mergeOpenCodeAgentPermissionRule;
5
- let withoutOpenCodeWildcard;
6
- let migrateOpenCodeGlobalExternalDirectory;
7
- let composeOpenCodeBashCeiling;
8
- export let sharedOpenCodePermissions = false;
9
-
10
- try {
11
- const shared = await import('audit-tools/shared');
12
- mergeOpenCodeAgentPermissionRule = shared.mergeOpenCodeAgentPermissionRule;
13
- withoutOpenCodeWildcard = shared.withoutOpenCodeWildcard;
14
- migrateOpenCodeGlobalExternalDirectory = shared.migrateOpenCodeGlobalExternalDirectory;
15
- composeOpenCodeBashCeiling = shared.composeOpenCodeBashCeiling;
16
- sharedOpenCodePermissions = true;
17
- } catch {
18
- // shared not yet built — callers that need merge logic will throw below
19
- }
1
+ // sites-pinned: tests/shared/installer-host-compatibility.test.ts, tests/shared/install-bootstrap-opencode-stability.test.ts
2
+ import {
3
+ mergeOpenCodeAgentPermissionRule,
4
+ withoutOpenCodeWildcard,
5
+ migrateOpenCodeGlobalExternalDirectory,
6
+ composeOpenCodeBashCeiling,
7
+ sharedOpenCodePermissions,
8
+ unavailableProjectPermissions,
9
+ } from './shared-project-opencode.mjs';
10
+ export { sharedOpenCodePermissions };
20
11
 
21
12
  export const OPENCODE_REMEDIATE_EDIT_PERMISSION = {
22
13
  '*': 'ask',
@@ -229,11 +220,7 @@ function collectAgentBashRuleSets(agentMap) {
229
220
  }
230
221
 
231
222
  export function buildMergedOpenCodeProjectConfig(existing, root) {
232
- if (!sharedOpenCodePermissions) {
233
- throw new Error(
234
- 'audit-tools/shared is not available. Run "npm run build" before deploying OpenCode config.',
235
- );
236
- }
223
+ if (!sharedOpenCodePermissions) unavailableProjectPermissions();
237
224
  const generated = renderOpenCodeProjectConfig(root);
238
225
  const mergedMcp = objectValue(existing.mcp);
239
226
  delete mergedMcp.remediator;
@@ -48,10 +48,10 @@ function repoRootCeiling() {
48
48
  return null;
49
49
  }
50
50
  }
51
-
51
+ // sites-pinned: tests/shared/wrapper-repo-root-parity.test.ts
52
52
  /** @param {string} [startDir] @returns {string} */
53
53
  export function discoverRepoRoot(startDir = process.cwd()) {
54
- const start = climbOutOfAuditTools(resolve(startDir));
54
+ const start = climbOutOfAuditTools(startDir);
55
55
  const ceiling = repoRootCeiling();
56
56
  let current = start;
57
57
  for (;;) {
@@ -0,0 +1,119 @@
1
+ // sites-pinned: tests/shared/installer-host-compatibility.test.ts
2
+ import { stat } from 'node:fs/promises';
3
+ import { relative } from 'node:path';
4
+
5
+ export function hasFlag(argv, name) {
6
+ return argv.includes(name);
7
+ }
8
+
9
+ export function getFlag(argv, name) {
10
+ const index = argv.findIndex(argument => argument === name || argument.startsWith(name + '='));
11
+ if (index < 0) return undefined;
12
+ const flag = argv[index];
13
+ const value = flag === name ? argv[index + 1] : flag.slice(name.length + 1);
14
+ if (!value || (flag === name && value.startsWith('--'))) throw new Error(`${name} requires a value.`);
15
+ return value;
16
+ }
17
+
18
+ export function requireFlagValue(argv, name) {
19
+ const value = getFlag(argv, name);
20
+ if (!value) {
21
+ throw new Error(`${name} requires a value.`);
22
+ }
23
+ return value;
24
+ }
25
+
26
+ export function normalizeNewlines(value) {
27
+ return value.replace(/\r\n/g, '\n');
28
+ }
29
+
30
+ export function splitFrontmatter(markdown) {
31
+ const normalized = normalizeNewlines(markdown);
32
+ const match = normalized.match(/^---\n([\s\S]*?)\n---\n?/u);
33
+ if (!match) {
34
+ return { frontmatter: null, body: normalized };
35
+ }
36
+
37
+ return {
38
+ frontmatter: match[1],
39
+ body: normalized.slice(match[0].length),
40
+ };
41
+ }
42
+
43
+ function renderFrontmatter(fields) {
44
+ const entries = Object.entries(fields).filter(([, value]) => {
45
+ if (value === undefined || value === null) {
46
+ return false;
47
+ }
48
+
49
+ if (typeof value === 'string') {
50
+ return value.length > 0;
51
+ }
52
+
53
+ return true;
54
+ });
55
+ if (entries.length === 0) {
56
+ return '';
57
+ }
58
+
59
+ return [
60
+ '---',
61
+ ...entries.map(([key, value]) => `${key}: ${value}`),
62
+ '---',
63
+ '',
64
+ ].join('\n');
65
+ }
66
+
67
+ export function renderPromptFile(fields, body) {
68
+ return `${renderFrontmatter(fields)}${body.trimStart()}`;
69
+ }
70
+
71
+ export function toRepoRelativePath(root, targetPath) {
72
+ const value = relative(root, targetPath).replace(/\\/g, '/');
73
+ return value.length > 0 ? value : '.';
74
+ }
75
+
76
+ export async function assertDirectoryExists(path, description) {
77
+ let stats;
78
+ try {
79
+ stats = await stat(path);
80
+ } catch {
81
+ throw new Error(`${description} does not exist: ${path}`);
82
+ }
83
+
84
+ if (!stats.isDirectory()) {
85
+ throw new Error(`${description} is not a directory: ${path}`);
86
+ }
87
+ }
88
+
89
+ export async function collectVerifyCheck(target, id, fn) {
90
+ try {
91
+ const details = await fn();
92
+ target.push({
93
+ id,
94
+ status: 'ok',
95
+ ...(details ?? {}),
96
+ });
97
+ } catch (error) {
98
+ target.push({
99
+ id,
100
+ status: 'error',
101
+ summary: error instanceof Error ? error.message : String(error),
102
+ });
103
+ }
104
+ }
105
+
106
+ export async function ensureFile(path, description) {
107
+ let stats;
108
+ try {
109
+ stats = await stat(path);
110
+ } catch {
111
+ throw new Error(`${description} does not exist: ${path}`);
112
+ }
113
+
114
+ if (!stats.isFile()) {
115
+ throw new Error(`${description} is not a file: ${path}`);
116
+ }
117
+
118
+ return stats;
119
+ }
@@ -0,0 +1,22 @@
1
+ // sites-pinned: tests/shared/installer-host-compatibility.test.ts, tests/shared/install-bootstrap-opencode-stability.test.ts
2
+ // Project installs need all four operations. A missing or older build still
3
+ // permits loading the wrapper and reports the rebuild advice at the merge.
4
+ /** @type {Partial<typeof import('audit-tools/shared')>} */
5
+ const shared = await import('audit-tools/shared').catch(() => ({}));
6
+ /** @returns {never} */
7
+ export function unavailableProjectPermissions() {
8
+ throw new Error('audit-tools/shared is not available. Run "npm run build" before deploying OpenCode config.');
9
+ }
10
+
11
+ export const {
12
+ mergeOpenCodeAgentPermissionRule = unavailableProjectPermissions,
13
+ withoutOpenCodeWildcard = unavailableProjectPermissions,
14
+ migrateOpenCodeGlobalExternalDirectory = unavailableProjectPermissions,
15
+ composeOpenCodeBashCeiling = unavailableProjectPermissions,
16
+ } = shared;
17
+ export const sharedOpenCodePermissions = [
18
+ mergeOpenCodeAgentPermissionRule,
19
+ withoutOpenCodeWildcard,
20
+ migrateOpenCodeGlobalExternalDirectory,
21
+ composeOpenCodeBashCeiling,
22
+ ].every(helper => typeof helper === 'function' && helper !== unavailableProjectPermissions);
@@ -1,8 +0,0 @@
1
- export interface RunPaths {
2
- runDir: string;
3
- reviewRunPath: string;
4
- pendingTasksPath: string;
5
- hostWorkloadPath: string;
6
- hostResultMapPath: string;
7
- }
8
- //# sourceMappingURL=runArtifactTypes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runArtifactTypes.d.ts","sourceRoot":"","sources":["../../../src/audit/io/runArtifactTypes.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=runArtifactTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runArtifactTypes.js","sourceRoot":"","sources":["../../../src/audit/io/runArtifactTypes.ts"],"names":[],"mappings":""}
@@ -1,35 +0,0 @@
1
- import type { AccessMemory } from "audit-tools/shared";
2
- import type { AuditResult } from "../types.js";
3
- /**
4
- * Deterministically harvest a per-run access-memory record from the full ingested
5
- * AuditResult ledger. Pure: the same ledger always yields a byte-identical record.
6
- *
7
- * Frequency (`covered_count`) = how many ledger results covered each path, over
8
- * the RAW append-only ledger — deliberately including superseded re-dispatch /
9
- * deepening records, not the supersession-resolved `selectCurrentResults` view.
10
- * The signal is *attention*: a file audited multiple times (re-dispatched or
11
- * deepened) got more attention and is a stronger continuity candidate, so raw
12
- * touches is the right weight for a continuity bias. `total_ordinals` is the raw
13
- * ledger length, so recency (`last_ordinal / total_ordinals`) stays in the same
14
- * raw-ledger space and is self-consistent.
15
- *
16
- * Recency = the path's most recent touch measured as a STEP-ORDINAL (the covering
17
- * result's index in the ledger), never wall-clock — so the signal is stable
18
- * across machines/agents and cannot churn the artifact hash on clock skew. The
19
- * ledger is append-only and idempotent (O2), so its array order is the run's step
20
- * order and an idempotent replay is a no-op (no churn).
21
- *
22
- * Output arrays are content-sorted (paths by path, lenses lexically) so the
23
- * serialized bytes are stable regardless of ledger iteration incidentals — the
24
- * "extractors emit stable, content-derived array order" invariant, which keeps
25
- * the artifact's content hash from churning the staleness DAG.
26
- *
27
- * `edited_count` and `symbols[]` are reserved: `edited_count` is populated by the
28
- * remediate-parity harvest (RemediationBlock.touched_files), `symbols[]` by the
29
- * `path::symbol` granularity increment. This audit-side path-level derive leaves
30
- * `edited_count` at 0 and omits `symbols`.
31
- */
32
- export declare function deriveAccessMemory(results: AuditResult[], options?: {
33
- runId?: string;
34
- }): AccessMemory;
35
- //# sourceMappingURL=accessMemory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accessMemory.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/accessMemory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,oBAAoB,CAAC;AAEzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,EAAE,EACtB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAC/B,YAAY,CAqBd"}
@@ -1,54 +0,0 @@
1
- import { deriveAccessMemoryFromEvents } from "audit-tools/shared";
2
- /**
3
- * Deterministically harvest a per-run access-memory record from the full ingested
4
- * AuditResult ledger. Pure: the same ledger always yields a byte-identical record.
5
- *
6
- * Frequency (`covered_count`) = how many ledger results covered each path, over
7
- * the RAW append-only ledger — deliberately including superseded re-dispatch /
8
- * deepening records, not the supersession-resolved `selectCurrentResults` view.
9
- * The signal is *attention*: a file audited multiple times (re-dispatched or
10
- * deepened) got more attention and is a stronger continuity candidate, so raw
11
- * touches is the right weight for a continuity bias. `total_ordinals` is the raw
12
- * ledger length, so recency (`last_ordinal / total_ordinals`) stays in the same
13
- * raw-ledger space and is self-consistent.
14
- *
15
- * Recency = the path's most recent touch measured as a STEP-ORDINAL (the covering
16
- * result's index in the ledger), never wall-clock — so the signal is stable
17
- * across machines/agents and cannot churn the artifact hash on clock skew. The
18
- * ledger is append-only and idempotent (O2), so its array order is the run's step
19
- * order and an idempotent replay is a no-op (no churn).
20
- *
21
- * Output arrays are content-sorted (paths by path, lenses lexically) so the
22
- * serialized bytes are stable regardless of ledger iteration incidentals — the
23
- * "extractors emit stable, content-derived array order" invariant, which keeps
24
- * the artifact's content hash from churning the staleness DAG.
25
- *
26
- * `edited_count` and `symbols[]` are reserved: `edited_count` is populated by the
27
- * remediate-parity harvest (RemediationBlock.touched_files), `symbols[]` by the
28
- * `path::symbol` granularity increment. This audit-side path-level derive leaves
29
- * `edited_count` at 0 and omits `symbols`.
30
- */
31
- export function deriveAccessMemory(results, options = {}) {
32
- const runId = options.runId ?? results.find((r) => r.run_id)?.run_id;
33
- // Each covered file in each ledger result is one covered touch at that result's
34
- // ledger ordinal. The shared core owns the deterministic accumulate/sort/serialize;
35
- // this adapter only maps AuditResult → the normalized touch stream.
36
- const events = [];
37
- results.forEach((result, ordinal) => {
38
- for (const coverage of result.file_coverage ?? []) {
39
- if (!coverage?.path)
40
- continue;
41
- events.push({
42
- path: coverage.path,
43
- edited: false,
44
- ordinal,
45
- lens: result.lens,
46
- });
47
- }
48
- });
49
- return deriveAccessMemoryFromEvents(events, {
50
- totalOrdinals: results.length,
51
- runId,
52
- });
53
- }
54
- //# sourceMappingURL=accessMemory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accessMemory.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/accessMemory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAGlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAsB,EACtB,UAA8B,EAAE;IAEhC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACrE,gFAAgF;IAChF,oFAAoF;IACpF,oEAAoE;IACpE,MAAM,MAAM,GAAuB,EAAE,CAAC;IACtC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;QAClC,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,aAAa,IAAI,EAAE,EAAE,CAAC;YAClD,IAAI,CAAC,QAAQ,EAAE,IAAI;gBAAE,SAAS;YAC9B,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,QAAQ,CAAC,IAAI;gBACnB,MAAM,EAAE,KAAK;gBACb,OAAO;gBACP,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,4BAA4B,CAAC,MAAM,EAAE;QAC1C,aAAa,EAAE,OAAO,CAAC,MAAM;QAC7B,KAAK;KACN,CAAC,CAAC;AACL,CAAC"}
@@ -1,4 +0,0 @@
1
- export { normalizeGraphPath, HIGH_FAN_DEGREE_THRESHOLD, collectGraphEdges, graphEdgeConfidence, isConcreteGraphEdge, buildGraphDegreeIndex, isPacketExpansionEdge, buildFileToGroupKeys, } from "./reviewPacketGraphEdges.js";
2
- export type { GraphDegreeIndex } from "./reviewPacketGraphEdges.js";
3
- export { roundQuality, buildPacketGraphContext } from "./reviewPacketGraphContext.js";
4
- //# sourceMappingURL=reviewPacketGraph.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reviewPacketGraph.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/reviewPacketGraph.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1,7 +0,0 @@
1
- // Barrel re-export: reviewPacketGraph was split into three focused sub-modules.
2
- // All external imports of "./reviewPacketGraph.js" continue to resolve here.
3
- // Graph-edge primitives used for packet presentation and quality metrics.
4
- export { normalizeGraphPath, HIGH_FAN_DEGREE_THRESHOLD, collectGraphEdges, graphEdgeConfidence, isConcreteGraphEdge, buildGraphDegreeIndex, isPacketExpansionEdge, buildFileToGroupKeys, } from "./reviewPacketGraphEdges.js";
5
- // Packet-level graph context: key edges, boundary files, entrypoints, quality.
6
- export { roundQuality, buildPacketGraphContext } from "./reviewPacketGraphContext.js";
7
- //# sourceMappingURL=reviewPacketGraph.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reviewPacketGraph.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/reviewPacketGraph.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,6EAA6E;AAE7E,0EAA0E;AAC1E,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAGrC,+EAA+E;AAC/E,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1,13 +0,0 @@
1
- import type { AccessMemory } from "./types/accessMemory.js";
2
- import type { GraphBundle } from "./types/graph.js";
3
- export declare function computeContinuityScores(accessMemory: AccessMemory | undefined, graphBundle: GraphBundle | undefined): Map<string, number>;
4
- /**
5
- * Sum a work-unit's member-file continuity scores (rounded to fixed precision so
6
- * ULP-level float differences can't reorder units). Higher = more of the unit's
7
- * files are connected to already-touched code. Single-sourced so audit's
8
- * per-packet mass and remediate's per-block mass reduce identically — both
9
- * normalize each path with {@link normalizeGraphPath} to match the scorer's seed
10
- * keys, and both round at 1e6 so the derived ordering is stable.
11
- */
12
- export declare function continuityMassForPaths(paths: readonly string[], scores: Map<string, number>): number;
13
- //# sourceMappingURL=continuityScore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"continuityScore.d.ts","sourceRoot":"","sources":["../../src/shared/continuityScore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAoEpD,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,WAAW,EAAE,WAAW,GAAG,SAAS,GACnC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA0FrB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1B,MAAM,CAMR"}