openpond-sdk 0.0.13 → 0.0.14
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/README.md +4 -1
- package/TRAINING_PROTOCOL.md +78 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/model-projects.js +138 -5
- package/dist/model-projects.js.map +3 -3
- package/dist/refiner.js +6 -6
- package/dist/refiner.js.map +1 -1
- package/dist/training.js +239 -18
- package/dist/training.js.map +3 -3
- package/dist/types/packages/sdk/src/model-projects.d.ts +17 -1
- package/dist/types/packages/sdk/src/model-projects.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/protocol.d.ts +25 -0
- package/dist/types/packages/sdk/src/protocol.d.ts.map +1 -0
- package/dist/types/packages/sdk/src/training.d.ts +187 -10
- package/dist/types/packages/sdk/src/training.d.ts.map +1 -1
- package/fixtures/training/v2/policy-optimize.unknown-field.invalid.json +10 -0
- package/fixtures/training/v2/policy-optimize.valid.json +84 -0
- package/package.json +5 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../../src/protocol.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAC1B,IAAI,GACJ,OAAO,GACP,MAAM,GACN,MAAM,GACN,kBAAkB,EAAE,GACpB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAA;CAAE,CAAC;AAE1C,eAAO,MAAM,gCAAgC,EAAG,CAAU,CAAC;AAC3D,eAAO,MAAM,4BAA4B,EACvC,kDAA2D,CAAC;AAC9D,eAAO,MAAM,iCAAiC,EAC5C,uDAAgE,CAAC;AAEnE,eAAO,MAAM,iCAAiC,UAAY,CAAC;AAC3D,eAAO,MAAM,+BAA+B,UAAY,CAAC;AACzD,eAAO,MAAM,4BAA4B,SAAU,CAAC;AACpD,eAAO,MAAM,oCAAoC,UAAY,CAAC;AAE9D,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAK1C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEpD;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE9D;AAED,wBAAsB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAMrE;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,GACZ,IAAI,CAQN;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,GACZ,OAAO,CAgBT"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export { OPENPOND_TRAINING_MEDIA_TYPE, OPENPOND_TRAINING_PROTOCOL_MAJOR, TRAINING_API_RESPONSE_MAX_BYTES, TRAINING_JOB_SUBMISSION_MAX_BYTES, OpenPondProtocolError, assertCanonicalPayloadSize, canonicalJson, canonicalJsonByteLength, canonicalSha256, parseBoundedJson, } from "./protocol.js";
|
|
2
3
|
export declare const TrainingJobKindSchema: z.ZodEnum<{
|
|
3
4
|
reward_model_train: "reward_model_train";
|
|
4
5
|
policy_optimize: "policy_optimize";
|
|
@@ -423,6 +424,8 @@ export declare const TrainingJobSubmissionSchema: z.ZodObject<{
|
|
|
423
424
|
}, z.core.$strict>;
|
|
424
425
|
contentHash: z.ZodString;
|
|
425
426
|
}, z.core.$strict>;
|
|
427
|
+
export declare function trainingJobSubmissionHash(submission: Omit<TrainingJobSubmission, "contentHash"> | TrainingJobSubmission): Promise<string>;
|
|
428
|
+
export declare function parseAndVerifyTrainingJobSubmission(value: unknown): Promise<TrainingJobSubmission>;
|
|
426
429
|
export declare const TrainingJobSchema: z.ZodObject<{
|
|
427
430
|
schemaVersion: z.ZodLiteral<"openpond.trainingJob.v2">;
|
|
428
431
|
id: z.ZodString;
|
|
@@ -455,6 +458,42 @@ export declare const TrainingJobSchema: z.ZodObject<{
|
|
|
455
458
|
updatedAt: z.ZodString;
|
|
456
459
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
457
460
|
}, z.core.$strict>;
|
|
461
|
+
export declare const TrainingJobPageSchema: z.ZodObject<{
|
|
462
|
+
schemaVersion: z.ZodLiteral<"openpond.trainingJobPage.v2">;
|
|
463
|
+
jobs: z.ZodArray<z.ZodObject<{
|
|
464
|
+
schemaVersion: z.ZodLiteral<"openpond.trainingJob.v2">;
|
|
465
|
+
id: z.ZodString;
|
|
466
|
+
teamId: z.ZodString;
|
|
467
|
+
kind: z.ZodEnum<{
|
|
468
|
+
reward_model_train: "reward_model_train";
|
|
469
|
+
policy_optimize: "policy_optimize";
|
|
470
|
+
}>;
|
|
471
|
+
modelProjectId: z.ZodString;
|
|
472
|
+
portableProjectId: z.ZodString;
|
|
473
|
+
sourceProjectRevision: z.ZodNumber;
|
|
474
|
+
submissionHash: z.ZodString;
|
|
475
|
+
state: z.ZodEnum<{
|
|
476
|
+
succeeded: "succeeded";
|
|
477
|
+
running: "running";
|
|
478
|
+
failed: "failed";
|
|
479
|
+
queued: "queued";
|
|
480
|
+
admitting: "admitting";
|
|
481
|
+
provisioning: "provisioning";
|
|
482
|
+
stopping: "stopping";
|
|
483
|
+
cancelling: "cancelling";
|
|
484
|
+
cancelled: "cancelled";
|
|
485
|
+
}>;
|
|
486
|
+
phase: z.ZodString;
|
|
487
|
+
version: z.ZodNumber;
|
|
488
|
+
progress: z.ZodNumber;
|
|
489
|
+
accruedSpendUsd: z.ZodNumber;
|
|
490
|
+
terminalReason: z.ZodNullable<z.ZodString>;
|
|
491
|
+
createdAt: z.ZodString;
|
|
492
|
+
updatedAt: z.ZodString;
|
|
493
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
494
|
+
}, z.core.$strict>>;
|
|
495
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
496
|
+
}, z.core.$strict>;
|
|
458
497
|
export declare const TrainingJobEventSchema: z.ZodObject<{
|
|
459
498
|
schemaVersion: z.ZodLiteral<"openpond.trainingJobEvent.v2">;
|
|
460
499
|
id: z.ZodString;
|
|
@@ -479,6 +518,9 @@ export declare const TrainingJobLogSchema: z.ZodObject<{
|
|
|
479
518
|
message: z.ZodString;
|
|
480
519
|
createdAt: z.ZodString;
|
|
481
520
|
}, z.core.$strict>;
|
|
521
|
+
export declare const TrainingJobControlRequestSchema: z.ZodObject<{
|
|
522
|
+
expectedVersion: z.ZodNumber;
|
|
523
|
+
}, z.core.$strict>;
|
|
482
524
|
export declare const TrainingJobOutputSchema: z.ZodObject<{
|
|
483
525
|
schemaVersion: z.ZodLiteral<"openpond.trainingJobOutput.v2">;
|
|
484
526
|
id: z.ZodString;
|
|
@@ -525,6 +567,71 @@ export declare const TrainingExecutionReceiptSchema: z.ZodObject<{
|
|
|
525
567
|
issuedAt: z.ZodString;
|
|
526
568
|
signature: z.ZodNullable<z.ZodString>;
|
|
527
569
|
}, z.core.$strict>;
|
|
570
|
+
export declare const TrainingJobOutputsSchema: z.ZodObject<{
|
|
571
|
+
schemaVersion: z.ZodLiteral<"openpond.trainingJobOutputs.v2">;
|
|
572
|
+
outputs: z.ZodArray<z.ZodObject<{
|
|
573
|
+
schemaVersion: z.ZodLiteral<"openpond.trainingJobOutput.v2">;
|
|
574
|
+
id: z.ZodString;
|
|
575
|
+
jobId: z.ZodString;
|
|
576
|
+
kind: z.ZodEnum<{
|
|
577
|
+
checkpoint: "checkpoint";
|
|
578
|
+
adapter: "adapter";
|
|
579
|
+
scorer: "scorer";
|
|
580
|
+
metrics: "metrics";
|
|
581
|
+
evaluation: "evaluation";
|
|
582
|
+
trace: "trace";
|
|
583
|
+
receipt: "receipt";
|
|
584
|
+
}>;
|
|
585
|
+
artifactRef: z.ZodString;
|
|
586
|
+
contentHash: z.ZodString;
|
|
587
|
+
sizeBytes: z.ZodNumber;
|
|
588
|
+
createdAt: z.ZodString;
|
|
589
|
+
}, z.core.$strict>>;
|
|
590
|
+
receipt: z.ZodNullable<z.ZodObject<{
|
|
591
|
+
schemaVersion: z.ZodLiteral<"openpond.trainingExecutionReceipt.v2">;
|
|
592
|
+
id: z.ZodString;
|
|
593
|
+
teamId: z.ZodString;
|
|
594
|
+
jobId: z.ZodString;
|
|
595
|
+
submissionHash: z.ZodString;
|
|
596
|
+
manifestHash: z.ZodString;
|
|
597
|
+
recipeHash: z.ZodString;
|
|
598
|
+
capabilityHash: z.ZodString;
|
|
599
|
+
runtimeRelease: z.ZodObject<{
|
|
600
|
+
id: z.ZodString;
|
|
601
|
+
contentHash: z.ZodString;
|
|
602
|
+
}, z.core.$strict>;
|
|
603
|
+
inputs: z.ZodArray<z.ZodObject<{
|
|
604
|
+
id: z.ZodString;
|
|
605
|
+
contentHash: z.ZodString;
|
|
606
|
+
}, z.core.$strict>>;
|
|
607
|
+
outputs: z.ZodArray<z.ZodObject<{
|
|
608
|
+
id: z.ZodString;
|
|
609
|
+
contentHash: z.ZodString;
|
|
610
|
+
}, z.core.$strict>>;
|
|
611
|
+
spendUsd: z.ZodNumber;
|
|
612
|
+
durationSeconds: z.ZodNumber;
|
|
613
|
+
cleanupComplete: z.ZodBoolean;
|
|
614
|
+
issuer: z.ZodString;
|
|
615
|
+
issuedAt: z.ZodString;
|
|
616
|
+
signature: z.ZodNullable<z.ZodString>;
|
|
617
|
+
}, z.core.$strict>>;
|
|
618
|
+
}, z.core.$strict>;
|
|
619
|
+
export declare const TrainingApiErrorSchema: z.ZodObject<{
|
|
620
|
+
schemaVersion: z.ZodLiteral<"openpond.trainingApiError.v2">;
|
|
621
|
+
code: z.ZodString;
|
|
622
|
+
message: z.ZodString;
|
|
623
|
+
retryable: z.ZodDefault<z.ZodBoolean>;
|
|
624
|
+
requestId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
625
|
+
details: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
626
|
+
}, z.core.$strict>;
|
|
627
|
+
export declare class OpenPondTrainingApiError extends Error {
|
|
628
|
+
readonly status: number;
|
|
629
|
+
readonly code: string;
|
|
630
|
+
readonly retryable: boolean;
|
|
631
|
+
readonly requestId: string | null;
|
|
632
|
+
readonly details: Record<string, unknown>;
|
|
633
|
+
constructor(status: number, error: z.infer<typeof TrainingApiErrorSchema>);
|
|
634
|
+
}
|
|
528
635
|
export declare const TrainingCapabilitiesSchema: z.ZodObject<{
|
|
529
636
|
schemaVersion: z.ZodLiteral<"openpond.trainingCapabilities.v2">;
|
|
530
637
|
capabilityHash: z.ZodString;
|
|
@@ -554,8 +661,12 @@ export declare const TrainingCapabilitiesSchema: z.ZodObject<{
|
|
|
554
661
|
}, z.core.$strict>;
|
|
555
662
|
export type TrainingJobSubmission = z.infer<typeof TrainingJobSubmissionSchema>;
|
|
556
663
|
export type TrainingJob = z.infer<typeof TrainingJobSchema>;
|
|
664
|
+
export type TrainingJobPage = z.infer<typeof TrainingJobPageSchema>;
|
|
557
665
|
export type TrainingJobEvent = z.infer<typeof TrainingJobEventSchema>;
|
|
666
|
+
export type TrainingJobLog = z.infer<typeof TrainingJobLogSchema>;
|
|
558
667
|
export type TrainingJobOutput = z.infer<typeof TrainingJobOutputSchema>;
|
|
668
|
+
export type TrainingJobOutputs = z.infer<typeof TrainingJobOutputsSchema>;
|
|
669
|
+
export type TrainingExecutionReceipt = z.infer<typeof TrainingExecutionReceiptSchema>;
|
|
559
670
|
export type TrainingCapabilities = z.infer<typeof TrainingCapabilitiesSchema>;
|
|
560
671
|
export declare function createTrainingClient(input: {
|
|
561
672
|
baseUrl: string;
|
|
@@ -600,7 +711,34 @@ export declare function createTrainingClient(input: {
|
|
|
600
711
|
updatedAt: string;
|
|
601
712
|
completedAt: string | null;
|
|
602
713
|
}>;
|
|
603
|
-
listJobs(
|
|
714
|
+
listJobs(options?: {
|
|
715
|
+
modelProjectId?: string;
|
|
716
|
+
cursor?: string;
|
|
717
|
+
limit?: number;
|
|
718
|
+
}): Promise<{
|
|
719
|
+
schemaVersion: "openpond.trainingJobPage.v2";
|
|
720
|
+
jobs: {
|
|
721
|
+
schemaVersion: "openpond.trainingJob.v2";
|
|
722
|
+
id: string;
|
|
723
|
+
teamId: string;
|
|
724
|
+
kind: "reward_model_train" | "policy_optimize";
|
|
725
|
+
modelProjectId: string;
|
|
726
|
+
portableProjectId: string;
|
|
727
|
+
sourceProjectRevision: number;
|
|
728
|
+
submissionHash: string;
|
|
729
|
+
state: "succeeded" | "running" | "failed" | "queued" | "admitting" | "provisioning" | "stopping" | "cancelling" | "cancelled";
|
|
730
|
+
phase: string;
|
|
731
|
+
version: number;
|
|
732
|
+
progress: number;
|
|
733
|
+
accruedSpendUsd: number;
|
|
734
|
+
terminalReason: string | null;
|
|
735
|
+
createdAt: string;
|
|
736
|
+
updatedAt: string;
|
|
737
|
+
completedAt: string | null;
|
|
738
|
+
}[];
|
|
739
|
+
nextCursor: string | null;
|
|
740
|
+
}>;
|
|
741
|
+
getJob(jobId: string): Promise<{
|
|
604
742
|
schemaVersion: "openpond.trainingJob.v2";
|
|
605
743
|
id: string;
|
|
606
744
|
teamId: string;
|
|
@@ -618,8 +756,8 @@ export declare function createTrainingClient(input: {
|
|
|
618
756
|
createdAt: string;
|
|
619
757
|
updatedAt: string;
|
|
620
758
|
completedAt: string | null;
|
|
621
|
-
}
|
|
622
|
-
|
|
759
|
+
}>;
|
|
760
|
+
cancelJob(jobId: string, expectedVersion: number): Promise<{
|
|
623
761
|
schemaVersion: "openpond.trainingJob.v2";
|
|
624
762
|
id: string;
|
|
625
763
|
teamId: string;
|
|
@@ -638,7 +776,7 @@ export declare function createTrainingClient(input: {
|
|
|
638
776
|
updatedAt: string;
|
|
639
777
|
completedAt: string | null;
|
|
640
778
|
}>;
|
|
641
|
-
|
|
779
|
+
stopAfterGroup(jobId: string, expectedVersion: number): Promise<{
|
|
642
780
|
schemaVersion: "openpond.trainingJob.v2";
|
|
643
781
|
id: string;
|
|
644
782
|
teamId: string;
|
|
@@ -669,13 +807,52 @@ export declare function createTrainingClient(input: {
|
|
|
669
807
|
createdAt: string;
|
|
670
808
|
}[]>;
|
|
671
809
|
outputs(jobId: string): Promise<{
|
|
672
|
-
schemaVersion: "openpond.
|
|
673
|
-
|
|
810
|
+
schemaVersion: "openpond.trainingJobOutputs.v2";
|
|
811
|
+
outputs: {
|
|
812
|
+
schemaVersion: "openpond.trainingJobOutput.v2";
|
|
813
|
+
id: string;
|
|
814
|
+
jobId: string;
|
|
815
|
+
kind: "checkpoint" | "adapter" | "scorer" | "metrics" | "evaluation" | "trace" | "receipt";
|
|
816
|
+
artifactRef: string;
|
|
817
|
+
contentHash: string;
|
|
818
|
+
sizeBytes: number;
|
|
819
|
+
createdAt: string;
|
|
820
|
+
}[];
|
|
821
|
+
receipt: {
|
|
822
|
+
schemaVersion: "openpond.trainingExecutionReceipt.v2";
|
|
823
|
+
id: string;
|
|
824
|
+
teamId: string;
|
|
825
|
+
jobId: string;
|
|
826
|
+
submissionHash: string;
|
|
827
|
+
manifestHash: string;
|
|
828
|
+
recipeHash: string;
|
|
829
|
+
capabilityHash: string;
|
|
830
|
+
runtimeRelease: {
|
|
831
|
+
id: string;
|
|
832
|
+
contentHash: string;
|
|
833
|
+
};
|
|
834
|
+
inputs: {
|
|
835
|
+
id: string;
|
|
836
|
+
contentHash: string;
|
|
837
|
+
}[];
|
|
838
|
+
outputs: {
|
|
839
|
+
id: string;
|
|
840
|
+
contentHash: string;
|
|
841
|
+
}[];
|
|
842
|
+
spendUsd: number;
|
|
843
|
+
durationSeconds: number;
|
|
844
|
+
cleanupComplete: boolean;
|
|
845
|
+
issuer: string;
|
|
846
|
+
issuedAt: string;
|
|
847
|
+
signature: string | null;
|
|
848
|
+
} | null;
|
|
849
|
+
}>;
|
|
850
|
+
logs(jobId: string): Promise<{
|
|
851
|
+
schemaVersion: "openpond.trainingJobLog.v2";
|
|
674
852
|
jobId: string;
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
sizeBytes: number;
|
|
853
|
+
sequence: number;
|
|
854
|
+
level: "error" | "debug" | "info" | "warning";
|
|
855
|
+
message: string;
|
|
679
856
|
createdAt: string;
|
|
680
857
|
}[]>;
|
|
681
858
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"training.d.ts","sourceRoot":"","sources":["../../../../../src/training.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"training.d.ts","sourceRoot":"","sources":["../../../../../src/training.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EAChC,+BAA+B,EAC/B,iCAAiC,EACjC,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,EACb,uBAAuB,EACvB,eAAe,EACf,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAMvB,eAAO,MAAM,qBAAqB;;;EAGhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;EAUjC,CAAC;AAEH,eAAO,MAAM,mCAAmC;;;;kBAMrC,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiBzB,CAAC;AAEZ,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAclC,CAAC;AA2BZ,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAWjC,CAAC;AAEZ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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OAAO,KAAK,CAAC;IACrB,OAAO,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;CACpE;;;;;;;;;;;;;;;;;;;;0BAiC+B,qBAAqB;;;;;;;;;;;;;;;;;;;uBAYzB;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;;;;;;;;;;;;;;;;;;;;;;;kBAmBmB,MAAM;;;;;;;;;;;;;;;;;;;qBAQH,MAAM,mBAAmB,MAAM;;;;;;;;;;;;;;;;;;;0BAY1B,MAAM,mBAAmB,MAAM;;;;;;;;;;;;;;;;;;;kBAYvC,MAAM;;;;;;;;;;;mBAYL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAOT,MAAM;;;;;;;;EAW3B"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "openpond.trainingJobSubmission.v2",
|
|
3
|
+
"idempotencyKey": "fixture-policy-project-r3",
|
|
4
|
+
"name": "Policy optimization fixture",
|
|
5
|
+
"source": {
|
|
6
|
+
"modelProject": {
|
|
7
|
+
"id": "hosted-project-fixture",
|
|
8
|
+
"portableProjectId": "project-fixture",
|
|
9
|
+
"revision": 3,
|
|
10
|
+
"contentHash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
11
|
+
},
|
|
12
|
+
"harnessRunManifest": {
|
|
13
|
+
"id": "manifest-fixture",
|
|
14
|
+
"contentHash": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
|
15
|
+
},
|
|
16
|
+
"harnessRelease": {
|
|
17
|
+
"id": "harness-fixture",
|
|
18
|
+
"contentHash": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
|
|
19
|
+
},
|
|
20
|
+
"taskset": {
|
|
21
|
+
"id": "taskset-fixture",
|
|
22
|
+
"revision": 2,
|
|
23
|
+
"contentHash": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
|
|
24
|
+
},
|
|
25
|
+
"tasksetRelease": {
|
|
26
|
+
"id": "taskset-release-fixture",
|
|
27
|
+
"contentHash": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
|
|
28
|
+
},
|
|
29
|
+
"dataset": {
|
|
30
|
+
"id": "dataset-fixture",
|
|
31
|
+
"contentHash": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
32
|
+
},
|
|
33
|
+
"evidenceSets": []
|
|
34
|
+
},
|
|
35
|
+
"job": {
|
|
36
|
+
"kind": "policy_optimize",
|
|
37
|
+
"baseModel": {
|
|
38
|
+
"schemaVersion": "openpond.baseModelPreference.v1",
|
|
39
|
+
"modelId": "model-fixture",
|
|
40
|
+
"revision": "revision-fixture",
|
|
41
|
+
"tokenizerRevision": "tokenizer-fixture",
|
|
42
|
+
"chatTemplateHash": "template-fixture",
|
|
43
|
+
"modelAssetId": null,
|
|
44
|
+
"source": "managed"
|
|
45
|
+
},
|
|
46
|
+
"recipe": {
|
|
47
|
+
"schemaVersion": "openpond.rftRecipe.v1",
|
|
48
|
+
"method": "grpo",
|
|
49
|
+
"parameterization": "lora",
|
|
50
|
+
"optimizer": {
|
|
51
|
+
"maximumSteps": 1
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"rewardSource": {
|
|
55
|
+
"kind": "deterministic",
|
|
56
|
+
"grader": {
|
|
57
|
+
"id": "grader-fixture",
|
|
58
|
+
"contentHash": "1111111111111111111111111111111111111111111111111111111111111111"
|
|
59
|
+
},
|
|
60
|
+
"composer": null
|
|
61
|
+
},
|
|
62
|
+
"resumeFrom": null
|
|
63
|
+
},
|
|
64
|
+
"requestedCapabilities": [
|
|
65
|
+
{
|
|
66
|
+
"id": "managed_rl.policy.grpo",
|
|
67
|
+
"version": "1",
|
|
68
|
+
"required": true
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"budget": {
|
|
72
|
+
"maximumSpendUsd": 1,
|
|
73
|
+
"maximumWallSeconds": 900
|
|
74
|
+
},
|
|
75
|
+
"approval": {
|
|
76
|
+
"approvalHash": "2222222222222222222222222222222222222222222222222222222222222222",
|
|
77
|
+
"approvedAt": "2026-08-27T00:00:00.000Z",
|
|
78
|
+
"exportApproved": true,
|
|
79
|
+
"maximumSpendUsd": 1,
|
|
80
|
+
"retentionDays": 7,
|
|
81
|
+
"region": null
|
|
82
|
+
},
|
|
83
|
+
"contentHash": "0d85f9767886924fae6cf16409ebee02089c0c77e6aa1e9c69bac33c9f3bd22b"
|
|
84
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openpond-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "Server-side TypeScript SDK for OpenPond sandboxes and agentic work",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
"types": "./dist/types/packages/sdk/src/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
+
"fixtures",
|
|
11
12
|
"README.md",
|
|
13
|
+
"TRAINING_PROTOCOL.md",
|
|
12
14
|
"LICENSE"
|
|
13
15
|
],
|
|
14
16
|
"exports": {
|
|
@@ -76,7 +78,7 @@
|
|
|
76
78
|
"build": "tsx scripts/build.ts",
|
|
77
79
|
"typecheck": "tsc --noEmit --project tsconfig.json",
|
|
78
80
|
"test": "vitest run --root ../.. --config vitest.config.ts --project sdk",
|
|
79
|
-
"check": "pnpm run typecheck && pnpm run test && pnpm run build && npm pack --dry-run"
|
|
81
|
+
"check": "pnpm run typecheck && pnpm run test && tsx scripts/check-protocol-fixtures.ts && pnpm run build && tsx scripts/check-published-consumer.ts && npm pack --dry-run"
|
|
80
82
|
},
|
|
81
83
|
"devDependencies": {
|
|
82
84
|
"@openpond/actions": "workspace:*",
|
|
@@ -88,7 +90,7 @@
|
|
|
88
90
|
"vitest": "4.1.10"
|
|
89
91
|
},
|
|
90
92
|
"dependencies": {
|
|
91
|
-
"@openpond/harness": "
|
|
93
|
+
"@openpond/harness": "^0.2.5",
|
|
92
94
|
"esbuild": "0.28.1",
|
|
93
95
|
"zod": "^4.1.13"
|
|
94
96
|
}
|