@openpond/evals 0.7.6 → 0.8.1
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/LEARNING.md +30 -0
- package/dist/learning/authoring-service.js +1 -1
- package/dist/learning/authoring.js +9 -0
- package/dist/learning/contracts.js +10 -0
- package/dist/learning/index.js +4 -0
- package/dist/learning/operations.js +3 -1
- package/dist/learning/repository.js +2 -0
- package/dist/learning/reward-authoring.js +120 -0
- package/dist/learning/reward-check-service.js +31 -0
- package/dist/learning/reward-check-worker.js +114 -0
- package/dist/learning/reward-checks.js +81 -0
- package/dist/learning/reward-fixture-executor.js +29 -0
- package/dist/learning/service.js +7 -0
- package/dist/rewards.js +3 -0
- package/dist/types/learning/admission.d.ts +12 -0
- package/dist/types/learning/admission.d.ts.map +1 -1
- package/dist/types/learning/authoring-service.d.ts +172 -0
- package/dist/types/learning/authoring-service.d.ts.map +1 -1
- package/dist/types/learning/authoring.d.ts +121 -0
- package/dist/types/learning/authoring.d.ts.map +1 -1
- package/dist/types/learning/contracts.d.ts +90 -0
- package/dist/types/learning/contracts.d.ts.map +1 -1
- package/dist/types/learning/index.d.ts +4 -0
- package/dist/types/learning/index.d.ts.map +1 -1
- package/dist/types/learning/operations.d.ts +204 -0
- package/dist/types/learning/operations.d.ts.map +1 -1
- package/dist/types/learning/repository.d.ts +129 -1
- package/dist/types/learning/repository.d.ts.map +1 -1
- package/dist/types/learning/reward-authoring.d.ts +18 -0
- package/dist/types/learning/reward-authoring.d.ts.map +1 -0
- package/dist/types/learning/reward-check-service.d.ts +17 -0
- package/dist/types/learning/reward-check-service.d.ts.map +1 -0
- package/dist/types/learning/reward-check-worker.d.ts +27 -0
- package/dist/types/learning/reward-check-worker.d.ts.map +1 -0
- package/dist/types/learning/reward-checks.d.ts +177 -0
- package/dist/types/learning/reward-checks.d.ts.map +1 -0
- package/dist/types/learning/reward-fixture-executor.d.ts +9 -0
- package/dist/types/learning/reward-fixture-executor.d.ts.map +1 -0
- package/dist/types/learning/service.d.ts.map +1 -1
- package/dist/types/learning/transport.d.ts +232 -3
- package/dist/types/learning/transport.d.ts.map +1 -1
- package/dist/types/rewards.d.ts +24 -0
- package/dist/types/rewards.d.ts.map +1 -1
- package/package.json +1 -1
- package/schemas/learning/v1/command-request.schema.json +443 -248
- package/schemas/learning/v1/draft.schema.json +96 -0
- package/schemas/learning/v1/read-request.schema.json +1 -0
- package/schemas/learning/v1/reward.schema.json +3 -0
- package/schemas/learning/v1/reward_check.schema.json +343 -0
- package/schemas/learning/v1/source.schema.json +64 -33
|
@@ -280,6 +280,18 @@ export declare const PublishLearningResourceCommandSchema: z.ZodDiscriminatedUni
|
|
|
280
280
|
host_private: "host_private";
|
|
281
281
|
}>;
|
|
282
282
|
}, z.core.$strict>>;
|
|
283
|
+
fixtureSetRef: z.ZodOptional<z.ZodObject<{
|
|
284
|
+
id: z.ZodString;
|
|
285
|
+
path: z.ZodString;
|
|
286
|
+
contentHash: z.ZodString;
|
|
287
|
+
sizeBytes: z.ZodNumber;
|
|
288
|
+
mediaType: z.ZodString;
|
|
289
|
+
visibility: z.ZodEnum<{
|
|
290
|
+
policy: "policy";
|
|
291
|
+
verifier: "verifier";
|
|
292
|
+
host_private: "host_private";
|
|
293
|
+
}>;
|
|
294
|
+
}, z.core.$strict>>;
|
|
283
295
|
}, z.core.$strict>;
|
|
284
296
|
}, z.core.$strict>, z.ZodObject<{
|
|
285
297
|
operationId: z.ZodString;
|
|
@@ -412,6 +424,25 @@ export declare const PublishLearningResourceCommandSchema: z.ZodDiscriminatedUni
|
|
|
412
424
|
}>;
|
|
413
425
|
}, z.core.$strict>>;
|
|
414
426
|
adapterVersion: z.ZodNullable<z.ZodString>;
|
|
427
|
+
reviewOrigin: z.ZodOptional<z.ZodObject<{
|
|
428
|
+
modelId: z.ZodString;
|
|
429
|
+
packageHash: z.ZodString;
|
|
430
|
+
taskset: z.ZodObject<{
|
|
431
|
+
id: z.ZodString;
|
|
432
|
+
contentHash: z.ZodString;
|
|
433
|
+
revision: z.ZodNumber;
|
|
434
|
+
}, z.core.$strict>;
|
|
435
|
+
batch: z.ZodObject<{
|
|
436
|
+
id: z.ZodString;
|
|
437
|
+
contentHash: z.ZodString;
|
|
438
|
+
revision: z.ZodNumber;
|
|
439
|
+
}, z.core.$strict>;
|
|
440
|
+
rewardBinding: z.ZodObject<{
|
|
441
|
+
id: z.ZodString;
|
|
442
|
+
contentHash: z.ZodString;
|
|
443
|
+
revision: z.ZodNumber;
|
|
444
|
+
}, z.core.$strict>;
|
|
445
|
+
}, z.core.$strict>>;
|
|
415
446
|
}, z.core.$strict>;
|
|
416
447
|
}, z.core.$strict>, z.ZodObject<{
|
|
417
448
|
operationId: z.ZodString;
|
|
@@ -782,6 +813,18 @@ export declare const PublishLearningResourcesCommandSchema: z.ZodObject<{
|
|
|
782
813
|
host_private: "host_private";
|
|
783
814
|
}>;
|
|
784
815
|
}, z.core.$strict>>;
|
|
816
|
+
fixtureSetRef: z.ZodOptional<z.ZodObject<{
|
|
817
|
+
id: z.ZodString;
|
|
818
|
+
path: z.ZodString;
|
|
819
|
+
contentHash: z.ZodString;
|
|
820
|
+
sizeBytes: z.ZodNumber;
|
|
821
|
+
mediaType: z.ZodString;
|
|
822
|
+
visibility: z.ZodEnum<{
|
|
823
|
+
policy: "policy";
|
|
824
|
+
verifier: "verifier";
|
|
825
|
+
host_private: "host_private";
|
|
826
|
+
}>;
|
|
827
|
+
}, z.core.$strict>>;
|
|
785
828
|
}, z.core.$strict>;
|
|
786
829
|
expectedRevision: z.ZodNumber;
|
|
787
830
|
}, z.core.$strict> | z.ZodObject<{
|
|
@@ -876,6 +919,25 @@ export declare const PublishLearningResourcesCommandSchema: z.ZodObject<{
|
|
|
876
919
|
}>;
|
|
877
920
|
}, z.core.$strict>>;
|
|
878
921
|
adapterVersion: z.ZodNullable<z.ZodString>;
|
|
922
|
+
reviewOrigin: z.ZodOptional<z.ZodObject<{
|
|
923
|
+
modelId: z.ZodString;
|
|
924
|
+
packageHash: z.ZodString;
|
|
925
|
+
taskset: z.ZodObject<{
|
|
926
|
+
id: z.ZodString;
|
|
927
|
+
contentHash: z.ZodString;
|
|
928
|
+
revision: z.ZodNumber;
|
|
929
|
+
}, z.core.$strict>;
|
|
930
|
+
batch: z.ZodObject<{
|
|
931
|
+
id: z.ZodString;
|
|
932
|
+
contentHash: z.ZodString;
|
|
933
|
+
revision: z.ZodNumber;
|
|
934
|
+
}, z.core.$strict>;
|
|
935
|
+
rewardBinding: z.ZodObject<{
|
|
936
|
+
id: z.ZodString;
|
|
937
|
+
contentHash: z.ZodString;
|
|
938
|
+
revision: z.ZodNumber;
|
|
939
|
+
}, z.core.$strict>;
|
|
940
|
+
}, z.core.$strict>>;
|
|
879
941
|
}, z.core.$strict>;
|
|
880
942
|
expectedRevision: z.ZodNumber;
|
|
881
943
|
}, z.core.$strict> | z.ZodObject<{
|
|
@@ -1254,6 +1316,30 @@ export declare const SaveAuthoringDraftCommandSchema: z.ZodObject<{
|
|
|
1254
1316
|
inputContract: z.ZodString;
|
|
1255
1317
|
minimum: z.ZodString;
|
|
1256
1318
|
maximum: z.ZodString;
|
|
1319
|
+
fixtures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1320
|
+
id: z.ZodString;
|
|
1321
|
+
name: z.ZodString;
|
|
1322
|
+
input: z.ZodString;
|
|
1323
|
+
output: z.ZodString;
|
|
1324
|
+
expectedOutput: z.ZodString;
|
|
1325
|
+
evaluatorContext: z.ZodString;
|
|
1326
|
+
artifactRefs: z.ZodArray<z.ZodString>;
|
|
1327
|
+
runtimeEventRefs: z.ZodArray<z.ZodString>;
|
|
1328
|
+
infrastructureError: z.ZodString;
|
|
1329
|
+
expectedStatus: z.ZodEnum<{
|
|
1330
|
+
pending: "pending";
|
|
1331
|
+
failed: "failed";
|
|
1332
|
+
scored: "scored";
|
|
1333
|
+
unavailable: "unavailable";
|
|
1334
|
+
}>;
|
|
1335
|
+
minimumScore: z.ZodString;
|
|
1336
|
+
maximumScore: z.ZodString;
|
|
1337
|
+
expectedPassed: z.ZodEnum<{
|
|
1338
|
+
any: "any";
|
|
1339
|
+
true: "true";
|
|
1340
|
+
false: "false";
|
|
1341
|
+
}>;
|
|
1342
|
+
}, z.core.$strict>>>;
|
|
1257
1343
|
}, z.core.$strict>;
|
|
1258
1344
|
}, z.core.$strict>, z.ZodObject<{
|
|
1259
1345
|
id: z.ZodString;
|
|
@@ -1311,7 +1397,39 @@ export declare const ArchiveAuthoringDraftCommandSchema: z.ZodObject<{
|
|
|
1311
1397
|
revision: z.ZodNumber;
|
|
1312
1398
|
}, z.core.$strict>;
|
|
1313
1399
|
}, z.core.$strict>;
|
|
1400
|
+
export declare const QueueRewardCheckCommandSchema: z.ZodObject<{
|
|
1401
|
+
operationId: z.ZodString;
|
|
1402
|
+
action: z.ZodLiteral<"queue_reward_check">;
|
|
1403
|
+
draft: z.ZodObject<{
|
|
1404
|
+
id: z.ZodString;
|
|
1405
|
+
contentHash: z.ZodString;
|
|
1406
|
+
revision: z.ZodNumber;
|
|
1407
|
+
}, z.core.$strict>;
|
|
1408
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
1409
|
+
maximumSpendUsd: z.ZodDefault<z.ZodNumber>;
|
|
1410
|
+
}, z.core.$strict>;
|
|
1411
|
+
export declare const CancelRewardCheckCommandSchema: z.ZodObject<{
|
|
1412
|
+
operationId: z.ZodString;
|
|
1413
|
+
action: z.ZodLiteral<"cancel_reward_check">;
|
|
1414
|
+
checkId: z.ZodString;
|
|
1415
|
+
expectedRevision: z.ZodNumber;
|
|
1416
|
+
}, z.core.$strict>;
|
|
1314
1417
|
export declare const LearningCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1418
|
+
operationId: z.ZodString;
|
|
1419
|
+
action: z.ZodLiteral<"queue_reward_check">;
|
|
1420
|
+
draft: z.ZodObject<{
|
|
1421
|
+
id: z.ZodString;
|
|
1422
|
+
contentHash: z.ZodString;
|
|
1423
|
+
revision: z.ZodNumber;
|
|
1424
|
+
}, z.core.$strict>;
|
|
1425
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
1426
|
+
maximumSpendUsd: z.ZodDefault<z.ZodNumber>;
|
|
1427
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1428
|
+
operationId: z.ZodString;
|
|
1429
|
+
action: z.ZodLiteral<"cancel_reward_check">;
|
|
1430
|
+
checkId: z.ZodString;
|
|
1431
|
+
expectedRevision: z.ZodNumber;
|
|
1432
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1315
1433
|
operationId: z.ZodString;
|
|
1316
1434
|
action: z.ZodLiteral<"save_draft">;
|
|
1317
1435
|
expectedRevision: z.ZodNumber;
|
|
@@ -1414,6 +1532,30 @@ export declare const LearningCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1414
1532
|
inputContract: z.ZodString;
|
|
1415
1533
|
minimum: z.ZodString;
|
|
1416
1534
|
maximum: z.ZodString;
|
|
1535
|
+
fixtures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1536
|
+
id: z.ZodString;
|
|
1537
|
+
name: z.ZodString;
|
|
1538
|
+
input: z.ZodString;
|
|
1539
|
+
output: z.ZodString;
|
|
1540
|
+
expectedOutput: z.ZodString;
|
|
1541
|
+
evaluatorContext: z.ZodString;
|
|
1542
|
+
artifactRefs: z.ZodArray<z.ZodString>;
|
|
1543
|
+
runtimeEventRefs: z.ZodArray<z.ZodString>;
|
|
1544
|
+
infrastructureError: z.ZodString;
|
|
1545
|
+
expectedStatus: z.ZodEnum<{
|
|
1546
|
+
pending: "pending";
|
|
1547
|
+
failed: "failed";
|
|
1548
|
+
scored: "scored";
|
|
1549
|
+
unavailable: "unavailable";
|
|
1550
|
+
}>;
|
|
1551
|
+
minimumScore: z.ZodString;
|
|
1552
|
+
maximumScore: z.ZodString;
|
|
1553
|
+
expectedPassed: z.ZodEnum<{
|
|
1554
|
+
any: "any";
|
|
1555
|
+
true: "true";
|
|
1556
|
+
false: "false";
|
|
1557
|
+
}>;
|
|
1558
|
+
}, z.core.$strict>>>;
|
|
1417
1559
|
}, z.core.$strict>;
|
|
1418
1560
|
}, z.core.$strict>, z.ZodObject<{
|
|
1419
1561
|
id: z.ZodString;
|
|
@@ -1750,6 +1892,18 @@ export declare const LearningCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1750
1892
|
host_private: "host_private";
|
|
1751
1893
|
}>;
|
|
1752
1894
|
}, z.core.$strict>>;
|
|
1895
|
+
fixtureSetRef: z.ZodOptional<z.ZodObject<{
|
|
1896
|
+
id: z.ZodString;
|
|
1897
|
+
path: z.ZodString;
|
|
1898
|
+
contentHash: z.ZodString;
|
|
1899
|
+
sizeBytes: z.ZodNumber;
|
|
1900
|
+
mediaType: z.ZodString;
|
|
1901
|
+
visibility: z.ZodEnum<{
|
|
1902
|
+
policy: "policy";
|
|
1903
|
+
verifier: "verifier";
|
|
1904
|
+
host_private: "host_private";
|
|
1905
|
+
}>;
|
|
1906
|
+
}, z.core.$strict>>;
|
|
1753
1907
|
}, z.core.$strict>;
|
|
1754
1908
|
}, z.core.$strict>, z.ZodObject<{
|
|
1755
1909
|
operationId: z.ZodString;
|
|
@@ -1882,6 +2036,25 @@ export declare const LearningCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1882
2036
|
}>;
|
|
1883
2037
|
}, z.core.$strict>>;
|
|
1884
2038
|
adapterVersion: z.ZodNullable<z.ZodString>;
|
|
2039
|
+
reviewOrigin: z.ZodOptional<z.ZodObject<{
|
|
2040
|
+
modelId: z.ZodString;
|
|
2041
|
+
packageHash: z.ZodString;
|
|
2042
|
+
taskset: z.ZodObject<{
|
|
2043
|
+
id: z.ZodString;
|
|
2044
|
+
contentHash: z.ZodString;
|
|
2045
|
+
revision: z.ZodNumber;
|
|
2046
|
+
}, z.core.$strict>;
|
|
2047
|
+
batch: z.ZodObject<{
|
|
2048
|
+
id: z.ZodString;
|
|
2049
|
+
contentHash: z.ZodString;
|
|
2050
|
+
revision: z.ZodNumber;
|
|
2051
|
+
}, z.core.$strict>;
|
|
2052
|
+
rewardBinding: z.ZodObject<{
|
|
2053
|
+
id: z.ZodString;
|
|
2054
|
+
contentHash: z.ZodString;
|
|
2055
|
+
revision: z.ZodNumber;
|
|
2056
|
+
}, z.core.$strict>;
|
|
2057
|
+
}, z.core.$strict>>;
|
|
1885
2058
|
}, z.core.$strict>;
|
|
1886
2059
|
}, z.core.$strict>, z.ZodObject<{
|
|
1887
2060
|
operationId: z.ZodString;
|
|
@@ -2251,6 +2424,18 @@ export declare const LearningCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2251
2424
|
host_private: "host_private";
|
|
2252
2425
|
}>;
|
|
2253
2426
|
}, z.core.$strict>>;
|
|
2427
|
+
fixtureSetRef: z.ZodOptional<z.ZodObject<{
|
|
2428
|
+
id: z.ZodString;
|
|
2429
|
+
path: z.ZodString;
|
|
2430
|
+
contentHash: z.ZodString;
|
|
2431
|
+
sizeBytes: z.ZodNumber;
|
|
2432
|
+
mediaType: z.ZodString;
|
|
2433
|
+
visibility: z.ZodEnum<{
|
|
2434
|
+
policy: "policy";
|
|
2435
|
+
verifier: "verifier";
|
|
2436
|
+
host_private: "host_private";
|
|
2437
|
+
}>;
|
|
2438
|
+
}, z.core.$strict>>;
|
|
2254
2439
|
}, z.core.$strict>;
|
|
2255
2440
|
expectedRevision: z.ZodNumber;
|
|
2256
2441
|
}, z.core.$strict> | z.ZodObject<{
|
|
@@ -2345,6 +2530,25 @@ export declare const LearningCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
2345
2530
|
}>;
|
|
2346
2531
|
}, z.core.$strict>>;
|
|
2347
2532
|
adapterVersion: z.ZodNullable<z.ZodString>;
|
|
2533
|
+
reviewOrigin: z.ZodOptional<z.ZodObject<{
|
|
2534
|
+
modelId: z.ZodString;
|
|
2535
|
+
packageHash: z.ZodString;
|
|
2536
|
+
taskset: z.ZodObject<{
|
|
2537
|
+
id: z.ZodString;
|
|
2538
|
+
contentHash: z.ZodString;
|
|
2539
|
+
revision: z.ZodNumber;
|
|
2540
|
+
}, z.core.$strict>;
|
|
2541
|
+
batch: z.ZodObject<{
|
|
2542
|
+
id: z.ZodString;
|
|
2543
|
+
contentHash: z.ZodString;
|
|
2544
|
+
revision: z.ZodNumber;
|
|
2545
|
+
}, z.core.$strict>;
|
|
2546
|
+
rewardBinding: z.ZodObject<{
|
|
2547
|
+
id: z.ZodString;
|
|
2548
|
+
contentHash: z.ZodString;
|
|
2549
|
+
revision: z.ZodNumber;
|
|
2550
|
+
}, z.core.$strict>;
|
|
2551
|
+
}, z.core.$strict>>;
|
|
2348
2552
|
}, z.core.$strict>;
|
|
2349
2553
|
expectedRevision: z.ZodNumber;
|
|
2350
2554
|
}, z.core.$strict> | z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../src/learning/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,oCAAoC
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../src/learning/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC"}
|
|
@@ -116,6 +116,30 @@ export declare const learningResourceSchemas: {
|
|
|
116
116
|
inputContract: z.ZodString;
|
|
117
117
|
minimum: z.ZodString;
|
|
118
118
|
maximum: z.ZodString;
|
|
119
|
+
fixtures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
120
|
+
id: z.ZodString;
|
|
121
|
+
name: z.ZodString;
|
|
122
|
+
input: z.ZodString;
|
|
123
|
+
output: z.ZodString;
|
|
124
|
+
expectedOutput: z.ZodString;
|
|
125
|
+
evaluatorContext: z.ZodString;
|
|
126
|
+
artifactRefs: z.ZodArray<z.ZodString>;
|
|
127
|
+
runtimeEventRefs: z.ZodArray<z.ZodString>;
|
|
128
|
+
infrastructureError: z.ZodString;
|
|
129
|
+
expectedStatus: z.ZodEnum<{
|
|
130
|
+
pending: "pending";
|
|
131
|
+
failed: "failed";
|
|
132
|
+
scored: "scored";
|
|
133
|
+
unavailable: "unavailable";
|
|
134
|
+
}>;
|
|
135
|
+
minimumScore: z.ZodString;
|
|
136
|
+
maximumScore: z.ZodString;
|
|
137
|
+
expectedPassed: z.ZodEnum<{
|
|
138
|
+
any: "any";
|
|
139
|
+
true: "true";
|
|
140
|
+
false: "false";
|
|
141
|
+
}>;
|
|
142
|
+
}, z.core.$strict>>>;
|
|
119
143
|
}, z.core.$strict>;
|
|
120
144
|
schemaVersion: z.ZodLiteral<"openpond.authoringDraft.v1">;
|
|
121
145
|
revision: z.ZodNumber;
|
|
@@ -193,6 +217,78 @@ export declare const learningResourceSchemas: {
|
|
|
193
217
|
updatedAt: z.ZodString;
|
|
194
218
|
contentHash: z.ZodString;
|
|
195
219
|
}, z.core.$strict>], "targetKind">;
|
|
220
|
+
readonly reward_check: z.ZodObject<{
|
|
221
|
+
schemaVersion: z.ZodLiteral<"openpond.rewardCheckRun.v1">;
|
|
222
|
+
id: z.ZodString;
|
|
223
|
+
revision: z.ZodNumber;
|
|
224
|
+
draft: z.ZodObject<{
|
|
225
|
+
id: z.ZodString;
|
|
226
|
+
contentHash: z.ZodString;
|
|
227
|
+
revision: z.ZodNumber;
|
|
228
|
+
}, z.core.$strict>;
|
|
229
|
+
reward: z.ZodObject<{
|
|
230
|
+
id: z.ZodString;
|
|
231
|
+
contentHash: z.ZodString;
|
|
232
|
+
revision: z.ZodNumber;
|
|
233
|
+
}, z.core.$strict>;
|
|
234
|
+
snapshotHash: z.ZodString;
|
|
235
|
+
fixtureRefs: z.ZodArray<z.ZodObject<{
|
|
236
|
+
id: z.ZodString;
|
|
237
|
+
contentHash: z.ZodString;
|
|
238
|
+
}, z.core.$strict>>;
|
|
239
|
+
status: z.ZodEnum<{
|
|
240
|
+
failed: "failed";
|
|
241
|
+
completed: "completed";
|
|
242
|
+
cancelled: "cancelled";
|
|
243
|
+
running: "running";
|
|
244
|
+
cancelling: "cancelling";
|
|
245
|
+
queued: "queued";
|
|
246
|
+
}>;
|
|
247
|
+
runtime: z.ZodNullable<z.ZodObject<{
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
packageVersion: z.ZodString;
|
|
250
|
+
engine: z.ZodString;
|
|
251
|
+
}, z.core.$strict>>;
|
|
252
|
+
results: z.ZodArray<z.ZodObject<{
|
|
253
|
+
fixture: z.ZodObject<{
|
|
254
|
+
id: z.ZodString;
|
|
255
|
+
contentHash: z.ZodString;
|
|
256
|
+
}, z.core.$strict>;
|
|
257
|
+
result: z.ZodObject<{
|
|
258
|
+
graderId: z.ZodString;
|
|
259
|
+
reward: z.ZodObject<{
|
|
260
|
+
id: z.ZodString;
|
|
261
|
+
contentHash: z.ZodString;
|
|
262
|
+
revision: z.ZodNumber;
|
|
263
|
+
}, z.core.$strict>;
|
|
264
|
+
role: z.ZodEnum<{
|
|
265
|
+
evaluation: "evaluation";
|
|
266
|
+
training: "training";
|
|
267
|
+
}>;
|
|
268
|
+
status: z.ZodEnum<{
|
|
269
|
+
pending: "pending";
|
|
270
|
+
failed: "failed";
|
|
271
|
+
scored: "scored";
|
|
272
|
+
unavailable: "unavailable";
|
|
273
|
+
}>;
|
|
274
|
+
rawScore: z.ZodNullable<z.ZodNumber>;
|
|
275
|
+
normalizedScore: z.ZodNullable<z.ZodNumber>;
|
|
276
|
+
passed: z.ZodNullable<z.ZodBoolean>;
|
|
277
|
+
evidenceHashes: z.ZodArray<z.ZodString>;
|
|
278
|
+
message: z.ZodNullable<z.ZodString>;
|
|
279
|
+
}, z.core.$strict>;
|
|
280
|
+
matchesExpectation: z.ZodBoolean;
|
|
281
|
+
}, z.core.$strict>>;
|
|
282
|
+
matchesExpectations: z.ZodNullable<z.ZodBoolean>;
|
|
283
|
+
failure: z.ZodNullable<z.ZodString>;
|
|
284
|
+
timeoutMs: z.ZodNumber;
|
|
285
|
+
maximumSpendUsd: z.ZodNumber;
|
|
286
|
+
leaseOwner: z.ZodNullable<z.ZodString>;
|
|
287
|
+
leaseExpiresAt: z.ZodNullable<z.ZodString>;
|
|
288
|
+
attemptCount: z.ZodNumber;
|
|
289
|
+
createdAt: z.ZodString;
|
|
290
|
+
updatedAt: z.ZodString;
|
|
291
|
+
}, z.core.$strict>;
|
|
196
292
|
readonly asset: z.ZodObject<{
|
|
197
293
|
schemaVersion: z.ZodLiteral<"openpond.learningTextAsset.v1">;
|
|
198
294
|
id: z.ZodString;
|
|
@@ -410,6 +506,18 @@ export declare const learningResourceSchemas: {
|
|
|
410
506
|
host_private: "host_private";
|
|
411
507
|
}>;
|
|
412
508
|
}, z.core.$strict>>;
|
|
509
|
+
fixtureSetRef: z.ZodOptional<z.ZodObject<{
|
|
510
|
+
id: z.ZodString;
|
|
511
|
+
path: z.ZodString;
|
|
512
|
+
contentHash: z.ZodString;
|
|
513
|
+
sizeBytes: z.ZodNumber;
|
|
514
|
+
mediaType: z.ZodString;
|
|
515
|
+
visibility: z.ZodEnum<{
|
|
516
|
+
policy: "policy";
|
|
517
|
+
verifier: "verifier";
|
|
518
|
+
host_private: "host_private";
|
|
519
|
+
}>;
|
|
520
|
+
}, z.core.$strict>>;
|
|
413
521
|
contentHash: z.ZodString;
|
|
414
522
|
}, z.core.$strict>;
|
|
415
523
|
readonly binding: z.ZodObject<{
|
|
@@ -500,6 +608,25 @@ export declare const learningResourceSchemas: {
|
|
|
500
608
|
}>;
|
|
501
609
|
}, z.core.$strict>>;
|
|
502
610
|
adapterVersion: z.ZodNullable<z.ZodString>;
|
|
611
|
+
reviewOrigin: z.ZodOptional<z.ZodObject<{
|
|
612
|
+
modelId: z.ZodString;
|
|
613
|
+
packageHash: z.ZodString;
|
|
614
|
+
taskset: z.ZodObject<{
|
|
615
|
+
id: z.ZodString;
|
|
616
|
+
contentHash: z.ZodString;
|
|
617
|
+
revision: z.ZodNumber;
|
|
618
|
+
}, z.core.$strict>;
|
|
619
|
+
batch: z.ZodObject<{
|
|
620
|
+
id: z.ZodString;
|
|
621
|
+
contentHash: z.ZodString;
|
|
622
|
+
revision: z.ZodNumber;
|
|
623
|
+
}, z.core.$strict>;
|
|
624
|
+
rewardBinding: z.ZodObject<{
|
|
625
|
+
id: z.ZodString;
|
|
626
|
+
contentHash: z.ZodString;
|
|
627
|
+
revision: z.ZodNumber;
|
|
628
|
+
}, z.core.$strict>;
|
|
629
|
+
}, z.core.$strict>>;
|
|
503
630
|
contentHash: z.ZodString;
|
|
504
631
|
}, z.core.$strict>;
|
|
505
632
|
readonly evidence: z.ZodObject<{
|
|
@@ -1277,10 +1404,11 @@ export declare const LearningResourceKindSchema: z.ZodEnum<{
|
|
|
1277
1404
|
decision: "decision";
|
|
1278
1405
|
evidence: "evidence";
|
|
1279
1406
|
binding: "binding";
|
|
1280
|
-
grade: "grade";
|
|
1281
1407
|
batch: "batch";
|
|
1408
|
+
grade: "grade";
|
|
1282
1409
|
definition: "definition";
|
|
1283
1410
|
draft: "draft";
|
|
1411
|
+
reward_check: "reward_check";
|
|
1284
1412
|
iteration: "iteration";
|
|
1285
1413
|
package: "package";
|
|
1286
1414
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../../src/learning/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAkO,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1R,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../../src/learning/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAkO,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1R,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAKlD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAIvL;AACD,wBAAsB,sBAAsB,CAAC,CAAC,SAAS,oBAAoB,EAAE,WAAW,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAKjL;AACD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjG;AACD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAEhF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type RewardRelease } from "../rewards.js";
|
|
2
|
+
import { type AuthoringDraftFor } from "./authoring.js";
|
|
3
|
+
import { type LearningTextAsset } from "./assets.js";
|
|
4
|
+
export type RewardAuthoringFields = AuthoringDraftFor<"reward">["fields"];
|
|
5
|
+
export declare const DEFAULT_REWARD_VERIFIER_SOURCE = "export function verify({ output, expectedOutput }) {\n if (!expectedOutput || !Object.hasOwn(expectedOutput, \"answer\")) {\n throw new Error(\"An expected answer is required.\");\n }\n const passed = output.answer === expectedOutput.answer;\n return { score: passed ? 1 : 0, passed, feedback: passed ? \"Answer matched\" : \"Answer differed\" };\n}";
|
|
6
|
+
/** Both editors and execution owners compile the same draft bytes. No publication occurs here. */
|
|
7
|
+
export declare function compileRewardAuthoring(input: {
|
|
8
|
+
id: string;
|
|
9
|
+
fields: RewardAuthoringFields;
|
|
10
|
+
base: RewardRelease | null;
|
|
11
|
+
}): {
|
|
12
|
+
reward: RewardRelease;
|
|
13
|
+
assets: LearningTextAsset[];
|
|
14
|
+
};
|
|
15
|
+
export declare function rewardAuthoringFields(reward: RewardRelease | null, sourceAsset: LearningTextAsset | null, fixtureAsset?: LearningTextAsset | null): RewardAuthoringFields;
|
|
16
|
+
export declare function parseRewardAuthoringObject(value: string, label: string): Record<string, import("zod").JSONType>;
|
|
17
|
+
export declare function authoringNumber(value: string, label: string): number;
|
|
18
|
+
//# sourceMappingURL=reward-authoring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reward-authoring.d.ts","sourceRoot":"","sources":["../../../../../src/learning/reward-authoring.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAE7F,OAAO,EAAmE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACzH,OAAO,EAAoD,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIvG,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC1E,eAAO,MAAM,8BAA8B,yWAMzC,CAAC;AAEH,kGAAkG;AAClG,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,qBAAqB,CAAC;IAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,iBAAiB,EAAE,CAAA;CAAE,CA0C/K;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,EAAE,WAAW,EAAE,iBAAiB,GAAG,IAAI,EAAE,YAAY,GAAE,iBAAiB,GAAG,IAAW,GAAG,qBAAqB,CA8B/K;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,0CAMtE;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type LearningTransaction } from "./repository.js";
|
|
2
|
+
import type { LearningCommand } from "./operations.js";
|
|
3
|
+
export declare function queueRewardCheck(tx: LearningTransaction, input: Extract<LearningCommand, {
|
|
4
|
+
action: "queue_reward_check";
|
|
5
|
+
}>, operationId: string, now: string): Promise<{
|
|
6
|
+
kind: "reward_check";
|
|
7
|
+
id: string;
|
|
8
|
+
revision: number;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function cancelRewardCheck(tx: LearningTransaction, input: Extract<LearningCommand, {
|
|
11
|
+
action: "cancel_reward_check";
|
|
12
|
+
}>, now: string): Promise<{
|
|
13
|
+
kind: "reward_check";
|
|
14
|
+
id: string;
|
|
15
|
+
revision: number;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=reward-check-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reward-check-service.d.ts","sourceRoot":"","sources":["../../../../../src/learning/reward-check-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0E,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnI,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,wBAAsB,gBAAgB,CAAC,EAAE,EAAE,mBAAmB,EAAE,KAAK,EAAE,OAAO,CAAC,eAAe,EAAE;IAAE,MAAM,EAAE,oBAAoB,CAAA;CAAE,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;;;;GAclK;AAED,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,mBAAmB,EAAE,KAAK,EAAE,OAAO,CAAC,eAAe,EAAE;IAAE,MAAM,EAAE,qBAAqB,CAAA;CAAE,CAAC,EAAE,GAAG,EAAE,MAAM;;;;GAO/I"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type BoundRewardResult } from "../rewards.js";
|
|
2
|
+
import { compileRewardCheck, type RewardCheckRun, type RewardCheckRuntime, type RewardFixture } from "./reward-checks.js";
|
|
3
|
+
import { type LearningRepository } from "./repository.js";
|
|
4
|
+
export interface RewardFixtureExecutor {
|
|
5
|
+
readonly runtime: RewardCheckRuntime;
|
|
6
|
+
/** Resolve only the compiled private assets; settle after execution resources are cleaned up. */
|
|
7
|
+
execute(input: ReturnType<typeof compileRewardCheck> & {
|
|
8
|
+
scope: string;
|
|
9
|
+
run: RewardCheckRun;
|
|
10
|
+
fixture: RewardFixture;
|
|
11
|
+
signal: AbortSignal;
|
|
12
|
+
}): Promise<BoundRewardResult>;
|
|
13
|
+
/** True only after the execution owner confirms no work survives cancellation. */
|
|
14
|
+
cancel(input: {
|
|
15
|
+
scope: string;
|
|
16
|
+
run: RewardCheckRun;
|
|
17
|
+
}): Promise<boolean>;
|
|
18
|
+
}
|
|
19
|
+
export declare function createRewardCheckWorker(repository: LearningRepository, executor: RewardFixtureExecutor, options: {
|
|
20
|
+
workerId: string;
|
|
21
|
+
now?: () => string;
|
|
22
|
+
}): {
|
|
23
|
+
run: (scope: string, checkId: string) => Promise<RewardCheckRun>;
|
|
24
|
+
requestCancellation(scope: string, id: string): void;
|
|
25
|
+
drain(scope: string, limit?: number): Promise<RewardCheckRun[]>;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=reward-check-worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reward-check-worker.d.ts","sourceRoot":"","sources":["../../../../../src/learning/reward-check-worker.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAE,kBAAkB,EAAsE,KAAK,cAAc,EAAE,KAAK,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC9L,OAAO,EAAmD,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE3G,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,iGAAiG;IACjG,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,aAAa,CAAC;QAAC,MAAM,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACxK,kFAAkF;IAClF,MAAM,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACzE;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,kBAAkB,EAAE,QAAQ,EAAE,qBAAqB,EAAE,OAAO,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAAE;iBAO9H,MAAM,WAAW,MAAM,KAAG,OAAO,CAAC,cAAc,CAAC;+BA0E9C,MAAM,MAAM,MAAM;iBAC1B,MAAM,mBAAe,OAAO,CAAC,cAAc,EAAE,CAAC;EAWpE"}
|