audit-tools 0.32.23 → 0.32.28
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/conceptualDispatch.d.ts +11 -0
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +31 -1
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.js +7 -1
- package/dist/audit/cli/dispatch/quotaPool.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +27 -0
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +55 -17
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/contracts/workerSchemas.d.ts +4 -4
- package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
- package/dist/audit/orchestrator/advance.d.ts +18 -19
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +32 -40
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +0 -17
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.d.ts +69 -0
- package/dist/audit/orchestrator/hostInputPause.d.ts.map +1 -0
- package/dist/audit/orchestrator/hostInputPause.js +90 -0
- package/dist/audit/orchestrator/hostInputPause.js.map +1 -0
- package/dist/audit/quota/index.d.ts +29 -24
- package/dist/audit/quota/index.d.ts.map +1 -1
- package/dist/audit/types.d.ts +2 -2
- package/dist/remediate/contractPipeline/artifactStore.d.ts +27 -0
- package/dist/remediate/contractPipeline/artifactStore.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/artifactStore.js +34 -0
- package/dist/remediate/contractPipeline/artifactStore.js.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.d.ts +9 -3
- package/dist/remediate/contractPipeline/changeClassification.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/changeClassification.js +25 -6
- package/dist/remediate/contractPipeline/changeClassification.js.map +1 -1
- package/dist/remediate/contractPipeline/derive.d.ts +42 -0
- package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/derive.js +108 -0
- package/dist/remediate/contractPipeline/derive.js.map +1 -1
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +9 -1
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +10 -0
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +20 -1
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/phases/grounding.d.ts +7 -4
- package/dist/remediate/phases/grounding.d.ts.map +1 -1
- package/dist/remediate/phases/grounding.js +52 -8
- package/dist/remediate/phases/grounding.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +1 -0
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +2 -2
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/acceptNode.d.ts +25 -0
- package/dist/remediate/steps/dispatch/acceptNode.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/acceptNode.js +65 -7
- package/dist/remediate/steps/dispatch/acceptNode.js.map +1 -1
- package/dist/remediate/steps/dispatch/common.d.ts +11 -0
- package/dist/remediate/steps/dispatch/common.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/common.js +16 -0
- package/dist/remediate/steps/dispatch/common.js.map +1 -1
- package/dist/remediate/steps/dispatch/implementPrompt.d.ts +13 -0
- package/dist/remediate/steps/dispatch/implementPrompt.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/implementPrompt.js +33 -7
- package/dist/remediate/steps/dispatch/implementPrompt.js.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.js +77 -9
- package/dist/remediate/steps/dispatch/marshal.js.map +1 -1
- package/dist/remediate/steps/dispatch/waveScheduling.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/waveScheduling.js +3 -1
- package/dist/remediate/steps/dispatch/waveScheduling.js.map +1 -1
- package/dist/remediate/steps/dispatch/worktreeLifecycle.d.ts +55 -16
- package/dist/remediate/steps/dispatch/worktreeLifecycle.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/worktreeLifecycle.js +119 -16
- package/dist/remediate/steps/dispatch/worktreeLifecycle.js.map +1 -1
- package/dist/remediate/steps/dispatch.d.ts +2 -2
- package/dist/remediate/steps/dispatch.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch.js +2 -2
- package/dist/remediate/steps/dispatch.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +12 -1
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +38 -1
- package/dist/remediate/validation/artifacts.js.map +1 -1
- package/dist/remediate/validation/contractPipeline.d.ts +1 -1
- package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipeline.js +1 -1
- package/dist/remediate/validation/contractPipeline.js.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.d.ts +15 -0
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
- package/dist/remediate/validation/contractPipelineGates.js +168 -2
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
- package/dist/shared/dispatch/admissionLoop.d.ts +12 -12
- package/dist/shared/dispatch/costRank.d.ts +17 -1
- package/dist/shared/dispatch/costRank.d.ts.map +1 -1
- package/dist/shared/dispatch/costRank.js +8 -4
- package/dist/shared/dispatch/costRank.js.map +1 -1
- package/dist/shared/dispatch/rollingDispatch.d.ts.map +1 -1
- package/dist/shared/dispatch/rollingDispatch.js +16 -3
- package/dist/shared/dispatch/rollingDispatch.js.map +1 -1
- package/dist/shared/friction/captureFrictionEvent.d.ts +13 -0
- package/dist/shared/friction/captureFrictionEvent.d.ts.map +1 -1
- package/dist/shared/friction/captureFrictionEvent.js.map +1 -1
- package/dist/shared/friction/frictionRecord.d.ts +55 -1
- package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
- package/dist/shared/friction/frictionRecord.js +40 -0
- package/dist/shared/friction/frictionRecord.js.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.d.ts +14 -0
- package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.js +47 -0
- package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
- package/dist/shared/friction/triage.d.ts +94 -14
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +0 -0
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/providers/openAiCompatibleProvider.d.ts +8 -0
- package/dist/shared/providers/openAiCompatibleProvider.d.ts.map +1 -1
- package/dist/shared/providers/openAiCompatibleProvider.js +100 -28
- package/dist/shared/providers/openAiCompatibleProvider.js.map +1 -1
- package/dist/shared/quota/apiPool.d.ts.map +1 -1
- package/dist/shared/quota/apiPool.js +19 -0
- package/dist/shared/quota/apiPool.js.map +1 -1
- package/dist/shared/quota/capacity.d.ts +31 -4
- package/dist/shared/quota/capacity.d.ts.map +1 -1
- package/dist/shared/quota/capacity.js +8 -0
- package/dist/shared/quota/capacity.js.map +1 -1
- package/dist/shared/quota/modelStatics.d.ts +15 -7
- package/dist/shared/quota/modelStatics.d.ts.map +1 -1
- package/dist/shared/quota/modelStatics.js +60 -13
- package/dist/shared/quota/modelStatics.js.map +1 -1
- package/dist/shared/quota/quotaSource.d.ts +2 -2
- package/dist/shared/types/sessionConfig.d.ts +10 -0
- package/dist/shared/types/sessionConfig.d.ts.map +1 -1
- package/dist/shared/types/sessionConfig.js.map +1 -1
- package/dist/shared/validation/designFindingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/designFindingGrounding.js +9 -3
- package/dist/shared/validation/designFindingGrounding.js.map +1 -1
- package/dist/shared/validation/findingGrounding.d.ts +40 -0
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/findingGrounding.js +83 -0
- package/dist/shared/validation/findingGrounding.js.map +1 -1
- package/opencode.json +34 -22
- package/package.json +2 -2
|
@@ -76,15 +76,15 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
76
76
|
audit_results_path: z.ZodString;
|
|
77
77
|
worker_command: z.ZodArray<z.ZodString, "many">;
|
|
78
78
|
}, "strict", z.ZodTypeAny, {
|
|
79
|
-
worker_command: string[];
|
|
80
79
|
run_id: string;
|
|
80
|
+
worker_command: string[];
|
|
81
81
|
audit_results_path: string;
|
|
82
82
|
task_path: string;
|
|
83
83
|
prompt_path: string;
|
|
84
84
|
pending_audit_tasks_path?: string | undefined;
|
|
85
85
|
}, {
|
|
86
|
-
worker_command: string[];
|
|
87
86
|
run_id: string;
|
|
87
|
+
worker_command: string[];
|
|
88
88
|
audit_results_path: string;
|
|
89
89
|
task_path: string;
|
|
90
90
|
prompt_path: string;
|
|
@@ -157,8 +157,8 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
157
157
|
suggested_commands: string[];
|
|
158
158
|
interactive_provider_hint: string | null;
|
|
159
159
|
active_review_run?: {
|
|
160
|
-
worker_command: string[];
|
|
161
160
|
run_id: string;
|
|
161
|
+
worker_command: string[];
|
|
162
162
|
audit_results_path: string;
|
|
163
163
|
task_path: string;
|
|
164
164
|
prompt_path: string;
|
|
@@ -194,8 +194,8 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
194
194
|
suggested_commands: string[];
|
|
195
195
|
interactive_provider_hint: string | null;
|
|
196
196
|
active_review_run?: {
|
|
197
|
-
worker_command: string[];
|
|
198
197
|
run_id: string;
|
|
198
|
+
worker_command: string[];
|
|
199
199
|
audit_results_path: string;
|
|
200
200
|
task_path: string;
|
|
201
201
|
prompt_path: string;
|
|
@@ -251,8 +251,8 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
251
251
|
suggested_commands: string[];
|
|
252
252
|
interactive_provider_hint: string | null;
|
|
253
253
|
active_review_run?: {
|
|
254
|
-
worker_command: string[];
|
|
255
254
|
run_id: string;
|
|
255
|
+
worker_command: string[];
|
|
256
256
|
audit_results_path: string;
|
|
257
257
|
task_path: string;
|
|
258
258
|
prompt_path: string;
|
|
@@ -308,8 +308,8 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
308
308
|
suggested_commands: string[];
|
|
309
309
|
interactive_provider_hint: string | null;
|
|
310
310
|
active_review_run?: {
|
|
311
|
-
worker_command: string[];
|
|
312
311
|
run_id: string;
|
|
312
|
+
worker_command: string[];
|
|
313
313
|
audit_results_path: string;
|
|
314
314
|
task_path: string;
|
|
315
315
|
prompt_path: string;
|
|
@@ -2,27 +2,26 @@ import type { ArtifactBundle } from "../io/artifacts.js";
|
|
|
2
2
|
import type { AdvanceAuditOptions, AdvanceAuditResult } from "./advanceTypes.js";
|
|
3
3
|
export type { AdvanceAuditOptions, AdvanceAuditResult } from "./advanceTypes.js";
|
|
4
4
|
/**
|
|
5
|
-
* Advance the audit by ONE bounded step
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* regenerated artifact.
|
|
5
|
+
* Advance the audit by ONE bounded step, then SAFELY DRAIN the deterministic
|
|
6
|
+
* regen frontier within the SAME call: run the first bounded step, then keep
|
|
7
|
+
* running consecutive deterministic runner-backed steps (re-deriving
|
|
8
|
+
* decideNextStep + computeStaleArtifacts each iteration) until the next step is a
|
|
9
|
+
* host-input pause, a no-runner handoff, or the run is complete. A whole staleness
|
|
10
|
+
* cascade (e.g. a schema-version migration that re-stales every downstream
|
|
11
|
+
* artifact) thus resolves in a single call and emits a single consolidated
|
|
12
|
+
* staleness stderr record at the boundary — instead of one host round-trip (and
|
|
13
|
+
* one record) per regenerated artifact.
|
|
15
14
|
*
|
|
16
|
-
* The drain is
|
|
17
|
-
*
|
|
18
|
-
* `
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
15
|
+
* The drain is the DEFAULT (there is no opt-in flag). It is FOLD-AWARE: the stop
|
|
16
|
+
* predicate is the single-sourced `nextStepPausesForHostInput` (via
|
|
17
|
+
* `nextStepIsDrainableRegen`), consumed by BOTH this loop and the `next-step`
|
|
18
|
+
* fold, so the drain halts at EVERY operator-interactive pause — including the
|
|
19
|
+
* fold-level ones a registry-only `isHostDelegationExecutor` gate is blind to: the
|
|
20
|
+
* analyzer-install consent fold and the low-confidence edge-reasoning fold (both
|
|
21
|
+
* surfaced by the `graph_enrichment_executor`, which is registered deterministic).
|
|
23
22
|
*
|
|
24
|
-
* A forced `preferredExecutor` still runs EXACTLY ONE step
|
|
25
|
-
*
|
|
23
|
+
* A forced `preferredExecutor` still runs EXACTLY ONE step: an explicit executor
|
|
24
|
+
* request is a targeted single action, never a drain trigger.
|
|
26
25
|
*/
|
|
27
26
|
export declare function advanceAudit(bundle: ArtifactBundle, options?: AdvanceAuditOptions): Promise<AdvanceAuditResult>;
|
|
28
27
|
//# sourceMappingURL=advance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advance.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/advance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAczD,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEjF,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"advance.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/advance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAczD,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEjF,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AA8NjF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,kBAAkB,CAAC,CAsD7B"}
|
|
@@ -3,7 +3,7 @@ import { decideNextStep, findObligation } from "./nextStep.js";
|
|
|
3
3
|
import { deriveAuditState } from "./state.js";
|
|
4
4
|
import { computeArtifactMetadata } from "./artifactMetadata.js";
|
|
5
5
|
import { EXECUTOR_RUNNERS } from "./executorRunners.js";
|
|
6
|
-
import {
|
|
6
|
+
import { nextStepIsDrainableRegen } from "./hostInputPause.js";
|
|
7
7
|
import { computeStaleArtifacts, emitStalenessRecord, isMetadataMigrationStaleness, } from "./staleness.js";
|
|
8
8
|
import { AGENT_FEEDBACK_FILENAME, RunLogger } from "audit-tools/shared";
|
|
9
9
|
/**
|
|
@@ -192,59 +192,51 @@ async function runSingleAdvanceStep(bundle, options = {}) {
|
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
/**
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
* EXECUTOR_RUNNERS AND is NOT a host-delegation boundary. Host-delegation steps
|
|
198
|
-
* (LLM review, intent/charter checkpoints, dispatch handoffs) always return
|
|
199
|
-
* control to the host, so the drain stops before them. Chain-length/index-agnostic:
|
|
200
|
-
* the decision is derived fresh from re-running decideNextStep + the staleness pass,
|
|
201
|
-
* never from a fixed executor index.
|
|
195
|
+
* Runner presence for the shared drainable-regen predicate: `advanceAudit` drains
|
|
196
|
+
* only steps that have a deterministic runner in EXECUTOR_RUNNERS.
|
|
202
197
|
*/
|
|
203
|
-
function
|
|
204
|
-
|
|
205
|
-
const executor = decision.selected_executor;
|
|
206
|
-
if (!executor)
|
|
207
|
-
return false;
|
|
208
|
-
if (!EXECUTOR_RUNNERS[executor])
|
|
209
|
-
return false;
|
|
210
|
-
if (isHostDelegationExecutor(executor))
|
|
211
|
-
return false;
|
|
212
|
-
return true;
|
|
198
|
+
function advanceHasRunner(executor) {
|
|
199
|
+
return Boolean(EXECUTOR_RUNNERS[executor]);
|
|
213
200
|
}
|
|
214
201
|
/**
|
|
215
|
-
* Advance the audit by ONE bounded step
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
* regenerated artifact.
|
|
202
|
+
* Advance the audit by ONE bounded step, then SAFELY DRAIN the deterministic
|
|
203
|
+
* regen frontier within the SAME call: run the first bounded step, then keep
|
|
204
|
+
* running consecutive deterministic runner-backed steps (re-deriving
|
|
205
|
+
* decideNextStep + computeStaleArtifacts each iteration) until the next step is a
|
|
206
|
+
* host-input pause, a no-runner handoff, or the run is complete. A whole staleness
|
|
207
|
+
* cascade (e.g. a schema-version migration that re-stales every downstream
|
|
208
|
+
* artifact) thus resolves in a single call and emits a single consolidated
|
|
209
|
+
* staleness stderr record at the boundary — instead of one host round-trip (and
|
|
210
|
+
* one record) per regenerated artifact.
|
|
225
211
|
*
|
|
226
|
-
* The drain is
|
|
227
|
-
*
|
|
228
|
-
* `
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
212
|
+
* The drain is the DEFAULT (there is no opt-in flag). It is FOLD-AWARE: the stop
|
|
213
|
+
* predicate is the single-sourced `nextStepPausesForHostInput` (via
|
|
214
|
+
* `nextStepIsDrainableRegen`), consumed by BOTH this loop and the `next-step`
|
|
215
|
+
* fold, so the drain halts at EVERY operator-interactive pause — including the
|
|
216
|
+
* fold-level ones a registry-only `isHostDelegationExecutor` gate is blind to: the
|
|
217
|
+
* analyzer-install consent fold and the low-confidence edge-reasoning fold (both
|
|
218
|
+
* surfaced by the `graph_enrichment_executor`, which is registered deterministic).
|
|
233
219
|
*
|
|
234
|
-
* A forced `preferredExecutor` still runs EXACTLY ONE step
|
|
235
|
-
*
|
|
220
|
+
* A forced `preferredExecutor` still runs EXACTLY ONE step: an explicit executor
|
|
221
|
+
* request is a targeted single action, never a drain trigger.
|
|
236
222
|
*/
|
|
237
223
|
export async function advanceAudit(bundle, options = {}) {
|
|
238
224
|
const forced = Boolean(options.preferredExecutor);
|
|
239
225
|
let result = await runSingleAdvanceStep(bundle, options);
|
|
240
|
-
|
|
226
|
+
const pauseInputs = {
|
|
227
|
+
root: options.root,
|
|
228
|
+
analyzers: options.analyzers,
|
|
229
|
+
graphLlmEdgeReasoning: options.graphLlmEdgeReasoning,
|
|
230
|
+
};
|
|
231
|
+
if (!forced) {
|
|
241
232
|
// Drain the deterministic regen frontier. Each drained step re-derives the
|
|
242
233
|
// decision + staleness from the accumulated bundle, so the loop is agnostic
|
|
243
|
-
// to how long the chain is or where in the priority order it sits
|
|
234
|
+
// to how long the chain is or where in the priority order it sits, and stops
|
|
235
|
+
// at the first host-input pause (fold-aware, single-sourced predicate).
|
|
244
236
|
let iterations = 0;
|
|
245
237
|
while (result.progress_made &&
|
|
246
238
|
iterations < MAX_DRAIN_STEPS &&
|
|
247
|
-
nextStepIsDrainableRegen(result.updated_bundle)) {
|
|
239
|
+
nextStepIsDrainableRegen(result.updated_bundle, advanceHasRunner, pauseInputs)) {
|
|
248
240
|
const previousArtifacts = result.artifacts_written;
|
|
249
241
|
const previousSummary = result.progress_summary;
|
|
250
242
|
const next = await runSingleAdvanceStep(result.updated_bundle, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advance.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/advance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"advance.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/advance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAKxE;;;;;;;;;GASG;AACH,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,SAAS,UAAU,CAAC,KAAiB;IACnC,OAAO;QACL,GAAG,KAAK;QACR,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QACrC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAA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AE,CAAC;QAC3B,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,SAAS;QAC9B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAChB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -59,23 +59,6 @@ export interface AdvanceAuditOptions {
|
|
|
59
59
|
*/
|
|
60
60
|
since?: string;
|
|
61
61
|
preferredExecutor?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Opt-in to the internal deterministic drain loop: run consecutive
|
|
64
|
-
* runner-backed non-host-delegation steps in one call, halting at the first
|
|
65
|
-
* host-delegation boundary. DEFAULT `false` — a bare `advanceAudit` call runs
|
|
66
|
-
* EXACTLY ONE bounded step.
|
|
67
|
-
*
|
|
68
|
-
* Only a direct autonomy driver that owns the whole regen/staleness cascade
|
|
69
|
-
* (and has no host to hand interactive steps back to) sets this. The CLI paths
|
|
70
|
-
* MUST leave it off: both the `advance-audit` command (contractually one bounded
|
|
71
|
-
* executor per invocation) and the `next-step` obligation fold drive their own
|
|
72
|
-
* one-step-at-a-time loop, and rely on `advanceAudit` NOT draining so the fold
|
|
73
|
-
* can stop at the CLI-level interactive pauses (provider confirmation,
|
|
74
|
-
* analyzer-install consent, edge-reasoning, intent checkpoint) that live in the
|
|
75
|
-
* fold rather than in the executor registry. A drain here would silently skip
|
|
76
|
-
* those operator-interactive steps.
|
|
77
|
-
*/
|
|
78
|
-
drain?: boolean;
|
|
79
62
|
runLogger?: RunLogger;
|
|
80
63
|
}
|
|
81
64
|
export interface AdvanceAuditResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanceTypes.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/advanceTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,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AC,EAAE,uBAAuB,CAAC;IAClD,0FAA0F;IAC1F,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IACtC,uGAAuG;IACvG,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,wGAAwG;IACxG,oBAAoB,CAAC,EAAE,8BAA8B,CAAC;IACtD,6GAA6G;IAC7G,iBAAiB,CAAC,EAAE,2BAA2B,CAAC;IAChD,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,iCAAiC,CAAC;IACxD,8EAA8E;IAC9E,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,6EAA6E;IAC7E,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,UAAU,CAAC;IACxB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,cAAc,CAAC;CAChC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { ArtifactBundle } from "../io/artifacts.js";
|
|
2
|
+
import type { AnalyzerSetting, GraphEdge } from "audit-tools/shared";
|
|
3
|
+
import type { AnalyzerPlanEntry } from "../extractors/analyzers/types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Inputs the fold-level host-input pauses depend on. These mirror the fields the
|
|
6
|
+
* `next-step` fold reads when deciding whether to emit an interactive host step
|
|
7
|
+
* (`analyzer_install` / `edge_reasoning`) instead of running the deterministic
|
|
8
|
+
* graph-enrichment executor. Single-sourcing them here keeps the drain loop and
|
|
9
|
+
* the primary fold from drifting on WHERE the pipeline pauses for the operator.
|
|
10
|
+
*/
|
|
11
|
+
export interface HostInputPauseInputs {
|
|
12
|
+
/** Repo root — the analyzer plan resolves dependencies against it. */
|
|
13
|
+
root?: string;
|
|
14
|
+
/** Per-analyzer resolution policy (drives the analyzer-install consent fold). */
|
|
15
|
+
analyzers?: Record<string, AnalyzerSetting>;
|
|
16
|
+
/** Phase 4B gate: low-confidence edge-reasoning host turn only fires when true. */
|
|
17
|
+
graphLlmEdgeReasoning?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The undecided analyzer-install entries the graph-enrichment step still owes the
|
|
21
|
+
* operator a consent decision on. This is the SINGLE source of the analyzer-install
|
|
22
|
+
* consent fold — consumed both by the `next-step` fold (`handleGraphEnrichmentBranch`,
|
|
23
|
+
* which relays the list as the host step) AND by the drain stop predicate below
|
|
24
|
+
* (which stops when the list is non-empty). Absent a root / manifest there is
|
|
25
|
+
* nothing to resolve, so nothing is owed.
|
|
26
|
+
*/
|
|
27
|
+
export declare function graphEnrichmentUnresolvedAnalyzers(bundle: ArtifactBundle, inputs: HostInputPauseInputs): AnalyzerPlanEntry[];
|
|
28
|
+
/**
|
|
29
|
+
* The low-confidence graph edges the graph-enrichment step still owes a host
|
|
30
|
+
* edge-reasoning turn on. The SINGLE source of the edge-reasoning fold: the flag
|
|
31
|
+
* must be on and the floor must carry at least one low-confidence edge candidate.
|
|
32
|
+
* Consumed by both `handleGraphEnrichmentBranch` (relays the candidates as the host
|
|
33
|
+
* step) and the drain stop predicate (stops when the list is non-empty).
|
|
34
|
+
*/
|
|
35
|
+
export declare function graphEnrichmentLowConfidenceEdges(bundle: ArtifactBundle, inputs: HostInputPauseInputs): GraphEdge[];
|
|
36
|
+
/**
|
|
37
|
+
* The SINGLE fold-aware stop predicate consumed by BOTH the `advanceAudit` drain
|
|
38
|
+
* loop AND the `next-step` fold. True when the next step derived from `bundle`
|
|
39
|
+
* pauses for HOST INPUT and must not be resolved deterministically in-process.
|
|
40
|
+
*
|
|
41
|
+
* Two classes of pause:
|
|
42
|
+
* 1. A registry-level host-delegation executor (provider confirmation, intent /
|
|
43
|
+
* charter checkpoints, design-review + clarification + systemic-challenge
|
|
44
|
+
* loops, synthesis narrative, dispatch handoffs). `isHostDelegationExecutor`
|
|
45
|
+
* already sees every one of these — they are `kind: "host_delegation"` in the
|
|
46
|
+
* executor registry.
|
|
47
|
+
* 2. A FOLD-LEVEL interactive pause the registry cannot see: the
|
|
48
|
+
* `graph_enrichment_executor` is registered `deterministic`, but the fold
|
|
49
|
+
* emits an `analyzer_install` consent step (undecided analyzer installs) or
|
|
50
|
+
* an `edge_reasoning` step (low-confidence edges + flag on) BEFORE running it.
|
|
51
|
+
* A registry-only gate (`isHostDelegationExecutor`) is blind to (2), so an
|
|
52
|
+
* unconditional drain would silently skip an operator-interactive step —
|
|
53
|
+
* exactly the latent failure this predicate closes. It reuses the SAME
|
|
54
|
+
* fold-detection helpers the `next-step` fold does, so the two cannot drift.
|
|
55
|
+
*
|
|
56
|
+
* Chain-length/index-agnostic: the decision is re-derived from `decideNextStep`
|
|
57
|
+
* each call, never a fixed executor index.
|
|
58
|
+
*/
|
|
59
|
+
export declare function nextStepPausesForHostInput(bundle: ArtifactBundle, inputs?: HostInputPauseInputs): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* True when the next step is a deterministic, runner-backed regen step the drain
|
|
62
|
+
* loop may resolve in-process — i.e. it has a runner AND does NOT pause for host
|
|
63
|
+
* input (neither a registry host-delegation boundary nor a fold-level interactive
|
|
64
|
+
* pause). Callers pass the runner-presence check via `hasRunner` so this module
|
|
65
|
+
* stays free of the executor-runner import (which would pull the whole executor
|
|
66
|
+
* graph into the pause predicate).
|
|
67
|
+
*/
|
|
68
|
+
export declare function nextStepIsDrainableRegen(bundle: ArtifactBundle, hasRunner: (executor: string) => boolean, inputs?: HostInputPauseInputs): boolean;
|
|
69
|
+
//# sourceMappingURL=hostInputPause.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostInputPause.d.ts","sourceRoot":"","sources":["../../../src/audit/orchestrator/hostInputPause.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAW1E;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,mFAAmF;IACnF,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,oBAAoB,GAC3B,iBAAiB,EAAE,CAarB;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,oBAAoB,GAC3B,SAAS,EAAE,CAGb;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,cAAc,EACtB,MAAM,GAAE,oBAAyB,GAChC,OAAO,CAUT;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,cAAc,EACtB,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,EACxC,MAAM,GAAE,oBAAyB,GAChC,OAAO,CAMT"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { decideNextStep } from "./nextStep.js";
|
|
2
|
+
import { isHostDelegationExecutor } from "./executors.js";
|
|
3
|
+
import { collectLowConfidenceEdges } from "./edgeReasoning.js";
|
|
4
|
+
import { buildPathLookup } from "../extractors/graph.js";
|
|
5
|
+
import { buildDispositionMap } from "../extractors/disposition.js";
|
|
6
|
+
import { resolveAnalyzerPlan, needsInstallDecision, } from "../extractors/analyzers/registry.js";
|
|
7
|
+
/**
|
|
8
|
+
* The undecided analyzer-install entries the graph-enrichment step still owes the
|
|
9
|
+
* operator a consent decision on. This is the SINGLE source of the analyzer-install
|
|
10
|
+
* consent fold — consumed both by the `next-step` fold (`handleGraphEnrichmentBranch`,
|
|
11
|
+
* which relays the list as the host step) AND by the drain stop predicate below
|
|
12
|
+
* (which stops when the list is non-empty). Absent a root / manifest there is
|
|
13
|
+
* nothing to resolve, so nothing is owed.
|
|
14
|
+
*/
|
|
15
|
+
export function graphEnrichmentUnresolvedAnalyzers(bundle, inputs) {
|
|
16
|
+
if (!inputs.root || !bundle.repo_manifest)
|
|
17
|
+
return [];
|
|
18
|
+
const includedFiles = [
|
|
19
|
+
...new Set(buildPathLookup(bundle.repo_manifest, buildDispositionMap(bundle.file_disposition)).values()),
|
|
20
|
+
];
|
|
21
|
+
return resolveAnalyzerPlan(inputs.root, inputs.analyzers, includedFiles).filter(needsInstallDecision);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The low-confidence graph edges the graph-enrichment step still owes a host
|
|
25
|
+
* edge-reasoning turn on. The SINGLE source of the edge-reasoning fold: the flag
|
|
26
|
+
* must be on and the floor must carry at least one low-confidence edge candidate.
|
|
27
|
+
* Consumed by both `handleGraphEnrichmentBranch` (relays the candidates as the host
|
|
28
|
+
* step) and the drain stop predicate (stops when the list is non-empty).
|
|
29
|
+
*/
|
|
30
|
+
export function graphEnrichmentLowConfidenceEdges(bundle, inputs) {
|
|
31
|
+
if (inputs.graphLlmEdgeReasoning !== true || !bundle.graph_bundle)
|
|
32
|
+
return [];
|
|
33
|
+
return collectLowConfidenceEdges(bundle.graph_bundle);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The SINGLE fold-aware stop predicate consumed by BOTH the `advanceAudit` drain
|
|
37
|
+
* loop AND the `next-step` fold. True when the next step derived from `bundle`
|
|
38
|
+
* pauses for HOST INPUT and must not be resolved deterministically in-process.
|
|
39
|
+
*
|
|
40
|
+
* Two classes of pause:
|
|
41
|
+
* 1. A registry-level host-delegation executor (provider confirmation, intent /
|
|
42
|
+
* charter checkpoints, design-review + clarification + systemic-challenge
|
|
43
|
+
* loops, synthesis narrative, dispatch handoffs). `isHostDelegationExecutor`
|
|
44
|
+
* already sees every one of these — they are `kind: "host_delegation"` in the
|
|
45
|
+
* executor registry.
|
|
46
|
+
* 2. A FOLD-LEVEL interactive pause the registry cannot see: the
|
|
47
|
+
* `graph_enrichment_executor` is registered `deterministic`, but the fold
|
|
48
|
+
* emits an `analyzer_install` consent step (undecided analyzer installs) or
|
|
49
|
+
* an `edge_reasoning` step (low-confidence edges + flag on) BEFORE running it.
|
|
50
|
+
* A registry-only gate (`isHostDelegationExecutor`) is blind to (2), so an
|
|
51
|
+
* unconditional drain would silently skip an operator-interactive step —
|
|
52
|
+
* exactly the latent failure this predicate closes. It reuses the SAME
|
|
53
|
+
* fold-detection helpers the `next-step` fold does, so the two cannot drift.
|
|
54
|
+
*
|
|
55
|
+
* Chain-length/index-agnostic: the decision is re-derived from `decideNextStep`
|
|
56
|
+
* each call, never a fixed executor index.
|
|
57
|
+
*/
|
|
58
|
+
export function nextStepPausesForHostInput(bundle, inputs = {}) {
|
|
59
|
+
const decision = decideNextStep(bundle, { emitStaleness: false });
|
|
60
|
+
const executor = decision.selected_executor;
|
|
61
|
+
if (!executor)
|
|
62
|
+
return false;
|
|
63
|
+
if (isHostDelegationExecutor(executor))
|
|
64
|
+
return true;
|
|
65
|
+
if (executor === "graph_enrichment_executor") {
|
|
66
|
+
if (graphEnrichmentUnresolvedAnalyzers(bundle, inputs).length > 0)
|
|
67
|
+
return true;
|
|
68
|
+
if (graphEnrichmentLowConfidenceEdges(bundle, inputs).length > 0)
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* True when the next step is a deterministic, runner-backed regen step the drain
|
|
75
|
+
* loop may resolve in-process — i.e. it has a runner AND does NOT pause for host
|
|
76
|
+
* input (neither a registry host-delegation boundary nor a fold-level interactive
|
|
77
|
+
* pause). Callers pass the runner-presence check via `hasRunner` so this module
|
|
78
|
+
* stays free of the executor-runner import (which would pull the whole executor
|
|
79
|
+
* graph into the pause predicate).
|
|
80
|
+
*/
|
|
81
|
+
export function nextStepIsDrainableRegen(bundle, hasRunner, inputs = {}) {
|
|
82
|
+
const decision = decideNextStep(bundle, { emitStaleness: false });
|
|
83
|
+
const executor = decision.selected_executor;
|
|
84
|
+
if (!executor)
|
|
85
|
+
return false;
|
|
86
|
+
if (!hasRunner(executor))
|
|
87
|
+
return false;
|
|
88
|
+
return !nextStepPausesForHostInput(bundle, inputs);
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=hostInputPause.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostInputPause.js","sourceRoot":"","sources":["../../../src/audit/orchestrator/hostInputPause.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,qCAAqC,CAAC;AAkB7C;;;;;;;GAOG;AACH,MAAM,UAAU,kCAAkC,CAChD,MAAsB,EACtB,MAA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