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,158 +0,0 @@
|
|
|
1
|
-
import type { DispatchableSource } from "../types/sessionConfig.js";
|
|
2
|
-
/**
|
|
3
|
-
* The POPULATE cache for the proxy lane: discovered via `GET <proxy>/v1/models` +
|
|
4
|
-
* `GET <proxy>/model/info` (OpenAI-compatible surfaces) expanded into ready-to-fold
|
|
5
|
-
* `claude-worker` {@link DispatchableSource}s, written once per populate (Gate-0 build
|
|
6
|
-
* / explicit refresh) and READ by resolve — never fetched mid-resolve.
|
|
7
|
-
*
|
|
8
|
-
* Named `catalog-cache.json`, NOT the `catalog-<auditor-id>.json` the reserved-name
|
|
9
|
-
* comment at `auditorSources.ts` anticipates: populate/resolve run on the AMBIENT
|
|
10
|
-
* path, where no auditor id exists to key on. The cache is machine-level like the
|
|
11
|
-
* declaration beside it — and it is a CACHE of live discovery state, not resolved
|
|
12
|
-
* per-auditor capability, so an auditor-id key would assert an isolation the data
|
|
13
|
-
* doesn't have. Per-auditor never-inherit still holds: every resolve re-proves proxy
|
|
14
|
-
* REACH itself; the cache only supplies the expansion.
|
|
15
|
-
*/
|
|
16
|
-
export declare const PROXY_CATALOG_FILENAME = "catalog-cache.json";
|
|
17
|
-
/** Top-K models expanded per backend provider when the operator declares no `top_k`. */
|
|
18
|
-
export declare const DEFAULT_PROXY_TOP_K = 3;
|
|
19
|
-
/** Timeout (ms) for populate-time model verification probes. */
|
|
20
|
-
export declare const POPULATE_PROBE_TIMEOUT_MS = 3000;
|
|
21
|
-
/** Concurrency limit for populate-time model verification probes. */
|
|
22
|
-
export declare const POPULATE_PROBE_CONCURRENCY = 4;
|
|
23
|
-
/**
|
|
24
|
-
* A same-endpoint cache younger than this skips the registry fetch + probes
|
|
25
|
-
* entirely (see the freshness short-circuit in {@link populateProxyCatalog}).
|
|
26
|
-
* Refresh THROTTLE — how often we are willing to PAY for a refresh, which is a
|
|
27
|
-
* different question from how long an unrefreshed cache may still be believed
|
|
28
|
-
* ({@link PROXY_CATALOG_MAX_READ_AGE_MS}). The two thresholds share one age
|
|
29
|
-
* derivation and nothing else.
|
|
30
|
-
*/
|
|
31
|
-
export declare const POPULATE_CACHE_FRESH_TTL_MS: number;
|
|
32
|
-
/**
|
|
33
|
-
* Past this age a cache is returned STALE by {@link readProxyCatalog} — the
|
|
34
|
-
* expansion still travels, with a verdict attached, so the caller decides rather
|
|
35
|
-
* than consuming an unbounded-age cache blind.
|
|
36
|
-
*
|
|
37
|
-
* A day: comfortably longer than any single run (a mid-run flip to stale would be
|
|
38
|
-
* churn, not signal), and short enough that a roster the operator changed — a model
|
|
39
|
-
* added to or dropped from the proxy config — cannot go unnoticed indefinitely.
|
|
40
|
-
* The cache is machine-global and tool-written, so being wrong here costs one
|
|
41
|
-
* repopulate, never data.
|
|
42
|
-
*/
|
|
43
|
-
export declare const PROXY_CATALOG_MAX_READ_AGE_MS: number;
|
|
44
|
-
/** Resolve the populate-cache path for this machine (state dir via `io/stateDir.ts`). */
|
|
45
|
-
export declare function resolveProxyCatalogPath(homeDir?: string): string;
|
|
46
|
-
/**
|
|
47
|
-
* Shape version of the on-disk cache. Bump whenever a written entry's meaning changes,
|
|
48
|
-
* so a cache written by older code degrades to "absent" rather than being read under
|
|
49
|
-
* new semantics. The cache is tool-written and fully regenerable, so degrading is free —
|
|
50
|
-
* `readProxyCatalog` returns null, and `populateProxyCatalogIfMissing` then repopulates.
|
|
51
|
-
*
|
|
52
|
-
* v2: entries no longer carry a tool-stamped `id`. A v1 entry does, and since `id` now
|
|
53
|
-
* outranks the `service` derivation in `dispatchableSourceId`, reading one under v2
|
|
54
|
-
* semantics would key a proxied lane to `claude-worker:<service>/<model>` instead of
|
|
55
|
-
* `<service>/<model>` — silently splitting it from the direct lane to the same backend
|
|
56
|
-
* and reopening the double-grant boundary.
|
|
57
|
-
*/
|
|
58
|
-
export declare const PROXY_CATALOG_VERSION = 2;
|
|
59
|
-
/** The on-disk cache shape: the expansion + when it was fetched. */
|
|
60
|
-
export interface ProxyCatalog {
|
|
61
|
-
/** Shape version — see {@link PROXY_CATALOG_VERSION}. Absent ⇒ pre-versioned (v1). */
|
|
62
|
-
version: number;
|
|
63
|
-
/**
|
|
64
|
-
* ISO timestamp of the populate fetch. REQUIRED to be parseable — the read-side
|
|
65
|
-
* age rule is derived from it, and an age derived from a substituted default
|
|
66
|
-
* would launder a corrupt file into a fresh-looking one.
|
|
67
|
-
*/
|
|
68
|
-
fetched_at: string;
|
|
69
|
-
/** The proxy endpoint the registry was fetched from. */
|
|
70
|
-
endpoint: string;
|
|
71
|
-
/** Expanded `claude-worker` sources, ready to fold into the dispatch pool. */
|
|
72
|
-
sources: DispatchableSource[];
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* The cache as READ: the persisted shape plus the read-time age verdict.
|
|
76
|
-
*
|
|
77
|
-
* Staleness is DERIVED at read, never persisted — a stored flag would age into a lie
|
|
78
|
-
* the moment the clock moved past it. A stale cache is returned, not withheld: the
|
|
79
|
-
* expansion is the caller's to keep (dropping it would surface as "cache absent, run
|
|
80
|
-
* the populate", which sends the operator after a file that is right there), and it is
|
|
81
|
-
* not thrown either (the resolve path must not be failable by an old file).
|
|
82
|
-
*
|
|
83
|
-
* `stale_reason` rides the `stale: true` branch so it cannot be read without branching
|
|
84
|
-
* on the verdict, and so every caller reports one wording instead of composing its own.
|
|
85
|
-
*/
|
|
86
|
-
export type ProxyCatalogRead = ProxyCatalog & {
|
|
87
|
-
/** Cache age at read time, ms. Negative ⇒ stamped ahead of this machine's clock. */
|
|
88
|
-
age_ms: number;
|
|
89
|
-
} & ({
|
|
90
|
-
stale: false;
|
|
91
|
-
stale_reason?: undefined;
|
|
92
|
-
} | {
|
|
93
|
-
stale: true;
|
|
94
|
-
stale_reason: string;
|
|
95
|
-
});
|
|
96
|
-
export interface PopulateProxyCatalogOptions {
|
|
97
|
-
/** The proxy base url (`GET <endpoint>/v1/models`, `GET <endpoint>/model/info`). */
|
|
98
|
-
endpoint: string;
|
|
99
|
-
/** Models expanded per backend provider (declared `proxy.top_k`); default {@link DEFAULT_PROXY_TOP_K}. */
|
|
100
|
-
topK?: number;
|
|
101
|
-
/**
|
|
102
|
-
* Operator-declared blended $/Mtok for the proxied lane (`proxy.cost_per_mtok`,
|
|
103
|
-
* the free-to-operator axis). WINS over any advert price.
|
|
104
|
-
*/
|
|
105
|
-
costPerMtok?: number;
|
|
106
|
-
/** Env var holding the proxy's master key when authentication is required. */
|
|
107
|
-
apiKeyEnv?: string;
|
|
108
|
-
/** Injectable fetch (tests); defaults to global fetch. */
|
|
109
|
-
fetchImpl?: typeof fetch;
|
|
110
|
-
/** Home dir override for the cache path (tests). */
|
|
111
|
-
homeDir?: string;
|
|
112
|
-
/** Clock (tests); defaults to `Date.now`-based ISO. */
|
|
113
|
-
now?: () => Date;
|
|
114
|
-
}
|
|
115
|
-
export interface PopulateProxyCatalogResult {
|
|
116
|
-
/** The expanded sources (also what was written when `written` is true). */
|
|
117
|
-
sources: DispatchableSource[];
|
|
118
|
-
/** Whether the cache file was (re)written. False only when the fetch itself failed. */
|
|
119
|
-
written: boolean;
|
|
120
|
-
/** Operator-facing explanation when the registry could not be fetched/parsed. */
|
|
121
|
-
reason?: string;
|
|
122
|
-
/** Models dropped during probe verification, with reasons. */
|
|
123
|
-
dropped: Array<{
|
|
124
|
-
id: string;
|
|
125
|
-
reason: string;
|
|
126
|
-
}>;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* POPULATE: discover and expand models from an OpenAI-compatible proxy
|
|
130
|
-
* (`GET <endpoint>/v1/models` + `GET <endpoint>/model/info`) into
|
|
131
|
-
* ready-to-fold `claude-worker` sources, then write to the machine-level cache.
|
|
132
|
-
* Network-bound and cacheable — runs at Gate-0 build / explicit refresh, NEVER
|
|
133
|
-
* inside `resolveAmbientSources` (which only READS via {@link readProxyCatalog}).
|
|
134
|
-
* Never throws: a failed fetch returns `{written:false, reason}` and leaves any
|
|
135
|
-
* prior cache untouched; an empty discovery WRITES an empty expansion (fresh
|
|
136
|
-
* knowledge — resolve reports the lane unexpanded with a reason).
|
|
137
|
-
*/
|
|
138
|
-
export declare function populateProxyCatalog(options: PopulateProxyCatalogOptions): Promise<PopulateProxyCatalogResult>;
|
|
139
|
-
export interface ReadProxyCatalogDeps {
|
|
140
|
-
/** Home dir override for the cache path (tests). */
|
|
141
|
-
homeDir?: string;
|
|
142
|
-
/** Raw cache reader (tests inject); defaults to reading the cache file. */
|
|
143
|
-
readCatalogFile?: (path: string) => string | null;
|
|
144
|
-
/** Clock (tests); defaults to `new Date()`. Fixes the age rule's reference point. */
|
|
145
|
-
now?: () => Date;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* READ the populate cache, with the read-side age rule applied: every result carries
|
|
149
|
-
* `age_ms` and a `stale` verdict against {@link PROXY_CATALOG_MAX_READ_AGE_MS}, so an
|
|
150
|
-
* old cache reaches its caller labelled rather than indistinguishable from a fresh one.
|
|
151
|
-
* Degrades to `null` on absent / unparseable / structurally-invalid content — never
|
|
152
|
-
* throws (same bar as `readSourceDeclaration`: the resolve path must not be failable by
|
|
153
|
-
* a bad file). Cached sources are held to the shared source validator, so a hand-edited
|
|
154
|
-
* or version-skewed cache degrades to "no cache" rather than admitting a half-checked
|
|
155
|
-
* pool.
|
|
156
|
-
*/
|
|
157
|
-
export declare function readProxyCatalog(deps?: ReadProxyCatalogDeps): ProxyCatalogRead | null;
|
|
158
|
-
//# sourceMappingURL=proxyCatalog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxyCatalog.d.ts","sourceRoot":"","sources":["../../../src/shared/providers/proxyCatalog.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGpE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAE3D,wFAAwF;AACxF,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAUrC,gEAAgE;AAChE,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C,qEAAqE;AACrE,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,QAAc,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,QAAmB,CAAC;AAE9D,yFAAyF;AACzF,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,oEAAoE;AACpE,MAAM,WAAW,YAAY;IAC3B,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG;IAC5C,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,CACE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,YAAY,CAAC,EAAE,SAAS,CAAA;CAAE,GAC1C;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CACxC,CAAC;AA8BJ,MAAM,WAAW,2BAA2B;IAC1C,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAC;IACjB,0GAA0G;IAC1G,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,uFAAuF;IACvF,OAAO,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AA8XD;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,CAAC,CAsKrC;AAED,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAClD,qFAAqF;IACrF,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB;AAkBD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,GAAE,oBAAyB,GAC9B,gBAAgB,GAAG,IAAI,CA2DzB"}
|