@guilz-dev/belay 0.2.0 → 0.4.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.
Files changed (180) hide show
  1. package/README.md +39 -12
  2. package/dist/adapters/cursor/runtime-entry.js +1 -0
  3. package/dist/adapters/shared/gate-runtime.d.ts +11 -14
  4. package/dist/adapters/shared/gate-runtime.js +289 -23
  5. package/dist/bundle/claude-runtime.mjs +4435 -708
  6. package/dist/bundle/codex-runtime.mjs +4448 -710
  7. package/dist/bundle/cursor-runtime.mjs +4437 -710
  8. package/dist/cli.js +333 -11
  9. package/dist/commands/approve.d.ts +1 -0
  10. package/dist/commands/approve.js +56 -26
  11. package/dist/commands/config.d.ts +70 -0
  12. package/dist/commands/config.js +577 -0
  13. package/dist/commands/doctor.js +13 -2
  14. package/dist/commands/explain.js +6 -1
  15. package/dist/commands/harvest.d.ts +29 -0
  16. package/dist/commands/harvest.js +72 -0
  17. package/dist/commands/health-snapshot.d.ts +6 -0
  18. package/dist/commands/health-snapshot.js +34 -0
  19. package/dist/commands/judge.d.ts +100 -0
  20. package/dist/commands/judge.js +304 -0
  21. package/dist/commands/metrics.js +34 -2
  22. package/dist/commands/quality.d.ts +38 -0
  23. package/dist/commands/quality.js +105 -0
  24. package/dist/commands/simulate.d.ts +1 -0
  25. package/dist/commands/simulate.js +7 -2
  26. package/dist/commands/standing-allow.d.ts +10 -0
  27. package/dist/commands/standing-allow.js +26 -0
  28. package/dist/commands/status.js +2 -2
  29. package/dist/commands/stdin-key.d.ts +1 -0
  30. package/dist/commands/stdin-key.js +8 -0
  31. package/dist/commands/tui.d.ts +48 -0
  32. package/dist/commands/tui.js +150 -0
  33. package/dist/config-io.js +10 -5
  34. package/dist/conformance/guarantee-table.js +12 -0
  35. package/dist/conformance/types.d.ts +2 -0
  36. package/dist/core/approval-replay-cli.d.ts +7 -0
  37. package/dist/core/approval-replay-cli.js +36 -0
  38. package/dist/core/approval-replay.d.ts +45 -0
  39. package/dist/core/approval-replay.js +141 -0
  40. package/dist/core/approval-service.d.ts +15 -0
  41. package/dist/core/approval-service.js +47 -2
  42. package/dist/core/approval.d.ts +24 -3
  43. package/dist/core/approval.js +47 -4
  44. package/dist/core/audit-analysis.d.ts +7 -1
  45. package/dist/core/audit-analysis.js +111 -0
  46. package/dist/core/audit-io.d.ts +2 -0
  47. package/dist/core/audit-io.js +14 -0
  48. package/dist/core/audit-metrics.d.ts +7 -0
  49. package/dist/core/audit-metrics.js +24 -4
  50. package/dist/core/audit-query.d.ts +1 -0
  51. package/dist/core/audit-query.js +3 -0
  52. package/dist/core/audit-replay-context.d.ts +35 -0
  53. package/dist/core/audit-replay-context.js +88 -0
  54. package/dist/core/audit-types.d.ts +24 -1
  55. package/dist/core/audit-types.js +1 -1
  56. package/dist/core/capability/index.d.ts +4 -3
  57. package/dist/core/capability/index.js +3 -2
  58. package/dist/core/capability/paths.d.ts +2 -1
  59. package/dist/core/capability/paths.js +76 -8
  60. package/dist/core/capability/reasons.d.ts +3 -0
  61. package/dist/core/capability/reasons.js +8 -0
  62. package/dist/core/capability/trusted-workspace-roots.d.ts +25 -0
  63. package/dist/core/capability/trusted-workspace-roots.js +149 -0
  64. package/dist/core/capability/types.d.ts +11 -1
  65. package/dist/core/capability-approval.d.ts +2 -1
  66. package/dist/core/capability-approval.js +100 -2
  67. package/dist/core/classify-subagent.js +2 -20
  68. package/dist/core/classify-tool.js +129 -30
  69. package/dist/core/config-layers.js +2 -1
  70. package/dist/core/config.d.ts +40 -2
  71. package/dist/core/config.js +159 -11
  72. package/dist/core/credential-store.d.ts +11 -0
  73. package/dist/core/credential-store.js +60 -0
  74. package/dist/core/gate-engine.js +104 -13
  75. package/dist/core/harvest.d.ts +53 -0
  76. package/dist/core/harvest.js +276 -0
  77. package/dist/core/index.d.ts +9 -3
  78. package/dist/core/index.js +6 -2
  79. package/dist/core/integrity.d.ts +2 -0
  80. package/dist/core/integrity.js +13 -0
  81. package/dist/core/judge-api-key.d.ts +19 -0
  82. package/dist/core/judge-api-key.js +74 -0
  83. package/dist/core/judge-cloud-consent.d.ts +13 -0
  84. package/dist/core/judge-cloud-consent.js +38 -0
  85. package/dist/core/judge-config.d.ts +41 -4
  86. package/dist/core/judge-config.js +263 -57
  87. package/dist/core/judge-doctor.d.ts +9 -1
  88. package/dist/core/judge-doctor.js +199 -94
  89. package/dist/core/judge-model-discovery.d.ts +24 -0
  90. package/dist/core/judge-model-discovery.js +168 -0
  91. package/dist/core/judge-model-policy.d.ts +5 -0
  92. package/dist/core/judge-model-policy.js +21 -0
  93. package/dist/core/judge-runtime-detection.d.ts +9 -0
  94. package/dist/core/judge-runtime-detection.js +68 -0
  95. package/dist/core/path-utils.d.ts +11 -0
  96. package/dist/core/path-utils.js +56 -6
  97. package/dist/core/reclassify.d.ts +3 -0
  98. package/dist/core/reclassify.js +44 -14
  99. package/dist/core/replay-scrub.d.ts +9 -0
  100. package/dist/core/replay-scrub.js +43 -0
  101. package/dist/core/shell-tokenizer.d.ts +2 -0
  102. package/dist/core/shell-tokenizer.js +82 -23
  103. package/dist/core/standing-allow.d.ts +50 -0
  104. package/dist/core/standing-allow.js +175 -0
  105. package/dist/core/transactional/diff-evaluator.js +1 -19
  106. package/dist/core/types.d.ts +17 -0
  107. package/dist/core/verdict/adapter.d.ts +1 -0
  108. package/dist/core/verdict/adapter.js +17 -2
  109. package/dist/core/verdict/containment.d.ts +8 -2
  110. package/dist/core/verdict/containment.js +45 -10
  111. package/dist/core/verdict/judge-audit.d.ts +1 -0
  112. package/dist/core/verdict/judge-audit.js +32 -1
  113. package/dist/core/verdict/judge-baseline.d.ts +20 -0
  114. package/dist/core/verdict/judge-baseline.js +48 -0
  115. package/dist/core/verdict/judge-broker-service.d.ts +42 -0
  116. package/dist/core/verdict/judge-broker-service.js +279 -0
  117. package/dist/core/verdict/judge-catalog.d.ts +40 -0
  118. package/dist/core/verdict/judge-catalog.js +148 -0
  119. package/dist/core/verdict/judge-cli-fingerprint.d.ts +5 -0
  120. package/dist/core/verdict/judge-cli-fingerprint.js +61 -0
  121. package/dist/core/verdict/judge-cli.d.ts +46 -0
  122. package/dist/core/verdict/judge-cli.js +401 -0
  123. package/dist/core/verdict/judge-factory.d.ts +15 -4
  124. package/dist/core/verdict/judge-factory.js +127 -15
  125. package/dist/core/verdict/judge-provider-matrix.d.ts +20 -0
  126. package/dist/core/verdict/judge-provider-matrix.js +66 -0
  127. package/dist/core/verdict/judge-runtime-config.d.ts +42 -0
  128. package/dist/core/verdict/judge-runtime-config.js +92 -0
  129. package/dist/core/verdict/judge-session-broker.d.ts +48 -0
  130. package/dist/core/verdict/judge-session-broker.js +195 -0
  131. package/dist/core/verdict/judge-session-guard.d.ts +27 -0
  132. package/dist/core/verdict/judge-session-guard.js +91 -0
  133. package/dist/core/verdict/judge-session-kill-switch.d.ts +11 -0
  134. package/dist/core/verdict/judge-session-kill-switch.js +43 -0
  135. package/dist/core/verdict/judge-session-mutex.d.ts +9 -0
  136. package/dist/core/verdict/judge-session-mutex.js +23 -0
  137. package/dist/core/verdict/judge-shadow.d.ts +24 -0
  138. package/dist/core/verdict/judge-shadow.js +116 -0
  139. package/dist/core/verdict/judge-transport.d.ts +40 -0
  140. package/dist/core/verdict/judge-transport.js +258 -0
  141. package/dist/core/verdict/judge.d.ts +33 -1
  142. package/dist/core/verdict/judge.js +84 -14
  143. package/dist/core/verdict/parser.js +6 -1
  144. package/dist/core/verdict/persistent-paths.d.ts +8 -0
  145. package/dist/core/verdict/persistent-paths.js +52 -0
  146. package/dist/core/verdict/types.d.ts +19 -2
  147. package/dist/core/verdict/verdict.js +166 -49
  148. package/dist/corpus/adversarial-probe.d.ts +86 -0
  149. package/dist/corpus/adversarial-probe.js +220 -0
  150. package/dist/corpus/evaluate.d.ts +45 -12
  151. package/dist/corpus/evaluate.js +62 -5
  152. package/dist/corpus/gates.d.ts +35 -0
  153. package/dist/corpus/gates.js +81 -0
  154. package/dist/corpus/judge-accuracy.d.ts +8 -0
  155. package/dist/corpus/judge-accuracy.js +39 -0
  156. package/dist/corpus/must-allow-commands.d.ts +5 -0
  157. package/dist/corpus/must-allow-commands.js +13 -0
  158. package/dist/corpus/mutators.d.ts +28 -0
  159. package/dist/corpus/mutators.js +151 -0
  160. package/dist/corpus/ratchet.d.ts +42 -0
  161. package/dist/corpus/ratchet.js +116 -0
  162. package/dist/corpus/runtime-match.d.ts +19 -0
  163. package/dist/corpus/runtime-match.js +45 -0
  164. package/dist/corpus/standing-allow-catalog.generated.d.ts +13 -0
  165. package/dist/corpus/standing-allow-catalog.generated.js +79 -0
  166. package/dist/corpus/types.d.ts +47 -0
  167. package/dist/corpus/types.js +157 -0
  168. package/dist/installer.js +69 -15
  169. package/dist/judge-broker-daemon.d.ts +1 -0
  170. package/dist/judge-broker-daemon.js +123 -0
  171. package/dist/services/sandbox-service.d.ts +1 -0
  172. package/dist/services/sandbox-service.js +2 -0
  173. package/dist/types.d.ts +7 -0
  174. package/dist/version.d.ts +1 -1
  175. package/dist/version.js +1 -1
  176. package/package.json +7 -3
  177. package/skills/belay/SKILL.md +15 -8
  178. package/skills/belay/belay-approve.md +17 -0
  179. package/dist/commands/init-wizard.d.ts +0 -21
  180. package/dist/commands/init-wizard.js +0 -63
@@ -0,0 +1,40 @@
1
+ import type { BelayJudgeConfig, JudgeProvider } from '../config.js';
2
+ export type JudgeProviderId = 'ollama' | 'codex' | 'claude' | 'cursor';
3
+ /** Read-time aliases for legacy configs; never written on fresh init. */
4
+ export declare const LEGACY_PROVIDER_ID_ALIASES: Record<string, JudgeProviderId>;
5
+ /** Removed catalog ids; load emits a warning and best-effort canonical mapping. */
6
+ export declare const REMOVED_JUDGE_PROVIDER_IDS: readonly ["openrouter", "custom"];
7
+ export declare function isRemovedProviderId(id: string): boolean;
8
+ export declare function warnRemovedProviderId(id: string): void;
9
+ export interface JudgeProviderSpec {
10
+ id: JudgeProviderId;
11
+ driver: JudgeProvider;
12
+ defaultEndpoint: string | null;
13
+ defaultModel: string;
14
+ apiKeyEnvVars: string[];
15
+ isCloud: boolean;
16
+ }
17
+ export declare const JUDGE_CATALOG: Record<JudgeProviderId, JudgeProviderSpec>;
18
+ export declare const JUDGE_PROVIDER_IDS: JudgeProviderId[];
19
+ export declare function normalizeLegacyProviderId(id: string): JudgeProviderId | null;
20
+ export declare function getJudgeProviderSpec(id: string): JudgeProviderSpec | null;
21
+ export declare function isJudgeProviderId(value: string): boolean;
22
+ export declare function inferProviderIdFromConfig(judge: Partial<BelayJudgeConfig>): JudgeProviderId;
23
+ export interface ResolveJudgeFromCatalogInput {
24
+ providerId: JudgeProviderId | string;
25
+ model?: string;
26
+ endpoint?: string | null;
27
+ timeoutMs?: number;
28
+ keepAlive?: string | null;
29
+ }
30
+ export declare function resolveJudgeFromCatalog(input: ResolveJudgeFromCatalogInput): BelayJudgeConfig;
31
+ export interface JudgeProviderCapabilities {
32
+ requiresConsent: boolean;
33
+ requiresEndpoint: boolean;
34
+ credentialPolicy: Array<'project' | 'apiKey'>;
35
+ }
36
+ export declare function catalogRequiresEndpoint(providerId: JudgeProviderId | string, opts?: {
37
+ transport?: string;
38
+ }): boolean;
39
+ export declare function getJudgeProviderCapabilities(providerId: JudgeProviderId | string): JudgeProviderCapabilities | null;
40
+ export declare function isCloudProviderId(providerId: JudgeProviderId | string | undefined): boolean;
@@ -0,0 +1,148 @@
1
+ /** Read-time aliases for legacy configs; never written on fresh init. */
2
+ export const LEGACY_PROVIDER_ID_ALIASES = {
3
+ local: 'ollama',
4
+ openai: 'codex',
5
+ };
6
+ /** Removed catalog ids; load emits a warning and best-effort canonical mapping. */
7
+ export const REMOVED_JUDGE_PROVIDER_IDS = ['openrouter', 'custom'];
8
+ export function isRemovedProviderId(id) {
9
+ return REMOVED_JUDGE_PROVIDER_IDS.includes(id);
10
+ }
11
+ export function warnRemovedProviderId(id) {
12
+ process.stderr.write(`Warning: judge.providerId "${id}" was removed; migrate with belay config set judge.providerId <ollama|codex|claude|cursor>.\n`);
13
+ }
14
+ export const JUDGE_CATALOG = {
15
+ ollama: {
16
+ id: 'ollama',
17
+ driver: 'ollama',
18
+ defaultEndpoint: 'http://localhost:11434',
19
+ defaultModel: 'gemma4:e2b',
20
+ apiKeyEnvVars: [],
21
+ isCloud: false,
22
+ },
23
+ codex: {
24
+ id: 'codex',
25
+ driver: 'openai-compatible',
26
+ defaultEndpoint: null,
27
+ defaultModel: 'gpt-5.3-codex-high',
28
+ apiKeyEnvVars: ['OPENAI_API_KEY', 'BELAY_JUDGE_API_KEY'],
29
+ isCloud: true,
30
+ },
31
+ claude: {
32
+ id: 'claude',
33
+ driver: 'anthropic',
34
+ defaultEndpoint: null,
35
+ defaultModel: 'claude-sonnet-4-6',
36
+ apiKeyEnvVars: ['ANTHROPIC_API_KEY', 'BELAY_JUDGE_API_KEY'],
37
+ isCloud: true,
38
+ },
39
+ cursor: {
40
+ id: 'cursor',
41
+ driver: 'openai-compatible',
42
+ defaultEndpoint: null,
43
+ defaultModel: 'composer-2.5',
44
+ apiKeyEnvVars: ['CURSOR_API_KEY', 'BELAY_JUDGE_API_KEY'],
45
+ isCloud: true,
46
+ },
47
+ };
48
+ export const JUDGE_PROVIDER_IDS = Object.keys(JUDGE_CATALOG);
49
+ export function normalizeLegacyProviderId(id) {
50
+ if (id in JUDGE_CATALOG) {
51
+ return id;
52
+ }
53
+ return LEGACY_PROVIDER_ID_ALIASES[id] ?? null;
54
+ }
55
+ export function getJudgeProviderSpec(id) {
56
+ const normalized = normalizeLegacyProviderId(id);
57
+ if (!normalized) {
58
+ return null;
59
+ }
60
+ return JUDGE_CATALOG[normalized];
61
+ }
62
+ export function isJudgeProviderId(value) {
63
+ return normalizeLegacyProviderId(value) !== null;
64
+ }
65
+ export function inferProviderIdFromConfig(judge) {
66
+ if (judge.providerId) {
67
+ const normalized = normalizeLegacyProviderId(judge.providerId);
68
+ if (normalized) {
69
+ return normalized;
70
+ }
71
+ }
72
+ if (judge.provider === 'ollama') {
73
+ return 'ollama';
74
+ }
75
+ if (judge.provider === 'anthropic') {
76
+ return 'claude';
77
+ }
78
+ const endpoint = judge.endpoint?.trim().toLowerCase() ?? '';
79
+ if (endpoint.includes('openrouter.ai')) {
80
+ return 'codex';
81
+ }
82
+ if (endpoint.includes('api.openai.com')) {
83
+ return 'codex';
84
+ }
85
+ if (endpoint) {
86
+ return 'codex';
87
+ }
88
+ if (judge.provider === 'openai-compatible') {
89
+ const model = judge.model?.trim().toLowerCase() ?? '';
90
+ if (model.includes('composer')) {
91
+ return 'cursor';
92
+ }
93
+ }
94
+ return 'codex';
95
+ }
96
+ export function resolveJudgeFromCatalog(input) {
97
+ const providerId = normalizeLegacyProviderId(String(input.providerId));
98
+ if (!providerId) {
99
+ throw new Error(`Unknown judge provider id: ${input.providerId}`);
100
+ }
101
+ const spec = JUDGE_CATALOG[providerId];
102
+ const model = input.model?.trim() || spec.defaultModel;
103
+ const endpoint = input.endpoint !== undefined ? input.endpoint?.trim() || null : spec.defaultEndpoint;
104
+ return {
105
+ provider: spec.driver,
106
+ providerId: spec.id,
107
+ model,
108
+ endpoint,
109
+ timeoutMs: input.timeoutMs ?? (spec.isCloud ? 8000 : 25000),
110
+ keepAlive: spec.driver === 'ollama' ? (input.keepAlive ?? '30m') : null,
111
+ };
112
+ }
113
+ export function catalogRequiresEndpoint(providerId, opts) {
114
+ const normalized = normalizeLegacyProviderId(String(providerId));
115
+ if (!normalized || normalized === 'ollama') {
116
+ return false;
117
+ }
118
+ const transport = opts?.transport;
119
+ if (!transport) {
120
+ return false;
121
+ }
122
+ if (transport.endsWith('-cli') || transport === 'ollama-http') {
123
+ return false;
124
+ }
125
+ return transport === 'http';
126
+ }
127
+ export function getJudgeProviderCapabilities(providerId) {
128
+ const normalized = normalizeLegacyProviderId(String(providerId));
129
+ if (!normalized) {
130
+ return null;
131
+ }
132
+ const spec = JUDGE_CATALOG[normalized];
133
+ return {
134
+ requiresConsent: spec.isCloud,
135
+ requiresEndpoint: catalogRequiresEndpoint(normalized, { transport: 'http' }),
136
+ credentialPolicy: ['project', 'apiKey'],
137
+ };
138
+ }
139
+ export function isCloudProviderId(providerId) {
140
+ if (!providerId) {
141
+ return false;
142
+ }
143
+ const normalized = normalizeLegacyProviderId(providerId);
144
+ if (!normalized) {
145
+ return false;
146
+ }
147
+ return JUDGE_CATALOG[normalized].isCloud;
148
+ }
@@ -0,0 +1,5 @@
1
+ import type { JudgeProviderId } from './judge-catalog.js';
2
+ export type CliFingerprintResolver = (providerId: Exclude<JudgeProviderId, 'ollama'>) => Promise<string>;
3
+ export declare function setCliFingerprintResolverForTests(resolver: CliFingerprintResolver | null): void;
4
+ export declare function resolveCliVersionFingerprint(providerId: Exclude<JudgeProviderId, 'ollama'>, timeoutMs?: number): Promise<string>;
5
+ export declare function resetCliFingerprintCache(): void;
@@ -0,0 +1,61 @@
1
+ import { spawn } from 'node:child_process';
2
+ const CLI_BINARIES = {
3
+ codex: 'codex',
4
+ cursor: 'cursor-agent',
5
+ claude: 'claude',
6
+ };
7
+ let fingerprintResolver = null;
8
+ const fingerprintCache = new Map();
9
+ export function setCliFingerprintResolverForTests(resolver) {
10
+ fingerprintResolver = resolver;
11
+ fingerprintCache.clear();
12
+ }
13
+ async function runVersionProbe(binary, timeoutMs) {
14
+ return new Promise((resolve, reject) => {
15
+ const child = spawn(binary, ['--version'], { stdio: ['ignore', 'pipe', 'pipe'] });
16
+ let stdout = '';
17
+ let stderr = '';
18
+ const timer = setTimeout(() => {
19
+ child.kill('SIGTERM');
20
+ reject(new Error(`${binary} --version timed out`));
21
+ }, timeoutMs);
22
+ child.stdout.on('data', (chunk) => {
23
+ stdout += String(chunk);
24
+ });
25
+ child.stderr.on('data', (chunk) => {
26
+ stderr += String(chunk);
27
+ });
28
+ child.on('error', (error) => {
29
+ clearTimeout(timer);
30
+ reject(error);
31
+ });
32
+ child.on('close', (code) => {
33
+ clearTimeout(timer);
34
+ const output = (stdout || stderr).trim();
35
+ if (code === 0 && output) {
36
+ resolve(output.split(/\r?\n/)[0]?.trim() || output);
37
+ return;
38
+ }
39
+ reject(new Error(stderr.trim() || `${binary} --version exited with code ${code ?? 'unknown'}`));
40
+ });
41
+ });
42
+ }
43
+ export async function resolveCliVersionFingerprint(providerId, timeoutMs = 3_000) {
44
+ const cacheKey = providerId;
45
+ const cached = fingerprintCache.get(cacheKey);
46
+ if (cached) {
47
+ return cached;
48
+ }
49
+ if (fingerprintResolver) {
50
+ const resolved = await fingerprintResolver(providerId);
51
+ fingerprintCache.set(cacheKey, resolved);
52
+ return resolved;
53
+ }
54
+ const binary = CLI_BINARIES[providerId];
55
+ const version = await runVersionProbe(binary, timeoutMs);
56
+ fingerprintCache.set(cacheKey, version);
57
+ return version;
58
+ }
59
+ export function resetCliFingerprintCache() {
60
+ fingerprintCache.clear();
61
+ }
@@ -0,0 +1,46 @@
1
+ import type { ScrubOptions } from '../types.js';
2
+ import { parseTier1Json, type TracedTier1Judge } from './judge.js';
3
+ import type { JudgeProviderId } from './judge-catalog.js';
4
+ import type { BelayJudgeRuntimeConfig } from './judge-runtime-config.js';
5
+ export interface CliJudgeOptions {
6
+ providerId: JudgeProviderId;
7
+ modelRequested: string;
8
+ modelResolved: string;
9
+ timeoutMs?: number;
10
+ sensitivePaths: string[];
11
+ scrubOptions: ScrubOptions;
12
+ runCliCommand?: CliJudgeRunCommand;
13
+ runtime?: BelayJudgeRuntimeConfig;
14
+ repoRoot?: string;
15
+ stateDir?: string;
16
+ judgeMode?: string;
17
+ }
18
+ export interface CliInvocation {
19
+ binary: string;
20
+ args: string[];
21
+ stdin?: string;
22
+ }
23
+ export type CliJudgeRunCommand = (invocation: CliInvocation, timeoutMs: number) => Promise<string>;
24
+ export type CliRunErrorKind = 'timeout' | 'spawn_error' | 'exit_nonzero';
25
+ export declare class CliRunError extends Error {
26
+ kind: CliRunErrorKind;
27
+ exitCode?: number;
28
+ stderr?: string;
29
+ stdout?: string;
30
+ command?: string;
31
+ constructor(kind: CliRunErrorKind, message: string, details?: {
32
+ exitCode?: number;
33
+ stderr?: string;
34
+ stdout?: string;
35
+ command?: string;
36
+ });
37
+ }
38
+ export declare function buildCliInvocation(providerId: Exclude<JudgeProviderId, 'ollama'>, prompt: string, model: string): CliInvocation;
39
+ export declare function parseCliJudgeOutput(providerId: Exclude<JudgeProviderId, 'ollama'>, raw: string): ReturnType<typeof parseTier1Json>;
40
+ export declare function runCliJsonWithTimeouts(invocation: CliInvocation, budgets: {
41
+ connectTimeoutMs?: number;
42
+ evalTimeoutMs: number;
43
+ }): Promise<string>;
44
+ export declare function createCodexCliJudge(options: Omit<CliJudgeOptions, 'providerId'>): TracedTier1Judge;
45
+ export declare function createCursorCliJudge(options: Omit<CliJudgeOptions, 'providerId'>): TracedTier1Judge;
46
+ export declare function createClaudeCliJudge(options: Omit<CliJudgeOptions, 'providerId'>): TracedTier1Judge;