orchestrated 0.1.26 → 0.1.29
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/index.js +12 -3
- package/index.js.map +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -85794,10 +85794,12 @@ function createScorerWrapper(scorerDef, handlerFn) {
|
|
|
85794
85794
|
return scorerWrapper;
|
|
85795
85795
|
}
|
|
85796
85796
|
async function resolveScorer(scorerRefOrDef) {
|
|
85797
|
+
console.log("resolveScorer input:", JSON.stringify(scorerRefOrDef));
|
|
85797
85798
|
try {
|
|
85798
85799
|
ScorerReferenceOrDefinitionSchema.parse(scorerRefOrDef);
|
|
85799
85800
|
} catch (error48) {
|
|
85800
85801
|
if (error48 instanceof ZodError) {
|
|
85802
|
+
console.error("resolveScorer validation failed for input:", JSON.stringify(scorerRefOrDef));
|
|
85801
85803
|
throw new ValidationError("Invalid scorer reference or definition", error48, "resolveScorer");
|
|
85802
85804
|
}
|
|
85803
85805
|
throw error48;
|
|
@@ -85880,7 +85882,9 @@ Available handlers: ${Object.keys(handlers2).join(", ")}`);
|
|
|
85880
85882
|
console.log(`Scorer "${scorerRef.slug}" not found locally, fetching from API`);
|
|
85881
85883
|
const version2 = scorerRef.fingerprint || "LATEST";
|
|
85882
85884
|
const scorerRecord = await getDefinition("scorer", scorerRef.slug, version2);
|
|
85885
|
+
console.log(`Scorer record for "${scorerRef.slug}":`, JSON.stringify(scorerRecord));
|
|
85883
85886
|
const scorerDef = scorerRecord.definition;
|
|
85887
|
+
console.log(`Scorer definition for "${scorerRef.slug}":`, JSON.stringify(scorerDef));
|
|
85884
85888
|
try {
|
|
85885
85889
|
SerializableScorerSchema.parse(scorerDef);
|
|
85886
85890
|
} catch (error48) {
|
|
@@ -114478,7 +114482,7 @@ async function serializeScorer(scorer, evalName, index) {
|
|
|
114478
114482
|
registry2.scorers.push(definition);
|
|
114479
114483
|
}
|
|
114480
114484
|
return {
|
|
114481
|
-
type:
|
|
114485
|
+
type: "custom_scorer",
|
|
114482
114486
|
slug: definition.slug || definition.name.toLowerCase(),
|
|
114483
114487
|
fingerprint: definition.fingerprint
|
|
114484
114488
|
};
|
|
@@ -114544,7 +114548,12 @@ async function serializeEvaluation(name, config2, options) {
|
|
|
114544
114548
|
const serializedScorer = await serializeScorer(config2.scores[i2], name, i2);
|
|
114545
114549
|
scores.push(serializedScorer);
|
|
114546
114550
|
}
|
|
114547
|
-
const serializedOptions = options?.__schedule
|
|
114551
|
+
const serializedOptions = options?.__schedule || options?.batchProcessor ? {
|
|
114552
|
+
...options.__schedule && { __schedule: options.__schedule },
|
|
114553
|
+
...options.batchProcessor && {
|
|
114554
|
+
batchProcessor: options.batchProcessor
|
|
114555
|
+
}
|
|
114556
|
+
} : undefined;
|
|
114548
114557
|
return {
|
|
114549
114558
|
name,
|
|
114550
114559
|
slug,
|
|
@@ -116025,4 +116034,4 @@ export {
|
|
|
116025
116034
|
Behavioral
|
|
116026
116035
|
};
|
|
116027
116036
|
|
|
116028
|
-
//# debugId=
|
|
116037
|
+
//# debugId=05DB886F5F4CE9D864756E2164756E21
|