@mcoda/mswarm 0.1.89 → 0.1.91
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/codali-executor.d.ts +107 -6
- package/dist/codali-executor.d.ts.map +1 -1
- package/dist/codali-executor.js +500 -26
- package/dist/codali-executor.js.map +1 -1
- package/dist/runtime.d.ts +6 -3
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +18 -5
- package/dist/runtime.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +18 -3
- package/dist/server.js.map +1 -1
- package/dist/vendor/codali/cli/DatasetCommand.d.ts +38 -0
- package/dist/vendor/codali/cli/DatasetCommand.d.ts.map +1 -0
- package/dist/vendor/codali/cli/DatasetCommand.js +959 -0
- package/dist/vendor/codali/cli/EvalCommand.d.ts +3 -0
- package/dist/vendor/codali/cli/EvalCommand.d.ts.map +1 -1
- package/dist/vendor/codali/cli/EvalCommand.js +55 -1
- package/dist/vendor/codali/cli/ImprovementCommand.d.ts +97 -0
- package/dist/vendor/codali/cli/ImprovementCommand.d.ts.map +1 -0
- package/dist/vendor/codali/cli/ImprovementCommand.js +1879 -0
- package/dist/vendor/codali/cli.d.ts.map +1 -1
- package/dist/vendor/codali/cli.js +15 -0
- package/dist/vendor/codali/dataset-cli.d.ts +3 -0
- package/dist/vendor/codali/dataset-cli.d.ts.map +1 -0
- package/dist/vendor/codali/dataset-cli.js +30 -0
- package/dist/vendor/codali/eval/CodaliGatewayLiveHarness.d.ts +90 -1
- package/dist/vendor/codali/eval/CodaliGatewayLiveHarness.d.ts.map +1 -1
- package/dist/vendor/codali/eval/CodaliGatewayLiveHarness.js +443 -9
- package/dist/vendor/codali/eval/GatewayDatasetEval.d.ts +70 -0
- package/dist/vendor/codali/eval/GatewayDatasetEval.d.ts.map +1 -0
- package/dist/vendor/codali/eval/GatewayDatasetEval.js +477 -0
- package/dist/vendor/codali/eval/GatewayEvalSuite.d.ts +52 -0
- package/dist/vendor/codali/eval/GatewayEvalSuite.d.ts.map +1 -1
- package/dist/vendor/codali/eval/GatewayEvalSuite.js +135 -1
- package/dist/vendor/codali/gateway/CodaliGateway.d.ts +4 -0
- package/dist/vendor/codali/gateway/CodaliGateway.d.ts.map +1 -1
- package/dist/vendor/codali/gateway/CodaliGateway.js +37 -1
- package/dist/vendor/codali/gateway/CodaliGatewaySchemas.d.ts.map +1 -1
- package/dist/vendor/codali/gateway/CodaliGatewaySchemas.js +0 -4
- package/dist/vendor/codali/gateway/CodaliGatewayStore.d.ts.map +1 -1
- package/dist/vendor/codali/gateway/CodaliGatewayStore.js +1 -0
- package/dist/vendor/codali/gateway/GatewayPlanner.d.ts.map +1 -1
- package/dist/vendor/codali/gateway/GatewayPlanner.js +355 -41
- package/dist/vendor/codali/gateway/GatewayStateMachine.d.ts +1 -0
- package/dist/vendor/codali/gateway/GatewayStateMachine.d.ts.map +1 -1
- package/dist/vendor/codali/gateway/GatewayStateMachine.js +221 -5
- package/dist/vendor/codali/improvement/CandidateReleaseBuilder.d.ts +201 -0
- package/dist/vendor/codali/improvement/CandidateReleaseBuilder.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/CandidateReleaseBuilder.js +1175 -0
- package/dist/vendor/codali/improvement/DatasetEligibilityGate.d.ts +75 -0
- package/dist/vendor/codali/improvement/DatasetEligibilityGate.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/DatasetEligibilityGate.js +497 -0
- package/dist/vendor/codali/improvement/DatasetExportManifestReader.d.ts +88 -0
- package/dist/vendor/codali/improvement/DatasetExportManifestReader.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/DatasetExportManifestReader.js +333 -0
- package/dist/vendor/codali/improvement/DocdexRetrievalCandidateBuilder.d.ts +192 -0
- package/dist/vendor/codali/improvement/DocdexRetrievalCandidateBuilder.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/DocdexRetrievalCandidateBuilder.js +625 -0
- package/dist/vendor/codali/improvement/EvalReplayCandidateBuilder.d.ts +173 -0
- package/dist/vendor/codali/improvement/EvalReplayCandidateBuilder.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/EvalReplayCandidateBuilder.js +363 -0
- package/dist/vendor/codali/improvement/FineTuneJobPlanner.d.ts +281 -0
- package/dist/vendor/codali/improvement/FineTuneJobPlanner.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/FineTuneJobPlanner.js +823 -0
- package/dist/vendor/codali/improvement/ImprovementEvalRunner.d.ts +50 -0
- package/dist/vendor/codali/improvement/ImprovementEvalRunner.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/ImprovementEvalRunner.js +648 -0
- package/dist/vendor/codali/improvement/ImprovementPolicy.d.ts +272 -0
- package/dist/vendor/codali/improvement/ImprovementPolicy.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/ImprovementPolicy.js +1450 -0
- package/dist/vendor/codali/improvement/ModelRouterCandidateBuilder.d.ts +186 -0
- package/dist/vendor/codali/improvement/ModelRouterCandidateBuilder.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/ModelRouterCandidateBuilder.js +880 -0
- package/dist/vendor/codali/improvement/OperatorInspector.d.ts +182 -0
- package/dist/vendor/codali/improvement/OperatorInspector.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/OperatorInspector.js +604 -0
- package/dist/vendor/codali/improvement/ProductionGovernance.d.ts +91 -0
- package/dist/vendor/codali/improvement/ProductionGovernance.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/ProductionGovernance.js +329 -0
- package/dist/vendor/codali/improvement/PromptSchemaToolMetadataCandidateBuilder.d.ts +152 -0
- package/dist/vendor/codali/improvement/PromptSchemaToolMetadataCandidateBuilder.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/PromptSchemaToolMetadataCandidateBuilder.js +480 -0
- package/dist/vendor/codali/improvement/PublishOrchestrator.d.ts +113 -0
- package/dist/vendor/codali/improvement/PublishOrchestrator.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/PublishOrchestrator.js +590 -0
- package/dist/vendor/codali/improvement/ReleaseOutcomeReporter.d.ts +133 -0
- package/dist/vendor/codali/improvement/ReleaseOutcomeReporter.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/ReleaseOutcomeReporter.js +501 -0
- package/dist/vendor/codali/improvement/StorageServiceImprovementClient.d.ts +71 -0
- package/dist/vendor/codali/improvement/StorageServiceImprovementClient.d.ts.map +1 -0
- package/dist/vendor/codali/improvement/StorageServiceImprovementClient.js +245 -0
- package/dist/vendor/codali/index.d.ts +43 -0
- package/dist/vendor/codali/index.d.ts.map +1 -1
- package/dist/vendor/codali/index.js +21 -0
- package/dist/vendor/codali/runtime/CodaliRuntime.d.ts +0 -2
- package/dist/vendor/codali/runtime/CodaliRuntime.d.ts.map +1 -1
- package/dist/vendor/codali/runtime/CodaliRuntime.js +0 -5
- package/dist/vendor/codali/storage/CodaliDatasetPrivacyEngine.d.ts +138 -0
- package/dist/vendor/codali/storage/CodaliDatasetPrivacyEngine.d.ts.map +1 -0
- package/dist/vendor/codali/storage/CodaliDatasetPrivacyEngine.js +417 -0
- package/dist/vendor/codali/storage/CodaliFeedbackReviewIngestion.d.ts +50 -0
- package/dist/vendor/codali/storage/CodaliFeedbackReviewIngestion.d.ts.map +1 -0
- package/dist/vendor/codali/storage/CodaliFeedbackReviewIngestion.js +141 -0
- package/dist/vendor/codali/storage/CodaliStorageContracts.d.ts +337 -0
- package/dist/vendor/codali/storage/CodaliStorageContracts.d.ts.map +1 -0
- package/dist/vendor/codali/storage/CodaliStorageContracts.js +1555 -0
- package/dist/vendor/codali/storage/DatasetExportJob.d.ts +51 -0
- package/dist/vendor/codali/storage/DatasetExportJob.d.ts.map +1 -0
- package/dist/vendor/codali/storage/DatasetExportJob.js +358 -0
- package/dist/vendor/codali/storage/DatasetReviewQueue.d.ts +98 -0
- package/dist/vendor/codali/storage/DatasetReviewQueue.d.ts.map +1 -0
- package/dist/vendor/codali/storage/DatasetReviewQueue.js +426 -0
- package/dist/vendor/codali/storage/GatewayDatasetStore.d.ts +233 -0
- package/dist/vendor/codali/storage/GatewayDatasetStore.d.ts.map +1 -0
- package/dist/vendor/codali/storage/GatewayDatasetStore.js +2070 -0
- package/package.json +3 -3
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { readdir, readFile, stat } from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { validateCodaliStorageExportManifest, } from "../storage/CodaliStorageContracts.js";
|
|
6
|
+
import { curateDatasetExportForImprovement, } from "./DatasetEligibilityGate.js";
|
|
7
|
+
export const CODALI_IMPROVEMENT_MANIFEST_READER_SCHEMA_VERSION = "codali.improvement.manifest_reader.v1";
|
|
8
|
+
export const CODALI_IMPROVEMENT_SUPPORTED_EXPORT_KINDS = [
|
|
9
|
+
"eval-replay",
|
|
10
|
+
"model-router",
|
|
11
|
+
"prompt-regression",
|
|
12
|
+
"query-expander-sft",
|
|
13
|
+
"rag-reranker",
|
|
14
|
+
];
|
|
15
|
+
export class DatasetExportManifestReaderError extends Error {
|
|
16
|
+
constructor(code, message, issues) {
|
|
17
|
+
super(`${code}: ${message}`);
|
|
18
|
+
this.name = "DatasetExportManifestReaderError";
|
|
19
|
+
this.code = code;
|
|
20
|
+
this.issues = issues;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const isRecord = (value) => Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
24
|
+
const sha256Hex = (input) => createHash("sha256").update(input).digest("hex");
|
|
25
|
+
const contentHash = (input) => `sha256:${sha256Hex(input)}`;
|
|
26
|
+
const pathExists = async (value) => {
|
|
27
|
+
try {
|
|
28
|
+
await stat(value);
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const normalizePath = (value) => value.startsWith("file://") ? fileURLToPath(value) : path.resolve(value);
|
|
36
|
+
const defaultSearchDirectories = () => [
|
|
37
|
+
path.resolve(".codali", "dataset", "exports", "objects"),
|
|
38
|
+
path.resolve(".codali", "dataset", "exports"),
|
|
39
|
+
path.resolve(".codali", "dataset"),
|
|
40
|
+
];
|
|
41
|
+
const readJsonFile = async (filePath) => {
|
|
42
|
+
const raw = await readFile(filePath, "utf8");
|
|
43
|
+
try {
|
|
44
|
+
return JSON.parse(raw);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
throw new DatasetExportManifestReaderError("CODALI_DATASET_EXPORT_MANIFEST_JSON_INVALID", error instanceof Error ? error.message : String(error));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const maybeManifestId = (value) => {
|
|
51
|
+
if (!isRecord(value))
|
|
52
|
+
return undefined;
|
|
53
|
+
const manifestId = value.manifestId ?? value.manifest_id;
|
|
54
|
+
return typeof manifestId === "string" && manifestId.trim()
|
|
55
|
+
? manifestId.trim()
|
|
56
|
+
: undefined;
|
|
57
|
+
};
|
|
58
|
+
const findManifestByExportId = async (directory, exportId) => {
|
|
59
|
+
const root = path.resolve(directory);
|
|
60
|
+
if (!(await pathExists(root)))
|
|
61
|
+
return undefined;
|
|
62
|
+
const stack = [root];
|
|
63
|
+
let inspected = 0;
|
|
64
|
+
while (stack.length > 0) {
|
|
65
|
+
const current = stack.pop();
|
|
66
|
+
if (!current)
|
|
67
|
+
continue;
|
|
68
|
+
const entries = (await readdir(current, { withFileTypes: true }))
|
|
69
|
+
.sort((left, right) => left.name.localeCompare(right.name));
|
|
70
|
+
for (const entry of entries) {
|
|
71
|
+
const entryPath = path.join(current, entry.name);
|
|
72
|
+
if (entry.isDirectory()) {
|
|
73
|
+
stack.push(entryPath);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (!entry.isFile() || !entry.name.endsWith(".json"))
|
|
77
|
+
continue;
|
|
78
|
+
inspected += 1;
|
|
79
|
+
if (inspected > 5000) {
|
|
80
|
+
throw new DatasetExportManifestReaderError("CODALI_DATASET_EXPORT_MANIFEST_SEARCH_LIMIT", `Manifest search inspected too many files under ${root}.`);
|
|
81
|
+
}
|
|
82
|
+
try {
|
|
83
|
+
const raw = await readFile(entryPath, "utf8");
|
|
84
|
+
const parsed = JSON.parse(raw);
|
|
85
|
+
if (maybeManifestId(parsed) === exportId)
|
|
86
|
+
return entryPath;
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
// Object payload files can be JSONL or plain text. Ignore non-manifest files.
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return undefined;
|
|
94
|
+
};
|
|
95
|
+
const resolveManifestPath = async (input) => {
|
|
96
|
+
if (input.manifestPath) {
|
|
97
|
+
const manifestPath = normalizePath(input.manifestPath);
|
|
98
|
+
if (!(await pathExists(manifestPath))) {
|
|
99
|
+
throw new DatasetExportManifestReaderError("CODALI_DATASET_EXPORT_MANIFEST_NOT_FOUND", `Manifest file not found: ${manifestPath}.`);
|
|
100
|
+
}
|
|
101
|
+
return manifestPath;
|
|
102
|
+
}
|
|
103
|
+
const exportId = input.exportId?.trim();
|
|
104
|
+
if (!exportId) {
|
|
105
|
+
throw new DatasetExportManifestReaderError("CODALI_DATASET_EXPORT_ID_REQUIRED", "An export id or manifest path is required.");
|
|
106
|
+
}
|
|
107
|
+
const directPath = normalizePath(exportId);
|
|
108
|
+
if (await pathExists(directPath))
|
|
109
|
+
return directPath;
|
|
110
|
+
const directories = [
|
|
111
|
+
...(input.directory ? [input.directory] : []),
|
|
112
|
+
...defaultSearchDirectories(),
|
|
113
|
+
];
|
|
114
|
+
for (const directory of directories) {
|
|
115
|
+
const directManifest = path.resolve(directory, `${exportId}.json`);
|
|
116
|
+
if (await pathExists(directManifest))
|
|
117
|
+
return directManifest;
|
|
118
|
+
const found = await findManifestByExportId(directory, exportId);
|
|
119
|
+
if (found)
|
|
120
|
+
return found;
|
|
121
|
+
}
|
|
122
|
+
throw new DatasetExportManifestReaderError("CODALI_DATASET_EXPORT_MANIFEST_NOT_FOUND", `No export manifest found for export id ${exportId}.`);
|
|
123
|
+
};
|
|
124
|
+
const validateManifest = async (manifestPath) => {
|
|
125
|
+
const parsed = await readJsonFile(manifestPath);
|
|
126
|
+
const validation = validateCodaliStorageExportManifest(parsed);
|
|
127
|
+
if (!validation.ok) {
|
|
128
|
+
throw new DatasetExportManifestReaderError("CODALI_DATASET_EXPORT_MANIFEST_INVALID", validation.issues.map((issue) => `${issue.path}:${issue.code}`).join("; "), validation.issues);
|
|
129
|
+
}
|
|
130
|
+
return validation.value;
|
|
131
|
+
};
|
|
132
|
+
const objectRefPath = (ref) => {
|
|
133
|
+
if (!ref.uri?.startsWith("file://")) {
|
|
134
|
+
throw new DatasetExportManifestReaderError("CODALI_DATASET_EXPORT_ARTIFACT_URI_UNSUPPORTED", `Artifact ${ref.refId} does not have a readable file:// URI.`);
|
|
135
|
+
}
|
|
136
|
+
return fileURLToPath(ref.uri);
|
|
137
|
+
};
|
|
138
|
+
const parseArtifactPayload = (ref, raw) => {
|
|
139
|
+
const text = raw.toString("utf8");
|
|
140
|
+
if (ref.mimeType === "application/x-ndjson" || ref.mediaType === "jsonl") {
|
|
141
|
+
const lines = text.trimEnd().length ? text.trimEnd().split(/\r?\n/) : [];
|
|
142
|
+
const rows = lines.map((line) => JSON.parse(line));
|
|
143
|
+
return {
|
|
144
|
+
summary: {
|
|
145
|
+
payloadKind: "jsonl",
|
|
146
|
+
rowCount: rows.length,
|
|
147
|
+
byteSize: raw.byteLength,
|
|
148
|
+
},
|
|
149
|
+
rows,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
if (ref.mimeType === "application/json" || ref.mediaType === "json") {
|
|
153
|
+
const parsed = text.trim().length ? JSON.parse(text) : undefined;
|
|
154
|
+
const rows = isRecord(parsed) && Array.isArray(parsed.records)
|
|
155
|
+
? parsed.records
|
|
156
|
+
: [];
|
|
157
|
+
return {
|
|
158
|
+
summary: {
|
|
159
|
+
payloadKind: "json",
|
|
160
|
+
rowCount: rows.length || undefined,
|
|
161
|
+
byteSize: raw.byteLength,
|
|
162
|
+
},
|
|
163
|
+
rows,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
summary: {
|
|
168
|
+
payloadKind: "text",
|
|
169
|
+
byteSize: raw.byteLength,
|
|
170
|
+
},
|
|
171
|
+
rows: [],
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
const verifyArtifact = async (ref, expectedHash) => {
|
|
175
|
+
const filePath = objectRefPath(ref);
|
|
176
|
+
const raw = await readFile(filePath);
|
|
177
|
+
const actualHash = contentHash(raw);
|
|
178
|
+
if (actualHash !== ref.contentHash || (expectedHash && actualHash !== expectedHash)) {
|
|
179
|
+
throw new DatasetExportManifestReaderError("CODALI_DATASET_EXPORT_ARTIFACT_CHECKSUM_MISMATCH", `Artifact ${ref.refId} checksum mismatch.`);
|
|
180
|
+
}
|
|
181
|
+
if (ref.byteSize !== raw.byteLength) {
|
|
182
|
+
throw new DatasetExportManifestReaderError("CODALI_DATASET_EXPORT_ARTIFACT_SIZE_MISMATCH", `Artifact ${ref.refId} byte size mismatch.`);
|
|
183
|
+
}
|
|
184
|
+
const parsed = parseArtifactPayload(ref, raw);
|
|
185
|
+
return {
|
|
186
|
+
artifact: {
|
|
187
|
+
ref,
|
|
188
|
+
path: filePath,
|
|
189
|
+
contentHash: actualHash,
|
|
190
|
+
byteSize: raw.byteLength,
|
|
191
|
+
payloadSummary: parsed.summary,
|
|
192
|
+
},
|
|
193
|
+
rows: parsed.rows,
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
const primaryArtifactRef = (manifest) => {
|
|
197
|
+
const matching = manifest.artifactRefs.find((ref) => ref.contentHash === manifest.checksum);
|
|
198
|
+
if (!matching) {
|
|
199
|
+
throw new DatasetExportManifestReaderError("CODALI_DATASET_EXPORT_ARTIFACT_MISSING", "Export manifest checksum does not point at a manifest artifact.");
|
|
200
|
+
}
|
|
201
|
+
return matching;
|
|
202
|
+
};
|
|
203
|
+
const uniqueStrings = (values) => Array.from(new Set(values.filter((value) => typeof value === "string" && value.trim().length > 0))).sort();
|
|
204
|
+
const buildProvenance = (input) => ({
|
|
205
|
+
schemaVersion: CODALI_IMPROVEMENT_MANIFEST_READER_SCHEMA_VERSION,
|
|
206
|
+
exportId: input.exportId,
|
|
207
|
+
manifestId: input.manifest.manifestId,
|
|
208
|
+
manifestPath: input.manifestPath,
|
|
209
|
+
exportKind: input.manifest.exportKind,
|
|
210
|
+
exportFormat: input.manifest.exportFormat,
|
|
211
|
+
checksum: input.manifest.checksum,
|
|
212
|
+
recordCount: input.manifest.recordCount,
|
|
213
|
+
sourceRecordIds: uniqueStrings([
|
|
214
|
+
...(input.acceptedRecordIds ?? input.manifest.lineage.sourceRecordIds),
|
|
215
|
+
]),
|
|
216
|
+
sourceGatewayRecordIds: uniqueStrings([
|
|
217
|
+
...(input.acceptedGatewayRecordIds ?? input.manifest.lineage.sourceGatewayRecordIds ?? []),
|
|
218
|
+
]),
|
|
219
|
+
sourceObjectHashes: uniqueStrings(input.manifest.lineage.sourceObjectHashes),
|
|
220
|
+
deletionGroupIds: uniqueStrings([
|
|
221
|
+
...(input.acceptedDeletionGroupIds ?? input.manifest.deletionGroupSnapshot.deletionGroupIds),
|
|
222
|
+
]),
|
|
223
|
+
artifactRefs: input.manifest.artifactRefs.map((ref) => ({
|
|
224
|
+
refId: ref.refId,
|
|
225
|
+
contentHash: ref.contentHash,
|
|
226
|
+
byteSize: ref.byteSize,
|
|
227
|
+
mimeType: ref.mimeType,
|
|
228
|
+
...(ref.uri ? { uri: ref.uri } : {}),
|
|
229
|
+
})),
|
|
230
|
+
...(input.manifest.generatedBy ? { generatedBy: input.manifest.generatedBy } : {}),
|
|
231
|
+
primaryArtifactRefId: input.primaryArtifactRef.refId,
|
|
232
|
+
primaryArtifactContentHash: input.primaryArtifactContentHash,
|
|
233
|
+
});
|
|
234
|
+
const candidateKindForExport = (exportKind) => {
|
|
235
|
+
if (exportKind === "eval-replay")
|
|
236
|
+
return "eval_replay";
|
|
237
|
+
if (exportKind === "model-router")
|
|
238
|
+
return "model_router";
|
|
239
|
+
if (exportKind === "prompt-regression")
|
|
240
|
+
return "prompt";
|
|
241
|
+
return undefined;
|
|
242
|
+
};
|
|
243
|
+
const candidateIdForProvenance = (provenance) => `candidate-${sha256Hex(JSON.stringify({
|
|
244
|
+
exportId: provenance.exportId,
|
|
245
|
+
checksum: provenance.checksum,
|
|
246
|
+
sourceRecordIds: provenance.sourceRecordIds,
|
|
247
|
+
})).slice(0, 16)}`;
|
|
248
|
+
const buildCandidates = (provenance, curationReport) => {
|
|
249
|
+
const candidateKind = candidateKindForExport(provenance.exportKind);
|
|
250
|
+
if (!candidateKind ||
|
|
251
|
+
!curationReport.artifactReadAllowed ||
|
|
252
|
+
!curationReport.lineageValid ||
|
|
253
|
+
curationReport.acceptedCount === 0) {
|
|
254
|
+
return [];
|
|
255
|
+
}
|
|
256
|
+
return [{
|
|
257
|
+
candidateId: candidateIdForProvenance(provenance),
|
|
258
|
+
candidateKind,
|
|
259
|
+
status: "proposed",
|
|
260
|
+
sourceExportIds: [provenance.manifestId],
|
|
261
|
+
sourceRecordIds: provenance.sourceRecordIds,
|
|
262
|
+
artifactIds: provenance.artifactRefs.map((ref) => ref.refId),
|
|
263
|
+
exampleCount: curationReport.acceptedCount,
|
|
264
|
+
objectBytes: provenance.artifactRefs.reduce((total, ref) => total + ref.byteSize, 0),
|
|
265
|
+
provenance,
|
|
266
|
+
}];
|
|
267
|
+
};
|
|
268
|
+
const unsupportedWarnings = (manifest, supportedKinds) => supportedKinds.includes(manifest.exportKind)
|
|
269
|
+
? []
|
|
270
|
+
: [{
|
|
271
|
+
code: "unsupported_export_kind",
|
|
272
|
+
exportKind: manifest.exportKind,
|
|
273
|
+
message: `Export kind ${manifest.exportKind} is not supported for improvement candidate generation.`,
|
|
274
|
+
}];
|
|
275
|
+
export class DatasetExportManifestReader {
|
|
276
|
+
async inspect(input) {
|
|
277
|
+
const manifestPath = await resolveManifestPath(input);
|
|
278
|
+
const manifest = await validateManifest(manifestPath);
|
|
279
|
+
const primaryRef = primaryArtifactRef(manifest);
|
|
280
|
+
const exportId = input.exportId?.trim() || manifest.manifestId;
|
|
281
|
+
const preflightReport = curateDatasetExportForImprovement({
|
|
282
|
+
exportId,
|
|
283
|
+
manifest,
|
|
284
|
+
primaryArtifactRef: primaryRef,
|
|
285
|
+
allowedArtifactTypes: input.allowedExampleArtifactTypes,
|
|
286
|
+
revokedDeletionGroupIds: input.revokedDeletionGroupIds,
|
|
287
|
+
});
|
|
288
|
+
const verified = preflightReport.artifactReadAllowed
|
|
289
|
+
? await verifyArtifact(primaryRef, manifest.checksum)
|
|
290
|
+
: undefined;
|
|
291
|
+
const curationReport = verified
|
|
292
|
+
? curateDatasetExportForImprovement({
|
|
293
|
+
exportId,
|
|
294
|
+
manifest,
|
|
295
|
+
primaryArtifactRef: primaryRef,
|
|
296
|
+
rows: verified.rows,
|
|
297
|
+
allowedArtifactTypes: input.allowedExampleArtifactTypes,
|
|
298
|
+
revokedDeletionGroupIds: input.revokedDeletionGroupIds,
|
|
299
|
+
})
|
|
300
|
+
: preflightReport;
|
|
301
|
+
const provenance = buildProvenance({
|
|
302
|
+
exportId,
|
|
303
|
+
manifestPath,
|
|
304
|
+
manifest,
|
|
305
|
+
primaryArtifactRef: primaryRef,
|
|
306
|
+
primaryArtifactContentHash: verified?.artifact.contentHash ?? primaryRef.contentHash,
|
|
307
|
+
acceptedRecordIds: curationReport.acceptedRecordIds,
|
|
308
|
+
acceptedGatewayRecordIds: curationReport.accepted
|
|
309
|
+
.map((example) => example.sourceGatewayRecordId)
|
|
310
|
+
.filter((value) => Boolean(value)),
|
|
311
|
+
acceptedDeletionGroupIds: uniqueStrings(curationReport.accepted
|
|
312
|
+
.flatMap((example) => example.deletionGroupIds)),
|
|
313
|
+
});
|
|
314
|
+
const supportedKinds = input.supportedExportKinds ??
|
|
315
|
+
CODALI_IMPROVEMENT_SUPPORTED_EXPORT_KINDS;
|
|
316
|
+
const warnings = unsupportedWarnings(manifest, supportedKinds);
|
|
317
|
+
return {
|
|
318
|
+
schemaVersion: CODALI_IMPROVEMENT_MANIFEST_READER_SCHEMA_VERSION,
|
|
319
|
+
exportId,
|
|
320
|
+
manifestPath,
|
|
321
|
+
manifest,
|
|
322
|
+
...(verified ? { primaryArtifact: verified.artifact } : {}),
|
|
323
|
+
primaryArtifactRows: verified?.rows ?? [],
|
|
324
|
+
provenance,
|
|
325
|
+
candidates: warnings.some((warning) => warning.code === "unsupported_export_kind")
|
|
326
|
+
? []
|
|
327
|
+
: buildCandidates(provenance, curationReport),
|
|
328
|
+
warnings,
|
|
329
|
+
curationReport,
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
export const inspectDatasetExportManifestForImprovement = (input) => new DatasetExportManifestReader().inspect(input);
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type { CodaliStorageDatasetKind, CodaliStorageExportKind, CodaliStorageObjectPrivacyFlags } from "../storage/CodaliStorageContracts.js";
|
|
2
|
+
import type { DatasetEligibilityGateAcceptedExample } from "./DatasetEligibilityGate.js";
|
|
3
|
+
import type { DatasetExportManifestReaderResult } from "./DatasetExportManifestReader.js";
|
|
4
|
+
export declare const CODALI_DOCDEX_RETRIEVAL_CANDIDATE_SCHEMA_VERSION: "codali.improvement.docdex_retrieval_candidate.v1";
|
|
5
|
+
export declare const CODALI_DOCDEX_RETRIEVAL_PROPOSAL_ARTIFACT: "docdex-retrieval";
|
|
6
|
+
export declare const CODALI_DOCDEX_RETRIEVAL_SOURCE_ARTIFACT_TYPES: readonly ["docdex_retrieval", "query_expander", "query_expander_sft", "rag_reranker", "rerank", "reranker", "retrieval", "freshness", "duplicate_detection", "source_selection"];
|
|
7
|
+
export declare const CODALI_DOCDEX_RETRIEVAL_SUPPORTED_EXPORT_KINDS: readonly ["query-expander-sft", "rag-reranker"];
|
|
8
|
+
export type CodaliDocdexRetrievalProposalArtifact = typeof CODALI_DOCDEX_RETRIEVAL_PROPOSAL_ARTIFACT;
|
|
9
|
+
export type CodaliDocdexRetrievalCandidateKind = "docdex_retrieval";
|
|
10
|
+
export type CodaliDocdexRetrievalRegressionKind = "freshness" | "duplicate_detection" | "source_selection";
|
|
11
|
+
export interface CodaliDocdexRetrievalObjectRefSummary {
|
|
12
|
+
refId: string;
|
|
13
|
+
kind: string;
|
|
14
|
+
contentHash: string;
|
|
15
|
+
byteSize: number;
|
|
16
|
+
mimeType: string;
|
|
17
|
+
deletionGroupId: string;
|
|
18
|
+
privacyFlags: CodaliStorageObjectPrivacyFlags;
|
|
19
|
+
uri?: string;
|
|
20
|
+
mediaType?: string;
|
|
21
|
+
metadataKeys: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface CodaliDocdexRetrievalPrivacyScope {
|
|
24
|
+
tenantScoped: boolean;
|
|
25
|
+
broadReuseAllowed: boolean;
|
|
26
|
+
rawTextAllowed: boolean;
|
|
27
|
+
reasons: string[];
|
|
28
|
+
policyTags: string[];
|
|
29
|
+
}
|
|
30
|
+
export interface CodaliDocdexRetrievalQueryVariant {
|
|
31
|
+
variantId: string;
|
|
32
|
+
queryHash: string;
|
|
33
|
+
text?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface CodaliDocdexRetrievalQuerySummary {
|
|
36
|
+
queryHash: string;
|
|
37
|
+
text?: string;
|
|
38
|
+
storage: "inline_allowed" | "object_ref_or_hash_only";
|
|
39
|
+
variants: CodaliDocdexRetrievalQueryVariant[];
|
|
40
|
+
}
|
|
41
|
+
export interface CodaliDocdexRetrievalSourceSelection {
|
|
42
|
+
sourceHashes: string[];
|
|
43
|
+
sourceIds?: string[];
|
|
44
|
+
sourceTypes: string[];
|
|
45
|
+
selectedCount: number;
|
|
46
|
+
}
|
|
47
|
+
export interface CodaliDocdexRetrievalScorecard {
|
|
48
|
+
recall?: {
|
|
49
|
+
before?: number;
|
|
50
|
+
after?: number;
|
|
51
|
+
delta?: number;
|
|
52
|
+
};
|
|
53
|
+
precision?: {
|
|
54
|
+
before?: number;
|
|
55
|
+
after?: number;
|
|
56
|
+
delta?: number;
|
|
57
|
+
};
|
|
58
|
+
freshness?: {
|
|
59
|
+
before?: number;
|
|
60
|
+
after?: number;
|
|
61
|
+
delta?: number;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export interface CodaliDocdexRetrievalSourceExample {
|
|
65
|
+
recordId: string;
|
|
66
|
+
sourceGatewayRecordId?: string;
|
|
67
|
+
datasetKind?: CodaliStorageDatasetKind;
|
|
68
|
+
artifactTypes: string[];
|
|
69
|
+
preferenceSignals: string[];
|
|
70
|
+
priorityScore: number;
|
|
71
|
+
fineTuningPriority: "high" | "medium" | "low";
|
|
72
|
+
lineageKey: DatasetEligibilityGateAcceptedExample["lineageKey"];
|
|
73
|
+
privacyScope: CodaliDocdexRetrievalPrivacyScope;
|
|
74
|
+
query: CodaliDocdexRetrievalQuerySummary;
|
|
75
|
+
sourceSelection: CodaliDocdexRetrievalSourceSelection;
|
|
76
|
+
scorecard: CodaliDocdexRetrievalScorecard;
|
|
77
|
+
objectRefs: {
|
|
78
|
+
inputRef?: CodaliDocdexRetrievalObjectRefSummary;
|
|
79
|
+
outputRef?: CodaliDocdexRetrievalObjectRefSummary;
|
|
80
|
+
evidenceRefs: CodaliDocdexRetrievalObjectRefSummary[];
|
|
81
|
+
};
|
|
82
|
+
metadataShape: {
|
|
83
|
+
keys: string[];
|
|
84
|
+
retrievalKeys: string[];
|
|
85
|
+
scorecardKeys: string[];
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export interface CodaliDocdexQueryExpanderEvalCandidate {
|
|
89
|
+
suiteId: string;
|
|
90
|
+
sourceExportId: string;
|
|
91
|
+
fineTuningPriority: {
|
|
92
|
+
strategy: "human_reviewed_then_accepted_correction_then_high_confidence";
|
|
93
|
+
orderedRecordIds: string[];
|
|
94
|
+
};
|
|
95
|
+
cases: Array<{
|
|
96
|
+
caseId: string;
|
|
97
|
+
sourceRecordId: string;
|
|
98
|
+
query: CodaliDocdexRetrievalQuerySummary;
|
|
99
|
+
expectedExpansionCount: number;
|
|
100
|
+
expectedRecallDeltaMin?: number;
|
|
101
|
+
privacyScope: CodaliDocdexRetrievalPrivacyScope;
|
|
102
|
+
objectRefs: CodaliDocdexRetrievalSourceExample["objectRefs"];
|
|
103
|
+
}>;
|
|
104
|
+
}
|
|
105
|
+
export interface CodaliDocdexRerankLabel {
|
|
106
|
+
labelId: string;
|
|
107
|
+
source: "accepted_evidence" | "rejected_evidence";
|
|
108
|
+
label: "positive" | "negative";
|
|
109
|
+
recordId?: string;
|
|
110
|
+
dedupeKey?: string;
|
|
111
|
+
queryHash?: string;
|
|
112
|
+
sourceHashes: string[];
|
|
113
|
+
reasonCodes: string[];
|
|
114
|
+
weight: number;
|
|
115
|
+
}
|
|
116
|
+
export interface CodaliDocdexRetrievalRegressionCase {
|
|
117
|
+
caseId: string;
|
|
118
|
+
kind: CodaliDocdexRetrievalRegressionKind;
|
|
119
|
+
sourceRecordIds: string[];
|
|
120
|
+
assertion: string;
|
|
121
|
+
queryHash?: string;
|
|
122
|
+
sourceHashes: string[];
|
|
123
|
+
reasonCodes: string[];
|
|
124
|
+
}
|
|
125
|
+
export interface CodaliDocdexEvalCommandSpec {
|
|
126
|
+
commandId: string;
|
|
127
|
+
command: "docdexd";
|
|
128
|
+
args: string[];
|
|
129
|
+
dryRunSafe: true;
|
|
130
|
+
requiresTenantScopedFixture: boolean;
|
|
131
|
+
expectedScorecards: Array<"recall" | "precision" | "freshness">;
|
|
132
|
+
}
|
|
133
|
+
export interface CodaliDocdexRetrievalImprovementCandidateSummary {
|
|
134
|
+
candidateId: string;
|
|
135
|
+
candidateKind: CodaliDocdexRetrievalCandidateKind;
|
|
136
|
+
status: "proposed" | "blocked";
|
|
137
|
+
sourceExportIds: string[];
|
|
138
|
+
sourceRecordIds: string[];
|
|
139
|
+
artifactIds: string[];
|
|
140
|
+
exampleCount: number;
|
|
141
|
+
objectBytes: number;
|
|
142
|
+
queryExpanderCaseCount: number;
|
|
143
|
+
rerankLabelCount: number;
|
|
144
|
+
regressionCaseCount: number;
|
|
145
|
+
blockedReasons: string[];
|
|
146
|
+
}
|
|
147
|
+
export interface CodaliDocdexRetrievalCandidateBundle {
|
|
148
|
+
schemaVersion: typeof CODALI_DOCDEX_RETRIEVAL_CANDIDATE_SCHEMA_VERSION;
|
|
149
|
+
artifact: CodaliDocdexRetrievalProposalArtifact;
|
|
150
|
+
source: {
|
|
151
|
+
exportId: string;
|
|
152
|
+
manifestId: string;
|
|
153
|
+
manifestPath: string;
|
|
154
|
+
exportKind: CodaliStorageExportKind;
|
|
155
|
+
checksum: string;
|
|
156
|
+
recordCount: number;
|
|
157
|
+
primaryArtifactRef: CodaliDocdexRetrievalObjectRefSummary;
|
|
158
|
+
};
|
|
159
|
+
generationPolicy: {
|
|
160
|
+
deterministic: true;
|
|
161
|
+
modifiesRuntimePrompts: false;
|
|
162
|
+
modifiesRuntimeCode: false;
|
|
163
|
+
bodyPolicy: "object_refs_and_hashes_only_for_private_sources";
|
|
164
|
+
tenantPrivateExamplesScoped: true;
|
|
165
|
+
uploadEnabled: false;
|
|
166
|
+
finalSynthesizerFineTuning: false;
|
|
167
|
+
};
|
|
168
|
+
expectedShape: {
|
|
169
|
+
schemaVersion: typeof CODALI_DOCDEX_RETRIEVAL_CANDIDATE_SCHEMA_VERSION;
|
|
170
|
+
artifact: CodaliDocdexRetrievalProposalArtifact;
|
|
171
|
+
requiredFields: string[];
|
|
172
|
+
sourceExampleRequiredFields: string[];
|
|
173
|
+
evalCommandRequiredFields: string[];
|
|
174
|
+
};
|
|
175
|
+
sourceExamples: CodaliDocdexRetrievalSourceExample[];
|
|
176
|
+
queryExpanderEval: CodaliDocdexQueryExpanderEvalCandidate;
|
|
177
|
+
rerankLabels: CodaliDocdexRerankLabel[];
|
|
178
|
+
regressionCases: CodaliDocdexRetrievalRegressionCase[];
|
|
179
|
+
docdexEvalCommands: CodaliDocdexEvalCommandSpec[];
|
|
180
|
+
scorecardSummary: {
|
|
181
|
+
recallDelta: number;
|
|
182
|
+
precisionDelta: number;
|
|
183
|
+
freshnessDelta: number;
|
|
184
|
+
};
|
|
185
|
+
candidates: CodaliDocdexRetrievalImprovementCandidateSummary[];
|
|
186
|
+
}
|
|
187
|
+
export interface BuildCodaliDocdexRetrievalCandidateBundleInput {
|
|
188
|
+
inspection: DatasetExportManifestReaderResult;
|
|
189
|
+
artifact?: CodaliDocdexRetrievalProposalArtifact;
|
|
190
|
+
}
|
|
191
|
+
export declare const buildCodaliDocdexRetrievalCandidateBundle: ({ inspection, artifact, }: BuildCodaliDocdexRetrievalCandidateBundleInput) => CodaliDocdexRetrievalCandidateBundle;
|
|
192
|
+
//# sourceMappingURL=DocdexRetrievalCandidateBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocdexRetrievalCandidateBuilder.d.ts","sourceRoot":"","sources":["../../src/improvement/DocdexRetrievalCandidateBuilder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACvB,+BAA+B,EAGhC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EACV,qCAAqC,EAEtC,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAE1F,eAAO,MAAM,gDAAgD,EAC3D,kDAA2D,CAAC;AAE9D,eAAO,MAAM,yCAAyC,EACpD,kBAA2B,CAAC;AAE9B,eAAO,MAAM,6CAA6C,kLAWhD,CAAC;AAEX,eAAO,MAAM,8CAA8C,iDAGJ,CAAC;AAExD,MAAM,MAAM,qCAAqC,GAC/C,OAAO,yCAAyC,CAAC;AAEnD,MAAM,MAAM,kCAAkC,GAAG,kBAAkB,CAAC;AAEpE,MAAM,MAAM,mCAAmC,GAC3C,WAAW,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