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.
- package/README.md +28 -29
- package/dist/audit/cli/args.d.ts +2 -57
- package/dist/audit/cli/args.d.ts.map +1 -1
- package/dist/audit/cli/args.js +16 -250
- package/dist/audit/cli/args.js.map +1 -1
- package/dist/audit/cli/auditStep.d.ts +9 -6
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +32 -144
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/cleanup.js +4 -4
- package/dist/audit/cli/cleanup.js.map +1 -1
- package/dist/audit/cli/cliHelpers.d.ts +1 -10
- package/dist/audit/cli/cliHelpers.d.ts.map +1 -1
- package/dist/audit/cli/cliHelpers.js +1 -10
- package/dist/audit/cli/cliHelpers.js.map +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts +11 -32
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +91 -72
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/confirmIntentStep.js +3 -3
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts +86 -0
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -0
- package/dist/audit/cli/dispatch/hostHandoff.js +616 -0
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -0
- package/dist/audit/cli/dispatch/packetFilter.d.ts +12 -86
- package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.js +6 -161
- package/dist/audit/cli/dispatch/packetFilter.js.map +1 -1
- package/dist/audit/cli/dispatch.d.ts +7 -115
- package/dist/audit/cli/dispatch.d.ts.map +1 -1
- package/dist/audit/cli/dispatch.js +7 -711
- package/dist/audit/cli/dispatch.js.map +1 -1
- package/dist/audit/cli/envelope.d.ts +4 -20
- package/dist/audit/cli/envelope.d.ts.map +1 -1
- package/dist/audit/cli/envelope.js +5 -33
- package/dist/audit/cli/envelope.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts +47 -11
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +15 -7
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.d.ts +3 -16
- package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.js +3 -74
- package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +241 -0
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -0
- package/dist/audit/cli/laneSubmissions.js +438 -0
- package/dist/audit/cli/laneSubmissions.js.map +1 -0
- package/dist/audit/cli/laneValidators.d.ts +65 -0
- package/dist/audit/cli/laneValidators.d.ts.map +1 -0
- package/dist/audit/cli/laneValidators.js +145 -0
- package/dist/audit/cli/laneValidators.js.map +1 -0
- package/dist/audit/cli/lineIndex.d.ts.map +1 -1
- package/dist/audit/cli/lineIndex.js +4 -3
- package/dist/audit/cli/lineIndex.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +153 -382
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +74 -116
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +421 -667
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts +2 -67
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +33 -304
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/recoverSubmissionCommand.d.ts +16 -0
- package/dist/audit/cli/recoverSubmissionCommand.d.ts.map +1 -0
- package/dist/audit/cli/recoverSubmissionCommand.js +73 -0
- package/dist/audit/cli/recoverSubmissionCommand.js.map +1 -0
- package/dist/audit/cli/reviewRun.d.ts +6 -35
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +78 -172
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +8 -26
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +95 -171
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/statusCommand.d.ts.map +1 -1
- package/dist/audit/cli/statusCommand.js +0 -16
- package/dist/audit/cli/statusCommand.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +112 -40
- package/dist/audit/cli/steps.d.ts.map +1 -1
- package/dist/audit/cli/steps.js +14 -0
- package/dist/audit/cli/steps.js.map +1 -1
- package/dist/audit/cli/validateCommand.d.ts.map +1 -1
- package/dist/audit/cli/validateCommand.js +12 -37
- package/dist/audit/cli/validateCommand.js.map +1 -1
- package/dist/audit/cli.d.ts.map +1 -1
- package/dist/audit/cli.js +6 -46
- package/dist/audit/cli.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +138 -195
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/workerSchemas.js +2 -41
- package/dist/audit/contracts/workerSchemas.js.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +61 -71
- package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
- package/dist/audit/contracts/wrapperResponse.js +7 -9
- package/dist/audit/contracts/wrapperResponse.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +14 -10
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +34 -12
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/runArtifactTypes.d.ts +4 -6
- package/dist/audit/io/runArtifactTypes.d.ts.map +1 -1
- package/dist/audit/io/runArtifacts.d.ts +3 -23
- package/dist/audit/io/runArtifacts.d.ts.map +1 -1
- package/dist/audit/io/runArtifacts.js +18 -170
- package/dist/audit/io/runArtifacts.js.map +1 -1
- package/dist/audit/orchestrator/advance.js +4 -4
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +2 -6
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +0 -14
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +1 -59
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts +2 -2
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +5 -15
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/executors.d.ts.map +1 -1
- package/dist/audit/orchestrator/executors.js +1 -9
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/fileAnchors.js +1 -1
- package/dist/audit/orchestrator/fileAnchors.js.map +1 -1
- package/dist/audit/orchestrator/graphEdgeCache.js +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.js +37 -8
- package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +2 -19
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.js +0 -64
- package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts +3 -6
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.js +4 -7
- package/dist/audit/orchestrator/intentEquivalenceExecutor.js.map +1 -1
- package/dist/audit/orchestrator/intentInterpreter.d.ts +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.d.ts +11 -43
- package/dist/audit/orchestrator/partitionTaskGraph.d.ts.map +1 -1
- package/dist/audit/orchestrator/partitionTaskGraph.js +48 -101
- package/dist/audit/orchestrator/partitionTaskGraph.js.map +1 -1
- package/dist/audit/orchestrator/pendingTasks.d.ts +5 -7
- package/dist/audit/orchestrator/pendingTasks.d.ts.map +1 -1
- package/dist/audit/orchestrator/pendingTasks.js +4 -2
- package/dist/audit/orchestrator/pendingTasks.js.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.js +18 -21
- package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
- package/dist/audit/orchestrator/requeueCommand.d.ts +6 -6
- package/dist/audit/orchestrator/resultBaseline.d.ts +4 -3
- package/dist/audit/orchestrator/resultBaseline.d.ts.map +1 -1
- package/dist/audit/orchestrator/resultBaseline.js +4 -3
- package/dist/audit/orchestrator/resultBaseline.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketGraph.d.ts +1 -2
- package/dist/audit/orchestrator/reviewPacketGraph.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketGraph.js +2 -6
- package/dist/audit/orchestrator/reviewPacketGraph.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts +0 -2
- package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketGraphEdges.js +2 -65
- package/dist/audit/orchestrator/reviewPacketGraphEdges.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketSizing.d.ts +0 -1
- package/dist/audit/orchestrator/reviewPacketSizing.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketSizing.js +0 -1
- package/dist/audit/orchestrator/reviewPacketSizing.js.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.d.ts +5 -68
- package/dist/audit/orchestrator/reviewPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.js +55 -278
- package/dist/audit/orchestrator/reviewPackets.js.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -1
- package/dist/audit/orchestrator/runtimeCommand.js +4 -4
- package/dist/audit/orchestrator/runtimeCommand.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +1 -35
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.d.ts +0 -1
- package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.js +0 -45
- package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.d.ts +4 -6
- package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.js +3 -3
- package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
- package/dist/audit/orchestrator/taskAffinityGraph.d.ts +55 -21
- package/dist/audit/orchestrator/taskAffinityGraph.d.ts.map +1 -1
- package/dist/audit/orchestrator/taskAffinityGraph.js +67 -29
- package/dist/audit/orchestrator/taskAffinityGraph.js.map +1 -1
- package/dist/audit/reporting/scoreShared.js +1 -1
- package/dist/audit/reporting/scoreShared.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts +11 -21
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +76 -29
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/reporting/workBlocks.d.ts +12 -12
- package/dist/audit/reporting/workBlocks.d.ts.map +1 -1
- package/dist/audit/reporting/workBlocks.js +195 -180
- package/dist/audit/reporting/workBlocks.js.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.d.ts +17 -24
- package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
- package/dist/audit/supervisor/operatorHandoff.js +60 -125
- package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
- package/dist/audit/supervisor/runLedger.d.ts.map +1 -1
- package/dist/audit/supervisor/runLedger.js +0 -1
- package/dist/audit/supervisor/runLedger.js.map +1 -1
- package/dist/audit/types/analyzerCapability.d.ts +12 -12
- package/dist/audit/types/auditScope.d.ts +4 -19
- package/dist/audit/types/auditScope.d.ts.map +1 -1
- package/dist/audit/types/auditScope.js +2 -13
- package/dist/audit/types/auditScope.js.map +1 -1
- package/dist/audit/types/designAssessment.d.ts +9 -13
- package/dist/audit/types/designAssessment.d.ts.map +1 -1
- package/dist/audit/types/reviewPlanning.d.ts +24 -29
- package/dist/audit/types/reviewPlanning.d.ts.map +1 -1
- package/dist/audit/types/reviewPlanning.js +2 -7
- package/dist/audit/types/reviewPlanning.js.map +1 -1
- package/dist/audit/types.d.ts +90 -120
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +2 -21
- package/dist/audit/types.js.map +1 -1
- package/dist/audit/validation/anchorGrounding.d.ts +22 -10
- package/dist/audit/validation/anchorGrounding.d.ts.map +1 -1
- package/dist/audit/validation/anchorGrounding.js +0 -13
- package/dist/audit/validation/anchorGrounding.js.map +1 -1
- package/dist/audit/validation/auditResults.d.ts +0 -33
- package/dist/audit/validation/auditResults.d.ts.map +1 -1
- package/dist/audit/validation/auditResults.js +1 -114
- package/dist/audit/validation/auditResults.js.map +1 -1
- package/dist/remediate/index.d.ts +0 -8
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +49 -127
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +6 -6
- package/dist/remediate/phases/close.d.ts +5 -17
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +30 -258
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts +4 -4
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +14 -11
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
- package/dist/remediate/phases/constants.d.ts +0 -1
- package/dist/remediate/phases/constants.d.ts.map +1 -1
- package/dist/remediate/phases/constants.js +0 -1
- package/dist/remediate/phases/constants.js.map +1 -1
- package/dist/remediate/phases/plan.d.ts +5 -30
- package/dist/remediate/phases/plan.d.ts.map +1 -1
- package/dist/remediate/phases/plan.js +34 -191
- package/dist/remediate/phases/plan.js.map +1 -1
- package/dist/remediate/phases/triage.d.ts.map +1 -1
- package/dist/remediate/phases/triage.js +33 -57
- package/dist/remediate/phases/triage.js.map +1 -1
- package/dist/remediate/review/autonomousGate.js +1 -1
- package/dist/remediate/review/autonomousGate.js.map +1 -1
- package/dist/remediate/state/closingActions.d.ts +1 -1
- package/dist/remediate/state/closingActions.d.ts.map +1 -1
- package/dist/remediate/state/closingActions.js +0 -1
- package/dist/remediate/state/closingActions.js.map +1 -1
- package/dist/remediate/state/store.d.ts +16 -45
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +12 -0
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +58 -30
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +22 -2
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +1 -8
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +122 -144
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/dispatch/common.d.ts +0 -42
- package/dist/remediate/steps/dispatch/common.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/common.js +1 -96
- package/dist/remediate/steps/dispatch/common.js.map +1 -1
- package/dist/remediate/steps/dispatch/dagNodeFields.d.ts +0 -12
- package/dist/remediate/steps/dispatch/dagNodeFields.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/dagNodeFields.js +4 -18
- package/dist/remediate/steps/dispatch/dagNodeFields.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +110 -0
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -0
- package/dist/remediate/steps/dispatch/hostHandoff.js +921 -0
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -0
- package/dist/remediate/steps/dispatch/implementPrompt.d.ts +0 -38
- package/dist/remediate/steps/dispatch/implementPrompt.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/implementPrompt.js +3 -479
- package/dist/remediate/steps/dispatch/implementPrompt.js.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.d.ts +5 -38
- package/dist/remediate/steps/dispatch/marshal.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.js +4 -1332
- package/dist/remediate/steps/dispatch/marshal.js.map +1 -1
- package/dist/remediate/steps/dispatch/verifyCommands.d.ts +1 -13
- package/dist/remediate/steps/dispatch/verifyCommands.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/verifyCommands.js +1 -21
- package/dist/remediate/steps/dispatch/verifyCommands.js.map +1 -1
- package/dist/remediate/steps/dispatch/writeScope.d.ts +6 -107
- package/dist/remediate/steps/dispatch/writeScope.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/writeScope.js +32 -286
- package/dist/remediate/steps/dispatch/writeScope.js.map +1 -1
- package/dist/remediate/steps/dispatch.d.ts +7 -12
- package/dist/remediate/steps/dispatch.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch.js +6 -8
- package/dist/remediate/steps/dispatch.js.map +1 -1
- package/dist/remediate/steps/gateCommands.d.ts +0 -29
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
- package/dist/remediate/steps/gateCommands.js +0 -35
- package/dist/remediate/steps/gateCommands.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +9 -408
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +147 -1618
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +1 -2
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/sessionConfigLoad.d.ts +3 -42
- package/dist/remediate/steps/sessionConfigLoad.d.ts.map +1 -1
- package/dist/remediate/steps/sessionConfigLoad.js +3 -37
- package/dist/remediate/steps/sessionConfigLoad.js.map +1 -1
- package/dist/remediate/steps/stepUtils.d.ts +10 -47
- package/dist/remediate/steps/stepUtils.d.ts.map +1 -1
- package/dist/remediate/steps/stepUtils.js +11 -67
- package/dist/remediate/steps/stepUtils.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +2 -81
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/utils/fileIntegrity.d.ts.map +1 -1
- package/dist/remediate/utils/fileIntegrity.js +57 -5
- package/dist/remediate/utils/fileIntegrity.js.map +1 -1
- package/dist/remediate/validation/contractPipeline.d.ts +1 -1
- package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipeline.js +1 -1
- package/dist/remediate/validation/contractPipeline.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +1 -39
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +1 -67
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/shared/affinityArtifacts.d.ts +42 -0
- package/dist/shared/affinityArtifacts.d.ts.map +1 -0
- package/dist/shared/affinityArtifacts.js +142 -0
- package/dist/shared/affinityArtifacts.js.map +1 -0
- package/dist/shared/analyzerPolicy.d.ts +40 -0
- package/dist/shared/analyzerPolicy.d.ts.map +1 -0
- package/dist/shared/analyzerPolicy.js +102 -0
- package/dist/shared/analyzerPolicy.js.map +1 -0
- package/dist/shared/analyzers/acquisitionEngine.d.ts +1 -1
- package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
- package/dist/shared/analyzers/types.d.ts +20 -20
- package/dist/shared/artifactFreshness.d.ts.map +1 -1
- package/dist/shared/artifactFreshness.js +5 -4
- package/dist/shared/artifactFreshness.js.map +1 -1
- package/dist/shared/constitutionalDocPaths.d.ts.map +1 -1
- package/dist/shared/constitutionalDocPaths.js +0 -1
- package/dist/shared/constitutionalDocPaths.js.map +1 -1
- package/dist/shared/contentKey.d.ts +1 -42
- package/dist/shared/contentKey.d.ts.map +1 -1
- package/dist/shared/contentKey.js +1 -45
- package/dist/shared/contentKey.js.map +1 -1
- package/dist/shared/decompose/charterClarification.d.ts +1 -1
- package/dist/shared/decompose/charterClarification.js +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts +20 -20
- package/dist/shared/decompose/charterExtraction.js +1 -1
- package/dist/shared/decompose/charterExtraction.js.map +1 -1
- package/dist/shared/decompose/contentCoherence.d.ts +382 -0
- package/dist/shared/decompose/contentCoherence.d.ts.map +1 -0
- package/dist/shared/decompose/contentCoherence.js +290 -0
- package/dist/shared/decompose/contentCoherence.js.map +1 -0
- package/dist/shared/decompose/systemicChallenge.d.ts +4 -4
- package/dist/shared/decompose/systemicChallenge.js +1 -1
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/friction/frictionRecord.js +1 -1
- package/dist/shared/friction/frictionRecord.js.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.d.ts +13 -175
- package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.js +6 -232
- package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
- package/dist/shared/friction/triage.d.ts +3 -3
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +3 -20
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/hostAssets.d.ts +3 -5
- package/dist/shared/hostAssets.d.ts.map +1 -1
- package/dist/shared/hostAssets.js +6 -7
- package/dist/shared/hostAssets.js.map +1 -1
- package/dist/shared/index.d.ts +32 -155
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +19 -133
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/io/artifactName.js +2 -2
- package/dist/shared/io/artifactName.js.map +1 -1
- package/dist/shared/io/auditToolsPaths.d.ts +26 -6
- package/dist/shared/io/auditToolsPaths.d.ts.map +1 -1
- package/dist/shared/io/auditToolsPaths.js +31 -7
- package/dist/shared/io/auditToolsPaths.js.map +1 -1
- package/dist/shared/io/fileLock.d.ts.map +1 -0
- package/dist/shared/io/fileLock.js.map +1 -0
- package/dist/shared/io/json.d.ts +1 -1
- package/dist/shared/io/json.js +1 -1
- package/dist/shared/io/lockedJsonStore.d.ts +1 -1
- package/dist/shared/io/lockedJsonStore.js +4 -4
- package/dist/shared/io/lockedJsonStore.js.map +1 -1
- package/dist/shared/io/nodeWorktreeGuard.d.ts +14 -15
- package/dist/shared/io/nodeWorktreeGuard.d.ts.map +1 -1
- package/dist/shared/io/nodeWorktreeGuard.js +14 -15
- package/dist/shared/io/nodeWorktreeGuard.js.map +1 -1
- package/dist/shared/io/pathContainment.d.ts +3 -5
- package/dist/shared/io/pathContainment.d.ts.map +1 -1
- package/dist/shared/io/pathContainment.js.map +1 -1
- package/dist/shared/io/pathIdentity.d.ts.map +1 -0
- package/dist/shared/io/pathIdentity.js.map +1 -0
- package/dist/shared/io/schemaVersion.d.ts +5 -4
- package/dist/shared/io/schemaVersion.d.ts.map +1 -1
- package/dist/shared/io/schemaVersion.js +17 -5
- package/dist/shared/io/schemaVersion.js.map +1 -1
- package/dist/shared/io/stateDir.d.ts +3 -6
- package/dist/shared/io/stateDir.d.ts.map +1 -1
- package/dist/shared/io/stateDir.js +3 -6
- package/dist/shared/io/stateDir.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts +3 -3
- package/dist/shared/io/stepContractWriter.js +3 -3
- package/dist/shared/loopCorePaths.d.ts.map +1 -1
- package/dist/shared/loopCorePaths.js +12 -14
- package/dist/shared/loopCorePaths.js.map +1 -1
- package/dist/shared/observability/runLog.d.ts +1 -2
- package/dist/shared/observability/runLog.d.ts.map +1 -1
- package/dist/shared/observability/runLog.js.map +1 -1
- package/dist/shared/prompts.d.ts +5 -7
- package/dist/shared/prompts.d.ts.map +1 -1
- package/dist/shared/prompts.js +2 -3
- package/dist/shared/prompts.js.map +1 -1
- package/dist/shared/reporting/auditDeliverable.d.ts.map +1 -1
- package/dist/shared/reporting/auditDeliverable.js +37 -2
- package/dist/shared/reporting/auditDeliverable.js.map +1 -1
- package/dist/shared/sessionConfig.d.ts +30 -0
- package/dist/shared/sessionConfig.d.ts.map +1 -0
- package/dist/shared/sessionConfig.js +78 -0
- package/dist/shared/sessionConfig.js.map +1 -0
- package/dist/shared/stableStringify.d.ts +0 -12
- package/dist/shared/stableStringify.d.ts.map +1 -1
- package/dist/shared/stableStringify.js +4 -1
- package/dist/shared/stableStringify.js.map +1 -1
- package/dist/shared/submission/expectedSubmissions.d.ts +88 -0
- package/dist/shared/submission/expectedSubmissions.d.ts.map +1 -0
- package/dist/shared/submission/expectedSubmissions.js +84 -0
- package/dist/shared/submission/expectedSubmissions.js.map +1 -0
- package/dist/shared/submission/handRecovery.d.ts +37 -0
- package/dist/shared/submission/handRecovery.d.ts.map +1 -0
- package/dist/shared/submission/handRecovery.js +123 -0
- package/dist/shared/submission/handRecovery.js.map +1 -0
- package/dist/shared/submission/submissionClassifier.d.ts +48 -0
- package/dist/shared/submission/submissionClassifier.d.ts.map +1 -0
- package/dist/shared/submission/submissionClassifier.js +83 -0
- package/dist/shared/submission/submissionClassifier.js.map +1 -0
- package/dist/shared/submission/submissionIdentity.d.ts +49 -0
- package/dist/shared/submission/submissionIdentity.d.ts.map +1 -0
- package/dist/shared/submission/submissionIdentity.js +90 -0
- package/dist/shared/submission/submissionIdentity.js.map +1 -0
- package/dist/shared/submission/submissionLedger.d.ts +37 -0
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -0
- package/dist/shared/submission/submissionLedger.js +81 -0
- package/dist/shared/submission/submissionLedger.js.map +1 -0
- package/dist/shared/tokens.d.ts +0 -11
- package/dist/shared/tokens.d.ts.map +1 -1
- package/dist/shared/tokens.js +2 -32
- package/dist/shared/tokens.js.map +1 -1
- package/dist/shared/tooling/allowlistedExec.d.ts +1 -1
- package/dist/shared/tooling/allowlistedExec.js +4 -4
- package/dist/shared/tooling/allowlistedExec.js.map +1 -1
- package/dist/shared/tooling/exec.d.ts +6 -6
- package/dist/shared/tooling/exec.d.ts.map +1 -1
- package/dist/shared/tooling/exec.js +9 -11
- package/dist/shared/tooling/exec.js.map +1 -1
- package/dist/shared/tooling/projectTestAdmission.d.ts +1 -1
- package/dist/shared/tooling/projectTestAdmission.js +3 -3
- package/dist/shared/tooling/projectTestAdmission.js.map +1 -1
- package/dist/shared/types/accessMemory.d.ts +6 -6
- package/dist/shared/types/charter.d.ts +19 -19
- package/dist/shared/types/charter.js +3 -3
- package/dist/shared/types/contractPipeline/verification.d.ts +0 -2
- package/dist/shared/types/contractPipeline/verification.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline.d.ts +12 -1
- package/dist/shared/types/contractPipeline.d.ts.map +1 -1
- package/dist/shared/types/contractPipeline.js.map +1 -1
- package/dist/shared/types/executionRecord.d.ts +58 -0
- package/dist/shared/types/executionRecord.d.ts.map +1 -0
- package/dist/shared/types/executionRecord.js +26 -0
- package/dist/shared/types/executionRecord.js.map +1 -0
- package/dist/shared/types/finding.d.ts +671 -43
- package/dist/shared/types/finding.d.ts.map +1 -1
- package/dist/shared/types/finding.js +47 -13
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/types/intentCheckpoint.d.ts +30 -31
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +2 -3
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/types/remediationOutcome.d.ts +6 -6
- package/dist/shared/types/runLedger.d.ts +0 -1
- package/dist/shared/types/runLedger.d.ts.map +1 -1
- package/dist/shared/types/stepContract.d.ts +0 -6
- package/dist/shared/types/stepContract.d.ts.map +1 -1
- package/dist/shared/types/stepContract.js +0 -1
- package/dist/shared/types/stepContract.js.map +1 -1
- package/dist/shared/validation/findingsReport.d.ts +17 -1
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +137 -1
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/contracts.md +75 -201
- package/docs/audit-pkg/development.md +8 -7
- package/docs/audit-pkg/operator-guide.md +72 -174
- package/docs/audit-pkg/product.md +8 -15
- package/docs/audit-pkg/release.md +10 -21
- package/opencode.json +0 -34
- package/package.json +3 -5
- package/schemas/audit_result.schema.json +1 -17
- package/schemas/audit_results.schema.json +1 -17
- package/schemas/finding.schema.json +1 -1
- package/scripts/audit/postinstall.mjs +0 -8
- package/scripts/remediate/postinstall.mjs +27 -12
- package/skills/audit-code/SKILL.md +32 -150
- package/skills/audit-code/audit-code.prompt.md +24 -86
- package/skills/remediate-code/SKILL.md +27 -64
- package/skills/remediate-code/remediate-code.prompt.md +22 -79
- package/wrapper/audit-code-wrapper-install-hosts.mjs +3 -5
- package/wrapper/audit-code-wrapper-install-renderers.mjs +2 -2
- package/wrapper/audit-code-wrapper-lib.mjs +3 -23
- package/wrapper/audit-code-wrapper-opencode.mjs +21 -16
- package/wrapper/remediate-code-wrapper-install-hosts.mjs +5 -6
- package/wrapper/remediate-code-wrapper-install-renderers.mjs +1 -2
- package/wrapper/remediate-code-wrapper-opencode.mjs +31 -10
- package/dist/audit/cli/advanceAuditCommand.d.ts +0 -2
- package/dist/audit/cli/advanceAuditCommand.d.ts.map +0 -1
- package/dist/audit/cli/advanceAuditCommand.js +0 -104
- package/dist/audit/cli/advanceAuditCommand.js.map +0 -1
- package/dist/audit/cli/dispatch/hostFanoutGate.d.ts +0 -36
- package/dist/audit/cli/dispatch/hostFanoutGate.d.ts.map +0 -1
- package/dist/audit/cli/dispatch/hostFanoutGate.js +0 -28
- package/dist/audit/cli/dispatch/hostFanoutGate.js.map +0 -1
- package/dist/audit/cli/dispatch/packetPrompt.d.ts +0 -49
- package/dist/audit/cli/dispatch/packetPrompt.d.ts.map +0 -1
- package/dist/audit/cli/dispatch/packetPrompt.js +0 -355
- package/dist/audit/cli/dispatch/packetPrompt.js.map +0 -1
- package/dist/audit/cli/dispatch/paths.d.ts +0 -7
- package/dist/audit/cli/dispatch/paths.d.ts.map +0 -1
- package/dist/audit/cli/dispatch/paths.js +0 -32
- package/dist/audit/cli/dispatch/paths.js.map +0 -1
- package/dist/audit/cli/dispatch/pausePersist.d.ts +0 -111
- package/dist/audit/cli/dispatch/pausePersist.d.ts.map +0 -1
- package/dist/audit/cli/dispatch/pausePersist.js +0 -252
- package/dist/audit/cli/dispatch/pausePersist.js.map +0 -1
- package/dist/audit/cli/dispatch/quotaPool.d.ts +0 -142
- package/dist/audit/cli/dispatch/quotaPool.d.ts.map +0 -1
- package/dist/audit/cli/dispatch/quotaPool.js +0 -232
- package/dist/audit/cli/dispatch/quotaPool.js.map +0 -1
- package/dist/audit/cli/dispatch/sizingWindow.d.ts +0 -46
- package/dist/audit/cli/dispatch/sizingWindow.d.ts.map +0 -1
- package/dist/audit/cli/dispatch/sizingWindow.js +0 -34
- package/dist/audit/cli/dispatch/sizingWindow.js.map +0 -1
- package/dist/audit/cli/dispatch/tierRouting.d.ts +0 -64
- package/dist/audit/cli/dispatch/tierRouting.d.ts.map +0 -1
- package/dist/audit/cli/dispatch/tierRouting.js +0 -172
- package/dist/audit/cli/dispatch/tierRouting.js.map +0 -1
- package/dist/audit/cli/dispatch/tokenUsageObservation.d.ts +0 -91
- package/dist/audit/cli/dispatch/tokenUsageObservation.d.ts.map +0 -1
- package/dist/audit/cli/dispatch/tokenUsageObservation.js +0 -218
- package/dist/audit/cli/dispatch/tokenUsageObservation.js.map +0 -1
- package/dist/audit/cli/dispatch/types.d.ts +0 -144
- package/dist/audit/cli/dispatch/types.d.ts.map +0 -1
- package/dist/audit/cli/dispatch/types.js +0 -15
- package/dist/audit/cli/dispatch/types.js.map +0 -1
- package/dist/audit/cli/dispatchAttempted.d.ts +0 -26
- package/dist/audit/cli/dispatchAttempted.d.ts.map +0 -1
- package/dist/audit/cli/dispatchAttempted.js +0 -71
- package/dist/audit/cli/dispatchAttempted.js.map +0 -1
- package/dist/audit/cli/dispatchStatusCommand.d.ts +0 -2
- package/dist/audit/cli/dispatchStatusCommand.d.ts.map +0 -1
- package/dist/audit/cli/dispatchStatusCommand.js +0 -81
- package/dist/audit/cli/dispatchStatusCommand.js.map +0 -1
- package/dist/audit/cli/hybridDispatch.d.ts +0 -68
- package/dist/audit/cli/hybridDispatch.d.ts.map +0 -1
- package/dist/audit/cli/hybridDispatch.js +0 -85
- package/dist/audit/cli/hybridDispatch.js.map +0 -1
- package/dist/audit/cli/mergeAndIngestCommand.d.ts +0 -165
- package/dist/audit/cli/mergeAndIngestCommand.d.ts.map +0 -1
- package/dist/audit/cli/mergeAndIngestCommand.js +0 -945
- package/dist/audit/cli/mergeAndIngestCommand.js.map +0 -1
- package/dist/audit/cli/ownerTokens.d.ts +0 -21
- package/dist/audit/cli/ownerTokens.d.ts.map +0 -1
- package/dist/audit/cli/ownerTokens.js +0 -86
- package/dist/audit/cli/ownerTokens.js.map +0 -1
- package/dist/audit/cli/prepareDispatchCommand.d.ts +0 -34
- package/dist/audit/cli/prepareDispatchCommand.d.ts.map +0 -1
- package/dist/audit/cli/prepareDispatchCommand.js +0 -69
- package/dist/audit/cli/prepareDispatchCommand.js.map +0 -1
- package/dist/audit/cli/quotaCommand.d.ts +0 -2
- package/dist/audit/cli/quotaCommand.d.ts.map +0 -1
- package/dist/audit/cli/quotaCommand.js +0 -68
- package/dist/audit/cli/quotaCommand.js.map +0 -1
- package/dist/audit/cli/rollingAuditDispatch.d.ts +0 -206
- package/dist/audit/cli/rollingAuditDispatch.d.ts.map +0 -1
- package/dist/audit/cli/rollingAuditDispatch.js +0 -633
- package/dist/audit/cli/rollingAuditDispatch.js.map +0 -1
- package/dist/audit/cli/scoreTokensCommand.d.ts +0 -18
- package/dist/audit/cli/scoreTokensCommand.d.ts.map +0 -1
- package/dist/audit/cli/scoreTokensCommand.js +0 -129
- package/dist/audit/cli/scoreTokensCommand.js.map +0 -1
- package/dist/audit/cli/submitPacketCommand.d.ts +0 -2
- package/dist/audit/cli/submitPacketCommand.d.ts.map +0 -1
- package/dist/audit/cli/submitPacketCommand.js +0 -139
- package/dist/audit/cli/submitPacketCommand.js.map +0 -1
- package/dist/audit/cli/validateResultCommand.d.ts +0 -2
- package/dist/audit/cli/validateResultCommand.d.ts.map +0 -1
- package/dist/audit/cli/validateResultCommand.js +0 -105
- package/dist/audit/cli/validateResultCommand.js.map +0 -1
- package/dist/audit/cli/waveManifest.d.ts +0 -41
- package/dist/audit/cli/waveManifest.d.ts.map +0 -1
- package/dist/audit/cli/waveManifest.js +0 -42
- package/dist/audit/cli/waveManifest.js.map +0 -1
- package/dist/audit/cli/workPartitionRuntime.d.ts +0 -11
- package/dist/audit/cli/workPartitionRuntime.d.ts.map +0 -1
- package/dist/audit/cli/workPartitionRuntime.js +0 -42
- package/dist/audit/cli/workPartitionRuntime.js.map +0 -1
- package/dist/audit/cli/workerRunCommand.d.ts +0 -16
- package/dist/audit/cli/workerRunCommand.d.ts.map +0 -1
- package/dist/audit/cli/workerRunCommand.js +0 -153
- package/dist/audit/cli/workerRunCommand.js.map +0 -1
- package/dist/audit/contracts/schemaEnforcedEmit.d.ts +0 -75
- package/dist/audit/contracts/schemaEnforcedEmit.d.ts.map +0 -1
- package/dist/audit/contracts/schemaEnforcedEmit.js +0 -131
- package/dist/audit/contracts/schemaEnforcedEmit.js.map +0 -1
- package/dist/audit/orchestrator/reviewPacketGraphClustering.d.ts +0 -4
- package/dist/audit/orchestrator/reviewPacketGraphClustering.d.ts.map +0 -1
- package/dist/audit/orchestrator/reviewPacketGraphClustering.js +0 -473
- package/dist/audit/orchestrator/reviewPacketGraphClustering.js.map +0 -1
- package/dist/audit/orchestrator/rollingDispatch.d.ts +0 -64
- package/dist/audit/orchestrator/rollingDispatch.d.ts.map +0 -1
- package/dist/audit/orchestrator/rollingDispatch.js +0 -147
- package/dist/audit/orchestrator/rollingDispatch.js.map +0 -1
- package/dist/audit/orchestrator/unionFind.d.ts +0 -8
- package/dist/audit/orchestrator/unionFind.d.ts.map +0 -1
- package/dist/audit/orchestrator/unionFind.js +0 -43
- package/dist/audit/orchestrator/unionFind.js.map +0 -1
- package/dist/audit/prompts/renderWorkerPrompt.d.ts +0 -3
- package/dist/audit/prompts/renderWorkerPrompt.d.ts.map +0 -1
- package/dist/audit/prompts/renderWorkerPrompt.js +0 -87
- package/dist/audit/prompts/renderWorkerPrompt.js.map +0 -1
- package/dist/audit/providers/constants.d.ts +0 -2
- package/dist/audit/providers/constants.d.ts.map +0 -1
- package/dist/audit/providers/constants.js +0 -2
- package/dist/audit/providers/constants.js.map +0 -1
- package/dist/audit/providers/index.d.ts +0 -19
- package/dist/audit/providers/index.d.ts.map +0 -1
- package/dist/audit/providers/index.js +0 -23
- package/dist/audit/providers/index.js.map +0 -1
- package/dist/audit/quota/discoveredLimits.d.ts +0 -39
- package/dist/audit/quota/discoveredLimits.d.ts.map +0 -1
- package/dist/audit/quota/discoveredLimits.js +0 -96
- package/dist/audit/quota/discoveredLimits.js.map +0 -1
- package/dist/audit/quota/hostLimits.d.ts +0 -7
- package/dist/audit/quota/hostLimits.d.ts.map +0 -1
- package/dist/audit/quota/hostLimits.js +0 -6
- package/dist/audit/quota/hostLimits.js.map +0 -1
- package/dist/audit/quota/index.d.ts +0 -12
- package/dist/audit/quota/index.d.ts.map +0 -1
- package/dist/audit/quota/index.js +0 -19
- package/dist/audit/quota/index.js.map +0 -1
- package/dist/audit/reporting/scoreTokens.d.ts +0 -112
- package/dist/audit/reporting/scoreTokens.d.ts.map +0 -1
- package/dist/audit/reporting/scoreTokens.js +0 -188
- package/dist/audit/reporting/scoreTokens.js.map +0 -1
- package/dist/audit/supervisor/sessionConfig.d.ts +0 -19
- package/dist/audit/supervisor/sessionConfig.d.ts.map +0 -1
- package/dist/audit/supervisor/sessionConfig.js +0 -98
- package/dist/audit/supervisor/sessionConfig.js.map +0 -1
- package/dist/audit/types/activeDispatch.d.ts +0 -83
- package/dist/audit/types/activeDispatch.d.ts.map +0 -1
- package/dist/audit/types/activeDispatch.js +0 -3
- package/dist/audit/types/activeDispatch.js.map +0 -1
- package/dist/audit/types/workerSession.d.ts +0 -28
- package/dist/audit/types/workerSession.d.ts.map +0 -1
- package/dist/audit/types/workerSession.js +0 -5
- package/dist/audit/types/workerSession.js.map +0 -1
- package/dist/audit/validation/sessionConfig.d.ts +0 -7
- package/dist/audit/validation/sessionConfig.d.ts.map +0 -1
- package/dist/audit/validation/sessionConfig.js +0 -84
- package/dist/audit/validation/sessionConfig.js.map +0 -1
- package/dist/remediate/dispatch/amendmentClaim.d.ts +0 -48
- package/dist/remediate/dispatch/amendmentClaim.d.ts.map +0 -1
- package/dist/remediate/dispatch/amendmentClaim.js +0 -67
- package/dist/remediate/dispatch/amendmentClaim.js.map +0 -1
- package/dist/remediate/dispatch/ownershipRegistry.d.ts +0 -266
- package/dist/remediate/dispatch/ownershipRegistry.d.ts.map +0 -1
- package/dist/remediate/dispatch/ownershipRegistry.js +0 -515
- package/dist/remediate/dispatch/ownershipRegistry.js.map +0 -1
- package/dist/remediate/phases/workerTasks.d.ts +0 -21
- package/dist/remediate/phases/workerTasks.d.ts.map +0 -1
- package/dist/remediate/phases/workerTasks.js +0 -31
- package/dist/remediate/phases/workerTasks.js.map +0 -1
- package/dist/remediate/providers/constants.d.ts +0 -2
- package/dist/remediate/providers/constants.d.ts.map +0 -1
- package/dist/remediate/providers/constants.js +0 -2
- package/dist/remediate/providers/constants.js.map +0 -1
- package/dist/remediate/providers/index.d.ts +0 -19
- package/dist/remediate/providers/index.d.ts.map +0 -1
- package/dist/remediate/providers/index.js +0 -23
- package/dist/remediate/providers/index.js.map +0 -1
- package/dist/remediate/quota/hostLimits.d.ts +0 -7
- package/dist/remediate/quota/hostLimits.d.ts.map +0 -1
- package/dist/remediate/quota/hostLimits.js +0 -6
- package/dist/remediate/quota/hostLimits.js.map +0 -1
- package/dist/remediate/quota/index.d.ts +0 -8
- package/dist/remediate/quota/index.d.ts.map +0 -1
- package/dist/remediate/quota/index.js +0 -12
- package/dist/remediate/quota/index.js.map +0 -1
- package/dist/remediate/steps/dispatch/acceptNode.d.ts +0 -328
- package/dist/remediate/steps/dispatch/acceptNode.d.ts.map +0 -1
- package/dist/remediate/steps/dispatch/acceptNode.js +0 -722
- package/dist/remediate/steps/dispatch/acceptNode.js.map +0 -1
- package/dist/remediate/steps/dispatch/acceptReconcile.d.ts +0 -66
- package/dist/remediate/steps/dispatch/acceptReconcile.d.ts.map +0 -1
- package/dist/remediate/steps/dispatch/acceptReconcile.js +0 -154
- package/dist/remediate/steps/dispatch/acceptReconcile.js.map +0 -1
- package/dist/remediate/steps/dispatch/nodeArtifacts.d.ts +0 -41
- package/dist/remediate/steps/dispatch/nodeArtifacts.d.ts.map +0 -1
- package/dist/remediate/steps/dispatch/nodeArtifacts.js +0 -81
- package/dist/remediate/steps/dispatch/nodeArtifacts.js.map +0 -1
- package/dist/remediate/steps/dispatch/waveScheduling.d.ts +0 -123
- package/dist/remediate/steps/dispatch/waveScheduling.d.ts.map +0 -1
- package/dist/remediate/steps/dispatch/waveScheduling.js +0 -213
- package/dist/remediate/steps/dispatch/waveScheduling.js.map +0 -1
- package/dist/remediate/steps/dispatch/worktreeLifecycle.d.ts +0 -239
- package/dist/remediate/steps/dispatch/worktreeLifecycle.d.ts.map +0 -1
- package/dist/remediate/steps/dispatch/worktreeLifecycle.js +0 -875
- package/dist/remediate/steps/dispatch/worktreeLifecycle.js.map +0 -1
- package/dist/remediate/steps/providerNodeDispatch.d.ts +0 -57
- package/dist/remediate/steps/providerNodeDispatch.d.ts.map +0 -1
- package/dist/remediate/steps/providerNodeDispatch.js +0 -97
- package/dist/remediate/steps/providerNodeDispatch.js.map +0 -1
- package/dist/remediate/steps/rollingSession.d.ts +0 -283
- package/dist/remediate/steps/rollingSession.d.ts.map +0 -1
- package/dist/remediate/steps/rollingSession.js +0 -718
- package/dist/remediate/steps/rollingSession.js.map +0 -1
- package/dist/remediate/types/workerSession.d.ts +0 -35
- package/dist/remediate/types/workerSession.d.ts.map +0 -1
- package/dist/remediate/types/workerSession.js +0 -5
- package/dist/remediate/types/workerSession.js.map +0 -1
- package/dist/shared/config/resolveSessionConfig.d.ts +0 -75
- package/dist/shared/config/resolveSessionConfig.d.ts.map +0 -1
- package/dist/shared/config/resolveSessionConfig.js +0 -126
- package/dist/shared/config/resolveSessionConfig.js.map +0 -1
- package/dist/shared/data/model-statics.generated.json +0 -18939
- package/dist/shared/decompose/workPartition.d.ts +0 -66
- package/dist/shared/decompose/workPartition.d.ts.map +0 -1
- package/dist/shared/decompose/workPartition.js +0 -523
- package/dist/shared/decompose/workPartition.js.map +0 -1
- package/dist/shared/dispatch/admissionLeaseReconcile.d.ts +0 -20
- package/dist/shared/dispatch/admissionLeaseReconcile.d.ts.map +0 -1
- package/dist/shared/dispatch/admissionLeaseReconcile.js +0 -36
- package/dist/shared/dispatch/admissionLeaseReconcile.js.map +0 -1
- package/dist/shared/dispatch/admissionLoop.d.ts +0 -875
- package/dist/shared/dispatch/admissionLoop.d.ts.map +0 -1
- package/dist/shared/dispatch/admissionLoop.js +0 -692
- package/dist/shared/dispatch/admissionLoop.js.map +0 -1
- package/dist/shared/dispatch/coordinator.d.ts +0 -189
- package/dist/shared/dispatch/coordinator.d.ts.map +0 -1
- package/dist/shared/dispatch/coordinator.js +0 -258
- package/dist/shared/dispatch/coordinator.js.map +0 -1
- package/dist/shared/dispatch/costRank.d.ts +0 -25
- package/dist/shared/dispatch/costRank.d.ts.map +0 -1
- package/dist/shared/dispatch/costRank.js +0 -34
- package/dist/shared/dispatch/costRank.js.map +0 -1
- package/dist/shared/dispatch/dispatchDecisionLog.d.ts +0 -142
- package/dist/shared/dispatch/dispatchDecisionLog.d.ts.map +0 -1
- package/dist/shared/dispatch/dispatchDecisionLog.js +0 -65
- package/dist/shared/dispatch/dispatchDecisionLog.js.map +0 -1
- package/dist/shared/dispatch/dispatchQuotaContract.d.ts +0 -1052
- package/dist/shared/dispatch/dispatchQuotaContract.d.ts.map +0 -1
- package/dist/shared/dispatch/dispatchQuotaContract.js +0 -75
- package/dist/shared/dispatch/dispatchQuotaContract.js.map +0 -1
- package/dist/shared/dispatch/hostDispatchWall.d.ts +0 -107
- package/dist/shared/dispatch/hostDispatchWall.d.ts.map +0 -1
- package/dist/shared/dispatch/hostDispatchWall.js +0 -90
- package/dist/shared/dispatch/hostDispatchWall.js.map +0 -1
- package/dist/shared/dispatch/hybridDispatch.d.ts +0 -94
- package/dist/shared/dispatch/hybridDispatch.d.ts.map +0 -1
- package/dist/shared/dispatch/hybridDispatch.js +0 -60
- package/dist/shared/dispatch/hybridDispatch.js.map +0 -1
- package/dist/shared/dispatch/ownershipScheduler.d.ts +0 -101
- package/dist/shared/dispatch/ownershipScheduler.d.ts.map +0 -1
- package/dist/shared/dispatch/ownershipScheduler.js +0 -151
- package/dist/shared/dispatch/ownershipScheduler.js.map +0 -1
- package/dist/shared/dispatch/pathIdentity.d.ts.map +0 -1
- package/dist/shared/dispatch/pathIdentity.js.map +0 -1
- package/dist/shared/dispatch/providerDispatchPrep.d.ts +0 -65
- package/dist/shared/dispatch/providerDispatchPrep.d.ts.map +0 -1
- package/dist/shared/dispatch/providerDispatchPrep.js +0 -66
- package/dist/shared/dispatch/providerDispatchPrep.js.map +0 -1
- package/dist/shared/dispatch/providerLaunchFinalize.d.ts +0 -54
- package/dist/shared/dispatch/providerLaunchFinalize.d.ts.map +0 -1
- package/dist/shared/dispatch/providerLaunchFinalize.js +0 -275
- package/dist/shared/dispatch/providerLaunchFinalize.js.map +0 -1
- package/dist/shared/dispatch/rollingDispatch.d.ts +0 -598
- package/dist/shared/dispatch/rollingDispatch.d.ts.map +0 -1
- package/dist/shared/dispatch/rollingDispatch.js +0 -1488
- package/dist/shared/dispatch/rollingDispatch.js.map +0 -1
- package/dist/shared/dispatch/settledPools.d.ts +0 -55
- package/dist/shared/dispatch/settledPools.d.ts.map +0 -1
- package/dist/shared/dispatch/settledPools.js +0 -74
- package/dist/shared/dispatch/settledPools.js.map +0 -1
- package/dist/shared/dispatch/tierRank.d.ts +0 -53
- package/dist/shared/dispatch/tierRank.d.ts.map +0 -1
- package/dist/shared/dispatch/tierRank.js +0 -69
- package/dist/shared/dispatch/tierRank.js.map +0 -1
- package/dist/shared/dispatch/unifiedRolling.d.ts +0 -219
- package/dist/shared/dispatch/unifiedRolling.d.ts.map +0 -1
- package/dist/shared/dispatch/unifiedRolling.js +0 -214
- package/dist/shared/dispatch/unifiedRolling.js.map +0 -1
- package/dist/shared/friction/blindDispatchFriction.d.ts +0 -26
- package/dist/shared/friction/blindDispatchFriction.d.ts.map +0 -1
- package/dist/shared/friction/blindDispatchFriction.js +0 -41
- package/dist/shared/friction/blindDispatchFriction.js.map +0 -1
- package/dist/shared/io/tokenUsageLedger.d.ts +0 -58
- package/dist/shared/io/tokenUsageLedger.d.ts.map +0 -1
- package/dist/shared/io/tokenUsageLedger.js +0 -53
- package/dist/shared/io/tokenUsageLedger.js.map +0 -1
- package/dist/shared/providers/agyProvider.d.ts +0 -23
- package/dist/shared/providers/agyProvider.d.ts.map +0 -1
- package/dist/shared/providers/agyProvider.js +0 -63
- package/dist/shared/providers/agyProvider.js.map +0 -1
- package/dist/shared/providers/auditorSources.d.ts +0 -152
- package/dist/shared/providers/auditorSources.d.ts.map +0 -1
- package/dist/shared/providers/auditorSources.js +0 -391
- package/dist/shared/providers/auditorSources.js.map +0 -1
- package/dist/shared/providers/claudeCodeProvider.d.ts +0 -56
- package/dist/shared/providers/claudeCodeProvider.d.ts.map +0 -1
- package/dist/shared/providers/claudeCodeProvider.js +0 -67
- package/dist/shared/providers/claudeCodeProvider.js.map +0 -1
- package/dist/shared/providers/claudeWorkerProvider.d.ts +0 -71
- package/dist/shared/providers/claudeWorkerProvider.d.ts.map +0 -1
- package/dist/shared/providers/claudeWorkerProvider.js +0 -142
- package/dist/shared/providers/claudeWorkerProvider.js.map +0 -1
- package/dist/shared/providers/codexProvider.d.ts +0 -37
- package/dist/shared/providers/codexProvider.d.ts.map +0 -1
- package/dist/shared/providers/codexProvider.js +0 -85
- package/dist/shared/providers/codexProvider.js.map +0 -1
- package/dist/shared/providers/constants.d.ts +0 -4
- package/dist/shared/providers/constants.d.ts.map +0 -1
- package/dist/shared/providers/constants.js +0 -5
- package/dist/shared/providers/constants.js.map +0 -1
- package/dist/shared/providers/dispatchExclusion.d.ts +0 -44
- package/dist/shared/providers/dispatchExclusion.d.ts.map +0 -1
- package/dist/shared/providers/dispatchExclusion.js +0 -63
- package/dist/shared/providers/dispatchExclusion.js.map +0 -1
- package/dist/shared/providers/identity.d.ts +0 -48
- package/dist/shared/providers/identity.d.ts.map +0 -1
- package/dist/shared/providers/identity.js +0 -51
- package/dist/shared/providers/identity.js.map +0 -1
- package/dist/shared/providers/inProcessWorkers.d.ts +0 -42
- package/dist/shared/providers/inProcessWorkers.d.ts.map +0 -1
- package/dist/shared/providers/inProcessWorkers.js +0 -64
- package/dist/shared/providers/inProcessWorkers.js.map +0 -1
- package/dist/shared/providers/openAiCompatibleProvider.d.ts +0 -132
- package/dist/shared/providers/openAiCompatibleProvider.d.ts.map +0 -1
- package/dist/shared/providers/openAiCompatibleProvider.js +0 -875
- package/dist/shared/providers/openAiCompatibleProvider.js.map +0 -1
- package/dist/shared/providers/opencodeLaunch.d.ts +0 -30
- package/dist/shared/providers/opencodeLaunch.d.ts.map +0 -1
- package/dist/shared/providers/opencodeLaunch.js +0 -72
- package/dist/shared/providers/opencodeLaunch.js.map +0 -1
- package/dist/shared/providers/opencodeProvider.d.ts +0 -27
- package/dist/shared/providers/opencodeProvider.d.ts.map +0 -1
- package/dist/shared/providers/opencodeProvider.js +0 -63
- package/dist/shared/providers/opencodeProvider.js.map +0 -1
- package/dist/shared/providers/orchestratorBindings.d.ts +0 -75
- package/dist/shared/providers/orchestratorBindings.d.ts.map +0 -1
- package/dist/shared/providers/orchestratorBindings.js +0 -66
- package/dist/shared/providers/orchestratorBindings.js.map +0 -1
- package/dist/shared/providers/providerDiagnostics.d.ts +0 -11
- package/dist/shared/providers/providerDiagnostics.d.ts.map +0 -1
- package/dist/shared/providers/providerDiagnostics.js +0 -28
- package/dist/shared/providers/providerDiagnostics.js.map +0 -1
- package/dist/shared/providers/providerFactory.d.ts +0 -173
- package/dist/shared/providers/providerFactory.d.ts.map +0 -1
- package/dist/shared/providers/providerFactory.js +0 -374
- package/dist/shared/providers/providerFactory.js.map +0 -1
- package/dist/shared/providers/providerKeyedFactory.d.ts +0 -14
- package/dist/shared/providers/providerKeyedFactory.d.ts.map +0 -1
- package/dist/shared/providers/providerKeyedFactory.js +0 -16
- package/dist/shared/providers/providerKeyedFactory.js.map +0 -1
- package/dist/shared/providers/providerPathGuard.d.ts +0 -101
- package/dist/shared/providers/providerPathGuard.d.ts.map +0 -1
- package/dist/shared/providers/providerPathGuard.js +0 -177
- package/dist/shared/providers/providerPathGuard.js.map +0 -1
- package/dist/shared/providers/reviewSnapshot.d.ts +0 -55
- package/dist/shared/providers/reviewSnapshot.d.ts.map +0 -1
- package/dist/shared/providers/reviewSnapshot.js +0 -112
- package/dist/shared/providers/reviewSnapshot.js.map +0 -1
- package/dist/shared/providers/spawnLoggedCommand.d.ts +0 -10
- package/dist/shared/providers/spawnLoggedCommand.d.ts.map +0 -1
- package/dist/shared/providers/spawnLoggedCommand.js +0 -345
- package/dist/shared/providers/spawnLoggedCommand.js.map +0 -1
- package/dist/shared/providers/subprocessTemplateProvider.d.ts +0 -19
- package/dist/shared/providers/subprocessTemplateProvider.d.ts.map +0 -1
- package/dist/shared/providers/subprocessTemplateProvider.js +0 -91
- package/dist/shared/providers/subprocessTemplateProvider.js.map +0 -1
- package/dist/shared/providers/types.d.ts +0 -144
- package/dist/shared/providers/types.d.ts.map +0 -1
- package/dist/shared/providers/types.js +0 -2
- package/dist/shared/providers/types.js.map +0 -1
- package/dist/shared/providers/workerCommandProvider.d.ts +0 -10
- package/dist/shared/providers/workerCommandProvider.d.ts.map +0 -1
- package/dist/shared/providers/workerCommandProvider.js +0 -20
- package/dist/shared/providers/workerCommandProvider.js.map +0 -1
- package/dist/shared/providers/workerTaskLaunch.d.ts +0 -32
- package/dist/shared/providers/workerTaskLaunch.d.ts.map +0 -1
- package/dist/shared/providers/workerTaskLaunch.js +0 -27
- package/dist/shared/providers/workerTaskLaunch.js.map +0 -1
- package/dist/shared/quota/accountId.d.ts +0 -107
- package/dist/shared/quota/accountId.d.ts.map +0 -1
- package/dist/shared/quota/accountId.js +0 -151
- package/dist/shared/quota/accountId.js.map +0 -1
- package/dist/shared/quota/antigravityQuotaSource.d.ts +0 -44
- package/dist/shared/quota/antigravityQuotaSource.d.ts.map +0 -1
- package/dist/shared/quota/antigravityQuotaSource.js +0 -103
- package/dist/shared/quota/antigravityQuotaSource.js.map +0 -1
- package/dist/shared/quota/apiPool.d.ts +0 -322
- package/dist/shared/quota/apiPool.d.ts.map +0 -1
- package/dist/shared/quota/apiPool.js +0 -751
- package/dist/shared/quota/apiPool.js.map +0 -1
- package/dist/shared/quota/capacity.d.ts +0 -667
- package/dist/shared/quota/capacity.d.ts.map +0 -1
- package/dist/shared/quota/capacity.js +0 -507
- package/dist/shared/quota/capacity.js.map +0 -1
- package/dist/shared/quota/claimLease.d.ts +0 -32
- package/dist/shared/quota/claimLease.d.ts.map +0 -1
- package/dist/shared/quota/claimLease.js +0 -73
- package/dist/shared/quota/claimLease.js.map +0 -1
- package/dist/shared/quota/claimRegistry.d.ts +0 -118
- package/dist/shared/quota/claimRegistry.d.ts.map +0 -1
- package/dist/shared/quota/claimRegistry.js +0 -246
- package/dist/shared/quota/claimRegistry.js.map +0 -1
- package/dist/shared/quota/claudeCodeJsonLines.d.ts +0 -15
- package/dist/shared/quota/claudeCodeJsonLines.d.ts.map +0 -1
- package/dist/shared/quota/claudeCodeJsonLines.js +0 -34
- package/dist/shared/quota/claudeCodeJsonLines.js.map +0 -1
- package/dist/shared/quota/claudeOAuthQuotaSource.d.ts +0 -97
- package/dist/shared/quota/claudeOAuthQuotaSource.d.ts.map +0 -1
- package/dist/shared/quota/claudeOAuthQuotaSource.js +0 -385
- package/dist/shared/quota/claudeOAuthQuotaSource.js.map +0 -1
- package/dist/shared/quota/codexHostConfig.d.ts +0 -17
- package/dist/shared/quota/codexHostConfig.d.ts.map +0 -1
- package/dist/shared/quota/codexHostConfig.js +0 -43
- package/dist/shared/quota/codexHostConfig.js.map +0 -1
- package/dist/shared/quota/codexQuotaSource.d.ts +0 -52
- package/dist/shared/quota/codexQuotaSource.d.ts.map +0 -1
- package/dist/shared/quota/codexQuotaSource.js +0 -106
- package/dist/shared/quota/codexQuotaSource.js.map +0 -1
- package/dist/shared/quota/compositeQuotaSource.d.ts +0 -83
- package/dist/shared/quota/compositeQuotaSource.d.ts.map +0 -1
- package/dist/shared/quota/compositeQuotaSource.js +0 -152
- package/dist/shared/quota/compositeQuotaSource.js.map +0 -1
- package/dist/shared/quota/copilotQuotaSource.d.ts +0 -57
- package/dist/shared/quota/copilotQuotaSource.d.ts.map +0 -1
- package/dist/shared/quota/copilotQuotaSource.js +0 -143
- package/dist/shared/quota/copilotQuotaSource.js.map +0 -1
- package/dist/shared/quota/coverage.d.ts +0 -45
- package/dist/shared/quota/coverage.d.ts.map +0 -1
- package/dist/shared/quota/coverage.js +0 -77
- package/dist/shared/quota/coverage.js.map +0 -1
- package/dist/shared/quota/dispatchDriverPrompt.d.ts +0 -15
- package/dist/shared/quota/dispatchDriverPrompt.d.ts.map +0 -1
- package/dist/shared/quota/dispatchDriverPrompt.js +0 -40
- package/dist/shared/quota/dispatchDriverPrompt.js.map +0 -1
- package/dist/shared/quota/errorParsers/claudeCodeErrorParser.d.ts +0 -7
- package/dist/shared/quota/errorParsers/claudeCodeErrorParser.d.ts.map +0 -1
- package/dist/shared/quota/errorParsers/claudeCodeErrorParser.js +0 -33
- package/dist/shared/quota/errorParsers/claudeCodeErrorParser.js.map +0 -1
- package/dist/shared/quota/errorParsers/genericErrorParser.d.ts +0 -10
- package/dist/shared/quota/errorParsers/genericErrorParser.d.ts.map +0 -1
- package/dist/shared/quota/errorParsers/genericErrorParser.js +0 -8
- package/dist/shared/quota/errorParsers/genericErrorParser.js.map +0 -1
- package/dist/shared/quota/errorParsers/index.d.ts +0 -6
- package/dist/shared/quota/errorParsers/index.d.ts.map +0 -1
- package/dist/shared/quota/errorParsers/index.js +0 -16
- package/dist/shared/quota/errorParsers/index.js.map +0 -1
- package/dist/shared/quota/errorParsing.d.ts +0 -97
- package/dist/shared/quota/errorParsing.d.ts.map +0 -1
- package/dist/shared/quota/errorParsing.js +0 -333
- package/dist/shared/quota/errorParsing.js.map +0 -1
- package/dist/shared/quota/fileLock.d.ts.map +0 -1
- package/dist/shared/quota/fileLock.js.map +0 -1
- package/dist/shared/quota/hostLimits.d.ts +0 -31
- package/dist/shared/quota/hostLimits.d.ts.map +0 -1
- package/dist/shared/quota/hostLimits.js +0 -74
- package/dist/shared/quota/hostLimits.js.map +0 -1
- package/dist/shared/quota/hostPool.d.ts +0 -115
- package/dist/shared/quota/hostPool.d.ts.map +0 -1
- package/dist/shared/quota/hostPool.js +0 -104
- package/dist/shared/quota/hostPool.js.map +0 -1
- package/dist/shared/quota/hostSessionQuotaSource.d.ts +0 -150
- package/dist/shared/quota/hostSessionQuotaSource.d.ts.map +0 -1
- package/dist/shared/quota/hostSessionQuotaSource.js +0 -250
- package/dist/shared/quota/hostSessionQuotaSource.js.map +0 -1
- package/dist/shared/quota/httpQuotaSource.d.ts +0 -122
- package/dist/shared/quota/httpQuotaSource.d.ts.map +0 -1
- package/dist/shared/quota/httpQuotaSource.js +0 -155
- package/dist/shared/quota/httpQuotaSource.js.map +0 -1
- package/dist/shared/quota/learnedQuotaSource.d.ts +0 -20
- package/dist/shared/quota/learnedQuotaSource.d.ts.map +0 -1
- package/dist/shared/quota/learnedQuotaSource.js +0 -46
- package/dist/shared/quota/learnedQuotaSource.js.map +0 -1
- package/dist/shared/quota/limits.d.ts +0 -55
- package/dist/shared/quota/limits.d.ts.map +0 -1
- package/dist/shared/quota/limits.js +0 -164
- package/dist/shared/quota/limits.js.map +0 -1
- package/dist/shared/quota/modelStatics.d.ts +0 -32
- package/dist/shared/quota/modelStatics.d.ts.map +0 -1
- package/dist/shared/quota/modelStatics.js +0 -117
- package/dist/shared/quota/modelStatics.js.map +0 -1
- package/dist/shared/quota/openCodeQuotaSource.d.ts +0 -18
- package/dist/shared/quota/openCodeQuotaSource.d.ts.map +0 -1
- package/dist/shared/quota/openCodeQuotaSource.js +0 -84
- package/dist/shared/quota/openCodeQuotaSource.js.map +0 -1
- package/dist/shared/quota/packetCost.d.ts +0 -27
- package/dist/shared/quota/packetCost.d.ts.map +0 -1
- package/dist/shared/quota/packetCost.js +0 -45
- package/dist/shared/quota/packetCost.js.map +0 -1
- package/dist/shared/quota/quotaCoverageNudge.d.ts +0 -26
- package/dist/shared/quota/quotaCoverageNudge.d.ts.map +0 -1
- package/dist/shared/quota/quotaCoverageNudge.js +0 -82
- package/dist/shared/quota/quotaCoverageNudge.js.map +0 -1
- package/dist/shared/quota/quotaSource.d.ts +0 -224
- package/dist/shared/quota/quotaSource.d.ts.map +0 -1
- package/dist/shared/quota/quotaSource.js +0 -125
- package/dist/shared/quota/quotaSource.js.map +0 -1
- package/dist/shared/quota/recordStore.d.ts +0 -25
- package/dist/shared/quota/recordStore.d.ts.map +0 -1
- package/dist/shared/quota/recordStore.js +0 -65
- package/dist/shared/quota/recordStore.js.map +0 -1
- package/dist/shared/quota/reservationLedger.d.ts +0 -183
- package/dist/shared/quota/reservationLedger.d.ts.map +0 -1
- package/dist/shared/quota/reservationLedger.js +0 -319
- package/dist/shared/quota/reservationLedger.js.map +0 -1
- package/dist/shared/quota/scheduler.d.ts +0 -262
- package/dist/shared/quota/scheduler.d.ts.map +0 -1
- package/dist/shared/quota/scheduler.js +0 -628
- package/dist/shared/quota/scheduler.js.map +0 -1
- package/dist/shared/quota/slidingWindow.d.ts +0 -5
- package/dist/shared/quota/slidingWindow.d.ts.map +0 -1
- package/dist/shared/quota/slidingWindow.js +0 -29
- package/dist/shared/quota/slidingWindow.js.map +0 -1
- package/dist/shared/quota/state.d.ts +0 -204
- package/dist/shared/quota/state.d.ts.map +0 -1
- package/dist/shared/quota/state.js +0 -480
- package/dist/shared/quota/state.js.map +0 -1
- package/dist/shared/quota/tokenBudgetView.d.ts +0 -17
- package/dist/shared/quota/tokenBudgetView.d.ts.map +0 -1
- package/dist/shared/quota/tokenBudgetView.js +0 -77
- package/dist/shared/quota/tokenBudgetView.js.map +0 -1
- package/dist/shared/quota/types.d.ts +0 -235
- package/dist/shared/quota/types.d.ts.map +0 -1
- package/dist/shared/quota/types.js +0 -58
- package/dist/shared/quota/types.js.map +0 -1
- package/dist/shared/quota/windowConstraints.d.ts +0 -56
- package/dist/shared/quota/windowConstraints.d.ts.map +0 -1
- package/dist/shared/quota/windowConstraints.js +0 -71
- package/dist/shared/quota/windowConstraints.js.map +0 -1
- package/dist/shared/repair/brokeredDispatch.d.ts +0 -151
- package/dist/shared/repair/brokeredDispatch.d.ts.map +0 -1
- package/dist/shared/repair/brokeredDispatch.js +0 -182
- package/dist/shared/repair/brokeredDispatch.js.map +0 -1
- package/dist/shared/repair/emitValidateRepair.d.ts +0 -124
- package/dist/shared/repair/emitValidateRepair.d.ts.map +0 -1
- package/dist/shared/repair/emitValidateRepair.js +0 -180
- package/dist/shared/repair/emitValidateRepair.js.map +0 -1
- package/dist/shared/repair/index.d.ts +0 -10
- package/dist/shared/repair/index.d.ts.map +0 -1
- package/dist/shared/repair/index.js +0 -3
- package/dist/shared/repair/index.js.map +0 -1
- package/dist/shared/rolling/pausedState.d.ts +0 -201
- package/dist/shared/rolling/pausedState.d.ts.map +0 -1
- package/dist/shared/rolling/pausedState.js +0 -197
- package/dist/shared/rolling/pausedState.js.map +0 -1
- package/dist/shared/types/attributionContract.d.ts +0 -198
- package/dist/shared/types/attributionContract.d.ts.map +0 -1
- package/dist/shared/types/attributionContract.js +0 -332
- package/dist/shared/types/attributionContract.js.map +0 -1
- package/dist/shared/types/auditorDescriptor.d.ts +0 -119
- package/dist/shared/types/auditorDescriptor.d.ts.map +0 -1
- package/dist/shared/types/auditorDescriptor.js +0 -29
- package/dist/shared/types/auditorDescriptor.js.map +0 -1
- package/dist/shared/types/rollingDispatch.d.ts +0 -222
- package/dist/shared/types/rollingDispatch.d.ts.map +0 -1
- package/dist/shared/types/rollingDispatch.js +0 -19
- package/dist/shared/types/rollingDispatch.js.map +0 -1
- package/dist/shared/types/sessionConfig.d.ts +0 -778
- package/dist/shared/types/sessionConfig.d.ts.map +0 -1
- package/dist/shared/types/sessionConfig.js +0 -393
- package/dist/shared/types/sessionConfig.js.map +0 -1
- package/dist/shared/validation/sessionConfig.d.ts +0 -59
- package/dist/shared/validation/sessionConfig.d.ts.map +0 -1
- package/dist/shared/validation/sessionConfig.js +0 -631
- package/dist/shared/validation/sessionConfig.js.map +0 -1
- /package/dist/shared/{quota → io}/fileLock.d.ts +0 -0
- /package/dist/shared/{quota → io}/fileLock.js +0 -0
- /package/dist/shared/{dispatch → io}/pathIdentity.d.ts +0 -0
- /package/dist/shared/{dispatch → io}/pathIdentity.js +0 -0
|
@@ -1,692 +0,0 @@
|
|
|
1
|
-
// Host-path admission loop — the tool-side "grant the admitted set" primitive of
|
|
2
|
-
// the dispatch admission-control model (spec/dispatch-quota.md).
|
|
3
|
-
//
|
|
4
|
-
// The in-process rolling engine (rollingDispatch.ts) admits ONE packet at a time
|
|
5
|
-
// continuously; this is its host-subagent-path analog: at a dispatch step the tool
|
|
6
|
-
// admits a BATCH — as many packets as budget (and any declared in-flight cap) allow
|
|
7
|
-
// right now — reserving each against the shared ReservationLedger, and hands the
|
|
8
|
-
// host EXACTLY that granted set. The host dispatches the set, reports at
|
|
9
|
-
// result-ingest (merge-and-ingest), and the next `next-step` re-admits the
|
|
10
|
-
// remainder. The granted set's size is the instantaneous admission width — there is
|
|
11
|
-
// no computed concurrency number (spec: "concurrency is not a computed quantity").
|
|
12
|
-
//
|
|
13
|
-
// COST-FIRST ROUTING is a first-class property: each packet is routed to the
|
|
14
|
-
// CHEAPEST pool CAPABLE of it (cost-ascending among capable pools) that still has
|
|
15
|
-
// budget + in-flight-cap headroom, so lower-cost providers fill before pricier ones
|
|
16
|
-
// and overflow spills to the next-cheapest-capable pool. The capability gate and
|
|
17
|
-
// cost rank are inputs, so refining the complexity/risk gate is a one-predicate
|
|
18
|
-
// change, never a re-architecture.
|
|
19
|
-
import { z } from "zod";
|
|
20
|
-
import { DISPATCH_LEASE_TTL_MS } from "../quota/reservationLedger.js";
|
|
21
|
-
import { estimatePacketCost } from "../quota/packetCost.js";
|
|
22
|
-
import { windowConstraintsFor } from "../quota/windowConstraints.js";
|
|
23
|
-
import { deriveColdStartAdmissionBatch } from "../quota/scheduler.js";
|
|
24
|
-
import { tierRank } from "./tierRank.js";
|
|
25
|
-
import { deriveCostRank } from "./costRank.js";
|
|
26
|
-
/**
|
|
27
|
-
* Build the admission pool set from the serializable per-pool capacity summaries —
|
|
28
|
-
* the SINGLE source of truth both orchestrators use (audit summarizes its dispatch
|
|
29
|
-
* capacity; remediate passes `schedule.capacity_pools`), so the two cannot drift on
|
|
30
|
-
* how a pool maps to an {@link AdmissionPool}. Every field is derived here once:
|
|
31
|
-
* budget (optimistic `+Infinity` when no live ceiling), the hard in-flight cap
|
|
32
|
-
* (`declaredCap` — host subagent budget OR endpoint `max_concurrent`), cost rank,
|
|
33
|
-
* capability tier ordinal, the throughput rank (pool-class-aware concurrency;
|
|
34
|
-
* spec/dispatch-quota.md), and the context-window fit ceiling.
|
|
35
|
-
*/
|
|
36
|
-
export function admissionPoolsFromSummaries(summaries) {
|
|
37
|
-
return summaries.map((pool) => ({
|
|
38
|
-
poolId: pool.pool_id,
|
|
39
|
-
resourceKey: pool.pool_id,
|
|
40
|
-
budget: pool.remaining_token_budget ?? Number.POSITIVE_INFINITY,
|
|
41
|
-
accountKey: pool.account_key,
|
|
42
|
-
windowBudgets: (pool.window_budgets ?? []).map((w) => ({
|
|
43
|
-
scope: w.scope,
|
|
44
|
-
label: w.label,
|
|
45
|
-
budget: w.budget,
|
|
46
|
-
unit: w.unit,
|
|
47
|
-
...(w.tokens_per_pct != null ? { tokensPerPct: w.tokens_per_pct } : {}),
|
|
48
|
-
reset_at: w.reset_at,
|
|
49
|
-
})),
|
|
50
|
-
declaredCap: pool.host_concurrency_limit?.active_subagents ?? pool.concurrency_cap ?? null,
|
|
51
|
-
costRank: deriveCostRank({
|
|
52
|
-
model: pool.model,
|
|
53
|
-
tier: pool.rank,
|
|
54
|
-
declaredCostPerMtok: pool.declared_cost_per_mtok,
|
|
55
|
-
}),
|
|
56
|
-
capabilityRank: tierRank(pool.rank),
|
|
57
|
-
capabilityScore: pool.capability_rank ?? null,
|
|
58
|
-
// ONE fit predicate on both dispatch paths (unified-routing step B): a source
|
|
59
|
-
// pool's own effective window (`context_cap_tokens`, non-null since step A)
|
|
60
|
-
// outranks the wave's resolved limits — previously the host-admission path gated
|
|
61
|
-
// every pool against the HOST's window, so a small-context source pool admitted
|
|
62
|
-
// packets it could never serve (413 instead of skip). Host pools carry no
|
|
63
|
-
// `context_cap_tokens` and fall through to their real resolved window.
|
|
64
|
-
capacityTokens: pool.context_cap_tokens ?? pool.resolved_limits.context_tokens,
|
|
65
|
-
calibrating: pool.calibrating === true,
|
|
66
|
-
}));
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* One constraint's evaluation, serialized for the persisted explain artifact —
|
|
70
|
-
* the wire form of the ledger's {@link ConstraintOutcome} (legibility invariant,
|
|
71
|
-
* spec/dispatch-quota.md Resolved decision 3).
|
|
72
|
-
*
|
|
73
|
-
* `headroom_before: null` means UNBOUNDED, not unknown — a cold-start pool with
|
|
74
|
-
* no real ceiling computes `headroomBefore = +Infinity`, which `JSON.stringify`
|
|
75
|
-
* (the artifact's actual emit path) collapses to `null`; `.number()` alone
|
|
76
|
-
* rejects that on read-back even though it accepts `Infinity` in memory, so
|
|
77
|
-
* `null` is the honest encoding of what the artifact actually contains on disk.
|
|
78
|
-
*/
|
|
79
|
-
export const ConstraintOutcomeRecordSchema = z
|
|
80
|
-
.object({
|
|
81
|
-
resource_key: z.string(),
|
|
82
|
-
headroom_before: z.number().nullable(),
|
|
83
|
-
outstanding_before: z.number(),
|
|
84
|
-
cost: z.number(),
|
|
85
|
-
/** Whether this constraint alone had room. Admission requires ALL true. */
|
|
86
|
-
cleared: z.boolean(),
|
|
87
|
-
})
|
|
88
|
-
.strict();
|
|
89
|
-
/** Serialize ledger outcomes for the artifact (non-finite headroom → null). */
|
|
90
|
-
export function toConstraintOutcomeRecords(outcomes) {
|
|
91
|
-
return outcomes.map((o) => ({
|
|
92
|
-
resource_key: o.resourceKey,
|
|
93
|
-
headroom_before: Number.isFinite(o.headroomBefore) ? o.headroomBefore : null,
|
|
94
|
-
outstanding_before: o.outstandingBefore,
|
|
95
|
-
cost: o.cost,
|
|
96
|
-
cleared: o.cleared,
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* One NON-decisive pool consultation during a packet's admission walk — a pool
|
|
101
|
-
* that was tried and refused before the decision landed elsewhere (the decisive
|
|
102
|
-
* pool's data lives on the explain record itself, never duplicated here). The
|
|
103
|
-
* refusal vocabulary is shared with {@link AdmissionExplain.reason} so one
|
|
104
|
-
* parser covers both.
|
|
105
|
-
*/
|
|
106
|
-
export const AdmissionAttemptSchema = z
|
|
107
|
-
.object({
|
|
108
|
-
pool_id: z.string(),
|
|
109
|
-
reason: z.enum(["budget_exhausted", "cap_reached", "window_uncalibrated"]),
|
|
110
|
-
/** Ledger outcomes when the attempt reached the ledger; [] otherwise. */
|
|
111
|
-
constraints: z.array(ConstraintOutcomeRecordSchema),
|
|
112
|
-
/** cap_reached only: the in-flight count and cap that refused. */
|
|
113
|
-
in_flight_before: z.number().optional(),
|
|
114
|
-
cap: z.number().optional(),
|
|
115
|
-
/** window_uncalibrated only: labels of the windows that could not price. */
|
|
116
|
-
unpriced_windows: z.array(z.string()).optional(),
|
|
117
|
-
})
|
|
118
|
-
.strict();
|
|
119
|
-
export const AdmissionGrantSchema = z
|
|
120
|
-
.object({
|
|
121
|
-
packet_id: z.string(),
|
|
122
|
-
pool_id: z.string(),
|
|
123
|
-
resource_keys: z.array(z.string()),
|
|
124
|
-
lease_id: z.string(),
|
|
125
|
-
cost: z.number(),
|
|
126
|
-
})
|
|
127
|
-
.strict();
|
|
128
|
-
/**
|
|
129
|
-
* Why a packet was admitted or blocked — the per-admission explain record.
|
|
130
|
-
* Carries the FULL constraint-outcome array the decision was taken against
|
|
131
|
-
* (every key consulted, its headroom before, the packet's cost against it,
|
|
132
|
-
* which key refused) plus the non-decisive walk trail — never a one-of-N
|
|
133
|
-
* scalar that looks authoritative while being partial
|
|
134
|
-
* ([[write-only-data-looks-authoritative]]).
|
|
135
|
-
*/
|
|
136
|
-
export const AdmissionExplainSchema = z
|
|
137
|
-
.object({
|
|
138
|
-
packet_id: z.string(),
|
|
139
|
-
/** null when NO pool was capable, or on a plan-only (`planned`) grant. */
|
|
140
|
-
pool_id: z.string().nullable(),
|
|
141
|
-
admitted: z.boolean(),
|
|
142
|
-
reason: z.enum([
|
|
143
|
-
"admitted",
|
|
144
|
-
// Plan-only display grant (`grantLeases: false`): the in-process rolling
|
|
145
|
-
// engine leases per-packet at dispatch time and records its decisions in
|
|
146
|
-
// the engine decision log — no lease exists for this record, by design.
|
|
147
|
-
"planned",
|
|
148
|
-
"no_capable_pool",
|
|
149
|
-
"budget_exhausted",
|
|
150
|
-
"cap_reached",
|
|
151
|
-
"packet_oversized",
|
|
152
|
-
// A window that APPLIES to the packet has no learned tokens-per-percent slope,
|
|
153
|
-
// so it cannot price the draw. Distinct from budget_exhausted: nothing ran
|
|
154
|
-
// out, the pool is still calibrating — telling the operator the budget is gone
|
|
155
|
-
// would be a false report of a wall that does not exist.
|
|
156
|
-
"window_uncalibrated",
|
|
157
|
-
]),
|
|
158
|
-
/**
|
|
159
|
-
* The DECISIVE attempt's full constraint-outcome array: on a grant, the
|
|
160
|
-
* successful admit's; on a ledger refusal, the refusing decision's. Empty
|
|
161
|
-
* when the ledger was never reached (no_capable_pool / cap_reached /
|
|
162
|
-
* window_uncalibrated / planned / packet_oversized).
|
|
163
|
-
*/
|
|
164
|
-
constraints: z.array(ConstraintOutcomeRecordSchema),
|
|
165
|
-
/**
|
|
166
|
-
* The tightest (or refusing) constraint of the decisive attempt — the
|
|
167
|
-
* binding window a report should name, as its full outcome row. Null when
|
|
168
|
-
* the ledger was never reached.
|
|
169
|
-
*/
|
|
170
|
-
binding: ConstraintOutcomeRecordSchema.nullable(),
|
|
171
|
-
/** Pools consulted and refused BEFORE the decision, in walk order. */
|
|
172
|
-
attempts: z.array(AdmissionAttemptSchema),
|
|
173
|
-
/** cap_reached refusal only: the in-flight count and cap that refused. */
|
|
174
|
-
in_flight_before: z.number().optional(),
|
|
175
|
-
cap: z.number().optional(),
|
|
176
|
-
/** window_uncalibrated refusal only: labels of the unpriceable windows. */
|
|
177
|
-
unpriced_windows: z.array(z.string()).optional(),
|
|
178
|
-
cost: z.number(),
|
|
179
|
-
})
|
|
180
|
-
.strict();
|
|
181
|
-
/**
|
|
182
|
-
* The admission artifact both orchestrators embed in their dispatch-quota contract,
|
|
183
|
-
* REPLACING the removed `max_concurrent_agents` scalar. `granted_packet_ids` is the
|
|
184
|
-
* set the host dispatches this step (its size is the emergent admission width);
|
|
185
|
-
* `declared_cap` is the verbatim per-environment hard in-flight cap (null when
|
|
186
|
-
* none); `leases` are reconciled (freed) at result-ingest; `explains` reconstruct
|
|
187
|
-
* why the fan-out was the width it was.
|
|
188
|
-
*/
|
|
189
|
-
export const DispatchAdmissionSchema = z
|
|
190
|
-
.object({
|
|
191
|
-
granted_packet_ids: z.array(z.string()),
|
|
192
|
-
declared_cap: z.number().int().min(1).nullable(),
|
|
193
|
-
leases: z.array(AdmissionGrantSchema),
|
|
194
|
-
explains: z.array(AdmissionExplainSchema),
|
|
195
|
-
})
|
|
196
|
-
.strict();
|
|
197
|
-
/** Default capability gate: the pool's window must fit the packet's reservation. */
|
|
198
|
-
function defaultCapable(pool, packet) {
|
|
199
|
-
if (pool.capacityTokens === Number.POSITIVE_INFINITY)
|
|
200
|
-
return true;
|
|
201
|
-
if (typeof pool.capacityTokens !== "number" ||
|
|
202
|
-
!Number.isFinite(pool.capacityTokens) ||
|
|
203
|
-
pool.capacityTokens <= 0) {
|
|
204
|
-
return false;
|
|
205
|
-
}
|
|
206
|
-
return pool.capacityTokens >= packet.cost;
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* {@link buildCapabilityFloorCapable} with the per-(pool, packet) de-duplication its
|
|
210
|
-
* reporters all need — the predicate is re-evaluated as the loop rescans, so a raw
|
|
211
|
-
* `onFailOpen` fires repeatedly for one routing decision.
|
|
212
|
-
*
|
|
213
|
-
* Single-sourced because the dedup was audit's alone: remediate passed no reporter at
|
|
214
|
-
* all, so on that draw an unranked pool admitting `deep` work was completely SILENT —
|
|
215
|
-
* and silence is exactly what let the unwired `marshal.ts` schedule go unnoticed. Both
|
|
216
|
-
* draws now report through one core ([[dissolve-auditor-remediator-distinction]]); a
|
|
217
|
-
* fail-open is a routing fact, not an audit-only concern.
|
|
218
|
-
*/
|
|
219
|
-
export function buildObservedCapabilityFloorCapable(pools, onFailOpen) {
|
|
220
|
-
const seen = new Set();
|
|
221
|
-
return buildCapabilityFloorCapable(pools, (info) => {
|
|
222
|
-
// Structured key: pool and packet ids are opaque strings, so a printable separator
|
|
223
|
-
// could occur inside one and collide two distinct pairs into a single key —
|
|
224
|
-
// silently suppressing a real fail-open report. JSON of the pair cannot collide.
|
|
225
|
-
const key = JSON.stringify([info.poolId, info.packetId]);
|
|
226
|
-
if (seen.has(key))
|
|
227
|
-
return;
|
|
228
|
-
seen.add(key);
|
|
229
|
-
onFailOpen(info);
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
export function buildCapabilityFloorCapable(pools, onFailOpen, isAvailable) {
|
|
233
|
-
// Tercile-band the scored pools once per batch (deterministic: score asc, poolId tiebreak).
|
|
234
|
-
const scored = pools
|
|
235
|
-
.filter((p) => typeof p.capabilityScore === "number" && Number.isFinite(p.capabilityScore))
|
|
236
|
-
.sort((a, b) => a.capabilityScore - b.capabilityScore ||
|
|
237
|
-
a.poolId.localeCompare(b.poolId));
|
|
238
|
-
const scoreBand = new Map();
|
|
239
|
-
scored.forEach((p, i) => {
|
|
240
|
-
scoreBand.set(p.poolId, Math.floor((3 * i) / scored.length));
|
|
241
|
-
});
|
|
242
|
-
const NEUTRAL_ORDINAL = tierRank(undefined); // the fallback tier — carries no information
|
|
243
|
-
const bandOf = (pool) => {
|
|
244
|
-
const fromScore = scoreBand.get(pool.poolId);
|
|
245
|
-
if (fromScore !== undefined)
|
|
246
|
-
return fromScore;
|
|
247
|
-
// No score: a non-neutral ordinal is a real declared/roster rank → coarse band.
|
|
248
|
-
// (A genuinely-DECLARED `standard` rank is indistinguishable from the fallback
|
|
249
|
-
// here — both are the neutral ordinal — so declared-standard pools are treated
|
|
250
|
-
// as unknown/fail-open. Deliberate: representing "declared vs defaulted" would
|
|
251
|
-
// need rank provenance on the summary; fail-open is the safe direction.)
|
|
252
|
-
if (pool.capabilityRank !== NEUTRAL_ORDINAL)
|
|
253
|
-
return 2 - Math.min(pool.capabilityRank, 2);
|
|
254
|
-
return null; // unknown — fail open
|
|
255
|
-
};
|
|
256
|
-
// The batch's BEST available band — the floor is RELATIVE all the way down
|
|
257
|
-
// (C-review F3): `deep` means "the most capable band available", not "band 0 or
|
|
258
|
-
// nothing". Without this, an all-small ordinal roster gives every deep packet an
|
|
259
|
-
// empty candidate set → a `no_capable_pool` wall that step E rightly calls
|
|
260
|
-
// structural/permanent — a livelock the floor itself manufactured. The scored
|
|
261
|
-
// path already behaves this way (n=1 scored pool = band 0 by construction).
|
|
262
|
-
//
|
|
263
|
-
// "Available" is LIVE, not a build-time snapshot (zero-spill fix, live incident
|
|
264
|
-
// 2026-07-22): when the caller supplies `isAvailable`, the best band is
|
|
265
|
-
// re-derived per evaluation over pools still available. A static snapshot kept
|
|
266
|
-
// holding the floor at a 429-exhausted pool's band, so every surviving
|
|
267
|
-
// lower-band sibling failed `capable` and ~140 packets stranded as
|
|
268
|
-
// `no_fitting_pool` without one sibling attempt. Without the callback (host
|
|
269
|
-
// admission path — pools are re-banded per batch) behavior is unchanged. If
|
|
270
|
-
// every banded pool is unavailable the floor goes inert (fail-open) — the
|
|
271
|
-
// availability filters exclude those pools regardless, and a floor with no
|
|
272
|
-
// live reference point has no signal to give.
|
|
273
|
-
const bandedPools = pools
|
|
274
|
-
.map((p) => ({ poolId: p.poolId, band: bandOf(p) }))
|
|
275
|
-
.filter((e) => e.band !== null);
|
|
276
|
-
const anyBanded = bandedPools.length > 0;
|
|
277
|
-
const bestAvailableBand = () => {
|
|
278
|
-
const available = bandedPools.filter((e) => isAvailable?.(e.poolId) !== false);
|
|
279
|
-
if (available.length === 0)
|
|
280
|
-
return anyBanded ? Number.POSITIVE_INFINITY : 0;
|
|
281
|
-
return Math.min(...available.map((e) => e.band));
|
|
282
|
-
};
|
|
283
|
-
const FLOOR_MAX_BAND = { deep: 0, standard: 1, small: 2 };
|
|
284
|
-
return (pool, packet) => {
|
|
285
|
-
if (!defaultCapable(pool, packet))
|
|
286
|
-
return false;
|
|
287
|
-
const tier = packet.requiredTier;
|
|
288
|
-
if (!tier || tier === "small")
|
|
289
|
-
return true;
|
|
290
|
-
const band = bandOf(pool);
|
|
291
|
-
if (band === null) {
|
|
292
|
-
// Unknown capability: fail-open, never a block. Record it ONLY when the batch
|
|
293
|
-
// has at least one banded pool (C-review F2) — with zero capability data the
|
|
294
|
-
// floor is globally inert and there is no routing choice to flag; recording
|
|
295
|
-
// would spam a warning per packet on every ordinary single-host wave.
|
|
296
|
-
if (anyBanded) {
|
|
297
|
-
onFailOpen?.({ poolId: pool.poolId, packetId: packet.id, requiredTier: tier });
|
|
298
|
-
}
|
|
299
|
-
return true;
|
|
300
|
-
}
|
|
301
|
-
return band <= Math.max(FLOOR_MAX_BAND[tier], bestAvailableBand());
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* The in-process engine's draw over the ONE capability-floor implementation
|
|
306
|
-
* ({@link buildCapabilityFloorCapable}) — adapts the engine's `CapacityPool` shape
|
|
307
|
-
* (F4) via the same signals the admission summaries carry (`rank` → tier ordinal,
|
|
308
|
-
* `declaredCapabilityRank` → raw score), so the engine and the host path band
|
|
309
|
-
* pools identically and cannot drift. Size-fit stays the engine's own
|
|
310
|
-
* `doesNotFitContext` gate, so the stub's `capacityTokens` is +Infinity (inert
|
|
311
|
-
* here). Fail-open all the way down: an unknown pool id, like unknown capability,
|
|
312
|
-
* never blocks.
|
|
313
|
-
*/
|
|
314
|
-
export function buildCapacityPoolCapabilityFloor(pools, onFailOpen, isAvailable) {
|
|
315
|
-
// Capability-gate stubs only — these never reach `admit`, so the metering fields
|
|
316
|
-
// are inert placeholders rather than a second (drifting) derivation of them.
|
|
317
|
-
const stubs = pools.map((p) => ({
|
|
318
|
-
poolId: p.id,
|
|
319
|
-
resourceKey: p.id,
|
|
320
|
-
budget: Number.POSITIVE_INFINITY,
|
|
321
|
-
accountKey: p.id,
|
|
322
|
-
windowBudgets: [],
|
|
323
|
-
declaredCap: null,
|
|
324
|
-
costRank: 0,
|
|
325
|
-
capabilityRank: tierRank(p.rank),
|
|
326
|
-
capabilityScore: p.declaredCapabilityRank ?? null,
|
|
327
|
-
capacityTokens: Number.POSITIVE_INFINITY,
|
|
328
|
-
}));
|
|
329
|
-
const byId = new Map(stubs.map((s) => [s.poolId, s]));
|
|
330
|
-
const floor = buildCapabilityFloorCapable(stubs, onFailOpen, isAvailable);
|
|
331
|
-
return (poolId, packet) => {
|
|
332
|
-
const stub = byId.get(poolId);
|
|
333
|
-
if (!stub)
|
|
334
|
-
return true; // pool outside the banded set — no signal, fail open
|
|
335
|
-
return floor(stub, {
|
|
336
|
-
id: packet.id,
|
|
337
|
-
cost: 0,
|
|
338
|
-
complexity: 0,
|
|
339
|
-
...(packet.requiredTier ? { requiredTier: packet.requiredTier } : {}),
|
|
340
|
-
});
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* Finer capability tiebreak on the raw registry score (LOWER = more capable), consulted
|
|
345
|
-
* only after the coarse tier ordinal has tied. A present score sorts before an absent
|
|
346
|
-
* one; both absent ⇒ 0 (fall through to the next tiebreak). Never a primary axis — it
|
|
347
|
-
* only refines cost-equal, same-tier pools (e.g. proxy-sourced models on one tier).
|
|
348
|
-
*/
|
|
349
|
-
function capabilityScoreCmp(a, b) {
|
|
350
|
-
const av = typeof a.capabilityScore === "number" && Number.isFinite(a.capabilityScore) ? a.capabilityScore : null;
|
|
351
|
-
const bv = typeof b.capabilityScore === "number" && Number.isFinite(b.capabilityScore) ? b.capabilityScore : null;
|
|
352
|
-
if (av !== null && bv !== null)
|
|
353
|
-
return av - bv; // lower = more capable, sorts first
|
|
354
|
-
if (av !== null)
|
|
355
|
-
return -1; // present before absent
|
|
356
|
-
if (bv !== null)
|
|
357
|
-
return 1;
|
|
358
|
-
return 0;
|
|
359
|
-
}
|
|
360
|
-
/** Cost-first order: cheapest first, ties toward the more capable pool (tier, then raw score). */
|
|
361
|
-
function costFirstCmp(a, b) {
|
|
362
|
-
return a.costRank - b.costRank || b.capabilityRank - a.capabilityRank || capabilityScoreCmp(a, b);
|
|
363
|
-
}
|
|
364
|
-
/** Deterministic tiebreak so equal-key orderings are stable across processes. */
|
|
365
|
-
function poolIdCmp(a, b) {
|
|
366
|
-
return a.poolId < b.poolId ? -1 : a.poolId > b.poolId ? 1 : 0;
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* Admit as many packets as budget + declared caps allow this pass, routing each to
|
|
370
|
-
* the cheapest capable pool with headroom. Every admission RESERVES the packet's
|
|
371
|
-
* cost against the shared ledger under its lock, so co-located dispatch loops on one
|
|
372
|
-
* account cannot collectively over-admit. Returns the granted set (the host
|
|
373
|
-
* dispatches exactly these), the explain trail, and the blocked remainder.
|
|
374
|
-
*
|
|
375
|
-
* A pool's declared in-flight cap is enforced by COUNT of its outstanding ledger
|
|
376
|
-
* leases (cross-process) plus this batch's grants — the only place an explicit
|
|
377
|
-
* agent-count exists (a verbatim environment limit), never a computed concurrency.
|
|
378
|
-
*/
|
|
379
|
-
export async function admitBatch(input) {
|
|
380
|
-
const capable = input.capable ?? defaultCapable;
|
|
381
|
-
const granted = [];
|
|
382
|
-
const explains = [];
|
|
383
|
-
const blocked = [];
|
|
384
|
-
// Seed per-pool in-flight COUNT from the ledger (other consumers' live leases),
|
|
385
|
-
// so a declared cap accounts for cross-process in-flight, then add this batch's.
|
|
386
|
-
//
|
|
387
|
-
// ⚠ Count DISTINCT lease ids, not lease rows. A multi-constraint admission writes
|
|
388
|
-
// one row PER WINDOW under the same lease id, so counting rows would divide a
|
|
389
|
-
// pool's declared cap by its window count (a 2-window account pool with a declared
|
|
390
|
-
// cap of 4 would admit 2). The cap is a COUNT OF IN-FLIGHT REQUESTS and must be
|
|
391
|
-
// passed verbatim regardless of how many allowances each request meters against.
|
|
392
|
-
const countByPool = new Map();
|
|
393
|
-
try {
|
|
394
|
-
const snapshot = await input.ledger.snapshot();
|
|
395
|
-
const seenByPool = new Map();
|
|
396
|
-
for (const leases of Object.values(snapshot)) {
|
|
397
|
-
for (const lease of leases) {
|
|
398
|
-
let seen = seenByPool.get(lease.poolId);
|
|
399
|
-
if (!seen) {
|
|
400
|
-
seen = new Set();
|
|
401
|
-
seenByPool.set(lease.poolId, seen);
|
|
402
|
-
}
|
|
403
|
-
seen.add(lease.leaseId);
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
for (const [poolId, seen] of seenByPool)
|
|
407
|
-
countByPool.set(poolId, seen.size);
|
|
408
|
-
}
|
|
409
|
-
catch {
|
|
410
|
-
// Degrade-safe: an unreadable ledger just means cap counting starts at 0.
|
|
411
|
-
}
|
|
412
|
-
for (const packet of input.packets) {
|
|
413
|
-
// Capability is a hard floor; relay-owned ordering/failover happens behind each
|
|
414
|
-
// broker pool, while independently declared pools remain cheapest-capable-first.
|
|
415
|
-
const candidates = input.pools
|
|
416
|
-
.filter((pool) => capable(pool, packet))
|
|
417
|
-
.sort((a, b) => costFirstCmp(a, b) || poolIdCmp(a, b));
|
|
418
|
-
if (candidates.length === 0) {
|
|
419
|
-
explains.push({
|
|
420
|
-
packet_id: packet.id,
|
|
421
|
-
pool_id: null,
|
|
422
|
-
admitted: false,
|
|
423
|
-
reason: "no_capable_pool",
|
|
424
|
-
constraints: [],
|
|
425
|
-
binding: null,
|
|
426
|
-
attempts: [],
|
|
427
|
-
cost: packet.cost,
|
|
428
|
-
});
|
|
429
|
-
blocked.push(packet.id);
|
|
430
|
-
continue;
|
|
431
|
-
}
|
|
432
|
-
let placed = false;
|
|
433
|
-
let lastReason = "budget_exhausted";
|
|
434
|
-
let lastPool = candidates[0];
|
|
435
|
-
// The refused-consultation trail (legibility): every pool the walk tried and
|
|
436
|
-
// passed over, with why — the decisive pool's data lands on the explain
|
|
437
|
-
// record itself, never duplicated here.
|
|
438
|
-
const attempts = [];
|
|
439
|
-
// The decisive ledger decision on a total refusal (the LAST pool's), so the
|
|
440
|
-
// explain carries the full constraint-outcome array it was decided on.
|
|
441
|
-
let lastDecision = null;
|
|
442
|
-
for (const pool of candidates) {
|
|
443
|
-
// Effective in-flight cap = the declared hard cap, TIGHTENED at cold start to a
|
|
444
|
-
// TOKEN-AWARE calibration batch (never a flat magic count). `pool.budget` is
|
|
445
|
-
// `remaining_token_budget ?? +Infinity` (apiPool.ts): when it is still a real
|
|
446
|
-
// finite number (a SIBLING window is the uncalibrated one), size the batch to
|
|
447
|
-
// what conservatively fits THIS packet's own cost estimate; when it is
|
|
448
|
-
// genuinely +Infinity (no window has any real budget yet — e.g. a percent-only
|
|
449
|
-
// quota source pre-slope), fall back to the small slope-learning probe. Without
|
|
450
|
-
// this the host grant would fan out the ENTIRE frontier — at arbitrary per-packet
|
|
451
|
-
// size — before the tokens-per-percent slope can be observed: the scheduler's
|
|
452
|
-
// `max_concurrent` cold-start clamp does NOT reach the grant, which is what the
|
|
453
|
-
// host actually obeys. Only affects `grantLeases:true` (host path); the in-process
|
|
454
|
-
// driver returns before admitBatch.
|
|
455
|
-
const coldStartBatch = pool.calibrating
|
|
456
|
-
? deriveColdStartAdmissionBatch({ availableBudget: pool.budget, perPacketTokenEstimate: packet.cost })
|
|
457
|
-
: null;
|
|
458
|
-
const effectiveCap = coldStartBatch != null ? Math.min(pool.declaredCap ?? coldStartBatch, coldStartBatch) : pool.declaredCap;
|
|
459
|
-
if (effectiveCap != null && (countByPool.get(pool.poolId) ?? 0) >= effectiveCap) {
|
|
460
|
-
attempts.push({
|
|
461
|
-
pool_id: pool.poolId,
|
|
462
|
-
reason: "cap_reached",
|
|
463
|
-
constraints: [],
|
|
464
|
-
in_flight_before: countByPool.get(pool.poolId) ?? 0,
|
|
465
|
-
cap: effectiveCap,
|
|
466
|
-
});
|
|
467
|
-
lastReason = "cap_reached";
|
|
468
|
-
lastPool = pool;
|
|
469
|
-
lastDecision = null;
|
|
470
|
-
continue;
|
|
471
|
-
}
|
|
472
|
-
// Reserve against EVERY window this pool must fit inside — the account-scoped
|
|
473
|
-
// ones shared with sibling models on the same credential, plus any scoped to
|
|
474
|
-
// this model alone. This is where N models on one account stop each admitting
|
|
475
|
-
// against their own copy of one allowance — PROVIDED the pools carry a shared
|
|
476
|
-
// , which is decided at the producer () and
|
|
477
|
-
// merely consumed here. A pool whose source cannot be attributed to a credential
|
|
478
|
-
// falls back to metering alone.
|
|
479
|
-
const { constraints, unpriced } = windowConstraintsFor(pool.poolId, pool.accountKey, pool.windowBudgets, packet.cost, pool.budget);
|
|
480
|
-
if (unpriced.length > 0) {
|
|
481
|
-
// A window that cannot price this draw (percent window, no learned slope) must
|
|
482
|
-
// NOT be dropped from the set — admitting on the remaining constraints would
|
|
483
|
-
// meter the packet against fewer allowances than actually apply to it, which is
|
|
484
|
-
// the fail-open direction. Reported as its own reason: nothing is exhausted.
|
|
485
|
-
//
|
|
486
|
-
// ⚠ NOT reachable from the in-repo producer: deriveTokenBudget drops an
|
|
487
|
-
// unpriceable window BEFORE it enters window_budgets and sets
|
|
488
|
-
// instead, so every emitted percent window carries a positive slope. This
|
|
489
|
-
// guards a summary arriving over the WIRE, where is
|
|
490
|
-
// schema-optional. Keep it fail-CLOSED: if it ever became producer-reachable
|
|
491
|
-
// for a calibrating pool it would livelock (blocked ⇒ no dispatch ⇒ no delta
|
|
492
|
-
// sample ⇒ no slope ⇒ blocked), so that producer change must come with a
|
|
493
|
-
// calibration escape, not a relaxation here.
|
|
494
|
-
attempts.push({
|
|
495
|
-
pool_id: pool.poolId,
|
|
496
|
-
reason: "window_uncalibrated",
|
|
497
|
-
constraints: [],
|
|
498
|
-
unpriced_windows: unpriced.map((w) => w.label),
|
|
499
|
-
});
|
|
500
|
-
lastReason = "window_uncalibrated";
|
|
501
|
-
lastPool = pool;
|
|
502
|
-
lastDecision = null;
|
|
503
|
-
continue;
|
|
504
|
-
}
|
|
505
|
-
const decision = await input.ledger.admit({
|
|
506
|
-
constraints,
|
|
507
|
-
poolId: pool.poolId,
|
|
508
|
-
...(input.leaseTtlMs != null ? { leaseTtlMs: input.leaseTtlMs } : {}),
|
|
509
|
-
});
|
|
510
|
-
// The full per-constraint evaluation (every key consulted, its headroom,
|
|
511
|
-
// this draw's cost against it, which cleared) — carried onto the explain
|
|
512
|
-
// record whether the decision admits or refuses. Non-finite headroom is
|
|
513
|
-
// genuinely unbounded and normalizes to `null` (the schema must match the
|
|
514
|
-
// literal bytes JSON.stringify puts on disk).
|
|
515
|
-
const outcomeRecords = toConstraintOutcomeRecords(decision.constraints);
|
|
516
|
-
const bindingRecord = decision.binding
|
|
517
|
-
? toConstraintOutcomeRecords([decision.binding])[0]
|
|
518
|
-
: null;
|
|
519
|
-
if (decision.admitted && decision.leaseId) {
|
|
520
|
-
granted.push({
|
|
521
|
-
packet_id: packet.id,
|
|
522
|
-
pool_id: pool.poolId,
|
|
523
|
-
resource_keys: [...new Set(decision.constraints.map((o) => o.resourceKey))],
|
|
524
|
-
lease_id: decision.leaseId,
|
|
525
|
-
cost: packet.cost,
|
|
526
|
-
});
|
|
527
|
-
countByPool.set(pool.poolId, (countByPool.get(pool.poolId) ?? 0) + 1);
|
|
528
|
-
explains.push({
|
|
529
|
-
packet_id: packet.id,
|
|
530
|
-
pool_id: pool.poolId,
|
|
531
|
-
admitted: true,
|
|
532
|
-
reason: "admitted",
|
|
533
|
-
constraints: outcomeRecords,
|
|
534
|
-
binding: bindingRecord,
|
|
535
|
-
attempts,
|
|
536
|
-
cost: packet.cost,
|
|
537
|
-
});
|
|
538
|
-
placed = true;
|
|
539
|
-
break;
|
|
540
|
-
}
|
|
541
|
-
attempts.push({
|
|
542
|
-
pool_id: pool.poolId,
|
|
543
|
-
reason: "budget_exhausted",
|
|
544
|
-
constraints: outcomeRecords,
|
|
545
|
-
});
|
|
546
|
-
lastReason = "budget_exhausted";
|
|
547
|
-
lastPool = pool;
|
|
548
|
-
lastDecision = { constraints: outcomeRecords, binding: bindingRecord };
|
|
549
|
-
}
|
|
550
|
-
if (!placed) {
|
|
551
|
-
// The decisive (last) pool's refused consultation is carried on the record
|
|
552
|
-
// itself — pop it off the trail so the two never duplicate, and lift its
|
|
553
|
-
// reason-specific extras (cap counts / unpriceable labels) onto the record.
|
|
554
|
-
const decisive = attempts.length > 0 && attempts[attempts.length - 1].pool_id === lastPool.poolId
|
|
555
|
-
? attempts.pop()
|
|
556
|
-
: null;
|
|
557
|
-
explains.push({
|
|
558
|
-
packet_id: packet.id,
|
|
559
|
-
pool_id: lastPool.poolId,
|
|
560
|
-
admitted: false,
|
|
561
|
-
reason: lastReason,
|
|
562
|
-
constraints: lastDecision?.constraints ?? [],
|
|
563
|
-
binding: lastDecision?.binding ?? null,
|
|
564
|
-
attempts,
|
|
565
|
-
...(decisive?.in_flight_before != null ? { in_flight_before: decisive.in_flight_before } : {}),
|
|
566
|
-
...(decisive?.cap != null ? { cap: decisive.cap } : {}),
|
|
567
|
-
...(decisive?.unpriced_windows ? { unpriced_windows: decisive.unpriced_windows } : {}),
|
|
568
|
-
cost: packet.cost,
|
|
569
|
-
});
|
|
570
|
-
blocked.push(packet.id);
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
return { granted, explains, blocked };
|
|
574
|
-
}
|
|
575
|
-
/**
|
|
576
|
-
* The plan-only display grant's explain record: no lease exists BY DESIGN — the
|
|
577
|
-
* in-process rolling engine admits + leases per-packet at dispatch time, and its
|
|
578
|
-
* decisions land in the engine decision log. This record exists so a non-empty
|
|
579
|
-
* decision round can never present an empty explains array (the legibility
|
|
580
|
-
* invariant's "a decision path that writes no explain is itself a defect").
|
|
581
|
-
*/
|
|
582
|
-
function plannedExplain(candidate) {
|
|
583
|
-
return {
|
|
584
|
-
packet_id: candidate.id,
|
|
585
|
-
pool_id: null,
|
|
586
|
-
admitted: true,
|
|
587
|
-
reason: "planned",
|
|
588
|
-
constraints: [],
|
|
589
|
-
binding: null,
|
|
590
|
-
attempts: [],
|
|
591
|
-
cost: candidate.cost,
|
|
592
|
-
};
|
|
593
|
-
}
|
|
594
|
-
/**
|
|
595
|
-
* Build the `DispatchAdmission` contract block both orchestrators embed in their
|
|
596
|
-
* dispatch-quota — the single-sourced host-path admission derivation (no per-tool
|
|
597
|
-
* copy that could drift). Computes each packet's envelope reservation
|
|
598
|
-
* (`estimatePacketCost` with the declared output cap), derives the surfaced declared
|
|
599
|
-
* cap (the most-constraining pool's in-flight cap), and either GRANTS via
|
|
600
|
-
* {@link admitBatch} (host-subagent path, `grantLeases: true` — leases persist for
|
|
601
|
-
* reconcile at ingest) or returns a plan-only block listing every candidate
|
|
602
|
-
* (`grantLeases: false` — the in-process rolling engine leases per-packet itself,
|
|
603
|
-
* so a host grant here would double-count).
|
|
604
|
-
*/
|
|
605
|
-
export async function computeDispatchAdmission(input) {
|
|
606
|
-
const candidates = input.packets.map((p) => ({
|
|
607
|
-
id: p.id,
|
|
608
|
-
cost: estimatePacketCost({ inputEstimate: p.inputTokens, declaredOutputCap: input.outputCap }).cost,
|
|
609
|
-
complexity: p.complexity,
|
|
610
|
-
...(p.requiredTier ? { requiredTier: p.requiredTier } : {}),
|
|
611
|
-
}));
|
|
612
|
-
const declaredCap = input.pools.reduce((min, p) => (p.declaredCap == null ? min : min == null ? p.declaredCap : Math.min(min, p.declaredCap)), null);
|
|
613
|
-
if (!input.grantLeases) {
|
|
614
|
-
// Plan-only path (in-process engine — it admits + leases per packet itself).
|
|
615
|
-
// No leases, but the capability FLOOR still applies (F4): the contract must not
|
|
616
|
-
// display a grant the engine's floor will refuse to dispatch. Floor ONLY — size
|
|
617
|
-
// fit stays the engine's own `doesNotFitContext` gate (declared per-pool caps),
|
|
618
|
-
// so a size refusal is never mislabeled `no_capable_pool` here. Residual (named,
|
|
619
|
-
// display-only): the engine can still size-refuse a displayed grant onto a
|
|
620
|
-
// capped pool; the packet remains dispatchable to uncapped pools.
|
|
621
|
-
// An EMPTY pool set means no capacity summary reached admission, not "nothing
|
|
622
|
-
// is capable" — grant all, as before the floor existed. Every grant still
|
|
623
|
-
// writes its `planned` explain: an empty explains array on a non-empty
|
|
624
|
-
// decision round is itself a defect (the live 144-granted-empty incident).
|
|
625
|
-
if (input.pools.length === 0) {
|
|
626
|
-
return {
|
|
627
|
-
granted_packet_ids: candidates.map((c) => c.id),
|
|
628
|
-
declared_cap: declaredCap,
|
|
629
|
-
leases: [],
|
|
630
|
-
explains: candidates.map((c) => plannedExplain(c)),
|
|
631
|
-
};
|
|
632
|
-
}
|
|
633
|
-
// Same-pool conjunction of the two per-packet engine axes: capability floor
|
|
634
|
-
// (banded over size-neutralized stubs, mirroring
|
|
635
|
-
// `buildCapacityPoolCapabilityFloor`) ∧ envelope fit (`defaultCapable`). Built
|
|
636
|
-
// here from the pools — never `input.capable`, whose composed predicate can't
|
|
637
|
-
// separate the axes. The RELATIVE floor never refuses every pool (fail-open +
|
|
638
|
-
// the best band is always eligible), so a total refusal is always a size fact:
|
|
639
|
-
// labeled `packet_oversized`, never `no_capable_pool` (which would misread a
|
|
640
|
-
// sizing problem as a capability one — adversarial-review F1).
|
|
641
|
-
const sizeNeutralPools = input.pools.map((p) => ({
|
|
642
|
-
...p,
|
|
643
|
-
capacityTokens: Number.POSITIVE_INFINITY,
|
|
644
|
-
}));
|
|
645
|
-
const floorOnly = buildCapabilityFloorCapable(sizeNeutralPools);
|
|
646
|
-
const grantedIds = [];
|
|
647
|
-
const explains = [];
|
|
648
|
-
for (const candidate of candidates) {
|
|
649
|
-
const granted = input.pools.some((pool, i) => floorOnly(sizeNeutralPools[i], candidate) && defaultCapable(pool, candidate));
|
|
650
|
-
if (granted) {
|
|
651
|
-
grantedIds.push(candidate.id);
|
|
652
|
-
explains.push(plannedExplain(candidate));
|
|
653
|
-
}
|
|
654
|
-
else {
|
|
655
|
-
const eligibleUnknownCapacity = input.pools.some((pool, i) => floorOnly(sizeNeutralPools[i], candidate) &&
|
|
656
|
-
(pool.capacityTokens == null ||
|
|
657
|
-
(!Number.isFinite(pool.capacityTokens) &&
|
|
658
|
-
pool.capacityTokens !== Number.POSITIVE_INFINITY) ||
|
|
659
|
-
pool.capacityTokens <= 0));
|
|
660
|
-
explains.push({
|
|
661
|
-
packet_id: candidate.id,
|
|
662
|
-
pool_id: null,
|
|
663
|
-
admitted: false,
|
|
664
|
-
reason: eligibleUnknownCapacity ? "no_capable_pool" : "packet_oversized",
|
|
665
|
-
constraints: [],
|
|
666
|
-
binding: null,
|
|
667
|
-
attempts: [],
|
|
668
|
-
cost: candidate.cost,
|
|
669
|
-
});
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
return { granted_packet_ids: grantedIds, declared_cap: declaredCap, leases: [], explains };
|
|
673
|
-
}
|
|
674
|
-
const admit = await admitBatch({
|
|
675
|
-
packets: candidates,
|
|
676
|
-
pools: input.pools,
|
|
677
|
-
ledger: input.ledger,
|
|
678
|
-
// Host-wave grants live for the WAVE (minutes of subagent work before
|
|
679
|
-
// ingest reconciles them), not the ledger's seconds-scale default — an
|
|
680
|
-
// expired lease frees both budget and the declared-cap count to a
|
|
681
|
-
// concurrent co-located admitter mid-wave (the host-path lease-TTL fix).
|
|
682
|
-
leaseTtlMs: DISPATCH_LEASE_TTL_MS,
|
|
683
|
-
...(input.capable ? { capable: input.capable } : {}),
|
|
684
|
-
});
|
|
685
|
-
return {
|
|
686
|
-
granted_packet_ids: admit.granted.map((g) => g.packet_id),
|
|
687
|
-
declared_cap: declaredCap,
|
|
688
|
-
leases: admit.granted,
|
|
689
|
-
explains: admit.explains,
|
|
690
|
-
};
|
|
691
|
-
}
|
|
692
|
-
//# sourceMappingURL=admissionLoop.js.map
|