audit-tools 0.34.41 → 0.35.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 (328) hide show
  1. package/dist/audit/cli/args.d.ts +6 -0
  2. package/dist/audit/cli/args.d.ts.map +1 -1
  3. package/dist/audit/cli/args.js +21 -4
  4. package/dist/audit/cli/args.js.map +1 -1
  5. package/dist/audit/cli/auditStep.d.ts +6 -15
  6. package/dist/audit/cli/auditStep.d.ts.map +1 -1
  7. package/dist/audit/cli/auditStep.js +1 -1
  8. package/dist/audit/cli/auditStep.js.map +1 -1
  9. package/dist/audit/cli/dispatch/hostFanoutGate.d.ts +21 -61
  10. package/dist/audit/cli/dispatch/hostFanoutGate.d.ts.map +1 -1
  11. package/dist/audit/cli/dispatch/hostFanoutGate.js +18 -167
  12. package/dist/audit/cli/dispatch/hostFanoutGate.js.map +1 -1
  13. package/dist/audit/cli/dispatch/packetFilter.d.ts +2 -2
  14. package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -1
  15. package/dist/audit/cli/dispatch/packetFilter.js +3 -1
  16. package/dist/audit/cli/dispatch/packetFilter.js.map +1 -1
  17. package/dist/audit/cli/dispatch/quotaPool.d.ts +2 -14
  18. package/dist/audit/cli/dispatch/quotaPool.d.ts.map +1 -1
  19. package/dist/audit/cli/dispatch/quotaPool.js +16 -6
  20. package/dist/audit/cli/dispatch/quotaPool.js.map +1 -1
  21. package/dist/audit/cli/dispatch/tierRouting.d.ts +2 -2
  22. package/dist/audit/cli/dispatch/tokenUsageObservation.d.ts.map +1 -1
  23. package/dist/audit/cli/dispatch/tokenUsageObservation.js +10 -2
  24. package/dist/audit/cli/dispatch/tokenUsageObservation.js.map +1 -1
  25. package/dist/audit/cli/dispatch.d.ts +14 -3
  26. package/dist/audit/cli/dispatch.d.ts.map +1 -1
  27. package/dist/audit/cli/dispatch.js +87 -65
  28. package/dist/audit/cli/dispatch.js.map +1 -1
  29. package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
  30. package/dist/audit/cli/forceSynthesisCommand.js +9 -1
  31. package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
  32. package/dist/audit/cli/hybridDispatch.d.ts +4 -9
  33. package/dist/audit/cli/hybridDispatch.d.ts.map +1 -1
  34. package/dist/audit/cli/hybridDispatch.js +1 -1
  35. package/dist/audit/cli/hybridDispatch.js.map +1 -1
  36. package/dist/audit/cli/lineIndex.d.ts +2 -0
  37. package/dist/audit/cli/lineIndex.d.ts.map +1 -1
  38. package/dist/audit/cli/lineIndex.js +4 -0
  39. package/dist/audit/cli/lineIndex.js.map +1 -1
  40. package/dist/audit/cli/nextStepCommand.d.ts +0 -26
  41. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  42. package/dist/audit/cli/nextStepCommand.js +14 -358
  43. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  44. package/dist/audit/cli/nextStepHelpers.d.ts +5 -16
  45. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  46. package/dist/audit/cli/nextStepHelpers.js +27 -157
  47. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  48. package/dist/audit/cli/quotaCommand.d.ts.map +1 -1
  49. package/dist/audit/cli/quotaCommand.js +1 -5
  50. package/dist/audit/cli/quotaCommand.js.map +1 -1
  51. package/dist/audit/cli/reviewRun.d.ts.map +1 -1
  52. package/dist/audit/cli/reviewRun.js +58 -23
  53. package/dist/audit/cli/reviewRun.js.map +1 -1
  54. package/dist/audit/cli/rollingAuditDispatch.d.ts +1 -1
  55. package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
  56. package/dist/audit/cli/semanticReviewStep.js +35 -54
  57. package/dist/audit/cli/semanticReviewStep.js.map +1 -1
  58. package/dist/audit/cli/steps.d.ts +4 -4
  59. package/dist/audit/cli/steps.d.ts.map +1 -1
  60. package/dist/audit/cli/steps.js +0 -1
  61. package/dist/audit/cli/steps.js.map +1 -1
  62. package/dist/audit/cli/workPartitionRuntime.d.ts +11 -0
  63. package/dist/audit/cli/workPartitionRuntime.d.ts.map +1 -0
  64. package/dist/audit/cli/workPartitionRuntime.js +39 -0
  65. package/dist/audit/cli/workPartitionRuntime.js.map +1 -0
  66. package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
  67. package/dist/audit/io/artifacts.d.ts +1 -3
  68. package/dist/audit/io/artifacts.d.ts.map +1 -1
  69. package/dist/audit/io/artifacts.js +0 -3
  70. package/dist/audit/io/artifacts.js.map +1 -1
  71. package/dist/audit/orchestrator/advance.d.ts.map +1 -1
  72. package/dist/audit/orchestrator/advance.js +0 -35
  73. package/dist/audit/orchestrator/advance.js.map +1 -1
  74. package/dist/audit/orchestrator/advanceTypes.d.ts +4 -63
  75. package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
  76. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  77. package/dist/audit/orchestrator/executorRunners.js +9 -12
  78. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  79. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  80. package/dist/audit/orchestrator/executors.js +0 -5
  81. package/dist/audit/orchestrator/executors.js.map +1 -1
  82. package/dist/audit/orchestrator/hostInputPause.d.ts +1 -1
  83. package/dist/audit/orchestrator/hostInputPause.js +1 -1
  84. package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
  85. package/dist/audit/orchestrator/ingestionExecutors.js +4 -1
  86. package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
  87. package/dist/audit/orchestrator/intakeExecutors.d.ts +1 -65
  88. package/dist/audit/orchestrator/intakeExecutors.d.ts.map +1 -1
  89. package/dist/audit/orchestrator/intakeExecutors.js +3 -425
  90. package/dist/audit/orchestrator/intakeExecutors.js.map +1 -1
  91. package/dist/audit/orchestrator/nextStep.d.ts +0 -13
  92. package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
  93. package/dist/audit/orchestrator/nextStep.js +0 -7
  94. package/dist/audit/orchestrator/nextStep.js.map +1 -1
  95. package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
  96. package/dist/audit/orchestrator/planningExecutors.js +4 -1
  97. package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
  98. package/dist/audit/orchestrator/rollingDispatch.d.ts +1 -1
  99. package/dist/audit/orchestrator/rollingDispatch.d.ts.map +1 -1
  100. package/dist/audit/orchestrator/rollingDispatch.js +5 -4
  101. package/dist/audit/orchestrator/rollingDispatch.js.map +1 -1
  102. package/dist/audit/orchestrator/state.d.ts +0 -39
  103. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  104. package/dist/audit/orchestrator/state.js +3 -29
  105. package/dist/audit/orchestrator/state.js.map +1 -1
  106. package/dist/audit/orchestrator/synthesisExecutors.d.ts +8 -2
  107. package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
  108. package/dist/audit/orchestrator/synthesisExecutors.js +7 -5
  109. package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
  110. package/dist/audit/reporting/findingIdentity.d.ts +2 -2
  111. package/dist/audit/reporting/findingIdentity.js +2 -2
  112. package/dist/audit/reporting/synthesis.d.ts +7 -1
  113. package/dist/audit/reporting/synthesis.d.ts.map +1 -1
  114. package/dist/audit/reporting/synthesis.js +27 -7
  115. package/dist/audit/reporting/synthesis.js.map +1 -1
  116. package/dist/audit/reporting/workBlocks.d.ts +14 -3
  117. package/dist/audit/reporting/workBlocks.d.ts.map +1 -1
  118. package/dist/audit/reporting/workBlocks.js +163 -73
  119. package/dist/audit/reporting/workBlocks.js.map +1 -1
  120. package/dist/audit/types/activeDispatch.d.ts +8 -7
  121. package/dist/audit/types/activeDispatch.d.ts.map +1 -1
  122. package/dist/audit/types/auditState.d.ts +6 -6
  123. package/dist/audit/types/externalAnalyzer.d.ts +6 -6
  124. package/dist/audit/validation/auditResults.d.ts.map +1 -1
  125. package/dist/audit/validation/auditResults.js +6 -1
  126. package/dist/audit/validation/auditResults.js.map +1 -1
  127. package/dist/remediate/contractPipeline/phaseCut.d.ts +8 -0
  128. package/dist/remediate/contractPipeline/phaseCut.d.ts.map +1 -1
  129. package/dist/remediate/contractPipeline/phaseCut.js +63 -0
  130. package/dist/remediate/contractPipeline/phaseCut.js.map +1 -1
  131. package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts.map +1 -1
  132. package/dist/remediate/contractPipeline/phaseCutArtifact.js +5 -3
  133. package/dist/remediate/contractPipeline/phaseCutArtifact.js.map +1 -1
  134. package/dist/remediate/phases/plan.d.ts.map +1 -1
  135. package/dist/remediate/phases/plan.js +35 -12
  136. package/dist/remediate/phases/plan.js.map +1 -1
  137. package/dist/remediate/steps/contractPipeline.d.ts +6 -2
  138. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  139. package/dist/remediate/steps/contractPipeline.js +90 -6
  140. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  141. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  142. package/dist/remediate/steps/contractPipelinePrompts.js +4 -2
  143. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  144. package/dist/remediate/steps/dispatch/marshal.d.ts +6 -0
  145. package/dist/remediate/steps/dispatch/marshal.d.ts.map +1 -1
  146. package/dist/remediate/steps/dispatch/marshal.js +16 -17
  147. package/dist/remediate/steps/dispatch/marshal.js.map +1 -1
  148. package/dist/remediate/steps/dispatch/waveScheduling.d.ts +7 -15
  149. package/dist/remediate/steps/dispatch/waveScheduling.d.ts.map +1 -1
  150. package/dist/remediate/steps/dispatch/waveScheduling.js +26 -19
  151. package/dist/remediate/steps/dispatch/waveScheduling.js.map +1 -1
  152. package/dist/remediate/steps/nextStep.d.ts +5 -7
  153. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  154. package/dist/remediate/steps/nextStep.js +100 -82
  155. package/dist/remediate/steps/nextStep.js.map +1 -1
  156. package/dist/remediate/steps/rollingSession.d.ts +2 -1
  157. package/dist/remediate/steps/rollingSession.d.ts.map +1 -1
  158. package/dist/remediate/steps/rollingSession.js +14 -8
  159. package/dist/remediate/steps/rollingSession.js.map +1 -1
  160. package/dist/remediate/steps/sessionConfigLoad.d.ts +3 -2
  161. package/dist/remediate/steps/sessionConfigLoad.d.ts.map +1 -1
  162. package/dist/remediate/steps/sessionConfigLoad.js +4 -10
  163. package/dist/remediate/steps/sessionConfigLoad.js.map +1 -1
  164. package/dist/remediate/validation/contractPipeline.d.ts +1 -1
  165. package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
  166. package/dist/remediate/validation/contractPipeline.js +7 -1
  167. package/dist/remediate/validation/contractPipeline.js.map +1 -1
  168. package/dist/remediate/validation/contractPipelineGates.d.ts +8 -0
  169. package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
  170. package/dist/remediate/validation/contractPipelineGates.js +89 -0
  171. package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
  172. package/dist/shared/config/resolveSessionConfig.d.ts.map +1 -1
  173. package/dist/shared/config/resolveSessionConfig.js +6 -5
  174. package/dist/shared/config/resolveSessionConfig.js.map +1 -1
  175. package/dist/shared/decompose/workPartition.d.ts +66 -0
  176. package/dist/shared/decompose/workPartition.d.ts.map +1 -0
  177. package/dist/shared/decompose/workPartition.js +523 -0
  178. package/dist/shared/decompose/workPartition.js.map +1 -0
  179. package/dist/shared/dispatch/admissionLoop.d.ts +5 -44
  180. package/dist/shared/dispatch/admissionLoop.d.ts.map +1 -1
  181. package/dist/shared/dispatch/admissionLoop.js +20 -82
  182. package/dist/shared/dispatch/admissionLoop.js.map +1 -1
  183. package/dist/shared/dispatch/coordinator.d.ts +5 -5
  184. package/dist/shared/dispatch/coordinator.d.ts.map +1 -1
  185. package/dist/shared/dispatch/coordinator.js +12 -11
  186. package/dist/shared/dispatch/coordinator.js.map +1 -1
  187. package/dist/shared/dispatch/costRank.d.ts +5 -155
  188. package/dist/shared/dispatch/costRank.d.ts.map +1 -1
  189. package/dist/shared/dispatch/costRank.js +2 -179
  190. package/dist/shared/dispatch/costRank.js.map +1 -1
  191. package/dist/shared/dispatch/dispatchQuotaContract.d.ts +37 -38
  192. package/dist/shared/dispatch/dispatchQuotaContract.d.ts.map +1 -1
  193. package/dist/shared/dispatch/dispatchQuotaContract.js +0 -1
  194. package/dist/shared/dispatch/dispatchQuotaContract.js.map +1 -1
  195. package/dist/shared/dispatch/hybridDispatch.d.ts +6 -2
  196. package/dist/shared/dispatch/hybridDispatch.d.ts.map +1 -1
  197. package/dist/shared/dispatch/hybridDispatch.js +1 -1
  198. package/dist/shared/dispatch/hybridDispatch.js.map +1 -1
  199. package/dist/shared/dispatch/rollingDispatch.d.ts +4 -4
  200. package/dist/shared/dispatch/rollingDispatch.d.ts.map +1 -1
  201. package/dist/shared/dispatch/rollingDispatch.js +13 -11
  202. package/dist/shared/dispatch/rollingDispatch.js.map +1 -1
  203. package/dist/shared/dispatch/unifiedRolling.d.ts +2 -2
  204. package/dist/shared/dispatch/unifiedRolling.d.ts.map +1 -1
  205. package/dist/shared/dispatch/unifiedRolling.js +1 -1
  206. package/dist/shared/dispatch/unifiedRolling.js.map +1 -1
  207. package/dist/shared/engine/obligationEngine.d.ts +2 -2
  208. package/dist/shared/friction/stepBoundaryCapture.d.ts +5 -59
  209. package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
  210. package/dist/shared/friction/stepBoundaryCapture.js +11 -107
  211. package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
  212. package/dist/shared/index.d.ts +13 -16
  213. package/dist/shared/index.d.ts.map +1 -1
  214. package/dist/shared/index.js +9 -13
  215. package/dist/shared/index.js.map +1 -1
  216. package/dist/shared/io/stateDir.d.ts +2 -2
  217. package/dist/shared/io/stateDir.js +2 -2
  218. package/dist/shared/providers/auditorSources.d.ts +10 -84
  219. package/dist/shared/providers/auditorSources.d.ts.map +1 -1
  220. package/dist/shared/providers/auditorSources.js +42 -261
  221. package/dist/shared/providers/auditorSources.js.map +1 -1
  222. package/dist/shared/providers/dispatchExclusion.d.ts +22 -0
  223. package/dist/shared/providers/dispatchExclusion.d.ts.map +1 -0
  224. package/dist/shared/providers/dispatchExclusion.js +23 -0
  225. package/dist/shared/providers/dispatchExclusion.js.map +1 -0
  226. package/dist/shared/providers/identity.d.ts +2 -66
  227. package/dist/shared/providers/identity.d.ts.map +1 -1
  228. package/dist/shared/providers/identity.js +2 -72
  229. package/dist/shared/providers/identity.js.map +1 -1
  230. package/dist/shared/providers/providerFactory.d.ts +0 -3
  231. package/dist/shared/providers/providerFactory.d.ts.map +1 -1
  232. package/dist/shared/providers/providerFactory.js +5 -32
  233. package/dist/shared/providers/providerFactory.js.map +1 -1
  234. package/dist/shared/providers/providerPathGuard.d.ts +3 -3
  235. package/dist/shared/providers/providerPathGuard.js +7 -7
  236. package/dist/shared/providers/providerPathGuard.js.map +1 -1
  237. package/dist/shared/quota/apiPool.d.ts +19 -22
  238. package/dist/shared/quota/apiPool.d.ts.map +1 -1
  239. package/dist/shared/quota/apiPool.js +66 -47
  240. package/dist/shared/quota/apiPool.js.map +1 -1
  241. package/dist/shared/quota/capacity.d.ts +29 -24
  242. package/dist/shared/quota/capacity.d.ts.map +1 -1
  243. package/dist/shared/quota/capacity.js +30 -4
  244. package/dist/shared/quota/capacity.js.map +1 -1
  245. package/dist/shared/quota/codexHostConfig.d.ts +6 -13
  246. package/dist/shared/quota/codexHostConfig.d.ts.map +1 -1
  247. package/dist/shared/quota/codexHostConfig.js +8 -14
  248. package/dist/shared/quota/codexHostConfig.js.map +1 -1
  249. package/dist/shared/quota/fileLock.d.ts +7 -0
  250. package/dist/shared/quota/fileLock.d.ts.map +1 -1
  251. package/dist/shared/quota/fileLock.js +32 -4
  252. package/dist/shared/quota/fileLock.js.map +1 -1
  253. package/dist/shared/quota/hostLimits.d.ts +1 -1
  254. package/dist/shared/quota/hostLimits.d.ts.map +1 -1
  255. package/dist/shared/quota/hostLimits.js +8 -11
  256. package/dist/shared/quota/hostLimits.js.map +1 -1
  257. package/dist/shared/quota/hostPool.d.ts +1 -1
  258. package/dist/shared/quota/hostPool.js +2 -2
  259. package/dist/shared/quota/hostPool.js.map +1 -1
  260. package/dist/shared/quota/limits.d.ts.map +1 -1
  261. package/dist/shared/quota/limits.js +30 -26
  262. package/dist/shared/quota/limits.js.map +1 -1
  263. package/dist/shared/quota/scheduler.d.ts +2 -3
  264. package/dist/shared/quota/scheduler.d.ts.map +1 -1
  265. package/dist/shared/quota/scheduler.js +1 -1
  266. package/dist/shared/quota/scheduler.js.map +1 -1
  267. package/dist/shared/quota/types.d.ts +10 -10
  268. package/dist/shared/quota/types.d.ts.map +1 -1
  269. package/dist/shared/quota/types.js +4 -7
  270. package/dist/shared/quota/types.js.map +1 -1
  271. package/dist/shared/repair/brokeredDispatch.d.ts.map +1 -1
  272. package/dist/shared/repair/brokeredDispatch.js +3 -0
  273. package/dist/shared/repair/brokeredDispatch.js.map +1 -1
  274. package/dist/shared/reporting/auditDeliverable.d.ts.map +1 -1
  275. package/dist/shared/reporting/auditDeliverable.js +1 -0
  276. package/dist/shared/reporting/auditDeliverable.js.map +1 -1
  277. package/dist/shared/rolling/pausedState.d.ts +7 -7
  278. package/dist/shared/rolling/pausedState.js +3 -3
  279. package/dist/shared/tokens.d.ts +2 -5
  280. package/dist/shared/tokens.d.ts.map +1 -1
  281. package/dist/shared/tokens.js +15 -15
  282. package/dist/shared/tokens.js.map +1 -1
  283. package/dist/shared/types/auditorDescriptor.d.ts +3 -2
  284. package/dist/shared/types/auditorDescriptor.d.ts.map +1 -1
  285. package/dist/shared/types/auditorDescriptor.js +3 -2
  286. package/dist/shared/types/auditorDescriptor.js.map +1 -1
  287. package/dist/shared/types/finding.d.ts +80 -0
  288. package/dist/shared/types/finding.d.ts.map +1 -1
  289. package/dist/shared/types/finding.js +17 -0
  290. package/dist/shared/types/finding.js.map +1 -1
  291. package/dist/shared/types/sessionConfig.d.ts +5 -5
  292. package/dist/shared/types/sessionConfig.js +1 -1
  293. package/dist/shared/validation/findingsReport.d.ts.map +1 -1
  294. package/dist/shared/validation/findingsReport.js +3 -0
  295. package/dist/shared/validation/findingsReport.js.map +1 -1
  296. package/docs/audit-pkg/development.md +3 -2
  297. package/docs/audit-pkg/operator-guide.md +13 -106
  298. package/docs/audit-pkg/product.md +8 -7
  299. package/docs/audit-pkg/release.md +38 -29
  300. package/opencode.json +2 -2
  301. package/package.json +7 -4
  302. package/skills/audit-code/SKILL.md +2 -1
  303. package/skills/audit-code/audit-code.prompt.md +4 -3
  304. package/skills/remediate-code/remediate-code.prompt.md +2 -1
  305. package/dist/audit/cli/providerConfirmationStep.d.ts +0 -106
  306. package/dist/audit/cli/providerConfirmationStep.d.ts.map +0 -1
  307. package/dist/audit/cli/providerConfirmationStep.js +0 -396
  308. package/dist/audit/cli/providerConfirmationStep.js.map +0 -1
  309. package/dist/audit/orchestrator/providerConfirmation.d.ts +0 -25
  310. package/dist/audit/orchestrator/providerConfirmation.d.ts.map +0 -1
  311. package/dist/audit/orchestrator/providerConfirmation.js +0 -60
  312. package/dist/audit/orchestrator/providerConfirmation.js.map +0 -1
  313. package/dist/shared/providers/providerConfirmation.d.ts +0 -141
  314. package/dist/shared/providers/providerConfirmation.d.ts.map +0 -1
  315. package/dist/shared/providers/providerConfirmation.js +0 -420
  316. package/dist/shared/providers/providerConfirmation.js.map +0 -1
  317. package/dist/shared/providers/proxyCatalog.d.ts +0 -158
  318. package/dist/shared/providers/proxyCatalog.d.ts.map +0 -1
  319. package/dist/shared/providers/proxyCatalog.js +0 -658
  320. package/dist/shared/providers/proxyCatalog.js.map +0 -1
  321. package/dist/shared/providers/sharedProviderConfirmation.d.ts +0 -802
  322. package/dist/shared/providers/sharedProviderConfirmation.d.ts.map +0 -1
  323. package/dist/shared/providers/sharedProviderConfirmation.js +0 -1865
  324. package/dist/shared/providers/sharedProviderConfirmation.js.map +0 -1
  325. package/dist/shared/types/providerConfirmation.d.ts +0 -334
  326. package/dist/shared/types/providerConfirmation.d.ts.map +0 -1
  327. package/dist/shared/types/providerConfirmation.js +0 -35
  328. package/dist/shared/types/providerConfirmation.js.map +0 -1
@@ -1,158 +0,0 @@
1
- import type { DispatchableSource } from "../types/sessionConfig.js";
2
- /**
3
- * The POPULATE cache for the proxy lane: discovered via `GET <proxy>/v1/models` +
4
- * `GET <proxy>/model/info` (OpenAI-compatible surfaces) expanded into ready-to-fold
5
- * `claude-worker` {@link DispatchableSource}s, written once per populate (Gate-0 build
6
- * / explicit refresh) and READ by resolve — never fetched mid-resolve.
7
- *
8
- * Named `catalog-cache.json`, NOT the `catalog-<auditor-id>.json` the reserved-name
9
- * comment at `auditorSources.ts` anticipates: populate/resolve run on the AMBIENT
10
- * path, where no auditor id exists to key on. The cache is machine-level like the
11
- * declaration beside it — and it is a CACHE of live discovery state, not resolved
12
- * per-auditor capability, so an auditor-id key would assert an isolation the data
13
- * doesn't have. Per-auditor never-inherit still holds: every resolve re-proves proxy
14
- * REACH itself; the cache only supplies the expansion.
15
- */
16
- export declare const PROXY_CATALOG_FILENAME = "catalog-cache.json";
17
- /** Top-K models expanded per backend provider when the operator declares no `top_k`. */
18
- export declare const DEFAULT_PROXY_TOP_K = 3;
19
- /** Timeout (ms) for populate-time model verification probes. */
20
- export declare const POPULATE_PROBE_TIMEOUT_MS = 3000;
21
- /** Concurrency limit for populate-time model verification probes. */
22
- export declare const POPULATE_PROBE_CONCURRENCY = 4;
23
- /**
24
- * A same-endpoint cache younger than this skips the registry fetch + probes
25
- * entirely (see the freshness short-circuit in {@link populateProxyCatalog}).
26
- * Refresh THROTTLE — how often we are willing to PAY for a refresh, which is a
27
- * different question from how long an unrefreshed cache may still be believed
28
- * ({@link PROXY_CATALOG_MAX_READ_AGE_MS}). The two thresholds share one age
29
- * derivation and nothing else.
30
- */
31
- export declare const POPULATE_CACHE_FRESH_TTL_MS: number;
32
- /**
33
- * Past this age a cache is returned STALE by {@link readProxyCatalog} — the
34
- * expansion still travels, with a verdict attached, so the caller decides rather
35
- * than consuming an unbounded-age cache blind.
36
- *
37
- * A day: comfortably longer than any single run (a mid-run flip to stale would be
38
- * churn, not signal), and short enough that a roster the operator changed — a model
39
- * added to or dropped from the proxy config — cannot go unnoticed indefinitely.
40
- * The cache is machine-global and tool-written, so being wrong here costs one
41
- * repopulate, never data.
42
- */
43
- export declare const PROXY_CATALOG_MAX_READ_AGE_MS: number;
44
- /** Resolve the populate-cache path for this machine (state dir via `io/stateDir.ts`). */
45
- export declare function resolveProxyCatalogPath(homeDir?: string): string;
46
- /**
47
- * Shape version of the on-disk cache. Bump whenever a written entry's meaning changes,
48
- * so a cache written by older code degrades to "absent" rather than being read under
49
- * new semantics. The cache is tool-written and fully regenerable, so degrading is free —
50
- * `readProxyCatalog` returns null, and `populateProxyCatalogIfMissing` then repopulates.
51
- *
52
- * v2: entries no longer carry a tool-stamped `id`. A v1 entry does, and since `id` now
53
- * outranks the `service` derivation in `dispatchableSourceId`, reading one under v2
54
- * semantics would key a proxied lane to `claude-worker:<service>/<model>` instead of
55
- * `<service>/<model>` — silently splitting it from the direct lane to the same backend
56
- * and reopening the double-grant boundary.
57
- */
58
- export declare const PROXY_CATALOG_VERSION = 2;
59
- /** The on-disk cache shape: the expansion + when it was fetched. */
60
- export interface ProxyCatalog {
61
- /** Shape version — see {@link PROXY_CATALOG_VERSION}. Absent ⇒ pre-versioned (v1). */
62
- version: number;
63
- /**
64
- * ISO timestamp of the populate fetch. REQUIRED to be parseable — the read-side
65
- * age rule is derived from it, and an age derived from a substituted default
66
- * would launder a corrupt file into a fresh-looking one.
67
- */
68
- fetched_at: string;
69
- /** The proxy endpoint the registry was fetched from. */
70
- endpoint: string;
71
- /** Expanded `claude-worker` sources, ready to fold into the dispatch pool. */
72
- sources: DispatchableSource[];
73
- }
74
- /**
75
- * The cache as READ: the persisted shape plus the read-time age verdict.
76
- *
77
- * Staleness is DERIVED at read, never persisted — a stored flag would age into a lie
78
- * the moment the clock moved past it. A stale cache is returned, not withheld: the
79
- * expansion is the caller's to keep (dropping it would surface as "cache absent, run
80
- * the populate", which sends the operator after a file that is right there), and it is
81
- * not thrown either (the resolve path must not be failable by an old file).
82
- *
83
- * `stale_reason` rides the `stale: true` branch so it cannot be read without branching
84
- * on the verdict, and so every caller reports one wording instead of composing its own.
85
- */
86
- export type ProxyCatalogRead = ProxyCatalog & {
87
- /** Cache age at read time, ms. Negative ⇒ stamped ahead of this machine's clock. */
88
- age_ms: number;
89
- } & ({
90
- stale: false;
91
- stale_reason?: undefined;
92
- } | {
93
- stale: true;
94
- stale_reason: string;
95
- });
96
- export interface PopulateProxyCatalogOptions {
97
- /** The proxy base url (`GET <endpoint>/v1/models`, `GET <endpoint>/model/info`). */
98
- endpoint: string;
99
- /** Models expanded per backend provider (declared `proxy.top_k`); default {@link DEFAULT_PROXY_TOP_K}. */
100
- topK?: number;
101
- /**
102
- * Operator-declared blended $/Mtok for the proxied lane (`proxy.cost_per_mtok`,
103
- * the free-to-operator axis). WINS over any advert price.
104
- */
105
- costPerMtok?: number;
106
- /** Env var holding the proxy's master key when authentication is required. */
107
- apiKeyEnv?: string;
108
- /** Injectable fetch (tests); defaults to global fetch. */
109
- fetchImpl?: typeof fetch;
110
- /** Home dir override for the cache path (tests). */
111
- homeDir?: string;
112
- /** Clock (tests); defaults to `Date.now`-based ISO. */
113
- now?: () => Date;
114
- }
115
- export interface PopulateProxyCatalogResult {
116
- /** The expanded sources (also what was written when `written` is true). */
117
- sources: DispatchableSource[];
118
- /** Whether the cache file was (re)written. False only when the fetch itself failed. */
119
- written: boolean;
120
- /** Operator-facing explanation when the registry could not be fetched/parsed. */
121
- reason?: string;
122
- /** Models dropped during probe verification, with reasons. */
123
- dropped: Array<{
124
- id: string;
125
- reason: string;
126
- }>;
127
- }
128
- /**
129
- * POPULATE: discover and expand models from an OpenAI-compatible proxy
130
- * (`GET <endpoint>/v1/models` + `GET <endpoint>/model/info`) into
131
- * ready-to-fold `claude-worker` sources, then write to the machine-level cache.
132
- * Network-bound and cacheable — runs at Gate-0 build / explicit refresh, NEVER
133
- * inside `resolveAmbientSources` (which only READS via {@link readProxyCatalog}).
134
- * Never throws: a failed fetch returns `{written:false, reason}` and leaves any
135
- * prior cache untouched; an empty discovery WRITES an empty expansion (fresh
136
- * knowledge — resolve reports the lane unexpanded with a reason).
137
- */
138
- export declare function populateProxyCatalog(options: PopulateProxyCatalogOptions): Promise<PopulateProxyCatalogResult>;
139
- export interface ReadProxyCatalogDeps {
140
- /** Home dir override for the cache path (tests). */
141
- homeDir?: string;
142
- /** Raw cache reader (tests inject); defaults to reading the cache file. */
143
- readCatalogFile?: (path: string) => string | null;
144
- /** Clock (tests); defaults to `new Date()`. Fixes the age rule's reference point. */
145
- now?: () => Date;
146
- }
147
- /**
148
- * READ the populate cache, with the read-side age rule applied: every result carries
149
- * `age_ms` and a `stale` verdict against {@link PROXY_CATALOG_MAX_READ_AGE_MS}, so an
150
- * old cache reaches its caller labelled rather than indistinguishable from a fresh one.
151
- * Degrades to `null` on absent / unparseable / structurally-invalid content — never
152
- * throws (same bar as `readSourceDeclaration`: the resolve path must not be failable by
153
- * a bad file). Cached sources are held to the shared source validator, so a hand-edited
154
- * or version-skewed cache degrades to "no cache" rather than admitting a half-checked
155
- * pool.
156
- */
157
- export declare function readProxyCatalog(deps?: ReadProxyCatalogDeps): ProxyCatalogRead | null;
158
- //# sourceMappingURL=proxyCatalog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proxyCatalog.d.ts","sourceRoot":"","sources":["../../../src/shared/providers/proxyCatalog.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGpE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAE3D,wFAAwF;AACxF,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAUrC,gEAAgE;AAChE,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C,qEAAqE;AACrE,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,QAAc,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,QAAmB,CAAC;AAE9D,yFAAyF;AACzF,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,oEAAoE;AACpE,MAAM,WAAW,YAAY;IAC3B,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG;IAC5C,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,CACE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,YAAY,CAAC,EAAE,SAAS,CAAA;CAAE,GAC1C;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CACxC,CAAC;AA8BJ,MAAM,WAAW,2BAA2B;IAC1C,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAC;IACjB,0GAA0G;IAC1G,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,uFAAuF;IACvF,OAAO,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AA8XD;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,CAAC,CAsKrC;AAED,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAClD,qFAAqF;IACrF,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB;AAkBD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,GAAE,oBAAyB,GAC9B,gBAAgB,GAAG,IAAI,CA2DzB"}