@kortyx/agent 0.37.1 → 0.38.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/CHANGELOG.md +40 -0
- package/README.md +16 -0
- package/dist/evals.d.ts +70 -3
- package/dist/evals.js +188 -110
- package/dist/evals.js.map +1 -1
- package/dist/index.d.ts +11 -5
- package/dist/index.js +1219 -647
- package/dist/index.js.map +1 -1
- package/dist/{studio-judge-Dsz6KDY2.d.ts → studio-judge-DCAw3v60.d.ts} +310 -6
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
- Add bounded, idempotent queued eval execution with shared consumer capacity,
|
|
6
|
+
event replay, explicit cancellation and optional PostgreSQL recovery.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [0.38.0](https://github.com/kortyx-io/kortyx/compare/agent-v0.37.1...agent-v0.38.0) (2026-10-13)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### ⚠ BREAKING CHANGES
|
|
13
|
+
|
|
14
|
+
* **runtime:** Consumer eval routes cap active attempts at 20 by default. Set maxActiveAttempts before upgrading consumers with higher concurrency. Upgrade API and Studio together for the new case-dispatch progress events.
|
|
15
|
+
* **agent:** Consumer eval routes cap active attempts at 20 by default. Set maxActiveAttempts before upgrading consumers with higher concurrency. Upgrade API and Studio together for the new case-dispatch progress events.
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **agent:** make concurrent eval execution resilient ([#339](https://github.com/kortyx-io/kortyx/issues/339)) ([84d0e4f](https://github.com/kortyx-io/kortyx/commit/84d0e4fe3d35e5cf80713f7550ef2b1d83e5a2ec))
|
|
20
|
+
* **runtime:** add opt-in workflow data reducers ([#340](https://github.com/kortyx-io/kortyx/issues/340)) ([8be2c81](https://github.com/kortyx-io/kortyx/commit/8be2c81f74c5c51ab98443144f3491d4e8d54a88))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **evals:** preserve diagnostics and separate postcondition failures ([#337](https://github.com/kortyx-io/kortyx/issues/337)) ([d4fce4e](https://github.com/kortyx-io/kortyx/commit/d4fce4e670971d3b755835fc681c8125f67a9c70))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Dependencies
|
|
29
|
+
|
|
30
|
+
* The following workspace dependencies were updated
|
|
31
|
+
* dependencies
|
|
32
|
+
* @kortyx/core bumped to 0.14.0
|
|
33
|
+
* @kortyx/providers bumped to 0.9.3
|
|
34
|
+
* @kortyx/runtime bumped to 0.24.0
|
|
35
|
+
* @kortyx/stream bumped to 0.15.5
|
|
36
|
+
* @kortyx/utils bumped to 0.3.7
|
|
37
|
+
* @kortyx/prompts bumped to 0.2.1
|
|
38
|
+
* @kortyx/usage-telemetry bumped to 0.3.0
|
|
39
|
+
* devDependencies
|
|
40
|
+
* @kortyx/hooks bumped to 0.34.2
|
|
41
|
+
* @kortyx/openai bumped to 0.5.9
|
|
42
|
+
|
|
3
43
|
## [0.37.1](https://github.com/kortyx-io/kortyx/compare/agent-v0.37.0...agent-v0.37.1) (2026-10-13)
|
|
4
44
|
|
|
5
45
|
|
package/README.md
CHANGED
|
@@ -95,3 +95,19 @@ Versions are optional. These deterministic checks run before semantic criteria
|
|
|
95
95
|
and only match finalized visible outputs from the current step. See the
|
|
96
96
|
[conversation eval guide](https://kortyx.io/docs/guides/conversation-evals) for
|
|
97
97
|
SDK setup, Studio execution and custom executor requirements.
|
|
98
|
+
|
|
99
|
+
Eval issues preserve declared-safe failures and native diagnostic references.
|
|
100
|
+
Configure native diagnostic capture on the agent to inspect original hook errors
|
|
101
|
+
in Studio. Use `verify` for postconditions (false means Failed), and `teardown` for
|
|
102
|
+
reset (a thrown fault means Error). Setup, execution and verification have separate
|
|
103
|
+
cooperative budgets. See [eval error migration](../../docs/evals/error-contract-migration.md)
|
|
104
|
+
before upgrading a mixed SDK/API/Studio deployment.
|
|
105
|
+
|
|
106
|
+
## Evaluation execution recovery
|
|
107
|
+
|
|
108
|
+
`createEvalRouteHandler` supports queued, idempotent execution with cursor-based
|
|
109
|
+
observation and explicit cancellation. Use `createPostgresEvalExecutionStore` from
|
|
110
|
+
`@kortyx/runtime` (or `kortyx`) for shared capacity and recovery across replicas.
|
|
111
|
+
The default memory store only survives within its process. See
|
|
112
|
+
[execution resilience](../../docs/evals/execution-resilience.md) for configuration,
|
|
113
|
+
retention, legacy compatibility and upgrade order.
|
package/dist/evals.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { C as CreateEvalsOptions, E as EvalCase, a as EvalCaseResult, b as EvalCaseResultSchema, c as EvalCommand, d as EvalConfigurationError, e as EvalContext, f as EvalCriterion, g as EvalCriterionResult, h as EvalDefaults, i as EvalEvidenceEvent, j as EvalEvidenceEventType, k as EvalEvidenceFilters, l as EvalEvidencePolicy, m as EvalEvidencePolicySchema, n as EvalExecution, o as EvalExecutionStatus, p as EvalExpectation, q as EvalGradeInput, r as EvalHandlerRef, s as EvalInterrupt, t as EvalIssue, u as
|
|
1
|
+
export { C as CreateEvalsOptions, E as EvalCase, a as EvalCaseResult, b as EvalCaseResultSchema, c as EvalCommand, d as EvalConfigurationError, e as EvalContext, f as EvalCriterion, g as EvalCriterionResult, h as EvalDefaults, i as EvalEvidenceEvent, j as EvalEvidenceEventType, k as EvalEvidenceFilters, l as EvalEvidencePolicy, m as EvalEvidencePolicySchema, n as EvalExecution, o as EvalExecutionStatus, p as EvalExpectation, q as EvalGradeInput, r as EvalHandlerRef, s as EvalInterrupt, t as EvalIssue, u as EvalIssueSchema, v as EvalJson, w as EvalJudge, x as EvalJudgeEvidence, y as EvalJudgeIdentity, z as EvalJudgeIdentitySchema, A as EvalJudgeOptions, B as EvalJudgeUsage, D as EvalJudgeUsageSchema, F as EvalManifest, G as EvalManifestSchema, H as EvalObservation, I as EvalObservationSchema, J as EvalOutputExpectation, K as EvalOutputSelector, L as EvalPhase, M as EvalProgress, N as EvalProgressSchema, O as EvalRemoteRunRequest, P as EvalRemoteRunRequestSchema, Q as EvalResponder, R as EvalResumeResponseSchema, S as EvalRunOptions, T as EvalRunResult, U as EvalRunResultSchema, V as EvalRuntimeExecution, W as EvalSetupContext, X as EvalStatus, Y as EvalStep, Z as EvalStepResult, _ as EvalStepResultSchema, $ as EvalSuite, a0 as EvalSuiteSchema, a1 as EvalVerdict, a2 as EvalVerdictSchema, a3 as EvalWireEvent, a4 as EvalWireEventSchema, a5 as EvaluationMetadataSchema, a6 as StudioEvalJudgeOptions, a7 as StudioEvalJudgeRequestSchema, a8 as StudioEvalJudgeResponseSchema, a9 as StudioEvalStartRequestSchema, aa as StudioEvaluationDetail, ab as StudioEvaluationDetailSchema, ac as StudioEvaluationHistorySchema, ad as StudioEvaluationResultsSchema, ae as StudioEvaluationStartRequest, af as StudioEvaluationStartRequestSchema, ag as StudioEvaluationSummary, ah as StudioEvaluationSummarySchema, ai as createEvalIssue, aj as createStudioEvalJudge, ak as defineSuite, al as getEvalGradeEvidence, am as parseEvalSuite } from './studio-judge-DCAw3v60.js';
|
|
2
|
+
import * as _kortyx_core from '@kortyx/core';
|
|
2
3
|
import { z } from 'zod';
|
|
3
4
|
import '@kortyx/prompts';
|
|
4
|
-
import '@kortyx/providers';
|
|
5
5
|
import '@kortyx/core/errors';
|
|
6
|
+
import '@kortyx/providers';
|
|
6
7
|
import '@kortyx/stream';
|
|
7
|
-
import '@kortyx/core';
|
|
8
8
|
import '@kortyx/runtime';
|
|
9
9
|
import '@kortyx/hooks';
|
|
10
10
|
import './chat-message-D4EsFcr1.js';
|
|
@@ -838,6 +838,22 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
838
838
|
ungraded: z.ZodOptional<z.ZodNumber>;
|
|
839
839
|
}, z.core.$strict>;
|
|
840
840
|
cases: z.ZodArray<z.ZodObject<{
|
|
841
|
+
verification: z.ZodOptional<z.ZodObject<{
|
|
842
|
+
passed: z.ZodBoolean;
|
|
843
|
+
reason: z.ZodString;
|
|
844
|
+
evidence: z.ZodArray<z.ZodString>;
|
|
845
|
+
}, z.core.$strict>>;
|
|
846
|
+
phaseDurationsMs: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
847
|
+
params: "params";
|
|
848
|
+
execute: "execute";
|
|
849
|
+
setup: "setup";
|
|
850
|
+
responder: "responder";
|
|
851
|
+
reference: "reference";
|
|
852
|
+
grading: "grading";
|
|
853
|
+
verification: "verification";
|
|
854
|
+
cleanup: "cleanup";
|
|
855
|
+
reporting: "reporting";
|
|
856
|
+
}> & z.core.$partial, z.ZodNumber>>;
|
|
841
857
|
caseId: z.ZodString;
|
|
842
858
|
repetition: z.ZodNumber;
|
|
843
859
|
attemptId: z.ZodOptional<z.ZodUUID>;
|
|
@@ -859,6 +875,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
859
875
|
version: z.ZodLiteral<"compact-v1">;
|
|
860
876
|
history: z.ZodBoolean;
|
|
861
877
|
observation: z.ZodObject<{
|
|
878
|
+
failure: z.ZodOptional<z.ZodPipe<z.ZodCustom<_kortyx_core.FailureDescriptor, _kortyx_core.FailureDescriptor>, z.ZodTransform<_kortyx_core.SerializedFailureDescriptor, _kortyx_core.FailureDescriptor>>>;
|
|
879
|
+
diagnosticId: z.ZodOptional<z.ZodUUID>;
|
|
862
880
|
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
863
881
|
id: z.ZodString;
|
|
864
882
|
version: z.ZodNumber;
|
|
@@ -933,6 +951,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
933
951
|
reference: z.ZodOptional<z.ZodJSONSchema>;
|
|
934
952
|
}, z.core.$strict>;
|
|
935
953
|
observation: z.ZodObject<{
|
|
954
|
+
failure: z.ZodOptional<z.ZodPipe<z.ZodCustom<_kortyx_core.FailureDescriptor, _kortyx_core.FailureDescriptor>, z.ZodTransform<_kortyx_core.SerializedFailureDescriptor, _kortyx_core.FailureDescriptor>>>;
|
|
955
|
+
diagnosticId: z.ZodOptional<z.ZodUUID>;
|
|
936
956
|
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
937
957
|
id: z.ZodString;
|
|
938
958
|
version: z.ZodNumber;
|
|
@@ -1017,6 +1037,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1017
1037
|
}, z.core.$strict>>;
|
|
1018
1038
|
}, z.core.$strict>>;
|
|
1019
1039
|
errors: z.ZodArray<z.ZodObject<{
|
|
1040
|
+
failure: z.ZodOptional<z.ZodPipe<z.ZodCustom<_kortyx_core.FailureDescriptor, _kortyx_core.FailureDescriptor>, z.ZodTransform<_kortyx_core.SerializedFailureDescriptor, _kortyx_core.FailureDescriptor>>>;
|
|
1041
|
+
diagnosticId: z.ZodOptional<z.ZodUUID>;
|
|
1020
1042
|
phase: z.ZodEnum<{
|
|
1021
1043
|
params: "params";
|
|
1022
1044
|
execute: "execute";
|
|
@@ -1024,6 +1046,7 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1024
1046
|
responder: "responder";
|
|
1025
1047
|
reference: "reference";
|
|
1026
1048
|
grading: "grading";
|
|
1049
|
+
verification: "verification";
|
|
1027
1050
|
cleanup: "cleanup";
|
|
1028
1051
|
reporting: "reporting";
|
|
1029
1052
|
}>;
|
|
@@ -1032,6 +1055,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1032
1055
|
}, z.core.$strict>>;
|
|
1033
1056
|
}, z.core.$strict>>;
|
|
1034
1057
|
errors: z.ZodArray<z.ZodObject<{
|
|
1058
|
+
failure: z.ZodOptional<z.ZodPipe<z.ZodCustom<_kortyx_core.FailureDescriptor, _kortyx_core.FailureDescriptor>, z.ZodTransform<_kortyx_core.SerializedFailureDescriptor, _kortyx_core.FailureDescriptor>>>;
|
|
1059
|
+
diagnosticId: z.ZodOptional<z.ZodUUID>;
|
|
1035
1060
|
phase: z.ZodEnum<{
|
|
1036
1061
|
params: "params";
|
|
1037
1062
|
execute: "execute";
|
|
@@ -1039,6 +1064,7 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1039
1064
|
responder: "responder";
|
|
1040
1065
|
reference: "reference";
|
|
1041
1066
|
grading: "grading";
|
|
1067
|
+
verification: "verification";
|
|
1042
1068
|
cleanup: "cleanup";
|
|
1043
1069
|
reporting: "reporting";
|
|
1044
1070
|
}>;
|
|
@@ -1049,6 +1075,19 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1049
1075
|
events: z.ZodArray<z.ZodObject<{
|
|
1050
1076
|
id: z.ZodNumber;
|
|
1051
1077
|
event: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1078
|
+
type: z.ZodLiteral<"case-dispatch">;
|
|
1079
|
+
caseId: z.ZodString;
|
|
1080
|
+
repetition: z.ZodNumber;
|
|
1081
|
+
status: z.ZodEnum<{
|
|
1082
|
+
queued: "queued";
|
|
1083
|
+
retrying: "retrying";
|
|
1084
|
+
reconnecting: "reconnecting";
|
|
1085
|
+
}>;
|
|
1086
|
+
retryAt: z.ZodOptional<z.ZodISODateTime>;
|
|
1087
|
+
httpStatus: z.ZodOptional<z.ZodNumber>;
|
|
1088
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
1089
|
+
generation: z.ZodOptional<z.ZodUUID>;
|
|
1090
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1052
1091
|
type: z.ZodLiteral<"case-runtime-associated">;
|
|
1053
1092
|
caseId: z.ZodString;
|
|
1054
1093
|
repetition: z.ZodNumber;
|
|
@@ -1073,6 +1112,7 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1073
1112
|
responder: "responder";
|
|
1074
1113
|
reference: "reference";
|
|
1075
1114
|
grading: "grading";
|
|
1115
|
+
verification: "verification";
|
|
1076
1116
|
cleanup: "cleanup";
|
|
1077
1117
|
reporting: "reporting";
|
|
1078
1118
|
}>;
|
|
@@ -1092,6 +1132,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1092
1132
|
version: z.ZodLiteral<"compact-v1">;
|
|
1093
1133
|
history: z.ZodBoolean;
|
|
1094
1134
|
observation: z.ZodObject<{
|
|
1135
|
+
failure: z.ZodOptional<z.ZodPipe<z.ZodCustom<_kortyx_core.FailureDescriptor, _kortyx_core.FailureDescriptor>, z.ZodTransform<_kortyx_core.SerializedFailureDescriptor, _kortyx_core.FailureDescriptor>>>;
|
|
1136
|
+
diagnosticId: z.ZodOptional<z.ZodUUID>;
|
|
1095
1137
|
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1096
1138
|
id: z.ZodString;
|
|
1097
1139
|
version: z.ZodNumber;
|
|
@@ -1166,6 +1208,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1166
1208
|
reference: z.ZodOptional<z.ZodJSONSchema>;
|
|
1167
1209
|
}, z.core.$strict>;
|
|
1168
1210
|
observation: z.ZodObject<{
|
|
1211
|
+
failure: z.ZodOptional<z.ZodPipe<z.ZodCustom<_kortyx_core.FailureDescriptor, _kortyx_core.FailureDescriptor>, z.ZodTransform<_kortyx_core.SerializedFailureDescriptor, _kortyx_core.FailureDescriptor>>>;
|
|
1212
|
+
diagnosticId: z.ZodOptional<z.ZodUUID>;
|
|
1169
1213
|
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1170
1214
|
id: z.ZodString;
|
|
1171
1215
|
version: z.ZodNumber;
|
|
@@ -1252,6 +1296,22 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1252
1296
|
}, z.core.$strict>, z.ZodObject<{
|
|
1253
1297
|
type: z.ZodLiteral<"case-completed">;
|
|
1254
1298
|
result: z.ZodObject<{
|
|
1299
|
+
verification: z.ZodOptional<z.ZodObject<{
|
|
1300
|
+
passed: z.ZodBoolean;
|
|
1301
|
+
reason: z.ZodString;
|
|
1302
|
+
evidence: z.ZodArray<z.ZodString>;
|
|
1303
|
+
}, z.core.$strict>>;
|
|
1304
|
+
phaseDurationsMs: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
1305
|
+
params: "params";
|
|
1306
|
+
execute: "execute";
|
|
1307
|
+
setup: "setup";
|
|
1308
|
+
responder: "responder";
|
|
1309
|
+
reference: "reference";
|
|
1310
|
+
grading: "grading";
|
|
1311
|
+
verification: "verification";
|
|
1312
|
+
cleanup: "cleanup";
|
|
1313
|
+
reporting: "reporting";
|
|
1314
|
+
}> & z.core.$partial, z.ZodNumber>>;
|
|
1255
1315
|
caseId: z.ZodString;
|
|
1256
1316
|
repetition: z.ZodNumber;
|
|
1257
1317
|
attemptId: z.ZodOptional<z.ZodUUID>;
|
|
@@ -1273,6 +1333,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1273
1333
|
version: z.ZodLiteral<"compact-v1">;
|
|
1274
1334
|
history: z.ZodBoolean;
|
|
1275
1335
|
observation: z.ZodObject<{
|
|
1336
|
+
failure: z.ZodOptional<z.ZodPipe<z.ZodCustom<_kortyx_core.FailureDescriptor, _kortyx_core.FailureDescriptor>, z.ZodTransform<_kortyx_core.SerializedFailureDescriptor, _kortyx_core.FailureDescriptor>>>;
|
|
1337
|
+
diagnosticId: z.ZodOptional<z.ZodUUID>;
|
|
1276
1338
|
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1277
1339
|
id: z.ZodString;
|
|
1278
1340
|
version: z.ZodNumber;
|
|
@@ -1347,6 +1409,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1347
1409
|
reference: z.ZodOptional<z.ZodJSONSchema>;
|
|
1348
1410
|
}, z.core.$strict>;
|
|
1349
1411
|
observation: z.ZodObject<{
|
|
1412
|
+
failure: z.ZodOptional<z.ZodPipe<z.ZodCustom<_kortyx_core.FailureDescriptor, _kortyx_core.FailureDescriptor>, z.ZodTransform<_kortyx_core.SerializedFailureDescriptor, _kortyx_core.FailureDescriptor>>>;
|
|
1413
|
+
diagnosticId: z.ZodOptional<z.ZodUUID>;
|
|
1350
1414
|
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1351
1415
|
id: z.ZodString;
|
|
1352
1416
|
version: z.ZodNumber;
|
|
@@ -1431,6 +1495,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1431
1495
|
}, z.core.$strict>>;
|
|
1432
1496
|
}, z.core.$strict>>;
|
|
1433
1497
|
errors: z.ZodArray<z.ZodObject<{
|
|
1498
|
+
failure: z.ZodOptional<z.ZodPipe<z.ZodCustom<_kortyx_core.FailureDescriptor, _kortyx_core.FailureDescriptor>, z.ZodTransform<_kortyx_core.SerializedFailureDescriptor, _kortyx_core.FailureDescriptor>>>;
|
|
1499
|
+
diagnosticId: z.ZodOptional<z.ZodUUID>;
|
|
1434
1500
|
phase: z.ZodEnum<{
|
|
1435
1501
|
params: "params";
|
|
1436
1502
|
execute: "execute";
|
|
@@ -1438,6 +1504,7 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1438
1504
|
responder: "responder";
|
|
1439
1505
|
reference: "reference";
|
|
1440
1506
|
grading: "grading";
|
|
1507
|
+
verification: "verification";
|
|
1441
1508
|
cleanup: "cleanup";
|
|
1442
1509
|
reporting: "reporting";
|
|
1443
1510
|
}>;
|