openpond-sdk 0.12.21 → 0.12.22

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.
@@ -54,6 +54,20 @@ execution location. Training authoring uses `trainingForm`. Cleared evaluation
54
54
  numeric controls remain `null`; blank training spend fields remain strings.
55
55
  These incomplete values can be retained without becoming executable requests.
56
56
 
57
+ Model setup authoring may also retain optional `modelSetup` metadata, exported
58
+ as `ModelSetupDraftSchema` and `ModelSetupDraft` from `openpond-sdk/training`.
59
+ It stores the selected workflow (`sft`, `rl`, `decision`), adapter (`lora`,
60
+ `engram`, `neuron-training`), `continualLearning` choice, current setup section
61
+ and an optional editable Dataset `{ id, revision }`. That Dataset reference is
62
+ an authoring destination, not an admitted training batch or immutable release.
63
+ These choices survive the same revisioned draft save/read lifecycle. They do
64
+ not publish a learning policy or establish executor compatibility. Call
65
+ `assertModelSetupExecutionIntent(draft, requestedOperation)` when converting a
66
+ retained setup draft into a preparation request. It rejects a different or
67
+ unsupported workflow/adapter operation; executor admission still owns runtime,
68
+ permissions and resource checks. Direct explicit-method APIs remain independent
69
+ of this authoring metadata.
70
+
57
71
  Use `training.saveExperimentDraft(request)` with
58
72
  `schemaVersion: "openpond.experimentDraftSave.v1"`, `teamId`, a stable
59
73
  `operationId`, `expectedRevision`, optional `projectId`, and an
package/dist/training.js CHANGED
@@ -3594,11 +3594,22 @@ var TrainingExperimentFormDraftSchema = z36.object({
3594
3594
  policy: LearningRevisionRefSchema2
3595
3595
  }).strict().optional()
3596
3596
  }).strict();
3597
+ var ModelSetupDraftSchema = z36.object({
3598
+ workflow: z36.enum(["sft", "rl", "decision"]),
3599
+ adapter: z36.enum(["lora", "engram", "neuron-training"]),
3600
+ continualLearning: z36.boolean(),
3601
+ dataset: z36.object({
3602
+ id: z36.string().trim().min(1).max(240),
3603
+ revision: z36.number().int().positive()
3604
+ }).strict().optional(),
3605
+ section: z36.enum(["model", "dataset", "graders", "settings"])
3606
+ }).strict();
3597
3607
  var ExperimentDraftSchema = z36.object({
3598
3608
  schemaVersion: z36.literal("openpond.experimentDraft.v1"),
3599
3609
  id: z36.string().trim().min(1).max(240),
3600
3610
  operationType: ExperimentOperationTypeSchema,
3601
3611
  name: z36.string().trim().min(1).max(500),
3612
+ modelSetup: ModelSetupDraftSchema.optional(),
3602
3613
  startingModel: ExperimentStartingModelSchema.optional(),
3603
3614
  evaluationForm: EvaluationExperimentDraftSchema.optional(),
3604
3615
  hostedEvaluationForm: HostedEvaluationExperimentFormDraftSchema.optional(),
@@ -3691,6 +3702,16 @@ var ExperimentDraftSchema = z36.object({
3691
3702
  if (draft.training && (!["sft", "grpo"].includes(draft.operationType) || draft.training.settings && draft.training.settings.method !== draft.operationType))
3692
3703
  context.addIssue({ code: "custom", path: ["training"], message: "Training settings must match the experiment type." });
3693
3704
  });
3705
+ function assertModelSetupExecutionIntent(draft, requestedOperation) {
3706
+ const parsed = ExperimentDraftSchema.parse(draft);
3707
+ const setup = parsed.modelSetup;
3708
+ if (!setup) return;
3709
+ const operation = setup.workflow === "sft" ? setup.adapter === "lora" ? "sft" : setup.adapter === "engram" ? "engram_adapter" : "selective_neuron_training" : setup.adapter === "lora" ? setup.workflow === "rl" ? "grpo" : "decision_model" : null;
3710
+ if (!operation)
3711
+ throw new OpenPondProtocolError("model_setup_execution_unsupported", "The selected workflow and adapter do not have a supported execution operation.");
3712
+ if (parsed.operationType !== operation || requestedOperation !== operation)
3713
+ throw new OpenPondProtocolError("model_setup_execution_mismatch", "The requested operation differs from the Model setup's selected workflow and adapter.");
3714
+ }
3694
3715
  async function parseAndVerifyExperimentDraft(raw, expected = {}) {
3695
3716
  const draft = ExperimentDraftSchema.parse(raw);
3696
3717
  if (draft.startingModel) await parseAndVerifyExperimentStartingModel(draft.startingModel, expected);
@@ -8289,6 +8310,7 @@ export {
8289
8310
  ModelModificationExecutionCapabilitySchema,
8290
8311
  ModelModificationMethodSchema,
8291
8312
  ModelModificationValidationLevelSchema,
8313
+ ModelSetupDraftSchema,
8292
8314
  ModificationRecordingContentSchema,
8293
8315
  ModificationRecordingDocumentSchema,
8294
8316
  ModificationRecordingListQuerySchema,
@@ -8546,6 +8568,7 @@ export {
8546
8568
  assertCanonicalPayloadSize,
8547
8569
  assertManagedModificationPricing,
8548
8570
  assertModelModificationValidationLevel,
8571
+ assertModelSetupExecutionIntent,
8549
8572
  assertTrainingEvaluationIsolation,
8550
8573
  assertTrainingQualificationReceipt,
8551
8574
  canonicalComputeSpendCap,