audit-tools 0.32.67 → 0.33.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/advanceAuditCommand.d.ts.map +1 -1
- package/dist/audit/cli/advanceAuditCommand.js +8 -3
- package/dist/audit/cli/advanceAuditCommand.js.map +1 -1
- package/dist/audit/cli/args.d.ts +9 -27
- package/dist/audit/cli/args.d.ts.map +1 -1
- package/dist/audit/cli/args.js +116 -50
- package/dist/audit/cli/args.js.map +1 -1
- package/dist/audit/cli/auditStep.d.ts +15 -1
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +2 -0
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.d.ts +2 -1
- package/dist/audit/cli/dispatch/quotaPool.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.js +43 -77
- package/dist/audit/cli/dispatch/quotaPool.js.map +1 -1
- package/dist/audit/cli/dispatch/types.d.ts +9 -0
- package/dist/audit/cli/dispatch/types.d.ts.map +1 -1
- package/dist/audit/cli/dispatch.d.ts.map +1 -1
- package/dist/audit/cli/dispatch.js +17 -6
- package/dist/audit/cli/dispatch.js.map +1 -1
- package/dist/audit/cli/hybridDispatch.d.ts +3 -1
- package/dist/audit/cli/hybridDispatch.d.ts.map +1 -1
- package/dist/audit/cli/hybridDispatch.js +1 -0
- package/dist/audit/cli/hybridDispatch.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +0 -9
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +151 -92
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +11 -2
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +56 -8
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prepareDispatchCommand.d.ts.map +1 -1
- package/dist/audit/cli/prepareDispatchCommand.js +15 -9
- package/dist/audit/cli/prepareDispatchCommand.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts +12 -32
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +19 -33
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/providerConfirmationStep.d.ts +13 -5
- package/dist/audit/cli/providerConfirmationStep.d.ts.map +1 -1
- package/dist/audit/cli/providerConfirmationStep.js +47 -8
- package/dist/audit/cli/providerConfirmationStep.js.map +1 -1
- package/dist/audit/cli/quotaCommand.d.ts.map +1 -1
- package/dist/audit/cli/quotaCommand.js +16 -10
- package/dist/audit/cli/quotaCommand.js.map +1 -1
- package/dist/audit/cli/rollingAuditDispatch.d.ts.map +1 -1
- package/dist/audit/cli/rollingAuditDispatch.js +8 -0
- package/dist/audit/cli/rollingAuditDispatch.js.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +11 -1
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +11 -15
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/validateCommand.d.ts.map +1 -1
- package/dist/audit/cli/validateCommand.js +3 -3
- package/dist/audit/cli/validateCommand.js.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +39 -7
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +52 -1
- 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 -1
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/intakeExecutors.d.ts +27 -3
- package/dist/audit/orchestrator/intakeExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/intakeExecutors.js +119 -19
- package/dist/audit/orchestrator/intakeExecutors.js.map +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts +7 -0
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +3 -0
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/providerConfirmation.d.ts.map +1 -1
- package/dist/audit/orchestrator/providerConfirmation.js +0 -2
- package/dist/audit/orchestrator/providerConfirmation.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts +17 -0
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +13 -1
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/quota/index.d.ts +128 -128
- package/dist/audit/supervisor/sessionConfig.d.ts +3 -11
- package/dist/audit/supervisor/sessionConfig.d.ts.map +1 -1
- package/dist/audit/supervisor/sessionConfig.js +3 -25
- package/dist/audit/supervisor/sessionConfig.js.map +1 -1
- package/dist/audit/types/analyzerCapability.d.ts +6 -6
- package/dist/audit/types/externalAnalyzer.d.ts +10 -10
- package/dist/remediate/phases/plan.d.ts.map +1 -1
- package/dist/remediate/phases/plan.js +5 -4
- package/dist/remediate/phases/plan.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +9 -3
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.js +5 -4
- package/dist/remediate/steps/dispatch/marshal.js.map +1 -1
- package/dist/remediate/steps/dispatch/waveScheduling.d.ts +4 -2
- package/dist/remediate/steps/dispatch/waveScheduling.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/waveScheduling.js +33 -85
- package/dist/remediate/steps/dispatch/waveScheduling.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +0 -10
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +33 -24
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/providerNodeDispatch.d.ts +8 -0
- package/dist/remediate/steps/providerNodeDispatch.d.ts.map +1 -1
- package/dist/remediate/steps/providerNodeDispatch.js +4 -0
- package/dist/remediate/steps/providerNodeDispatch.js.map +1 -1
- package/dist/remediate/steps/sessionConfigLoad.d.ts +46 -0
- package/dist/remediate/steps/sessionConfigLoad.d.ts.map +1 -0
- package/dist/remediate/steps/sessionConfigLoad.js +32 -0
- package/dist/remediate/steps/sessionConfigLoad.js.map +1 -0
- package/dist/shared/config/resolveSessionConfig.d.ts +72 -0
- package/dist/shared/config/resolveSessionConfig.d.ts.map +1 -0
- package/dist/shared/config/resolveSessionConfig.js +105 -0
- package/dist/shared/config/resolveSessionConfig.js.map +1 -0
- package/dist/shared/dispatch/admissionLoop.d.ts +12 -12
- package/dist/shared/friction/stepBoundaryCapture.d.ts +22 -1
- package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.js +40 -0
- package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
- package/dist/shared/index.d.ts +14 -8
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +11 -5
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/providers/auditorSources.d.ts +102 -0
- package/dist/shared/providers/auditorSources.d.ts.map +1 -0
- package/dist/shared/providers/auditorSources.js +226 -0
- package/dist/shared/providers/auditorSources.js.map +1 -0
- package/dist/shared/providers/openAiCompatibleProvider.d.ts +20 -5
- package/dist/shared/providers/openAiCompatibleProvider.d.ts.map +1 -1
- package/dist/shared/providers/openAiCompatibleProvider.js +123 -19
- package/dist/shared/providers/openAiCompatibleProvider.js.map +1 -1
- package/dist/shared/providers/providerConfirmation.d.ts +3 -20
- package/dist/shared/providers/providerConfirmation.d.ts.map +1 -1
- package/dist/shared/providers/providerConfirmation.js +3 -37
- package/dist/shared/providers/providerConfirmation.js.map +1 -1
- package/dist/shared/providers/providerFactory.d.ts +6 -0
- package/dist/shared/providers/providerFactory.d.ts.map +1 -1
- package/dist/shared/providers/providerFactory.js +6 -0
- package/dist/shared/providers/providerFactory.js.map +1 -1
- package/dist/shared/providers/sharedProviderConfirmation.d.ts +264 -75
- package/dist/shared/providers/sharedProviderConfirmation.d.ts.map +1 -1
- package/dist/shared/providers/sharedProviderConfirmation.js +534 -113
- package/dist/shared/providers/sharedProviderConfirmation.js.map +1 -1
- package/dist/shared/providers/types.d.ts +17 -0
- package/dist/shared/providers/types.d.ts.map +1 -1
- package/dist/shared/quota/apiPool.d.ts +34 -11
- package/dist/shared/quota/apiPool.d.ts.map +1 -1
- package/dist/shared/quota/apiPool.js +21 -23
- package/dist/shared/quota/apiPool.js.map +1 -1
- package/dist/shared/quota/capacity.d.ts +50 -50
- package/dist/shared/quota/hostPool.d.ts +107 -0
- package/dist/shared/quota/hostPool.d.ts.map +1 -0
- package/dist/shared/quota/hostPool.js +103 -0
- package/dist/shared/quota/hostPool.js.map +1 -0
- package/dist/shared/quota/quotaSource.d.ts +2 -2
- package/dist/shared/types/auditorDescriptor.d.ts +112 -0
- package/dist/shared/types/auditorDescriptor.d.ts.map +1 -0
- package/dist/shared/types/auditorDescriptor.js +28 -0
- package/dist/shared/types/auditorDescriptor.js.map +1 -0
- package/dist/shared/types/providerConfirmation.d.ts +64 -6
- package/dist/shared/types/providerConfirmation.d.ts.map +1 -1
- package/dist/shared/types/providerConfirmation.js +1 -1
- package/dist/shared/types/sessionConfig.d.ts +73 -65
- package/dist/shared/types/sessionConfig.d.ts.map +1 -1
- package/dist/shared/types/sessionConfig.js +48 -0
- package/dist/shared/types/sessionConfig.js.map +1 -1
- package/dist/shared/validation/sessionConfig.d.ts +26 -14
- package/dist/shared/validation/sessionConfig.d.ts.map +1 -1
- package/dist/shared/validation/sessionConfig.js +72 -70
- package/dist/shared/validation/sessionConfig.js.map +1 -1
- package/docs/audit-pkg/contracts.md +4 -4
- package/docs/audit-pkg/operator-guide.md +43 -24
- package/package.json +1 -1
- package/skills/audit-code/SKILL.md +17 -14
- package/skills/audit-code/audit-code.prompt.md +17 -16
- package/wrapper/audit-code-wrapper-install-hosts.mjs +6 -10
- package/wrapper/remediate-code-wrapper-install-hosts.mjs +4 -8
- package/dist/shared/quota/repairProxyRegistry.d.ts +0 -84
- package/dist/shared/quota/repairProxyRegistry.d.ts.map +0 -1
- package/dist/shared/quota/repairProxyRegistry.js +0 -144
- package/dist/shared/quota/repairProxyRegistry.js.map +0 -1
|
@@ -61,15 +61,15 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
61
61
|
lease_id: z.ZodString;
|
|
62
62
|
cost: z.ZodNumber;
|
|
63
63
|
}, "strict", z.ZodTypeAny, {
|
|
64
|
+
pool_id: string;
|
|
64
65
|
cost: number;
|
|
65
66
|
packet_id: string;
|
|
66
|
-
pool_id: string;
|
|
67
67
|
resource_key: string;
|
|
68
68
|
lease_id: string;
|
|
69
69
|
}, {
|
|
70
|
+
pool_id: string;
|
|
70
71
|
cost: number;
|
|
71
72
|
packet_id: string;
|
|
72
|
-
pool_id: string;
|
|
73
73
|
resource_key: string;
|
|
74
74
|
lease_id: string;
|
|
75
75
|
}>, "many">;
|
|
@@ -84,28 +84,28 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
84
84
|
cost: z.ZodNumber;
|
|
85
85
|
}, "strict", z.ZodTypeAny, {
|
|
86
86
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
87
|
+
pool_id: string | null;
|
|
87
88
|
cost: number;
|
|
88
89
|
admitted: boolean;
|
|
89
90
|
packet_id: string;
|
|
90
|
-
pool_id: string | null;
|
|
91
91
|
resource_key: string | null;
|
|
92
92
|
headroom_before?: number | undefined;
|
|
93
93
|
outstanding_before?: number | undefined;
|
|
94
94
|
}, {
|
|
95
95
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
96
|
+
pool_id: string | null;
|
|
96
97
|
cost: number;
|
|
97
98
|
admitted: boolean;
|
|
98
99
|
packet_id: string;
|
|
99
|
-
pool_id: string | null;
|
|
100
100
|
resource_key: string | null;
|
|
101
101
|
headroom_before?: number | undefined;
|
|
102
102
|
outstanding_before?: number | undefined;
|
|
103
103
|
}>, "many">;
|
|
104
104
|
}, "strict", z.ZodTypeAny, {
|
|
105
105
|
leases: {
|
|
106
|
+
pool_id: string;
|
|
106
107
|
cost: number;
|
|
107
108
|
packet_id: string;
|
|
108
|
-
pool_id: string;
|
|
109
109
|
resource_key: string;
|
|
110
110
|
lease_id: string;
|
|
111
111
|
}[];
|
|
@@ -113,19 +113,19 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
113
113
|
declared_cap: number | null;
|
|
114
114
|
explains: {
|
|
115
115
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
116
|
+
pool_id: string | null;
|
|
116
117
|
cost: number;
|
|
117
118
|
admitted: boolean;
|
|
118
119
|
packet_id: string;
|
|
119
|
-
pool_id: string | null;
|
|
120
120
|
resource_key: string | null;
|
|
121
121
|
headroom_before?: number | undefined;
|
|
122
122
|
outstanding_before?: number | undefined;
|
|
123
123
|
}[];
|
|
124
124
|
}, {
|
|
125
125
|
leases: {
|
|
126
|
+
pool_id: string;
|
|
126
127
|
cost: number;
|
|
127
128
|
packet_id: string;
|
|
128
|
-
pool_id: string;
|
|
129
129
|
resource_key: string;
|
|
130
130
|
lease_id: string;
|
|
131
131
|
}[];
|
|
@@ -133,10 +133,10 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
133
133
|
declared_cap: number | null;
|
|
134
134
|
explains: {
|
|
135
135
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
136
|
+
pool_id: string | null;
|
|
136
137
|
cost: number;
|
|
137
138
|
admitted: boolean;
|
|
138
139
|
packet_id: string;
|
|
139
|
-
pool_id: string | null;
|
|
140
140
|
resource_key: string | null;
|
|
141
141
|
headroom_before?: number | undefined;
|
|
142
142
|
outstanding_before?: number | undefined;
|
|
@@ -193,13 +193,13 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
193
193
|
reset_at: z.ZodNullable<z.ZodString>;
|
|
194
194
|
budget: z.ZodNumber;
|
|
195
195
|
}, "strip", z.ZodTypeAny, {
|
|
196
|
-
budget: number;
|
|
197
196
|
label: string;
|
|
198
197
|
reset_at: string | null;
|
|
199
|
-
}, {
|
|
200
198
|
budget: number;
|
|
199
|
+
}, {
|
|
201
200
|
label: string;
|
|
202
201
|
reset_at: string | null;
|
|
202
|
+
budget: number;
|
|
203
203
|
}>>>;
|
|
204
204
|
in_flight_tokens: z.ZodOptional<z.ZodNumber>;
|
|
205
205
|
calibrating: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -227,12 +227,12 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
227
227
|
tokens_remaining?: number | null | undefined;
|
|
228
228
|
}>, "many">>;
|
|
229
229
|
}, "strict", z.ZodTypeAny, {
|
|
230
|
-
source: string;
|
|
231
230
|
remaining_pct: number | null;
|
|
232
231
|
reset_at: string | null;
|
|
233
232
|
tokens_remaining: number | null;
|
|
234
233
|
requests_remaining: number | null;
|
|
235
234
|
captured_at: string;
|
|
235
|
+
source: string;
|
|
236
236
|
windows?: {
|
|
237
237
|
label: string;
|
|
238
238
|
remaining_pct: number | null;
|
|
@@ -240,12 +240,12 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
240
240
|
tokens_remaining?: number | null | undefined;
|
|
241
241
|
}[] | undefined;
|
|
242
242
|
}, {
|
|
243
|
-
source: string;
|
|
244
243
|
remaining_pct: number | null;
|
|
245
244
|
reset_at: string | null;
|
|
246
245
|
tokens_remaining: number | null;
|
|
247
246
|
requests_remaining: number | null;
|
|
248
247
|
captured_at: string;
|
|
248
|
+
source: string;
|
|
249
249
|
windows?: {
|
|
250
250
|
label: string;
|
|
251
251
|
remaining_pct: number | null;
|
|
@@ -260,14 +260,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
260
260
|
capability_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
261
261
|
}, "strict", z.ZodTypeAny, {
|
|
262
262
|
confidence: "high" | "low" | "medium";
|
|
263
|
-
source: "
|
|
264
|
-
host_concurrency_limit: {
|
|
265
|
-
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
266
|
-
active_subagents: number;
|
|
267
|
-
description: string;
|
|
268
|
-
} | null;
|
|
269
|
-
estimated_wave_tokens: number;
|
|
263
|
+
source: "explicit_config" | "discovered_capability" | "static_metadata" | "cli_flags" | "provider_default" | "learned" | "default";
|
|
270
264
|
cooldown_until: string | null;
|
|
265
|
+
pool_id: string;
|
|
266
|
+
slots: number;
|
|
267
|
+
model: string | null;
|
|
271
268
|
resolved_limits: {
|
|
272
269
|
context_tokens: number;
|
|
273
270
|
output_tokens: number;
|
|
@@ -275,18 +272,30 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
275
272
|
input_tokens_per_minute: number | null;
|
|
276
273
|
output_tokens_per_minute: number | null;
|
|
277
274
|
};
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
275
|
+
host_concurrency_limit: {
|
|
276
|
+
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
277
|
+
active_subagents: number;
|
|
278
|
+
description: string;
|
|
279
|
+
} | null;
|
|
282
280
|
is_conversation_host: boolean;
|
|
281
|
+
estimated_wave_tokens: number;
|
|
282
|
+
binding_cap: "rpm" | "tpm" | "token_budget" | "cooldown" | "host_concurrency" | "none";
|
|
283
|
+
rank?: "deep" | "small" | "standard" | undefined;
|
|
284
|
+
calibrating?: boolean | undefined;
|
|
285
|
+
remaining_token_budget?: number | null | undefined;
|
|
286
|
+
binding_window?: {
|
|
287
|
+
label: string;
|
|
288
|
+
reset_at: string | null;
|
|
289
|
+
budget: number;
|
|
290
|
+
} | null | undefined;
|
|
291
|
+
in_flight_tokens?: number | undefined;
|
|
283
292
|
quota_source_snapshot?: {
|
|
284
|
-
source: string;
|
|
285
293
|
remaining_pct: number | null;
|
|
286
294
|
reset_at: string | null;
|
|
287
295
|
tokens_remaining: number | null;
|
|
288
296
|
requests_remaining: number | null;
|
|
289
297
|
captured_at: string;
|
|
298
|
+
source: string;
|
|
290
299
|
windows?: {
|
|
291
300
|
label: string;
|
|
292
301
|
remaining_pct: number | null;
|
|
@@ -294,30 +303,18 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
294
303
|
tokens_remaining?: number | null | undefined;
|
|
295
304
|
}[] | undefined;
|
|
296
305
|
} | null | undefined;
|
|
297
|
-
remaining_token_budget?: number | null | undefined;
|
|
298
|
-
binding_window?: {
|
|
299
|
-
budget: number;
|
|
300
|
-
label: string;
|
|
301
|
-
reset_at: string | null;
|
|
302
|
-
} | null | undefined;
|
|
303
|
-
in_flight_tokens?: number | undefined;
|
|
304
|
-
calibrating?: boolean | undefined;
|
|
305
|
-
rank?: "deep" | "small" | "standard" | undefined;
|
|
306
|
-
capability_rank?: number | null | undefined;
|
|
307
|
-
declared_cost_per_mtok?: number | null | undefined;
|
|
308
306
|
quota_signal_degraded?: boolean | undefined;
|
|
309
307
|
quota_coverage?: "established" | "reactive_only" | "unestablished" | undefined;
|
|
310
308
|
concurrency_cap?: number | null | undefined;
|
|
309
|
+
declared_cost_per_mtok?: number | null | undefined;
|
|
310
|
+
capability_rank?: number | null | undefined;
|
|
311
311
|
}, {
|
|
312
312
|
confidence: "high" | "low" | "medium";
|
|
313
|
-
source: "
|
|
314
|
-
host_concurrency_limit: {
|
|
315
|
-
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
316
|
-
active_subagents: number;
|
|
317
|
-
description: string;
|
|
318
|
-
} | null;
|
|
319
|
-
estimated_wave_tokens: number;
|
|
313
|
+
source: "explicit_config" | "discovered_capability" | "static_metadata" | "cli_flags" | "provider_default" | "learned" | "default";
|
|
320
314
|
cooldown_until: string | null;
|
|
315
|
+
pool_id: string;
|
|
316
|
+
slots: number;
|
|
317
|
+
model: string | null;
|
|
321
318
|
resolved_limits: {
|
|
322
319
|
context_tokens: number;
|
|
323
320
|
output_tokens: number;
|
|
@@ -325,18 +322,30 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
325
322
|
input_tokens_per_minute: number | null;
|
|
326
323
|
output_tokens_per_minute: number | null;
|
|
327
324
|
};
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
325
|
+
host_concurrency_limit: {
|
|
326
|
+
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
327
|
+
active_subagents: number;
|
|
328
|
+
description: string;
|
|
329
|
+
} | null;
|
|
332
330
|
is_conversation_host: boolean;
|
|
331
|
+
estimated_wave_tokens: number;
|
|
332
|
+
binding_cap: "rpm" | "tpm" | "token_budget" | "cooldown" | "host_concurrency" | "none";
|
|
333
|
+
rank?: "deep" | "small" | "standard" | undefined;
|
|
334
|
+
calibrating?: boolean | undefined;
|
|
335
|
+
remaining_token_budget?: number | null | undefined;
|
|
336
|
+
binding_window?: {
|
|
337
|
+
label: string;
|
|
338
|
+
reset_at: string | null;
|
|
339
|
+
budget: number;
|
|
340
|
+
} | null | undefined;
|
|
341
|
+
in_flight_tokens?: number | undefined;
|
|
333
342
|
quota_source_snapshot?: {
|
|
334
|
-
source: string;
|
|
335
343
|
remaining_pct: number | null;
|
|
336
344
|
reset_at: string | null;
|
|
337
345
|
tokens_remaining: number | null;
|
|
338
346
|
requests_remaining: number | null;
|
|
339
347
|
captured_at: string;
|
|
348
|
+
source: string;
|
|
340
349
|
windows?: {
|
|
341
350
|
label: string;
|
|
342
351
|
remaining_pct: number | null;
|
|
@@ -344,20 +353,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
344
353
|
tokens_remaining?: number | null | undefined;
|
|
345
354
|
}[] | undefined;
|
|
346
355
|
} | null | undefined;
|
|
347
|
-
remaining_token_budget?: number | null | undefined;
|
|
348
|
-
binding_window?: {
|
|
349
|
-
budget: number;
|
|
350
|
-
label: string;
|
|
351
|
-
reset_at: string | null;
|
|
352
|
-
} | null | undefined;
|
|
353
|
-
in_flight_tokens?: number | undefined;
|
|
354
|
-
calibrating?: boolean | undefined;
|
|
355
|
-
rank?: "deep" | "small" | "standard" | undefined;
|
|
356
|
-
capability_rank?: number | null | undefined;
|
|
357
|
-
declared_cost_per_mtok?: number | null | undefined;
|
|
358
356
|
quota_signal_degraded?: boolean | undefined;
|
|
359
357
|
quota_coverage?: "established" | "reactive_only" | "unestablished" | undefined;
|
|
360
358
|
concurrency_cap?: number | null | undefined;
|
|
359
|
+
declared_cost_per_mtok?: number | null | undefined;
|
|
360
|
+
capability_rank?: number | null | undefined;
|
|
361
361
|
}>, "many">>;
|
|
362
362
|
/** Echo of the host-reported model roster (lowest rank first), when given. */
|
|
363
363
|
host_model_roster: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -402,12 +402,12 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
402
402
|
tokens_remaining?: number | null | undefined;
|
|
403
403
|
}>, "many">>;
|
|
404
404
|
}, "strict", z.ZodTypeAny, {
|
|
405
|
-
source: string;
|
|
406
405
|
remaining_pct: number | null;
|
|
407
406
|
reset_at: string | null;
|
|
408
407
|
tokens_remaining: number | null;
|
|
409
408
|
requests_remaining: number | null;
|
|
410
409
|
captured_at: string;
|
|
410
|
+
source: string;
|
|
411
411
|
windows?: {
|
|
412
412
|
label: string;
|
|
413
413
|
remaining_pct: number | null;
|
|
@@ -415,12 +415,12 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
415
415
|
tokens_remaining?: number | null | undefined;
|
|
416
416
|
}[] | undefined;
|
|
417
417
|
}, {
|
|
418
|
-
source: string;
|
|
419
418
|
remaining_pct: number | null;
|
|
420
419
|
reset_at: string | null;
|
|
421
420
|
tokens_remaining: number | null;
|
|
422
421
|
requests_remaining: number | null;
|
|
423
422
|
captured_at: string;
|
|
423
|
+
source: string;
|
|
424
424
|
windows?: {
|
|
425
425
|
label: string;
|
|
426
426
|
remaining_pct: number | null;
|
|
@@ -442,13 +442,9 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
442
442
|
confidence: "high" | "low" | "medium";
|
|
443
443
|
run_id: string;
|
|
444
444
|
contract_version: "audit-code-dispatch-quota/v1alpha3";
|
|
445
|
-
source: "
|
|
446
|
-
host_concurrency_limit: {
|
|
447
|
-
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
448
|
-
active_subagents: number;
|
|
449
|
-
description: string;
|
|
450
|
-
} | null;
|
|
445
|
+
source: "explicit_config" | "discovered_capability" | "static_metadata" | "cli_flags" | "provider_default" | "learned" | "default";
|
|
451
446
|
cooldown_until: string | null;
|
|
447
|
+
model: string | null;
|
|
452
448
|
resolved_limits: {
|
|
453
449
|
context_tokens: number;
|
|
454
450
|
output_tokens: number;
|
|
@@ -456,12 +452,16 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
456
452
|
input_tokens_per_minute: number | null;
|
|
457
453
|
output_tokens_per_minute: number | null;
|
|
458
454
|
};
|
|
459
|
-
|
|
455
|
+
host_concurrency_limit: {
|
|
456
|
+
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
457
|
+
active_subagents: number;
|
|
458
|
+
description: string;
|
|
459
|
+
} | null;
|
|
460
460
|
admission: {
|
|
461
461
|
leases: {
|
|
462
|
+
pool_id: string;
|
|
462
463
|
cost: number;
|
|
463
464
|
packet_id: string;
|
|
464
|
-
pool_id: string;
|
|
465
465
|
resource_key: string;
|
|
466
466
|
lease_id: string;
|
|
467
467
|
}[];
|
|
@@ -469,22 +469,23 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
469
469
|
declared_cap: number | null;
|
|
470
470
|
explains: {
|
|
471
471
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
472
|
+
pool_id: string | null;
|
|
472
473
|
cost: number;
|
|
473
474
|
admitted: boolean;
|
|
474
475
|
packet_id: string;
|
|
475
|
-
pool_id: string | null;
|
|
476
476
|
resource_key: string | null;
|
|
477
477
|
headroom_before?: number | undefined;
|
|
478
478
|
outstanding_before?: number | undefined;
|
|
479
479
|
}[];
|
|
480
480
|
};
|
|
481
|
+
binding_cap?: "rpm" | "tpm" | "token_budget" | "cooldown" | "host_concurrency" | "none" | undefined;
|
|
481
482
|
quota_source_snapshot?: {
|
|
482
|
-
source: string;
|
|
483
483
|
remaining_pct: number | null;
|
|
484
484
|
reset_at: string | null;
|
|
485
485
|
tokens_remaining: number | null;
|
|
486
486
|
requests_remaining: number | null;
|
|
487
487
|
captured_at: string;
|
|
488
|
+
source: string;
|
|
488
489
|
windows?: {
|
|
489
490
|
label: string;
|
|
490
491
|
remaining_pct: number | null;
|
|
@@ -492,17 +493,13 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
492
493
|
tokens_remaining?: number | null | undefined;
|
|
493
494
|
}[] | undefined;
|
|
494
495
|
} | null | undefined;
|
|
495
|
-
binding_cap?: "none" | "rpm" | "tpm" | "token_budget" | "cooldown" | "host_concurrency" | undefined;
|
|
496
496
|
capacity_pools?: {
|
|
497
497
|
confidence: "high" | "low" | "medium";
|
|
498
|
-
source: "
|
|
499
|
-
host_concurrency_limit: {
|
|
500
|
-
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
501
|
-
active_subagents: number;
|
|
502
|
-
description: string;
|
|
503
|
-
} | null;
|
|
504
|
-
estimated_wave_tokens: number;
|
|
498
|
+
source: "explicit_config" | "discovered_capability" | "static_metadata" | "cli_flags" | "provider_default" | "learned" | "default";
|
|
505
499
|
cooldown_until: string | null;
|
|
500
|
+
pool_id: string;
|
|
501
|
+
slots: number;
|
|
502
|
+
model: string | null;
|
|
506
503
|
resolved_limits: {
|
|
507
504
|
context_tokens: number;
|
|
508
505
|
output_tokens: number;
|
|
@@ -510,18 +507,30 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
510
507
|
input_tokens_per_minute: number | null;
|
|
511
508
|
output_tokens_per_minute: number | null;
|
|
512
509
|
};
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
510
|
+
host_concurrency_limit: {
|
|
511
|
+
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
512
|
+
active_subagents: number;
|
|
513
|
+
description: string;
|
|
514
|
+
} | null;
|
|
517
515
|
is_conversation_host: boolean;
|
|
516
|
+
estimated_wave_tokens: number;
|
|
517
|
+
binding_cap: "rpm" | "tpm" | "token_budget" | "cooldown" | "host_concurrency" | "none";
|
|
518
|
+
rank?: "deep" | "small" | "standard" | undefined;
|
|
519
|
+
calibrating?: boolean | undefined;
|
|
520
|
+
remaining_token_budget?: number | null | undefined;
|
|
521
|
+
binding_window?: {
|
|
522
|
+
label: string;
|
|
523
|
+
reset_at: string | null;
|
|
524
|
+
budget: number;
|
|
525
|
+
} | null | undefined;
|
|
526
|
+
in_flight_tokens?: number | undefined;
|
|
518
527
|
quota_source_snapshot?: {
|
|
519
|
-
source: string;
|
|
520
528
|
remaining_pct: number | null;
|
|
521
529
|
reset_at: string | null;
|
|
522
530
|
tokens_remaining: number | null;
|
|
523
531
|
requests_remaining: number | null;
|
|
524
532
|
captured_at: string;
|
|
533
|
+
source: string;
|
|
525
534
|
windows?: {
|
|
526
535
|
label: string;
|
|
527
536
|
remaining_pct: number | null;
|
|
@@ -529,20 +538,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
529
538
|
tokens_remaining?: number | null | undefined;
|
|
530
539
|
}[] | undefined;
|
|
531
540
|
} | null | undefined;
|
|
532
|
-
remaining_token_budget?: number | null | undefined;
|
|
533
|
-
binding_window?: {
|
|
534
|
-
budget: number;
|
|
535
|
-
label: string;
|
|
536
|
-
reset_at: string | null;
|
|
537
|
-
} | null | undefined;
|
|
538
|
-
in_flight_tokens?: number | undefined;
|
|
539
|
-
calibrating?: boolean | undefined;
|
|
540
|
-
rank?: "deep" | "small" | "standard" | undefined;
|
|
541
|
-
capability_rank?: number | null | undefined;
|
|
542
|
-
declared_cost_per_mtok?: number | null | undefined;
|
|
543
541
|
quota_signal_degraded?: boolean | undefined;
|
|
544
542
|
quota_coverage?: "established" | "reactive_only" | "unestablished" | undefined;
|
|
545
543
|
concurrency_cap?: number | null | undefined;
|
|
544
|
+
declared_cost_per_mtok?: number | null | undefined;
|
|
545
|
+
capability_rank?: number | null | undefined;
|
|
546
546
|
}[] | undefined;
|
|
547
547
|
host_model_roster?: {
|
|
548
548
|
context_tokens: number;
|
|
@@ -559,13 +559,9 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
559
559
|
confidence: "high" | "low" | "medium";
|
|
560
560
|
run_id: string;
|
|
561
561
|
contract_version: "audit-code-dispatch-quota/v1alpha3";
|
|
562
|
-
source: "
|
|
563
|
-
host_concurrency_limit: {
|
|
564
|
-
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
565
|
-
active_subagents: number;
|
|
566
|
-
description: string;
|
|
567
|
-
} | null;
|
|
562
|
+
source: "explicit_config" | "discovered_capability" | "static_metadata" | "cli_flags" | "provider_default" | "learned" | "default";
|
|
568
563
|
cooldown_until: string | null;
|
|
564
|
+
model: string | null;
|
|
569
565
|
resolved_limits: {
|
|
570
566
|
context_tokens: number;
|
|
571
567
|
output_tokens: number;
|
|
@@ -573,12 +569,16 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
573
569
|
input_tokens_per_minute: number | null;
|
|
574
570
|
output_tokens_per_minute: number | null;
|
|
575
571
|
};
|
|
576
|
-
|
|
572
|
+
host_concurrency_limit: {
|
|
573
|
+
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
574
|
+
active_subagents: number;
|
|
575
|
+
description: string;
|
|
576
|
+
} | null;
|
|
577
577
|
admission: {
|
|
578
578
|
leases: {
|
|
579
|
+
pool_id: string;
|
|
579
580
|
cost: number;
|
|
580
581
|
packet_id: string;
|
|
581
|
-
pool_id: string;
|
|
582
582
|
resource_key: string;
|
|
583
583
|
lease_id: string;
|
|
584
584
|
}[];
|
|
@@ -586,22 +586,23 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
586
586
|
declared_cap: number | null;
|
|
587
587
|
explains: {
|
|
588
588
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
589
|
+
pool_id: string | null;
|
|
589
590
|
cost: number;
|
|
590
591
|
admitted: boolean;
|
|
591
592
|
packet_id: string;
|
|
592
|
-
pool_id: string | null;
|
|
593
593
|
resource_key: string | null;
|
|
594
594
|
headroom_before?: number | undefined;
|
|
595
595
|
outstanding_before?: number | undefined;
|
|
596
596
|
}[];
|
|
597
597
|
};
|
|
598
|
+
binding_cap?: "rpm" | "tpm" | "token_budget" | "cooldown" | "host_concurrency" | "none" | undefined;
|
|
598
599
|
quota_source_snapshot?: {
|
|
599
|
-
source: string;
|
|
600
600
|
remaining_pct: number | null;
|
|
601
601
|
reset_at: string | null;
|
|
602
602
|
tokens_remaining: number | null;
|
|
603
603
|
requests_remaining: number | null;
|
|
604
604
|
captured_at: string;
|
|
605
|
+
source: string;
|
|
605
606
|
windows?: {
|
|
606
607
|
label: string;
|
|
607
608
|
remaining_pct: number | null;
|
|
@@ -609,17 +610,13 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
609
610
|
tokens_remaining?: number | null | undefined;
|
|
610
611
|
}[] | undefined;
|
|
611
612
|
} | null | undefined;
|
|
612
|
-
binding_cap?: "none" | "rpm" | "tpm" | "token_budget" | "cooldown" | "host_concurrency" | undefined;
|
|
613
613
|
capacity_pools?: {
|
|
614
614
|
confidence: "high" | "low" | "medium";
|
|
615
|
-
source: "
|
|
616
|
-
host_concurrency_limit: {
|
|
617
|
-
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
618
|
-
active_subagents: number;
|
|
619
|
-
description: string;
|
|
620
|
-
} | null;
|
|
621
|
-
estimated_wave_tokens: number;
|
|
615
|
+
source: "explicit_config" | "discovered_capability" | "static_metadata" | "cli_flags" | "provider_default" | "learned" | "default";
|
|
622
616
|
cooldown_until: string | null;
|
|
617
|
+
pool_id: string;
|
|
618
|
+
slots: number;
|
|
619
|
+
model: string | null;
|
|
623
620
|
resolved_limits: {
|
|
624
621
|
context_tokens: number;
|
|
625
622
|
output_tokens: number;
|
|
@@ -627,18 +624,30 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
627
624
|
input_tokens_per_minute: number | null;
|
|
628
625
|
output_tokens_per_minute: number | null;
|
|
629
626
|
};
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
627
|
+
host_concurrency_limit: {
|
|
628
|
+
source: "cli_flags" | "host_reported" | "session_config" | "environment" | "discovered_config" | "known_default";
|
|
629
|
+
active_subagents: number;
|
|
630
|
+
description: string;
|
|
631
|
+
} | null;
|
|
634
632
|
is_conversation_host: boolean;
|
|
633
|
+
estimated_wave_tokens: number;
|
|
634
|
+
binding_cap: "rpm" | "tpm" | "token_budget" | "cooldown" | "host_concurrency" | "none";
|
|
635
|
+
rank?: "deep" | "small" | "standard" | undefined;
|
|
636
|
+
calibrating?: boolean | undefined;
|
|
637
|
+
remaining_token_budget?: number | null | undefined;
|
|
638
|
+
binding_window?: {
|
|
639
|
+
label: string;
|
|
640
|
+
reset_at: string | null;
|
|
641
|
+
budget: number;
|
|
642
|
+
} | null | undefined;
|
|
643
|
+
in_flight_tokens?: number | undefined;
|
|
635
644
|
quota_source_snapshot?: {
|
|
636
|
-
source: string;
|
|
637
645
|
remaining_pct: number | null;
|
|
638
646
|
reset_at: string | null;
|
|
639
647
|
tokens_remaining: number | null;
|
|
640
648
|
requests_remaining: number | null;
|
|
641
649
|
captured_at: string;
|
|
650
|
+
source: string;
|
|
642
651
|
windows?: {
|
|
643
652
|
label: string;
|
|
644
653
|
remaining_pct: number | null;
|
|
@@ -646,20 +655,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
|
|
|
646
655
|
tokens_remaining?: number | null | undefined;
|
|
647
656
|
}[] | undefined;
|
|
648
657
|
} | null | undefined;
|
|
649
|
-
remaining_token_budget?: number | null | undefined;
|
|
650
|
-
binding_window?: {
|
|
651
|
-
budget: number;
|
|
652
|
-
label: string;
|
|
653
|
-
reset_at: string | null;
|
|
654
|
-
} | null | undefined;
|
|
655
|
-
in_flight_tokens?: number | undefined;
|
|
656
|
-
calibrating?: boolean | undefined;
|
|
657
|
-
rank?: "deep" | "small" | "standard" | undefined;
|
|
658
|
-
capability_rank?: number | null | undefined;
|
|
659
|
-
declared_cost_per_mtok?: number | null | undefined;
|
|
660
658
|
quota_signal_degraded?: boolean | undefined;
|
|
661
659
|
quota_coverage?: "established" | "reactive_only" | "unestablished" | undefined;
|
|
662
660
|
concurrency_cap?: number | null | undefined;
|
|
661
|
+
declared_cost_per_mtok?: number | null | undefined;
|
|
662
|
+
capability_rank?: number | null | undefined;
|
|
663
663
|
}[] | undefined;
|
|
664
664
|
host_model_roster?: {
|
|
665
665
|
context_tokens: number;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import { type AnalyzerSetting, type
|
|
1
|
+
import { type AnalyzerSetting, type RepoSessionIntent } from "audit-tools/shared";
|
|
2
2
|
export declare function getSessionConfigPath(artifactsDir: string): string;
|
|
3
3
|
export declare function readSessionConfigFile(artifactsDir: string): Promise<unknown | undefined>;
|
|
4
|
-
export declare function loadSessionConfig(artifactsDir: string): Promise<
|
|
4
|
+
export declare function loadSessionConfig(artifactsDir: string): Promise<RepoSessionIntent>;
|
|
5
5
|
/**
|
|
6
6
|
* Merge per-analyzer resolution decisions into `session-config.json`,
|
|
7
7
|
* preserving any unknown fields, validating, and persisting the result. Used by
|
|
8
8
|
* the conversation-first `analyzer_install` step to durably record the host's
|
|
9
9
|
* `{ephemeral|permanent|skip}` choices under `analyzers.<id>`.
|
|
10
10
|
*/
|
|
11
|
-
export declare function persistAnalyzerSettings(artifactsDir: string, settings: Record<string, AnalyzerSetting>): Promise<
|
|
12
|
-
/**
|
|
13
|
-
* B1: durably record the `--host-provider` override onto `session-config.json`,
|
|
14
|
-
* preserving unknown fields, validating, and persisting. The conversation-host
|
|
15
|
-
* identity is stable for a run, and the audit host-review path (`semanticReviewStep`)
|
|
16
|
-
* re-reads the config file from disk — so persisting is the single-source seam that
|
|
17
|
-
* makes the override reach it regardless of which subcommand re-enters the run.
|
|
18
|
-
*/
|
|
19
|
-
export declare function persistHostProvider(artifactsDir: string, hostProvider: ProviderName): Promise<SessionConfig>;
|
|
11
|
+
export declare function persistAnalyzerSettings(artifactsDir: string, settings: Record<string, AnalyzerSetting>): Promise<RepoSessionIntent>;
|
|
20
12
|
//# sourceMappingURL=sessionConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionConfig.d.ts","sourceRoot":"","sources":["../../../src/audit/supervisor/sessionConfig.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,
|
|
1
|
+
{"version":3,"file":"sessionConfig.d.ts","sourceRoot":"","sources":["../../../src/audit/supervisor/sessionConfig.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,iBAAiB,EASvB,MAAM,oBAAoB,CAAC;AAM5B,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEjE;AA8CD,wBAAsB,qBAAqB,CACzC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAE9B;AA6BD,wBAAsB,iBAAiB,CACrC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,iBAAiB,CAAC,CAW5B;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACxC,OAAO,CAAC,iBAAiB,CAAC,CAK5B"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
|
-
import { createLockedJsonStore, SKIP_WRITE, isRecord, readOptionalJsonFile, writeJsonFile, formatValidationIssues, } from "audit-tools/shared";
|
|
3
|
-
import { validateSessionConfig } from "../validation/sessionConfig.js";
|
|
2
|
+
import { createLockedJsonStore, SKIP_WRITE, isRecord, readOptionalJsonFile, writeJsonFile, formatValidationIssues, validateRepoSessionIntent, } from "audit-tools/shared";
|
|
4
3
|
const SESSION_CONFIG_FILENAME = "session-config.json";
|
|
5
4
|
const SESSION_CONFIG_LOCK_FILENAME = "session-config.lock";
|
|
6
5
|
const DEFAULT_SESSION_CONFIG = {};
|
|
@@ -23,7 +22,7 @@ function sessionConfigStore(artifactsDir) {
|
|
|
23
22
|
path: configPath,
|
|
24
23
|
lockPath: getSessionConfigLockPath(artifactsDir),
|
|
25
24
|
parse: (raw) => (isRecord(raw) ? raw : { ...DEFAULT_SESSION_CONFIG }),
|
|
26
|
-
validate: (next) => throwOnConfigErrors(configPath,
|
|
25
|
+
validate: (next) => throwOnConfigErrors(configPath, validateRepoSessionIntent(next)),
|
|
27
26
|
});
|
|
28
27
|
}
|
|
29
28
|
/**
|
|
@@ -69,7 +68,7 @@ export async function loadSessionConfig(artifactsDir) {
|
|
|
69
68
|
await writeJsonFile(configPath, DEFAULT_SESSION_CONFIG);
|
|
70
69
|
return { ...DEFAULT_SESSION_CONFIG };
|
|
71
70
|
}
|
|
72
|
-
throwOnConfigErrors(configPath,
|
|
71
|
+
throwOnConfigErrors(configPath, validateRepoSessionIntent(rawConfig));
|
|
73
72
|
return rawConfig;
|
|
74
73
|
}
|
|
75
74
|
/**
|
|
@@ -84,25 +83,4 @@ export async function persistAnalyzerSettings(artifactsDir, settings) {
|
|
|
84
83
|
return { ...base, analyzers: { ...current, ...settings } };
|
|
85
84
|
});
|
|
86
85
|
}
|
|
87
|
-
/**
|
|
88
|
-
* B1: durably record the `--host-provider` override onto `session-config.json`,
|
|
89
|
-
* preserving unknown fields, validating, and persisting. The conversation-host
|
|
90
|
-
* identity is stable for a run, and the audit host-review path (`semanticReviewStep`)
|
|
91
|
-
* re-reads the config file from disk — so persisting is the single-source seam that
|
|
92
|
-
* makes the override reach it regardless of which subcommand re-enters the run.
|
|
93
|
-
*/
|
|
94
|
-
export async function persistHostProvider(artifactsDir, hostProvider) {
|
|
95
|
-
return mutateSessionConfigLocked(artifactsDir, (base) => {
|
|
96
|
-
// Idempotent: an unchanged value is a no-op write. The host identity is stable
|
|
97
|
-
// for a run, so a bare re-invocation re-passing --host-provider must not rewrite
|
|
98
|
-
// the shared config file (needless churn + a wider lost-update window against a
|
|
99
|
-
// concurrent writer on the multi-IDE cooperative path). The compare reads `base`
|
|
100
|
-
// under the same held lock as the potential write, so it cannot race a
|
|
101
|
-
// concurrent writer that flipped the value between read and write.
|
|
102
|
-
if (base.host_provider === hostProvider) {
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
return { ...base, host_provider: hostProvider };
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
86
|
//# sourceMappingURL=sessionConfig.js.map
|