@kortyx/agent 0.35.0 → 0.37.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 +45 -0
- package/dist/evals.d.ts +113 -12
- package/dist/evals.js +37 -1
- package/dist/evals.js.map +1 -1
- package/dist/index.d.ts +17 -5
- package/dist/index.js +1351 -429
- package/dist/index.js.map +1 -1
- package/dist/{studio-judge-0yb-Cf2q.d.ts → studio-judge-Brk9R5oB.d.ts} +373 -40
- package/package.json +10 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.37.0](https://github.com/kortyx-io/kortyx/compare/agent-v0.36.0...agent-v0.37.0) (2026-10-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add shared SDK and Studio usage telemetry ([#313](https://github.com/kortyx-io/kortyx/issues/313)) ([7d5f0c0](https://github.com/kortyx-io/kortyx/commit/7d5f0c005bd7721dc6a529554e75c14573d76a0f))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **website:** reconcile credibility branch with current main ([60199f9](https://github.com/kortyx-io/kortyx/commit/60199f992242eb7c409a95bc7a6898d31bac601d))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
* The following workspace dependencies were updated
|
|
19
|
+
* dependencies
|
|
20
|
+
* @kortyx/core bumped to 0.13.1
|
|
21
|
+
* @kortyx/providers bumped to 0.9.2
|
|
22
|
+
* @kortyx/runtime bumped to 0.23.1
|
|
23
|
+
* @kortyx/stream bumped to 0.15.4
|
|
24
|
+
* @kortyx/utils bumped to 0.3.6
|
|
25
|
+
* @kortyx/prompts bumped to 0.2.0
|
|
26
|
+
* @kortyx/usage-telemetry bumped to 0.2.0
|
|
27
|
+
* devDependencies
|
|
28
|
+
* @kortyx/hooks bumped to 0.34.0
|
|
29
|
+
* @kortyx/openai bumped to 0.5.8
|
|
30
|
+
|
|
31
|
+
## [0.36.0](https://github.com/kortyx-io/kortyx/compare/agent-v0.35.0...agent-v0.36.0) (2026-10-10)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Features
|
|
35
|
+
|
|
36
|
+
* version, evaluate, serve and migrate Studio prompts ([#288](https://github.com/kortyx-io/kortyx/issues/288)) ([0802f8b](https://github.com/kortyx-io/kortyx/commit/0802f8b91c4a541d176dd8a75c659063e2c28c8c))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Dependencies
|
|
40
|
+
|
|
41
|
+
* The following workspace dependencies were updated
|
|
42
|
+
* dependencies
|
|
43
|
+
* @kortyx/runtime bumped to 0.23.0
|
|
44
|
+
* @kortyx/prompts bumped to 0.1.0
|
|
45
|
+
* devDependencies
|
|
46
|
+
* @kortyx/hooks bumped to 0.33.0
|
|
47
|
+
|
|
3
48
|
## [0.35.0](https://github.com/kortyx-io/kortyx/compare/agent-v0.34.0...agent-v0.35.0) (2026-10-09)
|
|
4
49
|
|
|
5
50
|
|
package/dist/evals.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
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 EvalJson, v as EvalJudge, w as EvalJudgeEvidence, x as EvalJudgeIdentity, y as EvalJudgeIdentitySchema, z as EvalJudgeOptions, A as EvalJudgeUsage, B as EvalJudgeUsageSchema, D as EvalManifest, F as EvalManifestSchema, G as EvalObservation, H as EvalObservationSchema, I as EvalOutputExpectation, J as EvalOutputSelector, K as EvalPhase, L as EvalProgress, M as EvalProgressSchema, N as EvalRemoteRunRequest, O as EvalRemoteRunRequestSchema, P as EvalResponder, Q as EvalResumeResponseSchema, R as EvalRunOptions, S as EvalRunResult, T as EvalRunResultSchema, U as EvalRuntimeExecution, V as EvalSetupContext, W as EvalStatus, X as EvalStep, Y as EvalStepResult, Z as EvalStepResultSchema, _ as EvalSuite, $ as EvalSuiteSchema, a0 as EvalVerdict, a1 as EvalVerdictSchema, a2 as EvalWireEvent, a3 as EvalWireEventSchema, a4 as EvaluationMetadataSchema, a5 as StudioEvalJudgeOptions, a6 as StudioEvalJudgeRequestSchema, a7 as StudioEvalJudgeResponseSchema, a8 as StudioEvalStartRequestSchema, a9 as StudioEvaluationDetail, aa as StudioEvaluationDetailSchema, ab as StudioEvaluationHistorySchema, ac as StudioEvaluationResultsSchema, ad as StudioEvaluationStartRequest, ae as StudioEvaluationStartRequestSchema, af as StudioEvaluationSummary, ag as StudioEvaluationSummarySchema, ah as createStudioEvalJudge, ai as defineSuite, aj as getEvalGradeEvidence, ak as parseEvalSuite } from './studio-judge-
|
|
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 EvalJson, v as EvalJudge, w as EvalJudgeEvidence, x as EvalJudgeIdentity, y as EvalJudgeIdentitySchema, z as EvalJudgeOptions, A as EvalJudgeUsage, B as EvalJudgeUsageSchema, D as EvalManifest, F as EvalManifestSchema, G as EvalObservation, H as EvalObservationSchema, I as EvalOutputExpectation, J as EvalOutputSelector, K as EvalPhase, L as EvalProgress, M as EvalProgressSchema, N as EvalRemoteRunRequest, O as EvalRemoteRunRequestSchema, P as EvalResponder, Q as EvalResumeResponseSchema, R as EvalRunOptions, S as EvalRunResult, T as EvalRunResultSchema, U as EvalRuntimeExecution, V as EvalSetupContext, W as EvalStatus, X as EvalStep, Y as EvalStepResult, Z as EvalStepResultSchema, _ as EvalSuite, $ as EvalSuiteSchema, a0 as EvalVerdict, a1 as EvalVerdictSchema, a2 as EvalWireEvent, a3 as EvalWireEventSchema, a4 as EvaluationMetadataSchema, a5 as StudioEvalJudgeOptions, a6 as StudioEvalJudgeRequestSchema, a7 as StudioEvalJudgeResponseSchema, a8 as StudioEvalStartRequestSchema, a9 as StudioEvaluationDetail, aa as StudioEvaluationDetailSchema, ab as StudioEvaluationHistorySchema, ac as StudioEvaluationResultsSchema, ad as StudioEvaluationStartRequest, ae as StudioEvaluationStartRequestSchema, af as StudioEvaluationSummary, ag as StudioEvaluationSummarySchema, ah as createStudioEvalJudge, ai as defineSuite, aj as getEvalGradeEvidence, ak as parseEvalSuite } from './studio-judge-Brk9R5oB.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
import '@kortyx/prompts';
|
|
3
4
|
import '@kortyx/providers';
|
|
4
5
|
import '@kortyx/core/errors';
|
|
5
6
|
import '@kortyx/stream';
|
|
@@ -14,8 +15,8 @@ declare const StudioEvalTargetsResponseSchema: z.ZodObject<{
|
|
|
14
15
|
id: z.ZodString;
|
|
15
16
|
version: z.ZodString;
|
|
16
17
|
location: z.ZodOptional<z.ZodEnum<{
|
|
17
|
-
app: "app";
|
|
18
18
|
studio: "studio";
|
|
19
|
+
app: "app";
|
|
19
20
|
}>>;
|
|
20
21
|
}, z.core.$strict>>>;
|
|
21
22
|
targets: z.ZodArray<z.ZodObject<{
|
|
@@ -38,6 +39,15 @@ declare const StudioEvalTargetsResponseSchema: z.ZodObject<{
|
|
|
38
39
|
manifest: z.ZodNullable<z.ZodObject<{
|
|
39
40
|
schemaVersion: z.ZodLiteral<1>;
|
|
40
41
|
studioJudging: z.ZodOptional<z.ZodLiteral<true>>;
|
|
42
|
+
promptContracts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
format: z.ZodEnum<{
|
|
45
|
+
"system-user": "system-user";
|
|
46
|
+
chat: "chat";
|
|
47
|
+
}>;
|
|
48
|
+
variablesSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
49
|
+
configSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
50
|
+
}, z.core.$strict>>>;
|
|
41
51
|
attemptScheduling: z.ZodOptional<z.ZodLiteral<true>>;
|
|
42
52
|
suites: z.ZodArray<z.ZodObject<{
|
|
43
53
|
evidence: z.ZodOptional<z.ZodObject<{
|
|
@@ -139,8 +149,8 @@ declare const StudioEvalTargetsResponseSchema: z.ZodObject<{
|
|
|
139
149
|
id: z.ZodString;
|
|
140
150
|
version: z.ZodString;
|
|
141
151
|
location: z.ZodOptional<z.ZodEnum<{
|
|
142
|
-
app: "app";
|
|
143
152
|
studio: "studio";
|
|
153
|
+
app: "app";
|
|
144
154
|
}>>;
|
|
145
155
|
}, z.core.$strict>>;
|
|
146
156
|
}, z.core.$strict>>;
|
|
@@ -452,19 +462,62 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
452
462
|
request: z.ZodOptional<z.ZodObject<{
|
|
453
463
|
caseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
454
464
|
grading: z.ZodOptional<z.ZodEnum<{
|
|
455
|
-
app: "app";
|
|
456
465
|
studio: "studio";
|
|
466
|
+
app: "app";
|
|
457
467
|
}>>;
|
|
458
468
|
judge: z.ZodOptional<z.ZodObject<{
|
|
459
469
|
id: z.ZodString;
|
|
460
470
|
version: z.ZodString;
|
|
461
471
|
location: z.ZodOptional<z.ZodEnum<{
|
|
462
|
-
app: "app";
|
|
463
472
|
studio: "studio";
|
|
473
|
+
app: "app";
|
|
464
474
|
}>>;
|
|
465
475
|
}, z.core.$strict>>;
|
|
466
476
|
repetitions: z.ZodNumber;
|
|
467
477
|
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
478
|
+
promptSnapshot: z.ZodOptional<z.ZodObject<{
|
|
479
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
480
|
+
environment: z.ZodString;
|
|
481
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
482
|
+
revision: z.ZodString;
|
|
483
|
+
versions: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
484
|
+
id: z.ZodString;
|
|
485
|
+
version: z.ZodNumber;
|
|
486
|
+
hash: z.ZodString;
|
|
487
|
+
content: z.ZodObject<{
|
|
488
|
+
format: z.ZodEnum<{
|
|
489
|
+
"system-user": "system-user";
|
|
490
|
+
chat: "chat";
|
|
491
|
+
}>;
|
|
492
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
493
|
+
role: z.ZodEnum<{
|
|
494
|
+
system: "system";
|
|
495
|
+
user: "user";
|
|
496
|
+
assistant: "assistant";
|
|
497
|
+
}>;
|
|
498
|
+
content: z.ZodString;
|
|
499
|
+
}, z.core.$strict>>;
|
|
500
|
+
variablesSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
501
|
+
configSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
502
|
+
config: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
503
|
+
dependencies: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
504
|
+
id: z.ZodString;
|
|
505
|
+
version: z.ZodNumber;
|
|
506
|
+
hash: z.ZodString;
|
|
507
|
+
}, z.core.$strict>>>;
|
|
508
|
+
}, z.core.$strict>;
|
|
509
|
+
}, z.core.$strip>>;
|
|
510
|
+
source: z.ZodEnum<{
|
|
511
|
+
studio: "studio";
|
|
512
|
+
local: "local";
|
|
513
|
+
cache: "cache";
|
|
514
|
+
fallback: "fallback";
|
|
515
|
+
eval: "eval";
|
|
516
|
+
}>;
|
|
517
|
+
resolvedAt: z.ZodISODateTime;
|
|
518
|
+
requestedIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
519
|
+
}, z.core.$strict>>;
|
|
520
|
+
promptGroupName: z.ZodOptional<z.ZodString>;
|
|
468
521
|
}, z.core.$strip>>;
|
|
469
522
|
suite: z.ZodObject<{
|
|
470
523
|
evidence: z.ZodOptional<z.ZodObject<{
|
|
@@ -652,8 +705,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
652
705
|
id: z.ZodString;
|
|
653
706
|
version: z.ZodString;
|
|
654
707
|
location: z.ZodOptional<z.ZodEnum<{
|
|
655
|
-
app: "app";
|
|
656
708
|
studio: "studio";
|
|
709
|
+
app: "app";
|
|
657
710
|
}>>;
|
|
658
711
|
}, z.core.$strict>>;
|
|
659
712
|
startedAt: z.ZodISODateTime;
|
|
@@ -662,8 +715,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
662
715
|
error: "error";
|
|
663
716
|
cancelled: "cancelled";
|
|
664
717
|
failed: "failed";
|
|
665
|
-
passed: "passed";
|
|
666
718
|
ungraded: "ungraded";
|
|
719
|
+
passed: "passed";
|
|
667
720
|
}>;
|
|
668
721
|
counts: z.ZodObject<{
|
|
669
722
|
passed: z.ZodNumber;
|
|
@@ -685,8 +738,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
685
738
|
error: "error";
|
|
686
739
|
cancelled: "cancelled";
|
|
687
740
|
failed: "failed";
|
|
688
|
-
passed: "passed";
|
|
689
741
|
ungraded: "ungraded";
|
|
742
|
+
passed: "passed";
|
|
690
743
|
}>;
|
|
691
744
|
durationMs: z.ZodNumber;
|
|
692
745
|
steps: z.ZodArray<z.ZodObject<{
|
|
@@ -694,6 +747,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
694
747
|
version: z.ZodLiteral<"compact-v1">;
|
|
695
748
|
history: z.ZodBoolean;
|
|
696
749
|
observation: z.ZodObject<{
|
|
750
|
+
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
751
|
+
id: z.ZodString;
|
|
752
|
+
version: z.ZodNumber;
|
|
753
|
+
hash: z.ZodString;
|
|
754
|
+
environment: z.ZodString;
|
|
755
|
+
snapshotRevision: z.ZodString;
|
|
756
|
+
model: z.ZodOptional<z.ZodString>;
|
|
757
|
+
}, z.core.$strict>>>;
|
|
697
758
|
type: z.ZodEnum<{
|
|
698
759
|
interrupt: "interrupt";
|
|
699
760
|
error: "error";
|
|
@@ -760,6 +821,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
760
821
|
reference: z.ZodOptional<z.ZodJSONSchema>;
|
|
761
822
|
}, z.core.$strict>;
|
|
762
823
|
observation: z.ZodObject<{
|
|
824
|
+
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
825
|
+
id: z.ZodString;
|
|
826
|
+
version: z.ZodNumber;
|
|
827
|
+
hash: z.ZodString;
|
|
828
|
+
environment: z.ZodString;
|
|
829
|
+
snapshotRevision: z.ZodString;
|
|
830
|
+
model: z.ZodOptional<z.ZodString>;
|
|
831
|
+
}, z.core.$strict>>>;
|
|
763
832
|
type: z.ZodEnum<{
|
|
764
833
|
interrupt: "interrupt";
|
|
765
834
|
error: "error";
|
|
@@ -795,8 +864,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
795
864
|
error: "error";
|
|
796
865
|
cancelled: "cancelled";
|
|
797
866
|
failed: "failed";
|
|
798
|
-
passed: "passed";
|
|
799
867
|
ungraded: "ungraded";
|
|
868
|
+
passed: "passed";
|
|
800
869
|
}>;
|
|
801
870
|
reason: z.ZodOptional<z.ZodString>;
|
|
802
871
|
judgeCalls: z.ZodOptional<z.ZodNumber>;
|
|
@@ -911,6 +980,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
911
980
|
version: z.ZodLiteral<"compact-v1">;
|
|
912
981
|
history: z.ZodBoolean;
|
|
913
982
|
observation: z.ZodObject<{
|
|
983
|
+
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
984
|
+
id: z.ZodString;
|
|
985
|
+
version: z.ZodNumber;
|
|
986
|
+
hash: z.ZodString;
|
|
987
|
+
environment: z.ZodString;
|
|
988
|
+
snapshotRevision: z.ZodString;
|
|
989
|
+
model: z.ZodOptional<z.ZodString>;
|
|
990
|
+
}, z.core.$strict>>>;
|
|
914
991
|
type: z.ZodEnum<{
|
|
915
992
|
interrupt: "interrupt";
|
|
916
993
|
error: "error";
|
|
@@ -977,6 +1054,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
977
1054
|
reference: z.ZodOptional<z.ZodJSONSchema>;
|
|
978
1055
|
}, z.core.$strict>;
|
|
979
1056
|
observation: z.ZodObject<{
|
|
1057
|
+
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1058
|
+
id: z.ZodString;
|
|
1059
|
+
version: z.ZodNumber;
|
|
1060
|
+
hash: z.ZodString;
|
|
1061
|
+
environment: z.ZodString;
|
|
1062
|
+
snapshotRevision: z.ZodString;
|
|
1063
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1064
|
+
}, z.core.$strict>>>;
|
|
980
1065
|
type: z.ZodEnum<{
|
|
981
1066
|
interrupt: "interrupt";
|
|
982
1067
|
error: "error";
|
|
@@ -1012,8 +1097,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1012
1097
|
error: "error";
|
|
1013
1098
|
cancelled: "cancelled";
|
|
1014
1099
|
failed: "failed";
|
|
1015
|
-
passed: "passed";
|
|
1016
1100
|
ungraded: "ungraded";
|
|
1101
|
+
passed: "passed";
|
|
1017
1102
|
}>;
|
|
1018
1103
|
reason: z.ZodOptional<z.ZodString>;
|
|
1019
1104
|
judgeCalls: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1067,8 +1152,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1067
1152
|
error: "error";
|
|
1068
1153
|
cancelled: "cancelled";
|
|
1069
1154
|
failed: "failed";
|
|
1070
|
-
passed: "passed";
|
|
1071
1155
|
ungraded: "ungraded";
|
|
1156
|
+
passed: "passed";
|
|
1072
1157
|
}>;
|
|
1073
1158
|
durationMs: z.ZodNumber;
|
|
1074
1159
|
steps: z.ZodArray<z.ZodObject<{
|
|
@@ -1076,6 +1161,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1076
1161
|
version: z.ZodLiteral<"compact-v1">;
|
|
1077
1162
|
history: z.ZodBoolean;
|
|
1078
1163
|
observation: z.ZodObject<{
|
|
1164
|
+
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1165
|
+
id: z.ZodString;
|
|
1166
|
+
version: z.ZodNumber;
|
|
1167
|
+
hash: z.ZodString;
|
|
1168
|
+
environment: z.ZodString;
|
|
1169
|
+
snapshotRevision: z.ZodString;
|
|
1170
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1171
|
+
}, z.core.$strict>>>;
|
|
1079
1172
|
type: z.ZodEnum<{
|
|
1080
1173
|
interrupt: "interrupt";
|
|
1081
1174
|
error: "error";
|
|
@@ -1142,6 +1235,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1142
1235
|
reference: z.ZodOptional<z.ZodJSONSchema>;
|
|
1143
1236
|
}, z.core.$strict>;
|
|
1144
1237
|
observation: z.ZodObject<{
|
|
1238
|
+
promptUsage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1239
|
+
id: z.ZodString;
|
|
1240
|
+
version: z.ZodNumber;
|
|
1241
|
+
hash: z.ZodString;
|
|
1242
|
+
environment: z.ZodString;
|
|
1243
|
+
snapshotRevision: z.ZodString;
|
|
1244
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1245
|
+
}, z.core.$strict>>>;
|
|
1145
1246
|
type: z.ZodEnum<{
|
|
1146
1247
|
interrupt: "interrupt";
|
|
1147
1248
|
error: "error";
|
|
@@ -1177,8 +1278,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1177
1278
|
error: "error";
|
|
1178
1279
|
cancelled: "cancelled";
|
|
1179
1280
|
failed: "failed";
|
|
1180
|
-
passed: "passed";
|
|
1181
1281
|
ungraded: "ungraded";
|
|
1282
|
+
passed: "passed";
|
|
1182
1283
|
}>;
|
|
1183
1284
|
reason: z.ZodOptional<z.ZodString>;
|
|
1184
1285
|
judgeCalls: z.ZodOptional<z.ZodNumber>;
|
package/dist/evals.js
CHANGED
|
@@ -57,6 +57,7 @@ __export(evals_exports, {
|
|
|
57
57
|
module.exports = __toCommonJS(evals_exports);
|
|
58
58
|
|
|
59
59
|
// src/evals/contracts.ts
|
|
60
|
+
var import_browser = require("@kortyx/prompts/browser");
|
|
60
61
|
var import_zod2 = require("zod");
|
|
61
62
|
|
|
62
63
|
// src/evals/evidence-policy.ts
|
|
@@ -161,6 +162,16 @@ var EvalVerdictSchema = import_zod2.z.object({
|
|
|
161
162
|
evidence: import_zod2.z.array(import_zod2.z.string().min(1))
|
|
162
163
|
}).strict();
|
|
163
164
|
var EvalObservationSchema = import_zod2.z.object({
|
|
165
|
+
promptUsage: import_zod2.z.array(
|
|
166
|
+
import_zod2.z.object({
|
|
167
|
+
id: import_zod2.z.string(),
|
|
168
|
+
version: import_zod2.z.number().int().positive(),
|
|
169
|
+
hash: import_zod2.z.string().regex(/^[a-f0-9]{64}$/),
|
|
170
|
+
environment: import_zod2.z.string(),
|
|
171
|
+
snapshotRevision: import_zod2.z.string(),
|
|
172
|
+
model: import_zod2.z.string().optional()
|
|
173
|
+
}).strict()
|
|
174
|
+
).optional(),
|
|
164
175
|
type: import_zod2.z.enum(["answer", "interrupt", "error", "cancelled"]),
|
|
165
176
|
text: import_zod2.z.string(),
|
|
166
177
|
structured: import_zod2.z.array(import_zod2.z.json()),
|
|
@@ -307,6 +318,14 @@ var EvalRunResultSchema = import_zod2.z.object({
|
|
|
307
318
|
var EvalManifestSchema = import_zod2.z.object({
|
|
308
319
|
schemaVersion: import_zod2.z.literal(1),
|
|
309
320
|
studioJudging: import_zod2.z.literal(true).optional(),
|
|
321
|
+
promptContracts: import_zod2.z.array(
|
|
322
|
+
import_zod2.z.object({
|
|
323
|
+
id: import_zod2.z.string(),
|
|
324
|
+
format: import_zod2.z.enum(["system-user", "chat"]),
|
|
325
|
+
variablesSchema: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown()),
|
|
326
|
+
configSchema: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown())
|
|
327
|
+
}).strict()
|
|
328
|
+
).optional(),
|
|
310
329
|
attemptScheduling: import_zod2.z.literal(true).optional(),
|
|
311
330
|
suites: import_zod2.z.array(EvalSuiteSchema),
|
|
312
331
|
responders: import_zod2.z.array(
|
|
@@ -357,6 +376,8 @@ var EvalProgressSchema = import_zod2.z.discriminatedUnion("type", [
|
|
|
357
376
|
import_zod2.z.object({ type: import_zod2.z.literal("case-completed"), result: EvalCaseResultSchema }).strict()
|
|
358
377
|
]);
|
|
359
378
|
var EvalRemoteRunRequestSchema = import_zod2.z.object({
|
|
379
|
+
promptSnapshot: import_browser.PromptSnapshotSchema.optional(),
|
|
380
|
+
promptGroupName: import_zod2.z.string().optional(),
|
|
360
381
|
suiteId: id2,
|
|
361
382
|
suiteRevision: import_zod2.z.string().regex(/^[a-f0-9]{64}$/),
|
|
362
383
|
grading: import_zod2.z.enum(["app", "studio"]).optional(),
|
|
@@ -373,8 +394,19 @@ var EvalRemoteRunRequestSchema = import_zod2.z.object({
|
|
|
373
394
|
var StudioEvalStartRequestSchema = EvalRemoteRunRequestSchema.omit({
|
|
374
395
|
grading: true,
|
|
375
396
|
judge: true,
|
|
397
|
+
promptSnapshot: true,
|
|
398
|
+
promptGroupName: true,
|
|
376
399
|
attempt: true
|
|
377
400
|
}).extend({
|
|
401
|
+
promptSelection: import_zod2.z.discriminatedUnion("type", [
|
|
402
|
+
import_zod2.z.object({ type: import_zod2.z.literal("live") }).strict(),
|
|
403
|
+
import_zod2.z.object({
|
|
404
|
+
type: import_zod2.z.literal("single"),
|
|
405
|
+
id: import_zod2.z.string(),
|
|
406
|
+
version: import_zod2.z.number().int().positive()
|
|
407
|
+
}).strict(),
|
|
408
|
+
import_zod2.z.object({ type: import_zod2.z.literal("group"), groupId: import_zod2.z.uuid() }).strict()
|
|
409
|
+
]).optional(),
|
|
378
410
|
targetId: import_zod2.z.string().min(1).max(128),
|
|
379
411
|
judge: import_zod2.z.enum(["studio", "app"]).default("studio")
|
|
380
412
|
});
|
|
@@ -417,6 +449,7 @@ function defineSuite(suite) {
|
|
|
417
449
|
var import_zod4 = require("zod");
|
|
418
450
|
|
|
419
451
|
// src/evals/studio-contracts.ts
|
|
452
|
+
var import_browser2 = require("@kortyx/prompts/browser");
|
|
420
453
|
var import_zod3 = require("zod");
|
|
421
454
|
var StudioEvalTargetsResponseSchema = import_zod3.z.object({
|
|
422
455
|
canRun: import_zod3.z.boolean(),
|
|
@@ -502,7 +535,9 @@ var StudioEvalDetailSchema = import_zod3.z.object({
|
|
|
502
535
|
grading: import_zod3.z.enum(["app", "studio"]).optional(),
|
|
503
536
|
judge: EvalJudgeIdentitySchema.optional(),
|
|
504
537
|
repetitions: import_zod3.z.number().int().positive(),
|
|
505
|
-
concurrency: import_zod3.z.number().optional()
|
|
538
|
+
concurrency: import_zod3.z.number().optional(),
|
|
539
|
+
promptSnapshot: import_browser2.PromptSnapshotSchema.optional(),
|
|
540
|
+
promptGroupName: import_zod3.z.string().optional()
|
|
506
541
|
}).optional(),
|
|
507
542
|
suite: EvalSuiteSchema,
|
|
508
543
|
result: EvalRunResultSchema.nullable(),
|
|
@@ -526,6 +561,7 @@ var EvaluationMetadataSchema = import_zod4.z.object({
|
|
|
526
561
|
var StudioEvaluationStartRequestSchema = import_zod4.z.object({
|
|
527
562
|
targetId: import_zod4.z.string().trim().min(1),
|
|
528
563
|
name: import_zod4.z.string().trim().min(1).max(200).optional(),
|
|
564
|
+
promptSelection: StudioEvalStartRequestSchema.shape.promptSelection,
|
|
529
565
|
selection: import_zod4.z.enum(["all", "selected"]),
|
|
530
566
|
suites: import_zod4.z.array(
|
|
531
567
|
import_zod4.z.object({
|