@kortyx/agent 0.34.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 +66 -0
- package/dist/evals.d.ts +134 -12
- package/dist/evals.js +57 -3
- package/dist/evals.js.map +1 -1
- package/dist/index.d.ts +19 -5
- package/dist/index.js +1709 -692
- package/dist/index.js.map +1 -1
- package/dist/{studio-judge-DpRLvf8j.d.ts → studio-judge-Brk9R5oB.d.ts} +464 -41
- package/package.json +10 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
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
|
+
|
|
48
|
+
## [0.35.0](https://github.com/kortyx-io/kortyx/compare/agent-v0.34.0...agent-v0.35.0) (2026-10-09)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Features
|
|
52
|
+
|
|
53
|
+
* **evals:** share concurrency and attribute multi-session costs ([#304](https://github.com/kortyx-io/kortyx/issues/304)) ([dd5e242](https://github.com/kortyx-io/kortyx/commit/dd5e242ae08affbb015201bb57c4714709756cf2))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Dependencies
|
|
57
|
+
|
|
58
|
+
* The following workspace dependencies were updated
|
|
59
|
+
* dependencies
|
|
60
|
+
* @kortyx/core bumped to 0.13.0
|
|
61
|
+
* @kortyx/providers bumped to 0.9.1
|
|
62
|
+
* @kortyx/runtime bumped to 0.22.1
|
|
63
|
+
* @kortyx/stream bumped to 0.15.3
|
|
64
|
+
* @kortyx/utils bumped to 0.3.5
|
|
65
|
+
* devDependencies
|
|
66
|
+
* @kortyx/hooks bumped to 0.32.1
|
|
67
|
+
* @kortyx/openai bumped to 0.5.7
|
|
68
|
+
|
|
3
69
|
## [0.34.0](https://github.com/kortyx-io/kortyx/compare/agent-v0.33.0...agent-v0.34.0) (2026-10-09)
|
|
4
70
|
|
|
5
71
|
|
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
|
|
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,16 @@ 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>>>;
|
|
51
|
+
attemptScheduling: z.ZodOptional<z.ZodLiteral<true>>;
|
|
41
52
|
suites: z.ZodArray<z.ZodObject<{
|
|
42
53
|
evidence: z.ZodOptional<z.ZodObject<{
|
|
43
54
|
history: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -138,8 +149,8 @@ declare const StudioEvalTargetsResponseSchema: z.ZodObject<{
|
|
|
138
149
|
id: z.ZodString;
|
|
139
150
|
version: z.ZodString;
|
|
140
151
|
location: z.ZodOptional<z.ZodEnum<{
|
|
141
|
-
app: "app";
|
|
142
152
|
studio: "studio";
|
|
153
|
+
app: "app";
|
|
143
154
|
}>>;
|
|
144
155
|
}, z.core.$strict>>;
|
|
145
156
|
}, z.core.$strict>>;
|
|
@@ -451,19 +462,62 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
451
462
|
request: z.ZodOptional<z.ZodObject<{
|
|
452
463
|
caseIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
453
464
|
grading: z.ZodOptional<z.ZodEnum<{
|
|
454
|
-
app: "app";
|
|
455
465
|
studio: "studio";
|
|
466
|
+
app: "app";
|
|
456
467
|
}>>;
|
|
457
468
|
judge: z.ZodOptional<z.ZodObject<{
|
|
458
469
|
id: z.ZodString;
|
|
459
470
|
version: z.ZodString;
|
|
460
471
|
location: z.ZodOptional<z.ZodEnum<{
|
|
461
|
-
app: "app";
|
|
462
472
|
studio: "studio";
|
|
473
|
+
app: "app";
|
|
463
474
|
}>>;
|
|
464
475
|
}, z.core.$strict>>;
|
|
465
476
|
repetitions: z.ZodNumber;
|
|
466
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>;
|
|
467
521
|
}, z.core.$strip>>;
|
|
468
522
|
suite: z.ZodObject<{
|
|
469
523
|
evidence: z.ZodOptional<z.ZodObject<{
|
|
@@ -651,8 +705,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
651
705
|
id: z.ZodString;
|
|
652
706
|
version: z.ZodString;
|
|
653
707
|
location: z.ZodOptional<z.ZodEnum<{
|
|
654
|
-
app: "app";
|
|
655
708
|
studio: "studio";
|
|
709
|
+
app: "app";
|
|
656
710
|
}>>;
|
|
657
711
|
}, z.core.$strict>>;
|
|
658
712
|
startedAt: z.ZodISODateTime;
|
|
@@ -661,8 +715,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
661
715
|
error: "error";
|
|
662
716
|
cancelled: "cancelled";
|
|
663
717
|
failed: "failed";
|
|
664
|
-
passed: "passed";
|
|
665
718
|
ungraded: "ungraded";
|
|
719
|
+
passed: "passed";
|
|
666
720
|
}>;
|
|
667
721
|
counts: z.ZodObject<{
|
|
668
722
|
passed: z.ZodNumber;
|
|
@@ -674,13 +728,18 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
674
728
|
cases: z.ZodArray<z.ZodObject<{
|
|
675
729
|
caseId: z.ZodString;
|
|
676
730
|
repetition: z.ZodNumber;
|
|
731
|
+
attemptId: z.ZodOptional<z.ZodUUID>;
|
|
732
|
+
runtimeExecutions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
733
|
+
sessionId: z.ZodString;
|
|
734
|
+
runId: z.ZodString;
|
|
735
|
+
}, z.core.$strict>>>;
|
|
677
736
|
sessionId: z.ZodString;
|
|
678
737
|
status: z.ZodEnum<{
|
|
679
738
|
error: "error";
|
|
680
739
|
cancelled: "cancelled";
|
|
681
740
|
failed: "failed";
|
|
682
|
-
passed: "passed";
|
|
683
741
|
ungraded: "ungraded";
|
|
742
|
+
passed: "passed";
|
|
684
743
|
}>;
|
|
685
744
|
durationMs: z.ZodNumber;
|
|
686
745
|
steps: z.ZodArray<z.ZodObject<{
|
|
@@ -688,6 +747,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
688
747
|
version: z.ZodLiteral<"compact-v1">;
|
|
689
748
|
history: z.ZodBoolean;
|
|
690
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>>>;
|
|
691
758
|
type: z.ZodEnum<{
|
|
692
759
|
interrupt: "interrupt";
|
|
693
760
|
error: "error";
|
|
@@ -754,6 +821,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
754
821
|
reference: z.ZodOptional<z.ZodJSONSchema>;
|
|
755
822
|
}, z.core.$strict>;
|
|
756
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>>>;
|
|
757
832
|
type: z.ZodEnum<{
|
|
758
833
|
interrupt: "interrupt";
|
|
759
834
|
error: "error";
|
|
@@ -789,8 +864,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
789
864
|
error: "error";
|
|
790
865
|
cancelled: "cancelled";
|
|
791
866
|
failed: "failed";
|
|
792
|
-
passed: "passed";
|
|
793
867
|
ungraded: "ungraded";
|
|
868
|
+
passed: "passed";
|
|
794
869
|
}>;
|
|
795
870
|
reason: z.ZodOptional<z.ZodString>;
|
|
796
871
|
judgeCalls: z.ZodOptional<z.ZodNumber>;
|
|
@@ -862,6 +937,15 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
862
937
|
events: z.ZodArray<z.ZodObject<{
|
|
863
938
|
id: z.ZodNumber;
|
|
864
939
|
event: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
940
|
+
type: z.ZodLiteral<"case-runtime-associated">;
|
|
941
|
+
caseId: z.ZodString;
|
|
942
|
+
repetition: z.ZodNumber;
|
|
943
|
+
attemptId: z.ZodUUID;
|
|
944
|
+
execution: z.ZodObject<{
|
|
945
|
+
sessionId: z.ZodString;
|
|
946
|
+
runId: z.ZodString;
|
|
947
|
+
}, z.core.$strict>;
|
|
948
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
865
949
|
type: z.ZodLiteral<"run-started">;
|
|
866
950
|
caseIds: z.ZodArray<z.ZodString>;
|
|
867
951
|
repetitions: z.ZodNumber;
|
|
@@ -883,6 +967,7 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
883
967
|
stepIndex: z.ZodOptional<z.ZodNumber>;
|
|
884
968
|
}, z.core.$strict>, z.ZodObject<{
|
|
885
969
|
type: z.ZodLiteral<"case-started">;
|
|
970
|
+
attemptId: z.ZodOptional<z.ZodUUID>;
|
|
886
971
|
caseId: z.ZodString;
|
|
887
972
|
repetition: z.ZodNumber;
|
|
888
973
|
sessionId: z.ZodString;
|
|
@@ -895,6 +980,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
895
980
|
version: z.ZodLiteral<"compact-v1">;
|
|
896
981
|
history: z.ZodBoolean;
|
|
897
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>>>;
|
|
898
991
|
type: z.ZodEnum<{
|
|
899
992
|
interrupt: "interrupt";
|
|
900
993
|
error: "error";
|
|
@@ -961,6 +1054,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
961
1054
|
reference: z.ZodOptional<z.ZodJSONSchema>;
|
|
962
1055
|
}, z.core.$strict>;
|
|
963
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>>>;
|
|
964
1065
|
type: z.ZodEnum<{
|
|
965
1066
|
interrupt: "interrupt";
|
|
966
1067
|
error: "error";
|
|
@@ -996,8 +1097,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
996
1097
|
error: "error";
|
|
997
1098
|
cancelled: "cancelled";
|
|
998
1099
|
failed: "failed";
|
|
999
|
-
passed: "passed";
|
|
1000
1100
|
ungraded: "ungraded";
|
|
1101
|
+
passed: "passed";
|
|
1001
1102
|
}>;
|
|
1002
1103
|
reason: z.ZodOptional<z.ZodString>;
|
|
1003
1104
|
judgeCalls: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1041,13 +1142,18 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1041
1142
|
result: z.ZodObject<{
|
|
1042
1143
|
caseId: z.ZodString;
|
|
1043
1144
|
repetition: z.ZodNumber;
|
|
1145
|
+
attemptId: z.ZodOptional<z.ZodUUID>;
|
|
1146
|
+
runtimeExecutions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1147
|
+
sessionId: z.ZodString;
|
|
1148
|
+
runId: z.ZodString;
|
|
1149
|
+
}, z.core.$strict>>>;
|
|
1044
1150
|
sessionId: z.ZodString;
|
|
1045
1151
|
status: z.ZodEnum<{
|
|
1046
1152
|
error: "error";
|
|
1047
1153
|
cancelled: "cancelled";
|
|
1048
1154
|
failed: "failed";
|
|
1049
|
-
passed: "passed";
|
|
1050
1155
|
ungraded: "ungraded";
|
|
1156
|
+
passed: "passed";
|
|
1051
1157
|
}>;
|
|
1052
1158
|
durationMs: z.ZodNumber;
|
|
1053
1159
|
steps: z.ZodArray<z.ZodObject<{
|
|
@@ -1055,6 +1161,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1055
1161
|
version: z.ZodLiteral<"compact-v1">;
|
|
1056
1162
|
history: z.ZodBoolean;
|
|
1057
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>>>;
|
|
1058
1172
|
type: z.ZodEnum<{
|
|
1059
1173
|
interrupt: "interrupt";
|
|
1060
1174
|
error: "error";
|
|
@@ -1121,6 +1235,14 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1121
1235
|
reference: z.ZodOptional<z.ZodJSONSchema>;
|
|
1122
1236
|
}, z.core.$strict>;
|
|
1123
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>>>;
|
|
1124
1246
|
type: z.ZodEnum<{
|
|
1125
1247
|
interrupt: "interrupt";
|
|
1126
1248
|
error: "error";
|
|
@@ -1156,8 +1278,8 @@ declare const StudioEvalDetailSchema: z.ZodObject<{
|
|
|
1156
1278
|
error: "error";
|
|
1157
1279
|
cancelled: "cancelled";
|
|
1158
1280
|
failed: "failed";
|
|
1159
|
-
passed: "passed";
|
|
1160
1281
|
ungraded: "ungraded";
|
|
1282
|
+
passed: "passed";
|
|
1161
1283
|
}>;
|
|
1162
1284
|
reason: z.ZodOptional<z.ZodString>;
|
|
1163
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()),
|
|
@@ -253,9 +264,12 @@ var EvalStepResultSchema = import_zod2.z.object({
|
|
|
253
264
|
EvalVerdictSchema.extend({ id: import_zod2.z.string(), text: import_zod2.z.string() })
|
|
254
265
|
)
|
|
255
266
|
}).strict();
|
|
267
|
+
var runtimeExecution = import_zod2.z.object({ sessionId: import_zod2.z.string().min(1), runId: import_zod2.z.string().min(1) }).strict();
|
|
256
268
|
var EvalCaseResultSchema = import_zod2.z.object({
|
|
257
269
|
caseId: id2,
|
|
258
270
|
repetition: import_zod2.z.number().int().positive(),
|
|
271
|
+
attemptId: import_zod2.z.uuid().optional(),
|
|
272
|
+
runtimeExecutions: import_zod2.z.array(runtimeExecution).optional(),
|
|
259
273
|
sessionId: import_zod2.z.string(),
|
|
260
274
|
status,
|
|
261
275
|
durationMs: import_zod2.z.number().nonnegative(),
|
|
@@ -304,6 +318,15 @@ var EvalRunResultSchema = import_zod2.z.object({
|
|
|
304
318
|
var EvalManifestSchema = import_zod2.z.object({
|
|
305
319
|
schemaVersion: import_zod2.z.literal(1),
|
|
306
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(),
|
|
329
|
+
attemptScheduling: import_zod2.z.literal(true).optional(),
|
|
307
330
|
suites: import_zod2.z.array(EvalSuiteSchema),
|
|
308
331
|
responders: import_zod2.z.array(
|
|
309
332
|
import_zod2.z.object({
|
|
@@ -317,6 +340,13 @@ var EvalManifestSchema = import_zod2.z.object({
|
|
|
317
340
|
judge: judge.optional()
|
|
318
341
|
}).strict();
|
|
319
342
|
var EvalProgressSchema = import_zod2.z.discriminatedUnion("type", [
|
|
343
|
+
import_zod2.z.object({
|
|
344
|
+
type: import_zod2.z.literal("case-runtime-associated"),
|
|
345
|
+
caseId: id2,
|
|
346
|
+
repetition: import_zod2.z.number().int().positive(),
|
|
347
|
+
attemptId: import_zod2.z.uuid(),
|
|
348
|
+
execution: runtimeExecution
|
|
349
|
+
}).strict(),
|
|
320
350
|
import_zod2.z.object({
|
|
321
351
|
type: import_zod2.z.literal("run-started"),
|
|
322
352
|
caseIds: import_zod2.z.array(id2).min(1),
|
|
@@ -332,6 +362,7 @@ var EvalProgressSchema = import_zod2.z.discriminatedUnion("type", [
|
|
|
332
362
|
}).strict(),
|
|
333
363
|
import_zod2.z.object({
|
|
334
364
|
type: import_zod2.z.literal("case-started"),
|
|
365
|
+
attemptId: import_zod2.z.uuid().optional(),
|
|
335
366
|
caseId: id2,
|
|
336
367
|
repetition: import_zod2.z.number().int().positive(),
|
|
337
368
|
sessionId: import_zod2.z.string()
|
|
@@ -345,18 +376,37 @@ var EvalProgressSchema = import_zod2.z.discriminatedUnion("type", [
|
|
|
345
376
|
import_zod2.z.object({ type: import_zod2.z.literal("case-completed"), result: EvalCaseResultSchema }).strict()
|
|
346
377
|
]);
|
|
347
378
|
var EvalRemoteRunRequestSchema = import_zod2.z.object({
|
|
379
|
+
promptSnapshot: import_browser.PromptSnapshotSchema.optional(),
|
|
380
|
+
promptGroupName: import_zod2.z.string().optional(),
|
|
348
381
|
suiteId: id2,
|
|
349
382
|
suiteRevision: import_zod2.z.string().regex(/^[a-f0-9]{64}$/),
|
|
350
383
|
grading: import_zod2.z.enum(["app", "studio"]).optional(),
|
|
351
384
|
judge: EvalJudgeIdentitySchema.optional(),
|
|
352
385
|
caseIds: import_zod2.z.array(id2).min(1).max(100).optional(),
|
|
353
386
|
repetitions: import_zod2.z.number().int().min(1).max(20).default(1),
|
|
354
|
-
concurrency: import_zod2.z.number().int().min(1).max(20).default(1)
|
|
387
|
+
concurrency: import_zod2.z.number().int().min(1).max(20).default(1),
|
|
388
|
+
attempt: import_zod2.z.object({
|
|
389
|
+
caseId: id2,
|
|
390
|
+
repetition: import_zod2.z.number().int().min(1).max(20),
|
|
391
|
+
evaluationId: import_zod2.z.uuid()
|
|
392
|
+
}).strict().optional()
|
|
355
393
|
}).strict();
|
|
356
394
|
var StudioEvalStartRequestSchema = EvalRemoteRunRequestSchema.omit({
|
|
357
395
|
grading: true,
|
|
358
|
-
judge: true
|
|
396
|
+
judge: true,
|
|
397
|
+
promptSnapshot: true,
|
|
398
|
+
promptGroupName: true,
|
|
399
|
+
attempt: true
|
|
359
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(),
|
|
360
410
|
targetId: import_zod2.z.string().min(1).max(128),
|
|
361
411
|
judge: import_zod2.z.enum(["studio", "app"]).default("studio")
|
|
362
412
|
});
|
|
@@ -399,6 +449,7 @@ function defineSuite(suite) {
|
|
|
399
449
|
var import_zod4 = require("zod");
|
|
400
450
|
|
|
401
451
|
// src/evals/studio-contracts.ts
|
|
452
|
+
var import_browser2 = require("@kortyx/prompts/browser");
|
|
402
453
|
var import_zod3 = require("zod");
|
|
403
454
|
var StudioEvalTargetsResponseSchema = import_zod3.z.object({
|
|
404
455
|
canRun: import_zod3.z.boolean(),
|
|
@@ -484,7 +535,9 @@ var StudioEvalDetailSchema = import_zod3.z.object({
|
|
|
484
535
|
grading: import_zod3.z.enum(["app", "studio"]).optional(),
|
|
485
536
|
judge: EvalJudgeIdentitySchema.optional(),
|
|
486
537
|
repetitions: import_zod3.z.number().int().positive(),
|
|
487
|
-
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()
|
|
488
541
|
}).optional(),
|
|
489
542
|
suite: EvalSuiteSchema,
|
|
490
543
|
result: EvalRunResultSchema.nullable(),
|
|
@@ -508,6 +561,7 @@ var EvaluationMetadataSchema = import_zod4.z.object({
|
|
|
508
561
|
var StudioEvaluationStartRequestSchema = import_zod4.z.object({
|
|
509
562
|
targetId: import_zod4.z.string().trim().min(1),
|
|
510
563
|
name: import_zod4.z.string().trim().min(1).max(200).optional(),
|
|
564
|
+
promptSelection: StudioEvalStartRequestSchema.shape.promptSelection,
|
|
511
565
|
selection: import_zod4.z.enum(["all", "selected"]),
|
|
512
566
|
suites: import_zod4.z.array(
|
|
513
567
|
import_zod4.z.object({
|