audit-tools 0.39.15 → 0.41.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 (1107) hide show
  1. package/README.md +28 -29
  2. package/dist/audit/cli/args.d.ts +2 -57
  3. package/dist/audit/cli/args.d.ts.map +1 -1
  4. package/dist/audit/cli/args.js +16 -250
  5. package/dist/audit/cli/args.js.map +1 -1
  6. package/dist/audit/cli/auditStep.d.ts +9 -6
  7. package/dist/audit/cli/auditStep.d.ts.map +1 -1
  8. package/dist/audit/cli/auditStep.js +32 -144
  9. package/dist/audit/cli/auditStep.js.map +1 -1
  10. package/dist/audit/cli/cleanup.js +4 -4
  11. package/dist/audit/cli/cleanup.js.map +1 -1
  12. package/dist/audit/cli/cliHelpers.d.ts +1 -10
  13. package/dist/audit/cli/cliHelpers.d.ts.map +1 -1
  14. package/dist/audit/cli/cliHelpers.js +1 -10
  15. package/dist/audit/cli/cliHelpers.js.map +1 -1
  16. package/dist/audit/cli/conceptualDispatch.d.ts +11 -32
  17. package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
  18. package/dist/audit/cli/conceptualDispatch.js +91 -72
  19. package/dist/audit/cli/conceptualDispatch.js.map +1 -1
  20. package/dist/audit/cli/confirmIntentStep.js +3 -3
  21. package/dist/audit/cli/confirmIntentStep.js.map +1 -1
  22. package/dist/audit/cli/dispatch/hostHandoff.d.ts +86 -0
  23. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -0
  24. package/dist/audit/cli/dispatch/hostHandoff.js +616 -0
  25. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -0
  26. package/dist/audit/cli/dispatch/packetFilter.d.ts +12 -86
  27. package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -1
  28. package/dist/audit/cli/dispatch/packetFilter.js +6 -161
  29. package/dist/audit/cli/dispatch/packetFilter.js.map +1 -1
  30. package/dist/audit/cli/dispatch.d.ts +7 -115
  31. package/dist/audit/cli/dispatch.d.ts.map +1 -1
  32. package/dist/audit/cli/dispatch.js +7 -711
  33. package/dist/audit/cli/dispatch.js.map +1 -1
  34. package/dist/audit/cli/envelope.d.ts +4 -20
  35. package/dist/audit/cli/envelope.d.ts.map +1 -1
  36. package/dist/audit/cli/envelope.js +5 -33
  37. package/dist/audit/cli/envelope.js.map +1 -1
  38. package/dist/audit/cli/fanoutLanes.d.ts +47 -11
  39. package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
  40. package/dist/audit/cli/fanoutLanes.js +15 -7
  41. package/dist/audit/cli/fanoutLanes.js.map +1 -1
  42. package/dist/audit/cli/forceSynthesisCommand.d.ts +3 -16
  43. package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
  44. package/dist/audit/cli/forceSynthesisCommand.js +3 -74
  45. package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
  46. package/dist/audit/cli/laneSubmissions.d.ts +241 -0
  47. package/dist/audit/cli/laneSubmissions.d.ts.map +1 -0
  48. package/dist/audit/cli/laneSubmissions.js +438 -0
  49. package/dist/audit/cli/laneSubmissions.js.map +1 -0
  50. package/dist/audit/cli/laneValidators.d.ts +65 -0
  51. package/dist/audit/cli/laneValidators.d.ts.map +1 -0
  52. package/dist/audit/cli/laneValidators.js +145 -0
  53. package/dist/audit/cli/laneValidators.js.map +1 -0
  54. package/dist/audit/cli/lineIndex.d.ts.map +1 -1
  55. package/dist/audit/cli/lineIndex.js +4 -3
  56. package/dist/audit/cli/lineIndex.js.map +1 -1
  57. package/dist/audit/cli/nextStepCommand.d.ts +1 -1
  58. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  59. package/dist/audit/cli/nextStepCommand.js +153 -382
  60. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  61. package/dist/audit/cli/nextStepHelpers.d.ts +74 -116
  62. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  63. package/dist/audit/cli/nextStepHelpers.js +421 -667
  64. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  65. package/dist/audit/cli/prompts.d.ts +2 -67
  66. package/dist/audit/cli/prompts.d.ts.map +1 -1
  67. package/dist/audit/cli/prompts.js +33 -304
  68. package/dist/audit/cli/prompts.js.map +1 -1
  69. package/dist/audit/cli/recoverSubmissionCommand.d.ts +16 -0
  70. package/dist/audit/cli/recoverSubmissionCommand.d.ts.map +1 -0
  71. package/dist/audit/cli/recoverSubmissionCommand.js +73 -0
  72. package/dist/audit/cli/recoverSubmissionCommand.js.map +1 -0
  73. package/dist/audit/cli/reviewRun.d.ts +6 -35
  74. package/dist/audit/cli/reviewRun.d.ts.map +1 -1
  75. package/dist/audit/cli/reviewRun.js +78 -172
  76. package/dist/audit/cli/reviewRun.js.map +1 -1
  77. package/dist/audit/cli/semanticReviewStep.d.ts +8 -26
  78. package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
  79. package/dist/audit/cli/semanticReviewStep.js +95 -171
  80. package/dist/audit/cli/semanticReviewStep.js.map +1 -1
  81. package/dist/audit/cli/statusCommand.d.ts.map +1 -1
  82. package/dist/audit/cli/statusCommand.js +0 -16
  83. package/dist/audit/cli/statusCommand.js.map +1 -1
  84. package/dist/audit/cli/steps.d.ts +112 -40
  85. package/dist/audit/cli/steps.d.ts.map +1 -1
  86. package/dist/audit/cli/steps.js +14 -0
  87. package/dist/audit/cli/steps.js.map +1 -1
  88. package/dist/audit/cli/validateCommand.d.ts.map +1 -1
  89. package/dist/audit/cli/validateCommand.js +12 -37
  90. package/dist/audit/cli/validateCommand.js.map +1 -1
  91. package/dist/audit/cli.d.ts.map +1 -1
  92. package/dist/audit/cli.js +6 -46
  93. package/dist/audit/cli.js.map +1 -1
  94. package/dist/audit/contracts/workerSchemas.d.ts +138 -195
  95. package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
  96. package/dist/audit/contracts/workerSchemas.js +2 -41
  97. package/dist/audit/contracts/workerSchemas.js.map +1 -1
  98. package/dist/audit/contracts/wrapperResponse.d.ts +61 -71
  99. package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
  100. package/dist/audit/contracts/wrapperResponse.js +7 -9
  101. package/dist/audit/contracts/wrapperResponse.js.map +1 -1
  102. package/dist/audit/io/artifacts.d.ts +14 -10
  103. package/dist/audit/io/artifacts.d.ts.map +1 -1
  104. package/dist/audit/io/artifacts.js +34 -12
  105. package/dist/audit/io/artifacts.js.map +1 -1
  106. package/dist/audit/io/runArtifactTypes.d.ts +4 -6
  107. package/dist/audit/io/runArtifactTypes.d.ts.map +1 -1
  108. package/dist/audit/io/runArtifacts.d.ts +3 -23
  109. package/dist/audit/io/runArtifacts.d.ts.map +1 -1
  110. package/dist/audit/io/runArtifacts.js +18 -170
  111. package/dist/audit/io/runArtifacts.js.map +1 -1
  112. package/dist/audit/orchestrator/advance.js +4 -4
  113. package/dist/audit/orchestrator/advance.js.map +1 -1
  114. package/dist/audit/orchestrator/advanceTypes.d.ts +2 -6
  115. package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
  116. package/dist/audit/orchestrator/designReviewPrompt.d.ts +0 -14
  117. package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
  118. package/dist/audit/orchestrator/designReviewPrompt.js +1 -59
  119. package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
  120. package/dist/audit/orchestrator/executorRunners.d.ts +2 -2
  121. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  122. package/dist/audit/orchestrator/executorRunners.js +5 -15
  123. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  124. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  125. package/dist/audit/orchestrator/executors.js +1 -9
  126. package/dist/audit/orchestrator/executors.js.map +1 -1
  127. package/dist/audit/orchestrator/fileAnchors.js +1 -1
  128. package/dist/audit/orchestrator/fileAnchors.js.map +1 -1
  129. package/dist/audit/orchestrator/graphEdgeCache.js +1 -1
  130. package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
  131. package/dist/audit/orchestrator/ingestionExecutors.js +37 -8
  132. package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
  133. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +2 -19
  134. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
  135. package/dist/audit/orchestrator/intentCheckpointExecutor.js +0 -64
  136. package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
  137. package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts +3 -6
  138. package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts.map +1 -1
  139. package/dist/audit/orchestrator/intentEquivalenceExecutor.js +4 -7
  140. package/dist/audit/orchestrator/intentEquivalenceExecutor.js.map +1 -1
  141. package/dist/audit/orchestrator/intentInterpreter.d.ts +1 -1
  142. package/dist/audit/orchestrator/partitionTaskGraph.d.ts +11 -43
  143. package/dist/audit/orchestrator/partitionTaskGraph.d.ts.map +1 -1
  144. package/dist/audit/orchestrator/partitionTaskGraph.js +48 -101
  145. package/dist/audit/orchestrator/partitionTaskGraph.js.map +1 -1
  146. package/dist/audit/orchestrator/pendingTasks.d.ts +5 -7
  147. package/dist/audit/orchestrator/pendingTasks.d.ts.map +1 -1
  148. package/dist/audit/orchestrator/pendingTasks.js +4 -2
  149. package/dist/audit/orchestrator/pendingTasks.js.map +1 -1
  150. package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
  151. package/dist/audit/orchestrator/planningExecutors.js +18 -21
  152. package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
  153. package/dist/audit/orchestrator/requeueCommand.d.ts +6 -6
  154. package/dist/audit/orchestrator/resultBaseline.d.ts +4 -3
  155. package/dist/audit/orchestrator/resultBaseline.d.ts.map +1 -1
  156. package/dist/audit/orchestrator/resultBaseline.js +4 -3
  157. package/dist/audit/orchestrator/resultBaseline.js.map +1 -1
  158. package/dist/audit/orchestrator/reviewPacketGraph.d.ts +1 -2
  159. package/dist/audit/orchestrator/reviewPacketGraph.d.ts.map +1 -1
  160. package/dist/audit/orchestrator/reviewPacketGraph.js +2 -6
  161. package/dist/audit/orchestrator/reviewPacketGraph.js.map +1 -1
  162. package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts +0 -2
  163. package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts.map +1 -1
  164. package/dist/audit/orchestrator/reviewPacketGraphEdges.js +2 -65
  165. package/dist/audit/orchestrator/reviewPacketGraphEdges.js.map +1 -1
  166. package/dist/audit/orchestrator/reviewPacketSizing.d.ts +0 -1
  167. package/dist/audit/orchestrator/reviewPacketSizing.d.ts.map +1 -1
  168. package/dist/audit/orchestrator/reviewPacketSizing.js +0 -1
  169. package/dist/audit/orchestrator/reviewPacketSizing.js.map +1 -1
  170. package/dist/audit/orchestrator/reviewPackets.d.ts +5 -68
  171. package/dist/audit/orchestrator/reviewPackets.d.ts.map +1 -1
  172. package/dist/audit/orchestrator/reviewPackets.js +55 -278
  173. package/dist/audit/orchestrator/reviewPackets.js.map +1 -1
  174. package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -1
  175. package/dist/audit/orchestrator/runtimeCommand.js +4 -4
  176. package/dist/audit/orchestrator/runtimeCommand.js.map +1 -1
  177. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  178. package/dist/audit/orchestrator/state.js +1 -35
  179. package/dist/audit/orchestrator/state.js.map +1 -1
  180. package/dist/audit/orchestrator/structureExecutors.d.ts +0 -1
  181. package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -1
  182. package/dist/audit/orchestrator/structureExecutors.js +0 -45
  183. package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
  184. package/dist/audit/orchestrator/synthesisExecutors.d.ts +4 -6
  185. package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
  186. package/dist/audit/orchestrator/synthesisExecutors.js +3 -3
  187. package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
  188. package/dist/audit/orchestrator/taskAffinityGraph.d.ts +55 -21
  189. package/dist/audit/orchestrator/taskAffinityGraph.d.ts.map +1 -1
  190. package/dist/audit/orchestrator/taskAffinityGraph.js +67 -29
  191. package/dist/audit/orchestrator/taskAffinityGraph.js.map +1 -1
  192. package/dist/audit/reporting/scoreShared.js +1 -1
  193. package/dist/audit/reporting/scoreShared.js.map +1 -1
  194. package/dist/audit/reporting/synthesis.d.ts +11 -21
  195. package/dist/audit/reporting/synthesis.d.ts.map +1 -1
  196. package/dist/audit/reporting/synthesis.js +76 -29
  197. package/dist/audit/reporting/synthesis.js.map +1 -1
  198. package/dist/audit/reporting/workBlocks.d.ts +12 -12
  199. package/dist/audit/reporting/workBlocks.d.ts.map +1 -1
  200. package/dist/audit/reporting/workBlocks.js +195 -180
  201. package/dist/audit/reporting/workBlocks.js.map +1 -1
  202. package/dist/audit/supervisor/operatorHandoff.d.ts +17 -24
  203. package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
  204. package/dist/audit/supervisor/operatorHandoff.js +60 -125
  205. package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
  206. package/dist/audit/supervisor/runLedger.d.ts.map +1 -1
  207. package/dist/audit/supervisor/runLedger.js +0 -1
  208. package/dist/audit/supervisor/runLedger.js.map +1 -1
  209. package/dist/audit/types/analyzerCapability.d.ts +12 -12
  210. package/dist/audit/types/auditScope.d.ts +4 -19
  211. package/dist/audit/types/auditScope.d.ts.map +1 -1
  212. package/dist/audit/types/auditScope.js +2 -13
  213. package/dist/audit/types/auditScope.js.map +1 -1
  214. package/dist/audit/types/designAssessment.d.ts +9 -13
  215. package/dist/audit/types/designAssessment.d.ts.map +1 -1
  216. package/dist/audit/types/reviewPlanning.d.ts +24 -29
  217. package/dist/audit/types/reviewPlanning.d.ts.map +1 -1
  218. package/dist/audit/types/reviewPlanning.js +2 -7
  219. package/dist/audit/types/reviewPlanning.js.map +1 -1
  220. package/dist/audit/types.d.ts +90 -120
  221. package/dist/audit/types.d.ts.map +1 -1
  222. package/dist/audit/types.js +2 -21
  223. package/dist/audit/types.js.map +1 -1
  224. package/dist/audit/validation/anchorGrounding.d.ts +22 -10
  225. package/dist/audit/validation/anchorGrounding.d.ts.map +1 -1
  226. package/dist/audit/validation/anchorGrounding.js +0 -13
  227. package/dist/audit/validation/anchorGrounding.js.map +1 -1
  228. package/dist/audit/validation/auditResults.d.ts +0 -33
  229. package/dist/audit/validation/auditResults.d.ts.map +1 -1
  230. package/dist/audit/validation/auditResults.js +1 -114
  231. package/dist/audit/validation/auditResults.js.map +1 -1
  232. package/dist/remediate/index.d.ts +0 -8
  233. package/dist/remediate/index.d.ts.map +1 -1
  234. package/dist/remediate/index.js +49 -127
  235. package/dist/remediate/index.js.map +1 -1
  236. package/dist/remediate/intake.d.ts +6 -6
  237. package/dist/remediate/phases/close.d.ts +5 -17
  238. package/dist/remediate/phases/close.d.ts.map +1 -1
  239. package/dist/remediate/phases/close.js +30 -258
  240. package/dist/remediate/phases/close.js.map +1 -1
  241. package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts +4 -4
  242. package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts.map +1 -1
  243. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +14 -11
  244. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
  245. package/dist/remediate/phases/constants.d.ts +0 -1
  246. package/dist/remediate/phases/constants.d.ts.map +1 -1
  247. package/dist/remediate/phases/constants.js +0 -1
  248. package/dist/remediate/phases/constants.js.map +1 -1
  249. package/dist/remediate/phases/plan.d.ts +5 -30
  250. package/dist/remediate/phases/plan.d.ts.map +1 -1
  251. package/dist/remediate/phases/plan.js +34 -191
  252. package/dist/remediate/phases/plan.js.map +1 -1
  253. package/dist/remediate/phases/triage.d.ts.map +1 -1
  254. package/dist/remediate/phases/triage.js +33 -57
  255. package/dist/remediate/phases/triage.js.map +1 -1
  256. package/dist/remediate/review/autonomousGate.js +1 -1
  257. package/dist/remediate/review/autonomousGate.js.map +1 -1
  258. package/dist/remediate/state/closingActions.d.ts +1 -1
  259. package/dist/remediate/state/closingActions.d.ts.map +1 -1
  260. package/dist/remediate/state/closingActions.js +0 -1
  261. package/dist/remediate/state/closingActions.js.map +1 -1
  262. package/dist/remediate/state/store.d.ts +16 -45
  263. package/dist/remediate/state/store.d.ts.map +1 -1
  264. package/dist/remediate/state/store.js +12 -0
  265. package/dist/remediate/state/store.js.map +1 -1
  266. package/dist/remediate/state/types.d.ts +58 -30
  267. package/dist/remediate/state/types.d.ts.map +1 -1
  268. package/dist/remediate/state/types.js +22 -2
  269. package/dist/remediate/state/types.js.map +1 -1
  270. package/dist/remediate/steps/contractPipeline.d.ts +1 -8
  271. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  272. package/dist/remediate/steps/contractPipeline.js +122 -144
  273. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  274. package/dist/remediate/steps/dispatch/common.d.ts +0 -42
  275. package/dist/remediate/steps/dispatch/common.d.ts.map +1 -1
  276. package/dist/remediate/steps/dispatch/common.js +1 -96
  277. package/dist/remediate/steps/dispatch/common.js.map +1 -1
  278. package/dist/remediate/steps/dispatch/dagNodeFields.d.ts +0 -12
  279. package/dist/remediate/steps/dispatch/dagNodeFields.d.ts.map +1 -1
  280. package/dist/remediate/steps/dispatch/dagNodeFields.js +4 -18
  281. package/dist/remediate/steps/dispatch/dagNodeFields.js.map +1 -1
  282. package/dist/remediate/steps/dispatch/hostHandoff.d.ts +110 -0
  283. package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -0
  284. package/dist/remediate/steps/dispatch/hostHandoff.js +921 -0
  285. package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -0
  286. package/dist/remediate/steps/dispatch/implementPrompt.d.ts +0 -38
  287. package/dist/remediate/steps/dispatch/implementPrompt.d.ts.map +1 -1
  288. package/dist/remediate/steps/dispatch/implementPrompt.js +3 -479
  289. package/dist/remediate/steps/dispatch/implementPrompt.js.map +1 -1
  290. package/dist/remediate/steps/dispatch/marshal.d.ts +5 -38
  291. package/dist/remediate/steps/dispatch/marshal.d.ts.map +1 -1
  292. package/dist/remediate/steps/dispatch/marshal.js +4 -1332
  293. package/dist/remediate/steps/dispatch/marshal.js.map +1 -1
  294. package/dist/remediate/steps/dispatch/verifyCommands.d.ts +1 -13
  295. package/dist/remediate/steps/dispatch/verifyCommands.d.ts.map +1 -1
  296. package/dist/remediate/steps/dispatch/verifyCommands.js +1 -21
  297. package/dist/remediate/steps/dispatch/verifyCommands.js.map +1 -1
  298. package/dist/remediate/steps/dispatch/writeScope.d.ts +6 -107
  299. package/dist/remediate/steps/dispatch/writeScope.d.ts.map +1 -1
  300. package/dist/remediate/steps/dispatch/writeScope.js +32 -286
  301. package/dist/remediate/steps/dispatch/writeScope.js.map +1 -1
  302. package/dist/remediate/steps/dispatch.d.ts +7 -12
  303. package/dist/remediate/steps/dispatch.d.ts.map +1 -1
  304. package/dist/remediate/steps/dispatch.js +6 -8
  305. package/dist/remediate/steps/dispatch.js.map +1 -1
  306. package/dist/remediate/steps/gateCommands.d.ts +0 -29
  307. package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
  308. package/dist/remediate/steps/gateCommands.js +0 -35
  309. package/dist/remediate/steps/gateCommands.js.map +1 -1
  310. package/dist/remediate/steps/nextStep.d.ts +9 -408
  311. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  312. package/dist/remediate/steps/nextStep.js +147 -1618
  313. package/dist/remediate/steps/nextStep.js.map +1 -1
  314. package/dist/remediate/steps/prompts.d.ts.map +1 -1
  315. package/dist/remediate/steps/prompts.js +1 -2
  316. package/dist/remediate/steps/prompts.js.map +1 -1
  317. package/dist/remediate/steps/sessionConfigLoad.d.ts +3 -42
  318. package/dist/remediate/steps/sessionConfigLoad.d.ts.map +1 -1
  319. package/dist/remediate/steps/sessionConfigLoad.js +3 -37
  320. package/dist/remediate/steps/sessionConfigLoad.js.map +1 -1
  321. package/dist/remediate/steps/stepUtils.d.ts +10 -47
  322. package/dist/remediate/steps/stepUtils.d.ts.map +1 -1
  323. package/dist/remediate/steps/stepUtils.js +11 -67
  324. package/dist/remediate/steps/stepUtils.js.map +1 -1
  325. package/dist/remediate/steps/types.d.ts +2 -81
  326. package/dist/remediate/steps/types.d.ts.map +1 -1
  327. package/dist/remediate/steps/types.js.map +1 -1
  328. package/dist/remediate/utils/fileIntegrity.d.ts.map +1 -1
  329. package/dist/remediate/utils/fileIntegrity.js +57 -5
  330. package/dist/remediate/utils/fileIntegrity.js.map +1 -1
  331. package/dist/remediate/validation/contractPipeline.d.ts +1 -1
  332. package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
  333. package/dist/remediate/validation/contractPipeline.js +1 -1
  334. package/dist/remediate/validation/contractPipeline.js.map +1 -1
  335. package/dist/remediate/validation/contractPipelineGates.d.ts +1 -39
  336. package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
  337. package/dist/remediate/validation/contractPipelineGates.js +1 -67
  338. package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
  339. package/dist/shared/affinityArtifacts.d.ts +42 -0
  340. package/dist/shared/affinityArtifacts.d.ts.map +1 -0
  341. package/dist/shared/affinityArtifacts.js +142 -0
  342. package/dist/shared/affinityArtifacts.js.map +1 -0
  343. package/dist/shared/analyzerPolicy.d.ts +40 -0
  344. package/dist/shared/analyzerPolicy.d.ts.map +1 -0
  345. package/dist/shared/analyzerPolicy.js +102 -0
  346. package/dist/shared/analyzerPolicy.js.map +1 -0
  347. package/dist/shared/analyzers/acquisitionEngine.d.ts +1 -1
  348. package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
  349. package/dist/shared/analyzers/types.d.ts +20 -20
  350. package/dist/shared/artifactFreshness.d.ts.map +1 -1
  351. package/dist/shared/artifactFreshness.js +5 -4
  352. package/dist/shared/artifactFreshness.js.map +1 -1
  353. package/dist/shared/constitutionalDocPaths.d.ts.map +1 -1
  354. package/dist/shared/constitutionalDocPaths.js +0 -1
  355. package/dist/shared/constitutionalDocPaths.js.map +1 -1
  356. package/dist/shared/contentKey.d.ts +1 -42
  357. package/dist/shared/contentKey.d.ts.map +1 -1
  358. package/dist/shared/contentKey.js +1 -45
  359. package/dist/shared/contentKey.js.map +1 -1
  360. package/dist/shared/decompose/charterClarification.d.ts +1 -1
  361. package/dist/shared/decompose/charterClarification.js +1 -1
  362. package/dist/shared/decompose/charterExtraction.d.ts +20 -20
  363. package/dist/shared/decompose/charterExtraction.js +1 -1
  364. package/dist/shared/decompose/charterExtraction.js.map +1 -1
  365. package/dist/shared/decompose/contentCoherence.d.ts +382 -0
  366. package/dist/shared/decompose/contentCoherence.d.ts.map +1 -0
  367. package/dist/shared/decompose/contentCoherence.js +290 -0
  368. package/dist/shared/decompose/contentCoherence.js.map +1 -0
  369. package/dist/shared/decompose/systemicChallenge.d.ts +4 -4
  370. package/dist/shared/decompose/systemicChallenge.js +1 -1
  371. package/dist/shared/decompose/systemicChallenge.js.map +1 -1
  372. package/dist/shared/friction/frictionRecord.js +1 -1
  373. package/dist/shared/friction/frictionRecord.js.map +1 -1
  374. package/dist/shared/friction/stepBoundaryCapture.d.ts +13 -175
  375. package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
  376. package/dist/shared/friction/stepBoundaryCapture.js +6 -232
  377. package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
  378. package/dist/shared/friction/triage.d.ts +3 -3
  379. package/dist/shared/friction/triage.d.ts.map +1 -1
  380. package/dist/shared/friction/triage.js +3 -20
  381. package/dist/shared/friction/triage.js.map +1 -1
  382. package/dist/shared/hostAssets.d.ts +3 -5
  383. package/dist/shared/hostAssets.d.ts.map +1 -1
  384. package/dist/shared/hostAssets.js +6 -7
  385. package/dist/shared/hostAssets.js.map +1 -1
  386. package/dist/shared/index.d.ts +32 -155
  387. package/dist/shared/index.d.ts.map +1 -1
  388. package/dist/shared/index.js +19 -133
  389. package/dist/shared/index.js.map +1 -1
  390. package/dist/shared/io/artifactName.js +2 -2
  391. package/dist/shared/io/artifactName.js.map +1 -1
  392. package/dist/shared/io/auditToolsPaths.d.ts +26 -6
  393. package/dist/shared/io/auditToolsPaths.d.ts.map +1 -1
  394. package/dist/shared/io/auditToolsPaths.js +31 -7
  395. package/dist/shared/io/auditToolsPaths.js.map +1 -1
  396. package/dist/shared/io/fileLock.d.ts.map +1 -0
  397. package/dist/shared/io/fileLock.js.map +1 -0
  398. package/dist/shared/io/json.d.ts +1 -1
  399. package/dist/shared/io/json.js +1 -1
  400. package/dist/shared/io/lockedJsonStore.d.ts +1 -1
  401. package/dist/shared/io/lockedJsonStore.js +4 -4
  402. package/dist/shared/io/lockedJsonStore.js.map +1 -1
  403. package/dist/shared/io/nodeWorktreeGuard.d.ts +14 -15
  404. package/dist/shared/io/nodeWorktreeGuard.d.ts.map +1 -1
  405. package/dist/shared/io/nodeWorktreeGuard.js +14 -15
  406. package/dist/shared/io/nodeWorktreeGuard.js.map +1 -1
  407. package/dist/shared/io/pathContainment.d.ts +3 -5
  408. package/dist/shared/io/pathContainment.d.ts.map +1 -1
  409. package/dist/shared/io/pathContainment.js.map +1 -1
  410. package/dist/shared/io/pathIdentity.d.ts.map +1 -0
  411. package/dist/shared/io/pathIdentity.js.map +1 -0
  412. package/dist/shared/io/schemaVersion.d.ts +5 -4
  413. package/dist/shared/io/schemaVersion.d.ts.map +1 -1
  414. package/dist/shared/io/schemaVersion.js +17 -5
  415. package/dist/shared/io/schemaVersion.js.map +1 -1
  416. package/dist/shared/io/stateDir.d.ts +3 -6
  417. package/dist/shared/io/stateDir.d.ts.map +1 -1
  418. package/dist/shared/io/stateDir.js +3 -6
  419. package/dist/shared/io/stateDir.js.map +1 -1
  420. package/dist/shared/io/stepContractWriter.d.ts +3 -3
  421. package/dist/shared/io/stepContractWriter.js +3 -3
  422. package/dist/shared/loopCorePaths.d.ts.map +1 -1
  423. package/dist/shared/loopCorePaths.js +12 -14
  424. package/dist/shared/loopCorePaths.js.map +1 -1
  425. package/dist/shared/observability/runLog.d.ts +1 -2
  426. package/dist/shared/observability/runLog.d.ts.map +1 -1
  427. package/dist/shared/observability/runLog.js.map +1 -1
  428. package/dist/shared/prompts.d.ts +5 -7
  429. package/dist/shared/prompts.d.ts.map +1 -1
  430. package/dist/shared/prompts.js +2 -3
  431. package/dist/shared/prompts.js.map +1 -1
  432. package/dist/shared/reporting/auditDeliverable.d.ts.map +1 -1
  433. package/dist/shared/reporting/auditDeliverable.js +37 -2
  434. package/dist/shared/reporting/auditDeliverable.js.map +1 -1
  435. package/dist/shared/sessionConfig.d.ts +30 -0
  436. package/dist/shared/sessionConfig.d.ts.map +1 -0
  437. package/dist/shared/sessionConfig.js +78 -0
  438. package/dist/shared/sessionConfig.js.map +1 -0
  439. package/dist/shared/stableStringify.d.ts +0 -12
  440. package/dist/shared/stableStringify.d.ts.map +1 -1
  441. package/dist/shared/stableStringify.js +4 -1
  442. package/dist/shared/stableStringify.js.map +1 -1
  443. package/dist/shared/submission/expectedSubmissions.d.ts +88 -0
  444. package/dist/shared/submission/expectedSubmissions.d.ts.map +1 -0
  445. package/dist/shared/submission/expectedSubmissions.js +84 -0
  446. package/dist/shared/submission/expectedSubmissions.js.map +1 -0
  447. package/dist/shared/submission/handRecovery.d.ts +37 -0
  448. package/dist/shared/submission/handRecovery.d.ts.map +1 -0
  449. package/dist/shared/submission/handRecovery.js +123 -0
  450. package/dist/shared/submission/handRecovery.js.map +1 -0
  451. package/dist/shared/submission/submissionClassifier.d.ts +48 -0
  452. package/dist/shared/submission/submissionClassifier.d.ts.map +1 -0
  453. package/dist/shared/submission/submissionClassifier.js +83 -0
  454. package/dist/shared/submission/submissionClassifier.js.map +1 -0
  455. package/dist/shared/submission/submissionIdentity.d.ts +49 -0
  456. package/dist/shared/submission/submissionIdentity.d.ts.map +1 -0
  457. package/dist/shared/submission/submissionIdentity.js +90 -0
  458. package/dist/shared/submission/submissionIdentity.js.map +1 -0
  459. package/dist/shared/submission/submissionLedger.d.ts +37 -0
  460. package/dist/shared/submission/submissionLedger.d.ts.map +1 -0
  461. package/dist/shared/submission/submissionLedger.js +81 -0
  462. package/dist/shared/submission/submissionLedger.js.map +1 -0
  463. package/dist/shared/tokens.d.ts +0 -11
  464. package/dist/shared/tokens.d.ts.map +1 -1
  465. package/dist/shared/tokens.js +2 -32
  466. package/dist/shared/tokens.js.map +1 -1
  467. package/dist/shared/tooling/allowlistedExec.d.ts +1 -1
  468. package/dist/shared/tooling/allowlistedExec.js +4 -4
  469. package/dist/shared/tooling/allowlistedExec.js.map +1 -1
  470. package/dist/shared/tooling/exec.d.ts +6 -6
  471. package/dist/shared/tooling/exec.d.ts.map +1 -1
  472. package/dist/shared/tooling/exec.js +9 -11
  473. package/dist/shared/tooling/exec.js.map +1 -1
  474. package/dist/shared/tooling/projectTestAdmission.d.ts +1 -1
  475. package/dist/shared/tooling/projectTestAdmission.js +3 -3
  476. package/dist/shared/tooling/projectTestAdmission.js.map +1 -1
  477. package/dist/shared/types/accessMemory.d.ts +6 -6
  478. package/dist/shared/types/charter.d.ts +19 -19
  479. package/dist/shared/types/charter.js +3 -3
  480. package/dist/shared/types/contractPipeline/verification.d.ts +0 -2
  481. package/dist/shared/types/contractPipeline/verification.d.ts.map +1 -1
  482. package/dist/shared/types/contractPipeline.d.ts +12 -1
  483. package/dist/shared/types/contractPipeline.d.ts.map +1 -1
  484. package/dist/shared/types/contractPipeline.js.map +1 -1
  485. package/dist/shared/types/executionRecord.d.ts +58 -0
  486. package/dist/shared/types/executionRecord.d.ts.map +1 -0
  487. package/dist/shared/types/executionRecord.js +26 -0
  488. package/dist/shared/types/executionRecord.js.map +1 -0
  489. package/dist/shared/types/finding.d.ts +671 -43
  490. package/dist/shared/types/finding.d.ts.map +1 -1
  491. package/dist/shared/types/finding.js +47 -13
  492. package/dist/shared/types/finding.js.map +1 -1
  493. package/dist/shared/types/intentCheckpoint.d.ts +30 -31
  494. package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
  495. package/dist/shared/types/intentCheckpoint.js +2 -3
  496. package/dist/shared/types/intentCheckpoint.js.map +1 -1
  497. package/dist/shared/types/remediationOutcome.d.ts +6 -6
  498. package/dist/shared/types/runLedger.d.ts +0 -1
  499. package/dist/shared/types/runLedger.d.ts.map +1 -1
  500. package/dist/shared/types/stepContract.d.ts +0 -6
  501. package/dist/shared/types/stepContract.d.ts.map +1 -1
  502. package/dist/shared/types/stepContract.js +0 -1
  503. package/dist/shared/types/stepContract.js.map +1 -1
  504. package/dist/shared/validation/findingsReport.d.ts +17 -1
  505. package/dist/shared/validation/findingsReport.d.ts.map +1 -1
  506. package/dist/shared/validation/findingsReport.js +137 -1
  507. package/dist/shared/validation/findingsReport.js.map +1 -1
  508. package/docs/audit-pkg/contracts.md +75 -201
  509. package/docs/audit-pkg/development.md +8 -7
  510. package/docs/audit-pkg/operator-guide.md +72 -174
  511. package/docs/audit-pkg/product.md +8 -15
  512. package/docs/audit-pkg/release.md +10 -21
  513. package/opencode.json +0 -34
  514. package/package.json +3 -5
  515. package/schemas/audit_result.schema.json +1 -17
  516. package/schemas/audit_results.schema.json +1 -17
  517. package/schemas/finding.schema.json +1 -1
  518. package/scripts/audit/postinstall.mjs +0 -8
  519. package/scripts/remediate/postinstall.mjs +27 -12
  520. package/skills/audit-code/SKILL.md +32 -150
  521. package/skills/audit-code/audit-code.prompt.md +24 -86
  522. package/skills/remediate-code/SKILL.md +27 -64
  523. package/skills/remediate-code/remediate-code.prompt.md +22 -79
  524. package/wrapper/audit-code-wrapper-install-hosts.mjs +3 -5
  525. package/wrapper/audit-code-wrapper-install-renderers.mjs +2 -2
  526. package/wrapper/audit-code-wrapper-lib.mjs +3 -23
  527. package/wrapper/audit-code-wrapper-opencode.mjs +21 -16
  528. package/wrapper/remediate-code-wrapper-install-hosts.mjs +5 -6
  529. package/wrapper/remediate-code-wrapper-install-renderers.mjs +1 -2
  530. package/wrapper/remediate-code-wrapper-opencode.mjs +31 -10
  531. package/dist/audit/cli/advanceAuditCommand.d.ts +0 -2
  532. package/dist/audit/cli/advanceAuditCommand.d.ts.map +0 -1
  533. package/dist/audit/cli/advanceAuditCommand.js +0 -104
  534. package/dist/audit/cli/advanceAuditCommand.js.map +0 -1
  535. package/dist/audit/cli/dispatch/hostFanoutGate.d.ts +0 -36
  536. package/dist/audit/cli/dispatch/hostFanoutGate.d.ts.map +0 -1
  537. package/dist/audit/cli/dispatch/hostFanoutGate.js +0 -28
  538. package/dist/audit/cli/dispatch/hostFanoutGate.js.map +0 -1
  539. package/dist/audit/cli/dispatch/packetPrompt.d.ts +0 -49
  540. package/dist/audit/cli/dispatch/packetPrompt.d.ts.map +0 -1
  541. package/dist/audit/cli/dispatch/packetPrompt.js +0 -355
  542. package/dist/audit/cli/dispatch/packetPrompt.js.map +0 -1
  543. package/dist/audit/cli/dispatch/paths.d.ts +0 -7
  544. package/dist/audit/cli/dispatch/paths.d.ts.map +0 -1
  545. package/dist/audit/cli/dispatch/paths.js +0 -32
  546. package/dist/audit/cli/dispatch/paths.js.map +0 -1
  547. package/dist/audit/cli/dispatch/pausePersist.d.ts +0 -111
  548. package/dist/audit/cli/dispatch/pausePersist.d.ts.map +0 -1
  549. package/dist/audit/cli/dispatch/pausePersist.js +0 -252
  550. package/dist/audit/cli/dispatch/pausePersist.js.map +0 -1
  551. package/dist/audit/cli/dispatch/quotaPool.d.ts +0 -142
  552. package/dist/audit/cli/dispatch/quotaPool.d.ts.map +0 -1
  553. package/dist/audit/cli/dispatch/quotaPool.js +0 -232
  554. package/dist/audit/cli/dispatch/quotaPool.js.map +0 -1
  555. package/dist/audit/cli/dispatch/sizingWindow.d.ts +0 -46
  556. package/dist/audit/cli/dispatch/sizingWindow.d.ts.map +0 -1
  557. package/dist/audit/cli/dispatch/sizingWindow.js +0 -34
  558. package/dist/audit/cli/dispatch/sizingWindow.js.map +0 -1
  559. package/dist/audit/cli/dispatch/tierRouting.d.ts +0 -64
  560. package/dist/audit/cli/dispatch/tierRouting.d.ts.map +0 -1
  561. package/dist/audit/cli/dispatch/tierRouting.js +0 -172
  562. package/dist/audit/cli/dispatch/tierRouting.js.map +0 -1
  563. package/dist/audit/cli/dispatch/tokenUsageObservation.d.ts +0 -91
  564. package/dist/audit/cli/dispatch/tokenUsageObservation.d.ts.map +0 -1
  565. package/dist/audit/cli/dispatch/tokenUsageObservation.js +0 -218
  566. package/dist/audit/cli/dispatch/tokenUsageObservation.js.map +0 -1
  567. package/dist/audit/cli/dispatch/types.d.ts +0 -144
  568. package/dist/audit/cli/dispatch/types.d.ts.map +0 -1
  569. package/dist/audit/cli/dispatch/types.js +0 -15
  570. package/dist/audit/cli/dispatch/types.js.map +0 -1
  571. package/dist/audit/cli/dispatchAttempted.d.ts +0 -26
  572. package/dist/audit/cli/dispatchAttempted.d.ts.map +0 -1
  573. package/dist/audit/cli/dispatchAttempted.js +0 -71
  574. package/dist/audit/cli/dispatchAttempted.js.map +0 -1
  575. package/dist/audit/cli/dispatchStatusCommand.d.ts +0 -2
  576. package/dist/audit/cli/dispatchStatusCommand.d.ts.map +0 -1
  577. package/dist/audit/cli/dispatchStatusCommand.js +0 -81
  578. package/dist/audit/cli/dispatchStatusCommand.js.map +0 -1
  579. package/dist/audit/cli/hybridDispatch.d.ts +0 -68
  580. package/dist/audit/cli/hybridDispatch.d.ts.map +0 -1
  581. package/dist/audit/cli/hybridDispatch.js +0 -85
  582. package/dist/audit/cli/hybridDispatch.js.map +0 -1
  583. package/dist/audit/cli/mergeAndIngestCommand.d.ts +0 -165
  584. package/dist/audit/cli/mergeAndIngestCommand.d.ts.map +0 -1
  585. package/dist/audit/cli/mergeAndIngestCommand.js +0 -945
  586. package/dist/audit/cli/mergeAndIngestCommand.js.map +0 -1
  587. package/dist/audit/cli/ownerTokens.d.ts +0 -21
  588. package/dist/audit/cli/ownerTokens.d.ts.map +0 -1
  589. package/dist/audit/cli/ownerTokens.js +0 -86
  590. package/dist/audit/cli/ownerTokens.js.map +0 -1
  591. package/dist/audit/cli/prepareDispatchCommand.d.ts +0 -34
  592. package/dist/audit/cli/prepareDispatchCommand.d.ts.map +0 -1
  593. package/dist/audit/cli/prepareDispatchCommand.js +0 -69
  594. package/dist/audit/cli/prepareDispatchCommand.js.map +0 -1
  595. package/dist/audit/cli/quotaCommand.d.ts +0 -2
  596. package/dist/audit/cli/quotaCommand.d.ts.map +0 -1
  597. package/dist/audit/cli/quotaCommand.js +0 -68
  598. package/dist/audit/cli/quotaCommand.js.map +0 -1
  599. package/dist/audit/cli/rollingAuditDispatch.d.ts +0 -206
  600. package/dist/audit/cli/rollingAuditDispatch.d.ts.map +0 -1
  601. package/dist/audit/cli/rollingAuditDispatch.js +0 -633
  602. package/dist/audit/cli/rollingAuditDispatch.js.map +0 -1
  603. package/dist/audit/cli/scoreTokensCommand.d.ts +0 -18
  604. package/dist/audit/cli/scoreTokensCommand.d.ts.map +0 -1
  605. package/dist/audit/cli/scoreTokensCommand.js +0 -129
  606. package/dist/audit/cli/scoreTokensCommand.js.map +0 -1
  607. package/dist/audit/cli/submitPacketCommand.d.ts +0 -2
  608. package/dist/audit/cli/submitPacketCommand.d.ts.map +0 -1
  609. package/dist/audit/cli/submitPacketCommand.js +0 -139
  610. package/dist/audit/cli/submitPacketCommand.js.map +0 -1
  611. package/dist/audit/cli/validateResultCommand.d.ts +0 -2
  612. package/dist/audit/cli/validateResultCommand.d.ts.map +0 -1
  613. package/dist/audit/cli/validateResultCommand.js +0 -105
  614. package/dist/audit/cli/validateResultCommand.js.map +0 -1
  615. package/dist/audit/cli/waveManifest.d.ts +0 -41
  616. package/dist/audit/cli/waveManifest.d.ts.map +0 -1
  617. package/dist/audit/cli/waveManifest.js +0 -42
  618. package/dist/audit/cli/waveManifest.js.map +0 -1
  619. package/dist/audit/cli/workPartitionRuntime.d.ts +0 -11
  620. package/dist/audit/cli/workPartitionRuntime.d.ts.map +0 -1
  621. package/dist/audit/cli/workPartitionRuntime.js +0 -42
  622. package/dist/audit/cli/workPartitionRuntime.js.map +0 -1
  623. package/dist/audit/cli/workerRunCommand.d.ts +0 -16
  624. package/dist/audit/cli/workerRunCommand.d.ts.map +0 -1
  625. package/dist/audit/cli/workerRunCommand.js +0 -153
  626. package/dist/audit/cli/workerRunCommand.js.map +0 -1
  627. package/dist/audit/contracts/schemaEnforcedEmit.d.ts +0 -75
  628. package/dist/audit/contracts/schemaEnforcedEmit.d.ts.map +0 -1
  629. package/dist/audit/contracts/schemaEnforcedEmit.js +0 -131
  630. package/dist/audit/contracts/schemaEnforcedEmit.js.map +0 -1
  631. package/dist/audit/orchestrator/reviewPacketGraphClustering.d.ts +0 -4
  632. package/dist/audit/orchestrator/reviewPacketGraphClustering.d.ts.map +0 -1
  633. package/dist/audit/orchestrator/reviewPacketGraphClustering.js +0 -473
  634. package/dist/audit/orchestrator/reviewPacketGraphClustering.js.map +0 -1
  635. package/dist/audit/orchestrator/rollingDispatch.d.ts +0 -64
  636. package/dist/audit/orchestrator/rollingDispatch.d.ts.map +0 -1
  637. package/dist/audit/orchestrator/rollingDispatch.js +0 -147
  638. package/dist/audit/orchestrator/rollingDispatch.js.map +0 -1
  639. package/dist/audit/orchestrator/unionFind.d.ts +0 -8
  640. package/dist/audit/orchestrator/unionFind.d.ts.map +0 -1
  641. package/dist/audit/orchestrator/unionFind.js +0 -43
  642. package/dist/audit/orchestrator/unionFind.js.map +0 -1
  643. package/dist/audit/prompts/renderWorkerPrompt.d.ts +0 -3
  644. package/dist/audit/prompts/renderWorkerPrompt.d.ts.map +0 -1
  645. package/dist/audit/prompts/renderWorkerPrompt.js +0 -87
  646. package/dist/audit/prompts/renderWorkerPrompt.js.map +0 -1
  647. package/dist/audit/providers/constants.d.ts +0 -2
  648. package/dist/audit/providers/constants.d.ts.map +0 -1
  649. package/dist/audit/providers/constants.js +0 -2
  650. package/dist/audit/providers/constants.js.map +0 -1
  651. package/dist/audit/providers/index.d.ts +0 -19
  652. package/dist/audit/providers/index.d.ts.map +0 -1
  653. package/dist/audit/providers/index.js +0 -23
  654. package/dist/audit/providers/index.js.map +0 -1
  655. package/dist/audit/quota/discoveredLimits.d.ts +0 -39
  656. package/dist/audit/quota/discoveredLimits.d.ts.map +0 -1
  657. package/dist/audit/quota/discoveredLimits.js +0 -96
  658. package/dist/audit/quota/discoveredLimits.js.map +0 -1
  659. package/dist/audit/quota/hostLimits.d.ts +0 -7
  660. package/dist/audit/quota/hostLimits.d.ts.map +0 -1
  661. package/dist/audit/quota/hostLimits.js +0 -6
  662. package/dist/audit/quota/hostLimits.js.map +0 -1
  663. package/dist/audit/quota/index.d.ts +0 -12
  664. package/dist/audit/quota/index.d.ts.map +0 -1
  665. package/dist/audit/quota/index.js +0 -19
  666. package/dist/audit/quota/index.js.map +0 -1
  667. package/dist/audit/reporting/scoreTokens.d.ts +0 -112
  668. package/dist/audit/reporting/scoreTokens.d.ts.map +0 -1
  669. package/dist/audit/reporting/scoreTokens.js +0 -188
  670. package/dist/audit/reporting/scoreTokens.js.map +0 -1
  671. package/dist/audit/supervisor/sessionConfig.d.ts +0 -19
  672. package/dist/audit/supervisor/sessionConfig.d.ts.map +0 -1
  673. package/dist/audit/supervisor/sessionConfig.js +0 -98
  674. package/dist/audit/supervisor/sessionConfig.js.map +0 -1
  675. package/dist/audit/types/activeDispatch.d.ts +0 -83
  676. package/dist/audit/types/activeDispatch.d.ts.map +0 -1
  677. package/dist/audit/types/activeDispatch.js +0 -3
  678. package/dist/audit/types/activeDispatch.js.map +0 -1
  679. package/dist/audit/types/workerSession.d.ts +0 -28
  680. package/dist/audit/types/workerSession.d.ts.map +0 -1
  681. package/dist/audit/types/workerSession.js +0 -5
  682. package/dist/audit/types/workerSession.js.map +0 -1
  683. package/dist/audit/validation/sessionConfig.d.ts +0 -7
  684. package/dist/audit/validation/sessionConfig.d.ts.map +0 -1
  685. package/dist/audit/validation/sessionConfig.js +0 -84
  686. package/dist/audit/validation/sessionConfig.js.map +0 -1
  687. package/dist/remediate/dispatch/amendmentClaim.d.ts +0 -48
  688. package/dist/remediate/dispatch/amendmentClaim.d.ts.map +0 -1
  689. package/dist/remediate/dispatch/amendmentClaim.js +0 -67
  690. package/dist/remediate/dispatch/amendmentClaim.js.map +0 -1
  691. package/dist/remediate/dispatch/ownershipRegistry.d.ts +0 -266
  692. package/dist/remediate/dispatch/ownershipRegistry.d.ts.map +0 -1
  693. package/dist/remediate/dispatch/ownershipRegistry.js +0 -515
  694. package/dist/remediate/dispatch/ownershipRegistry.js.map +0 -1
  695. package/dist/remediate/phases/workerTasks.d.ts +0 -21
  696. package/dist/remediate/phases/workerTasks.d.ts.map +0 -1
  697. package/dist/remediate/phases/workerTasks.js +0 -31
  698. package/dist/remediate/phases/workerTasks.js.map +0 -1
  699. package/dist/remediate/providers/constants.d.ts +0 -2
  700. package/dist/remediate/providers/constants.d.ts.map +0 -1
  701. package/dist/remediate/providers/constants.js +0 -2
  702. package/dist/remediate/providers/constants.js.map +0 -1
  703. package/dist/remediate/providers/index.d.ts +0 -19
  704. package/dist/remediate/providers/index.d.ts.map +0 -1
  705. package/dist/remediate/providers/index.js +0 -23
  706. package/dist/remediate/providers/index.js.map +0 -1
  707. package/dist/remediate/quota/hostLimits.d.ts +0 -7
  708. package/dist/remediate/quota/hostLimits.d.ts.map +0 -1
  709. package/dist/remediate/quota/hostLimits.js +0 -6
  710. package/dist/remediate/quota/hostLimits.js.map +0 -1
  711. package/dist/remediate/quota/index.d.ts +0 -8
  712. package/dist/remediate/quota/index.d.ts.map +0 -1
  713. package/dist/remediate/quota/index.js +0 -12
  714. package/dist/remediate/quota/index.js.map +0 -1
  715. package/dist/remediate/steps/dispatch/acceptNode.d.ts +0 -328
  716. package/dist/remediate/steps/dispatch/acceptNode.d.ts.map +0 -1
  717. package/dist/remediate/steps/dispatch/acceptNode.js +0 -722
  718. package/dist/remediate/steps/dispatch/acceptNode.js.map +0 -1
  719. package/dist/remediate/steps/dispatch/acceptReconcile.d.ts +0 -66
  720. package/dist/remediate/steps/dispatch/acceptReconcile.d.ts.map +0 -1
  721. package/dist/remediate/steps/dispatch/acceptReconcile.js +0 -154
  722. package/dist/remediate/steps/dispatch/acceptReconcile.js.map +0 -1
  723. package/dist/remediate/steps/dispatch/nodeArtifacts.d.ts +0 -41
  724. package/dist/remediate/steps/dispatch/nodeArtifacts.d.ts.map +0 -1
  725. package/dist/remediate/steps/dispatch/nodeArtifacts.js +0 -81
  726. package/dist/remediate/steps/dispatch/nodeArtifacts.js.map +0 -1
  727. package/dist/remediate/steps/dispatch/waveScheduling.d.ts +0 -123
  728. package/dist/remediate/steps/dispatch/waveScheduling.d.ts.map +0 -1
  729. package/dist/remediate/steps/dispatch/waveScheduling.js +0 -213
  730. package/dist/remediate/steps/dispatch/waveScheduling.js.map +0 -1
  731. package/dist/remediate/steps/dispatch/worktreeLifecycle.d.ts +0 -239
  732. package/dist/remediate/steps/dispatch/worktreeLifecycle.d.ts.map +0 -1
  733. package/dist/remediate/steps/dispatch/worktreeLifecycle.js +0 -875
  734. package/dist/remediate/steps/dispatch/worktreeLifecycle.js.map +0 -1
  735. package/dist/remediate/steps/providerNodeDispatch.d.ts +0 -57
  736. package/dist/remediate/steps/providerNodeDispatch.d.ts.map +0 -1
  737. package/dist/remediate/steps/providerNodeDispatch.js +0 -97
  738. package/dist/remediate/steps/providerNodeDispatch.js.map +0 -1
  739. package/dist/remediate/steps/rollingSession.d.ts +0 -283
  740. package/dist/remediate/steps/rollingSession.d.ts.map +0 -1
  741. package/dist/remediate/steps/rollingSession.js +0 -718
  742. package/dist/remediate/steps/rollingSession.js.map +0 -1
  743. package/dist/remediate/types/workerSession.d.ts +0 -35
  744. package/dist/remediate/types/workerSession.d.ts.map +0 -1
  745. package/dist/remediate/types/workerSession.js +0 -5
  746. package/dist/remediate/types/workerSession.js.map +0 -1
  747. package/dist/shared/config/resolveSessionConfig.d.ts +0 -75
  748. package/dist/shared/config/resolveSessionConfig.d.ts.map +0 -1
  749. package/dist/shared/config/resolveSessionConfig.js +0 -126
  750. package/dist/shared/config/resolveSessionConfig.js.map +0 -1
  751. package/dist/shared/data/model-statics.generated.json +0 -18939
  752. package/dist/shared/decompose/workPartition.d.ts +0 -66
  753. package/dist/shared/decompose/workPartition.d.ts.map +0 -1
  754. package/dist/shared/decompose/workPartition.js +0 -523
  755. package/dist/shared/decompose/workPartition.js.map +0 -1
  756. package/dist/shared/dispatch/admissionLeaseReconcile.d.ts +0 -20
  757. package/dist/shared/dispatch/admissionLeaseReconcile.d.ts.map +0 -1
  758. package/dist/shared/dispatch/admissionLeaseReconcile.js +0 -36
  759. package/dist/shared/dispatch/admissionLeaseReconcile.js.map +0 -1
  760. package/dist/shared/dispatch/admissionLoop.d.ts +0 -875
  761. package/dist/shared/dispatch/admissionLoop.d.ts.map +0 -1
  762. package/dist/shared/dispatch/admissionLoop.js +0 -692
  763. package/dist/shared/dispatch/admissionLoop.js.map +0 -1
  764. package/dist/shared/dispatch/coordinator.d.ts +0 -189
  765. package/dist/shared/dispatch/coordinator.d.ts.map +0 -1
  766. package/dist/shared/dispatch/coordinator.js +0 -258
  767. package/dist/shared/dispatch/coordinator.js.map +0 -1
  768. package/dist/shared/dispatch/costRank.d.ts +0 -25
  769. package/dist/shared/dispatch/costRank.d.ts.map +0 -1
  770. package/dist/shared/dispatch/costRank.js +0 -34
  771. package/dist/shared/dispatch/costRank.js.map +0 -1
  772. package/dist/shared/dispatch/dispatchDecisionLog.d.ts +0 -142
  773. package/dist/shared/dispatch/dispatchDecisionLog.d.ts.map +0 -1
  774. package/dist/shared/dispatch/dispatchDecisionLog.js +0 -65
  775. package/dist/shared/dispatch/dispatchDecisionLog.js.map +0 -1
  776. package/dist/shared/dispatch/dispatchQuotaContract.d.ts +0 -1052
  777. package/dist/shared/dispatch/dispatchQuotaContract.d.ts.map +0 -1
  778. package/dist/shared/dispatch/dispatchQuotaContract.js +0 -75
  779. package/dist/shared/dispatch/dispatchQuotaContract.js.map +0 -1
  780. package/dist/shared/dispatch/hostDispatchWall.d.ts +0 -107
  781. package/dist/shared/dispatch/hostDispatchWall.d.ts.map +0 -1
  782. package/dist/shared/dispatch/hostDispatchWall.js +0 -90
  783. package/dist/shared/dispatch/hostDispatchWall.js.map +0 -1
  784. package/dist/shared/dispatch/hybridDispatch.d.ts +0 -94
  785. package/dist/shared/dispatch/hybridDispatch.d.ts.map +0 -1
  786. package/dist/shared/dispatch/hybridDispatch.js +0 -60
  787. package/dist/shared/dispatch/hybridDispatch.js.map +0 -1
  788. package/dist/shared/dispatch/ownershipScheduler.d.ts +0 -101
  789. package/dist/shared/dispatch/ownershipScheduler.d.ts.map +0 -1
  790. package/dist/shared/dispatch/ownershipScheduler.js +0 -151
  791. package/dist/shared/dispatch/ownershipScheduler.js.map +0 -1
  792. package/dist/shared/dispatch/pathIdentity.d.ts.map +0 -1
  793. package/dist/shared/dispatch/pathIdentity.js.map +0 -1
  794. package/dist/shared/dispatch/providerDispatchPrep.d.ts +0 -65
  795. package/dist/shared/dispatch/providerDispatchPrep.d.ts.map +0 -1
  796. package/dist/shared/dispatch/providerDispatchPrep.js +0 -66
  797. package/dist/shared/dispatch/providerDispatchPrep.js.map +0 -1
  798. package/dist/shared/dispatch/providerLaunchFinalize.d.ts +0 -54
  799. package/dist/shared/dispatch/providerLaunchFinalize.d.ts.map +0 -1
  800. package/dist/shared/dispatch/providerLaunchFinalize.js +0 -275
  801. package/dist/shared/dispatch/providerLaunchFinalize.js.map +0 -1
  802. package/dist/shared/dispatch/rollingDispatch.d.ts +0 -598
  803. package/dist/shared/dispatch/rollingDispatch.d.ts.map +0 -1
  804. package/dist/shared/dispatch/rollingDispatch.js +0 -1488
  805. package/dist/shared/dispatch/rollingDispatch.js.map +0 -1
  806. package/dist/shared/dispatch/settledPools.d.ts +0 -55
  807. package/dist/shared/dispatch/settledPools.d.ts.map +0 -1
  808. package/dist/shared/dispatch/settledPools.js +0 -74
  809. package/dist/shared/dispatch/settledPools.js.map +0 -1
  810. package/dist/shared/dispatch/tierRank.d.ts +0 -53
  811. package/dist/shared/dispatch/tierRank.d.ts.map +0 -1
  812. package/dist/shared/dispatch/tierRank.js +0 -69
  813. package/dist/shared/dispatch/tierRank.js.map +0 -1
  814. package/dist/shared/dispatch/unifiedRolling.d.ts +0 -219
  815. package/dist/shared/dispatch/unifiedRolling.d.ts.map +0 -1
  816. package/dist/shared/dispatch/unifiedRolling.js +0 -214
  817. package/dist/shared/dispatch/unifiedRolling.js.map +0 -1
  818. package/dist/shared/friction/blindDispatchFriction.d.ts +0 -26
  819. package/dist/shared/friction/blindDispatchFriction.d.ts.map +0 -1
  820. package/dist/shared/friction/blindDispatchFriction.js +0 -41
  821. package/dist/shared/friction/blindDispatchFriction.js.map +0 -1
  822. package/dist/shared/io/tokenUsageLedger.d.ts +0 -58
  823. package/dist/shared/io/tokenUsageLedger.d.ts.map +0 -1
  824. package/dist/shared/io/tokenUsageLedger.js +0 -53
  825. package/dist/shared/io/tokenUsageLedger.js.map +0 -1
  826. package/dist/shared/providers/agyProvider.d.ts +0 -23
  827. package/dist/shared/providers/agyProvider.d.ts.map +0 -1
  828. package/dist/shared/providers/agyProvider.js +0 -63
  829. package/dist/shared/providers/agyProvider.js.map +0 -1
  830. package/dist/shared/providers/auditorSources.d.ts +0 -152
  831. package/dist/shared/providers/auditorSources.d.ts.map +0 -1
  832. package/dist/shared/providers/auditorSources.js +0 -391
  833. package/dist/shared/providers/auditorSources.js.map +0 -1
  834. package/dist/shared/providers/claudeCodeProvider.d.ts +0 -56
  835. package/dist/shared/providers/claudeCodeProvider.d.ts.map +0 -1
  836. package/dist/shared/providers/claudeCodeProvider.js +0 -67
  837. package/dist/shared/providers/claudeCodeProvider.js.map +0 -1
  838. package/dist/shared/providers/claudeWorkerProvider.d.ts +0 -71
  839. package/dist/shared/providers/claudeWorkerProvider.d.ts.map +0 -1
  840. package/dist/shared/providers/claudeWorkerProvider.js +0 -142
  841. package/dist/shared/providers/claudeWorkerProvider.js.map +0 -1
  842. package/dist/shared/providers/codexProvider.d.ts +0 -37
  843. package/dist/shared/providers/codexProvider.d.ts.map +0 -1
  844. package/dist/shared/providers/codexProvider.js +0 -85
  845. package/dist/shared/providers/codexProvider.js.map +0 -1
  846. package/dist/shared/providers/constants.d.ts +0 -4
  847. package/dist/shared/providers/constants.d.ts.map +0 -1
  848. package/dist/shared/providers/constants.js +0 -5
  849. package/dist/shared/providers/constants.js.map +0 -1
  850. package/dist/shared/providers/dispatchExclusion.d.ts +0 -44
  851. package/dist/shared/providers/dispatchExclusion.d.ts.map +0 -1
  852. package/dist/shared/providers/dispatchExclusion.js +0 -63
  853. package/dist/shared/providers/dispatchExclusion.js.map +0 -1
  854. package/dist/shared/providers/identity.d.ts +0 -48
  855. package/dist/shared/providers/identity.d.ts.map +0 -1
  856. package/dist/shared/providers/identity.js +0 -51
  857. package/dist/shared/providers/identity.js.map +0 -1
  858. package/dist/shared/providers/inProcessWorkers.d.ts +0 -42
  859. package/dist/shared/providers/inProcessWorkers.d.ts.map +0 -1
  860. package/dist/shared/providers/inProcessWorkers.js +0 -64
  861. package/dist/shared/providers/inProcessWorkers.js.map +0 -1
  862. package/dist/shared/providers/openAiCompatibleProvider.d.ts +0 -132
  863. package/dist/shared/providers/openAiCompatibleProvider.d.ts.map +0 -1
  864. package/dist/shared/providers/openAiCompatibleProvider.js +0 -875
  865. package/dist/shared/providers/openAiCompatibleProvider.js.map +0 -1
  866. package/dist/shared/providers/opencodeLaunch.d.ts +0 -30
  867. package/dist/shared/providers/opencodeLaunch.d.ts.map +0 -1
  868. package/dist/shared/providers/opencodeLaunch.js +0 -72
  869. package/dist/shared/providers/opencodeLaunch.js.map +0 -1
  870. package/dist/shared/providers/opencodeProvider.d.ts +0 -27
  871. package/dist/shared/providers/opencodeProvider.d.ts.map +0 -1
  872. package/dist/shared/providers/opencodeProvider.js +0 -63
  873. package/dist/shared/providers/opencodeProvider.js.map +0 -1
  874. package/dist/shared/providers/orchestratorBindings.d.ts +0 -75
  875. package/dist/shared/providers/orchestratorBindings.d.ts.map +0 -1
  876. package/dist/shared/providers/orchestratorBindings.js +0 -66
  877. package/dist/shared/providers/orchestratorBindings.js.map +0 -1
  878. package/dist/shared/providers/providerDiagnostics.d.ts +0 -11
  879. package/dist/shared/providers/providerDiagnostics.d.ts.map +0 -1
  880. package/dist/shared/providers/providerDiagnostics.js +0 -28
  881. package/dist/shared/providers/providerDiagnostics.js.map +0 -1
  882. package/dist/shared/providers/providerFactory.d.ts +0 -173
  883. package/dist/shared/providers/providerFactory.d.ts.map +0 -1
  884. package/dist/shared/providers/providerFactory.js +0 -374
  885. package/dist/shared/providers/providerFactory.js.map +0 -1
  886. package/dist/shared/providers/providerKeyedFactory.d.ts +0 -14
  887. package/dist/shared/providers/providerKeyedFactory.d.ts.map +0 -1
  888. package/dist/shared/providers/providerKeyedFactory.js +0 -16
  889. package/dist/shared/providers/providerKeyedFactory.js.map +0 -1
  890. package/dist/shared/providers/providerPathGuard.d.ts +0 -101
  891. package/dist/shared/providers/providerPathGuard.d.ts.map +0 -1
  892. package/dist/shared/providers/providerPathGuard.js +0 -177
  893. package/dist/shared/providers/providerPathGuard.js.map +0 -1
  894. package/dist/shared/providers/reviewSnapshot.d.ts +0 -55
  895. package/dist/shared/providers/reviewSnapshot.d.ts.map +0 -1
  896. package/dist/shared/providers/reviewSnapshot.js +0 -112
  897. package/dist/shared/providers/reviewSnapshot.js.map +0 -1
  898. package/dist/shared/providers/spawnLoggedCommand.d.ts +0 -10
  899. package/dist/shared/providers/spawnLoggedCommand.d.ts.map +0 -1
  900. package/dist/shared/providers/spawnLoggedCommand.js +0 -345
  901. package/dist/shared/providers/spawnLoggedCommand.js.map +0 -1
  902. package/dist/shared/providers/subprocessTemplateProvider.d.ts +0 -19
  903. package/dist/shared/providers/subprocessTemplateProvider.d.ts.map +0 -1
  904. package/dist/shared/providers/subprocessTemplateProvider.js +0 -91
  905. package/dist/shared/providers/subprocessTemplateProvider.js.map +0 -1
  906. package/dist/shared/providers/types.d.ts +0 -144
  907. package/dist/shared/providers/types.d.ts.map +0 -1
  908. package/dist/shared/providers/types.js +0 -2
  909. package/dist/shared/providers/types.js.map +0 -1
  910. package/dist/shared/providers/workerCommandProvider.d.ts +0 -10
  911. package/dist/shared/providers/workerCommandProvider.d.ts.map +0 -1
  912. package/dist/shared/providers/workerCommandProvider.js +0 -20
  913. package/dist/shared/providers/workerCommandProvider.js.map +0 -1
  914. package/dist/shared/providers/workerTaskLaunch.d.ts +0 -32
  915. package/dist/shared/providers/workerTaskLaunch.d.ts.map +0 -1
  916. package/dist/shared/providers/workerTaskLaunch.js +0 -27
  917. package/dist/shared/providers/workerTaskLaunch.js.map +0 -1
  918. package/dist/shared/quota/accountId.d.ts +0 -107
  919. package/dist/shared/quota/accountId.d.ts.map +0 -1
  920. package/dist/shared/quota/accountId.js +0 -151
  921. package/dist/shared/quota/accountId.js.map +0 -1
  922. package/dist/shared/quota/antigravityQuotaSource.d.ts +0 -44
  923. package/dist/shared/quota/antigravityQuotaSource.d.ts.map +0 -1
  924. package/dist/shared/quota/antigravityQuotaSource.js +0 -103
  925. package/dist/shared/quota/antigravityQuotaSource.js.map +0 -1
  926. package/dist/shared/quota/apiPool.d.ts +0 -322
  927. package/dist/shared/quota/apiPool.d.ts.map +0 -1
  928. package/dist/shared/quota/apiPool.js +0 -751
  929. package/dist/shared/quota/apiPool.js.map +0 -1
  930. package/dist/shared/quota/capacity.d.ts +0 -667
  931. package/dist/shared/quota/capacity.d.ts.map +0 -1
  932. package/dist/shared/quota/capacity.js +0 -507
  933. package/dist/shared/quota/capacity.js.map +0 -1
  934. package/dist/shared/quota/claimLease.d.ts +0 -32
  935. package/dist/shared/quota/claimLease.d.ts.map +0 -1
  936. package/dist/shared/quota/claimLease.js +0 -73
  937. package/dist/shared/quota/claimLease.js.map +0 -1
  938. package/dist/shared/quota/claimRegistry.d.ts +0 -118
  939. package/dist/shared/quota/claimRegistry.d.ts.map +0 -1
  940. package/dist/shared/quota/claimRegistry.js +0 -246
  941. package/dist/shared/quota/claimRegistry.js.map +0 -1
  942. package/dist/shared/quota/claudeCodeJsonLines.d.ts +0 -15
  943. package/dist/shared/quota/claudeCodeJsonLines.d.ts.map +0 -1
  944. package/dist/shared/quota/claudeCodeJsonLines.js +0 -34
  945. package/dist/shared/quota/claudeCodeJsonLines.js.map +0 -1
  946. package/dist/shared/quota/claudeOAuthQuotaSource.d.ts +0 -97
  947. package/dist/shared/quota/claudeOAuthQuotaSource.d.ts.map +0 -1
  948. package/dist/shared/quota/claudeOAuthQuotaSource.js +0 -385
  949. package/dist/shared/quota/claudeOAuthQuotaSource.js.map +0 -1
  950. package/dist/shared/quota/codexHostConfig.d.ts +0 -17
  951. package/dist/shared/quota/codexHostConfig.d.ts.map +0 -1
  952. package/dist/shared/quota/codexHostConfig.js +0 -43
  953. package/dist/shared/quota/codexHostConfig.js.map +0 -1
  954. package/dist/shared/quota/codexQuotaSource.d.ts +0 -52
  955. package/dist/shared/quota/codexQuotaSource.d.ts.map +0 -1
  956. package/dist/shared/quota/codexQuotaSource.js +0 -106
  957. package/dist/shared/quota/codexQuotaSource.js.map +0 -1
  958. package/dist/shared/quota/compositeQuotaSource.d.ts +0 -83
  959. package/dist/shared/quota/compositeQuotaSource.d.ts.map +0 -1
  960. package/dist/shared/quota/compositeQuotaSource.js +0 -152
  961. package/dist/shared/quota/compositeQuotaSource.js.map +0 -1
  962. package/dist/shared/quota/copilotQuotaSource.d.ts +0 -57
  963. package/dist/shared/quota/copilotQuotaSource.d.ts.map +0 -1
  964. package/dist/shared/quota/copilotQuotaSource.js +0 -143
  965. package/dist/shared/quota/copilotQuotaSource.js.map +0 -1
  966. package/dist/shared/quota/coverage.d.ts +0 -45
  967. package/dist/shared/quota/coverage.d.ts.map +0 -1
  968. package/dist/shared/quota/coverage.js +0 -77
  969. package/dist/shared/quota/coverage.js.map +0 -1
  970. package/dist/shared/quota/dispatchDriverPrompt.d.ts +0 -15
  971. package/dist/shared/quota/dispatchDriverPrompt.d.ts.map +0 -1
  972. package/dist/shared/quota/dispatchDriverPrompt.js +0 -40
  973. package/dist/shared/quota/dispatchDriverPrompt.js.map +0 -1
  974. package/dist/shared/quota/errorParsers/claudeCodeErrorParser.d.ts +0 -7
  975. package/dist/shared/quota/errorParsers/claudeCodeErrorParser.d.ts.map +0 -1
  976. package/dist/shared/quota/errorParsers/claudeCodeErrorParser.js +0 -33
  977. package/dist/shared/quota/errorParsers/claudeCodeErrorParser.js.map +0 -1
  978. package/dist/shared/quota/errorParsers/genericErrorParser.d.ts +0 -10
  979. package/dist/shared/quota/errorParsers/genericErrorParser.d.ts.map +0 -1
  980. package/dist/shared/quota/errorParsers/genericErrorParser.js +0 -8
  981. package/dist/shared/quota/errorParsers/genericErrorParser.js.map +0 -1
  982. package/dist/shared/quota/errorParsers/index.d.ts +0 -6
  983. package/dist/shared/quota/errorParsers/index.d.ts.map +0 -1
  984. package/dist/shared/quota/errorParsers/index.js +0 -16
  985. package/dist/shared/quota/errorParsers/index.js.map +0 -1
  986. package/dist/shared/quota/errorParsing.d.ts +0 -97
  987. package/dist/shared/quota/errorParsing.d.ts.map +0 -1
  988. package/dist/shared/quota/errorParsing.js +0 -333
  989. package/dist/shared/quota/errorParsing.js.map +0 -1
  990. package/dist/shared/quota/fileLock.d.ts.map +0 -1
  991. package/dist/shared/quota/fileLock.js.map +0 -1
  992. package/dist/shared/quota/hostLimits.d.ts +0 -31
  993. package/dist/shared/quota/hostLimits.d.ts.map +0 -1
  994. package/dist/shared/quota/hostLimits.js +0 -74
  995. package/dist/shared/quota/hostLimits.js.map +0 -1
  996. package/dist/shared/quota/hostPool.d.ts +0 -115
  997. package/dist/shared/quota/hostPool.d.ts.map +0 -1
  998. package/dist/shared/quota/hostPool.js +0 -104
  999. package/dist/shared/quota/hostPool.js.map +0 -1
  1000. package/dist/shared/quota/hostSessionQuotaSource.d.ts +0 -150
  1001. package/dist/shared/quota/hostSessionQuotaSource.d.ts.map +0 -1
  1002. package/dist/shared/quota/hostSessionQuotaSource.js +0 -250
  1003. package/dist/shared/quota/hostSessionQuotaSource.js.map +0 -1
  1004. package/dist/shared/quota/httpQuotaSource.d.ts +0 -122
  1005. package/dist/shared/quota/httpQuotaSource.d.ts.map +0 -1
  1006. package/dist/shared/quota/httpQuotaSource.js +0 -155
  1007. package/dist/shared/quota/httpQuotaSource.js.map +0 -1
  1008. package/dist/shared/quota/learnedQuotaSource.d.ts +0 -20
  1009. package/dist/shared/quota/learnedQuotaSource.d.ts.map +0 -1
  1010. package/dist/shared/quota/learnedQuotaSource.js +0 -46
  1011. package/dist/shared/quota/learnedQuotaSource.js.map +0 -1
  1012. package/dist/shared/quota/limits.d.ts +0 -55
  1013. package/dist/shared/quota/limits.d.ts.map +0 -1
  1014. package/dist/shared/quota/limits.js +0 -164
  1015. package/dist/shared/quota/limits.js.map +0 -1
  1016. package/dist/shared/quota/modelStatics.d.ts +0 -32
  1017. package/dist/shared/quota/modelStatics.d.ts.map +0 -1
  1018. package/dist/shared/quota/modelStatics.js +0 -117
  1019. package/dist/shared/quota/modelStatics.js.map +0 -1
  1020. package/dist/shared/quota/openCodeQuotaSource.d.ts +0 -18
  1021. package/dist/shared/quota/openCodeQuotaSource.d.ts.map +0 -1
  1022. package/dist/shared/quota/openCodeQuotaSource.js +0 -84
  1023. package/dist/shared/quota/openCodeQuotaSource.js.map +0 -1
  1024. package/dist/shared/quota/packetCost.d.ts +0 -27
  1025. package/dist/shared/quota/packetCost.d.ts.map +0 -1
  1026. package/dist/shared/quota/packetCost.js +0 -45
  1027. package/dist/shared/quota/packetCost.js.map +0 -1
  1028. package/dist/shared/quota/quotaCoverageNudge.d.ts +0 -26
  1029. package/dist/shared/quota/quotaCoverageNudge.d.ts.map +0 -1
  1030. package/dist/shared/quota/quotaCoverageNudge.js +0 -82
  1031. package/dist/shared/quota/quotaCoverageNudge.js.map +0 -1
  1032. package/dist/shared/quota/quotaSource.d.ts +0 -224
  1033. package/dist/shared/quota/quotaSource.d.ts.map +0 -1
  1034. package/dist/shared/quota/quotaSource.js +0 -125
  1035. package/dist/shared/quota/quotaSource.js.map +0 -1
  1036. package/dist/shared/quota/recordStore.d.ts +0 -25
  1037. package/dist/shared/quota/recordStore.d.ts.map +0 -1
  1038. package/dist/shared/quota/recordStore.js +0 -65
  1039. package/dist/shared/quota/recordStore.js.map +0 -1
  1040. package/dist/shared/quota/reservationLedger.d.ts +0 -183
  1041. package/dist/shared/quota/reservationLedger.d.ts.map +0 -1
  1042. package/dist/shared/quota/reservationLedger.js +0 -319
  1043. package/dist/shared/quota/reservationLedger.js.map +0 -1
  1044. package/dist/shared/quota/scheduler.d.ts +0 -262
  1045. package/dist/shared/quota/scheduler.d.ts.map +0 -1
  1046. package/dist/shared/quota/scheduler.js +0 -628
  1047. package/dist/shared/quota/scheduler.js.map +0 -1
  1048. package/dist/shared/quota/slidingWindow.d.ts +0 -5
  1049. package/dist/shared/quota/slidingWindow.d.ts.map +0 -1
  1050. package/dist/shared/quota/slidingWindow.js +0 -29
  1051. package/dist/shared/quota/slidingWindow.js.map +0 -1
  1052. package/dist/shared/quota/state.d.ts +0 -204
  1053. package/dist/shared/quota/state.d.ts.map +0 -1
  1054. package/dist/shared/quota/state.js +0 -480
  1055. package/dist/shared/quota/state.js.map +0 -1
  1056. package/dist/shared/quota/tokenBudgetView.d.ts +0 -17
  1057. package/dist/shared/quota/tokenBudgetView.d.ts.map +0 -1
  1058. package/dist/shared/quota/tokenBudgetView.js +0 -77
  1059. package/dist/shared/quota/tokenBudgetView.js.map +0 -1
  1060. package/dist/shared/quota/types.d.ts +0 -235
  1061. package/dist/shared/quota/types.d.ts.map +0 -1
  1062. package/dist/shared/quota/types.js +0 -58
  1063. package/dist/shared/quota/types.js.map +0 -1
  1064. package/dist/shared/quota/windowConstraints.d.ts +0 -56
  1065. package/dist/shared/quota/windowConstraints.d.ts.map +0 -1
  1066. package/dist/shared/quota/windowConstraints.js +0 -71
  1067. package/dist/shared/quota/windowConstraints.js.map +0 -1
  1068. package/dist/shared/repair/brokeredDispatch.d.ts +0 -151
  1069. package/dist/shared/repair/brokeredDispatch.d.ts.map +0 -1
  1070. package/dist/shared/repair/brokeredDispatch.js +0 -182
  1071. package/dist/shared/repair/brokeredDispatch.js.map +0 -1
  1072. package/dist/shared/repair/emitValidateRepair.d.ts +0 -124
  1073. package/dist/shared/repair/emitValidateRepair.d.ts.map +0 -1
  1074. package/dist/shared/repair/emitValidateRepair.js +0 -180
  1075. package/dist/shared/repair/emitValidateRepair.js.map +0 -1
  1076. package/dist/shared/repair/index.d.ts +0 -10
  1077. package/dist/shared/repair/index.d.ts.map +0 -1
  1078. package/dist/shared/repair/index.js +0 -3
  1079. package/dist/shared/repair/index.js.map +0 -1
  1080. package/dist/shared/rolling/pausedState.d.ts +0 -201
  1081. package/dist/shared/rolling/pausedState.d.ts.map +0 -1
  1082. package/dist/shared/rolling/pausedState.js +0 -197
  1083. package/dist/shared/rolling/pausedState.js.map +0 -1
  1084. package/dist/shared/types/attributionContract.d.ts +0 -198
  1085. package/dist/shared/types/attributionContract.d.ts.map +0 -1
  1086. package/dist/shared/types/attributionContract.js +0 -332
  1087. package/dist/shared/types/attributionContract.js.map +0 -1
  1088. package/dist/shared/types/auditorDescriptor.d.ts +0 -119
  1089. package/dist/shared/types/auditorDescriptor.d.ts.map +0 -1
  1090. package/dist/shared/types/auditorDescriptor.js +0 -29
  1091. package/dist/shared/types/auditorDescriptor.js.map +0 -1
  1092. package/dist/shared/types/rollingDispatch.d.ts +0 -222
  1093. package/dist/shared/types/rollingDispatch.d.ts.map +0 -1
  1094. package/dist/shared/types/rollingDispatch.js +0 -19
  1095. package/dist/shared/types/rollingDispatch.js.map +0 -1
  1096. package/dist/shared/types/sessionConfig.d.ts +0 -778
  1097. package/dist/shared/types/sessionConfig.d.ts.map +0 -1
  1098. package/dist/shared/types/sessionConfig.js +0 -393
  1099. package/dist/shared/types/sessionConfig.js.map +0 -1
  1100. package/dist/shared/validation/sessionConfig.d.ts +0 -59
  1101. package/dist/shared/validation/sessionConfig.d.ts.map +0 -1
  1102. package/dist/shared/validation/sessionConfig.js +0 -631
  1103. package/dist/shared/validation/sessionConfig.js.map +0 -1
  1104. /package/dist/shared/{quota → io}/fileLock.d.ts +0 -0
  1105. /package/dist/shared/{quota → io}/fileLock.js +0 -0
  1106. /package/dist/shared/{dispatch → io}/pathIdentity.d.ts +0 -0
  1107. /package/dist/shared/{dispatch → io}/pathIdentity.js +0 -0
@@ -1,515 +0,0 @@
1
- /**
2
- * OwnershipRegistry — tracks which DAG node owns which file paths (write-scope
3
- * declared in its contract). Used by the rolling-dispatch loop to gate
4
- * amendment claims: a worker that discovers a necessary edit outside its declared
5
- * contract scope may unilaterally extend write-scope ONLY into unowned files.
6
- *
7
- * Atomicity: claim registration is a synchronous in-memory CAS within a
8
- * single-threaded orchestrator (no TOCTOU). The registry is checkpointed to
9
- * `dispatch/ownership-registry.json` after each mutation so it survives a restart.
10
- * Stale in-flight claims (node ID not in the current implementation DAG) are
11
- * purged on load.
12
- */
13
- import { writeFileSync, readFileSync, mkdirSync } from "node:fs";
14
- import { dirname } from "node:path";
15
- // Path canonicalization for ownership identity (INV-SOO-09) is single-sourced in
16
- // `audit-tools/shared` so both orchestrators' scheduling key file identity the same
17
- // way. Re-exported here for this module's existing consumers.
18
- import { canonicalizeFilePath } from "audit-tools/shared";
19
- export { canonicalizeFilePath };
20
- /**
21
- * Single source of truth for INV-SOO-10: whether `disposition` RELEASES the
22
- * node's in-flight file claim. A redispatch (CE-007) and a triage-retry hand-off
23
- * (CE-006) are explicitly claim-RETAINING — the key stays held by the node across
24
- * the re-emit / recomputation window so the re-run can never run boundary-ungated
25
- * alongside a foreign same-file writer. The enumeration is exhaustive (a `never`
26
- * fallthrough keeps it in lockstep with `NodeClaimDisposition`).
27
- */
28
- export function isReleasingDisposition(disposition) {
29
- switch (disposition) {
30
- case "merged":
31
- case "blocked_final":
32
- case "abandoned":
33
- case "failed_no_retry":
34
- case "no_op_satisfied":
35
- return true;
36
- case "blocked_pending_triage":
37
- case "triage_retry_handoff":
38
- case "redispatch":
39
- return false;
40
- default: {
41
- const _exhaustive = disposition;
42
- return _exhaustive;
43
- }
44
- }
45
- }
46
- /**
47
- * OwnershipRegistry tracks write-scope ownership per DAG node.
48
- *
49
- * Initialization:
50
- * const registry = new OwnershipRegistry(checkpointPath);
51
- * registry.initialize(dagNodes); // call once before dispatching
52
- *
53
- * Per-node lifecycle:
54
- * const claim = registry.claimAmendment(nodeId, path);
55
- * // on merge or triage:
56
- * registry.releaseAmendments(nodeId);
57
- */
58
- export class OwnershipRegistry {
59
- /** nodeId → paths from the node's original contract scope */
60
- contractScopes = new Map();
61
- /**
62
- * path → nodeId: which live parallel sibling (dispatched, not yet merged) has
63
- * claimed this path via an amendment.
64
- */
65
- amendmentClaims = new Map();
66
- /**
67
- * canonical path → nodeId: scheduling-time in-flight WRITER claim. Lifted from
68
- * the merge-time amendment signal into scheduling-time admission (INV-SOO):
69
- * the rolling scheduler holds at most one in-flight writer per canonical path,
70
- * so same-file nodes serialize while different-file nodes parallelize. Keyed by
71
- * `canonicalizeFilePath` so all spellings of one file collide (INV-SOO-09).
72
- */
73
- inFlightClaims = new Map();
74
- /** Optional path for checkpoint persistence. When provided, every mutation
75
- * atomically writes the registry state to this path. */
76
- checkpointPath;
77
- /** Repo root for canonicalizing relative scope/claim paths to physical identity. */
78
- root;
79
- constructor(checkpointPath, root) {
80
- this.checkpointPath = checkpointPath;
81
- this.root = root;
82
- }
83
- /** Canonicalize a path to physical-file identity under this registry's root. */
84
- canon(path) {
85
- return canonicalizeFilePath(path, { root: this.root });
86
- }
87
- /**
88
- * Initialize the registry from the implementation DAG nodes. Each node's
89
- * `affected_files` (or `write_paths`) constitutes its contract scope.
90
- * Call once before any node is dispatched.
91
- */
92
- initialize(nodes) {
93
- this.contractScopes.clear();
94
- this.amendmentClaims.clear();
95
- for (const node of nodes) {
96
- const paths = node.affected_files ?? node.write_paths ?? [];
97
- this.contractScopes.set(node.node_id, new Set(paths));
98
- }
99
- this._persist();
100
- }
101
- /**
102
- * Attempt to claim `path` for `nodeId` as an amendment (write outside the
103
- * node's original contract scope).
104
- *
105
- * Returns:
106
- * - `'granted'` — path was unowned and uncontended; claim is recorded.
107
- * - `'owned'` — path is in another node's contract scope; routes to seam protocol.
108
- * - `'contended'` — path has been claimed by a live parallel sibling; routes to seam protocol.
109
- */
110
- claimAmendment(nodeId, path) {
111
- const key = this.canon(path);
112
- // Check if path is in any OTHER node's contract scope (canonical identity).
113
- for (const [scopeNodeId, scopePaths] of this.contractScopes) {
114
- if (scopeNodeId !== nodeId && this._scopeHasCanonical(scopePaths, key)) {
115
- return "owned";
116
- }
117
- }
118
- // Check if path has already been amendment-claimed by a live parallel sibling
119
- // (canonical identity, so a differently-spelled same file collides).
120
- const existingClaimant = this._amendmentClaimantByCanonical(key);
121
- if (existingClaimant !== undefined && existingClaimant !== nodeId) {
122
- return "contended";
123
- }
124
- // Grant-time disjointness (INV-SOO-06 / CE-001): refuse a scope-widening grant
125
- // onto a file another in-flight node is actively writing, so a post-admission
126
- // grant can never make the in-flight owned-file union non-disjoint.
127
- const inFlightOwner = this.inFlightClaims.get(key);
128
- if (inFlightOwner !== undefined && inFlightOwner !== nodeId) {
129
- return "contended";
130
- }
131
- // Grant: record the claim under the ORIGINAL spelling (merge attribution reads
132
- // the raw path); canonical identity is applied on comparison, not on storage.
133
- this.amendmentClaims.set(path, nodeId);
134
- this._persist();
135
- return "granted";
136
- }
137
- /** The node holding an amendment claim whose canonical key matches `canonicalKey`. */
138
- _amendmentClaimantByCanonical(canonicalKey) {
139
- for (const [p, claimant] of this.amendmentClaims) {
140
- if (this.canon(p) === canonicalKey)
141
- return claimant;
142
- }
143
- return undefined;
144
- }
145
- /** Whether a contract-scope set contains a path with the given canonical key. */
146
- _scopeHasCanonical(scopePaths, canonicalKey) {
147
- for (const p of scopePaths) {
148
- if (this.canon(p) === canonicalKey)
149
- return true;
150
- }
151
- return false;
152
- }
153
- /**
154
- * Release all amendment claims for `nodeId`. Call when a node finishes
155
- * (merge or triage). Makes the previously claimed files available again.
156
- */
157
- releaseAmendments(nodeId) {
158
- let changed = false;
159
- for (const [path, claimant] of this.amendmentClaims) {
160
- if (claimant === nodeId) {
161
- this.amendmentClaims.delete(path);
162
- changed = true;
163
- }
164
- }
165
- if (changed) {
166
- this._persist();
167
- }
168
- }
169
- /**
170
- * Returns the union of the node's original contract `affected_files` and its
171
- * granted amendment claims — used to re-derive the write-scope for verification
172
- * and blast-radius attribution.
173
- */
174
- getScope(nodeId) {
175
- const contractPaths = this.contractScopes.get(nodeId) ?? new Set();
176
- const amendmentPaths = [];
177
- for (const [path, claimant] of this.amendmentClaims) {
178
- if (claimant === nodeId) {
179
- amendmentPaths.push(path);
180
- }
181
- }
182
- return [...contractPaths, ...amendmentPaths];
183
- }
184
- /**
185
- * Return the node ID that owns this path via contract scope, or undefined if
186
- * the path is unowned.
187
- */
188
- contractOwner(path) {
189
- const key = this.canon(path);
190
- for (const [nodeId, scopePaths] of this.contractScopes) {
191
- if (this._scopeHasCanonical(scopePaths, key))
192
- return nodeId;
193
- }
194
- return undefined;
195
- }
196
- /**
197
- * Return the node ID that has an in-flight amendment claim for this path, or
198
- * undefined if uncontended. Canonical identity (INV-SOO-09).
199
- */
200
- amendmentClaimant(path) {
201
- // Exact-spelling hit first (cheap), else canonical match.
202
- return (this.amendmentClaims.get(path) ??
203
- this._amendmentClaimantByCanonical(this.canon(path)));
204
- }
205
- // ── Scheduling-time file-ownership queries (INV-SOO) ───────────────────────
206
- /**
207
- * Canonical write-scope of a node for scheduling: its contract scope ∪ live
208
- * amendment claims, each canonicalized to physical-file identity (INV-SOO-09).
209
- */
210
- canonicalScope(nodeId) {
211
- const out = new Set();
212
- for (const p of this.contractScopes.get(nodeId) ?? [])
213
- out.add(this.canon(p));
214
- for (const [key, claimant] of this.amendmentClaims) {
215
- if (claimant === nodeId)
216
- out.add(key);
217
- }
218
- return out;
219
- }
220
- /**
221
- * The union of canonical file paths owned by currently in-flight nodes (their
222
- * scheduling claims). The scheduling-time complement of the merge-time owner
223
- * signal — a path in this set has a live writer, so a same-file node must wait
224
- * (INV-SOO-01).
225
- */
226
- filesClaimedByInFlight() {
227
- return new Set(this.inFlightClaims.keys());
228
- }
229
- /** The node holding the in-flight scheduling claim on `path`, or undefined. */
230
- inFlightOwner(path) {
231
- return this.inFlightClaims.get(this.canon(path));
232
- }
233
- /**
234
- * Whether `nodeId`'s declared write-scope is file-ownership-DISJOINT from the
235
- * current in-flight set — i.e. it shares no canonical path with any OTHER
236
- * in-flight node, so it can be admitted without two in-flight writers per file
237
- * (INV-SOO-01).
238
- *
239
- * Conservative empty-scope gating (INV-SOO-01 / CE-008): a node whose declared
240
- * scope canonicalizes to the EMPTY set (unresolved/undeclared) is treated as
241
- * NON-disjoint — it is NOT admitted as vacuously-disjoint, because an
242
- * under-declared writer could collide with anything. Such a node admits only
243
- * when no other node is in flight (`requireSoloWhenEmpty`).
244
- */
245
- isFileOwnershipDisjoint(nodeId, declaredScope) {
246
- const scope = new Set();
247
- for (const p of declaredScope)
248
- scope.add(this.canon(p));
249
- if (scope.size === 0) {
250
- // Empty/unresolved scope: disjoint only if nothing else is in flight.
251
- for (const owner of this.inFlightClaims.values()) {
252
- if (owner !== nodeId)
253
- return false;
254
- }
255
- return true;
256
- }
257
- for (const key of scope) {
258
- const owner = this.inFlightClaims.get(key);
259
- if (owner !== undefined && owner !== nodeId)
260
- return false;
261
- }
262
- return true;
263
- }
264
- /**
265
- * Record `nodeId`'s scheduling-time in-flight WRITER claim over `paths`
266
- * (declared scope, canonicalized). Idempotent for a node re-claiming its own
267
- * paths (a rate-limited re-queue). Call BEFORE dispatching the node.
268
- */
269
- claimInFlight(nodeId, paths) {
270
- let changed = false;
271
- for (const p of paths) {
272
- const key = this.canon(p);
273
- const existing = this.inFlightClaims.get(key);
274
- if (existing === nodeId)
275
- continue;
276
- // Caller guarantees disjointness via isFileOwnershipDisjoint; a foreign
277
- // owner here is a precondition violation, surfaced rather than overwritten.
278
- if (existing !== undefined && existing !== nodeId) {
279
- throw new Error(`OwnershipRegistry.claimInFlight: ${key} already in-flight by ${existing}, ` +
280
- `cannot claim for ${nodeId} (file-ownership-disjoint precondition violated).`);
281
- }
282
- this.inFlightClaims.set(key, nodeId);
283
- changed = true;
284
- }
285
- if (changed)
286
- this._persist();
287
- }
288
- /**
289
- * Release `nodeId`'s scheduling-time in-flight claims (and any amendment claims
290
- * it holds). Call on a RELEASING disposition (INV-SOO-10):
291
- * blocked-final / abandoned / merged / failed-no-retry / no-op-satisfied. A
292
- * blocked-PENDING-triage node is still live and must NOT call this — it retains.
293
- */
294
- releaseInFlight(nodeId) {
295
- let changed = false;
296
- for (const [key, owner] of this.inFlightClaims) {
297
- if (owner === nodeId) {
298
- this.inFlightClaims.delete(key);
299
- changed = true;
300
- }
301
- }
302
- if (changed)
303
- this._persist();
304
- }
305
- /**
306
- * Atomic triage-retry claim hand-off A→A' (INV-SOO-07): transfer all of the
307
- * failed node's in-flight + amendment claims to its successor in one step, so
308
- * there is no observable window in which both hold the file, nor one in which a
309
- * foreign same-file node is admitted between release and re-claim. A no-op when
310
- * `fromNodeId === toNodeId`.
311
- */
312
- handoffInFlight(fromNodeId, toNodeId) {
313
- if (fromNodeId === toNodeId)
314
- return;
315
- let changed = false;
316
- for (const [key, owner] of this.inFlightClaims) {
317
- if (owner === fromNodeId) {
318
- this.inFlightClaims.set(key, toNodeId);
319
- changed = true;
320
- }
321
- }
322
- for (const [key, owner] of this.amendmentClaims) {
323
- if (owner === fromNodeId) {
324
- this.amendmentClaims.set(key, toNodeId);
325
- changed = true;
326
- }
327
- }
328
- if (changed)
329
- this._persist();
330
- }
331
- /**
332
- * Redispatch of an in-flight node (CE-007 / INV-SOO-10): an M4
333
- * RepairOutcome.redispatch re-emits the SAME node without releasing its claim.
334
- * This is a claim-RETAINING disposition — `nodeId` keeps every in-flight +
335
- * amendment claim it holds across the re-emit, so the re-run cannot be admitted
336
- * boundary-ungated alongside a foreign same-file writer. A no-op on the registry
337
- * by construction (the claim is simply not released); this named affordance
338
- * exists so callers route a redispatch through it (and `isReleasingDisposition`)
339
- * rather than reasoning about claim retention by hand. Verifies the node still
340
- * holds a live claim so a redispatch of an already-released node surfaces as a
341
- * precondition violation instead of silently running ungated.
342
- */
343
- redispatchInFlight(nodeId) {
344
- for (const owner of this.inFlightClaims.values()) {
345
- if (owner === nodeId)
346
- return; // still holds at least one claim — retained.
347
- }
348
- for (const owner of this.amendmentClaims.values()) {
349
- if (owner === nodeId)
350
- return;
351
- }
352
- throw new Error(`OwnershipRegistry.redispatchInFlight: ${nodeId} holds no live claim; ` +
353
- `a redispatch must retain an existing claim (claim-retaining disposition, CE-007). ` +
354
- `Re-claim via claimInFlight before redispatching.`);
355
- }
356
- /**
357
- * Apply a node's terminal-for-this-pass disposition to its claim lifecycle in
358
- * one call (INV-SOO-10). A releasing disposition frees the claim; a
359
- * claim-retaining one leaves it held. Single entry-point so the release-vs-retain
360
- * decision is never re-derived by callers (auditor-agnostic robustness). For a
361
- * `triage_retry_handoff` pass the successor id via `toNodeId` so the claim is
362
- * atomically transferred (CE-006) rather than released-then-reclaimed.
363
- */
364
- applyDisposition(nodeId, disposition, toNodeId) {
365
- if (disposition === "triage_retry_handoff") {
366
- this.handoffInFlight(nodeId, toNodeId ?? nodeId);
367
- return;
368
- }
369
- if (isReleasingDisposition(disposition)) {
370
- this.releaseInFlight(nodeId);
371
- this.releaseAmendments(nodeId);
372
- }
373
- // blocked_pending_triage / redispatch: claim-retaining — leave it held.
374
- }
375
- /** Serialize to a plain JSON-safe object. */
376
- serialize() {
377
- const contractScopes = {};
378
- for (const [nodeId, paths] of this.contractScopes) {
379
- contractScopes[nodeId] = [...paths];
380
- }
381
- const amendmentClaims = {};
382
- // Group by nodeId for storage: Record<nodeId, path[]>
383
- const byNode = new Map();
384
- for (const [path, nodeId] of this.amendmentClaims) {
385
- if (!byNode.has(nodeId))
386
- byNode.set(nodeId, []);
387
- byNode.get(nodeId).push(path);
388
- }
389
- for (const [nodeId, paths] of byNode) {
390
- amendmentClaims[nodeId] = paths;
391
- }
392
- const inFlightClaims = {};
393
- for (const [key, nodeId] of this.inFlightClaims) {
394
- inFlightClaims[key] = nodeId;
395
- }
396
- return {
397
- contractScopes,
398
- amendmentClaims,
399
- inFlightClaims,
400
- ...(this.root !== undefined ? { root: this.root } : {}),
401
- };
402
- }
403
- /**
404
- * Restore an OwnershipRegistry from a serialized JSON object.
405
- * `knownNodeIds` is the set of node IDs in the current implementation DAG;
406
- * any in-flight (scheduling or amendment) claim for a node NOT in this set
407
- * is purged (stale). The canonicalization root round-trips from the payload
408
- * (INV-SOO-09) so restored comparisons key file identity identically.
409
- */
410
- static fromJson(json, knownNodeIds, checkpointPath) {
411
- const registry = new OwnershipRegistry(checkpointPath, json.root);
412
- for (const [nodeId, paths] of Object.entries(json.contractScopes)) {
413
- registry.contractScopes.set(nodeId, new Set(paths));
414
- }
415
- // Restore amendment claims; purge stale ones whose node is no longer in DAG.
416
- for (const [nodeId, paths] of Object.entries(json.amendmentClaims)) {
417
- if (!knownNodeIds.has(nodeId)) {
418
- // Stale node — drop all its amendment claims.
419
- continue;
420
- }
421
- for (const path of paths) {
422
- registry.amendmentClaims.set(path, nodeId);
423
- }
424
- }
425
- // Restore the scheduling-time in-flight writer claims (INV-SOO-01 restart
426
- // survival); purge claims held by nodes no longer in the DAG.
427
- for (const [key, nodeId] of Object.entries(json.inFlightClaims ?? {})) {
428
- if (!knownNodeIds.has(nodeId))
429
- continue;
430
- registry.inFlightClaims.set(key, nodeId);
431
- }
432
- return registry;
433
- }
434
- /**
435
- * PERSIST-LOCKING-DISJUNCTION-RESOLUTION (CP-NODE-2 invariants[7]) — branch (b).
436
- *
437
- * The disjunction required EITHER (a) routing this checkpoint write through
438
- * the shared async locked-JSON persistence path (src/shared/io/lockedJsonStore.ts,
439
- * built on the async `withFileLock`), OR (b) a recorded finding that
440
- * single-writer discipline genuinely holds for `ownership-registry.json`.
441
- *
442
- * Branch (a) is not implementable in this module's granted write scope: the
443
- * shared locked-JSON store has no synchronous entry point, while `_persist`
444
- * is called synchronously from six in-class mutators (`initialize`,
445
- * `claimAmendment`, `releaseAmendments`, `claimInFlight`, `releaseInFlight`,
446
- * `handoffInFlight`) whose own callers — `src/remediate/dispatch/amendmentClaim.ts`,
447
- * `src/remediate/steps/dispatch/marshal.ts`, `src/remediate/steps/dispatch/writeScope.ts`
448
- * — consume the synchronous return/throw semantics directly and sit outside
449
- * this contract's file scope. Converting `_persist` to async would also turn
450
- * `claimInFlight`'s synchronous disjointness-violation throw into a rejected
451
- * promise, changing failure semantics those callers depend on. Minting a
452
- * second, synchronous locking primitive alongside the shared async one is
453
- * forbidden regardless.
454
- *
455
- * Branch (b), taken here: single-writer discipline holds — trivially, because
456
- * checkpoint persistence has no live writer in production today. Evidence
457
- * (re-verify with the same greps before ever relying on this holding):
458
- * - `grep -rn "new OwnershipRegistry(" src/` finds exactly two production
459
- * instantiation sites — `src/remediate/steps/dispatch/marshal.ts` ("a
460
- * lightweight ownership registry ... interim path, until rollingDispatch
461
- * replaces this") and `src/remediate/steps/dispatch/writeScope.ts` (an
462
- * "ephemeral OwnershipRegistry") — both zero-argument, so `checkpointPath`
463
- * is `undefined` and the early-return below makes this method a no-op on
464
- * every current production call.
465
- * - `OwnershipRegistry.loadFromCheckpoint` (the only reader of a persisted
466
- * checkpoint) has zero production callers.
467
- * So there is no live writer — concurrent or solo — to the checkpoint file
468
- * today. Should a future caller (e.g. the rolling-dispatch engine the
469
- * marshal.ts comment anticipates) start passing a real `checkpointPath`, it
470
- * would drive from the single in-process synchronous scheduling loop this
471
- * file's own header already documents ("Atomicity: ... a single-threaded
472
- * orchestrator") — so single-writer discipline would continue to hold
473
- * structurally, not merely by absence of wiring. Re-run the greps above
474
- * before wiring a second `checkpointPath`-bearing caller.
475
- *
476
- * UNCONDITIONALLY on either branch: a persist failure must reach the caller
477
- * instead of being swallowed. This method previously caught the write error
478
- * and only logged it to stderr, leaving the in-memory registry silently
479
- * ahead of disk so a restart lost every claim since the last successful
480
- * persist. It no longer catches: an `mkdirSync`/`writeFileSync` failure now
481
- * propagates straight out of `_persist` and its six mutator callers.
482
- */
483
- _persist() {
484
- if (!this.checkpointPath)
485
- return;
486
- const json = JSON.stringify(this.serialize(), null, 2) + "\n";
487
- mkdirSync(dirname(this.checkpointPath), { recursive: true });
488
- writeFileSync(this.checkpointPath, json, "utf8");
489
- }
490
- /** Load from a checkpoint file; returns undefined if the file doesn't exist or can't be parsed. */
491
- static loadFromCheckpoint(checkpointPath, knownNodeIds) {
492
- let raw;
493
- try {
494
- raw = readFileSync(checkpointPath, "utf8");
495
- }
496
- catch {
497
- return undefined;
498
- }
499
- let json;
500
- try {
501
- json = JSON.parse(raw);
502
- }
503
- catch {
504
- return undefined;
505
- }
506
- if (typeof json !== "object" ||
507
- json === null ||
508
- !("contractScopes" in json) ||
509
- !("amendmentClaims" in json)) {
510
- return undefined;
511
- }
512
- return OwnershipRegistry.fromJson(json, knownNodeIds, checkpointPath);
513
- }
514
- }
515
- //# sourceMappingURL=ownershipRegistry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ownershipRegistry.js","sourceRoot":"","sources":["../../../src/remediate/dispatch/ownershipRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,iFAAiF;AACjF,oFAAoF;AACpF,8DAA8D;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAqBhC;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,WAAiC;IACtE,QAAQ,WAAW,EAAE,CAAC;QACpB,KAAK,QAAQ,CAAC;QACd,KAAK,eAAe,CAAC;QACrB,KAAK,WAAW,CAAC;QACjB,KAAK,iBAAiB,CAAC;QACvB,KAAK,iBAAiB;YACpB,OAAO,IAAI,CAAC;QACd,KAAK,wBAAwB,CAAC;QAC9B,KAAK,sBAAsB,CAAC;QAC5B,KAAK,YAAY;YACf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C;QACD,IAAI,IAAa,CAAC;QAClB,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,IACE,OAAO,IAAI,KAAK,QAAQ;YACxB,IAAI,KAAK,IAAI;YACb,CAAC,CAAC,gBAAgB,IAAI,IAAI,CAAC;YAC3B,CAAC,CAAC,iBAAiB,IAAI,IAAI,CAAC,EAC5B,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,iBAAiB,CAAC,QAAQ,CAAC,IAA6B,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;IACjG,CAAC;CACF"}
@@ -1,21 +0,0 @@
1
- import type { OrchestratorOptions } from "../types/options.js";
2
- import type { WorkerTask } from "../types/workerSession.js";
3
- import type { LaunchFreshSessionInput } from "audit-tools/shared";
4
- export interface CreateRemediationWorkerTaskInput {
5
- runId: string;
6
- options: OrchestratorOptions;
7
- obligationId: string | null;
8
- preferredExecutor: string;
9
- resultPath: string;
10
- timeoutMs?: number;
11
- maxRetries?: number;
12
- workerCommand?: string[];
13
- }
14
- export declare function createRemediationWorkerTask({ runId, options, obligationId, preferredExecutor, resultPath, timeoutMs, maxRetries, workerCommand, }: CreateRemediationWorkerTaskInput): WorkerTask;
15
- export declare function createLaunchInputForTask(options: OrchestratorOptions, task: WorkerTask, paths: {
16
- promptPath: string;
17
- taskPath: string;
18
- stdoutPath: string;
19
- stderrPath: string;
20
- }): LaunchFreshSessionInput;
21
- //# sourceMappingURL=workerTasks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workerTasks.d.ts","sourceRoot":"","sources":["../../../src/remediate/phases/workerTasks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAGlE,MAAM,WAAW,gCAAgC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,mBAAmB,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,KAAK,EACL,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,SAAqC,EACrC,UAAU,EACV,aAAa,GACd,EAAE,gCAAgC,GAAG,UAAU,CAa/C;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,mBAAmB,EAC5B,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE;IACL,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,GACA,uBAAuB,CAazB"}
@@ -1,31 +0,0 @@
1
- import { resolveWorkerTaskTimeoutMs } from "../types/workerSession.js";
2
- import { DEFAULT_WORKER_TIMEOUT_MS } from "./constants.js";
3
- export function createRemediationWorkerTask({ runId, options, obligationId, preferredExecutor, resultPath, timeoutMs = DEFAULT_WORKER_TIMEOUT_MS, maxRetries, workerCommand, }) {
4
- return {
5
- contract_version: "remediation-worker/v1alpha1",
6
- run_id: runId,
7
- repo_root: options.root,
8
- artifacts_dir: options.artifactsDir,
9
- obligation_id: obligationId,
10
- preferred_executor: preferredExecutor,
11
- result_path: resultPath,
12
- timeout_ms: timeoutMs,
13
- ...(maxRetries === undefined ? {} : { max_retries: maxRetries }),
14
- ...(workerCommand === undefined ? {} : { worker_command: workerCommand }),
15
- };
16
- }
17
- export function createLaunchInputForTask(options, task, paths) {
18
- return {
19
- repoRoot: options.root,
20
- runId: task.run_id,
21
- obligationId: task.obligation_id,
22
- promptPath: paths.promptPath,
23
- taskPath: paths.taskPath,
24
- resultPath: task.result_path,
25
- stdoutPath: paths.stdoutPath,
26
- stderrPath: paths.stderrPath,
27
- uiMode: "headless",
28
- timeoutMs: resolveWorkerTaskTimeoutMs(task, DEFAULT_WORKER_TIMEOUT_MS),
29
- };
30
- }
31
- //# sourceMappingURL=workerTasks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workerTasks.js","sourceRoot":"","sources":["../../../src/remediate/phases/workerTasks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAa3D,MAAM,UAAU,2BAA2B,CAAC,EAC1C,KAAK,EACL,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,SAAS,GAAG,yBAAyB,EACrC,UAAU,EACV,aAAa,GACoB;IACjC,OAAO;QACL,gBAAgB,EAAE,6BAA6B;QAC/C,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,OAAO,CAAC,IAAI;QACvB,aAAa,EAAE,OAAO,CAAC,YAAY;QACnC,aAAa,EAAE,YAAY;QAC3B,kBAAkB,EAAE,iBAAiB;QACrC,WAAW,EAAE,UAAU;QACvB,UAAU,EAAE,SAAS;QACrB,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;QAChE,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC;KAC1E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAA4B,EAC5B,IAAgB,EAChB,KAKC;IAED,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,IAAI;QACtB,KAAK,EAAE,IAAI,CAAC,MAAM;QAClB,YAAY,EAAE,IAAI,CAAC,aAAa;QAChC,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,UAAU,EAAE,IAAI,CAAC,WAAW;QAC5B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,MAAM,EAAE,UAAU;QAClB,SAAS,EAAE,0BAA0B,CAAC,IAAI,EAAE,yBAAyB,CAAC;KACvE,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export { WORKER_COMMAND_PROVIDER_NAME } from "audit-tools/shared";
2
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/remediate/providers/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { WORKER_COMMAND_PROVIDER_NAME } from "audit-tools/shared";
2
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/remediate/providers/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,19 +0,0 @@
1
- import type { OrchestratorDescriptor } from "audit-tools/shared";
2
- /**
3
- * Auto-resolution, the provider classes, AND the per-orchestrator binding
4
- * machinery are single-sourced in `audit-tools/shared`; this module declares
5
- * remediate-code's descriptor — the ONE home for everything that legitimately
6
- * differs from audit-code — and draws its bound factories from it. The
7
- * autonomous remediator skips permission prompts by default (it applies changes
8
- * unattended and cannot pause mid-run); an explicit
9
- * `dangerously_skip_permissions: false` in the config still opts out.
10
- */
11
- export declare const REMEDIATE_CODE_DESCRIPTOR: OrchestratorDescriptor;
12
- export declare const createClaudeCodeProvider: (config?: import("audit-tools/shared").ClaudeCodeConfig, launchCommand?: typeof import("audit-tools/shared").spawnLoggedCommand) => import("audit-tools/shared").ClaudeCodeProvider;
13
- export declare const createOpenCodeProvider: (config?: Parameters<typeof import("audit-tools/shared").createOpenCodeProvider>[0], launchCommand?: typeof import("audit-tools/shared").spawnLoggedCommand) => import("audit-tools/shared").OpenCodeProvider;
14
- export declare const resolveFreshSessionProviderName: (name: string | undefined, sessionConfig?: import("audit-tools/shared").SessionConfig, options?: {
15
- env?: NodeJS.ProcessEnv;
16
- commandExists?: (command: string) => boolean;
17
- }) => import("audit-tools/shared").ResolvedProviderName;
18
- export declare const createFreshSessionProvider: (name: string | undefined, sessionConfig?: import("audit-tools/shared").SessionConfig) => import("audit-tools/shared").FreshSessionProvider;
19
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/remediate/providers/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,sBAMvC,CAAC;AAMF,eAAO,MAAM,wBAAwB,qLAA0C,CAAC;AAChF,eAAO,MAAM,sBAAsB,+MAAwC,CAAC;AAC5E,eAAO,MAAM,+BAA+B;OAIohG,CAAC;iBAAwC,CAAC;uDAH1jG,CAAC;AACjD,eAAO,MAAM,0BAA0B,6IACI,CAAC"}
@@ -1,23 +0,0 @@
1
- import { buildOrchestratorProviderModule } from "audit-tools/shared";
2
- /**
3
- * Auto-resolution, the provider classes, AND the per-orchestrator binding
4
- * machinery are single-sourced in `audit-tools/shared`; this module declares
5
- * remediate-code's descriptor — the ONE home for everything that legitimately
6
- * differs from audit-code — and draws its bound factories from it. The
7
- * autonomous remediator skips permission prompts by default (it applies changes
8
- * unattended and cannot pause mid-run); an explicit
9
- * `dangerously_skip_permissions: false` in the config still opts out.
10
- */
11
- export const REMEDIATE_CODE_DESCRIPTOR = {
12
- orchestratorName: "remediate-code",
13
- sessionConfigPath: ".audit-tools/remediation/session-config.json",
14
- slashCommand: "/remediate-code",
15
- skipPermissionsDefault: true,
16
- envPrefix: "REMEDIATE_CODE",
17
- };
18
- const providerModule = buildOrchestratorProviderModule(REMEDIATE_CODE_DESCRIPTOR);
19
- export const createClaudeCodeProvider = providerModule.createClaudeCodeProvider;
20
- export const createOpenCodeProvider = providerModule.createOpenCodeProvider;
21
- export const resolveFreshSessionProviderName = providerModule.resolveFreshSessionProviderName;
22
- export const createFreshSessionProvider = providerModule.createFreshSessionProvider;
23
- //# sourceMappingURL=index.js.map