@ls-stack/agent-eval 0.38.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +14 -14
- package/dist/runChild.mjs +26 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -3189,8 +3189,8 @@ declare const traceSpanSchema: z$1.ZodObject<{
|
|
|
3189
3189
|
status: z$1.ZodEnum<{
|
|
3190
3190
|
error: "error";
|
|
3191
3191
|
running: "running";
|
|
3192
|
-
cancelled: "cancelled";
|
|
3193
3192
|
ok: "ok";
|
|
3193
|
+
cancelled: "cancelled";
|
|
3194
3194
|
}>;
|
|
3195
3195
|
attributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
3196
3196
|
error: z$1.ZodOptional<z$1.ZodObject<{
|
|
@@ -3599,9 +3599,9 @@ declare const caseRowSchema: z$1.ZodObject<{
|
|
|
3599
3599
|
evalId: z$1.ZodString;
|
|
3600
3600
|
status: z$1.ZodEnum<{
|
|
3601
3601
|
error: "error";
|
|
3602
|
-
pending: "pending";
|
|
3603
3602
|
running: "running";
|
|
3604
3603
|
cancelled: "cancelled";
|
|
3604
|
+
pending: "pending";
|
|
3605
3605
|
pass: "pass";
|
|
3606
3606
|
fail: "fail";
|
|
3607
3607
|
}>;
|
|
@@ -3695,8 +3695,8 @@ declare const scoreTraceSchema: z$1.ZodObject<{
|
|
|
3695
3695
|
status: z$1.ZodEnum<{
|
|
3696
3696
|
error: "error";
|
|
3697
3697
|
running: "running";
|
|
3698
|
-
cancelled: "cancelled";
|
|
3699
3698
|
ok: "ok";
|
|
3699
|
+
cancelled: "cancelled";
|
|
3700
3700
|
}>;
|
|
3701
3701
|
attributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
3702
3702
|
error: z$1.ZodOptional<z$1.ZodObject<{
|
|
@@ -3763,9 +3763,9 @@ declare const caseDetailSchema: z$1.ZodObject<{
|
|
|
3763
3763
|
evalId: z$1.ZodString;
|
|
3764
3764
|
status: z$1.ZodEnum<{
|
|
3765
3765
|
error: "error";
|
|
3766
|
-
pending: "pending";
|
|
3767
3766
|
running: "running";
|
|
3768
3767
|
cancelled: "cancelled";
|
|
3768
|
+
pending: "pending";
|
|
3769
3769
|
pass: "pass";
|
|
3770
3770
|
fail: "fail";
|
|
3771
3771
|
}>;
|
|
@@ -3781,8 +3781,8 @@ declare const caseDetailSchema: z$1.ZodObject<{
|
|
|
3781
3781
|
status: z$1.ZodEnum<{
|
|
3782
3782
|
error: "error";
|
|
3783
3783
|
running: "running";
|
|
3784
|
-
cancelled: "cancelled";
|
|
3785
3784
|
ok: "ok";
|
|
3785
|
+
cancelled: "cancelled";
|
|
3786
3786
|
}>;
|
|
3787
3787
|
attributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
3788
3788
|
error: z$1.ZodOptional<z$1.ZodObject<{
|
|
@@ -3850,8 +3850,8 @@ declare const caseDetailSchema: z$1.ZodObject<{
|
|
|
3850
3850
|
status: z$1.ZodEnum<{
|
|
3851
3851
|
error: "error";
|
|
3852
3852
|
running: "running";
|
|
3853
|
-
cancelled: "cancelled";
|
|
3854
3853
|
ok: "ok";
|
|
3854
|
+
cancelled: "cancelled";
|
|
3855
3855
|
}>;
|
|
3856
3856
|
attributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
3857
3857
|
error: z$1.ZodOptional<z$1.ZodObject<{
|
|
@@ -4329,10 +4329,10 @@ declare const runManifestSchema: z$1.ZodObject<{
|
|
|
4329
4329
|
shortId: z$1.ZodString;
|
|
4330
4330
|
status: z$1.ZodEnum<{
|
|
4331
4331
|
error: "error";
|
|
4332
|
-
pending: "pending";
|
|
4333
4332
|
running: "running";
|
|
4334
|
-
completed: "completed";
|
|
4335
4333
|
cancelled: "cancelled";
|
|
4334
|
+
pending: "pending";
|
|
4335
|
+
completed: "completed";
|
|
4336
4336
|
}>;
|
|
4337
4337
|
temporary: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
4338
4338
|
startedAt: z$1.ZodString;
|
|
@@ -4368,10 +4368,10 @@ declare const runSummarySchema: z$1.ZodObject<{
|
|
|
4368
4368
|
runId: z$1.ZodString;
|
|
4369
4369
|
status: z$1.ZodEnum<{
|
|
4370
4370
|
error: "error";
|
|
4371
|
-
pending: "pending";
|
|
4372
4371
|
running: "running";
|
|
4373
|
-
completed: "completed";
|
|
4374
4372
|
cancelled: "cancelled";
|
|
4373
|
+
pending: "pending";
|
|
4374
|
+
completed: "completed";
|
|
4375
4375
|
}>;
|
|
4376
4376
|
totalCases: z$1.ZodNumber;
|
|
4377
4377
|
passedCases: z$1.ZodNumber;
|
|
@@ -5666,8 +5666,8 @@ declare const cacheRecordingSchema: z$1.ZodObject<{
|
|
|
5666
5666
|
finalStatus: z$1.ZodOptional<z$1.ZodEnum<{
|
|
5667
5667
|
error: "error";
|
|
5668
5668
|
running: "running";
|
|
5669
|
-
cancelled: "cancelled";
|
|
5670
5669
|
ok: "ok";
|
|
5670
|
+
cancelled: "cancelled";
|
|
5671
5671
|
}>>;
|
|
5672
5672
|
finalError: z$1.ZodOptional<z$1.ZodObject<{
|
|
5673
5673
|
name: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -5739,8 +5739,8 @@ declare const cacheEntrySchema: z$1.ZodObject<{
|
|
|
5739
5739
|
finalStatus: z$1.ZodOptional<z$1.ZodEnum<{
|
|
5740
5740
|
error: "error";
|
|
5741
5741
|
running: "running";
|
|
5742
|
-
cancelled: "cancelled";
|
|
5743
5742
|
ok: "ok";
|
|
5743
|
+
cancelled: "cancelled";
|
|
5744
5744
|
}>>;
|
|
5745
5745
|
finalError: z$1.ZodOptional<z$1.ZodObject<{
|
|
5746
5746
|
name: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -5828,8 +5828,8 @@ declare const cacheEntryWithDebugKeySchema: z$1.ZodObject<{
|
|
|
5828
5828
|
finalStatus: z$1.ZodOptional<z$1.ZodEnum<{
|
|
5829
5829
|
error: "error";
|
|
5830
5830
|
running: "running";
|
|
5831
|
-
cancelled: "cancelled";
|
|
5832
5831
|
ok: "ok";
|
|
5832
|
+
cancelled: "cancelled";
|
|
5833
5833
|
}>>;
|
|
5834
5834
|
finalError: z$1.ZodOptional<z$1.ZodObject<{
|
|
5835
5835
|
name: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -5917,8 +5917,8 @@ declare const cacheFileSchema: z$1.ZodObject<{
|
|
|
5917
5917
|
finalStatus: z$1.ZodOptional<z$1.ZodEnum<{
|
|
5918
5918
|
error: "error";
|
|
5919
5919
|
running: "running";
|
|
5920
|
-
cancelled: "cancelled";
|
|
5921
5920
|
ok: "ok";
|
|
5921
|
+
cancelled: "cancelled";
|
|
5922
5922
|
}>>;
|
|
5923
5923
|
finalError: z$1.ZodOptional<z$1.ZodObject<{
|
|
5924
5924
|
name: z$1.ZodOptional<z$1.ZodString>;
|
package/dist/runChild.mjs
CHANGED
|
@@ -31,9 +31,31 @@ const runChildContextSchema = z.object({
|
|
|
31
31
|
let activeContext;
|
|
32
32
|
let fatalErrorReported = false;
|
|
33
33
|
let disconnectExpected = false;
|
|
34
|
+
const pendingMessageSends = /* @__PURE__ */ new Set();
|
|
34
35
|
function sendMessage(message) {
|
|
35
36
|
if (process.send === void 0) return;
|
|
36
|
-
|
|
37
|
+
const sendPromise = new Promise((resolvePromise) => {
|
|
38
|
+
try {
|
|
39
|
+
process.send?.(message, (error) => {
|
|
40
|
+
if (error) {
|
|
41
|
+
console.error("Failed to send run child message:");
|
|
42
|
+
console.error(formatUnknownErrorDetails(error));
|
|
43
|
+
}
|
|
44
|
+
resolvePromise();
|
|
45
|
+
});
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.error("Failed to send run child message:");
|
|
48
|
+
console.error(formatUnknownErrorDetails(error));
|
|
49
|
+
resolvePromise();
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
pendingMessageSends.add(sendPromise);
|
|
53
|
+
sendPromise.finally(() => {
|
|
54
|
+
pendingMessageSends.delete(sendPromise);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async function flushMessageSends() {
|
|
58
|
+
while (pendingMessageSends.size > 0) await Promise.allSettled([...pendingMessageSends]);
|
|
37
59
|
}
|
|
38
60
|
function installFatalRunChildErrorHandlers() {
|
|
39
61
|
process.once("uncaughtException", (error) => {
|
|
@@ -166,6 +188,7 @@ async function main() {
|
|
|
166
188
|
type: "done",
|
|
167
189
|
evals: [...evals.values()]
|
|
168
190
|
});
|
|
191
|
+
await flushMessageSends();
|
|
169
192
|
}
|
|
170
193
|
async function handleFatalRunChildError(error) {
|
|
171
194
|
if (fatalErrorReported) return;
|
|
@@ -200,6 +223,7 @@ async function handleFatalRunChildError(error) {
|
|
|
200
223
|
payload: { message }
|
|
201
224
|
}
|
|
202
225
|
});
|
|
226
|
+
await flushMessageSends();
|
|
203
227
|
}
|
|
204
228
|
function formatUnknownErrorDetails(error) {
|
|
205
229
|
if (error instanceof Error) return error.stack ?? error.message;
|
|
@@ -224,6 +248,7 @@ installFatalRunChildErrorHandlers();
|
|
|
224
248
|
await main().catch(async (error) => {
|
|
225
249
|
await handleFatalRunChildError(error);
|
|
226
250
|
});
|
|
251
|
+
await flushMessageSends();
|
|
227
252
|
disconnectExpected = true;
|
|
228
253
|
process.disconnect();
|
|
229
254
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ls-stack/agent-eval",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"agent-evals": "./dist/bin.mjs"
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^24.7.2",
|
|
33
33
|
"typescript": "^5.9.2",
|
|
34
|
-
"@agent-evals/sdk": "0.0.1",
|
|
35
34
|
"@agent-evals/runner": "0.0.1",
|
|
35
|
+
"@agent-evals/sdk": "0.0.1",
|
|
36
36
|
"@agent-evals/shared": "0.0.1"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|