@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,480 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
export const CODALI_PATCH_CANDIDATE_SCHEMA_VERSION = "codali.improvement.patch_candidate.v1";
|
|
3
|
+
export const CODALI_PATCH_PROPOSAL_ARTIFACTS = [
|
|
4
|
+
"prompt",
|
|
5
|
+
"schema",
|
|
6
|
+
"tool-metadata",
|
|
7
|
+
];
|
|
8
|
+
const ARTIFACT_CONTRACTS = {
|
|
9
|
+
prompt: {
|
|
10
|
+
artifact: "prompt",
|
|
11
|
+
candidateKind: "prompt",
|
|
12
|
+
patchArtifactType: "prompt_patch",
|
|
13
|
+
operationType: "add_prompt_failure_guardrail",
|
|
14
|
+
sourceArtifactTypes: ["prompt", "prompt_patch", "prompt_regression"],
|
|
15
|
+
},
|
|
16
|
+
schema: {
|
|
17
|
+
artifact: "schema",
|
|
18
|
+
candidateKind: "schema",
|
|
19
|
+
patchArtifactType: "schema_patch",
|
|
20
|
+
operationType: "tighten_schema_contract",
|
|
21
|
+
sourceArtifactTypes: ["schema", "schema_patch"],
|
|
22
|
+
},
|
|
23
|
+
"tool-metadata": {
|
|
24
|
+
artifact: "tool-metadata",
|
|
25
|
+
candidateKind: "tool_metadata",
|
|
26
|
+
patchArtifactType: "tool_metadata_patch",
|
|
27
|
+
operationType: "update_tool_metadata_contract",
|
|
28
|
+
sourceArtifactTypes: ["tool_metadata", "tool_metadata_patch", "tool_contract"],
|
|
29
|
+
requiresToolContractHash: true,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
const isRecord = (value) => Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
33
|
+
const stableJson = (value) => {
|
|
34
|
+
if (Array.isArray(value))
|
|
35
|
+
return `[${value.map(stableJson).join(",")}]`;
|
|
36
|
+
if (!isRecord(value))
|
|
37
|
+
return JSON.stringify(value);
|
|
38
|
+
return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${stableJson(value[key])}`).join(",")}}`;
|
|
39
|
+
};
|
|
40
|
+
const sha256Hex = (value) => createHash("sha256").update(stableJson(value)).digest("hex");
|
|
41
|
+
const stableId = (prefix, value) => `${prefix}-${sha256Hex(value).slice(0, 16)}`;
|
|
42
|
+
const normalizeToken = (value) => value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
43
|
+
const uniqueSorted = (values) => Array.from(new Set(values
|
|
44
|
+
.map((value) => value?.trim())
|
|
45
|
+
.filter((value) => Boolean(value))))
|
|
46
|
+
.sort();
|
|
47
|
+
const normalizedUniqueSorted = (values) => uniqueSorted(values.map((value) => value ? normalizeToken(value) : undefined));
|
|
48
|
+
const readString = (record, keys) => {
|
|
49
|
+
for (const key of keys) {
|
|
50
|
+
const value = record?.[key];
|
|
51
|
+
if (typeof value === "string" && value.trim())
|
|
52
|
+
return value.trim();
|
|
53
|
+
}
|
|
54
|
+
return undefined;
|
|
55
|
+
};
|
|
56
|
+
const stringList = (value) => {
|
|
57
|
+
if (Array.isArray(value)) {
|
|
58
|
+
return value.filter((entry) => typeof entry === "string" && entry.trim().length > 0);
|
|
59
|
+
}
|
|
60
|
+
if (typeof value === "string" && value.trim())
|
|
61
|
+
return [value.trim()];
|
|
62
|
+
return [];
|
|
63
|
+
};
|
|
64
|
+
const objectList = (value) => Array.isArray(value) ? value.filter(isRecord) : [];
|
|
65
|
+
const metadataForRow = (row) => isRecord(row?.metadata) ? row.metadata : {};
|
|
66
|
+
const objectRefFromValue = (value) => isRecord(value) &&
|
|
67
|
+
typeof value.refId === "string" &&
|
|
68
|
+
typeof value.contentHash === "string" &&
|
|
69
|
+
typeof value.byteSize === "number" &&
|
|
70
|
+
typeof value.mimeType === "string" &&
|
|
71
|
+
typeof value.deletionGroupId === "string" &&
|
|
72
|
+
isRecord(value.privacyFlags)
|
|
73
|
+
? value
|
|
74
|
+
: undefined;
|
|
75
|
+
const refsForRow = (row) => {
|
|
76
|
+
const evidenceRefs = Array.isArray(row?.evidenceRefs)
|
|
77
|
+
? row.evidenceRefs.map(objectRefFromValue)
|
|
78
|
+
.filter((ref) => Boolean(ref))
|
|
79
|
+
: [];
|
|
80
|
+
return {
|
|
81
|
+
inputRef: objectRefFromValue(row?.inputRef),
|
|
82
|
+
outputRef: objectRefFromValue(row?.outputRef),
|
|
83
|
+
evidenceRefs,
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
const summarizeObjectRef = (ref) => ({
|
|
87
|
+
refId: ref.refId,
|
|
88
|
+
kind: ref.kind,
|
|
89
|
+
contentHash: ref.contentHash,
|
|
90
|
+
byteSize: ref.byteSize,
|
|
91
|
+
mimeType: ref.mimeType,
|
|
92
|
+
deletionGroupId: ref.deletionGroupId,
|
|
93
|
+
privacyFlags: ref.privacyFlags,
|
|
94
|
+
...(ref.uri ? { uri: ref.uri } : {}),
|
|
95
|
+
...(ref.mediaType ? { mediaType: ref.mediaType } : {}),
|
|
96
|
+
metadataKeys: isRecord(ref.metadata) ? Object.keys(ref.metadata).sort() : [],
|
|
97
|
+
});
|
|
98
|
+
const recordIdForRow = (row) => isRecord(row) ? readString(row, ["recordId", "record_id"]) : undefined;
|
|
99
|
+
const rowsByRecordId = (rows) => {
|
|
100
|
+
const output = new Map();
|
|
101
|
+
for (const row of rows) {
|
|
102
|
+
if (!isRecord(row))
|
|
103
|
+
continue;
|
|
104
|
+
const recordId = recordIdForRow(row);
|
|
105
|
+
if (recordId)
|
|
106
|
+
output.set(recordId, row);
|
|
107
|
+
}
|
|
108
|
+
return output;
|
|
109
|
+
};
|
|
110
|
+
const nestedHash = (metadata, directKeys, nestedKeys) => {
|
|
111
|
+
const direct = readString(metadata, directKeys);
|
|
112
|
+
if (direct)
|
|
113
|
+
return direct;
|
|
114
|
+
for (const key of nestedKeys) {
|
|
115
|
+
const nested = metadata[key];
|
|
116
|
+
if (!isRecord(nested))
|
|
117
|
+
continue;
|
|
118
|
+
const hash = readString(nested, ["hash", "contentHash", "content_hash"]);
|
|
119
|
+
if (hash)
|
|
120
|
+
return hash;
|
|
121
|
+
}
|
|
122
|
+
return undefined;
|
|
123
|
+
};
|
|
124
|
+
const failureEvidenceRecords = (metadata) => [
|
|
125
|
+
...objectList(metadata.failureEvidence),
|
|
126
|
+
...objectList(metadata.failure_evidence),
|
|
127
|
+
...objectList(metadata.failures),
|
|
128
|
+
...objectList(metadata.evalFailures),
|
|
129
|
+
...objectList(metadata.eval_failures),
|
|
130
|
+
];
|
|
131
|
+
const failureClassesForRow = (row) => {
|
|
132
|
+
const metadata = metadataForRow(row);
|
|
133
|
+
const structured = failureEvidenceRecords(metadata);
|
|
134
|
+
return normalizedUniqueSorted([
|
|
135
|
+
...stringList(metadata.failureClass),
|
|
136
|
+
...stringList(metadata.failure_class),
|
|
137
|
+
...stringList(metadata.failureClasses),
|
|
138
|
+
...stringList(metadata.failure_classes),
|
|
139
|
+
...structured.flatMap((entry) => [
|
|
140
|
+
...stringList(entry.failureClass),
|
|
141
|
+
...stringList(entry.failure_class),
|
|
142
|
+
...stringList(entry.failureClasses),
|
|
143
|
+
...stringList(entry.failure_classes),
|
|
144
|
+
readString(entry, ["class", "category"]),
|
|
145
|
+
]),
|
|
146
|
+
]);
|
|
147
|
+
};
|
|
148
|
+
const failureReasonCodesForRow = (row) => {
|
|
149
|
+
const metadata = metadataForRow(row);
|
|
150
|
+
const structured = failureEvidenceRecords(metadata);
|
|
151
|
+
return normalizedUniqueSorted([
|
|
152
|
+
...stringList(metadata.reasonCode),
|
|
153
|
+
...stringList(metadata.reason_code),
|
|
154
|
+
...stringList(metadata.reasonCodes),
|
|
155
|
+
...stringList(metadata.reason_codes),
|
|
156
|
+
...stringList(metadata.failureReasonCodes),
|
|
157
|
+
...stringList(metadata.failure_reason_codes),
|
|
158
|
+
...structured.flatMap((entry) => [
|
|
159
|
+
...stringList(entry.reasonCode),
|
|
160
|
+
...stringList(entry.reason_code),
|
|
161
|
+
...stringList(entry.reasonCodes),
|
|
162
|
+
...stringList(entry.reason_codes),
|
|
163
|
+
readString(entry, ["code"]),
|
|
164
|
+
]),
|
|
165
|
+
]);
|
|
166
|
+
};
|
|
167
|
+
const sourceExampleForAccepted = (item, row) => {
|
|
168
|
+
const refs = refsForRow(row);
|
|
169
|
+
const metadata = metadataForRow(row);
|
|
170
|
+
const schemaHash = nestedHash(metadata, ["schemaHash", "schema_hash", "schemaContractHash", "schema_contract_hash"], ["schema", "schemaMetadata", "schema_metadata", "schemaContract", "schema_contract"]) ?? item.lineageKey.expectedTargetHash;
|
|
171
|
+
const toolContractHash = item.lineageKey.toolContractHash ?? nestedHash(metadata, ["toolContractHash", "tool_contract_hash"], ["toolContract", "tool_contract", "toolMetadata", "tool_metadata"]);
|
|
172
|
+
return {
|
|
173
|
+
recordId: item.recordId,
|
|
174
|
+
...(item.sourceGatewayRecordId ? { sourceGatewayRecordId: item.sourceGatewayRecordId } : {}),
|
|
175
|
+
...(readString(row, ["datasetKind", "dataset_kind"])
|
|
176
|
+
? { datasetKind: readString(row, ["datasetKind", "dataset_kind"]) }
|
|
177
|
+
: {}),
|
|
178
|
+
artifactTypes: item.artifactTypes.map(normalizeToken).sort(),
|
|
179
|
+
failureClasses: failureClassesForRow(row),
|
|
180
|
+
failureReasonCodes: failureReasonCodesForRow(row),
|
|
181
|
+
preferenceSignals: [...item.preferenceSignals].sort(),
|
|
182
|
+
priorityScore: item.priorityScore,
|
|
183
|
+
lineageKey: {
|
|
184
|
+
runIds: item.lineageKey.runIds,
|
|
185
|
+
deletionGroupIds: item.lineageKey.deletionGroupIds,
|
|
186
|
+
...(item.lineageKey.promptHash ? { promptHash: item.lineageKey.promptHash } : {}),
|
|
187
|
+
...(schemaHash ? { schemaHash } : {}),
|
|
188
|
+
...(toolContractHash ? { toolContractHash } : {}),
|
|
189
|
+
...(item.lineageKey.expectedTargetHash
|
|
190
|
+
? { expectedTargetHash: item.lineageKey.expectedTargetHash }
|
|
191
|
+
: {}),
|
|
192
|
+
},
|
|
193
|
+
objectRefs: {
|
|
194
|
+
...(refs.inputRef ? { inputRef: summarizeObjectRef(refs.inputRef) } : {}),
|
|
195
|
+
...(refs.outputRef ? { outputRef: summarizeObjectRef(refs.outputRef) } : {}),
|
|
196
|
+
evidenceRefs: refs.evidenceRefs.map(summarizeObjectRef),
|
|
197
|
+
},
|
|
198
|
+
metadataShape: {
|
|
199
|
+
keys: Object.keys(metadata).sort(),
|
|
200
|
+
failureEvidenceKeys: failureEvidenceRecords(metadata)
|
|
201
|
+
.flatMap((entry) => Object.keys(entry))
|
|
202
|
+
.sort(),
|
|
203
|
+
contractKeys: Object.keys(metadata)
|
|
204
|
+
.filter((key) => key.toLowerCase().includes("contract") || key.toLowerCase().includes("schema"))
|
|
205
|
+
.sort(),
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
const explicitArtifactTypesForRow = (row) => {
|
|
210
|
+
const metadata = metadataForRow(row);
|
|
211
|
+
const refs = refsForRow(row);
|
|
212
|
+
return normalizedUniqueSorted([
|
|
213
|
+
readString(metadata, [
|
|
214
|
+
"artifactType",
|
|
215
|
+
"artifact_type",
|
|
216
|
+
"exampleType",
|
|
217
|
+
"example_type",
|
|
218
|
+
]),
|
|
219
|
+
...[
|
|
220
|
+
refs.inputRef,
|
|
221
|
+
refs.outputRef,
|
|
222
|
+
...refs.evidenceRefs,
|
|
223
|
+
].map((ref) => readString(isRecord(ref?.metadata) ? ref.metadata : undefined, [
|
|
224
|
+
"artifactType",
|
|
225
|
+
"artifact_type",
|
|
226
|
+
])),
|
|
227
|
+
]);
|
|
228
|
+
};
|
|
229
|
+
const sourceExamplesForArtifact = (inspection, artifact) => {
|
|
230
|
+
const rowMap = rowsByRecordId(inspection.primaryArtifactRows);
|
|
231
|
+
const contract = ARTIFACT_CONTRACTS[artifact];
|
|
232
|
+
const sourceTypes = new Set(contract.sourceArtifactTypes.map(normalizeToken));
|
|
233
|
+
return inspection.curationReport.accepted
|
|
234
|
+
.filter((item) => {
|
|
235
|
+
const row = rowMap.get(item.recordId);
|
|
236
|
+
const explicitTypes = explicitArtifactTypesForRow(row);
|
|
237
|
+
const filterTypes = explicitTypes.length > 0
|
|
238
|
+
? explicitTypes
|
|
239
|
+
: item.artifactTypes.map(normalizeToken);
|
|
240
|
+
return filterTypes.some((type) => sourceTypes.has(type));
|
|
241
|
+
})
|
|
242
|
+
.map((item) => sourceExampleForAccepted(item, rowMap.get(item.recordId)))
|
|
243
|
+
.sort((left, right) => right.priorityScore - left.priorityScore || left.recordId.localeCompare(right.recordId));
|
|
244
|
+
};
|
|
245
|
+
const failureEvidenceForRejected = (rejected) => rejected.map((item) => ({
|
|
246
|
+
source: "curation_rejection",
|
|
247
|
+
...(item.recordId ? { recordId: item.recordId } : {}),
|
|
248
|
+
targetType: item.targetType,
|
|
249
|
+
failureClasses: normalizedUniqueSorted(item.reasons.map((reason) => reason.code)),
|
|
250
|
+
reasonCodes: normalizedUniqueSorted(item.reasons.map((reason) => reason.code)),
|
|
251
|
+
paths: uniqueSorted(item.reasons.map((reason) => reason.path)),
|
|
252
|
+
}));
|
|
253
|
+
const failureEvidenceForSourceExamples = (sourceExamples) => sourceExamples.map((example) => ({
|
|
254
|
+
source: "source_example",
|
|
255
|
+
recordId: example.recordId,
|
|
256
|
+
failureClasses: example.failureClasses,
|
|
257
|
+
reasonCodes: example.failureReasonCodes,
|
|
258
|
+
paths: [],
|
|
259
|
+
}));
|
|
260
|
+
const objectBytesForSourceExamples = (sourceExamples) => {
|
|
261
|
+
const refs = new Map();
|
|
262
|
+
for (const example of sourceExamples) {
|
|
263
|
+
for (const ref of [
|
|
264
|
+
example.objectRefs.inputRef,
|
|
265
|
+
example.objectRefs.outputRef,
|
|
266
|
+
...example.objectRefs.evidenceRefs,
|
|
267
|
+
]) {
|
|
268
|
+
if (ref)
|
|
269
|
+
refs.set(`${ref.refId}:${ref.contentHash}`, ref);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return Array.from(refs.values()).reduce((total, ref) => total + ref.byteSize, 0);
|
|
273
|
+
};
|
|
274
|
+
const targetHashesForExamples = (sourceExamples) => ({
|
|
275
|
+
artifact: "prompt",
|
|
276
|
+
candidateKind: "prompt",
|
|
277
|
+
promptHashes: uniqueSorted(sourceExamples.map((example) => example.lineageKey.promptHash)),
|
|
278
|
+
schemaHashes: uniqueSorted(sourceExamples.map((example) => example.lineageKey.schemaHash)),
|
|
279
|
+
toolContractHashes: uniqueSorted(sourceExamples.map((example) => example.lineageKey.toolContractHash)),
|
|
280
|
+
expectedTargetHashes: uniqueSorted(sourceExamples.map((example) => example.lineageKey.expectedTargetHash)),
|
|
281
|
+
});
|
|
282
|
+
const blockedReasonsFor = (contract, sourceExamples, sourceFailureClasses, inspection) => uniqueSorted([
|
|
283
|
+
sourceExamples.length === 0 ? "source_examples_required" : undefined,
|
|
284
|
+
sourceFailureClasses.length === 0 ? "failure_classes_required" : undefined,
|
|
285
|
+
!inspection.curationReport.artifactReadAllowed ? "artifact_payload_read_blocked" : undefined,
|
|
286
|
+
!inspection.curationReport.lineageValid ? "lineage_invalid" : undefined,
|
|
287
|
+
contract.requiresToolContractHash &&
|
|
288
|
+
sourceExamples.every((example) => !example.lineageKey.toolContractHash)
|
|
289
|
+
? "tool_contract_hash_required"
|
|
290
|
+
: undefined,
|
|
291
|
+
]);
|
|
292
|
+
const patchPlanFor = (input) => {
|
|
293
|
+
const contract = ARTIFACT_CONTRACTS[input.artifact];
|
|
294
|
+
const target = {
|
|
295
|
+
...targetHashesForExamples(input.sourceExamples),
|
|
296
|
+
artifact: input.artifact,
|
|
297
|
+
candidateKind: contract.candidateKind,
|
|
298
|
+
};
|
|
299
|
+
const planId = stableId("patch-plan", {
|
|
300
|
+
artifact: input.artifact,
|
|
301
|
+
manifestId: input.inspection.manifest.manifestId,
|
|
302
|
+
checksum: input.inspection.manifest.checksum,
|
|
303
|
+
sourceRecordIds: input.sourceExamples.map((example) => example.recordId),
|
|
304
|
+
failureClasses: input.sourceFailureClasses,
|
|
305
|
+
target,
|
|
306
|
+
});
|
|
307
|
+
const operationId = stableId("patch-op", {
|
|
308
|
+
planId,
|
|
309
|
+
operationType: contract.operationType,
|
|
310
|
+
sourceRecordIds: input.sourceExamples.map((example) => example.recordId),
|
|
311
|
+
failureClasses: input.sourceFailureClasses,
|
|
312
|
+
target,
|
|
313
|
+
});
|
|
314
|
+
const operations = input.sourceExamples.length > 0 && input.sourceFailureClasses.length > 0
|
|
315
|
+
? [{
|
|
316
|
+
operationId,
|
|
317
|
+
operationType: contract.operationType,
|
|
318
|
+
productNeutral: true,
|
|
319
|
+
contractDriven: true,
|
|
320
|
+
sourceRecordIds: input.sourceExamples.map((example) => example.recordId),
|
|
321
|
+
failureClasses: [...input.sourceFailureClasses],
|
|
322
|
+
requiredEvidence: ["source_examples", "failure_classes"],
|
|
323
|
+
writesRuntimeCode: false,
|
|
324
|
+
target,
|
|
325
|
+
}]
|
|
326
|
+
: [];
|
|
327
|
+
return {
|
|
328
|
+
planId,
|
|
329
|
+
artifact: input.artifact,
|
|
330
|
+
candidateKind: contract.candidateKind,
|
|
331
|
+
deterministic: true,
|
|
332
|
+
patchArtifactType: contract.patchArtifactType,
|
|
333
|
+
sourceExampleCount: input.sourceExamples.length,
|
|
334
|
+
failureClasses: [...input.sourceFailureClasses],
|
|
335
|
+
operations,
|
|
336
|
+
blockedReasons: [...input.blockedReasons],
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
const promptEvalFor = (input) => {
|
|
340
|
+
if (input.sourceExamples.length === 0 || input.sourceFailureClasses.length === 0) {
|
|
341
|
+
return undefined;
|
|
342
|
+
}
|
|
343
|
+
const suiteId = stableId("prompt-eval-suite", {
|
|
344
|
+
manifestId: input.inspection.manifest.manifestId,
|
|
345
|
+
sourceRecordIds: input.sourceExamples.map((example) => example.recordId),
|
|
346
|
+
failureClasses: input.sourceFailureClasses,
|
|
347
|
+
});
|
|
348
|
+
return {
|
|
349
|
+
suiteId,
|
|
350
|
+
sourceExportId: input.inspection.manifest.manifestId,
|
|
351
|
+
wouldFailBeforeChange: true,
|
|
352
|
+
cases: input.sourceExamples.map((example) => ({
|
|
353
|
+
caseId: stableId("prompt-eval-case", {
|
|
354
|
+
suiteId,
|
|
355
|
+
recordId: example.recordId,
|
|
356
|
+
failureClasses: example.failureClasses,
|
|
357
|
+
inputHash: example.objectRefs.inputRef?.contentHash,
|
|
358
|
+
outputHash: example.objectRefs.outputRef?.contentHash,
|
|
359
|
+
}),
|
|
360
|
+
sourceRecordId: example.recordId,
|
|
361
|
+
failureClasses: example.failureClasses,
|
|
362
|
+
preChangeExpectedStatus: "fail",
|
|
363
|
+
postChangeExpectedStatus: "pass",
|
|
364
|
+
assertions: [
|
|
365
|
+
"uses_source_evidence",
|
|
366
|
+
"covers_recorded_failure_class",
|
|
367
|
+
"preserves_product_neutral_contract",
|
|
368
|
+
],
|
|
369
|
+
objectRefs: example.objectRefs,
|
|
370
|
+
})),
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
const expectedShape = (artifact) => ({
|
|
374
|
+
schemaVersion: CODALI_PATCH_CANDIDATE_SCHEMA_VERSION,
|
|
375
|
+
artifact,
|
|
376
|
+
requiredFields: [
|
|
377
|
+
"sourceExamples",
|
|
378
|
+
"failureEvidence",
|
|
379
|
+
"failureClasses",
|
|
380
|
+
"patchPlan",
|
|
381
|
+
"candidates",
|
|
382
|
+
],
|
|
383
|
+
sourceExampleRequiredFields: [
|
|
384
|
+
"recordId",
|
|
385
|
+
"artifactTypes",
|
|
386
|
+
"failureClasses",
|
|
387
|
+
"lineageKey",
|
|
388
|
+
"objectRefs",
|
|
389
|
+
],
|
|
390
|
+
patchPlanRequiredFields: [
|
|
391
|
+
"planId",
|
|
392
|
+
"artifact",
|
|
393
|
+
"deterministic",
|
|
394
|
+
"failureClasses",
|
|
395
|
+
"operations",
|
|
396
|
+
],
|
|
397
|
+
});
|
|
398
|
+
const primaryArtifactRefForInspection = (inspection) => {
|
|
399
|
+
const ref = inspection.primaryArtifact?.ref ?? inspection.manifest.artifactRefs[0];
|
|
400
|
+
if (!ref) {
|
|
401
|
+
throw new Error("CODALI_PATCH_PRIMARY_ARTIFACT_MISSING");
|
|
402
|
+
}
|
|
403
|
+
return ref;
|
|
404
|
+
};
|
|
405
|
+
export const buildCodaliPatchCandidateBundle = (input) => {
|
|
406
|
+
const contract = ARTIFACT_CONTRACTS[input.artifact];
|
|
407
|
+
const inspection = input.inspection;
|
|
408
|
+
const sourceExamples = sourceExamplesForArtifact(inspection, input.artifact);
|
|
409
|
+
const sourceFailureClasses = normalizedUniqueSorted(sourceExamples
|
|
410
|
+
.flatMap((example) => example.failureClasses));
|
|
411
|
+
const rejectedFailureEvidence = failureEvidenceForRejected(inspection.curationReport.rejected);
|
|
412
|
+
const failureEvidence = [
|
|
413
|
+
...failureEvidenceForSourceExamples(sourceExamples),
|
|
414
|
+
...rejectedFailureEvidence,
|
|
415
|
+
];
|
|
416
|
+
const failureClasses = normalizedUniqueSorted([
|
|
417
|
+
...sourceFailureClasses,
|
|
418
|
+
...rejectedFailureEvidence.flatMap((item) => item.failureClasses),
|
|
419
|
+
]);
|
|
420
|
+
const blockedReasons = blockedReasonsFor(contract, sourceExamples, sourceFailureClasses, inspection);
|
|
421
|
+
const patchPlan = patchPlanFor({
|
|
422
|
+
artifact: input.artifact,
|
|
423
|
+
sourceExamples,
|
|
424
|
+
sourceFailureClasses,
|
|
425
|
+
blockedReasons,
|
|
426
|
+
inspection,
|
|
427
|
+
});
|
|
428
|
+
const candidateId = stableId("candidate", {
|
|
429
|
+
artifact: input.artifact,
|
|
430
|
+
manifestId: inspection.manifest.manifestId,
|
|
431
|
+
checksum: inspection.manifest.checksum,
|
|
432
|
+
patchPlanId: patchPlan.planId,
|
|
433
|
+
sourceRecordIds: sourceExamples.map((example) => example.recordId),
|
|
434
|
+
failureClasses: sourceFailureClasses,
|
|
435
|
+
});
|
|
436
|
+
const promptEval = input.artifact === "prompt"
|
|
437
|
+
? promptEvalFor({ sourceExamples, sourceFailureClasses, inspection })
|
|
438
|
+
: undefined;
|
|
439
|
+
const candidateStatus = blockedReasons.length === 0 ? "proposed" : "blocked";
|
|
440
|
+
return {
|
|
441
|
+
schemaVersion: CODALI_PATCH_CANDIDATE_SCHEMA_VERSION,
|
|
442
|
+
artifact: input.artifact,
|
|
443
|
+
source: {
|
|
444
|
+
exportId: inspection.exportId,
|
|
445
|
+
manifestId: inspection.manifest.manifestId,
|
|
446
|
+
manifestPath: inspection.manifestPath,
|
|
447
|
+
exportKind: inspection.manifest.exportKind,
|
|
448
|
+
checksum: inspection.manifest.checksum,
|
|
449
|
+
recordCount: inspection.manifest.recordCount,
|
|
450
|
+
primaryArtifactRef: summarizeObjectRef(primaryArtifactRefForInspection(inspection)),
|
|
451
|
+
},
|
|
452
|
+
generationPolicy: {
|
|
453
|
+
deterministic: true,
|
|
454
|
+
modifiesRuntimePrompts: false,
|
|
455
|
+
modifiesRuntimeCode: false,
|
|
456
|
+
bodyPolicy: "object_refs_only",
|
|
457
|
+
failureEvidenceRequired: true,
|
|
458
|
+
sourceExamplesRequired: true,
|
|
459
|
+
},
|
|
460
|
+
expectedShape: expectedShape(input.artifact),
|
|
461
|
+
sourceExamples,
|
|
462
|
+
failureEvidence,
|
|
463
|
+
failureClasses,
|
|
464
|
+
patchPlan,
|
|
465
|
+
...(promptEval ? { promptEval } : {}),
|
|
466
|
+
candidates: [{
|
|
467
|
+
candidateId,
|
|
468
|
+
candidateKind: contract.candidateKind,
|
|
469
|
+
status: candidateStatus,
|
|
470
|
+
patchPlanId: patchPlan.planId,
|
|
471
|
+
sourceExportIds: [inspection.manifest.manifestId],
|
|
472
|
+
sourceRecordIds: sourceExamples.map((example) => example.recordId),
|
|
473
|
+
artifactIds: inspection.manifest.artifactRefs.map((ref) => ref.refId),
|
|
474
|
+
exampleCount: sourceExamples.length,
|
|
475
|
+
objectBytes: objectBytesForSourceExamples(sourceExamples),
|
|
476
|
+
failureClasses: sourceFailureClasses,
|
|
477
|
+
blockedReasons,
|
|
478
|
+
}],
|
|
479
|
+
};
|
|
480
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { type CodaliCandidateReleaseBuild, type CodaliCandidateReleaseCommandRunner, type CodaliCandidateReleaseDirtyEntry } from "./CandidateReleaseBuilder.js";
|
|
2
|
+
import { type CodaliImprovementEvalRunnerResult } from "./ImprovementEvalRunner.js";
|
|
3
|
+
import { evaluateCodaliImprovementPolicy, type CodaliImprovementOutcome, type CodaliImprovementPolicy, type CodaliImprovementReleaseLevel, type CodaliImprovementScope } from "./ImprovementPolicy.js";
|
|
4
|
+
import { StorageServiceImprovementClient, type StorageServiceImprovementWriteResult } from "./StorageServiceImprovementClient.js";
|
|
5
|
+
import type { GatewayDatasetStorageScope } from "../storage/GatewayDatasetStore.js";
|
|
6
|
+
export declare const CODALI_PUBLISH_ORCHESTRATOR_SCHEMA_VERSION: "codali.improvement.publish.v1";
|
|
7
|
+
export declare const CODALI_PUBLISH_RELEASE_WORKFLOW_FILE: ".github/workflows/release.yml";
|
|
8
|
+
export declare const DEFAULT_CODALI_PUBLISH_NPM_REGISTRY: "https://registry.npmjs.org/";
|
|
9
|
+
export type CodaliPublishMode = "branch_only" | "auto_tag";
|
|
10
|
+
export type CodaliPublishStatus = "planned" | "blocked" | "tagged" | "workflow_queued" | "workflow_succeeded" | "workflow_failed" | "published_verified" | "failed";
|
|
11
|
+
export type CodaliPublishWorkflowStatus = "not_requested" | "queued" | "in_progress" | "completed" | "unknown";
|
|
12
|
+
export type CodaliPublishWorkflowConclusion = "success" | "failure" | "cancelled" | "skipped" | "timed_out" | "action_required" | "neutral" | "unknown";
|
|
13
|
+
export type CodaliPublishNpmVersionStatus = "planned" | "verified" | "mismatch" | "unavailable";
|
|
14
|
+
export interface CodaliPublishWorkflowRunStatus {
|
|
15
|
+
workflowFile: typeof CODALI_PUBLISH_RELEASE_WORKFLOW_FILE;
|
|
16
|
+
source: "planned" | "ingested" | "gh_cli";
|
|
17
|
+
runId?: string;
|
|
18
|
+
status: CodaliPublishWorkflowStatus;
|
|
19
|
+
conclusion?: CodaliPublishWorkflowConclusion;
|
|
20
|
+
headSha?: string;
|
|
21
|
+
url?: string;
|
|
22
|
+
error?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CodaliPublishNpmVersion {
|
|
25
|
+
packageName: string;
|
|
26
|
+
expectedVersion: string;
|
|
27
|
+
registry: string;
|
|
28
|
+
observedVersion?: string;
|
|
29
|
+
status: CodaliPublishNpmVersionStatus;
|
|
30
|
+
command: string[];
|
|
31
|
+
error?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface CodaliPublishCommitGuard {
|
|
34
|
+
required: boolean;
|
|
35
|
+
status: "clean" | "dirty" | "unavailable" | "skipped";
|
|
36
|
+
commitSha?: string;
|
|
37
|
+
dirtyFileCount: number;
|
|
38
|
+
dirtyFilesSample: string[];
|
|
39
|
+
reasons: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface CodaliPublishCommandStep {
|
|
42
|
+
command: string;
|
|
43
|
+
args: string[];
|
|
44
|
+
executed: boolean;
|
|
45
|
+
exitCode?: number;
|
|
46
|
+
stdout?: string;
|
|
47
|
+
stderr?: string;
|
|
48
|
+
error?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface CodaliPublishPublisher {
|
|
51
|
+
type: "github_actions_release_workflow";
|
|
52
|
+
workflowFile: typeof CODALI_PUBLISH_RELEASE_WORKFLOW_FILE;
|
|
53
|
+
localNpmPublishAllowed: false;
|
|
54
|
+
note: string;
|
|
55
|
+
}
|
|
56
|
+
export interface CodaliPublishResult {
|
|
57
|
+
schemaVersion: typeof CODALI_PUBLISH_ORCHESTRATOR_SCHEMA_VERSION;
|
|
58
|
+
dryRun: boolean;
|
|
59
|
+
mode: CodaliPublishMode;
|
|
60
|
+
status: CodaliPublishStatus;
|
|
61
|
+
candidateId: string;
|
|
62
|
+
releaseBuild: CodaliCandidateReleaseBuild;
|
|
63
|
+
scorecard?: CodaliImprovementEvalRunnerResult;
|
|
64
|
+
policy: CodaliImprovementPolicy;
|
|
65
|
+
policyDecisions: {
|
|
66
|
+
autoTag: ReturnType<typeof evaluateCodaliImprovementPolicy>;
|
|
67
|
+
publishStable: ReturnType<typeof evaluateCodaliImprovementPolicy>;
|
|
68
|
+
};
|
|
69
|
+
publisher: CodaliPublishPublisher;
|
|
70
|
+
commitGuard: CodaliPublishCommitGuard;
|
|
71
|
+
workflowRun: CodaliPublishWorkflowRunStatus;
|
|
72
|
+
npmVersions: CodaliPublishNpmVersion[];
|
|
73
|
+
commands: CodaliPublishCommandStep[];
|
|
74
|
+
blockedReasons: string[];
|
|
75
|
+
outcome: CodaliImprovementOutcome;
|
|
76
|
+
}
|
|
77
|
+
export interface RunCodaliPublishOrchestratorInput {
|
|
78
|
+
candidateId: string;
|
|
79
|
+
candidatePath?: string;
|
|
80
|
+
candidateDirectories?: readonly string[];
|
|
81
|
+
repoRoot?: string;
|
|
82
|
+
mode?: CodaliPublishMode;
|
|
83
|
+
dryRun?: boolean;
|
|
84
|
+
releaseLevel?: CodaliImprovementReleaseLevel;
|
|
85
|
+
scope?: CodaliImprovementScope;
|
|
86
|
+
policy?: CodaliImprovementPolicy;
|
|
87
|
+
autoTagEnabled?: boolean;
|
|
88
|
+
autoPublishEnabled?: boolean;
|
|
89
|
+
runId?: string;
|
|
90
|
+
candidateDate?: string;
|
|
91
|
+
commitSha?: string;
|
|
92
|
+
dirtyEntries?: readonly CodaliCandidateReleaseDirtyEntry[];
|
|
93
|
+
scorecard?: CodaliImprovementEvalRunnerResult;
|
|
94
|
+
workflowRun?: Partial<CodaliPublishWorkflowRunStatus>;
|
|
95
|
+
pollActions?: boolean;
|
|
96
|
+
verifyNpm?: boolean;
|
|
97
|
+
npmRegistry?: string;
|
|
98
|
+
npmPackages?: readonly string[];
|
|
99
|
+
npmVersions?: readonly {
|
|
100
|
+
packageName: string;
|
|
101
|
+
version: string;
|
|
102
|
+
}[];
|
|
103
|
+
now?: () => Date;
|
|
104
|
+
commandRunner?: CodaliCandidateReleaseCommandRunner;
|
|
105
|
+
}
|
|
106
|
+
export interface WriteCodaliPublishToStorageInput {
|
|
107
|
+
result: CodaliPublishResult;
|
|
108
|
+
scope: GatewayDatasetStorageScope;
|
|
109
|
+
client: StorageServiceImprovementClient;
|
|
110
|
+
}
|
|
111
|
+
export declare const runCodaliPublishOrchestrator: (input: RunCodaliPublishOrchestratorInput) => Promise<CodaliPublishResult>;
|
|
112
|
+
export declare const writeCodaliPublishToStorageService: (input: WriteCodaliPublishToStorageInput) => Promise<Array<StorageServiceImprovementWriteResult<unknown>>>;
|
|
113
|
+
//# sourceMappingURL=PublishOrchestrator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublishOrchestrator.d.ts","sourceRoot":"","sources":["../../src/improvement/PublishOrchestrator.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,2BAA2B,EAEhC,KAAK,mCAAmC,EACxC,KAAK,gCAAgC,EACtC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,+BAA+B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,+BAA+B,EAC/B,KAAK,oCAAoC,EAC1C,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAEpF,eAAO,MAAM,0CAA0C,EACrD,+BAAwC,CAAC;AAE3C,eAAO,MAAM,oCAAoC,EAC/C,+BAAwC,CAAC;AAE3C,eAAO,MAAM,mCAAmC,EAC9C,6BAAsC,CAAC;AAEzC,MAAM,MAAM,iBAAiB,GAAG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