audit-tools 0.34.41 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/cli/args.d.ts +6 -0
- package/dist/audit/cli/args.d.ts.map +1 -1
- package/dist/audit/cli/args.js +21 -4
- package/dist/audit/cli/args.js.map +1 -1
- package/dist/audit/cli/auditStep.d.ts +6 -15
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +1 -1
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostFanoutGate.d.ts +21 -61
- package/dist/audit/cli/dispatch/hostFanoutGate.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostFanoutGate.js +18 -167
- package/dist/audit/cli/dispatch/hostFanoutGate.js.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.d.ts +2 -2
- package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/packetFilter.js +3 -1
- package/dist/audit/cli/dispatch/packetFilter.js.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.d.ts +2 -14
- package/dist/audit/cli/dispatch/quotaPool.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.js +16 -6
- package/dist/audit/cli/dispatch/quotaPool.js.map +1 -1
- package/dist/audit/cli/dispatch/tierRouting.d.ts +2 -2
- package/dist/audit/cli/dispatch/tokenUsageObservation.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/tokenUsageObservation.js +10 -2
- package/dist/audit/cli/dispatch/tokenUsageObservation.js.map +1 -1
- package/dist/audit/cli/dispatch.d.ts +14 -3
- package/dist/audit/cli/dispatch.d.ts.map +1 -1
- package/dist/audit/cli/dispatch.js +87 -65
- package/dist/audit/cli/dispatch.js.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
- package/dist/audit/cli/forceSynthesisCommand.js +9 -1
- package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
- package/dist/audit/cli/hybridDispatch.d.ts +4 -9
- package/dist/audit/cli/hybridDispatch.d.ts.map +1 -1
- package/dist/audit/cli/hybridDispatch.js +1 -1
- package/dist/audit/cli/hybridDispatch.js.map +1 -1
- package/dist/audit/cli/lineIndex.d.ts +2 -0
- package/dist/audit/cli/lineIndex.d.ts.map +1 -1
- package/dist/audit/cli/lineIndex.js +4 -0
- package/dist/audit/cli/lineIndex.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +0 -26
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +14 -358
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +5 -16
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +27 -157
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/quotaCommand.d.ts.map +1 -1
- package/dist/audit/cli/quotaCommand.js +1 -5
- package/dist/audit/cli/quotaCommand.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +58 -23
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/rollingAuditDispatch.d.ts +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +35 -54
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +4 -4
- package/dist/audit/cli/steps.d.ts.map +1 -1
- package/dist/audit/cli/steps.js +0 -1
- package/dist/audit/cli/steps.js.map +1 -1
- package/dist/audit/cli/workPartitionRuntime.d.ts +11 -0
- package/dist/audit/cli/workPartitionRuntime.d.ts.map +1 -0
- package/dist/audit/cli/workPartitionRuntime.js +39 -0
- package/dist/audit/cli/workPartitionRuntime.js.map +1 -0
- package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
- package/dist/audit/io/artifacts.d.ts +1 -3
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +0 -3
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +0 -35
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +4 -63
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +9 -12
- 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 +0 -5
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.d.ts +1 -1
- package/dist/audit/orchestrator/hostInputPause.js +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.js +4 -1
- package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
- package/dist/audit/orchestrator/intakeExecutors.d.ts +1 -65
- package/dist/audit/orchestrator/intakeExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/intakeExecutors.js +3 -425
- package/dist/audit/orchestrator/intakeExecutors.js.map +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts +0 -13
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +0 -7
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.js +4 -1
- package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
- package/dist/audit/orchestrator/rollingDispatch.d.ts +1 -1
- package/dist/audit/orchestrator/rollingDispatch.d.ts.map +1 -1
- package/dist/audit/orchestrator/rollingDispatch.js +5 -4
- package/dist/audit/orchestrator/rollingDispatch.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts +0 -39
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +3 -29
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.d.ts +8 -2
- package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/synthesisExecutors.js +7 -5
- package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
- package/dist/audit/reporting/findingIdentity.d.ts +2 -2
- package/dist/audit/reporting/findingIdentity.js +2 -2
- package/dist/audit/reporting/synthesis.d.ts +7 -1
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +27 -7
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/reporting/workBlocks.d.ts +14 -3
- package/dist/audit/reporting/workBlocks.d.ts.map +1 -1
- package/dist/audit/reporting/workBlocks.js +163 -73
- package/dist/audit/reporting/workBlocks.js.map +1 -1
- package/dist/audit/types/activeDispatch.d.ts +8 -7
- package/dist/audit/types/activeDispatch.d.ts.map +1 -1
- package/dist/audit/types/auditState.d.ts +6 -6
- package/dist/audit/types/externalAnalyzer.d.ts +6 -6
- package/dist/audit/validation/auditResults.d.ts.map +1 -1
- package/dist/audit/validation/auditResults.js +6 -1
- package/dist/audit/validation/auditResults.js.map +1 -1
- package/dist/remediate/contractPipeline/phaseCut.d.ts +8 -0
- package/dist/remediate/contractPipeline/phaseCut.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/phaseCut.js +63 -0
- package/dist/remediate/contractPipeline/phaseCut.js.map +1 -1
- package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/phaseCutArtifact.js +5 -3
- package/dist/remediate/contractPipeline/phaseCutArtifact.js.map +1 -1
- package/dist/remediate/phases/plan.d.ts.map +1 -1
- package/dist/remediate/phases/plan.js +35 -12
- package/dist/remediate/phases/plan.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts +6 -2
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +90 -6
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +4 -2
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.d.ts +6 -0
- package/dist/remediate/steps/dispatch/marshal.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.js +16 -17
- package/dist/remediate/steps/dispatch/marshal.js.map +1 -1
- package/dist/remediate/steps/dispatch/waveScheduling.d.ts +7 -15
- package/dist/remediate/steps/dispatch/waveScheduling.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/waveScheduling.js +26 -19
- package/dist/remediate/steps/dispatch/waveScheduling.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +5 -7
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +100 -82
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/rollingSession.d.ts +2 -1
- package/dist/remediate/steps/rollingSession.d.ts.map +1 -1
- package/dist/remediate/steps/rollingSession.js +14 -8
- package/dist/remediate/steps/rollingSession.js.map +1 -1
- package/dist/remediate/steps/sessionConfigLoad.d.ts +3 -2
- package/dist/remediate/steps/sessionConfigLoad.d.ts.map +1 -1
- package/dist/remediate/steps/sessionConfigLoad.js +4 -10
- package/dist/remediate/steps/sessionConfigLoad.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 +7 -1
- package/dist/remediate/validation/contractPipeline.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +8 -0
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +89 -0
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/shared/config/resolveSessionConfig.d.ts.map +1 -1
- package/dist/shared/config/resolveSessionConfig.js +6 -5
- package/dist/shared/config/resolveSessionConfig.js.map +1 -1
- package/dist/shared/decompose/workPartition.d.ts +66 -0
- package/dist/shared/decompose/workPartition.d.ts.map +1 -0
- package/dist/shared/decompose/workPartition.js +523 -0
- package/dist/shared/decompose/workPartition.js.map +1 -0
- package/dist/shared/dispatch/admissionLoop.d.ts +5 -44
- package/dist/shared/dispatch/admissionLoop.d.ts.map +1 -1
- package/dist/shared/dispatch/admissionLoop.js +20 -82
- package/dist/shared/dispatch/admissionLoop.js.map +1 -1
- package/dist/shared/dispatch/coordinator.d.ts +5 -5
- package/dist/shared/dispatch/coordinator.d.ts.map +1 -1
- package/dist/shared/dispatch/coordinator.js +12 -11
- package/dist/shared/dispatch/coordinator.js.map +1 -1
- package/dist/shared/dispatch/costRank.d.ts +5 -155
- package/dist/shared/dispatch/costRank.d.ts.map +1 -1
- package/dist/shared/dispatch/costRank.js +2 -179
- package/dist/shared/dispatch/costRank.js.map +1 -1
- package/dist/shared/dispatch/dispatchQuotaContract.d.ts +37 -38
- package/dist/shared/dispatch/dispatchQuotaContract.d.ts.map +1 -1
- package/dist/shared/dispatch/dispatchQuotaContract.js +0 -1
- package/dist/shared/dispatch/dispatchQuotaContract.js.map +1 -1
- package/dist/shared/dispatch/hybridDispatch.d.ts +6 -2
- package/dist/shared/dispatch/hybridDispatch.d.ts.map +1 -1
- package/dist/shared/dispatch/hybridDispatch.js +1 -1
- package/dist/shared/dispatch/hybridDispatch.js.map +1 -1
- package/dist/shared/dispatch/rollingDispatch.d.ts +4 -4
- package/dist/shared/dispatch/rollingDispatch.d.ts.map +1 -1
- package/dist/shared/dispatch/rollingDispatch.js +13 -11
- package/dist/shared/dispatch/rollingDispatch.js.map +1 -1
- package/dist/shared/dispatch/unifiedRolling.d.ts +2 -2
- package/dist/shared/dispatch/unifiedRolling.d.ts.map +1 -1
- package/dist/shared/dispatch/unifiedRolling.js +1 -1
- package/dist/shared/dispatch/unifiedRolling.js.map +1 -1
- package/dist/shared/engine/obligationEngine.d.ts +2 -2
- package/dist/shared/friction/stepBoundaryCapture.d.ts +5 -59
- package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.js +11 -107
- package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
- package/dist/shared/index.d.ts +13 -16
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +9 -13
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/io/stateDir.d.ts +2 -2
- package/dist/shared/io/stateDir.js +2 -2
- package/dist/shared/providers/auditorSources.d.ts +10 -84
- package/dist/shared/providers/auditorSources.d.ts.map +1 -1
- package/dist/shared/providers/auditorSources.js +42 -261
- package/dist/shared/providers/auditorSources.js.map +1 -1
- package/dist/shared/providers/dispatchExclusion.d.ts +22 -0
- package/dist/shared/providers/dispatchExclusion.d.ts.map +1 -0
- package/dist/shared/providers/dispatchExclusion.js +23 -0
- package/dist/shared/providers/dispatchExclusion.js.map +1 -0
- package/dist/shared/providers/identity.d.ts +2 -66
- package/dist/shared/providers/identity.d.ts.map +1 -1
- package/dist/shared/providers/identity.js +2 -72
- package/dist/shared/providers/identity.js.map +1 -1
- package/dist/shared/providers/providerFactory.d.ts +0 -3
- package/dist/shared/providers/providerFactory.d.ts.map +1 -1
- package/dist/shared/providers/providerFactory.js +5 -32
- package/dist/shared/providers/providerFactory.js.map +1 -1
- package/dist/shared/providers/providerPathGuard.d.ts +3 -3
- package/dist/shared/providers/providerPathGuard.js +7 -7
- package/dist/shared/providers/providerPathGuard.js.map +1 -1
- package/dist/shared/quota/apiPool.d.ts +19 -22
- package/dist/shared/quota/apiPool.d.ts.map +1 -1
- package/dist/shared/quota/apiPool.js +66 -47
- package/dist/shared/quota/apiPool.js.map +1 -1
- package/dist/shared/quota/capacity.d.ts +29 -24
- package/dist/shared/quota/capacity.d.ts.map +1 -1
- package/dist/shared/quota/capacity.js +30 -4
- package/dist/shared/quota/capacity.js.map +1 -1
- package/dist/shared/quota/codexHostConfig.d.ts +6 -13
- package/dist/shared/quota/codexHostConfig.d.ts.map +1 -1
- package/dist/shared/quota/codexHostConfig.js +8 -14
- package/dist/shared/quota/codexHostConfig.js.map +1 -1
- package/dist/shared/quota/fileLock.d.ts +7 -0
- package/dist/shared/quota/fileLock.d.ts.map +1 -1
- package/dist/shared/quota/fileLock.js +32 -4
- package/dist/shared/quota/fileLock.js.map +1 -1
- package/dist/shared/quota/hostLimits.d.ts +1 -1
- package/dist/shared/quota/hostLimits.d.ts.map +1 -1
- package/dist/shared/quota/hostLimits.js +8 -11
- package/dist/shared/quota/hostLimits.js.map +1 -1
- package/dist/shared/quota/hostPool.d.ts +1 -1
- package/dist/shared/quota/hostPool.js +2 -2
- package/dist/shared/quota/hostPool.js.map +1 -1
- package/dist/shared/quota/limits.d.ts.map +1 -1
- package/dist/shared/quota/limits.js +30 -26
- package/dist/shared/quota/limits.js.map +1 -1
- package/dist/shared/quota/scheduler.d.ts +2 -3
- package/dist/shared/quota/scheduler.d.ts.map +1 -1
- package/dist/shared/quota/scheduler.js +1 -1
- package/dist/shared/quota/scheduler.js.map +1 -1
- package/dist/shared/quota/types.d.ts +10 -10
- package/dist/shared/quota/types.d.ts.map +1 -1
- package/dist/shared/quota/types.js +4 -7
- package/dist/shared/quota/types.js.map +1 -1
- package/dist/shared/repair/brokeredDispatch.d.ts.map +1 -1
- package/dist/shared/repair/brokeredDispatch.js +3 -0
- package/dist/shared/repair/brokeredDispatch.js.map +1 -1
- package/dist/shared/reporting/auditDeliverable.d.ts.map +1 -1
- package/dist/shared/reporting/auditDeliverable.js +1 -0
- package/dist/shared/reporting/auditDeliverable.js.map +1 -1
- package/dist/shared/rolling/pausedState.d.ts +7 -7
- package/dist/shared/rolling/pausedState.js +3 -3
- package/dist/shared/tokens.d.ts +2 -5
- package/dist/shared/tokens.d.ts.map +1 -1
- package/dist/shared/tokens.js +15 -15
- package/dist/shared/tokens.js.map +1 -1
- package/dist/shared/types/auditorDescriptor.d.ts +3 -2
- package/dist/shared/types/auditorDescriptor.d.ts.map +1 -1
- package/dist/shared/types/auditorDescriptor.js +3 -2
- package/dist/shared/types/auditorDescriptor.js.map +1 -1
- package/dist/shared/types/finding.d.ts +80 -0
- package/dist/shared/types/finding.d.ts.map +1 -1
- package/dist/shared/types/finding.js +17 -0
- package/dist/shared/types/finding.js.map +1 -1
- package/dist/shared/types/sessionConfig.d.ts +5 -5
- package/dist/shared/types/sessionConfig.js +1 -1
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +3 -0
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/development.md +3 -2
- package/docs/audit-pkg/operator-guide.md +13 -106
- package/docs/audit-pkg/product.md +8 -7
- package/docs/audit-pkg/release.md +38 -29
- package/opencode.json +2 -2
- package/package.json +7 -4
- package/skills/audit-code/SKILL.md +2 -1
- package/skills/audit-code/audit-code.prompt.md +4 -3
- package/skills/remediate-code/remediate-code.prompt.md +2 -1
- package/dist/audit/cli/providerConfirmationStep.d.ts +0 -106
- package/dist/audit/cli/providerConfirmationStep.d.ts.map +0 -1
- package/dist/audit/cli/providerConfirmationStep.js +0 -396
- package/dist/audit/cli/providerConfirmationStep.js.map +0 -1
- package/dist/audit/orchestrator/providerConfirmation.d.ts +0 -25
- package/dist/audit/orchestrator/providerConfirmation.d.ts.map +0 -1
- package/dist/audit/orchestrator/providerConfirmation.js +0 -60
- package/dist/audit/orchestrator/providerConfirmation.js.map +0 -1
- package/dist/shared/providers/providerConfirmation.d.ts +0 -141
- package/dist/shared/providers/providerConfirmation.d.ts.map +0 -1
- package/dist/shared/providers/providerConfirmation.js +0 -420
- package/dist/shared/providers/providerConfirmation.js.map +0 -1
- package/dist/shared/providers/proxyCatalog.d.ts +0 -158
- package/dist/shared/providers/proxyCatalog.d.ts.map +0 -1
- package/dist/shared/providers/proxyCatalog.js +0 -658
- package/dist/shared/providers/proxyCatalog.js.map +0 -1
- package/dist/shared/providers/sharedProviderConfirmation.d.ts +0 -802
- package/dist/shared/providers/sharedProviderConfirmation.d.ts.map +0 -1
- package/dist/shared/providers/sharedProviderConfirmation.js +0 -1865
- package/dist/shared/providers/sharedProviderConfirmation.js.map +0 -1
- package/dist/shared/types/providerConfirmation.d.ts +0 -334
- package/dist/shared/types/providerConfirmation.d.ts.map +0 -1
- package/dist/shared/types/providerConfirmation.js +0 -35
- package/dist/shared/types/providerConfirmation.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { existsSync, statSync } from "node:fs";
|
|
|
3
3
|
import { mkdir, readFile, rename } from "node:fs/promises";
|
|
4
4
|
import { dirname, join, resolve } from "node:path";
|
|
5
5
|
import { StateStore } from "../state/store.js";
|
|
6
|
-
import { discardOnSchemaVersionMismatch,
|
|
6
|
+
import { discardOnSchemaVersionMismatch, buildSelfSpawnExclusion, readOptionalJsonFile, readValidatedRepoSessionIntent, stagedAndUntracked, writeJsonFile, writeTextFile, buildAuditDeliverablePair, formatValidationIssues, isRecord, withFsRetry, RunLogger, DISPATCH_PROMPT_HANDOFF_NOTE, renderHostScratchNote, hostScratchDir, renderQuotaCoverageNudge, renderTokenBudgetView, coerceJsonObjectArg, driveRolling, resolveLedgerBudgets, setQuotaStateDir, detectHostDispatchWall, admissionBlockedOnBudget, classifyEmptyGrantCause, reconcileAdmissionLeasesFromQuotaFile, buildQuotaPausedTerminal, interpretFreeFormIntent, advance, decideFrictionTriage, buildFrictionTriageBlock, planHybridDispatch, readSettledPools, addSettledPool, isPoolSettlingOutcome, isInProcessWorkerProvider, sourceByPoolId, classifyProvider, selectDispatchDriver, renderDispatchDriverInstruction, HostSessionQuotaSource, quotaPoolKey, captureStepBoundaryFriction, captureZeroCapacityFriction, captureCostDriftFriction, captureCreditExhaustionFriction, captureQuotaUnclassifiedFriction, captureModelUnavailableFriction, capturePacketTooLargeFriction, createDispatchDecisionLog, LENSES, SEVERITIES, resolveHostProviderName, resolveHostDispatchProviderName, resolveHostDispatchCapability as sharedResolveHostDispatchCapability, resolveAutonomousMode, resolveRollingEngineFlag } from "audit-tools/shared";
|
|
7
7
|
import { readRemediationAccessMemory, computeBlockContinuityScores } from "../state/accessMemory.js";
|
|
8
8
|
import { applyPlanPipeline, buildCoverageLedger } from "../phases/plan.js";
|
|
9
9
|
import { groundExtractedFindings } from "../phases/grounding.js";
|
|
@@ -71,19 +71,15 @@ export function resolveRollingEngineEnabled(options) {
|
|
|
71
71
|
env: options.env,
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
/** Conservative context-window floor, applied ONLY at true first contact (nothing persisted). */
|
|
75
|
-
const HOST_CONTEXT_TOKENS_FLOOR = DEFAULT_CONTEXT_TOKENS;
|
|
76
74
|
function finiteOrUndefined(value) {
|
|
77
75
|
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
78
76
|
}
|
|
79
77
|
/**
|
|
80
78
|
* Pure per-field host-capability resolver (C1). Each field resolves as
|
|
81
|
-
* `explicit ?? persisted
|
|
82
|
-
* clobber that would drop fields the current call omitted.
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* than re-flooring. Corrupt / non-finite persisted numbers degrade to undefined
|
|
86
|
-
* without throwing.
|
|
79
|
+
* `explicit ?? persisted` — a per-field merge, never a whole-object
|
|
80
|
+
* clobber that would drop fields the current call omitted. Corrupt / non-finite
|
|
81
|
+
* persisted numbers degrade to undefined without throwing; missing capability
|
|
82
|
+
* stays missing and is handled by the dispatch/plan refusal seam.
|
|
87
83
|
*
|
|
88
84
|
* Returns:
|
|
89
85
|
* - `resolved` — the merged capabilities to drive downstream dispatch sizing;
|
|
@@ -93,11 +89,9 @@ function finiteOrUndefined(value) {
|
|
|
93
89
|
export function resolveHostCapabilities(explicit, persisted) {
|
|
94
90
|
const exp = explicit ?? {};
|
|
95
91
|
const per = persisted && typeof persisted === "object" ? persisted : undefined;
|
|
96
|
-
const firstContact = per === undefined;
|
|
97
92
|
const pick = (e, p) => e ?? p ?? undefined;
|
|
98
93
|
const context_tokens = finiteOrUndefined(exp.context_tokens) ??
|
|
99
|
-
finiteOrUndefined(per?.context_tokens)
|
|
100
|
-
(firstContact ? HOST_CONTEXT_TOKENS_FLOOR : undefined);
|
|
94
|
+
finiteOrUndefined(per?.context_tokens);
|
|
101
95
|
const resolved = {
|
|
102
96
|
can_dispatch_subagents: pick(exp.can_dispatch_subagents, per?.can_dispatch_subagents),
|
|
103
97
|
max_concurrent: finiteOrUndefined(exp.max_concurrent) ?? finiteOrUndefined(per?.max_concurrent),
|
|
@@ -106,8 +100,7 @@ export function resolveHostCapabilities(explicit, persisted) {
|
|
|
106
100
|
model_id: pick(exp.model_id, per?.model_id),
|
|
107
101
|
models: exp.models ?? per?.models,
|
|
108
102
|
};
|
|
109
|
-
// Persist ONLY the explicitly-supplied fields (the delta)
|
|
110
|
-
// never an omitted field.
|
|
103
|
+
// Persist ONLY the explicitly-supplied fields (the delta), never an omitted field.
|
|
111
104
|
const toPersist = {};
|
|
112
105
|
if (exp.can_dispatch_subagents !== undefined)
|
|
113
106
|
toPersist.can_dispatch_subagents = exp.can_dispatch_subagents;
|
|
@@ -592,7 +585,7 @@ export async function driveRollingDispatch(levels, options) {
|
|
|
592
585
|
};
|
|
593
586
|
}
|
|
594
587
|
/**
|
|
595
|
-
* Whether
|
|
588
|
+
* Whether an eligible pool is one the orchestrator launches IN-PROCESS this cycle
|
|
596
589
|
* (vs. the conversation host's subagent pool) — the shared
|
|
597
590
|
* `isInProcessWorkerProvider` predicate (H3), same remediate policy.
|
|
598
591
|
*/
|
|
@@ -698,7 +691,7 @@ export async function driveRollingImplementDispatch(options) {
|
|
|
698
691
|
}, "remediate-code");
|
|
699
692
|
},
|
|
700
693
|
});
|
|
701
|
-
//
|
|
694
|
+
// Eligible pools: quota-derived concurrency, never the raw host flag (INV-QD-11).
|
|
702
695
|
// A partition-scoped caller supplies its coordinator's already-built set instead.
|
|
703
696
|
const builtPools = options.poolsOverride
|
|
704
697
|
? null
|
|
@@ -709,13 +702,10 @@ export async function driveRollingImplementDispatch(options) {
|
|
|
709
702
|
hostOutputTokens: options.waveOptions?.hostOutputTokens,
|
|
710
703
|
hostModels: options.waveOptions?.hostModels,
|
|
711
704
|
hostModelId: options.waveOptions?.hostModelId,
|
|
712
|
-
capabilityRanks:
|
|
705
|
+
capabilityRanks: null,
|
|
713
706
|
hostSession,
|
|
714
|
-
//
|
|
715
|
-
|
|
716
|
-
// recomputed against THIS process's env rather than inherited from the auditor
|
|
717
|
-
// that wrote the confirmation.
|
|
718
|
-
excludedBackends: resolveDispatchExclusion(await readConfirmedDispatchPolicy(options.root)),
|
|
707
|
+
// Mechanical self-spawn exclusion, recomputed from this process's environment.
|
|
708
|
+
excludedBackends: buildSelfSpawnExclusion(),
|
|
719
709
|
});
|
|
720
710
|
const confirmedPools = options.poolsOverride ?? builtPools.pools;
|
|
721
711
|
// The operator's own policy left this dispatch with no capacity at all. Loud, not
|
|
@@ -1245,6 +1235,9 @@ async function buildImplementDispatchStep(ctx) {
|
|
|
1245
1235
|
hostOutputTokens: resolvedHostOutputTokens,
|
|
1246
1236
|
hostModels: resolvedHostModels,
|
|
1247
1237
|
hostModelId: resolvedHostModelId,
|
|
1238
|
+
// An attended host is the dispatch authority. Headless/in-process paths
|
|
1239
|
+
// leave this false and retain the shared admission engine.
|
|
1240
|
+
hostOwnedDispatch: canDispatchImpl,
|
|
1248
1241
|
};
|
|
1249
1242
|
// H2+H4 collapse: ONE fan-out over the eligible pool set. `buildConfirmedPools`
|
|
1250
1243
|
// folds the configured primary in-process backend in as a source pool
|
|
@@ -1270,27 +1263,33 @@ async function buildImplementDispatchStep(ctx) {
|
|
|
1270
1263
|
const hybridHostSession = new HostSessionQuotaSource({
|
|
1271
1264
|
providerModelKey: hybridHostSessionModelKey,
|
|
1272
1265
|
});
|
|
1273
|
-
const { pools: confirmedPools, zeroedByExclusion } = await buildConfirmedPools({
|
|
1266
|
+
const { pools: confirmedPools, zeroedByExclusion, sourcePoolIds } = await buildConfirmedPools({
|
|
1274
1267
|
sessionConfig: sessionConfigImpl ?? null,
|
|
1275
1268
|
hostMaxConcurrent: resolvedHostMaxConcurrent,
|
|
1276
1269
|
hostContextTokens: resolvedHostContextTokens,
|
|
1277
1270
|
hostOutputTokens: resolvedHostOutputTokens,
|
|
1278
1271
|
hostModels: resolvedHostModels,
|
|
1279
1272
|
hostModelId: resolvedHostModelId,
|
|
1280
|
-
capabilityRanks:
|
|
1273
|
+
capabilityRanks: null,
|
|
1281
1274
|
hostSession: hybridHostSession,
|
|
1282
1275
|
// Attendance IS pool-set membership: headless ⇒ no host pool in the set.
|
|
1283
1276
|
hostCanDispatch: canDispatchImpl,
|
|
1284
|
-
//
|
|
1285
|
-
|
|
1286
|
-
|
|
1277
|
+
// Mechanical self-spawn exclusion uses the same resolved driver identity as quota.
|
|
1278
|
+
excludedBackends: buildSelfSpawnExclusion({
|
|
1279
|
+
activeHostProvider: canDispatchImpl ? hybridProviderName : null,
|
|
1280
|
+
}),
|
|
1287
1281
|
});
|
|
1288
1282
|
// Loud, not silent: on the headless branch below there is no host pool to fall
|
|
1289
1283
|
// back to, so a policy-zeroed set means this dispatch does nothing at all.
|
|
1290
1284
|
if (zeroedByExclusion) {
|
|
1291
1285
|
await captureZeroCapacityFriction(artifactsDir, runId, zeroedByExclusion, "remediate-code");
|
|
1292
1286
|
}
|
|
1293
|
-
|
|
1287
|
+
// Engine-drivable backends are SOURCE pools only, by declared class — never
|
|
1288
|
+
// re-derived from the provider name. The neutral worker-command host identity
|
|
1289
|
+
// name-collides with the in-process worker class, so a name-only test would
|
|
1290
|
+
// hand the HOST's own pool to the engine as a spawnable worker.
|
|
1291
|
+
const isEngineDrivableId = (poolId, providerName) => sourcePoolIds.has(poolId) && isInProcessPool({ providerName });
|
|
1292
|
+
const backendPools = confirmedPools.filter((p) => isEngineDrivableId(p.id, p.providerName));
|
|
1294
1293
|
if (!canDispatchImpl) {
|
|
1295
1294
|
// Headless: no host pool in the eligible set — when any dispatchable
|
|
1296
1295
|
// backend pool is confirmed, the engine drives the FULL rolling implement
|
|
@@ -1381,7 +1380,7 @@ async function buildImplementDispatchStep(ctx) {
|
|
|
1381
1380
|
settled.add(id);
|
|
1382
1381
|
await addSettledPool(settledPath, id);
|
|
1383
1382
|
},
|
|
1384
|
-
isInProcess:
|
|
1383
|
+
isInProcess: (a) => isEngineDrivableId(a.poolId, a.providerName),
|
|
1385
1384
|
});
|
|
1386
1385
|
// Drive the in-process partition through the ROLLING ENGINE (H2 plan D2 —
|
|
1387
1386
|
// `executeInProcessPartition`'s direct Promise.all executor is deleted; one
|
|
@@ -1516,7 +1515,9 @@ async function buildImplementDispatchStep(ctx) {
|
|
|
1516
1515
|
// nodes stay PENDING and re-dispatch on resume. The in-process partition (above)
|
|
1517
1516
|
// already ran on its own cooldown-safe pool, so its work still lands.
|
|
1518
1517
|
if (rolling.wall) {
|
|
1519
|
-
|
|
1518
|
+
if (rolling.quotaPath) {
|
|
1519
|
+
await reconcileAdmissionLeasesFromQuotaFile(rolling.quotaPath);
|
|
1520
|
+
}
|
|
1520
1521
|
const paused = await store.loadState();
|
|
1521
1522
|
if (paused) {
|
|
1522
1523
|
paused.partial_completion_terminal = buildQuotaPausedTerminal(rolling.wall.strandedBlockIds, rolling.wall.detected.earliestResetAt, rolling.wall.detected.emptyGrantCause);
|
|
@@ -1536,7 +1537,9 @@ async function buildImplementDispatchStep(ctx) {
|
|
|
1536
1537
|
if (rolling.session.frontier.length === 0) {
|
|
1537
1538
|
const structuralRefusal = detectStructuralRefusalPause(await readOptionalJsonFile(rolling.quotaPath));
|
|
1538
1539
|
if (structuralRefusal.pause) {
|
|
1539
|
-
|
|
1540
|
+
if (rolling.quotaPath) {
|
|
1541
|
+
await reconcileAdmissionLeasesFromQuotaFile(rolling.quotaPath);
|
|
1542
|
+
}
|
|
1540
1543
|
const paused = await store.loadState();
|
|
1541
1544
|
if (paused) {
|
|
1542
1545
|
paused.partial_completion_terminal = buildQuotaPausedTerminal(structuralRefusal.refusedIds, null, "no_capable_pool");
|
|
@@ -1565,6 +1568,16 @@ async function buildImplementDispatchStep(ctx) {
|
|
|
1565
1568
|
const rollNext = loaderCommand("next-step");
|
|
1566
1569
|
const acceptCmd = loaderCommand(`accept-node --id <BLOCK_ID> --run-id ${runId}`);
|
|
1567
1570
|
const reverifyCmd = loaderCommand(`reverify-node --id <BLOCK_ID> --run-id ${runId}`);
|
|
1571
|
+
const hostOwnedRolling = rolling.quotaPath === null;
|
|
1572
|
+
const dispatchAuthorityNote = hostOwnedRolling
|
|
1573
|
+
? `The attended host and llm-relay own provider selection, failover, quota, and
|
|
1574
|
+
concurrency. Dispatch the COMPLETE eligible set of ${rolling.session.frontier.length}
|
|
1575
|
+
node(s) below; audit-tools imposes no admission subset, cold-start wall, or concurrency
|
|
1576
|
+
cap. When they are all accepted, merge and re-invoke next-step.`
|
|
1577
|
+
: `The tool admitted this set against the live budget (and any declared in-flight cap):
|
|
1578
|
+
dispatch EXACTLY the ${rolling.session.frontier.length} node(s) below and no more.
|
|
1579
|
+
Their count is the whole grant — there is no separate concurrency cap. When they are
|
|
1580
|
+
all accepted, merge and re-invoke next-step; the tool re-grants the pending remainder.`;
|
|
1568
1581
|
const nodeLines = rolling.initial
|
|
1569
1582
|
.map((n) => `- \`${n.block_id}\` — prompt: \`${n.prompt_path}\` — worktree (subagent cwd): \`${n.worktree_root}\``)
|
|
1570
1583
|
.join("\n");
|
|
@@ -1581,19 +1594,16 @@ Each granted node runs in its OWN git worktree (hard isolation between nodes). T
|
|
|
1581
1594
|
TOOL owns commit -> verify -> merge + write-scope; you only spawn a subagent per
|
|
1582
1595
|
node and call \`accept-node\` as each finishes.
|
|
1583
1596
|
|
|
1584
|
-
|
|
1585
|
-
dispatch EXACTLY the ${rolling.session.frontier.length} node(s) below and no more.
|
|
1586
|
-
Their count is the whole grant — there is no separate concurrency cap. When they are
|
|
1587
|
-
all accepted, merge and re-invoke next-step; the tool re-grants the pending remainder.
|
|
1597
|
+
${dispatchAuthorityNote}
|
|
1588
1598
|
|
|
1589
|
-
${renderDispatchDriverInstruction(driverSelection, `the ${rolling.session.frontier.length} granted node(s)`)}
|
|
1599
|
+
${renderDispatchDriverInstruction(driverSelection, `the ${rolling.session.frontier.length} ${hostOwnedRolling ? "eligible" : "granted"} node(s)`)}
|
|
1590
1600
|
|
|
1591
1601
|
Spawn ONE subagent for EACH granted node below. Give the subagent that node's
|
|
1592
1602
|
\`prompt\`, and set its working directory to the node's **worktree** path. The
|
|
1593
1603
|
subagent edits source files INSIDE that worktree and writes ONLY its result file.
|
|
1594
1604
|
Do NOT let any subagent edit the main repository tree.
|
|
1595
1605
|
|
|
1596
|
-
Granted nodes (worktrees already created):
|
|
1606
|
+
${hostOwnedRolling ? "Eligible" : "Granted"} nodes (worktrees already created):
|
|
1597
1607
|
${nodeLines}
|
|
1598
1608
|
|
|
1599
1609
|
As EACH subagent finishes, run (substituting the finished node's block id):
|
|
@@ -1642,7 +1652,10 @@ ${renderHostScratchNote(hostScratchDir(artifactsDir, runId))}
|
|
|
1642
1652
|
`,
|
|
1643
1653
|
allowedCommands: [acceptCmd, reverifyCmd, rollMerge, rollNext],
|
|
1644
1654
|
stopCondition: "Stop after every node has reached a terminal accept (accept-node returns done), results merged, and next-step has been run.",
|
|
1645
|
-
artifactPaths: {
|
|
1655
|
+
artifactPaths: {
|
|
1656
|
+
dispatch_plan: rolling.planPath,
|
|
1657
|
+
...(rolling.quotaPath ? { dispatch_quota: rolling.quotaPath } : {}),
|
|
1658
|
+
},
|
|
1646
1659
|
}) };
|
|
1647
1660
|
}
|
|
1648
1661
|
}
|
|
@@ -1716,40 +1729,43 @@ Then run:
|
|
|
1716
1729
|
// of `implementing`) emits the resumable `quota_paused` step this same advance; the
|
|
1717
1730
|
// ungranted nodes stay PENDING and re-dispatch on resume (never abandoned to partial
|
|
1718
1731
|
// coverage — the remediate divergence from audit's read-only bound-and-give-up).
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
implQuota?.capacity_pools?.
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1732
|
+
if (!waveOptsImpl.hostOwnedDispatch) {
|
|
1733
|
+
const implQuota = await readOptionalJsonFile(implQuotaPath);
|
|
1734
|
+
// D1 parity: the binding budget window (from the host pool's capacity summary) so an
|
|
1735
|
+
// empty_grant wall derives a reset time instead of the bare `earliestResetAt: null` —
|
|
1736
|
+
// but ONLY on a genuine BUDGET block, not a `cap_reached` ledger-contention wall
|
|
1737
|
+
// (frees in seconds; the window reset may be days out).
|
|
1738
|
+
const implBudgetBound = admissionBlockedOnBudget(implQuota?.admission?.explains ?? []);
|
|
1739
|
+
const implBindingWindow = implBudgetBound
|
|
1740
|
+
? implQuota?.capacity_pools?.find((p) => p.is_conversation_host)?.binding_window ??
|
|
1741
|
+
implQuota?.capacity_pools?.[0]?.binding_window ??
|
|
1742
|
+
null
|
|
1743
|
+
: null;
|
|
1744
|
+
const implWall = detectHostDispatchWall({
|
|
1745
|
+
grantedCount: implQuota?.admission?.granted_packet_ids?.length ?? 0,
|
|
1746
|
+
cooldownUntil: implQuota?.cooldown_until ?? null,
|
|
1747
|
+
bindingWindow: implBindingWindow,
|
|
1748
|
+
// Step E parity: classify the zero-grant cause so the quota_paused terminal's
|
|
1749
|
+
// reset semantics stay honest (a no_capable_pool wall has no reset to wait for).
|
|
1750
|
+
explains: implQuota?.admission?.explains ?? [],
|
|
1751
|
+
now: Date.now(),
|
|
1752
|
+
});
|
|
1753
|
+
if (implWall.atWall) {
|
|
1754
|
+
// Release the leases the grant just reserved — pausing skips the merge that would
|
|
1755
|
+
// reconcile them, so without this they leak until TTL and mis-size the resume grant.
|
|
1756
|
+
await reconcileAdmissionLeasesFromQuotaFile(implQuotaPath);
|
|
1757
|
+
const strandedIds = dispatchPlan.items
|
|
1758
|
+
.map((item) => item.block_id)
|
|
1759
|
+
.filter((id) => typeof id === "string");
|
|
1760
|
+
const paused = await store.loadState();
|
|
1761
|
+
if (paused) {
|
|
1762
|
+
paused.partial_completion_terminal = buildQuotaPausedTerminal(strandedIds, implWall.earliestResetAt, implWall.emptyGrantCause);
|
|
1763
|
+
await store.saveState(paused);
|
|
1764
|
+
}
|
|
1765
|
+
return { kind: "transition", state: paused };
|
|
1750
1766
|
}
|
|
1751
|
-
return { kind: "transition", state: paused };
|
|
1752
1767
|
}
|
|
1768
|
+
const hostOwnedLegacy = waveOptsImpl.hostOwnedDispatch === true;
|
|
1753
1769
|
return { kind: "emit", step: await writeCurrentStep({
|
|
1754
1770
|
stepKind: "dispatch_implement",
|
|
1755
1771
|
status: "ready",
|
|
@@ -1759,29 +1775,28 @@ Then run:
|
|
|
1759
1775
|
prompt: `
|
|
1760
1776
|
# Dispatch Implementation Work (rolling)
|
|
1761
1777
|
|
|
1762
|
-
Read the dispatch plan and quota JSONs:
|
|
1778
|
+
Read the dispatch plan${hostOwnedLegacy ? "" : " and quota JSONs"}:
|
|
1763
1779
|
|
|
1764
1780
|
\`${planPath}\`
|
|
1765
|
-
|
|
1781
|
+
${hostOwnedLegacy ? "" : `\`${implQuotaPath}\``}
|
|
1766
1782
|
|
|
1767
1783
|
Every item in \`items\` is a node whose dependencies are all VERIFIED-COMPLETE
|
|
1768
|
-
(INV-RS-01).
|
|
1769
|
-
|
|
1770
|
-
set is the whole grant (there is no separate concurrency cap). Each item's
|
|
1784
|
+
(INV-RS-01). ${hostOwnedLegacy
|
|
1785
|
+
? "The attended host and llm-relay own provider selection, failover, quota, and concurrency. Dispatch every item in this complete eligible plan; audit-tools imposes no admission subset, cold-start wall, or concurrency cap."
|
|
1786
|
+
: "The tool admitted a budget-bounded subset: dispatch EXACTLY the block ids in the quota file's `admission.granted_packet_ids` and no others — that granted set is the whole grant (there is no separate concurrency cap)."} Each item's
|
|
1771
1787
|
\`model_hint.tier\` suggests which model to use (small/standard/deep). If your
|
|
1772
1788
|
provider has rate limits, pace launches accordingly.
|
|
1773
1789
|
|
|
1774
|
-
For each GRANTED item in \`items
|
|
1790
|
+
For each ${hostOwnedLegacy ? "eligible" : "GRANTED"} item in \`items\`${hostOwnedLegacy ? "" : " (its `block_id` in `admission.granted_packet_ids`)"},
|
|
1775
1791
|
dispatch one subagent with that item's \`prompt_path\`. Each subagent may edit source
|
|
1776
1792
|
files needed for that bounded block and must write only its assigned \`result_path\`.
|
|
1777
|
-
After the granted set is merged and you run next-step, the tool re-grants the pending
|
|
1778
|
-
remainder.
|
|
1793
|
+
${hostOwnedLegacy ? "After the complete plan is merged, run next-step." : "After the granted set is merged and you run next-step, the tool re-grants the pending remainder."}
|
|
1779
1794
|
|
|
1780
1795
|
${SHARED_REBUILD_BETWEEN_LEVELS_NOTE}
|
|
1781
1796
|
|
|
1782
|
-
${renderQuotaCoverageNudge(implQuotaPath, artifactsDir)}
|
|
1797
|
+
${renderQuotaCoverageNudge(hostOwnedLegacy ? null : implQuotaPath, artifactsDir)}
|
|
1783
1798
|
|
|
1784
|
-
${renderTokenBudgetView(implQuotaPath)}
|
|
1799
|
+
${renderTokenBudgetView(hostOwnedLegacy ? null : implQuotaPath)}
|
|
1785
1800
|
|
|
1786
1801
|
${DISPATCH_PROMPT_HANDOFF_NOTE}
|
|
1787
1802
|
|
|
@@ -1797,7 +1812,10 @@ Then run:
|
|
|
1797
1812
|
`,
|
|
1798
1813
|
allowedCommands: [mergeCommand, nextCommand],
|
|
1799
1814
|
stopCondition: "Stop after all implementation results have been merged and next-step has been run.",
|
|
1800
|
-
artifactPaths: {
|
|
1815
|
+
artifactPaths: {
|
|
1816
|
+
dispatch_plan: planPath,
|
|
1817
|
+
...(hostOwnedLegacy ? {} : { dispatch_quota: implQuotaPath }),
|
|
1818
|
+
},
|
|
1801
1819
|
}) };
|
|
1802
1820
|
}
|
|
1803
1821
|
/**
|
|
@@ -4057,7 +4075,7 @@ async function decideNextStepLoop(options, runLogger) {
|
|
|
4057
4075
|
// When the fold ran only inside the implement-dispatch step builder, a
|
|
4058
4076
|
// next-step call carrying the flags that landed on any other obligation (a
|
|
4059
4077
|
// triage re-drive — the 2026-07-22 dogfood wall) silently dropped them and
|
|
4060
|
-
// dispatch capability stayed
|
|
4078
|
+
// dispatch capability stayed unknown and produced a resumable refusal.
|
|
4061
4079
|
if (state) {
|
|
4062
4080
|
const { toPersist } = resolveHostCapabilities({
|
|
4063
4081
|
can_dispatch_subagents: options.hostCanDispatchSubagents,
|