audit-tools 0.32.67 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/cli/advanceAuditCommand.d.ts.map +1 -1
- package/dist/audit/cli/advanceAuditCommand.js +8 -3
- package/dist/audit/cli/advanceAuditCommand.js.map +1 -1
- package/dist/audit/cli/args.d.ts +9 -27
- package/dist/audit/cli/args.d.ts.map +1 -1
- package/dist/audit/cli/args.js +116 -50
- package/dist/audit/cli/args.js.map +1 -1
- package/dist/audit/cli/auditStep.d.ts +15 -1
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +2 -0
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.d.ts +2 -1
- package/dist/audit/cli/dispatch/quotaPool.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/quotaPool.js +43 -77
- package/dist/audit/cli/dispatch/quotaPool.js.map +1 -1
- package/dist/audit/cli/dispatch/types.d.ts +9 -0
- package/dist/audit/cli/dispatch/types.d.ts.map +1 -1
- package/dist/audit/cli/dispatch.d.ts.map +1 -1
- package/dist/audit/cli/dispatch.js +17 -6
- package/dist/audit/cli/dispatch.js.map +1 -1
- package/dist/audit/cli/hybridDispatch.d.ts +3 -1
- package/dist/audit/cli/hybridDispatch.d.ts.map +1 -1
- package/dist/audit/cli/hybridDispatch.js +1 -0
- package/dist/audit/cli/hybridDispatch.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts +0 -9
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +151 -92
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +11 -2
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +56 -8
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/prepareDispatchCommand.d.ts.map +1 -1
- package/dist/audit/cli/prepareDispatchCommand.js +15 -9
- package/dist/audit/cli/prepareDispatchCommand.js.map +1 -1
- package/dist/audit/cli/prompts.d.ts +12 -32
- package/dist/audit/cli/prompts.d.ts.map +1 -1
- package/dist/audit/cli/prompts.js +19 -33
- package/dist/audit/cli/prompts.js.map +1 -1
- package/dist/audit/cli/providerConfirmationStep.d.ts +13 -5
- package/dist/audit/cli/providerConfirmationStep.d.ts.map +1 -1
- package/dist/audit/cli/providerConfirmationStep.js +47 -8
- package/dist/audit/cli/providerConfirmationStep.js.map +1 -1
- package/dist/audit/cli/quotaCommand.d.ts.map +1 -1
- package/dist/audit/cli/quotaCommand.js +16 -10
- package/dist/audit/cli/quotaCommand.js.map +1 -1
- package/dist/audit/cli/rollingAuditDispatch.d.ts.map +1 -1
- package/dist/audit/cli/rollingAuditDispatch.js +8 -0
- package/dist/audit/cli/rollingAuditDispatch.js.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +11 -1
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +11 -15
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/validateCommand.d.ts.map +1 -1
- package/dist/audit/cli/validateCommand.js +3 -3
- package/dist/audit/cli/validateCommand.js.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +39 -7
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts +52 -1
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +9 -1
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/intakeExecutors.d.ts +27 -3
- package/dist/audit/orchestrator/intakeExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/intakeExecutors.js +119 -19
- package/dist/audit/orchestrator/intakeExecutors.js.map +1 -1
- package/dist/audit/orchestrator/nextStep.d.ts +7 -0
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +3 -0
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/providerConfirmation.d.ts.map +1 -1
- package/dist/audit/orchestrator/providerConfirmation.js +0 -2
- package/dist/audit/orchestrator/providerConfirmation.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts +17 -0
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +13 -1
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/quota/index.d.ts +128 -128
- package/dist/audit/supervisor/sessionConfig.d.ts +3 -11
- package/dist/audit/supervisor/sessionConfig.d.ts.map +1 -1
- package/dist/audit/supervisor/sessionConfig.js +3 -25
- package/dist/audit/supervisor/sessionConfig.js.map +1 -1
- package/dist/audit/types/analyzerCapability.d.ts +6 -6
- package/dist/audit/types/externalAnalyzer.d.ts +10 -10
- package/dist/remediate/phases/plan.d.ts.map +1 -1
- package/dist/remediate/phases/plan.js +5 -4
- package/dist/remediate/phases/plan.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +9 -3
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/marshal.js +5 -4
- package/dist/remediate/steps/dispatch/marshal.js.map +1 -1
- package/dist/remediate/steps/dispatch/waveScheduling.d.ts +4 -2
- package/dist/remediate/steps/dispatch/waveScheduling.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/waveScheduling.js +33 -85
- package/dist/remediate/steps/dispatch/waveScheduling.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +0 -10
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +33 -24
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/providerNodeDispatch.d.ts +8 -0
- package/dist/remediate/steps/providerNodeDispatch.d.ts.map +1 -1
- package/dist/remediate/steps/providerNodeDispatch.js +4 -0
- package/dist/remediate/steps/providerNodeDispatch.js.map +1 -1
- package/dist/remediate/steps/sessionConfigLoad.d.ts +46 -0
- package/dist/remediate/steps/sessionConfigLoad.d.ts.map +1 -0
- package/dist/remediate/steps/sessionConfigLoad.js +32 -0
- package/dist/remediate/steps/sessionConfigLoad.js.map +1 -0
- package/dist/shared/config/resolveSessionConfig.d.ts +72 -0
- package/dist/shared/config/resolveSessionConfig.d.ts.map +1 -0
- package/dist/shared/config/resolveSessionConfig.js +105 -0
- package/dist/shared/config/resolveSessionConfig.js.map +1 -0
- package/dist/shared/dispatch/admissionLoop.d.ts +12 -12
- package/dist/shared/friction/stepBoundaryCapture.d.ts +22 -1
- package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.js +40 -0
- package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
- package/dist/shared/index.d.ts +14 -8
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +11 -5
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/providers/auditorSources.d.ts +102 -0
- package/dist/shared/providers/auditorSources.d.ts.map +1 -0
- package/dist/shared/providers/auditorSources.js +226 -0
- package/dist/shared/providers/auditorSources.js.map +1 -0
- package/dist/shared/providers/openAiCompatibleProvider.d.ts +20 -5
- package/dist/shared/providers/openAiCompatibleProvider.d.ts.map +1 -1
- package/dist/shared/providers/openAiCompatibleProvider.js +123 -19
- package/dist/shared/providers/openAiCompatibleProvider.js.map +1 -1
- package/dist/shared/providers/providerConfirmation.d.ts +3 -20
- package/dist/shared/providers/providerConfirmation.d.ts.map +1 -1
- package/dist/shared/providers/providerConfirmation.js +3 -37
- package/dist/shared/providers/providerConfirmation.js.map +1 -1
- package/dist/shared/providers/providerFactory.d.ts +6 -0
- package/dist/shared/providers/providerFactory.d.ts.map +1 -1
- package/dist/shared/providers/providerFactory.js +6 -0
- package/dist/shared/providers/providerFactory.js.map +1 -1
- package/dist/shared/providers/sharedProviderConfirmation.d.ts +264 -75
- package/dist/shared/providers/sharedProviderConfirmation.d.ts.map +1 -1
- package/dist/shared/providers/sharedProviderConfirmation.js +534 -113
- package/dist/shared/providers/sharedProviderConfirmation.js.map +1 -1
- package/dist/shared/providers/types.d.ts +17 -0
- package/dist/shared/providers/types.d.ts.map +1 -1
- package/dist/shared/quota/apiPool.d.ts +34 -11
- package/dist/shared/quota/apiPool.d.ts.map +1 -1
- package/dist/shared/quota/apiPool.js +21 -23
- package/dist/shared/quota/apiPool.js.map +1 -1
- package/dist/shared/quota/capacity.d.ts +50 -50
- package/dist/shared/quota/hostPool.d.ts +107 -0
- package/dist/shared/quota/hostPool.d.ts.map +1 -0
- package/dist/shared/quota/hostPool.js +103 -0
- package/dist/shared/quota/hostPool.js.map +1 -0
- package/dist/shared/quota/quotaSource.d.ts +2 -2
- package/dist/shared/types/auditorDescriptor.d.ts +112 -0
- package/dist/shared/types/auditorDescriptor.d.ts.map +1 -0
- package/dist/shared/types/auditorDescriptor.js +28 -0
- package/dist/shared/types/auditorDescriptor.js.map +1 -0
- package/dist/shared/types/providerConfirmation.d.ts +64 -6
- package/dist/shared/types/providerConfirmation.d.ts.map +1 -1
- package/dist/shared/types/providerConfirmation.js +1 -1
- package/dist/shared/types/sessionConfig.d.ts +73 -65
- package/dist/shared/types/sessionConfig.d.ts.map +1 -1
- package/dist/shared/types/sessionConfig.js +48 -0
- package/dist/shared/types/sessionConfig.js.map +1 -1
- package/dist/shared/validation/sessionConfig.d.ts +26 -14
- package/dist/shared/validation/sessionConfig.d.ts.map +1 -1
- package/dist/shared/validation/sessionConfig.js +72 -70
- package/dist/shared/validation/sessionConfig.js.map +1 -1
- package/docs/audit-pkg/contracts.md +4 -4
- package/docs/audit-pkg/operator-guide.md +43 -24
- package/package.json +1 -1
- package/skills/audit-code/SKILL.md +17 -14
- package/skills/audit-code/audit-code.prompt.md +17 -16
- package/wrapper/audit-code-wrapper-install-hosts.mjs +6 -10
- package/wrapper/remediate-code-wrapper-install-hosts.mjs +4 -8
- package/dist/shared/quota/repairProxyRegistry.d.ts +0 -84
- package/dist/shared/quota/repairProxyRegistry.d.ts.map +0 -1
- package/dist/shared/quota/repairProxyRegistry.js +0 -144
- package/dist/shared/quota/repairProxyRegistry.js.map +0 -1
|
@@ -65,44 +65,47 @@ exactly one next step. This is also the **capability handshake**: report what yo
|
|
|
65
65
|
can dispatch to *right now* on every `next-step` call so the backend sizes review
|
|
66
66
|
packets to your real model instead of a conservative 32k floor.
|
|
67
67
|
|
|
68
|
+
The whole handshake is a single `--auditor <json>` flag: one object with a `self`
|
|
69
|
+
field describing the model you drive.
|
|
70
|
+
|
|
68
71
|
```bash
|
|
69
|
-
audit-code next-step --
|
|
72
|
+
audit-code next-step --auditor '{"self":{"can_dispatch_subagents":true,"roster":[{"rank":"small","context_tokens":32000,"output_tokens":8000},{"rank":"standard","context_tokens":200000,"output_tokens":32000},{"rank":"deep","context_tokens":200000,"output_tokens":64000}]}}'
|
|
70
73
|
```
|
|
71
74
|
|
|
72
75
|
Or with a single dispatch model:
|
|
73
76
|
|
|
74
77
|
```bash
|
|
75
|
-
audit-code next-step --
|
|
78
|
+
audit-code next-step --auditor '{"self":{"can_dispatch_subagents":true,"context_tokens":200000,"output_tokens":32000}}'
|
|
76
79
|
```
|
|
77
80
|
|
|
78
|
-
Key
|
|
81
|
+
Key `self` fields:
|
|
79
82
|
|
|
80
|
-
-
|
|
81
|
-
|
|
83
|
+
- `can_dispatch_subagents` — declare that YOU (an attended conversation host) are
|
|
84
|
+
driving this step and can fan out subagents. Send it on every `next-step`: it
|
|
82
85
|
makes the backend demote any configured in-process backend (a `codex` /
|
|
83
86
|
`openai-compatible` pool from a prior headless run's session config) to a *source*
|
|
84
87
|
pool so the review fans out across your subagents **and** that backend concurrently,
|
|
85
88
|
instead of the backend monopolizing the frontier. Sending it explicitly overrides a
|
|
86
89
|
stale `host_can_dispatch_subagents:false` left in session config by a headless run.
|
|
87
|
-
Only a genuinely headless loop (no attended host)
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
+
Only a genuinely headless loop (no attended host) sends `"can_dispatch_subagents":false`
|
|
91
|
+
so the backend self-drives.
|
|
92
|
+
- `roster` — ordered JSON array (lowest rank first) of models you can dispatch
|
|
90
93
|
subagents to *right now*, one entry per relative rank
|
|
91
94
|
(`"small"`, `"standard"`, `"deep"`). Ranks are relative capability labels — never
|
|
92
95
|
report model names to the backend. Each entry may carry an optional opaque
|
|
93
96
|
`model_id` used only to key per-model quota learning.
|
|
94
|
-
-
|
|
95
|
-
|
|
97
|
+
- `context_tokens` / `output_tokens` — single-model shorthand. When `roster` is also
|
|
98
|
+
given, the roster wins.
|
|
96
99
|
|
|
97
100
|
Do **not** report a parallel-subagent count — the backend owns concurrency (its
|
|
98
101
|
token-budget gate plus any hard host cap it can detect, e.g. Codex
|
|
99
102
|
`[agents].max_threads`), and runs uncapped when it detects none. An operator with
|
|
100
|
-
a genuine fixed machine limit may pass
|
|
101
|
-
|
|
103
|
+
a genuine fixed machine limit may pass `self.max_active_subagents` as an optional
|
|
104
|
+
override; it is never a value to guess.
|
|
102
105
|
|
|
103
106
|
When a step prompt tells you to continue, repeat `audit-code next-step` with the
|
|
104
|
-
same
|
|
105
|
-
the current step prompt tells you to stop.
|
|
107
|
+
same `--auditor` handshake and follow only the newly returned `prompt_path`. Stop
|
|
108
|
+
when the current step prompt tells you to stop.
|
|
106
109
|
|
|
107
110
|
## Embedded Prompt Payload
|
|
108
111
|
|
|
@@ -26,41 +26,42 @@ node audit-code.mjs ensure --quiet
|
|
|
26
26
|
|
|
27
27
|
Then ask the backend for exactly one next step. This is also the **capability
|
|
28
28
|
handshake**: report what you can dispatch to *right now* on every `next-step`
|
|
29
|
-
call, so the backend sizes review packets to
|
|
30
|
-
conservative 32k floor.
|
|
29
|
+
call as a single `--auditor <json>` flag, so the backend sizes review packets to
|
|
30
|
+
your real model instead of a conservative 32k floor. The JSON is one object with
|
|
31
|
+
a `self` field describing the model you drive; report inside `self`:
|
|
31
32
|
|
|
32
|
-
-
|
|
33
|
-
|
|
33
|
+
- `roster` — an ordered JSON array (lowest rank first) of the models you can
|
|
34
|
+
dispatch subagents to *right now*, one entry per relative rank:
|
|
34
35
|
`{"rank": "small"|"standard"|"deep", "context_tokens": N, "output_tokens": N}`.
|
|
35
36
|
Ranks are relative capability labels that line up with each packet's
|
|
36
37
|
`model_hint.tier` — never report model names to the backend. Report only ranks
|
|
37
38
|
you can actually dispatch to; the backend partitions and budgets each packet
|
|
38
39
|
against the window of the rank its risk routes it to. Discover the real
|
|
39
40
|
windows, do not guess smaller-than-real values. Each entry may carry an
|
|
40
|
-
optional opaque `model_id` (and
|
|
41
|
+
optional opaque `model_id` (and a top-level `self.model_id` is the single-model
|
|
41
42
|
equivalent) used only to key per-model quota learning — it is never
|
|
42
43
|
interpreted.
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
- `context_tokens` / `output_tokens` — single-model shorthand when every subagent
|
|
45
|
+
runs on one model: the context window and output cap of that model. When
|
|
46
|
+
`roster` is also given, the roster wins. Omit both and dispatch falls back to
|
|
47
|
+
the conservative 32k default (many tiny packets).
|
|
47
48
|
|
|
48
49
|
Do **not** report a parallel-subagent count. The backend owns concurrency: it
|
|
49
50
|
sizes how many subagents run at once from its own token-budget gate and from any
|
|
50
51
|
hard host cap it can detect (e.g. Codex's `~/.codex/config.toml`
|
|
51
52
|
`[agents].max_threads`). When it detects no hard cap it runs without one — you
|
|
52
53
|
never supply or guess a number. (An operator with a genuine fixed parallel limit
|
|
53
|
-
for this machine may pass
|
|
54
|
-
|
|
54
|
+
for this machine may pass `self.max_active_subagents` as an optional override; it
|
|
55
|
+
is not part of the handshake and is never something to invent.)
|
|
55
56
|
|
|
56
57
|
```bash
|
|
57
|
-
audit-code next-step --
|
|
58
|
+
audit-code next-step --auditor '{"self":{"roster":[{"rank":"small","context_tokens":32000,"output_tokens":8000},{"rank":"standard","context_tokens":200000,"output_tokens":32000},{"rank":"deep","context_tokens":200000,"output_tokens":64000}]}}'
|
|
58
59
|
```
|
|
59
60
|
|
|
60
61
|
Or with a single dispatch model:
|
|
61
62
|
|
|
62
63
|
```bash
|
|
63
|
-
audit-code next-step --
|
|
64
|
+
audit-code next-step --auditor '{"self":{"context_tokens":200000,"output_tokens":32000}}'
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
The token values should match the window of the model(s) dispatching the packets
|
|
@@ -69,7 +70,7 @@ The token values should match the window of the model(s) dispatching the packets
|
|
|
69
70
|
When developing `audit-tools` itself, from the repo root use:
|
|
70
71
|
|
|
71
72
|
```bash
|
|
72
|
-
node audit-code.mjs next-step --
|
|
73
|
+
node audit-code.mjs next-step --auditor '{"self":{"context_tokens":200000,"output_tokens":32000}}'
|
|
73
74
|
```
|
|
74
75
|
|
|
75
76
|
Read the returned JSON only far enough to find `prompt_path`, then read and
|
|
@@ -102,7 +103,7 @@ directory. It contains `repo_root`, `auditable_file_count`, `git_available`, and
|
|
|
102
103
|
automatically without interrupting the workflow.
|
|
103
104
|
|
|
104
105
|
When a step prompt tells you to continue, run `audit-code next-step` again with
|
|
105
|
-
the same
|
|
106
|
-
|
|
106
|
+
the same `--auditor '{"self":{…}}'` handshake and follow only the newly returned
|
|
107
|
+
`prompt_path`.
|
|
107
108
|
|
|
108
109
|
Stop when the current step prompt tells you to stop.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mkdir, mkdtemp, readFile, rm, stat, unlink
|
|
1
|
+
import { mkdir, mkdtemp, readFile, rm, stat, unlink } from 'node:fs/promises';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { dirname, join, relative, resolve } from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
@@ -289,8 +289,8 @@ export const INSTALL_HOST_DEFINITIONS = {
|
|
|
289
289
|
});
|
|
290
290
|
await collect(checks, 'antigravity_guide', async () => {
|
|
291
291
|
const content = await readFile(assetPaths.antigravityPlanningGuidePath, 'utf8');
|
|
292
|
-
if (!content.includes('--
|
|
293
|
-
throw new Error('Antigravity guide must embed the canonical loader body (next-step capability handshake including --
|
|
292
|
+
if (!content.includes('--auditor') || !content.includes('next-step')) {
|
|
293
|
+
throw new Error('Antigravity guide must embed the canonical loader body (next-step capability handshake including the --auditor descriptor).');
|
|
294
294
|
}
|
|
295
295
|
return {
|
|
296
296
|
summary: 'Antigravity planning guide embeds the canonical loader body with the capability handshake.',
|
|
@@ -668,13 +668,9 @@ export async function installBootstrap(argv, options = {}) {
|
|
|
668
668
|
);
|
|
669
669
|
results.push(await writeGeneratedJson(installManifestPath, installManifest));
|
|
670
670
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
await mkdir(dirname(sessionConfigPath), { recursive: true });
|
|
675
|
-
await writeFile(sessionConfigPath, JSON.stringify(defaultConfig, null, 2) + '\n', 'utf8');
|
|
676
|
-
results.push({ path: sessionConfigPath, mode: 'created' });
|
|
677
|
-
}
|
|
671
|
+
// No session-config seeding: `provider` is per-auditor dispatch inventory and
|
|
672
|
+
// cannot be persisted on session-config.json (G2); loadSessionConfig creates
|
|
673
|
+
// the empty default on demand.
|
|
678
674
|
|
|
679
675
|
const payload = {
|
|
680
676
|
host,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mkdir, mkdtemp, readFile, rm, stat, unlink
|
|
1
|
+
import { mkdir, mkdtemp, readFile, rm, stat, unlink } from 'node:fs/promises';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { dirname, join, relative, resolve } from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
@@ -662,13 +662,9 @@ export async function installBootstrap(argv, options = {}) {
|
|
|
662
662
|
);
|
|
663
663
|
results.push(await writeGeneratedJson(installManifestPath, installManifest));
|
|
664
664
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
await mkdir(dirname(sessionConfigPath), { recursive: true });
|
|
669
|
-
await writeFile(sessionConfigPath, JSON.stringify(defaultConfig, null, 2) + '\n', 'utf8');
|
|
670
|
-
results.push({ path: sessionConfigPath, mode: 'created' });
|
|
671
|
-
}
|
|
665
|
+
// No session-config seeding: `provider` is per-auditor dispatch inventory and
|
|
666
|
+
// cannot be persisted on session-config.json (G2); the config is created
|
|
667
|
+
// empty on demand.
|
|
672
668
|
|
|
673
669
|
const payload = {
|
|
674
670
|
host,
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* repair-proxy `/registry` discovery → dispatchable sources.
|
|
3
|
-
*
|
|
4
|
-
* repair-proxy is an OpenAI-compatible multiplexer fronting many HTTP providers/models
|
|
5
|
-
* behind ONE endpoint. This module reads its `GET {base_url}/registry`, selects a
|
|
6
|
-
* cost-aware top-K model candidate set per reachable+keyed backend provider, and expands
|
|
7
|
-
* each candidate into a {@link DispatchableSource} that dispatches through the UNCHANGED
|
|
8
|
-
* `openai-compatible` transport (the proxy routes the namespaced `provider/model`).
|
|
9
|
-
*
|
|
10
|
-
* Fail-open by contract: the fetch degrades to `null` on ANY failure (network / non-200 /
|
|
11
|
-
* malformed body) and `expandRepairProxySources` returns `[]` — a `/registry` outage must
|
|
12
|
-
* NEVER throw into the source-gather path.
|
|
13
|
-
*
|
|
14
|
-
* Per-backend-provider quota accounting: each source's `account` = its backend provider,
|
|
15
|
-
* so 429 / cooldown folds PER PROVIDER (via `foldAccountCooldownAcrossPools`), not per
|
|
16
|
-
* proxy URL. The pool key stays `(provider, model, account)`.
|
|
17
|
-
*/
|
|
18
|
-
import type { DispatchableSource, RepairProxyConfig } from "../types/sessionConfig.js";
|
|
19
|
-
/** A model entry as it appears under a provider in the `/registry` body. */
|
|
20
|
-
export interface RegistryModel {
|
|
21
|
-
id: string;
|
|
22
|
-
capability: {
|
|
23
|
-
bfcl_overall?: number | null;
|
|
24
|
-
bfcl_multi_turn?: number | null;
|
|
25
|
-
bfcl_irrelevance?: number | null;
|
|
26
|
-
arena_rating?: number | null;
|
|
27
|
-
arena_rank?: number | null;
|
|
28
|
-
composite_rank?: number | null;
|
|
29
|
-
} | null;
|
|
30
|
-
}
|
|
31
|
-
/** One backend provider block in the `/registry` body. */
|
|
32
|
-
export interface RegistryProvider {
|
|
33
|
-
base?: string;
|
|
34
|
-
kind?: string;
|
|
35
|
-
has_key?: boolean;
|
|
36
|
-
reachable?: boolean;
|
|
37
|
-
models?: RegistryModel[];
|
|
38
|
-
}
|
|
39
|
-
/** The parsed `/registry` view we consume (only the fields this path reads). */
|
|
40
|
-
export interface RegistryView {
|
|
41
|
-
providers: Record<string, RegistryProvider>;
|
|
42
|
-
}
|
|
43
|
-
/** A selected candidate: a concrete backend `provider/model` with optional cost/quota. */
|
|
44
|
-
export interface RepairProxyCandidate {
|
|
45
|
-
provider: string;
|
|
46
|
-
model: string;
|
|
47
|
-
cost_per_mtok?: number;
|
|
48
|
-
quota?: DispatchableSource["quota"];
|
|
49
|
-
/**
|
|
50
|
-
* The model's raw `composite_rank` (LOWER = better), carried onto the source so it
|
|
51
|
-
* flows into cost-ranking as a cost-equal tiebreak. Absent when the registry model
|
|
52
|
-
* has no `composite_rank` (the null-capability, sorts-last case).
|
|
53
|
-
*/
|
|
54
|
-
capability_rank?: number;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* GET `${baseUrl}/registry`, parse, and return a {@link RegistryView}. Returns `null`
|
|
58
|
-
* on ANY failure — a thrown fetch, a non-2xx response, or a body that doesn't parse to
|
|
59
|
-
* the expected `{providers}` shape. Never throws.
|
|
60
|
-
*/
|
|
61
|
-
export declare function fetchRepairProxyRegistry(baseUrl: string, fetchFn?: typeof fetch): Promise<RegistryView | null>;
|
|
62
|
-
/**
|
|
63
|
-
* Cost-aware top-K candidate set: for each provider that is `reachable && has_key`
|
|
64
|
-
* (and not disabled via `cfg.providers[name].enabled === false`), take the top-K models
|
|
65
|
-
* (default {@link DEFAULT_TOP_K}, overridable by `cfg.top_k`) ranked by capability —
|
|
66
|
-
* lower `composite_rank` better, null-capability models last. `cost_per_mtok` is attached
|
|
67
|
-
* from the operator's `cfg.providers[name].cost_per_mtok` override when declared (else
|
|
68
|
-
* left undefined → resolved by models.dev at rank time).
|
|
69
|
-
*/
|
|
70
|
-
export declare function selectRepairProxyCandidates(registry: RegistryView, cfg: RepairProxyConfig): RepairProxyCandidate[];
|
|
71
|
-
/**
|
|
72
|
-
* Fetch the registry + select candidates + map each to a {@link DispatchableSource}
|
|
73
|
-
* dispatched through the `openai-compatible` transport against the proxy root. Returns
|
|
74
|
-
* `[]` on a null registry (fail-open) so a `/registry` outage never breaks source-gather.
|
|
75
|
-
*
|
|
76
|
-
* Each source:
|
|
77
|
-
* - `id: "repair-proxy/<provider>/<model>"` — stable, distinct per backend model.
|
|
78
|
-
* - `provider: "openai-compatible"` — the unchanged HTTP transport.
|
|
79
|
-
* - `endpoint`: the proxy ROOT (`OpenAiCompatibleProvider` appends `/chat/completions`).
|
|
80
|
-
* - `model: "<provider>/<model>"` — namespaced; the proxy routes it to the backend.
|
|
81
|
-
* - `account: "<provider>"` — so 429 / cooldown folds PER BACKEND PROVIDER.
|
|
82
|
-
*/
|
|
83
|
-
export declare function expandRepairProxySources(cfg: RepairProxyConfig, fetchFn?: typeof fetch): Promise<DispatchableSource[]>;
|
|
84
|
-
//# sourceMappingURL=repairProxyRegistry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repairProxyRegistry.d.ts","sourceRoot":"","sources":["../../../src/shared/quota/repairProxyRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,kBAAk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ACzC,QAAQ,EAAE,YAAY,EACtB,GAAG,EAAE,iBAAiB,GACrB,oBAAoB,EAAE,CA8CxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,iBAAiB,EACtB,OAAO,GAAE,OAAO,KAAa,GAC5B,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAsB/B"}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* repair-proxy `/registry` discovery → dispatchable sources.
|
|
3
|
-
*
|
|
4
|
-
* repair-proxy is an OpenAI-compatible multiplexer fronting many HTTP providers/models
|
|
5
|
-
* behind ONE endpoint. This module reads its `GET {base_url}/registry`, selects a
|
|
6
|
-
* cost-aware top-K model candidate set per reachable+keyed backend provider, and expands
|
|
7
|
-
* each candidate into a {@link DispatchableSource} that dispatches through the UNCHANGED
|
|
8
|
-
* `openai-compatible` transport (the proxy routes the namespaced `provider/model`).
|
|
9
|
-
*
|
|
10
|
-
* Fail-open by contract: the fetch degrades to `null` on ANY failure (network / non-200 /
|
|
11
|
-
* malformed body) and `expandRepairProxySources` returns `[]` — a `/registry` outage must
|
|
12
|
-
* NEVER throw into the source-gather path.
|
|
13
|
-
*
|
|
14
|
-
* Per-backend-provider quota accounting: each source's `account` = its backend provider,
|
|
15
|
-
* so 429 / cooldown folds PER PROVIDER (via `foldAccountCooldownAcrossPools`), not per
|
|
16
|
-
* proxy URL. The pool key stays `(provider, model, account)`.
|
|
17
|
-
*/
|
|
18
|
-
const DEFAULT_TOP_K = 5;
|
|
19
|
-
/** Strip a trailing slash so `${base}/registry` never doubles it. */
|
|
20
|
-
function trimTrailingSlash(url) {
|
|
21
|
-
return url.replace(/\/+$/, "");
|
|
22
|
-
}
|
|
23
|
-
function isRecord(value) {
|
|
24
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* GET `${baseUrl}/registry`, parse, and return a {@link RegistryView}. Returns `null`
|
|
28
|
-
* on ANY failure — a thrown fetch, a non-2xx response, or a body that doesn't parse to
|
|
29
|
-
* the expected `{providers}` shape. Never throws.
|
|
30
|
-
*/
|
|
31
|
-
export async function fetchRepairProxyRegistry(baseUrl, fetchFn = fetch) {
|
|
32
|
-
const url = `${trimTrailingSlash(baseUrl)}/registry`;
|
|
33
|
-
try {
|
|
34
|
-
const res = await fetchFn(url);
|
|
35
|
-
if (!res || !res.ok)
|
|
36
|
-
return null;
|
|
37
|
-
const body = await res.json();
|
|
38
|
-
if (!isRecord(body) || !isRecord(body.providers))
|
|
39
|
-
return null;
|
|
40
|
-
return { providers: body.providers };
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* A model's capability sort key: lower `composite_rank` = better. Models with no
|
|
48
|
-
* capability (or no composite_rank) sort LAST via a `+Infinity` sentinel.
|
|
49
|
-
*/
|
|
50
|
-
function capabilityRankOf(model) {
|
|
51
|
-
const rank = model.capability?.composite_rank;
|
|
52
|
-
return typeof rank === "number" && Number.isFinite(rank) ? rank : Number.POSITIVE_INFINITY;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Cost-aware top-K candidate set: for each provider that is `reachable && has_key`
|
|
56
|
-
* (and not disabled via `cfg.providers[name].enabled === false`), take the top-K models
|
|
57
|
-
* (default {@link DEFAULT_TOP_K}, overridable by `cfg.top_k`) ranked by capability —
|
|
58
|
-
* lower `composite_rank` better, null-capability models last. `cost_per_mtok` is attached
|
|
59
|
-
* from the operator's `cfg.providers[name].cost_per_mtok` override when declared (else
|
|
60
|
-
* left undefined → resolved by models.dev at rank time).
|
|
61
|
-
*/
|
|
62
|
-
export function selectRepairProxyCandidates(registry, cfg) {
|
|
63
|
-
const topK = typeof cfg.top_k === "number" && Number.isInteger(cfg.top_k) && cfg.top_k > 0
|
|
64
|
-
? cfg.top_k
|
|
65
|
-
: DEFAULT_TOP_K;
|
|
66
|
-
const out = [];
|
|
67
|
-
// Stable provider iteration order (registry object order is not guaranteed stable
|
|
68
|
-
// across proxy restarts) so the candidate set is content-derived, not map-order.
|
|
69
|
-
const providerNames = Object.keys(registry.providers).sort();
|
|
70
|
-
for (const name of providerNames) {
|
|
71
|
-
const provider = registry.providers[name];
|
|
72
|
-
if (!provider || provider.reachable !== true || provider.has_key !== true)
|
|
73
|
-
continue;
|
|
74
|
-
if (cfg.providers?.[name]?.enabled === false)
|
|
75
|
-
continue;
|
|
76
|
-
// Fail-open hardening: the registry body is validated only down to `providers`
|
|
77
|
-
// being a record (fetchRepairProxyRegistry), so a 200 with malformed model entries
|
|
78
|
-
// (missing/ non-string `id`, or a non-object) reaches here. Drop those BEFORE the
|
|
79
|
-
// sort — `undefined.localeCompare` would otherwise throw out of the whole
|
|
80
|
-
// source-gather path and break Gate-0 / dispatch (the "degrades to [] on ANY
|
|
81
|
-
// malformed body" contract). Skip-the-bad-entry, not drop-the-provider.
|
|
82
|
-
const models = (Array.isArray(provider.models) ? provider.models : []).filter((m) => isRecord(m) && typeof m.id === "string");
|
|
83
|
-
// Rank by capability (lower composite_rank first), tie-break by model id for a
|
|
84
|
-
// stable, content-derived order; then take the top-K.
|
|
85
|
-
const ranked = [...models].sort((a, b) => {
|
|
86
|
-
const byRank = capabilityRankOf(a) - capabilityRankOf(b);
|
|
87
|
-
if (byRank !== 0)
|
|
88
|
-
return byRank;
|
|
89
|
-
return a.id.localeCompare(b.id);
|
|
90
|
-
});
|
|
91
|
-
const costOverride = cfg.providers?.[name]?.cost_per_mtok;
|
|
92
|
-
for (const model of ranked.slice(0, topK)) {
|
|
93
|
-
// Carry the raw composite_rank (LOWER = better) onto the candidate — the same
|
|
94
|
-
// score used for the top-K ordering above becomes the downstream cost-equal
|
|
95
|
-
// tiebreak. Omitted for null-capability models (the +Infinity sentinel).
|
|
96
|
-
const rank = model.capability?.composite_rank;
|
|
97
|
-
const capabilityRank = typeof rank === "number" && Number.isFinite(rank) ? rank : undefined;
|
|
98
|
-
out.push({
|
|
99
|
-
provider: name,
|
|
100
|
-
model: model.id,
|
|
101
|
-
...(typeof costOverride === "number" ? { cost_per_mtok: costOverride } : {}),
|
|
102
|
-
...(capabilityRank !== undefined ? { capability_rank: capabilityRank } : {}),
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return out;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Fetch the registry + select candidates + map each to a {@link DispatchableSource}
|
|
110
|
-
* dispatched through the `openai-compatible` transport against the proxy root. Returns
|
|
111
|
-
* `[]` on a null registry (fail-open) so a `/registry` outage never breaks source-gather.
|
|
112
|
-
*
|
|
113
|
-
* Each source:
|
|
114
|
-
* - `id: "repair-proxy/<provider>/<model>"` — stable, distinct per backend model.
|
|
115
|
-
* - `provider: "openai-compatible"` — the unchanged HTTP transport.
|
|
116
|
-
* - `endpoint`: the proxy ROOT (`OpenAiCompatibleProvider` appends `/chat/completions`).
|
|
117
|
-
* - `model: "<provider>/<model>"` — namespaced; the proxy routes it to the backend.
|
|
118
|
-
* - `account: "<provider>"` — so 429 / cooldown folds PER BACKEND PROVIDER.
|
|
119
|
-
*/
|
|
120
|
-
export async function expandRepairProxySources(cfg, fetchFn = fetch) {
|
|
121
|
-
const registry = await fetchRepairProxyRegistry(cfg.base_url, fetchFn);
|
|
122
|
-
if (!registry)
|
|
123
|
-
return [];
|
|
124
|
-
const baseUrl = cfg.base_url;
|
|
125
|
-
return selectRepairProxyCandidates(registry, cfg).map((candidate) => {
|
|
126
|
-
// 429/cooldown fold axis: provider-wide by DEFAULT (one 429 propagates across all the
|
|
127
|
-
// provider's models), or per-model when the operator flags this provider as having
|
|
128
|
-
// distinct per-model rate limits. Per-pool token/concurrency limits stay per-model.
|
|
129
|
-
const perModel = cfg.providers?.[candidate.provider]?.per_model_limits === true;
|
|
130
|
-
const account = perModel ? `${candidate.provider}/${candidate.model}` : candidate.provider;
|
|
131
|
-
return {
|
|
132
|
-
id: `repair-proxy/${candidate.provider}/${candidate.model}`,
|
|
133
|
-
provider: "openai-compatible",
|
|
134
|
-
endpoint: baseUrl,
|
|
135
|
-
model: `${candidate.provider}/${candidate.model}`,
|
|
136
|
-
...(cfg.api_key_env !== undefined ? { api_key_env: cfg.api_key_env } : {}),
|
|
137
|
-
account,
|
|
138
|
-
...(candidate.cost_per_mtok !== undefined ? { cost_per_mtok: candidate.cost_per_mtok } : {}),
|
|
139
|
-
...(candidate.quota !== undefined ? { quota: candidate.quota } : {}),
|
|
140
|
-
...(candidate.capability_rank != null ? { capability_rank: candidate.capability_rank } : {}),
|
|
141
|
-
};
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
//# sourceMappingURL=repairProxyRegistry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repairProxyRegistry.js","sourceRoot":"","sources":["../../../src/shared/quota/repairProxyRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA6CH,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,qEAAqE;AACrE,SAAS,iBAAiB,CAAC,GAAW;IACpC,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,OAAe,EACf,UAAwB,KAAK;IAE7B,MAAM,GAAG,GAAG,GAAG,iBAAiB,CAAC,OAAO,CAAC,WAAW,CAAC;IACrD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,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