audit-tools 0.32.23 → 0.32.27

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.
Files changed (123) hide show
  1. package/dist/audit/cli/conceptualDispatch.d.ts +11 -0
  2. package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
  3. package/dist/audit/cli/conceptualDispatch.js +31 -1
  4. package/dist/audit/cli/conceptualDispatch.js.map +1 -1
  5. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  6. package/dist/audit/cli/nextStepHelpers.js +12 -13
  7. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  8. package/dist/audit/contracts/workerSchemas.d.ts +4 -4
  9. package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
  10. package/dist/audit/orchestrator/advance.d.ts +18 -19
  11. package/dist/audit/orchestrator/advance.d.ts.map +1 -1
  12. package/dist/audit/orchestrator/advance.js +32 -40
  13. package/dist/audit/orchestrator/advance.js.map +1 -1
  14. package/dist/audit/orchestrator/advanceTypes.d.ts +0 -17
  15. package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
  16. package/dist/audit/orchestrator/hostInputPause.d.ts +69 -0
  17. package/dist/audit/orchestrator/hostInputPause.d.ts.map +1 -0
  18. package/dist/audit/orchestrator/hostInputPause.js +90 -0
  19. package/dist/audit/orchestrator/hostInputPause.js.map +1 -0
  20. package/dist/audit/quota/index.d.ts +24 -24
  21. package/dist/audit/types.d.ts +2 -2
  22. package/dist/remediate/contractPipeline/artifactStore.d.ts +27 -0
  23. package/dist/remediate/contractPipeline/artifactStore.d.ts.map +1 -1
  24. package/dist/remediate/contractPipeline/artifactStore.js +34 -0
  25. package/dist/remediate/contractPipeline/artifactStore.js.map +1 -1
  26. package/dist/remediate/contractPipeline/changeClassification.d.ts +9 -3
  27. package/dist/remediate/contractPipeline/changeClassification.d.ts.map +1 -1
  28. package/dist/remediate/contractPipeline/changeClassification.js +25 -6
  29. package/dist/remediate/contractPipeline/changeClassification.js.map +1 -1
  30. package/dist/remediate/contractPipeline/derive.d.ts +42 -0
  31. package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
  32. package/dist/remediate/contractPipeline/derive.js +108 -0
  33. package/dist/remediate/contractPipeline/derive.js.map +1 -1
  34. package/dist/remediate/index.d.ts.map +1 -1
  35. package/dist/remediate/index.js +9 -1
  36. package/dist/remediate/index.js.map +1 -1
  37. package/dist/remediate/intake.d.ts +10 -0
  38. package/dist/remediate/intake.d.ts.map +1 -1
  39. package/dist/remediate/intake.js +20 -1
  40. package/dist/remediate/intake.js.map +1 -1
  41. package/dist/remediate/phases/grounding.d.ts +7 -4
  42. package/dist/remediate/phases/grounding.d.ts.map +1 -1
  43. package/dist/remediate/phases/grounding.js +52 -8
  44. package/dist/remediate/phases/grounding.js.map +1 -1
  45. package/dist/remediate/steps/contractPipelinePrompts.d.ts +1 -0
  46. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  47. package/dist/remediate/steps/contractPipelinePrompts.js +2 -2
  48. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  49. package/dist/remediate/steps/dispatch/acceptNode.d.ts +25 -0
  50. package/dist/remediate/steps/dispatch/acceptNode.d.ts.map +1 -1
  51. package/dist/remediate/steps/dispatch/acceptNode.js +65 -7
  52. package/dist/remediate/steps/dispatch/acceptNode.js.map +1 -1
  53. package/dist/remediate/steps/dispatch/common.d.ts +11 -0
  54. package/dist/remediate/steps/dispatch/common.d.ts.map +1 -1
  55. package/dist/remediate/steps/dispatch/common.js +16 -0
  56. package/dist/remediate/steps/dispatch/common.js.map +1 -1
  57. package/dist/remediate/steps/dispatch/implementPrompt.d.ts +13 -0
  58. package/dist/remediate/steps/dispatch/implementPrompt.d.ts.map +1 -1
  59. package/dist/remediate/steps/dispatch/implementPrompt.js +33 -7
  60. package/dist/remediate/steps/dispatch/implementPrompt.js.map +1 -1
  61. package/dist/remediate/steps/dispatch/marshal.d.ts.map +1 -1
  62. package/dist/remediate/steps/dispatch/marshal.js +77 -9
  63. package/dist/remediate/steps/dispatch/marshal.js.map +1 -1
  64. package/dist/remediate/steps/dispatch/worktreeLifecycle.d.ts +55 -16
  65. package/dist/remediate/steps/dispatch/worktreeLifecycle.d.ts.map +1 -1
  66. package/dist/remediate/steps/dispatch/worktreeLifecycle.js +119 -16
  67. package/dist/remediate/steps/dispatch/worktreeLifecycle.js.map +1 -1
  68. package/dist/remediate/steps/dispatch.d.ts +2 -2
  69. package/dist/remediate/steps/dispatch.d.ts.map +1 -1
  70. package/dist/remediate/steps/dispatch.js +2 -2
  71. package/dist/remediate/steps/dispatch.js.map +1 -1
  72. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  73. package/dist/remediate/steps/nextStep.js +12 -1
  74. package/dist/remediate/steps/nextStep.js.map +1 -1
  75. package/dist/remediate/validation/artifacts.d.ts.map +1 -1
  76. package/dist/remediate/validation/artifacts.js +38 -1
  77. package/dist/remediate/validation/artifacts.js.map +1 -1
  78. package/dist/remediate/validation/contractPipeline.d.ts +1 -1
  79. package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
  80. package/dist/remediate/validation/contractPipeline.js +1 -1
  81. package/dist/remediate/validation/contractPipeline.js.map +1 -1
  82. package/dist/remediate/validation/contractPipelineGates.d.ts +15 -0
  83. package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
  84. package/dist/remediate/validation/contractPipelineGates.js +168 -2
  85. package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
  86. package/dist/shared/dispatch/admissionLoop.d.ts +12 -12
  87. package/dist/shared/dispatch/costRank.d.ts +17 -1
  88. package/dist/shared/dispatch/costRank.d.ts.map +1 -1
  89. package/dist/shared/dispatch/costRank.js +8 -4
  90. package/dist/shared/dispatch/costRank.js.map +1 -1
  91. package/dist/shared/friction/captureFrictionEvent.d.ts +13 -0
  92. package/dist/shared/friction/captureFrictionEvent.d.ts.map +1 -1
  93. package/dist/shared/friction/captureFrictionEvent.js.map +1 -1
  94. package/dist/shared/friction/frictionRecord.d.ts +55 -1
  95. package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
  96. package/dist/shared/friction/frictionRecord.js +40 -0
  97. package/dist/shared/friction/frictionRecord.js.map +1 -1
  98. package/dist/shared/friction/stepBoundaryCapture.d.ts +14 -0
  99. package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
  100. package/dist/shared/friction/stepBoundaryCapture.js +47 -0
  101. package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
  102. package/dist/shared/friction/triage.d.ts +94 -14
  103. package/dist/shared/friction/triage.d.ts.map +1 -1
  104. package/dist/shared/friction/triage.js +0 -0
  105. package/dist/shared/friction/triage.js.map +1 -1
  106. package/dist/shared/index.d.ts +1 -1
  107. package/dist/shared/index.d.ts.map +1 -1
  108. package/dist/shared/index.js +1 -1
  109. package/dist/shared/index.js.map +1 -1
  110. package/dist/shared/quota/capacity.d.ts +4 -4
  111. package/dist/shared/quota/modelStatics.d.ts +15 -7
  112. package/dist/shared/quota/modelStatics.d.ts.map +1 -1
  113. package/dist/shared/quota/modelStatics.js +60 -13
  114. package/dist/shared/quota/modelStatics.js.map +1 -1
  115. package/dist/shared/quota/quotaSource.d.ts +2 -2
  116. package/dist/shared/validation/designFindingGrounding.d.ts.map +1 -1
  117. package/dist/shared/validation/designFindingGrounding.js +9 -3
  118. package/dist/shared/validation/designFindingGrounding.js.map +1 -1
  119. package/dist/shared/validation/findingGrounding.d.ts +40 -0
  120. package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
  121. package/dist/shared/validation/findingGrounding.js +83 -0
  122. package/dist/shared/validation/findingGrounding.js.map +1 -1
  123. package/package.json +2 -2
@@ -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 { isHostDelegationExecutor } from "./executors.js";
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
- * True when the next step derived from `bundle` is a deterministic, runner-backed
196
- * regen step that the drain loop may resolve in-process — i.e. it has a runner in
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 nextStepIsDrainableRegen(bundle) {
204
- const decision = decideNextStep(bundle, { emitStaleness: false });
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. When `options.drain` is set, an autonomy
216
- * driver that owns the whole cascade can instead drain the dependency-ordered
217
- * regen frontier within ONE call: run the first bounded step, then keep running
218
- * consecutive deterministic runner-backed steps (re-deriving decideNextStep +
219
- * computeStaleArtifacts each iteration) until the next step is a host-delegation
220
- * boundary, a no-runner handoff, or the run is complete. A whole staleness cascade
221
- * (e.g. a schema-version migration that re-stales every downstream artifact) thus
222
- * resolves in a single call and emits a single consolidated staleness stderr
223
- * record at the boundary — instead of one host round-trip (and one record) per
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 OPT-IN (`options.drain`), because the CLI paths must NOT drain: the
227
- * `advance-audit` command runs exactly one executor per invocation, and the
228
- * `next-step` obligation fold drives its own single-step loop so it can halt at the
229
- * interactive/host-input pauses (provider confirmation, analyzer-install consent,
230
- * edge-reasoning, intent checkpoint) that live in the fold not in the executor
231
- * registry, so the drain's registry-level `isHostDelegationExecutor` gate cannot
232
- * see them. Draining there would silently skip an operator-interactive step.
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 even with `drain` set:
235
- * an explicit executor request is a targeted single action, never a drain trigger.
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
- if (!forced && options.drain === true) {
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,gBAAgB,CAAC;AAC1D,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,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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,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,KAAK,EAAE,e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raphEdge } 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,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AAI,QAAQ,KAAK,2BAA2B,EAAE,CAAC;QAC7C,IAAI,kCAAkC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QAC/E,IAAI,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;IAChF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAAsB,EACtB,SAAwC,EACxC,SAA+B,EAAE;IAEjC,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAG,QAAQ,CAAC,iBAAiB,CAAC;IAC5C,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QAAE,OAAO,KAAK,CAAC;IACvC,OAAO,CAAC,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC"}
@@ -61,14 +61,14 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
61
61
  lease_id: z.ZodString;
62
62
  cost: z.ZodNumber;
63
63
  }, "strict", z.ZodTypeAny, {
64
- packet_id: string;
65
64
  cost: number;
65
+ packet_id: string;
66
66
  pool_id: string;
67
67
  resource_key: string;
68
68
  lease_id: string;
69
69
  }, {
70
- packet_id: string;
71
70
  cost: number;
71
+ packet_id: string;
72
72
  pool_id: string;
73
73
  resource_key: string;
74
74
  lease_id: string;
@@ -84,18 +84,18 @@ 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
+ cost: number;
87
88
  admitted: boolean;
88
89
  packet_id: string;
89
- cost: number;
90
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
+ cost: number;
96
97
  admitted: boolean;
97
98
  packet_id: string;
98
- cost: number;
99
99
  pool_id: string | null;
100
100
  resource_key: string | null;
101
101
  headroom_before?: number | undefined;
@@ -103,8 +103,8 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
103
103
  }>, "many">;
104
104
  }, "strict", z.ZodTypeAny, {
105
105
  leases: {
106
- packet_id: string;
107
106
  cost: number;
107
+ packet_id: string;
108
108
  pool_id: string;
109
109
  resource_key: string;
110
110
  lease_id: string;
@@ -113,9 +113,9 @@ 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
+ cost: number;
116
117
  admitted: boolean;
117
118
  packet_id: string;
118
- cost: number;
119
119
  pool_id: string | null;
120
120
  resource_key: string | null;
121
121
  headroom_before?: number | undefined;
@@ -123,8 +123,8 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
123
123
  }[];
124
124
  }, {
125
125
  leases: {
126
- packet_id: string;
127
126
  cost: number;
127
+ packet_id: string;
128
128
  pool_id: string;
129
129
  resource_key: string;
130
130
  lease_id: string;
@@ -133,9 +133,9 @@ 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
+ cost: number;
136
137
  admitted: boolean;
137
138
  packet_id: string;
138
- cost: number;
139
139
  pool_id: string | null;
140
140
  resource_key: string | null;
141
141
  headroom_before?: number | undefined;
@@ -213,11 +213,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
213
213
  }>, "many">>;
214
214
  }, "strict", z.ZodTypeAny, {
215
215
  source: string;
216
+ captured_at: string;
216
217
  remaining_pct: number | null;
217
218
  reset_at: string | null;
218
219
  tokens_remaining: number | null;
219
220
  requests_remaining: number | null;
220
- captured_at: string;
221
221
  windows?: {
222
222
  label: string;
223
223
  remaining_pct: number | null;
@@ -226,11 +226,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
226
226
  }[] | undefined;
227
227
  }, {
228
228
  source: string;
229
+ captured_at: string;
229
230
  remaining_pct: number | null;
230
231
  reset_at: string | null;
231
232
  tokens_remaining: number | null;
232
233
  requests_remaining: number | null;
233
- captured_at: string;
234
234
  windows?: {
235
235
  label: string;
236
236
  remaining_pct: number | null;
@@ -266,11 +266,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
266
266
  in_flight_tokens?: number | undefined;
267
267
  quota_source_snapshot?: {
268
268
  source: string;
269
+ captured_at: string;
269
270
  remaining_pct: number | null;
270
271
  reset_at: string | null;
271
272
  tokens_remaining: number | null;
272
273
  requests_remaining: number | null;
273
- captured_at: string;
274
274
  windows?: {
275
275
  label: string;
276
276
  remaining_pct: number | null;
@@ -306,11 +306,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
306
306
  in_flight_tokens?: number | undefined;
307
307
  quota_source_snapshot?: {
308
308
  source: string;
309
+ captured_at: string;
309
310
  remaining_pct: number | null;
310
311
  reset_at: string | null;
311
312
  tokens_remaining: number | null;
312
313
  requests_remaining: number | null;
313
- captured_at: string;
314
314
  windows?: {
315
315
  label: string;
316
316
  remaining_pct: number | null;
@@ -365,11 +365,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
365
365
  }>, "many">>;
366
366
  }, "strict", z.ZodTypeAny, {
367
367
  source: string;
368
+ captured_at: string;
368
369
  remaining_pct: number | null;
369
370
  reset_at: string | null;
370
371
  tokens_remaining: number | null;
371
372
  requests_remaining: number | null;
372
- captured_at: string;
373
373
  windows?: {
374
374
  label: string;
375
375
  remaining_pct: number | null;
@@ -378,11 +378,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
378
378
  }[] | undefined;
379
379
  }, {
380
380
  source: string;
381
+ captured_at: string;
381
382
  remaining_pct: number | null;
382
383
  reset_at: string | null;
383
384
  tokens_remaining: number | null;
384
385
  requests_remaining: number | null;
385
- captured_at: string;
386
386
  windows?: {
387
387
  label: string;
388
388
  remaining_pct: number | null;
@@ -407,6 +407,7 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
407
407
  confidence: "high" | "low" | "medium";
408
408
  contract_version: "audit-code-dispatch-quota/v1alpha3";
409
409
  source: "default" | "explicit_config" | "discovered_capability" | "static_metadata" | "cli_flags" | "provider_default" | "learned";
410
+ run_id: string;
410
411
  cooldown_until: string | null;
411
412
  model: string | null;
412
413
  resolved_limits: {
@@ -421,11 +422,10 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
421
422
  active_subagents: number;
422
423
  description: string;
423
424
  } | null;
424
- run_id: string;
425
425
  admission: {
426
426
  leases: {
427
- packet_id: string;
428
427
  cost: number;
428
+ packet_id: string;
429
429
  pool_id: string;
430
430
  resource_key: string;
431
431
  lease_id: string;
@@ -434,9 +434,9 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
434
434
  declared_cap: number | null;
435
435
  explains: {
436
436
  reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
437
+ cost: number;
437
438
  admitted: boolean;
438
439
  packet_id: string;
439
- cost: number;
440
440
  pool_id: string | null;
441
441
  resource_key: string | null;
442
442
  headroom_before?: number | undefined;
@@ -446,11 +446,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
446
446
  binding_cap?: "none" | "learned" | "rpm" | "tpm" | "token_budget" | "cooldown" | "host_concurrency" | undefined;
447
447
  quota_source_snapshot?: {
448
448
  source: string;
449
+ captured_at: string;
449
450
  remaining_pct: number | null;
450
451
  reset_at: string | null;
451
452
  tokens_remaining: number | null;
452
453
  requests_remaining: number | null;
453
- captured_at: string;
454
454
  windows?: {
455
455
  label: string;
456
456
  remaining_pct: number | null;
@@ -484,11 +484,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
484
484
  in_flight_tokens?: number | undefined;
485
485
  quota_source_snapshot?: {
486
486
  source: string;
487
+ captured_at: string;
487
488
  remaining_pct: number | null;
488
489
  reset_at: string | null;
489
490
  tokens_remaining: number | null;
490
491
  requests_remaining: number | null;
491
- captured_at: string;
492
492
  windows?: {
493
493
  label: string;
494
494
  remaining_pct: number | null;
@@ -515,6 +515,7 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
515
515
  confidence: "high" | "low" | "medium";
516
516
  contract_version: "audit-code-dispatch-quota/v1alpha3";
517
517
  source: "default" | "explicit_config" | "discovered_capability" | "static_metadata" | "cli_flags" | "provider_default" | "learned";
518
+ run_id: string;
518
519
  cooldown_until: string | null;
519
520
  model: string | null;
520
521
  resolved_limits: {
@@ -529,11 +530,10 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
529
530
  active_subagents: number;
530
531
  description: string;
531
532
  } | null;
532
- run_id: string;
533
533
  admission: {
534
534
  leases: {
535
- packet_id: string;
536
535
  cost: number;
536
+ packet_id: string;
537
537
  pool_id: string;
538
538
  resource_key: string;
539
539
  lease_id: string;
@@ -542,9 +542,9 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
542
542
  declared_cap: number | null;
543
543
  explains: {
544
544
  reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
545
+ cost: number;
545
546
  admitted: boolean;
546
547
  packet_id: string;
547
- cost: number;
548
548
  pool_id: string | null;
549
549
  resource_key: string | null;
550
550
  headroom_before?: number | undefined;
@@ -554,11 +554,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
554
554
  binding_cap?: "none" | "learned" | "rpm" | "tpm" | "token_budget" | "cooldown" | "host_concurrency" | undefined;
555
555
  quota_source_snapshot?: {
556
556
  source: string;
557
+ captured_at: string;
557
558
  remaining_pct: number | null;
558
559
  reset_at: string | null;
559
560
  tokens_remaining: number | null;
560
561
  requests_remaining: number | null;
561
- captured_at: string;
562
562
  windows?: {
563
563
  label: string;
564
564
  remaining_pct: number | null;
@@ -592,11 +592,11 @@ export declare const DispatchQuotaSchema: z.ZodObject<{
592
592
  in_flight_tokens?: number | undefined;
593
593
  quota_source_snapshot?: {
594
594
  source: string;
595
+ captured_at: string;
595
596
  remaining_pct: number | null;
596
597
  reset_at: string | null;
597
598
  tokens_remaining: number | null;
598
599
  requests_remaining: number | null;
599
- captured_at: string;
600
600
  windows?: {
601
601
  label: string;
602
602
  remaining_pct: number | null;
@@ -950,6 +950,7 @@ export declare const AuditResultSchema: z.ZodObject<{
950
950
  }[];
951
951
  notes?: string[] | undefined;
952
952
  attempt?: number | undefined;
953
+ run_id?: string | undefined;
953
954
  verification?: {
954
955
  verified: boolean;
955
956
  needs_followup: boolean;
@@ -979,7 +980,6 @@ export declare const AuditResultSchema: z.ZodObject<{
979
980
  completion_reason?: string | undefined;
980
981
  }[] | undefined;
981
982
  } | undefined;
982
- run_id?: string | undefined;
983
983
  followup_tasks?: string[] | undefined;
984
984
  agent_role?: string | undefined;
985
985
  requires_followup?: boolean | undefined;
@@ -1048,6 +1048,7 @@ export declare const AuditResultSchema: z.ZodObject<{
1048
1048
  }[];
1049
1049
  notes?: string[] | undefined;
1050
1050
  attempt?: number | undefined;
1051
+ run_id?: string | undefined;
1051
1052
  verification?: {
1052
1053
  verified: boolean;
1053
1054
  needs_followup: boolean;
@@ -1077,7 +1078,6 @@ export declare const AuditResultSchema: z.ZodObject<{
1077
1078
  completion_reason?: string | undefined;
1078
1079
  }[] | undefined;
1079
1080
  } | undefined;
1080
- run_id?: string | undefined;
1081
1081
  followup_tasks?: string[] | undefined;
1082
1082
  agent_role?: string | undefined;
1083
1083
  requires_followup?: boolean | undefined;