audit-tools 0.32.68 → 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.d.ts.map +1 -1
- package/dist/audit/cli/dispatch.js +14 -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/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 +25 -24
- package/dist/remediate/steps/nextStep.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/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/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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { readValidatedRepoSessionIntent, resolveSessionConfig, ambientAuditorDescriptor, } from "audit-tools/shared";
|
|
3
|
+
/**
|
|
4
|
+
* The ONE place remediate turns a persisted `RepoSessionIntent` into an effective
|
|
5
|
+
* {@link SessionConfig} — so the descriptor choice cannot drift across call sites.
|
|
6
|
+
*
|
|
7
|
+
* It is ALWAYS the ambient descriptor: remediate has no host handshake (no `--auditor`
|
|
8
|
+
* flag), but it has an environment, so its dispatch pool resolves in-process from
|
|
9
|
+
* `declared ∩ ambient-verifiable`. Host-self-class fields (model/window/roster) stay
|
|
10
|
+
* absent → the host pool sizes to the conservative floor, which is a fidelity
|
|
11
|
+
* degradation, never a block.
|
|
12
|
+
*
|
|
13
|
+
* ⚠ Why this function exists rather than three call sites each choosing: passing `null`
|
|
14
|
+
* FAILS CLOSED to driver-self-only — no pool at all — and that is exactly what happened.
|
|
15
|
+
* Between v0.32.68 and the fix, all three remediate sites hardcoded `null`, so remediate
|
|
16
|
+
* could not dispatch to ANY non-self pool, where v0.32.68 read `sources[]` straight off
|
|
17
|
+
* disk. The mechanism was deliberate; the consequence went unnoticed for four laps.
|
|
18
|
+
* Routing every site through here makes the null choice UNREPRESENTABLE instead of a
|
|
19
|
+
* thing each site must remember — enforce in tooling, never "the next author notices".
|
|
20
|
+
* [[capability-is-per-auditor-not-per-audit]] [[enforce-robustness-in-tooling-not-host-discretion]]
|
|
21
|
+
*/
|
|
22
|
+
export async function loadRemediateSessionConfig(params) {
|
|
23
|
+
if (params.override)
|
|
24
|
+
return params.override;
|
|
25
|
+
const intent = params.artifactsFirst
|
|
26
|
+
? ((await readValidatedRepoSessionIntent(join(params.root, ".remediation-artifacts", "session-config.json"))) ?? (await readValidatedRepoSessionIntent(join(params.root, "session-config.json"))))
|
|
27
|
+
: await readValidatedRepoSessionIntent(join(params.root, "session-config.json"));
|
|
28
|
+
return intent
|
|
29
|
+
? resolveSessionConfig(intent, ambientAuditorDescriptor(), params.ambient)
|
|
30
|
+
: undefined;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=sessionConfigLoad.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionConfigLoad.js","sourceRoot":"","sources":["../../../src/remediate/steps/sessionConfigLoad.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,8BAA8B,EAC9B,oBAAoB,EACpB,wBAAwB,GAGzB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,MAwBhD;IACC,IAAI,MAAM,CAAC,QAAQ;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC;IAC5C,MAAM,MAAM,GAAG,MAAM,CAAC,cAAc;QAClC,CAAC,CAAC,CAAC,CAAC,MAAM,8BAA8B,CACpC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,qBAAqB,CAAC,CACnE,CAAC,IAAI,CAAC,MAAM,8BAA8B,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACzF,CAAC,CAAC,MAAM,8BAA8B,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACnF,OAAO,MAAM;QACX,CAAC,CAAC,oBAAoB,CAAC,MAAM,EAAE,wBAAwB,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC;QAC1E,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { AuditorDescriptor } from "../types/auditorDescriptor.js";
|
|
2
|
+
import { type RepoSessionIntent, type SessionConfig } from "../types/sessionConfig.js";
|
|
3
|
+
import { type AmbientSourceDeps } from "../providers/auditorSources.js";
|
|
4
|
+
/**
|
|
5
|
+
* The ambient probes the G2.5 source resolution reads. Production passes nothing —
|
|
6
|
+
* every probe defaults to the real environment (`process.env`, real PATH, real home
|
|
7
|
+
* dir), which is the point: the reach check must read the SAME env the provider reads
|
|
8
|
+
* at launch. Tests inject.
|
|
9
|
+
*/
|
|
10
|
+
export type ResolveSessionConfigOptions = AmbientSourceDeps;
|
|
11
|
+
/**
|
|
12
|
+
* Produce the in-memory EFFECTIVE {@link SessionConfig} every dispatch/provider
|
|
13
|
+
* consumer reads, from the persisted {@link RepoSessionIntent} (audit intent +
|
|
14
|
+
* policy, NO dispatch inventory) overlaid with the per-invocation
|
|
15
|
+
* {@link AuditorDescriptor} (the driver's identity + own launch transport +
|
|
16
|
+
* reachable `sources[]`). This is the single seam that replaces the retired
|
|
17
|
+
* `applyDispatchInventory`: the backend/launch set now comes from the per-auditor
|
|
18
|
+
* descriptor, never the repo session-config, and is never inherited across auditors
|
|
19
|
+
* ([[capability-is-per-auditor-not-per-audit]], `spec/unified-dispatch-worker-model.md`, G2).
|
|
20
|
+
*
|
|
21
|
+
* - `descriptor == null` → FAIL CLOSED to driver-self-only: the intent is returned
|
|
22
|
+
* with no resolved backends. The driver is definitionally reachable and
|
|
23
|
+
* self-launches; there is NO stored dispatch value to fall back to. This is the
|
|
24
|
+
* deliberate G2 behavior change from `applyDispatchInventory(cfg, null) ⇒ cfg`.
|
|
25
|
+
* Ambient resolution deliberately does NOT apply here — `null` means "resolve NO
|
|
26
|
+
* pool", which is a stronger statement than "no handshake happened".
|
|
27
|
+
*
|
|
28
|
+
* ⚠ A caller that HAS no handshake but DOES have an environment wants
|
|
29
|
+
* {@link ambientAuditorDescriptor}, NOT `null`. Passing `null` there is a silent
|
|
30
|
+
* capability loss: it short-circuits before {@link resolveAmbientSources}, so a
|
|
31
|
+
* declared + reachable lane never becomes a pool. Remediate did exactly that at all
|
|
32
|
+
* three of its dispatch sites and consequently could not dispatch to any non-self
|
|
33
|
+
* pool; it now routes through `loadRemediateSessionConfig`, which always supplies the
|
|
34
|
+
* ambient descriptor.
|
|
35
|
+
* - `descriptor` present → the driver's `self.provider` becomes the effective
|
|
36
|
+
* provider + conversation-host attribution key; its own host/IDE launch blocks
|
|
37
|
+
* (`claude_code` / `vscode_task` / `antigravity`) overlay; and `sources[]` becomes
|
|
38
|
+
* the effective dispatch pool. When the DRIVER itself is a dispatchable-source
|
|
39
|
+
* backend (headless single-lane), its flat per-backend block is reconstructed from
|
|
40
|
+
* the matching source so `createFreshSessionProvider` can build the primary
|
|
41
|
+
* provider — the pool machinery reads `effective.sources` directly (dedup by
|
|
42
|
+
* source id), so there is no double-count.
|
|
43
|
+
*
|
|
44
|
+
* **Where `sources[]` comes from (G2.5).** The cut is WHO LAUNCHES: `self` is what only
|
|
45
|
+
* the host can know (can-dispatch-subagents, can_proxy, roster, ceilings) and is
|
|
46
|
+
* irreducibly handshake-reported; `sources[]` are the six backends THIS PROCESS spawns
|
|
47
|
+
* (CLI subprocess or HTTP POST), so they are resolved in-process by
|
|
48
|
+
* `resolveAmbientSources` — `declared ∩ ambient-verifiable` over the operator's
|
|
49
|
+
* machine-level declaration — and never routed through the host. An explicit
|
|
50
|
+
* `descriptor.sources` still wins (the operator's escape hatch).
|
|
51
|
+
*
|
|
52
|
+
* Deliberate deviation from `spec/unified-dispatch-worker-model.md`'s G2.5 sketch (a
|
|
53
|
+
* pre-`next-step` shell-out printing `sources[]` for the host to merge): that merge is
|
|
54
|
+
* an LLM hand-composing JSON — the host-discretion anti-pattern the commit exists to
|
|
55
|
+
* kill, whose failure mode is a silently-empty pool indistinguishable from an
|
|
56
|
+
* unreachable machine. The spec's shell-out conflated POPULATE (expensive, network-
|
|
57
|
+
* bound, cacheable) with RESOLVE (local, cheap, must run at the moment of use).
|
|
58
|
+
* G2.5 builds RESOLVE; POPULATE lands later behind this same seam.
|
|
59
|
+
*
|
|
60
|
+
* Every INTENT field (synthesis / analyzers / graph / quota / block_quota /
|
|
61
|
+
* design_review / dispatch fan-out knobs / …) is preserved identically. Never mutates
|
|
62
|
+
* its inputs.
|
|
63
|
+
*
|
|
64
|
+
* NOT pure since G2.5: when a descriptor omits `sources`, this READS the ambient
|
|
65
|
+
* environment (the declaration file, env vars, PATH). That is deliberate and is the
|
|
66
|
+
* whole point — resolving anywhere else would let the reach check and the launch read
|
|
67
|
+
* different environments. It stays cheap (one small JSON read, and only on the
|
|
68
|
+
* descriptor-present path; `descriptor == null` short-circuits before it) and every
|
|
69
|
+
* probe is injectable via {@link ResolveSessionConfigOptions} for tests.
|
|
70
|
+
*/
|
|
71
|
+
export declare function resolveSessionConfig(intent: RepoSessionIntent, descriptor: AuditorDescriptor | null | undefined, options?: ResolveSessionConfigOptions): SessionConfig;
|
|
72
|
+
//# sourceMappingURL=resolveSessionConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveSessionConfig.d.ts","sourceRoot":"","sources":["../../../src/shared/config/resolveSessionConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EACnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,gCAAgC,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;AAM5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,EAChD,OAAO,CAAC,EAAE,2BAA2B,GACpC,aAAa,CAmCf"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { DISPATCHABLE_SOURCE_PROVIDERS, } from "../types/sessionConfig.js";
|
|
2
|
+
import { sourceProviderConfig } from "../quota/apiPool.js";
|
|
3
|
+
import { resolveAmbientSources, } from "../providers/auditorSources.js";
|
|
4
|
+
const DISPATCHABLE_PROVIDER_SET = new Set(DISPATCHABLE_SOURCE_PROVIDERS);
|
|
5
|
+
/**
|
|
6
|
+
* Produce the in-memory EFFECTIVE {@link SessionConfig} every dispatch/provider
|
|
7
|
+
* consumer reads, from the persisted {@link RepoSessionIntent} (audit intent +
|
|
8
|
+
* policy, NO dispatch inventory) overlaid with the per-invocation
|
|
9
|
+
* {@link AuditorDescriptor} (the driver's identity + own launch transport +
|
|
10
|
+
* reachable `sources[]`). This is the single seam that replaces the retired
|
|
11
|
+
* `applyDispatchInventory`: the backend/launch set now comes from the per-auditor
|
|
12
|
+
* descriptor, never the repo session-config, and is never inherited across auditors
|
|
13
|
+
* ([[capability-is-per-auditor-not-per-audit]], `spec/unified-dispatch-worker-model.md`, G2).
|
|
14
|
+
*
|
|
15
|
+
* - `descriptor == null` → FAIL CLOSED to driver-self-only: the intent is returned
|
|
16
|
+
* with no resolved backends. The driver is definitionally reachable and
|
|
17
|
+
* self-launches; there is NO stored dispatch value to fall back to. This is the
|
|
18
|
+
* deliberate G2 behavior change from `applyDispatchInventory(cfg, null) ⇒ cfg`.
|
|
19
|
+
* Ambient resolution deliberately does NOT apply here — `null` means "resolve NO
|
|
20
|
+
* pool", which is a stronger statement than "no handshake happened".
|
|
21
|
+
*
|
|
22
|
+
* ⚠ A caller that HAS no handshake but DOES have an environment wants
|
|
23
|
+
* {@link ambientAuditorDescriptor}, NOT `null`. Passing `null` there is a silent
|
|
24
|
+
* capability loss: it short-circuits before {@link resolveAmbientSources}, so a
|
|
25
|
+
* declared + reachable lane never becomes a pool. Remediate did exactly that at all
|
|
26
|
+
* three of its dispatch sites and consequently could not dispatch to any non-self
|
|
27
|
+
* pool; it now routes through `loadRemediateSessionConfig`, which always supplies the
|
|
28
|
+
* ambient descriptor.
|
|
29
|
+
* - `descriptor` present → the driver's `self.provider` becomes the effective
|
|
30
|
+
* provider + conversation-host attribution key; its own host/IDE launch blocks
|
|
31
|
+
* (`claude_code` / `vscode_task` / `antigravity`) overlay; and `sources[]` becomes
|
|
32
|
+
* the effective dispatch pool. When the DRIVER itself is a dispatchable-source
|
|
33
|
+
* backend (headless single-lane), its flat per-backend block is reconstructed from
|
|
34
|
+
* the matching source so `createFreshSessionProvider` can build the primary
|
|
35
|
+
* provider — the pool machinery reads `effective.sources` directly (dedup by
|
|
36
|
+
* source id), so there is no double-count.
|
|
37
|
+
*
|
|
38
|
+
* **Where `sources[]` comes from (G2.5).** The cut is WHO LAUNCHES: `self` is what only
|
|
39
|
+
* the host can know (can-dispatch-subagents, can_proxy, roster, ceilings) and is
|
|
40
|
+
* irreducibly handshake-reported; `sources[]` are the six backends THIS PROCESS spawns
|
|
41
|
+
* (CLI subprocess or HTTP POST), so they are resolved in-process by
|
|
42
|
+
* `resolveAmbientSources` — `declared ∩ ambient-verifiable` over the operator's
|
|
43
|
+
* machine-level declaration — and never routed through the host. An explicit
|
|
44
|
+
* `descriptor.sources` still wins (the operator's escape hatch).
|
|
45
|
+
*
|
|
46
|
+
* Deliberate deviation from `spec/unified-dispatch-worker-model.md`'s G2.5 sketch (a
|
|
47
|
+
* pre-`next-step` shell-out printing `sources[]` for the host to merge): that merge is
|
|
48
|
+
* an LLM hand-composing JSON — the host-discretion anti-pattern the commit exists to
|
|
49
|
+
* kill, whose failure mode is a silently-empty pool indistinguishable from an
|
|
50
|
+
* unreachable machine. The spec's shell-out conflated POPULATE (expensive, network-
|
|
51
|
+
* bound, cacheable) with RESOLVE (local, cheap, must run at the moment of use).
|
|
52
|
+
* G2.5 builds RESOLVE; POPULATE lands later behind this same seam.
|
|
53
|
+
*
|
|
54
|
+
* Every INTENT field (synthesis / analyzers / graph / quota / block_quota /
|
|
55
|
+
* design_review / dispatch fan-out knobs / …) is preserved identically. Never mutates
|
|
56
|
+
* its inputs.
|
|
57
|
+
*
|
|
58
|
+
* NOT pure since G2.5: when a descriptor omits `sources`, this READS the ambient
|
|
59
|
+
* environment (the declaration file, env vars, PATH). That is deliberate and is the
|
|
60
|
+
* whole point — resolving anywhere else would let the reach check and the launch read
|
|
61
|
+
* different environments. It stays cheap (one small JSON read, and only on the
|
|
62
|
+
* descriptor-present path; `descriptor == null` short-circuits before it) and every
|
|
63
|
+
* probe is injectable via {@link ResolveSessionConfigOptions} for tests.
|
|
64
|
+
*/
|
|
65
|
+
export function resolveSessionConfig(intent, descriptor, options) {
|
|
66
|
+
// The intent carries NO dispatch-inventory fields and no `dispatch.rolling_engine`
|
|
67
|
+
// (RepoDispatchConfig), so the base effective config is the intent verbatim; its
|
|
68
|
+
// narrower `dispatch` is structurally assignable to DispatchConfig.
|
|
69
|
+
const effective = { ...intent };
|
|
70
|
+
if (descriptor == null) {
|
|
71
|
+
return effective;
|
|
72
|
+
}
|
|
73
|
+
const self = descriptor.self ?? {};
|
|
74
|
+
if (self.provider !== undefined) {
|
|
75
|
+
effective.provider = self.provider;
|
|
76
|
+
effective.host_provider = self.provider;
|
|
77
|
+
}
|
|
78
|
+
if (self.claude_code !== undefined)
|
|
79
|
+
effective.claude_code = self.claude_code;
|
|
80
|
+
if (self.vscode_task !== undefined)
|
|
81
|
+
effective.vscode_task = self.vscode_task;
|
|
82
|
+
if (self.antigravity !== undefined)
|
|
83
|
+
effective.antigravity = self.antigravity;
|
|
84
|
+
if (self.parallel_workers !== undefined) {
|
|
85
|
+
effective.parallel_workers = self.parallel_workers;
|
|
86
|
+
}
|
|
87
|
+
// `declared ∩ ambient-verifiable`, resolved IN-PROCESS (G2.5). An explicit
|
|
88
|
+
// hand-authored `--auditor sources[]` still wins — it is the operator's escape
|
|
89
|
+
// hatch and the only way to force a lane this process cannot prove.
|
|
90
|
+
const sources = descriptor.sources ?? resolveAmbientSources(options).sources;
|
|
91
|
+
if (sources.length > 0) {
|
|
92
|
+
effective.sources = sources;
|
|
93
|
+
if (self.provider && DISPATCHABLE_PROVIDER_SET.has(self.provider)) {
|
|
94
|
+
// The FIRST source matching the driver's provider supplies its flat block. With
|
|
95
|
+
// multiple same-provider sources (e.g. two NIM endpoints), the operator orders
|
|
96
|
+
// `sources[]` so the driver's own endpoint is first; the non-primary ones still
|
|
97
|
+
// become their own pools via `effective.sources`.
|
|
98
|
+
const primary = sources.find((s) => s.provider === self.provider);
|
|
99
|
+
if (primary)
|
|
100
|
+
Object.assign(effective, sourceProviderConfig(primary));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return effective;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=resolveSessionConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveSessionConfig.js","sourceRoot":"","sources":["../../../src/shared/config/resolveSessionConfig.ts"],"names":[],"mappings":"AACA,OAAO,EACL,6BAA6B,GAG9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAEL,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AAUxC,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAC5D,6BAA6B,CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAyB,EACzB,UAAgD,EAChD,OAAqC;IAErC,mFAAmF;IACnF,iFAAiF;IACjF,oEAAoE;IACpE,MAAM,SAAS,GAAkB,EAAE,GAAG,MAAM,EAAE,CAAC;IAC/C,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,IAAI,EAAE,CAAC;IACnC,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QAChC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QACnC,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC1C,CAAC;IACD,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS;QAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IAC7E,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS;QAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IAC7E,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS;QAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IAC7E,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACxC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;IACrD,CAAC;IACD,2EAA2E;IAC3E,+EAA+E;IAC/E,oEAAoE;IACpE,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;IAC7E,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;QAC5B,IAAI,IAAI,CAAC,QAAQ,IAAI,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAClE,gFAAgF;YAChF,+EAA+E;YAC/E,gFAAgF;YAChF,kDAAkD;YAClD,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC;YAClE,IAAI,OAAO;gBAAE,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -100,15 +100,15 @@ export declare const AdmissionGrantSchema: z.ZodObject<{
|
|
|
100
100
|
lease_id: z.ZodString;
|
|
101
101
|
cost: z.ZodNumber;
|
|
102
102
|
}, "strict", z.ZodTypeAny, {
|
|
103
|
+
pool_id: string;
|
|
103
104
|
cost: number;
|
|
104
105
|
packet_id: string;
|
|
105
|
-
pool_id: string;
|
|
106
106
|
resource_key: string;
|
|
107
107
|
lease_id: string;
|
|
108
108
|
}, {
|
|
109
|
+
pool_id: string;
|
|
109
110
|
cost: number;
|
|
110
111
|
packet_id: string;
|
|
111
|
-
pool_id: string;
|
|
112
112
|
resource_key: string;
|
|
113
113
|
lease_id: string;
|
|
114
114
|
}>;
|
|
@@ -126,19 +126,19 @@ export declare const AdmissionExplainSchema: z.ZodObject<{
|
|
|
126
126
|
cost: z.ZodNumber;
|
|
127
127
|
}, "strict", z.ZodTypeAny, {
|
|
128
128
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
129
|
+
pool_id: string | null;
|
|
129
130
|
cost: number;
|
|
130
131
|
admitted: boolean;
|
|
131
132
|
packet_id: string;
|
|
132
|
-
pool_id: string | null;
|
|
133
133
|
resource_key: string | null;
|
|
134
134
|
headroom_before?: number | undefined;
|
|
135
135
|
outstanding_before?: number | undefined;
|
|
136
136
|
}, {
|
|
137
137
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
138
|
+
pool_id: string | null;
|
|
138
139
|
cost: number;
|
|
139
140
|
admitted: boolean;
|
|
140
141
|
packet_id: string;
|
|
141
|
-
pool_id: string | null;
|
|
142
142
|
resource_key: string | null;
|
|
143
143
|
headroom_before?: number | undefined;
|
|
144
144
|
outstanding_before?: number | undefined;
|
|
@@ -162,15 +162,15 @@ export declare const DispatchAdmissionSchema: z.ZodObject<{
|
|
|
162
162
|
lease_id: z.ZodString;
|
|
163
163
|
cost: z.ZodNumber;
|
|
164
164
|
}, "strict", z.ZodTypeAny, {
|
|
165
|
+
pool_id: string;
|
|
165
166
|
cost: number;
|
|
166
167
|
packet_id: string;
|
|
167
|
-
pool_id: string;
|
|
168
168
|
resource_key: string;
|
|
169
169
|
lease_id: string;
|
|
170
170
|
}, {
|
|
171
|
+
pool_id: string;
|
|
171
172
|
cost: number;
|
|
172
173
|
packet_id: string;
|
|
173
|
-
pool_id: string;
|
|
174
174
|
resource_key: string;
|
|
175
175
|
lease_id: string;
|
|
176
176
|
}>, "many">;
|
|
@@ -187,28 +187,28 @@ export declare const DispatchAdmissionSchema: z.ZodObject<{
|
|
|
187
187
|
cost: z.ZodNumber;
|
|
188
188
|
}, "strict", z.ZodTypeAny, {
|
|
189
189
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
190
|
+
pool_id: string | null;
|
|
190
191
|
cost: number;
|
|
191
192
|
admitted: boolean;
|
|
192
193
|
packet_id: string;
|
|
193
|
-
pool_id: string | null;
|
|
194
194
|
resource_key: string | null;
|
|
195
195
|
headroom_before?: number | undefined;
|
|
196
196
|
outstanding_before?: number | undefined;
|
|
197
197
|
}, {
|
|
198
198
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
199
|
+
pool_id: string | null;
|
|
199
200
|
cost: number;
|
|
200
201
|
admitted: boolean;
|
|
201
202
|
packet_id: string;
|
|
202
|
-
pool_id: string | null;
|
|
203
203
|
resource_key: string | null;
|
|
204
204
|
headroom_before?: number | undefined;
|
|
205
205
|
outstanding_before?: number | undefined;
|
|
206
206
|
}>, "many">;
|
|
207
207
|
}, "strict", z.ZodTypeAny, {
|
|
208
208
|
leases: {
|
|
209
|
+
pool_id: string;
|
|
209
210
|
cost: number;
|
|
210
211
|
packet_id: string;
|
|
211
|
-
pool_id: string;
|
|
212
212
|
resource_key: string;
|
|
213
213
|
lease_id: string;
|
|
214
214
|
}[];
|
|
@@ -216,19 +216,19 @@ export declare const DispatchAdmissionSchema: z.ZodObject<{
|
|
|
216
216
|
declared_cap: number | null;
|
|
217
217
|
explains: {
|
|
218
218
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
219
|
+
pool_id: string | null;
|
|
219
220
|
cost: number;
|
|
220
221
|
admitted: boolean;
|
|
221
222
|
packet_id: string;
|
|
222
|
-
pool_id: string | null;
|
|
223
223
|
resource_key: string | null;
|
|
224
224
|
headroom_before?: number | undefined;
|
|
225
225
|
outstanding_before?: number | undefined;
|
|
226
226
|
}[];
|
|
227
227
|
}, {
|
|
228
228
|
leases: {
|
|
229
|
+
pool_id: string;
|
|
229
230
|
cost: number;
|
|
230
231
|
packet_id: string;
|
|
231
|
-
pool_id: string;
|
|
232
232
|
resource_key: string;
|
|
233
233
|
lease_id: string;
|
|
234
234
|
}[];
|
|
@@ -236,10 +236,10 @@ export declare const DispatchAdmissionSchema: z.ZodObject<{
|
|
|
236
236
|
declared_cap: number | null;
|
|
237
237
|
explains: {
|
|
238
238
|
reason: "admitted" | "no_capable_pool" | "budget_exhausted" | "cap_reached";
|
|
239
|
+
pool_id: string | null;
|
|
239
240
|
cost: number;
|
|
240
241
|
admitted: boolean;
|
|
241
242
|
packet_id: string;
|
|
242
|
-
pool_id: string | null;
|
|
243
243
|
resource_key: string | null;
|
|
244
244
|
headroom_before?: number | undefined;
|
|
245
245
|
outstanding_before?: number | undefined;
|
|
@@ -68,7 +68,7 @@ import type { FrictionCategory } from "./frictionRecord.js";
|
|
|
68
68
|
* classify it and improve the pattern set
|
|
69
69
|
* (discriminator: the pool id).
|
|
70
70
|
*/
|
|
71
|
-
export type StepBoundaryEventType = "phase_reemit" | "artifact_rejected" | "repair_round" | "post_repair_rederive" | "no_change_merge" | "intent_gate_fallback" | "quota_escalation" | "coverage_total_lines_mismatch" | "node_quarantine" | "declared_cost_drift" | "credit_exhausted" | "quota_unclassified" | (string & {});
|
|
71
|
+
export type StepBoundaryEventType = "phase_reemit" | "artifact_rejected" | "repair_round" | "post_repair_rederive" | "no_change_merge" | "intent_gate_fallback" | "quota_escalation" | "coverage_total_lines_mismatch" | "node_quarantine" | "declared_cost_drift" | "credit_exhausted" | "quota_unclassified" | "newly_reachable_backend" | (string & {});
|
|
72
72
|
/**
|
|
73
73
|
* The REAL close-out friction category for a step-boundary fact kind. Total: an
|
|
74
74
|
* unknown event type degrades to `inefficient_feeding` so the mapping is never
|
|
@@ -131,6 +131,27 @@ export interface CostDriftInfo {
|
|
|
131
131
|
* replaces — never awaited by the caller.
|
|
132
132
|
*/
|
|
133
133
|
export declare function captureCostDriftFriction(artifactsDir: string, runId: string, info: CostDriftInfo, source: FrictionCaptureArtifact["tool"]): void;
|
|
134
|
+
/**
|
|
135
|
+
* Route an autonomous fail-closed exclusion of a newly-reachable backend (the G3
|
|
136
|
+
* reconciliation gate: this auditor can reach a backend the operator's Gate-0
|
|
137
|
+
* decision never mentions, and no human is present to confirm it) through the
|
|
138
|
+
* step-boundary chokepoint as a `newly_reachable_backend` fact.
|
|
139
|
+
*
|
|
140
|
+
* This is what keeps the autonomous branch LOUD rather than silent. The gate's
|
|
141
|
+
* whole point is that the operator confirms model choices; when autonomy rules a
|
|
142
|
+
* backend out on their behalf, they must be able to find out and re-include it at
|
|
143
|
+
* the next attended gate. One fact per backend, discriminated by its gate key, so
|
|
144
|
+
* re-derives never double-count and each backend is individually triageable.
|
|
145
|
+
*
|
|
146
|
+
* AWAITED, unlike the other reactive captures — deliberately. They fire mid-dispatch,
|
|
147
|
+
* with a long-running engine still alive to flush them; this one fires at Gate-0, and
|
|
148
|
+
* the CLI can emit its step and exit immediately after. A dropped write here would
|
|
149
|
+
* mean the exclusion happened SILENTLY — precisely the failure the gate exists to
|
|
150
|
+
* prevent — so the caller waits for it. Awaiting is safe: `captureFrictionEvent`
|
|
151
|
+
* swallows every failure internally, so this can never break the in-flight obligation
|
|
152
|
+
* (INV-O1-5), which is the property the fire-and-forget style was protecting.
|
|
153
|
+
*/
|
|
154
|
+
export declare function captureNewlyReachableBackendFriction(artifactsDir: string, runId: string, backendKeys: readonly string[], source: FrictionCaptureArtifact["tool"]): Promise<void>;
|
|
134
155
|
/** Credit-exhaustion facts routed through {@link captureCreditExhaustionFriction}. */
|
|
135
156
|
export interface CreditExhaustionInfo {
|
|
136
157
|
poolId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepBoundaryCapture.d.ts","sourceRoot":"","sources":["../../../src/shared/friction/stepBoundaryCapture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAExE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,MAAM,qBAAqB,GAC7B,cAAc,GACd,mBAAmB,GACnB,cAAc,GACd,sBAAsB,GACtB,iBAAiB,GACjB,sBAAsB,GACtB,kBAAkB,GAClB,+BAA+B,GAC/B,iBAAiB,GACjB,qBAAqB,GACrB,kBAAkB,GAClB,oBAAoB,GACpB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"stepBoundaryCapture.d.ts","sourceRoot":"","sources":["../../../src/shared/friction/stepBoundaryCapture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAExE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,MAAM,qBAAqB,GAC7B,cAAc,GACd,mBAAmB,GACnB,cAAc,GACd,sBAAsB,GACtB,iBAAiB,GACjB,sBAAsB,GACtB,kBAAkB,GAClB,+BAA+B,GAC/B,iBAAiB,GACjB,qBAAqB,GACrB,kBAAkB,GAClB,oBAAoB,GACpB,yBAAyB,GACzB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AA+ClB;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,qBAAqB,GAC/B,gBAAgB,CAElB;AAgBD;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Bf;AAED,sFAAsF;AACtF,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAC7C,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,oBAAoB,EAC1B,MAAM,EAAE,uBAAuB,CAAC,MAAM,CAAC,GACtC,IAAI,CAiBN;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA0C9D;AAED,gGAAgG;AAChG,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gCAAgC,CAC9C,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,qBAAqB,EAC3B,MAAM,EAAE,uBAAuB,CAAC,MAAM,CAAC,GACtC,IAAI,CAkBN"}
|
|
@@ -38,6 +38,10 @@ const STEP_BOUNDARY_CATEGORY = {
|
|
|
38
38
|
// classify it, so the operator must review the verbatim text and (if it's a
|
|
39
39
|
// real quota/billing death) teach the tool a new precise pattern.
|
|
40
40
|
quota_unclassified: "tool_should_decide",
|
|
41
|
+
// An autonomous run reached a backend the operator never confirmed and, with no
|
|
42
|
+
// human to ask, fail-closed-excluded it. Same "operator must reconcile" shape as
|
|
43
|
+
// a cost drift: only they can say whether that backend should route.
|
|
44
|
+
newly_reachable_backend: "tool_should_decide",
|
|
41
45
|
};
|
|
42
46
|
/**
|
|
43
47
|
* The REAL close-out friction category for a step-boundary fact kind. Total: an
|
|
@@ -117,6 +121,42 @@ export function captureCostDriftFriction(artifactsDir, runId, info, source) {
|
|
|
117
121
|
area: "dispatch/cost",
|
|
118
122
|
}, source);
|
|
119
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Route an autonomous fail-closed exclusion of a newly-reachable backend (the G3
|
|
126
|
+
* reconciliation gate: this auditor can reach a backend the operator's Gate-0
|
|
127
|
+
* decision never mentions, and no human is present to confirm it) through the
|
|
128
|
+
* step-boundary chokepoint as a `newly_reachable_backend` fact.
|
|
129
|
+
*
|
|
130
|
+
* This is what keeps the autonomous branch LOUD rather than silent. The gate's
|
|
131
|
+
* whole point is that the operator confirms model choices; when autonomy rules a
|
|
132
|
+
* backend out on their behalf, they must be able to find out and re-include it at
|
|
133
|
+
* the next attended gate. One fact per backend, discriminated by its gate key, so
|
|
134
|
+
* re-derives never double-count and each backend is individually triageable.
|
|
135
|
+
*
|
|
136
|
+
* AWAITED, unlike the other reactive captures — deliberately. They fire mid-dispatch,
|
|
137
|
+
* with a long-running engine still alive to flush them; this one fires at Gate-0, and
|
|
138
|
+
* the CLI can emit its step and exit immediately after. A dropped write here would
|
|
139
|
+
* mean the exclusion happened SILENTLY — precisely the failure the gate exists to
|
|
140
|
+
* prevent — so the caller waits for it. Awaiting is safe: `captureFrictionEvent`
|
|
141
|
+
* swallows every failure internally, so this can never break the in-flight obligation
|
|
142
|
+
* (INV-O1-5), which is the property the fire-and-forget style was protecting.
|
|
143
|
+
*/
|
|
144
|
+
export async function captureNewlyReachableBackendFriction(artifactsDir, runId, backendKeys, source) {
|
|
145
|
+
// Sequential, not Promise.all: the capture merges the whole record under a file
|
|
146
|
+
// lock, so concurrent appends would contend on the same lock for no gain.
|
|
147
|
+
for (const key of backendKeys) {
|
|
148
|
+
await captureStepBoundaryFriction(artifactsDir, runId, {
|
|
149
|
+
eventType: "newly_reachable_backend",
|
|
150
|
+
discriminator: key,
|
|
151
|
+
note: `backend "${key}" is reachable but absent from the operator's confirmed ` +
|
|
152
|
+
`route decision; this run is autonomous, so it was fail-closed-excluded ` +
|
|
153
|
+
`rather than dispatched unconfirmed. Confirm or exclude it at the next ` +
|
|
154
|
+
`attended provider-confirmation gate.`,
|
|
155
|
+
severity: "medium",
|
|
156
|
+
area: "dispatch/provider-confirmation",
|
|
157
|
+
}, source);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
120
160
|
/**
|
|
121
161
|
* Route a credit-exhaustion exclusion (a dispatch pool reported a non-
|
|
122
162
|
* resettable out-of-prepaid-usage-credits condition — distinct from a rate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepBoundaryCapture.js","sourceRoot":"","sources":["../../../src/shared/friction/stepBoundaryCapture.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAsB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"stepBoundaryCapture.js","sourceRoot":"","sources":["../../../src/shared/friction/stepBoundaryCapture.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAsB,MAAM,2BAA2B,CAAC;AAuFrF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,sBAAsB,GAAqC;IAC/D,YAAY,EAAE,qBAAqB;IACnC,YAAY,EAAE,qBAAqB;IACnC,oBAAoB,EAAE,qBAAqB;IAC3C,eAAe,EAAE,qBAAqB;IACtC,gBAAgB,EAAE,qBAAqB;IACvC,6BAA6B,EAAE,qBAAqB;IACpD,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,oBAAoB;IAC1C,eAAe,EAAE,oBAAoB;IACrC,iFAAiF;IACjF,+EAA+E;IAC/E,mBAAmB,EAAE,oBAAoB;IACzC,8EAA8E;IAC9E,+EAA+E;IAC/E,gBAAgB,EAAE,oBAAoB;IACtC,yEAAyE;IACzE,wEAAwE;IACxE,4EAA4E;IAC5E,kEAAkE;IAClE,kBAAkB,EAAE,oBAAoB;IACxC,gFAAgF;IAChF,iFAAiF;IACjF,qEAAqE;IACrE,uBAAuB,EAAE,oBAAoB;CAC9C,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAC1C,SAAgC;IAEhC,OA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tD,OAAO,CAAC,kCAAkC,EAAE,YAAY,CAAC;SACzD,OAAO,CAAC,uBAAuB,EAAE,YAAY,CAAC;SAC9C,OAAO,CAAC,2BAA2B,EAAE,YAAY,CAAC;SAClD,OAAO,CACN,kJAAkJ,EAClJ,gBAAgB,CACjB;SACA,OAAO,CACN,iFAAiF,EACjF,cAAc,CACf,CAAC;AACN,CAAC;AAgBD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gCAAgC,CAC9C,YAAoB,EACpB,KAAa,EACb,IAA2B,EAC3B,MAAuC;IAEvC,MAAM,QAAQ,GAAG,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAC5E,KAAK,2BAA2B,CAC9B,YAAY,EACZ,KAAK,EACL;QACE,SAAS,EAAE,oBAAoB;QAC/B,aAAa,EAAE,IAAI,CAAC,MAAM;QAC1B,IAAI,EACF,SAAS,IAAI,CAAC,MAAM,+EAA+E;YACnG,mGAAmG;YACnG,oGAAoG;YACpG,gCAAgC,QAAQ,GAAG;QAC7C,QAAQ,EAAE,MAAM;QAChB,IAAI,EAAE,gBAAgB;KACvB,EACD,MAAM,CACP,CAAC;AACJ,CAAC"}
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -48,9 +48,13 @@ export type { RepoConventions } from "./tooling/repoConventions.js";
|
|
|
48
48
|
export { detectRepoConventions, formatRepoConventions, } from "./tooling/repoConventions.js";
|
|
49
49
|
export type { StepStatus, DispatchModelTier, DispatchModelHint, } from "./types/stepContract.js";
|
|
50
50
|
export { StepStatusSchema, DispatchModelTierSchema, } from "./types/stepContract.js";
|
|
51
|
-
export type { ProviderName, ResolvedProviderName, SessionUiMode, SubprocessTemplateConfig, ClaudeCodeConfig, CodexConfig, OpenCodeConfig, OpenAiCompatibleConfig, DispatchableSource, DispatchableSourceProvider, VSCodeTaskConfig, AntigravityConfig, AgyConfig, BlockQuotaConfig, QuotaModelLimits, QuotaConfig, ObservabilityConfig, SynthesisConfig, GraphConfig, DispatchRoutingTiers, DispatchConfig, DesignReviewConfig, AnalyzerSetting, SessionConfig, } from "./types/sessionConfig.js";
|
|
52
|
-
export { PROVIDER_NAMES, SESSION_UI_MODES, PROVIDER_SECTION_KEYS, DISPATCHABLE_SOURCE_PROVIDERS, ANALYZER_SETTINGS, AnalyzerSettingSchema, resolveHostDispatchCapability, resolveRollingEngineFlag, assertHostProviderName, } from "./types/sessionConfig.js";
|
|
51
|
+
export type { ProviderName, ResolvedProviderName, SessionUiMode, SubprocessTemplateConfig, ClaudeCodeConfig, CodexConfig, OpenCodeConfig, OpenAiCompatibleConfig, DispatchableSource, DispatchableSourceProvider, VSCodeTaskConfig, AntigravityConfig, AgyConfig, BlockQuotaConfig, QuotaModelLimits, QuotaConfig, ObservabilityConfig, SynthesisConfig, GraphConfig, DispatchRoutingTiers, DispatchConfig, DesignReviewConfig, AnalyzerSetting, SessionConfig, RepoSessionIntent, RepoDispatchConfig, DispatchInventoryField, } from "./types/sessionConfig.js";
|
|
52
|
+
export { PROVIDER_NAMES, SESSION_UI_MODES, PROVIDER_SECTION_KEYS, DISPATCHABLE_SOURCE_PROVIDERS, ANALYZER_SETTINGS, AnalyzerSettingSchema, resolveHostDispatchCapability, resolveAutonomousMode, resolveRollingEngineFlag, assertHostProviderName, DISPATCH_INVENTORY_FIELDS, } from "./types/sessionConfig.js";
|
|
53
|
+
export { resolveSessionConfig } from "./config/resolveSessionConfig.js";
|
|
54
|
+
export type { ResolveSessionConfigOptions } from "./config/resolveSessionConfig.js";
|
|
53
55
|
export { AUDITOR_REPORT_MARKER } from "./contracts.js";
|
|
56
|
+
export type { AuditorSelf, AuditorDescriptor } from "./types/auditorDescriptor.js";
|
|
57
|
+
export { ambientAuditorDescriptor } from "./types/auditorDescriptor.js";
|
|
54
58
|
export { OPENCODE_MANAGED_BROAD_VALUE, withoutOpenCodeWildcard, mergeOpenCodeAgentPermissionRule, mergeOpenCodeGlobalPermissionRule, migrateOpenCodeGlobalExternalDirectory, unionOpenCodeBashCeiling, composeOpenCodeBashCeiling, verifyOpenCodeBashCeiling, } from "./opencodePermissions.js";
|
|
55
59
|
export type { OpenCodeCeilingViolation } from "./opencodePermissions.js";
|
|
56
60
|
export type { ReflectionClarity, ReflectionSeverity, AgentReflection, ReflectionAggregate, } from "./agentReflections.js";
|
|
@@ -98,7 +102,7 @@ export { FRICTION_CAPTURE_SCHEMA_VERSION, FRICTION_CAPTURE_DIRNAME, frictionCapt
|
|
|
98
102
|
export type { FrictionEvent, CapturedFrictionItem, } from "./friction/captureFrictionEvent.js";
|
|
99
103
|
export { captureFrictionEvent } from "./friction/captureFrictionEvent.js";
|
|
100
104
|
export type { StepBoundaryEventType, StepBoundaryFriction, CostDriftInfo, CreditExhaustionInfo, QuotaUnclassifiedInfo, } from "./friction/stepBoundaryCapture.js";
|
|
101
|
-
export { captureStepBoundaryFriction, stepBoundaryEventId, captureCostDriftFriction, captureCreditExhaustionFriction, captureQuotaUnclassifiedFriction, } from "./friction/stepBoundaryCapture.js";
|
|
105
|
+
export { captureStepBoundaryFriction, stepBoundaryEventId, captureCostDriftFriction, captureCreditExhaustionFriction, captureQuotaUnclassifiedFriction, captureNewlyReachableBackendFriction, } from "./friction/stepBoundaryCapture.js";
|
|
102
106
|
export { emitBlindDispatchFrictionIfBlind } from "./friction/blindDispatchFriction.js";
|
|
103
107
|
export type { FrictionDisposition, FrictionDispositionRecord, TriageSubject, FrictionTriageDecision, FrictionOpenObservation, FrictionCategoryAttestation, FrictionCategory, TriagedFrictionArtifact, } from "./friction/triage.js";
|
|
104
108
|
export { FRICTION_DISPOSITIONS, FRICTION_NAMED_DIMENSIONS, FRICTION_CATEGORIES, FRICTION_CATEGORY_LABELS, isFrictionCategory, isFrictionDisposition, reflectionKey, frictionLockPath, collectTriageSubjects, decideFrictionTriage, buildFrictionTriageBlock, appendFrictionUnderLock, recordFrictionDisposition, } from "./friction/triage.js";
|
|
@@ -115,7 +119,7 @@ export { TOKEN_USAGE_LEDGER_FILENAME, tokenUsageRunDir, tokenUsageLedgerPath, ap
|
|
|
115
119
|
export type { ValidationSeverity, ValidationIssue } from "./validation/basic.js";
|
|
116
120
|
export { describeValue, isRecord, createValidationIssue, pushValidationIssue, prefixValidationIssues, formatValidationIssues, requireKeys, } from "./validation/basic.js";
|
|
117
121
|
export { AUDIT_FINDINGS_CONTRACT_VERSION, validateAuditFindingsReport, isValidAuditFindingsReport, } from "./validation/findingsReport.js";
|
|
118
|
-
export { validateSessionConfig,
|
|
122
|
+
export { validateSessionConfig, validateRepoSessionIntent, readValidatedRepoSessionIntent, isBareExecutableName, isDirectExecutablePath, isSupportedConfiguredCommand, } from "./validation/sessionConfig.js";
|
|
119
123
|
export type { SourceReader } from "./validation/findingGrounding.js";
|
|
120
124
|
export { normalizeForMatch, normalizeRepoPath, isBareBasename, resolveBasenameToTrackedPath, enumerateTrackedFilePaths, quoteMatches, verifyFindingGrounding, findingIsGrounded, findingNeedsVerificationBeforeFix, } from "./validation/findingGrounding.js";
|
|
121
125
|
export { groundDesignFinding, groundDesignFindings, } from "./validation/designFindingGrounding.js";
|
|
@@ -140,8 +144,8 @@ export { AgyProvider, AGY_PROVIDER_NAME, buildActiveAgySessionMessage, } from ".
|
|
|
140
144
|
export type { AgyProviderOptions } from "./providers/agyProvider.js";
|
|
141
145
|
export type { AutoProviderContext, FreshSessionProviderDeps, } from "./providers/providerFactory.js";
|
|
142
146
|
export { resolveFreshSessionProviderName, createFreshSessionProvider, hasConfiguredOpenAiCompatible, discoverOutputConstraintCapability, } from "./providers/providerFactory.js";
|
|
143
|
-
export type { CapabilityTier, DiscoveredProvider,
|
|
144
|
-
export { discoverProviders, queryProviderQuota,
|
|
147
|
+
export type { CapabilityTier, DiscoveredProvider, SourcePoolDisplayEntry, } from "./providers/providerConfirmation.js";
|
|
148
|
+
export { discoverProviders, queryProviderQuota, representativeModelId, annotateConfirmedPoolCost, annotateConfirmedPool, deriveSourcePoolDisplay, deriveSourcePoolDisplayFromSources, } from "./providers/providerConfirmation.js";
|
|
145
149
|
export { commandExists, isSelfSpawnBlocked, resolveConversationHostProvider, resolveHostProviderName, setCommandExistsForTesting, } from "./providers/providerPathGuard.js";
|
|
146
150
|
export type { LimitSource, LimitConfidence, HostConcurrencyLimitSource, HostConcurrencyLimit, ResolvedLimits, QuotaStateEntry, QuotaState, WaveBindingCap, WaveSchedule, QuotaBindingWindow, BackoffState, ObservedWaveOutcome, } from "./quota/types.js";
|
|
147
151
|
export { LimitSourceSchema, LimitConfidenceSchema, HostConcurrencyLimitSourceSchema, HostConcurrencyLimitSchema, ResolvedLimitsSchema, WaveBindingCapSchema, BackoffStateSchema, } from "./quota/types.js";
|
|
@@ -182,6 +186,8 @@ export { computeDispatchCapacity, summarizeDispatchCapacityPools, detectLivelock
|
|
|
182
186
|
export type { CapacityPool, PoolDispatchAllocation, DispatchCapacityPoolSummary, DispatchCapacity, ComputeDispatchCapacityInput, PartialCompletionReason, PartialCompletionTerminal, } from "./quota/capacity.js";
|
|
183
187
|
export { DispatchCapacityPoolSummarySchema } from "./quota/capacity.js";
|
|
184
188
|
export { buildSourcePools, buildSourcePool, sourceProviderConfig, dispatchableSourceId, collectDispatchableSources, gatherDispatchableSources, primaryInProcessSource, isDemotableInProcessProvider, shouldDemotePrimaryInProcess, withSourceConfig, sourceByPoolId, buildHostModelPool, buildHostModelPools, } from "./quota/apiPool.js";
|
|
189
|
+
export { buildHostPoolPreamble } from "./quota/hostPool.js";
|
|
190
|
+
export type { HostPoolPreamble } from "./quota/hostPool.js";
|
|
185
191
|
export type { CacheablePromptParts } from "./prompts.js";
|
|
186
192
|
export { buildCacheablePrompt, DISPATCH_PROMPT_HANDOFF_NOTE, renderHostScratchNote, } from "./prompts.js";
|
|
187
193
|
export type { HostAssetKind, RenderHostAssetOptions } from "./hostAssets.js";
|
|
@@ -244,8 +250,8 @@ export type { RollingDispatchEnginePacket, RollingDispatchEngineResult, RollingD
|
|
|
244
250
|
export { ROLLING_DISPATCH_ENGINE_VERSION } from "./types/rollingDispatch.js";
|
|
245
251
|
export type { ConfirmedPoolEntry, ProviderConfirmationResult, ProviderConfirmationInput, } from "./types/providerConfirmation.js";
|
|
246
252
|
export { PROVIDER_CONFIRMATION_RESULT_VERSION, PROVIDER_CONFIRMATION_INPUT_VERSION, } from "./types/providerConfirmation.js";
|
|
247
|
-
export type { SharedProviderConfirmation,
|
|
248
|
-
export { SHARED_PROVIDER_CONFIRMATION_VERSION, SHARED_PROVIDER_CONFIRMATION_FILENAME, sharedProviderConfirmationPath,
|
|
253
|
+
export type { SharedProviderConfirmation, RenderedProviderConfirmation, ConfirmedDispatchPolicy, DispatchExclusionPattern, DispatchExclusion, ExcludableBackend, NewlyReachableBackend } from "./providers/sharedProviderConfirmation.js";
|
|
254
|
+
export { SHARED_PROVIDER_CONFIRMATION_VERSION, SHARED_PROVIDER_CONFIRMATION_FILENAME, sharedProviderConfirmationPath, buildSharedProviderConfirmation, buildProviderConfirmationRender, writeSharedProviderConfirmation, readSharedProviderConfirmation, readConfirmedCostPositions, readConfirmedDispatchBias, readConfirmedDispatchPolicy, resolveDispatchExclusion, clampDispatchBias, computeNewlyReachableBackends, confirmedBackendKeys, PROVIDER_CONFIRMATION_INPUT_FILENAME, readProviderConfirmationInput, unlinkProviderConfirmationInput } from "./providers/sharedProviderConfirmation.js";
|
|
249
255
|
export type { EncodedClause, FreeFormIntentInterpretation, } from "./types/intentInterpretation.js";
|
|
250
256
|
export { FREE_FORM_INTENT_INTERPRETATION_VERSION } from "./types/intentInterpretation.js";
|
|
251
257
|
export type { ObligationState, Obligation, ObligationDef, ObligationOutcome, ObligationEngine, AdvanceResult, } from "./engine/obligationEngine.js";
|