agent-qa 0.2.4 → 0.2.6
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/cli-main.cjs +22100 -23321
- package/dist/cli-main.cjs.map +1 -1
- package/dist/cli-main.d.cts +2 -5
- package/dist/cli-main.d.ts +2 -5
- package/dist/cli-main.js +22048 -23676
- package/dist/cli-main.js.map +1 -1
- package/dist/cli.cjs +16 -26
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +17 -25
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +2949 -3097
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +214 -224
- package/dist/index.d.ts +214 -224
- package/dist/index.js +2900 -3133
- package/dist/index.js.map +1 -1
- package/package.json +49 -44
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { AgentQaConfig, resolveKnowledgeRoot } from
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { loadCompletedRunHandoff } from
|
|
8
|
-
import { runSafetyScope } from
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { AgentQaConfig, resolveKnowledgeRoot } from "@vostride/agent-qa-core";
|
|
2
|
+
import { ModelProfile, ResolvedModelAuth, createModel, createTokenAccounting, resolveCapabilities } from "@vostride/agent-qa-model";
|
|
3
|
+
import "commander";
|
|
4
|
+
import { CurationCandidateProjection, CuratorAuthor, EnqueueCurationCandidateProjectionOutcome, LocalCurationCapabilities, OpenServingKnowledgeReaderConfig } from "@vostride/agent-qa-agent-local";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { Anchor, CanaryOutcome, CompletedRunHandoff, CurationSnapshot, MaskFn, RecordId, RunAnalysisArtifact } from "@vostride/agent-qa-schema";
|
|
7
|
+
import { loadCompletedRunHandoff } from "@vostride/agent-qa-runner-local";
|
|
8
|
+
import { runSafetyScope } from "@vostride/agent-qa-safety-local";
|
|
9
|
+
import "@vostride/agent-qa-agent";
|
|
10
|
+
import "@vostride/agent-qa-analytics";
|
|
11
|
+
import { KnowledgeHintReader } from "@vostride/agent-qa-runner";
|
|
12
|
+
export * from "@vostride/agent-qa-core";
|
|
13
|
+
export declare class ConfigFileNotYamlError extends Error {
|
|
14
|
+
readonly configPath: string;
|
|
15
|
+
constructor(configPath: string, cause: unknown);
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* THE READ AND THE PARSE GET SEPARATE CATCHES, and that separation is load-bearing.
|
|
@@ -20,298 +22,286 @@ declare class ConfigFileNotYamlError extends Error {
|
|
|
20
22
|
* fact about the filesystem and not about the file's content, and is rethrown untouched. Only the
|
|
21
23
|
* PARSE throw is reworded — one guard, aimed at one channel.
|
|
22
24
|
*/
|
|
23
|
-
declare function loadConfigFile(configPath: string): Promise<unknown>;
|
|
24
|
-
declare class ConfigFileNotFoundError extends Error {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
export declare function loadConfigFile(configPath: string): Promise<unknown>;
|
|
26
|
+
export declare class ConfigFileNotFoundError extends Error {
|
|
27
|
+
readonly configPath: string;
|
|
28
|
+
constructor(configPath: string);
|
|
27
29
|
}
|
|
28
|
-
declare function loadRequiredConfigFile(configPath: string): Promise<unknown>;
|
|
29
|
-
declare function loadEnvOverrides(): Record<string, unknown>;
|
|
30
|
-
declare function mergeConfigs(file: unknown, env: Record<string, unknown>, flags: Record<string, unknown>): unknown;
|
|
31
|
-
declare function deepMerge(base: unknown, override: unknown): unknown;
|
|
32
|
-
declare function mergeWithTestConfig(globalConfig: unknown, testConfig: unknown, flagOverrides: Record<string, unknown>): unknown;
|
|
33
|
-
declare function normalizeConfigForValidation(config: unknown): unknown;
|
|
34
|
-
declare function mergeUseBlocks(globalUse: Record<string, unknown> | undefined, suiteUse: Record<string, unknown> | undefined, testUse: Record<string, unknown> | undefined, cliFlags: Record<string, unknown>): Record<string, unknown>;
|
|
35
|
-
declare function formatConfigDebug(globalConfig: unknown, testConfig: unknown, flagOverrides: Record<string, unknown>, mask: MaskFn): string;
|
|
36
|
-
declare function readAnalyticsPrivacyDeclaration(configPath?: string): Promise<{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
export declare function loadRequiredConfigFile(configPath: string): Promise<unknown>;
|
|
31
|
+
export declare function loadEnvOverrides(): Record<string, unknown>;
|
|
32
|
+
export declare function mergeConfigs(file: unknown, env: Record<string, unknown>, flags: Record<string, unknown>): unknown;
|
|
33
|
+
export declare function deepMerge(base: unknown, override: unknown): unknown;
|
|
34
|
+
export declare function mergeWithTestConfig(globalConfig: unknown, testConfig: unknown, flagOverrides: Record<string, unknown>): unknown;
|
|
35
|
+
export declare function normalizeConfigForValidation(config: unknown): unknown;
|
|
36
|
+
export declare function mergeUseBlocks(globalUse: Record<string, unknown> | undefined, suiteUse: Record<string, unknown> | undefined, testUse: Record<string, unknown> | undefined, cliFlags: Record<string, unknown>): Record<string, unknown>;
|
|
37
|
+
export declare function formatConfigDebug(globalConfig: unknown, testConfig: unknown, flagOverrides: Record<string, unknown>, mask: MaskFn): string;
|
|
38
|
+
export declare function readAnalyticsPrivacyDeclaration(configPath?: string): Promise<{
|
|
39
|
+
analytics: {
|
|
40
|
+
privacy: boolean;
|
|
41
|
+
};
|
|
40
42
|
} | undefined>;
|
|
41
|
-
declare function resolveConfig(options: {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
export declare function resolveConfig(options: {
|
|
44
|
+
configPath?: string;
|
|
45
|
+
flags?: Record<string, unknown>;
|
|
46
|
+
loadAuthPlugins?: boolean;
|
|
45
47
|
}): Promise<AgentQaConfig>;
|
|
46
|
-
declare function loadConfigPlugins(config: AgentQaConfig, configPath: string): Promise<void>;
|
|
48
|
+
export declare function loadConfigPlugins(config: AgentQaConfig, configPath: string): Promise<void>;
|
|
47
49
|
/** Resolve the writer-gated knowledge root without making each CLI surface import core directly. */
|
|
48
|
-
declare function resolveConfiguredKnowledgeRoot(config: AgentQaConfig, configDir: string): string;
|
|
49
|
-
declare function resolveRawConfigKnowledgeRoot(config: Record<string, unknown> | null, configPath: string): string | null;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
environment?: 'local' | 'shared' | 'production';
|
|
50
|
+
export declare function resolveConfiguredKnowledgeRoot(config: AgentQaConfig, configDir: string): string;
|
|
51
|
+
export declare function resolveRawConfigKnowledgeRoot(config: Record<string, unknown> | null, configPath: string): string | null;
|
|
52
|
+
export interface ResolvedTarget {
|
|
53
|
+
name: string;
|
|
54
|
+
product: string;
|
|
55
|
+
platform: 'web' | 'android' | 'ios';
|
|
56
|
+
url?: string;
|
|
57
|
+
bundleId?: string;
|
|
58
|
+
appPackage?: string;
|
|
59
|
+
appActivity?: string;
|
|
60
|
+
device?: string;
|
|
61
|
+
environment?: 'local' | 'shared' | 'production';
|
|
61
62
|
}
|
|
62
|
-
interface TargetSummary {
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
export interface TargetSummary {
|
|
64
|
+
name: string;
|
|
65
|
+
platform: 'web' | 'android' | 'ios';
|
|
65
66
|
}
|
|
66
|
-
declare function resolveTarget(config: AgentQaConfig, targetName: string): ResolvedTarget;
|
|
67
|
-
declare function listTargets(config: AgentQaConfig): TargetSummary[];
|
|
68
|
-
|
|
69
|
-
declare function purgeAll(cacheDir: string): Promise<number>;
|
|
70
|
-
|
|
67
|
+
export declare function resolveTarget(config: AgentQaConfig, targetName: string): ResolvedTarget;
|
|
68
|
+
export declare function listTargets(config: AgentQaConfig): TargetSummary[];
|
|
69
|
+
export declare function purgeAll(cacheDir: string): Promise<number>;
|
|
71
70
|
/** Malformed-output retry cap; deliberately not a user-facing config key. */
|
|
72
|
-
declare const CURATOR_RETRY_CAP = 2;
|
|
71
|
+
export declare const CURATOR_RETRY_CAP = 2;
|
|
73
72
|
/** Neighbor presentation cap; deliberately not a user-facing config key. */
|
|
74
|
-
declare const CURATOR_MAX_NEIGHBORS = 12;
|
|
73
|
+
export declare const CURATOR_MAX_NEIGHBORS = 12;
|
|
75
74
|
interface BuildCuratorAuthorDependencies {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
/** The run's already-resolved registry profile. It is reused verbatim. */
|
|
76
|
+
profile: ModelProfile;
|
|
77
|
+
auth: ResolvedModelAuth;
|
|
78
|
+
mask: MaskFn;
|
|
79
|
+
createModelImpl?: typeof createModel;
|
|
80
|
+
resolveCapabilitiesImpl?: typeof resolveCapabilities;
|
|
81
|
+
createTokenAccountingImpl?: typeof createTokenAccounting;
|
|
82
|
+
signal?: AbortSignal;
|
|
84
83
|
}
|
|
85
84
|
/**
|
|
86
85
|
* Build the CLI-owned Curator author over the run's already-resolved model. The returned function
|
|
87
86
|
* reads no config and every provider call therefore traverses createModel's registry middleware.
|
|
88
87
|
*/
|
|
89
|
-
declare function buildCuratorAuthor(deps: BuildCuratorAuthorDependencies): CuratorAuthor;
|
|
90
|
-
|
|
88
|
+
export declare function buildCuratorAuthor(deps: BuildCuratorAuthorDependencies): CuratorAuthor;
|
|
91
89
|
declare const nudgeResponseSchema: z.ZodObject<{
|
|
92
|
-
|
|
90
|
+
sessionId: z.ZodUUID;
|
|
93
91
|
}, z.core.$strict>;
|
|
94
92
|
type NudgeResponse = z.infer<typeof nudgeResponseSchema>;
|
|
95
|
-
|
|
96
93
|
interface NudgeDaemonOptions {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
94
|
+
/** Resolved configured root; defaults only for legacy project-local callers. */
|
|
95
|
+
readonly knowledgeRoot?: string;
|
|
96
|
+
/** Absolute wall-clock deadline shared with the caller's complete operation. */
|
|
97
|
+
readonly deadlineMs?: number;
|
|
98
|
+
/** Request an empty terminal receipt when the caller gates completion on it. */
|
|
99
|
+
readonly requireReceipt?: boolean;
|
|
100
|
+
readonly signal?: AbortSignal;
|
|
104
101
|
}
|
|
105
102
|
/** Best-effort curation wake-up returning the durable session identity when acknowledged. */
|
|
106
103
|
declare function nudgeDaemon(agentQaRoot: string, options?: NudgeDaemonOptions): Promise<NudgeResponse | undefined>;
|
|
107
|
-
|
|
108
104
|
interface CanaryCreditCounters {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
rideAlongUncredited: number;
|
|
106
|
+
rerunExcluded: number;
|
|
107
|
+
nonSignal: Record<NonSignalClass, number>;
|
|
112
108
|
}
|
|
113
|
-
|
|
114
109
|
type NonSignalClass = 'environment' | 'timeout' | 'flake';
|
|
115
110
|
interface ProjectCanaryOutcomesInput {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
111
|
+
handoff: CompletedRunHandoff;
|
|
112
|
+
artifact?: RunAnalysisArtifact;
|
|
113
|
+
resolveCandidateAnchors: (id: RecordId) => CandidateAnchorResolution;
|
|
119
114
|
}
|
|
120
115
|
type CandidateAnchorResolution = {
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
kind: 'resolved';
|
|
117
|
+
anchors: Anchor[];
|
|
123
118
|
} | {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
119
|
+
kind: 'unresolved';
|
|
120
|
+
reason: 'not-found' | 'invalid' | 'lookup-error';
|
|
121
|
+
detail?: string;
|
|
127
122
|
};
|
|
128
123
|
type EmitCanaryOutcomeResult = {
|
|
129
|
-
|
|
130
|
-
|
|
124
|
+
kind: 'non-signal';
|
|
125
|
+
class: NonSignalClass;
|
|
131
126
|
} | {
|
|
132
|
-
|
|
127
|
+
kind: 'emitted';
|
|
133
128
|
} | {
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
kind: 'refused';
|
|
130
|
+
reason: 'emit-error';
|
|
136
131
|
} | {
|
|
132
|
+
kind: 'unresolved';
|
|
133
|
+
reason: Extract<CandidateAnchorResolution, {
|
|
137
134
|
kind: 'unresolved';
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}>['reason'];
|
|
141
|
-
detail?: string;
|
|
135
|
+
}>['reason'];
|
|
136
|
+
detail?: string;
|
|
142
137
|
};
|
|
143
138
|
type EmitCanaryOutcomeDetail = {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
139
|
+
benefit?: never;
|
|
140
|
+
candidateId?: never;
|
|
141
|
+
stepIndex?: never;
|
|
142
|
+
testId: string;
|
|
143
|
+
testIndex: number;
|
|
144
|
+
outcome: {
|
|
145
|
+
kind: 'rerun-excluded';
|
|
146
|
+
};
|
|
152
147
|
} | {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
148
|
+
benefit: CanaryOutcome['benefit'];
|
|
149
|
+
candidateId: RecordId;
|
|
150
|
+
testId: string;
|
|
151
|
+
testIndex: number;
|
|
152
|
+
stepIndex: number;
|
|
153
|
+
outcome: EmitCanaryOutcomeResult;
|
|
159
154
|
};
|
|
160
155
|
interface EmitCanaryOutcomeReport {
|
|
161
|
-
|
|
156
|
+
canary: CanaryCreditCounters;
|
|
157
|
+
emitted: number;
|
|
158
|
+
refused: number;
|
|
159
|
+
unresolved: number;
|
|
160
|
+
procedure: {
|
|
162
161
|
emitted: number;
|
|
163
162
|
refused: number;
|
|
164
163
|
unresolved: number;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
refused: number;
|
|
168
|
-
unresolved: number;
|
|
169
|
-
};
|
|
170
|
-
details: EmitCanaryOutcomeDetail[];
|
|
164
|
+
};
|
|
165
|
+
details: EmitCanaryOutcomeDetail[];
|
|
171
166
|
}
|
|
172
167
|
interface EmitCanaryOutcomesOptions {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
168
|
+
handoff: CompletedRunHandoff;
|
|
169
|
+
/** Absolute agent-qa-knowledge root used for store lookup and durable queue emission. */
|
|
170
|
+
knowledgeRoot: string;
|
|
171
|
+
/** Absolute completed-run directory retained to keep the two post-verdict emit seams aligned. */
|
|
172
|
+
runDir: string;
|
|
173
|
+
emit: (outcome: CanaryOutcome) => void;
|
|
179
174
|
}
|
|
180
175
|
/** Pure Pin-1 projection: identical handoff + canonical snapshot yields identical outcome bytes. */
|
|
181
|
-
declare function projectCanaryOutcomes(input: ProjectCanaryOutcomesInput): CanaryOutcome[];
|
|
176
|
+
export declare function projectCanaryOutcomes(input: ProjectCanaryOutcomesInput): CanaryOutcome[];
|
|
182
177
|
/** Resolves anchors read-only, sets each benefit, then emits every attribution in isolation. */
|
|
183
|
-
declare function emitCanaryOutcomes(opts: EmitCanaryOutcomesOptions): Promise<EmitCanaryOutcomeReport>;
|
|
184
|
-
|
|
178
|
+
export declare function emitCanaryOutcomes(opts: EmitCanaryOutcomesOptions): Promise<EmitCanaryOutcomeReport>;
|
|
185
179
|
interface EmitCurationCandidatesOptions {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
180
|
+
handoff: CompletedRunHandoff;
|
|
181
|
+
/** Absolute completed-run directory containing runner-local's blobs/ subdirectory. */
|
|
182
|
+
runDir: string;
|
|
183
|
+
/** Absolute agent-qa-knowledge root that owns the durable queue. */
|
|
184
|
+
knowledgeRoot: string;
|
|
185
|
+
mask?: MaskFn;
|
|
192
186
|
}
|
|
193
187
|
type EmitCandidateOutcome = EnqueueCurationCandidateProjectionOutcome | {
|
|
194
|
-
|
|
195
|
-
|
|
188
|
+
kind: 'refused';
|
|
189
|
+
reason: 'artifact-io-error';
|
|
196
190
|
};
|
|
197
191
|
interface EmitCandidateDetail {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
192
|
+
candidateId?: string;
|
|
193
|
+
/** The projecting candidate's kind: per-kind outcome attribution from the report alone. */
|
|
194
|
+
kind: CurationCandidateProjection['kind'];
|
|
195
|
+
outcome: EmitCandidateOutcome;
|
|
202
196
|
}
|
|
203
197
|
interface EmitReport {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
198
|
+
enqueued: number;
|
|
199
|
+
coalesced: number;
|
|
200
|
+
capExceeded: number;
|
|
201
|
+
refused: number;
|
|
202
|
+
details: EmitCandidateDetail[];
|
|
209
203
|
}
|
|
210
204
|
/**
|
|
211
205
|
* Resolves runner-local artifact blobs and synchronously publishes each candidate in isolation.
|
|
212
206
|
* Queue publication owns temp-write, fsync, cap enforcement, and atomic rename semantics.
|
|
213
207
|
*/
|
|
214
208
|
declare function emitCurationCandidates(opts: EmitCurationCandidatesOptions): EmitReport;
|
|
215
|
-
|
|
216
209
|
type RunCurationContext = {
|
|
217
|
-
|
|
218
|
-
|
|
210
|
+
readonly mask: MaskFn;
|
|
211
|
+
readonly knowledgeRoot: string;
|
|
219
212
|
} | {
|
|
220
|
-
|
|
213
|
+
readonly handBack: string;
|
|
221
214
|
};
|
|
222
215
|
declare function resolveRunCurationContext(input: {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
216
|
+
readonly agentQaRoot: string;
|
|
217
|
+
readonly runId: string;
|
|
218
|
+
readonly drainerKnowledgeRoot: string;
|
|
226
219
|
}): Promise<RunCurationContext>;
|
|
227
|
-
|
|
228
|
-
declare const CURATION_TAIL_RECEIPT_FILE = "curation-tail-receipt.json";
|
|
220
|
+
export declare const CURATION_TAIL_RECEIPT_FILE = "curation-tail-receipt.json";
|
|
229
221
|
/** The receipt's key set and stamp must match exactly; anything else refolds the run once. */
|
|
230
|
-
declare const CURATION_TAIL_RECEIPT_SCHEMA_VERSION = 2;
|
|
222
|
+
export declare const CURATION_TAIL_RECEIPT_SCHEMA_VERSION = 2;
|
|
231
223
|
interface CurationTailReceipt {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
224
|
+
/** Fixed successful membership; absent on handed-off receipts and when no validated snapshot was recorded. */
|
|
225
|
+
snapshot?: CurationSnapshot;
|
|
226
|
+
/** Counts recorded beside the snapshot. */
|
|
227
|
+
curated?: number;
|
|
228
|
+
deprecated?: number;
|
|
229
|
+
canary: CanaryCreditCounters;
|
|
230
|
+
schemaVersion: typeof CURATION_TAIL_RECEIPT_SCHEMA_VERSION;
|
|
231
|
+
runId: string;
|
|
232
|
+
handoffDigest: string;
|
|
233
|
+
projectionVersion: number;
|
|
234
|
+
drainKind: 'drained' | 'handed-off';
|
|
235
|
+
/** The standing writer that accepted the handoff; null when this run drained inline. */
|
|
236
|
+
handoffHolderPid: number | null;
|
|
237
|
+
/** Stable run-side provenance, ordered before the receipt bytes are committed. */
|
|
238
|
+
candidateIds: string[];
|
|
247
239
|
}
|
|
248
240
|
type CurationTailModelDeps = Pick<BuildCuratorAuthorDependencies, 'profile' | 'auth'>;
|
|
249
241
|
interface CurationTailLogger {
|
|
250
|
-
|
|
251
|
-
|
|
242
|
+
warn(message: string): void;
|
|
243
|
+
info?(message: string): void;
|
|
252
244
|
}
|
|
253
245
|
interface CurationTailOperations {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
246
|
+
loadCompletedRunHandoff: typeof loadCompletedRunHandoff;
|
|
247
|
+
resolveKnowledgeRoot: typeof resolveKnowledgeRoot;
|
|
248
|
+
runSafetyScope: typeof runSafetyScope;
|
|
249
|
+
emitCurationCandidates: typeof emitCurationCandidates;
|
|
250
|
+
openKnowledgeReader(config: OpenServingKnowledgeReaderConfig): KnowledgeHintReader;
|
|
251
|
+
emitCanaryOutcomes: typeof emitCanaryOutcomes;
|
|
252
|
+
foldRunOutcomes: LocalCurationCapabilities['foldRunOutcomes'];
|
|
253
|
+
reconcileRunOutcomesProjection: LocalCurationCapabilities['reconcileRunOutcomesProjection'];
|
|
254
|
+
acquireWriterLease: LocalCurationCapabilities['maintenance']['acquireWriterLease'];
|
|
255
|
+
releaseLease: LocalCurationCapabilities['maintenance']['releaseLease'];
|
|
256
|
+
buildCuratorAuthor: typeof buildCuratorAuthor;
|
|
257
|
+
drainQueue: LocalCurationCapabilities['drainQueue'];
|
|
258
|
+
listCompletedRunDirs(agentQaRoot: string): string[];
|
|
259
|
+
readCurationTailReceipt(runDir: string): CurationTailReceipt | undefined;
|
|
260
|
+
writeCurationTailReceipt(runDir: string, receipt: CurationTailReceipt): void;
|
|
261
|
+
nudgeDaemon: typeof nudgeDaemon;
|
|
262
|
+
resolveRunCurationContext: typeof resolveRunCurationContext;
|
|
271
263
|
}
|
|
272
264
|
interface CurationWriterAuthority {
|
|
273
|
-
|
|
274
|
-
|
|
265
|
+
leaseId: string;
|
|
266
|
+
epoch: number;
|
|
275
267
|
}
|
|
276
268
|
interface RunCurationTailOptions {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
269
|
+
runId: string;
|
|
270
|
+
/** Absolute `.agent-qa` runtime root the run handoff lives under. */
|
|
271
|
+
agentQaRoot: string;
|
|
272
|
+
knowledgeConfig: {
|
|
273
|
+
dir: string;
|
|
274
|
+
};
|
|
275
|
+
configDir: string;
|
|
276
|
+
mask?: MaskFn;
|
|
277
|
+
/** The exact already-resolved planner profile and auth used by the run. */
|
|
278
|
+
modelDeps?: CurationTailModelDeps;
|
|
279
|
+
signal?: AbortSignal;
|
|
280
|
+
log: CurationTailLogger;
|
|
281
|
+
authority?: CurationWriterAuthority;
|
|
282
|
+
deadlineMs?: number;
|
|
283
|
+
/** Focused test seam. Production callers omit it. */
|
|
284
|
+
operations?: Partial<CurationTailOperations>;
|
|
293
285
|
}
|
|
294
|
-
declare function curationTailHandoffDigest(handoff: unknown): string;
|
|
286
|
+
export declare function curationTailHandoffDigest(handoff: unknown): string;
|
|
295
287
|
/**
|
|
296
288
|
* Run the post-verdict curation fold. The caller fixes its exit code before awaiting this function;
|
|
297
289
|
* every failure is logged here and intentionally resolves so learning can never change the verdict.
|
|
298
290
|
*/
|
|
299
|
-
declare function runCurationTail(opts: RunCurationTailOptions): Promise<void>;
|
|
291
|
+
export declare function runCurationTail(opts: RunCurationTailOptions): Promise<void>;
|
|
300
292
|
interface RunVerdictFirstCurationTailOptions {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
293
|
+
/** The complete verdict-derived process code, fixed before the tail begins. */
|
|
294
|
+
exitCode: number;
|
|
295
|
+
detach: boolean;
|
|
296
|
+
enqueue?(): Promise<void>;
|
|
297
|
+
runTail(): Promise<void>;
|
|
298
|
+
finish?(input: {
|
|
299
|
+
detached: boolean;
|
|
300
|
+
}): Promise<void>;
|
|
301
|
+
/** Defensive call-site boundary; runCurationTail itself already never rejects. */
|
|
302
|
+
onUnexpectedError?(error: unknown): void;
|
|
311
303
|
}
|
|
312
304
|
/** Await the optional tail without permitting it to replace the already-fixed verdict code. */
|
|
313
|
-
declare function runVerdictFirstCurationTail(opts: RunVerdictFirstCurationTailOptions): Promise<number>;
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
export { type BuildCuratorAuthorDependencies, CURATION_TAIL_RECEIPT_FILE, CURATION_TAIL_RECEIPT_SCHEMA_VERSION, CURATOR_MAX_NEIGHBORS, CURATOR_RETRY_CAP, ConfigFileNotFoundError, ConfigFileNotYamlError, type CurationTailLogger, type CurationTailModelDeps, type CurationTailOperations, type CurationTailReceipt, type EmitCanaryOutcomeDetail, type EmitCanaryOutcomeReport, type EmitCanaryOutcomeResult, type EmitCanaryOutcomesOptions, type ProjectCanaryOutcomesInput, type ResolvedTarget, type RunCurationTailOptions, type RunVerdictFirstCurationTailOptions, type TargetSummary, VERSION, buildCuratorAuthor, curationTailHandoffDigest, deepMerge, emitCanaryOutcomes, formatConfigDebug, listTargets, loadConfigFile, loadConfigPlugins, loadEnvOverrides, loadRequiredConfigFile, mergeConfigs, mergeUseBlocks, mergeWithTestConfig, normalizeConfigForValidation, projectCanaryOutcomes, purgeAll, readAnalyticsPrivacyDeclaration, resolveConfig, resolveConfiguredKnowledgeRoot, resolveRawConfigKnowledgeRoot, resolveTarget, runCurationTail, runVerdictFirstCurationTail };
|
|
305
|
+
export declare function runVerdictFirstCurationTail(opts: RunVerdictFirstCurationTailOptions): Promise<number>;
|
|
306
|
+
export declare const VERSION: string;
|
|
307
|
+
export type { BuildCuratorAuthorDependencies, CurationTailLogger, CurationTailModelDeps, CurationTailOperations, CurationTailReceipt, EmitCanaryOutcomeDetail, EmitCanaryOutcomeReport, EmitCanaryOutcomeResult, EmitCanaryOutcomesOptions, ProjectCanaryOutcomesInput, RunCurationTailOptions, RunVerdictFirstCurationTailOptions };
|