openpond-sdk 0.3.0 → 0.3.2

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/TASKSETS.md CHANGED
@@ -126,6 +126,14 @@ compare the Model revision when attaching the newly prepared batch.
126
126
 
127
127
  ## Revising an ordinary package
128
128
 
129
+ SDK `0.3.1` exposes `resolveTasksetPackageInstructions` from
130
+ `openpond-sdk/taskset-packages`. It reads the admitted Model or learning
131
+ definition for bound packages and `taskset.metadata.ordinaryAuthoring.instructions`
132
+ for ordinary packages. Ordinary authoring stores the objective in that hashed
133
+ metadata so import, execution and later revisions use the same instructions.
134
+ An omitted ordinary instruction is an empty package-wide prompt; a display name
135
+ is never substituted. Individual task inputs may contain their own instructions.
136
+
129
137
  SDK `0.3.0` adds ordinary package authoring and requires Evals `0.9.0` for
130
138
  authored metric policies. JavaScript packages must include a complete private
131
139
  execution graph: ordinary packages carry `environment/execution.json`, while
@@ -2745,6 +2745,12 @@ var TasksetPackageSchema = TasksetPackageContentSchema.extend({ contentHash: z19
2745
2745
  function tasksetPackageRewardBinding(value) {
2746
2746
  return value.learningResources ? taskBatchPackageMetadata2(value.taskset).binding : value.modelResources?.rewardBinding ?? null;
2747
2747
  }
2748
+ function resolveTasksetPackageInstructions(value) {
2749
+ if (value.learningResources) return taskBatchPackageMetadata2(value.taskset).definition.instructions;
2750
+ if (value.modelResources) return value.modelResources.taskDefinition.instructions;
2751
+ const authoring = z19.object({ instructions: z19.string().max(2e4).optional() }).passthrough().parse(value.taskset.metadata.ordinaryAuthoring ?? {});
2752
+ return authoring.instructions ?? "";
2753
+ }
2748
2754
  function validateTasksetPackage(value) {
2749
2755
  assertBoundedTaskJson3(value, MAX_TASKSET_PACKAGE_BYTES);
2750
2756
  const result = TasksetPackageSchema.parse(value);
@@ -2809,6 +2815,7 @@ function validateTasksetPackage(value) {
2809
2815
  throw new Error("Bound Taskset publication requires its complete model resources.");
2810
2816
  }
2811
2817
  resolveTasksetPackageExecution(result);
2818
+ resolveTasksetPackageInstructions(result);
2812
2819
  return result;
2813
2820
  }
2814
2821
  function createTasksetPackage(value) {
@@ -3370,6 +3377,7 @@ export {
3370
3377
  prepareModelTasksetDraft,
3371
3378
  publishModelTasksetDraftPackage,
3372
3379
  resolveTasksetPackageExecution,
3380
+ resolveTasksetPackageInstructions,
3373
3381
  tasksetPackageRewardBinding,
3374
3382
  validateTasksetLearningResources,
3375
3383
  validateTasksetPackage