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
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import type { ConfirmedPoolEntry, SourcePoolDisplayEntry, NewlyReachableBackend } from "audit-tools/shared";
|
|
2
|
-
/**
|
|
3
|
-
* Render the host-facing prompt for the interactive `provider_confirmation` step
|
|
4
|
-
* (Gate-0, cost-first routing — spec/dispatch-quota.md). Shows the priced,
|
|
5
|
-
* suggested provider pool (ascending cost) and asks the host to confirm it, or to
|
|
6
|
-
* submit an operator reorder / exclusion / host-model roster by writing
|
|
7
|
-
* `provider-confirmation.input.json`. Writing that file (even to accept the
|
|
8
|
-
* suggestion verbatim) is what lets the run proceed — its presence is the
|
|
9
|
-
* "operator has acted" signal the gate consumes.
|
|
10
|
-
*
|
|
11
|
-
* The tool owns discovery + the cost annotation: the host supplies only ordering
|
|
12
|
-
* intent + its model roster, and the tool promotes that into both canonical
|
|
13
|
-
* artifacts. So this prompt never asks the host to hand-author prices or
|
|
14
|
-
* capability flags.
|
|
15
|
-
*/
|
|
16
|
-
export declare function renderProviderConfirmationPrompt(opts: {
|
|
17
|
-
/** The tool's suggested pool, already annotated with model_id/price/cost_order. */
|
|
18
|
-
providerPool: ConfirmedPoolEntry[];
|
|
19
|
-
/**
|
|
20
|
-
* Every configured `sessionConfig.sources[]` pool (backlog follow-up a) —
|
|
21
|
-
* display-only, derived by `deriveSourcePoolDisplay`. These are NOT part of
|
|
22
|
-
* `providerPool` / its `cost_order` sequence, but `collectDispatchableSources`
|
|
23
|
-
* (apiPool.ts) folds every one of them into dispatch, so they must be visible
|
|
24
|
-
* here or the operator is confirming an ordering that omits pools that WILL
|
|
25
|
-
* route. Omit/empty when no `sources[]` are configured.
|
|
26
|
-
*/
|
|
27
|
-
sourcePools?: SourcePoolDisplayEntry[];
|
|
28
|
-
/** Absolute path the host writes its operator input to. */
|
|
29
|
-
inputPath: string;
|
|
30
|
-
/** The exact command to re-invoke once the input is written. */
|
|
31
|
-
continueCommand: string;
|
|
32
|
-
/**
|
|
33
|
-
* The G3 reconciliation delta: backends reachable now that the operator's prior
|
|
34
|
-
* confirmation never mentioned. Non-empty ⇒ this is a RE-confirmation and the
|
|
35
|
-
* prompt leads with the delta, so the operator answers the new question instead
|
|
36
|
-
* of re-reading a whole table they already approved. Empty/absent ⇒ the ordinary
|
|
37
|
-
* first-time gate.
|
|
38
|
-
*/
|
|
39
|
-
newlyReachable?: readonly NewlyReachableBackend[];
|
|
40
|
-
/**
|
|
41
|
-
* The capability-evidence delta: dispatchable models with no resolvable capability
|
|
42
|
-
* rank. Non-empty ⇒ the prompt additionally asks for a most-capable-first ordering
|
|
43
|
-
* over exactly these models, which persists as `capability_rank` and stops them
|
|
44
|
-
* fail-opening at the admission capability floor.
|
|
45
|
-
*/
|
|
46
|
-
unevidencedCapability?: readonly string[];
|
|
47
|
-
/**
|
|
48
|
-
* A BOUNDED, spread sample of the already-confirmed capability ordering
|
|
49
|
-
* (`selectCapabilityAnchors`), most-capable-first — the fixed reference points the
|
|
50
|
-
* operator ranks the unevidenced models against.
|
|
51
|
-
*
|
|
52
|
-
* Without them the capability ask is unanswerable without livelocking: the prompt is
|
|
53
|
-
* delta-scoped, so an answer over the new models alone used to REPLACE the confirmed
|
|
54
|
-
* ordering and the models it dropped came straight back as the next delta. Rendering
|
|
55
|
-
* the whole ordering instead is not an option — the roster may be hundreds of models
|
|
56
|
-
* and this prompt must stay O(new + constant). Empty on a first-ever ranking.
|
|
57
|
-
*/
|
|
58
|
-
capabilityAnchors?: readonly string[];
|
|
59
|
-
/**
|
|
60
|
-
* True ⇒ a prior confirmation exists on disk, i.e. this is a RE-confirmation.
|
|
61
|
-
*
|
|
62
|
-
* Drives the do-not-re-litigate guardrail INDEPENDENTLY of the reach delta. It used to
|
|
63
|
-
* ride on `newlyReachable`, so a capability-only re-prompt rendered the full table with
|
|
64
|
-
* no warning at all — while also telling the operator that an omitted field keeps its
|
|
65
|
-
* confirmed value. An operator transcribing the displayed ordering into `cost_order`
|
|
66
|
-
* then silently reverted their own confirmed order.
|
|
67
|
-
*/
|
|
68
|
-
hasPriorConfirmation?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* R3-3: true on an autonomous (no-operator) run. Only changes rendering when
|
|
71
|
-
* `unevidencedCapability` is non-empty — addresses that section to the HOST LLM
|
|
72
|
-
* (an autonomous run has no operator to ask, but the CLI's `next-step` prompt is
|
|
73
|
-
* always executed by a host agent, so THAT is who ranks) instead of an operator,
|
|
74
|
-
* and OMITS the reach-reconciliation section entirely: reach is never an LLM's
|
|
75
|
-
* call to make (`intakeExecutors.ts`'s executor fails it closed regardless of
|
|
76
|
-
* what an LLM-authored submission says), so the prompt must not ask one to answer
|
|
77
|
-
* a question it must not answer. Absent/false renders the ordinary operator
|
|
78
|
-
* variant, unchanged.
|
|
79
|
-
*/
|
|
80
|
-
autonomous?: boolean;
|
|
81
|
-
/**
|
|
82
|
-
* R3-3: anchor ids whose current position is LLM-authored rather than
|
|
83
|
-
* operator-authored (`ConfirmedDispatchPolicy.capability_order_llm_ranked`).
|
|
84
|
-
* Drives the ATTENDED variant's anchor marker only — an operator sees
|
|
85
|
-
* "(LLM-ranked — restate it in your order to reposition it)" instead of
|
|
86
|
-
* "(already ranked)" for these, since (unlike a genuinely operator-ranked
|
|
87
|
-
* anchor) they may freely reposition one without restating the whole roster.
|
|
88
|
-
* Has no effect on the autonomous variant (the LLM must not reorder ANY anchor,
|
|
89
|
-
* regardless of who ranked it) or when the id is not among `capabilityAnchors`.
|
|
90
|
-
*/
|
|
91
|
-
capabilityOrderLlmRanked?: readonly string[];
|
|
92
|
-
/**
|
|
93
|
-
* Declared `sources[]` entries that did NOT resolve this invocation, with the
|
|
94
|
-
* operator-facing reason each carries (`resolveAmbientSources`' `dropped[]`).
|
|
95
|
-
*
|
|
96
|
-
* Rendered so the drop reaches the operator in the GATE-0 PROMPT, which is the
|
|
97
|
-
* artifact they actually read. Its only other channel is a stderr line, which
|
|
98
|
-
* conversation-first use never surfaces — leaving a declared lane silently
|
|
99
|
-
* missing from the table with no stated cause.
|
|
100
|
-
*/
|
|
101
|
-
droppedSources?: readonly {
|
|
102
|
-
id: string;
|
|
103
|
-
reason: string;
|
|
104
|
-
}[];
|
|
105
|
-
}): string;
|
|
106
|
-
//# sourceMappingURL=providerConfirmationStep.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"providerConfirmationStep.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/providerConfirmationStep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE;IACrD,mFAAmF;IACnF,YAAY,EAAE,kBAAkB,EAAE,CAAC;IACnC;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACvC,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAClD;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C;;;;;;;;;;OAUG;IACH,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC;;;;;;;;OAQG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;OASG;IACH,wBAAwB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7C;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,SAAS;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC5D,GAAG,MAAM,CA8YT"}
|
|
@@ -1,396 +0,0 @@
|
|
|
1
|
-
import { PROVIDER_CONFIRMATION_INPUT_VERSION } from "audit-tools/shared";
|
|
2
|
-
/**
|
|
3
|
-
* Render the host-facing prompt for the interactive `provider_confirmation` step
|
|
4
|
-
* (Gate-0, cost-first routing — spec/dispatch-quota.md). Shows the priced,
|
|
5
|
-
* suggested provider pool (ascending cost) and asks the host to confirm it, or to
|
|
6
|
-
* submit an operator reorder / exclusion / host-model roster by writing
|
|
7
|
-
* `provider-confirmation.input.json`. Writing that file (even to accept the
|
|
8
|
-
* suggestion verbatim) is what lets the run proceed — its presence is the
|
|
9
|
-
* "operator has acted" signal the gate consumes.
|
|
10
|
-
*
|
|
11
|
-
* The tool owns discovery + the cost annotation: the host supplies only ordering
|
|
12
|
-
* intent + its model roster, and the tool promotes that into both canonical
|
|
13
|
-
* artifacts. So this prompt never asks the host to hand-author prices or
|
|
14
|
-
* capability flags.
|
|
15
|
-
*/
|
|
16
|
-
export function renderProviderConfirmationPrompt(opts) {
|
|
17
|
-
const sorted = [...opts.providerPool].sort((a, b) => (a.cost_order ?? Number.MAX_SAFE_INTEGER) - (b.cost_order ?? Number.MAX_SAFE_INTEGER));
|
|
18
|
-
const sourcePools = opts.sourcePools ?? [];
|
|
19
|
-
const droppedSources = opts.droppedSources ?? [];
|
|
20
|
-
const priceCell = (entry) => {
|
|
21
|
-
if (entry.blended_price_usd_per_mtok == null) {
|
|
22
|
-
return entry.model_id ? "price unknown" : "resolved at dispatch";
|
|
23
|
-
}
|
|
24
|
-
return `$${entry.blended_price_usd_per_mtok.toFixed(2)}`;
|
|
25
|
-
};
|
|
26
|
-
const statusCell = (entry) => {
|
|
27
|
-
if (entry.self_spawn_blocked)
|
|
28
|
-
return "excluded (self-spawn blocked)";
|
|
29
|
-
if (entry.excluded)
|
|
30
|
-
return "excluded";
|
|
31
|
-
return "included";
|
|
32
|
-
};
|
|
33
|
-
const rows = sorted.map((entry) => {
|
|
34
|
-
const order = entry.cost_order ?? "—";
|
|
35
|
-
const model = entry.model_id ?? "—";
|
|
36
|
-
return `| ${order} | ${entry.name} | ${model} | ${priceCell(entry)} | ${entry.capability_tier} | ${statusCell(entry)} |`;
|
|
37
|
-
});
|
|
38
|
-
const sourcePriceCell = (entry) => {
|
|
39
|
-
if (entry.declared_cost_per_mtok !== undefined) {
|
|
40
|
-
return `$${entry.declared_cost_per_mtok.toFixed(2)} (declared)`;
|
|
41
|
-
}
|
|
42
|
-
if (entry.blended_price_usd_per_mtok == null) {
|
|
43
|
-
return entry.model ? "price unknown" : "resolved at dispatch";
|
|
44
|
-
}
|
|
45
|
-
return `$${entry.blended_price_usd_per_mtok.toFixed(2)}`;
|
|
46
|
-
};
|
|
47
|
-
const sourceRows = sourcePools.map((entry) => `| ${entry.id} | ${entry.transport} | ${entry.model ?? "—"} | ${sourcePriceCell(entry)} |`);
|
|
48
|
-
const hasLegacyOpenAiCompatible = sorted.some((e) => e.name === "openai-compatible");
|
|
49
|
-
const hasCodex = sorted.some((e) => e.name === "codex");
|
|
50
|
-
const newlyReachable = opts.newlyReachable ?? [];
|
|
51
|
-
const unevidencedCapability = opts.unevidencedCapability ?? [];
|
|
52
|
-
const autonomous = opts.autonomous === true;
|
|
53
|
-
const llmRankedAnchors = new Set(opts.capabilityOrderLlmRanked ?? []);
|
|
54
|
-
// Anchors must be disjoint from the models under question — one cannot be both a
|
|
55
|
-
// settled reference point and the thing being ranked.
|
|
56
|
-
const unevidencedSet = new Set(unevidencedCapability);
|
|
57
|
-
const capabilityAnchors = (opts.capabilityAnchors ?? []).filter((model) => !unevidencedSet.has(model));
|
|
58
|
-
// The combined set the operator returns ONE ordering over. Anchors first, in their
|
|
59
|
-
// confirmed order, with the new models appended: a complete, acceptable file that a
|
|
60
|
-
// host may copy verbatim, defaulting the unranked models to LEAST capable — the
|
|
61
|
-
// conservative direction if the host does not move them.
|
|
62
|
-
const capabilityAnswerExample = [...capabilityAnchors, ...unevidencedCapability];
|
|
63
|
-
// R3-3: the ATTENDED variant marks an LLM-ranked anchor distinctly — an operator
|
|
64
|
-
// may freely reposition one without restating the whole roster, unlike a
|
|
65
|
-
// genuinely operator-ranked anchor. The autonomous variant never marks it: the
|
|
66
|
-
// LLM must not reorder ANY anchor, regardless of who ranked it.
|
|
67
|
-
const anchorLine = (model) => !autonomous && llmRankedAnchors.has(model)
|
|
68
|
-
? ` - \`${model}\` (LLM-ranked — restate it in your order to reposition it)`
|
|
69
|
-
: ` - \`${model}\` (already ranked)`;
|
|
70
|
-
// The capability block is ADDITIVE to whatever gate section follows — a run can owe
|
|
71
|
-
// both a reach reconciliation and a capability ordering, and folding them into one
|
|
72
|
-
// prompt is what keeps this a single operator round-trip.
|
|
73
|
-
const capabilitySection = unevidencedCapability.length > 0
|
|
74
|
-
? [
|
|
75
|
-
"## Rank these models by capability",
|
|
76
|
-
"",
|
|
77
|
-
...(autonomous
|
|
78
|
-
? [
|
|
79
|
-
"**You (the host agent) must rank these models by capability for agentic",
|
|
80
|
-
"code-audit work** — an autonomous run has no operator to ask. This is LLM",
|
|
81
|
-
"judgment, recorded as provenance; a later operator confirmation can",
|
|
82
|
-
"reorder anything you rank. Rank on what you know of each model's",
|
|
83
|
-
"demonstrated coding/agentic capability; if you genuinely do not know a",
|
|
84
|
-
"model, place it conservatively LOW and note that in the ordering (an",
|
|
85
|
-
"explicit recorded judgment, never a silent guess).",
|
|
86
|
-
"",
|
|
87
|
-
]
|
|
88
|
-
: [
|
|
89
|
-
"No rank source covers these dispatchable models, so the admission",
|
|
90
|
-
"capability floor currently **fails open** on them — they are eligible for",
|
|
91
|
-
"`deep` work they may be entirely unfit for:",
|
|
92
|
-
"",
|
|
93
|
-
]),
|
|
94
|
-
...unevidencedCapability.map((model) => ` - \`${model}\``),
|
|
95
|
-
"",
|
|
96
|
-
...(capabilityAnchors.length > 0
|
|
97
|
-
? [
|
|
98
|
-
"These models are **already ranked** — they are FIXED REFERENCE POINTS,",
|
|
99
|
-
"shown in their confirmed order (most capable first) so you can place the",
|
|
100
|
-
"models above relative to them. They are a bounded sample spread across the",
|
|
101
|
-
"full ranking, not the whole ranking:",
|
|
102
|
-
"",
|
|
103
|
-
...capabilityAnchors.map(anchorLine),
|
|
104
|
-
"",
|
|
105
|
-
"Answer with `capability_order`: **one ordering over the combined set**,",
|
|
106
|
-
"most capable first — the unranked models interleaved among the reference",
|
|
107
|
-
"points wherever they belong.",
|
|
108
|
-
"",
|
|
109
|
-
"> Reordering the reference points against each other has no effect: they",
|
|
110
|
-
"> anchor a ranking you are only seeing a sample of, so a swap between two",
|
|
111
|
-
"> of them carries no information about the models in between. Move the",
|
|
112
|
-
"> **unranked** models; leave the anchors where they are.",
|
|
113
|
-
"",
|
|
114
|
-
"> Models you do not mention keep the rank they already have — you never",
|
|
115
|
-
"> need to restate the whole ranking, and omitting one never clears it.",
|
|
116
|
-
"",
|
|
117
|
-
]
|
|
118
|
-
: [
|
|
119
|
-
"Answer with `capability_order`: these model ids, **most capable first**.",
|
|
120
|
-
"",
|
|
121
|
-
]),
|
|
122
|
-
// `schema_version` is NOT optional here even though every other field is:
|
|
123
|
-
// `parseProviderConfirmationInput` rejects the whole file without it, the
|
|
124
|
-
// rejection is indistinguishable from "no submission", and this same prompt
|
|
125
|
-
// then re-emits — the infinite-re-prompt livelock, reintroduced by a host
|
|
126
|
-
// that did exactly what the prompt showed it. A fragment a host may copy
|
|
127
|
-
// verbatim must be a COMPLETE, acceptable file.
|
|
128
|
-
"```json",
|
|
129
|
-
"{",
|
|
130
|
-
` "schema_version": "${PROVIDER_CONFIRMATION_INPUT_VERSION}",`,
|
|
131
|
-
` "capability_order": [${capabilityAnswerExample
|
|
132
|
-
.map((m) => JSON.stringify(m))
|
|
133
|
-
.join(", ")}]`,
|
|
134
|
-
"}",
|
|
135
|
-
"```",
|
|
136
|
-
"",
|
|
137
|
-
"Write it to the same file as the ordering below — one submission answers",
|
|
138
|
-
"both. Any field you omit keeps the value you confirmed previously; it is",
|
|
139
|
-
"not reset.",
|
|
140
|
-
"",
|
|
141
|
-
"This is a **relative ordering only** — rank them against each other. Do not",
|
|
142
|
-
"invent an absolute score or a tier; there is no field for one. If you",
|
|
143
|
-
"genuinely cannot rank a model, still place it (a considered guess beats a",
|
|
144
|
-
"fail-open) and say so to the user.",
|
|
145
|
-
"",
|
|
146
|
-
"> Ordering is not inclusion. To keep a model OUT of the pool entirely, use",
|
|
147
|
-
"> `exclude` — `capability_order` only decides what it is trusted with.",
|
|
148
|
-
"",
|
|
149
|
-
]
|
|
150
|
-
: [];
|
|
151
|
-
return [
|
|
152
|
-
...capabilitySection,
|
|
153
|
-
// R3-3: OMITTED entirely on the autonomous variant, regardless of the reach
|
|
154
|
-
// delta's actual content — reach is never an LLM's call to make (see
|
|
155
|
-
// `intakeExecutors.ts`'s executor, which fails it closed no matter what an
|
|
156
|
-
// LLM-authored submission says), so the prompt must not invite an answer to a
|
|
157
|
-
// question it must not answer. It is not deferred or summarized here; the
|
|
158
|
-
// reach delta simply waits for a later ATTENDED re-confirmation.
|
|
159
|
-
...(newlyReachable.length > 0 && !autonomous
|
|
160
|
-
? [
|
|
161
|
-
"# Reconcile Newly-Reachable Backends (Gate-0)",
|
|
162
|
-
"",
|
|
163
|
-
"**This is a re-confirmation, not a fresh gate.** You already confirmed a",
|
|
164
|
-
"route decision for this session. Since then, these backends became",
|
|
165
|
-
"reachable and your decision says nothing about them — so they are NOT",
|
|
166
|
-
"dispatchable until you decide:",
|
|
167
|
-
"",
|
|
168
|
-
// The exclusion RULE is rendered beside each backend, not left for the
|
|
169
|
-
// operator to compose: the grammar is model-granular, so a hand-written
|
|
170
|
-
// rule is exactly where an operator (or a host relaying for them) drops
|
|
171
|
-
// the model and rules out the whole provider by accident.
|
|
172
|
-
...newlyReachable.map((b) => ` - **${b.key}** (provider: ${b.provider}` +
|
|
173
|
-
` — to keep it out: \`"exclude": ["${b.exclusion_pattern}"]\`)`),
|
|
174
|
-
"",
|
|
175
|
-
"Ask the user about **just these** — do not re-litigate the ordering they",
|
|
176
|
-
"already approved. To accept them into the pool at their suggested",
|
|
177
|
-
"positions, accept verbatim (write just the `schema_version`). To keep one",
|
|
178
|
-
"out, name its **exclusion rule** (shown beside it) in `exclude` — that",
|
|
179
|
-
"rules out exactly that backend, not its siblings.",
|
|
180
|
-
"",
|
|
181
|
-
"> Note: any submission clears this delta — the tool rebuilds the whole",
|
|
182
|
-
"> confirmation from your input. The list above tells you what changed; it",
|
|
183
|
-
"> is not a per-backend checklist the tool enforces.",
|
|
184
|
-
"",
|
|
185
|
-
"The full pool follows for reference.",
|
|
186
|
-
"",
|
|
187
|
-
"---",
|
|
188
|
-
"",
|
|
189
|
-
]
|
|
190
|
-
: []),
|
|
191
|
-
// The SAME guardrail, on the branch that used to go without one. It rode on
|
|
192
|
-
// `newlyReachable`, so a capability-only re-prompt rendered the full table with no
|
|
193
|
-
// warning — while the capability block newly promises that an omitted field keeps
|
|
194
|
-
// its confirmed value. An operator transcribing the displayed ordering back into
|
|
195
|
-
// `cost_order` then reverted their own confirmed order, silently. Enforced here in
|
|
196
|
-
// the tool rather than left to the operator noticing.
|
|
197
|
-
...(opts.hasPriorConfirmation === true && newlyReachable.length === 0
|
|
198
|
-
? [
|
|
199
|
-
"# This is a RE-confirmation",
|
|
200
|
-
"",
|
|
201
|
-
"You already confirmed a route decision for this session. The table below",
|
|
202
|
-
"reflects **what you confirmed** — do not re-litigate it. Answer only the",
|
|
203
|
-
"question(s) above.",
|
|
204
|
-
"",
|
|
205
|
-
"**Every field you omit keeps the value you confirmed previously.** Do not",
|
|
206
|
-
"transcribe the table back into `cost_order` to \"keep\" it: restating an",
|
|
207
|
-
"ordering you are not changing is how a confirmed order gets reverted by",
|
|
208
|
-
"accident. To change nothing but the answer above, write just that field.",
|
|
209
|
-
"",
|
|
210
|
-
"---",
|
|
211
|
-
"",
|
|
212
|
-
]
|
|
213
|
-
: []),
|
|
214
|
-
"# Confirm Provider Cost Ordering (Gate-0)",
|
|
215
|
-
"",
|
|
216
|
-
"Dispatch routes work to the cheapest capable provider first.",
|
|
217
|
-
"",
|
|
218
|
-
...(opts.hasPriorConfirmation === true
|
|
219
|
-
? [
|
|
220
|
-
"Below is the ordering **as you confirmed it** (the table is rendered from your",
|
|
221
|
-
"persisted decision, not from a fresh suggestion). Leave it alone unless you",
|
|
222
|
-
"actually want to change it.",
|
|
223
|
-
]
|
|
224
|
-
: [
|
|
225
|
-
"Below is the tool's **suggested** cost ordering — ascending real price",
|
|
226
|
-
"(models.dev), with capability as the tiebreak and unpriceable pools last.",
|
|
227
|
-
"Review it, then confirm, reorder, exclude, or **add a provider that wasn't",
|
|
228
|
-
"auto-detected**.",
|
|
229
|
-
]),
|
|
230
|
-
"",
|
|
231
|
-
"| # | Provider | Model | $/Mtok (blended) | Tier | Status |",
|
|
232
|
-
"|---|----------|-------|------------------|------|--------|",
|
|
233
|
-
...rows,
|
|
234
|
-
"",
|
|
235
|
-
"- **$/Mtok (blended)** is `input·0.75 + output·0.25` from the vendored",
|
|
236
|
-
" models.dev dataset — advisory; the confirmed order is what routes.",
|
|
237
|
-
'- "resolved at dispatch" = the concrete model is not knowable until dispatch',
|
|
238
|
-
" (e.g. a CLI backend); it is ordered by capability tier for now.",
|
|
239
|
-
"- A host-native provider (the agent you are) has no model row until you report",
|
|
240
|
-
" your roster below — do that so your own tiers are priced + ordered here too.",
|
|
241
|
-
...(hasLegacyOpenAiCompatible
|
|
242
|
-
? [
|
|
243
|
-
"- **`openai_compatible` has no cost override**: this legacy block has no",
|
|
244
|
-
" `cost_per_mtok` field, so it prices at the models.dev list price for its",
|
|
245
|
-
" model — a genuinely free/discounted endpoint (e.g. a free NIM deployment)",
|
|
246
|
-
" will price WRONG here. To declare its real cost, move it to a `sources[]`",
|
|
247
|
-
" entry instead (`{ provider: \"openai-compatible\", base_url, model,",
|
|
248
|
-
' cost_per_mtok }` — set `0` for free) — see the table below.',
|
|
249
|
-
]
|
|
250
|
-
: []),
|
|
251
|
-
...(hasCodex
|
|
252
|
-
? [
|
|
253
|
-
'- **codex shows "resolved at dispatch"**: its model/effort roster is not',
|
|
254
|
-
" enumerable here from the legacy `codex` block (single `model` field, no",
|
|
255
|
-
" roster). To pin + price specific codex models/efforts at this gate, add",
|
|
256
|
-
' them as `sources[]` entries (`{ provider: "codex", model, parameters:',
|
|
257
|
-
' { extra_args: [...] } }`, one per model/effort) — see the table below.',
|
|
258
|
-
]
|
|
259
|
-
: []),
|
|
260
|
-
"",
|
|
261
|
-
...(sourceRows.length > 0
|
|
262
|
-
? [
|
|
263
|
-
"## Configured `sources[]` pools (also route)",
|
|
264
|
-
"",
|
|
265
|
-
"Every entry below is folded into dispatch alongside the pool above",
|
|
266
|
-
"(`collectDispatchableSources`) — this is what actually routes, not just",
|
|
267
|
-
"the legacy/host/CLI entries in the table above.",
|
|
268
|
-
"",
|
|
269
|
-
"| Source id | Provider | Model | $/Mtok |",
|
|
270
|
-
"|-----------|----------|-------|--------|",
|
|
271
|
-
...sourceRows,
|
|
272
|
-
"",
|
|
273
|
-
"- **`$/Mtok`** marked `(declared)` is the operator's own `cost_per_mtok`",
|
|
274
|
-
" on that source — authoritative over the models.dev catalog price.",
|
|
275
|
-
"",
|
|
276
|
-
]
|
|
277
|
-
: []),
|
|
278
|
-
// A declared lane that did NOT resolve must be visible HERE, in the render the
|
|
279
|
-
// operator actually reads. The reasons have always existed, but the only channel
|
|
280
|
-
// was `resolveSessionConfig`'s stderr default — and nothing injected
|
|
281
|
-
// `onDroppedSources`, so in conversation-first use the operator's whole symptom
|
|
282
|
-
// was "the lane isn't in the table", with the reason reachable only by calling
|
|
283
|
-
// `resolveAmbientSources` by hand. A reason nobody renders is write-only
|
|
284
|
-
// ([[write-only-data-looks-authoritative]]); an absence with no explanation reads
|
|
285
|
-
// as the tool not supporting the lane rather than as a fixable local condition.
|
|
286
|
-
...(droppedSources.length > 0
|
|
287
|
-
? [
|
|
288
|
-
"## Declared sources that did NOT resolve (absent from the pool above)",
|
|
289
|
-
"",
|
|
290
|
-
"You declared these, and each was dropped for the stated reason. They are",
|
|
291
|
-
"**not dispatchable this run** — confirming the pool above accepts their",
|
|
292
|
-
"absence. Most reasons are local and fixable (an unset key env var, a proxy",
|
|
293
|
-
"that failed its liveness probe); fix and re-run to have the lane admitted.",
|
|
294
|
-
"",
|
|
295
|
-
"| Source id | Why it was dropped |",
|
|
296
|
-
"|-----------|--------------------|",
|
|
297
|
-
...droppedSources.map((d) => `| ${d.id} | ${d.reason.replace(/\|/g, "\\|").replace(/\s*\n\s*/g, " ")} |`),
|
|
298
|
-
"",
|
|
299
|
-
]
|
|
300
|
-
: []),
|
|
301
|
-
"## What to do",
|
|
302
|
-
"",
|
|
303
|
-
// R3-3: the autonomous variant documents ONLY the field the executor will read.
|
|
304
|
-
// The executor strips everything else from an LLM-authored submission (see
|
|
305
|
-
// `runProviderConfirmationAutoComplete`'s sanitize step) — documenting the full
|
|
306
|
-
// operator field set here would invite answers to questions the LLM was not
|
|
307
|
-
// asked (an `include` "fixing" an exclusion whose reach-section rationale this
|
|
308
|
-
// variant deliberately omits), which the tool would then have to loudly drop.
|
|
309
|
-
...(autonomous
|
|
310
|
-
? [
|
|
311
|
-
"Write your capability ranking to:",
|
|
312
|
-
"",
|
|
313
|
-
` ${opts.inputPath}`,
|
|
314
|
-
"",
|
|
315
|
-
"```json",
|
|
316
|
-
"{",
|
|
317
|
-
` "schema_version": "${PROVIDER_CONFIRMATION_INPUT_VERSION}",`,
|
|
318
|
-
' "capability_order": ["<model-id, most capable first>", "..."]',
|
|
319
|
-
"}",
|
|
320
|
-
"```",
|
|
321
|
-
"",
|
|
322
|
-
"`capability_order` is the ONLY field read from an autonomous submission —",
|
|
323
|
-
"exclude/include/cost_order/host_models/dispatch_bias are operator decisions",
|
|
324
|
-
"and are stripped (and reported) if present.",
|
|
325
|
-
"",
|
|
326
|
-
`Then run: ${opts.continueCommand}`,
|
|
327
|
-
"",
|
|
328
|
-
]
|
|
329
|
-
: [
|
|
330
|
-
"Ask the user whether the suggested ordering is right (a single, brief round).",
|
|
331
|
-
"Then write the operator's decision to:",
|
|
332
|
-
"",
|
|
333
|
-
` ${opts.inputPath}`,
|
|
334
|
-
"",
|
|
335
|
-
"Use this shape — **every field is optional beyond `schema_version`**. To accept",
|
|
336
|
-
"the suggestion verbatim, write just the version:",
|
|
337
|
-
"",
|
|
338
|
-
"```json",
|
|
339
|
-
"{",
|
|
340
|
-
` "schema_version": "${PROVIDER_CONFIRMATION_INPUT_VERSION}",`,
|
|
341
|
-
' "cost_order": ["<provider-or-model-key>", "..."],',
|
|
342
|
-
' "capability_order": ["<model-id>", "..."],',
|
|
343
|
-
' "exclude": ["transport:<provider>/<model>", "service:<vendor>", "host:<address>"],',
|
|
344
|
-
' "include": ["<self-spawn-blocked provider to opt back in>"],',
|
|
345
|
-
' "host_models": [{ "model_id": "<your model id>" }],',
|
|
346
|
-
' "dispatch_bias": 0',
|
|
347
|
-
"}",
|
|
348
|
-
"```",
|
|
349
|
-
"",
|
|
350
|
-
"- `cost_order` is the confirmed ordering, cheapest first, as a list of keys —",
|
|
351
|
-
" a **provider name** (as shown above) and/or a **host `model_id`** you report",
|
|
352
|
-
" in `host_models`. Its index becomes each pool's `cost_order`. Keys you omit",
|
|
353
|
-
" keep their suggested relative order, appended after the ones you name; keys",
|
|
354
|
-
" the tool doesn't recognize are ignored. Omit `cost_order` to accept the",
|
|
355
|
-
" suggestion.",
|
|
356
|
-
"- `host_models` reports YOUR (the host agent's) model roster so those tiers are",
|
|
357
|
-
" priced from models.dev and confirmable here — otherwise they are priced only",
|
|
358
|
-
" at dispatch. Each reported `model_id` can appear in `cost_order`.",
|
|
359
|
-
"- `exclude` drops backends from the dispatchable pool. **Write every entry with",
|
|
360
|
-
" its axis as a prefix.** A rule naming an axis that does not exist is REJECTED",
|
|
361
|
-
" when you submit it — in particular there is deliberately **no `model:` axis**,",
|
|
362
|
-
" so `model:some-model` is refused rather than quietly excluding nothing. Pick",
|
|
363
|
-
" the granularity you mean:",
|
|
364
|
-
"",
|
|
365
|
-
" | Rule | Rules out |",
|
|
366
|
-
" |---|---|",
|
|
367
|
-
" | `transport:openai-compatible/gpt-oss-120b` | that **model** on that adapter — prefer this, you are confirming model choices |",
|
|
368
|
-
" | `transport:codex` | every model on that **adapter** |",
|
|
369
|
-
" | `service:nim/glm-5.2` | that **model** from that vendor, however it is reached |",
|
|
370
|
-
" | `service:nim` | every model from that **vendor**, however it is reached |",
|
|
371
|
-
" | `host:integrate.api.nvidia.com` | every source at that **endpoint host** (any port) |",
|
|
372
|
-
" | `host:localhost:8000` | every source at that **host:port** |",
|
|
373
|
-
"",
|
|
374
|
-
" Use `/` (not `:`) as the model delimiter — a model id may itself contain a",
|
|
375
|
-
" colon. A rule that matches nothing is kept and is inert; if that was not what",
|
|
376
|
-
" you meant, the summary after you submit says which rules matched nothing.",
|
|
377
|
-
" `include` opts a self-spawn-blocked provider back in (advanced — normally",
|
|
378
|
-
" leave it excluded).",
|
|
379
|
-
"- `dispatch_bias` (λ ∈ [0,1]) is the cost↔speed operating point: **0 (default) =",
|
|
380
|
-
" cheapest-first**; **1 = fastest-first** (route to the highest-throughput capable",
|
|
381
|
-
" pool regardless of price); values between blend the two. Capability is always a",
|
|
382
|
-
" hard floor. Omit to keep cheapest-first.",
|
|
383
|
-
"- **Missing a provider you use?** If it isn't listed, it wasn't auto-detected.",
|
|
384
|
-
" Add its config to session config and it joins the pool: an OpenAI-compatible",
|
|
385
|
-
" endpoint via `openai_compatible.{base_url,model,api_key_env}`, or a CLI",
|
|
386
|
-
" backend via its `<name>.command`. A provider detected but self-spawn-blocked",
|
|
387
|
-
" can be re-included with `include`. Then re-run this step.",
|
|
388
|
-
"- The tool owns pricing, discovery, and the capability flags — you",
|
|
389
|
-
" supply only ordering intent + your model roster.",
|
|
390
|
-
"",
|
|
391
|
-
`Then run: ${opts.continueCommand}`,
|
|
392
|
-
"",
|
|
393
|
-
]),
|
|
394
|
-
].join("\n");
|
|
395
|
-
}
|
|
396
|
-
//# sourceMappingURL=providerConfirmationStep.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"providerConfirmationStep.js","sourceRoot":"","sources":["../../../src/audit/cli/providerConfirmationStep.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mCAAmC,EAAE,MAAM,oBAAoB,CAAC;AAEzE;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gCAAgC,CAAC,IAsFhD;IACC,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CACxC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAChG,CAAC;IACF,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC;IAC3C,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,IAAI,EAAE,CAAC;IAEjD,MAAM,SAAS,GAAG,CAAC,KAAyB,EAAU,EAAE;QACtD,IAAI,KAAK,CAAC,0BAA0B,IAAI,IAAI,EAAE,CAAC;YAC7C,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,sBAAsB,CAAC;Q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CAAwC;gBACxC,EAAE;gBACF,KAAK,IAAI,CAAC,SAAS,EAAE;gBACrB,EAAE;gBACF,iFAAiF;gBACjF,kDAAkD;gBAClD,EAAE;gBACF,SAAS;gBACT,GAAG;gBACH,wBAAwB,mCAAmC,IAAI;gBAC/D,qDAAqD;gBACrD,8CAA8C;gBAC9C,sFAAsF;gBACtF,gEAAgE;gBAChE,uDAAuD;gBACvD,sBAAsB;gBACtB,GAAG;gBACH,KAAK;gBACL,EAAE;gBACF,+EAA+E;gBAC/E,gFAAgF;gBAChF,+EAA+E;gBAC/E,+EAA+E;gBAC/E,2EAA2E;gBAC3E,eAAe;gBACf,iFAAiF;gBACjF,gFAAgF;gBAChF,qEAAqE;gBACrE,iFAAiF;gBACjF,iFAAiF;gBACjF,kFAAkF;gBAClF,gFAAgF;gBAChF,6BAA6B;gBAC7B,EAAE;gBACF,wBAAwB;gBACxB,aAAa;gBACb,mIAAmI;gBACnI,2DAA2D;gBAC3D,sFAAsF;gBACtF,+EAA+E;gBAC/E,2FAA2F;gBAC3F,kEAAkE;gBAClE,EAAE;gBACF,8EAA8E;gBAC9E,iFAAiF;gBACjF,6EAA6E;gBAC7E,6EAA6E;gBAC7E,uBAAuB;gBACvB,kFAAkF;gBAClF,oFAAoF;gBACpF,mFAAmF;gBACnF,4CAA4C;gBAC5C,gFAAgF;gBAChF,gFAAgF;gBAChF,2EAA2E;gBAC3E,gFAAgF;gBAChF,6DAA6D;gBAC7D,oEAAoE;gBACpE,oDAAoD;gBACpD,EAAE;gBACF,aAAa,IAAI,CAAC,eAAe,EAAE;gBACnC,EAAE;aACG,CAAC;KACP,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* audit-code Gate-0 provider confirmation consumer.
|
|
3
|
-
*
|
|
4
|
-
* Wraps the audit-tools/shared provider-discovery helpers and produces a
|
|
5
|
-
* ProviderConfirmationResult conforming to the pinned seam contract (N-X06).
|
|
6
|
-
*/
|
|
7
|
-
import type { SessionConfig } from "audit-tools/shared";
|
|
8
|
-
import type { ProviderConfirmationResult, ProviderConfirmationInput } from "audit-tools/shared";
|
|
9
|
-
/**
|
|
10
|
-
* Discover and confirm the provider pool for a new audit run.
|
|
11
|
-
*
|
|
12
|
-
* Uses auto-resolution only — no interactive gate at this layer. The
|
|
13
|
-
* conversation-first flow handles the interactive Gate-0 prompt; this function
|
|
14
|
-
* supplies the deterministic pool it needs as input.
|
|
15
|
-
*
|
|
16
|
-
* @param sessionConfig - Current session config; may be an empty `{}`.
|
|
17
|
-
* @param env - Process environment snapshot; defaults to `process.env`.
|
|
18
|
-
* @param exclude - Provider names to pre-exclude (e.g. user-supplied from a prior gate).
|
|
19
|
-
* @param input - Operator's Gate-0 submission (interactive path): its
|
|
20
|
-
* `cost_order` overrides the suggested ordering on the per-tool pool so the
|
|
21
|
-
* seam artifact reflects the operator's ordering. Dispatch reads the SHARED
|
|
22
|
-
* confirmation, so this only keeps the per-tool file consistent. Omit headless.
|
|
23
|
-
*/
|
|
24
|
-
export declare function confirmProviders(sessionConfig: SessionConfig, env?: NodeJS.ProcessEnv, exclude?: string[], input?: ProviderConfirmationInput): ProviderConfirmationResult;
|
|
25
|
-
//# sourceMappingURL=providerConfirmation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"providerConfirmation.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/providerConfirmation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMxD,OAAO,KAAK,EACV,0BAA0B,EAE1B,yBAAyB,EAC1B,MAAM,oBAAoB,CAAC;AAM5B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,aAAa,EAC5B,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,OAAO,GAAE,MAAM,EAAO,EACtB,KAAK,CAAC,EAAE,yBAAyB,GAChC,0BAA0B,CAsC5B"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* audit-code Gate-0 provider confirmation consumer.
|
|
3
|
-
*
|
|
4
|
-
* Wraps the audit-tools/shared provider-discovery helpers and produces a
|
|
5
|
-
* ProviderConfirmationResult conforming to the pinned seam contract (N-X06).
|
|
6
|
-
*/
|
|
7
|
-
import { discoverProviders, annotateConfirmedPool, PROVIDER_CONFIRMATION_RESULT_VERSION, } from "audit-tools/shared";
|
|
8
|
-
// ---------------------------------------------------------------------------
|
|
9
|
-
// Public API
|
|
10
|
-
// ---------------------------------------------------------------------------
|
|
11
|
-
/**
|
|
12
|
-
* Discover and confirm the provider pool for a new audit run.
|
|
13
|
-
*
|
|
14
|
-
* Uses auto-resolution only — no interactive gate at this layer. The
|
|
15
|
-
* conversation-first flow handles the interactive Gate-0 prompt; this function
|
|
16
|
-
* supplies the deterministic pool it needs as input.
|
|
17
|
-
*
|
|
18
|
-
* @param sessionConfig - Current session config; may be an empty `{}`.
|
|
19
|
-
* @param env - Process environment snapshot; defaults to `process.env`.
|
|
20
|
-
* @param exclude - Provider names to pre-exclude (e.g. user-supplied from a prior gate).
|
|
21
|
-
* @param input - Operator's Gate-0 submission (interactive path): its
|
|
22
|
-
* `cost_order` overrides the suggested ordering on the per-tool pool so the
|
|
23
|
-
* seam artifact reflects the operator's ordering. Dispatch reads the SHARED
|
|
24
|
-
* confirmation, so this only keeps the per-tool file consistent. Omit headless.
|
|
25
|
-
*/
|
|
26
|
-
export function confirmProviders(sessionConfig, env = process.env, exclude = [], input) {
|
|
27
|
-
const discovered = discoverProviders(sessionConfig, env);
|
|
28
|
-
const excludeSet = new Set(exclude);
|
|
29
|
-
const pool = [];
|
|
30
|
-
// Always include worker-command as a fallback — it's always available.
|
|
31
|
-
const hasWorkerCommand = discovered.some((p) => p.name === "worker-command");
|
|
32
|
-
if (!hasWorkerCommand) {
|
|
33
|
-
pool.push({
|
|
34
|
-
name: "worker-command",
|
|
35
|
-
capability_tier: "unknown",
|
|
36
|
-
excluded: excludeSet.has("worker-command"),
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
for (const provider of discovered) {
|
|
40
|
-
pool.push({
|
|
41
|
-
name: provider.name,
|
|
42
|
-
capability_tier: provider.capabilityTier,
|
|
43
|
-
excluded: excludeSet.has(provider.name),
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
// COR-108468ae: the dead-code second guard below was removed — worker-command
|
|
47
|
-
// is unconditionally added before the loop when not discovered, so this check
|
|
48
|
-
// was always a no-op (the first block already guarantees presence).
|
|
49
|
-
return {
|
|
50
|
-
schema_version: PROVIDER_CONFIRMATION_RESULT_VERSION,
|
|
51
|
-
confirmed_at: new Date().toISOString(),
|
|
52
|
-
// Cost-first routing: annotate each entry with its representative model price
|
|
53
|
-
// + cost_order (spec/dispatch-quota.md). Read at dispatch as rung 1 of
|
|
54
|
-
// costRank. Uses the real sessionConfig so a configured API/CLI model is
|
|
55
|
-
// priceable here; an operator `input.cost_order` overrides the suggestion.
|
|
56
|
-
provider_pool: annotateConfirmedPool(pool, sessionConfig, input).provider_pool,
|
|
57
|
-
session_level: true,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=providerConfirmation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"providerConfirmation.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/providerConfirmation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oCAAoC,GACrC,MAAM,oBAAoB,CAAC;AAO5B,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAC9B,aAA4B,EAC5B,MAAyB,OAAO,CAAC,GAAG,EACpC,UAAoB,EAAE,EACtB,KAAiC;IAE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