openpond-sdk 0.9.4 → 0.9.6

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.
Files changed (31) hide show
  1. package/dist/{chunk-DNBAJUVR.js → chunk-6D4JIOOC.js} +8 -3
  2. package/dist/{chunk-DNBAJUVR.js.map → chunk-6D4JIOOC.js.map} +2 -2
  3. package/dist/dataset-workspaces.js +31 -2
  4. package/dist/dataset-workspaces.js.map +2 -2
  5. package/dist/experiments.js +33 -1
  6. package/dist/experiments.js.map +3 -3
  7. package/dist/learning.js +55 -0
  8. package/dist/learning.js.map +4 -4
  9. package/dist/taskset-packages.js +1 -1
  10. package/dist/training-projects.js +4 -1
  11. package/dist/training-projects.js.map +2 -2
  12. package/dist/types/packages/sdk/src/dataset-workspace-client.d.ts +1080 -1
  13. package/dist/types/packages/sdk/src/dataset-workspace-client.d.ts.map +1 -1
  14. package/dist/types/packages/sdk/src/dataset-workspace-contracts.d.ts +34 -0
  15. package/dist/types/packages/sdk/src/dataset-workspace-contracts.d.ts.map +1 -1
  16. package/dist/types/packages/sdk/src/experiment-client.d.ts +16 -0
  17. package/dist/types/packages/sdk/src/experiment-client.d.ts.map +1 -1
  18. package/dist/types/packages/sdk/src/experiment-inspection.d.ts +50 -0
  19. package/dist/types/packages/sdk/src/experiment-inspection.d.ts.map +1 -0
  20. package/dist/types/packages/sdk/src/experiments.d.ts +1 -0
  21. package/dist/types/packages/sdk/src/experiments.d.ts.map +1 -1
  22. package/dist/types/packages/sdk/src/grader-inspection.d.ts +568 -0
  23. package/dist/types/packages/sdk/src/grader-inspection.d.ts.map +1 -0
  24. package/dist/types/packages/sdk/src/learning.d.ts +1 -0
  25. package/dist/types/packages/sdk/src/learning.d.ts.map +1 -1
  26. package/dist/types/packages/sdk/src/taskset-authored-files.d.ts.map +1 -1
  27. package/dist/types/packages/sdk/src/training-project-client.d.ts +4 -0
  28. package/dist/types/packages/sdk/src/training-project-client.d.ts.map +1 -1
  29. package/dist/types/packages/sdk/src/training-project-contracts.d.ts +12 -0
  30. package/dist/types/packages/sdk/src/training-project-contracts.d.ts.map +1 -1
  31. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/learning.ts", "../src/model-learning-policy.ts"],
4
- "sourcesContent": ["export * from \"@openpond/evals/learning\";\nexport * from \"@openpond/evals/rewards\";\nexport * from \"./learning-credentials.js\";\nexport * from \"./learning-client.js\";\nexport * from \"./model-learning-policy.js\";\n", "import { LearningDomainError, LearningPolicyContentSchema, LearningSourceContentSchema, learningRef, sameLearningRef, sealLearningContent, type TaskDefinition, type LearningPolicy, type LearningRevisionRef } from \"@openpond/evals/learning\";\nimport { contentHash } from \"@openpond/harness\";\n\nimport type { HostedModelProjectSummary } from \"./model-projects.js\";\nimport { ModelInitialLearningSchema, type ModelInitialLearning } from \"./model-learning-intent.js\";\n\n/** Compile the simple creation choice into exact source and policy releases.\n * Hosts commit these with the new Model and its idempotency receipt. */\nexport function initialHostedModelLearning(input: { project: HostedModelProjectSummary; definition: TaskDefinition; learning: ModelInitialLearning }) {\n const learning = ModelInitialLearningSchema.parse(input.learning);\n const { project, definition } = input;\n if (!project.trainingSetup.rewardBindingRef || !sameLearningRef(definition.rewardBinding, project.trainingSetup.rewardBindingRef)) throw new LearningDomainError(\"learning_policy_binding_mismatch\", 422, \"The task format must use the Model's selected grader.\");\n const source = LearningSourceContentSchema.parse({ schemaVersion: \"openpond.learningSource.v1\", id: `model-source-${contentHash([project.portableProjectId, learningRef(definition)])}`,\n revision: 1, name: `${project.name} tasks`, kind: \"direct\", taskDefinition: learningRef(definition), enabled: true,\n allowedSplits: [\"train\", \"validation\", \"test\", \"frozen_eval\"], mapping: null, adapterVersion: null });\n const policy = createHostedLearningPolicyContent({ project, previous: null, policyId: `model-policy-${contentHash(project.portableProjectId)}`,\n applyModelConfiguration: true, sources: [learningRef(sealLearningContent(source))], taskDefinition: learningRef(definition),\n settings: { ...hostedLearningPolicyDefaults(project, null), enabled: true, scheduled: true,\n trigger: learning.mode === \"nightly\" ? { kind: \"nightly\", localTime: learning.localTime, timeZone: learning.timeZone } : { kind: \"approved_count\" },\n minimumApprovedExamples: learning.minimumTasks, maxBatchExamples: learning.minimumTasks,\n maxIterationSpendUsd: learning.maximumSpendUsd, maxDailySpendUsd: learning.maximumDailySpendUsd,\n cooldownSeconds: 0, maxBacklogExamples: Math.max(1_000, learning.minimumTasks * 10),\n } });\n return { source, policy };\n}\n\n/** Shared starting values for both Model clients. Existing policies retain\n * their exact limits; opening settings must never silently increase spending. */\nexport function hostedLearningPolicyDefaults(project: HostedModelProjectSummary, policy: LearningPolicy | null) {\n const maximumSpend = policy?.limits.maxIterationSpendUsd ?? project.trainingSetup.preferredMaximumSpendUsd ?? 1;\n return {\n enabled: policy?.enabled ?? false,\n scheduled: Boolean(policy && [\"schedule\", \"nightly\", \"approved_count\"].includes(policy.trigger.kind)),\n intervalSeconds: policy?.trigger.kind === \"schedule\" ? policy.trigger.intervalSeconds : 86_400,\n humanReviewRequired: policy?.admission.mode !== \"qualified_automatic\",\n minimumApprovedExamples: policy?.admission.minimumApprovedExamples ?? 10,\n maxBatchExamples: policy?.limits.maxBatchExamples ?? 10,\n maxIterationSpendUsd: maximumSpend,\n maxDailySpendUsd: policy?.limits.maxDailySpendUsd ?? maximumSpend,\n cooldownSeconds: policy?.limits.cooldownSeconds ?? 3_600,\n maxRetries: policy?.limits.maxRetries ?? 0,\n maxBacklogExamples: policy?.limits.maxBacklogExamples ?? 1_000,\n };\n}\n\nexport interface HostedLearningPolicySettings {\n enabled: boolean;\n scheduled: boolean;\n intervalSeconds: number;\n trigger?: Exclude<LearningPolicy[\"trigger\"], { kind: \"upstream_accepted\" }>;\n humanReviewRequired: boolean;\n minimumApprovedExamples: number;\n maxBatchExamples: number;\n maxIterationSpendUsd: number;\n maxDailySpendUsd: number;\n cooldownSeconds: number;\n maxRetries: number;\n maxBacklogExamples: number;\n}\n\n/** Compile reviewed settings without following mutable Model configuration\n * unless the caller explicitly chooses to apply it. Publication still owns\n * authorization, revision comparison and source/qualification validation. */\nexport function createHostedLearningPolicyContent(input: {\n project: HostedModelProjectSummary;\n previous: LearningPolicy | null;\n policyId: string;\n applyModelConfiguration: boolean;\n sources: LearningRevisionRef[];\n taskDefinition: LearningRevisionRef;\n settings: HostedLearningPolicySettings;\n}) {\n const { project, previous, settings } = input;\n if (previous && (previous.id !== input.policyId || previous.modelProjectId !== project.portableProjectId || previous.executionOwner !== \"hosted\")) {\n throw new LearningDomainError(\"learning_policy_model_mismatch\", 422, \"Learning settings must belong to this hosted Model.\");\n }\n const applyModel = input.applyModelConfiguration || !previous;\n const refs = applyModel ? hostedLearningPolicyReferences(project) : null;\n const method = applyModel ? project.trainingSetup.recipe?.method : previous?.training.method;\n const trigger = settings.trigger ?? (settings.scheduled ? { kind: \"schedule\" as const, intervalSeconds: settings.intervalSeconds } : { kind: \"manual\" as const });\n if (settings.enabled && method !== \"grpo\") {\n throw new LearningDomainError(\"learning_training_method_unsupported\", 422, \"Hosted continual learning currently supports GRPO.\");\n }\n return LearningPolicyContentSchema.parse({\n schemaVersion: \"openpond.learningPolicy.v1\", id: input.policyId, revision: (previous?.revision ?? 0) + 1,\n modelProjectId: project.portableProjectId, executionOwner: \"hosted\", enabled: settings.enabled,\n sources: input.sources, taskDefinition: input.taskDefinition,\n rewardBinding: applyModel ? project.trainingSetup.rewardBindingRef : previous?.rewardBinding,\n admission: { mode: settings.humanReviewRequired ? \"human\" : \"qualified_automatic\",\n qualification: settings.humanReviewRequired ? null : previous?.admission.qualification ?? null,\n minimumApprovedExamples: settings.minimumApprovedExamples },\n trigger,\n trainingParent: refs?.trainingParent ?? previous?.trainingParent,\n teacher: previous?.teacher ?? null,\n training: { method, recipe: refs?.recipe ?? previous?.training.recipe,\n retentionEvaluation: refs?.retentionEvaluation ?? previous?.training.retentionEvaluation,\n replayBatches: previous?.training.replayBatches ?? [] },\n limits: { maxIterationSpendUsd: settings.maxIterationSpendUsd, maxDailySpendUsd: settings.maxDailySpendUsd,\n cooldownSeconds: settings.cooldownSeconds, maxRetries: settings.maxRetries,\n maxBatchExamples: settings.maxBatchExamples, maxBacklogExamples: settings.maxBacklogExamples },\n automation: { collect: false, train: trigger.kind !== \"manual\", accept: false, serve: false },\n acceptance: previous?.acceptance ?? { minimumScore: 0, maximumRetentionRegression: 0, requireImprovement: true, rollbackVersion: null },\n });\n}\n\n/** Bind a reviewed hosted Model configuration before asynchronous preparation.\n * Keep the established recipe identity: its id binds the whole Model revision,\n * including Harness and retention selections, while its hash binds the recipe.\n * Callers must obtain the summary from the authenticated Model API. */\nexport function hostedLearningPolicyReferences(project: HostedModelProjectSummary) {\n const setup = project.trainingSetup;\n const base = setup.baseModel ?? project.defaultBaseModel;\n if (!setup.recipe || !base || !setup.evaluationTasksetRef) {\n throw new LearningDomainError(\"learning_model_configuration_incomplete\", 422,\n \"Select a training recipe, starting model and retained evaluation before enabling hosted learning.\");\n }\n return {\n recipe: { id: `model-recipe-${project.etag}`, contentHash: contentHash(setup.recipe) },\n trainingParent: { id: base.modelId, contentHash: contentHash(base) },\n retentionEvaluation: { id: setup.evaluationTasksetRef.id, contentHash: setup.evaluationTasksetRef.contentHash },\n };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,cAAc;;;ACDd,SAAS,qBAAqB,6BAA6B,6BAA6B,aAAa,iBAAiB,2BAA+F;AAQ9M,SAAS,2BAA2B,OAA2G;AACpJ,QAAM,WAAW,2BAA2B,MAAM,MAAM,QAAQ;AAChE,QAAM,EAAE,SAAS,WAAW,IAAI;AAChC,MAAI,CAAC,QAAQ,cAAc,oBAAoB,CAAC,gBAAgB,WAAW,eAAe,QAAQ,cAAc,gBAAgB,EAAG,OAAM,IAAI,oBAAoB,oCAAoC,KAAK,uDAAuD;AACjQ,QAAM,SAAS,4BAA4B,MAAM;AAAA,IAAE,eAAe;AAAA,IAA8B,IAAI,gBAA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AAAA,IACnE,qBAAqB,EAAE,IAAI,MAAM,qBAAqB,IAAI,aAAa,MAAM,qBAAqB,YAAY;AAAA,EAChH;AACF;",
6
- "names": []
3
+ "sources": ["../src/learning.ts", "../src/model-learning-policy.ts", "../src/grader-inspection.ts"],
4
+ "sourcesContent": ["export * from \"@openpond/evals/learning\";\nexport * from \"@openpond/evals/rewards\";\nexport * from \"./learning-credentials.js\";\nexport * from \"./learning-client.js\";\nexport * from \"./model-learning-policy.js\";\n\nexport * from \"./grader-inspection.js\";\n", "import { LearningDomainError, LearningPolicyContentSchema, LearningSourceContentSchema, learningRef, sameLearningRef, sealLearningContent, type TaskDefinition, type LearningPolicy, type LearningRevisionRef } from \"@openpond/evals/learning\";\nimport { contentHash } from \"@openpond/harness\";\n\nimport type { HostedModelProjectSummary } from \"./model-projects.js\";\nimport { ModelInitialLearningSchema, type ModelInitialLearning } from \"./model-learning-intent.js\";\n\n/** Compile the simple creation choice into exact source and policy releases.\n * Hosts commit these with the new Model and its idempotency receipt. */\nexport function initialHostedModelLearning(input: { project: HostedModelProjectSummary; definition: TaskDefinition; learning: ModelInitialLearning }) {\n const learning = ModelInitialLearningSchema.parse(input.learning);\n const { project, definition } = input;\n if (!project.trainingSetup.rewardBindingRef || !sameLearningRef(definition.rewardBinding, project.trainingSetup.rewardBindingRef)) throw new LearningDomainError(\"learning_policy_binding_mismatch\", 422, \"The task format must use the Model's selected grader.\");\n const source = LearningSourceContentSchema.parse({ schemaVersion: \"openpond.learningSource.v1\", id: `model-source-${contentHash([project.portableProjectId, learningRef(definition)])}`,\n revision: 1, name: `${project.name} tasks`, kind: \"direct\", taskDefinition: learningRef(definition), enabled: true,\n allowedSplits: [\"train\", \"validation\", \"test\", \"frozen_eval\"], mapping: null, adapterVersion: null });\n const policy = createHostedLearningPolicyContent({ project, previous: null, policyId: `model-policy-${contentHash(project.portableProjectId)}`,\n applyModelConfiguration: true, sources: [learningRef(sealLearningContent(source))], taskDefinition: learningRef(definition),\n settings: { ...hostedLearningPolicyDefaults(project, null), enabled: true, scheduled: true,\n trigger: learning.mode === \"nightly\" ? { kind: \"nightly\", localTime: learning.localTime, timeZone: learning.timeZone } : { kind: \"approved_count\" },\n minimumApprovedExamples: learning.minimumTasks, maxBatchExamples: learning.minimumTasks,\n maxIterationSpendUsd: learning.maximumSpendUsd, maxDailySpendUsd: learning.maximumDailySpendUsd,\n cooldownSeconds: 0, maxBacklogExamples: Math.max(1_000, learning.minimumTasks * 10),\n } });\n return { source, policy };\n}\n\n/** Shared starting values for both Model clients. Existing policies retain\n * their exact limits; opening settings must never silently increase spending. */\nexport function hostedLearningPolicyDefaults(project: HostedModelProjectSummary, policy: LearningPolicy | null) {\n const maximumSpend = policy?.limits.maxIterationSpendUsd ?? project.trainingSetup.preferredMaximumSpendUsd ?? 1;\n return {\n enabled: policy?.enabled ?? false,\n scheduled: Boolean(policy && [\"schedule\", \"nightly\", \"approved_count\"].includes(policy.trigger.kind)),\n intervalSeconds: policy?.trigger.kind === \"schedule\" ? policy.trigger.intervalSeconds : 86_400,\n humanReviewRequired: policy?.admission.mode !== \"qualified_automatic\",\n minimumApprovedExamples: policy?.admission.minimumApprovedExamples ?? 10,\n maxBatchExamples: policy?.limits.maxBatchExamples ?? 10,\n maxIterationSpendUsd: maximumSpend,\n maxDailySpendUsd: policy?.limits.maxDailySpendUsd ?? maximumSpend,\n cooldownSeconds: policy?.limits.cooldownSeconds ?? 3_600,\n maxRetries: policy?.limits.maxRetries ?? 0,\n maxBacklogExamples: policy?.limits.maxBacklogExamples ?? 1_000,\n };\n}\n\nexport interface HostedLearningPolicySettings {\n enabled: boolean;\n scheduled: boolean;\n intervalSeconds: number;\n trigger?: Exclude<LearningPolicy[\"trigger\"], { kind: \"upstream_accepted\" }>;\n humanReviewRequired: boolean;\n minimumApprovedExamples: number;\n maxBatchExamples: number;\n maxIterationSpendUsd: number;\n maxDailySpendUsd: number;\n cooldownSeconds: number;\n maxRetries: number;\n maxBacklogExamples: number;\n}\n\n/** Compile reviewed settings without following mutable Model configuration\n * unless the caller explicitly chooses to apply it. Publication still owns\n * authorization, revision comparison and source/qualification validation. */\nexport function createHostedLearningPolicyContent(input: {\n project: HostedModelProjectSummary;\n previous: LearningPolicy | null;\n policyId: string;\n applyModelConfiguration: boolean;\n sources: LearningRevisionRef[];\n taskDefinition: LearningRevisionRef;\n settings: HostedLearningPolicySettings;\n}) {\n const { project, previous, settings } = input;\n if (previous && (previous.id !== input.policyId || previous.modelProjectId !== project.portableProjectId || previous.executionOwner !== \"hosted\")) {\n throw new LearningDomainError(\"learning_policy_model_mismatch\", 422, \"Learning settings must belong to this hosted Model.\");\n }\n const applyModel = input.applyModelConfiguration || !previous;\n const refs = applyModel ? hostedLearningPolicyReferences(project) : null;\n const method = applyModel ? project.trainingSetup.recipe?.method : previous?.training.method;\n const trigger = settings.trigger ?? (settings.scheduled ? { kind: \"schedule\" as const, intervalSeconds: settings.intervalSeconds } : { kind: \"manual\" as const });\n if (settings.enabled && method !== \"grpo\") {\n throw new LearningDomainError(\"learning_training_method_unsupported\", 422, \"Hosted continual learning currently supports GRPO.\");\n }\n return LearningPolicyContentSchema.parse({\n schemaVersion: \"openpond.learningPolicy.v1\", id: input.policyId, revision: (previous?.revision ?? 0) + 1,\n modelProjectId: project.portableProjectId, executionOwner: \"hosted\", enabled: settings.enabled,\n sources: input.sources, taskDefinition: input.taskDefinition,\n rewardBinding: applyModel ? project.trainingSetup.rewardBindingRef : previous?.rewardBinding,\n admission: { mode: settings.humanReviewRequired ? \"human\" : \"qualified_automatic\",\n qualification: settings.humanReviewRequired ? null : previous?.admission.qualification ?? null,\n minimumApprovedExamples: settings.minimumApprovedExamples },\n trigger,\n trainingParent: refs?.trainingParent ?? previous?.trainingParent,\n teacher: previous?.teacher ?? null,\n training: { method, recipe: refs?.recipe ?? previous?.training.recipe,\n retentionEvaluation: refs?.retentionEvaluation ?? previous?.training.retentionEvaluation,\n replayBatches: previous?.training.replayBatches ?? [] },\n limits: { maxIterationSpendUsd: settings.maxIterationSpendUsd, maxDailySpendUsd: settings.maxDailySpendUsd,\n cooldownSeconds: settings.cooldownSeconds, maxRetries: settings.maxRetries,\n maxBatchExamples: settings.maxBatchExamples, maxBacklogExamples: settings.maxBacklogExamples },\n automation: { collect: false, train: trigger.kind !== \"manual\", accept: false, serve: false },\n acceptance: previous?.acceptance ?? { minimumScore: 0, maximumRetentionRegression: 0, requireImprovement: true, rollbackVersion: null },\n });\n}\n\n/** Bind a reviewed hosted Model configuration before asynchronous preparation.\n * Keep the established recipe identity: its id binds the whole Model revision,\n * including Harness and retention selections, while its hash binds the recipe.\n * Callers must obtain the summary from the authenticated Model API. */\nexport function hostedLearningPolicyReferences(project: HostedModelProjectSummary) {\n const setup = project.trainingSetup;\n const base = setup.baseModel ?? project.defaultBaseModel;\n if (!setup.recipe || !base || !setup.evaluationTasksetRef) {\n throw new LearningDomainError(\"learning_model_configuration_incomplete\", 422,\n \"Select a training recipe, starting model and retained evaluation before enabling hosted learning.\");\n }\n return {\n recipe: { id: `model-recipe-${project.etag}`, contentHash: contentHash(setup.recipe) },\n trainingParent: { id: base.modelId, contentHash: contentHash(base) },\n retentionEvaluation: { id: setup.evaluationTasksetRef.id, contentHash: setup.evaluationTasksetRef.contentHash },\n };\n}\n", "import { z } from \"zod\";\nimport { RewardReleaseSchema } from \"@openpond/evals/rewards\";\nconst Id = z.string().trim().min(1).max(240);\nexport const GraderCatalogQuerySchema = z.object({ projectId: Id.optional(), search: z.string().max(300).optional(), kind: z.string().max(100).optional(), sort: z.enum([\"name\", \"type\", \"version\", \"projects\", \"datasets\", \"runs\"]).optional(), direction: z.enum([\"asc\", \"desc\"]).optional(), after: z.string().max(3000).optional(), limit: z.number().int().min(1).max(100).default(30) }).strict();\nexport const GraderCatalogPageSchema = z.object({ teamId: Id, items: z.array(z.object({ reward: RewardReleaseSchema, projects: z.number().int().nonnegative(), datasets: z.number().int().nonnegative(), runs: z.number().int().nonnegative() }).strict()).max(100), nextCursor: z.string().nullable() }).strict();\nexport const GraderVersionsPageSchema = z.object({ teamId: Id, id: Id, items: z.array(RewardReleaseSchema).max(100), nextRevision: z.number().int().positive().nullable() }).strict();\nexport const GraderUsageQuerySchema = z.object({ section: z.enum([\"projects\", \"datasets\", \"runs\"]), after: Id.optional(), limit: z.number().int().min(1).max(100).default(25) }).strict();\nexport const GraderUsagePageSchema = z.object({ teamId: Id, id: Id, section: GraderUsageQuerySchema.shape.section, items: z.array(z.union([\n z.object({ id: Id, name: z.string(), graderRevisions: z.array(z.number().int().positive()), archived: z.boolean() }).strict(),\n z.object({ id: Id, name: z.string(), revision: z.number().int().positive(), graderRevisions: z.array(z.number().int().positive()) }).strict(),\n z.object({ id: Id, name: z.string(), status: z.string() }).strict(),\n])).max(100), nextCursor: Id.nullable() }).strict();\nexport class OpenPondGraderInspectionClient {\n private readonly baseUrl: string;\n constructor(private readonly options: { baseUrl: string; apiKey: string; teamId: string; fetch?: typeof fetch }) {\n const url = new URL(options.baseUrl);\n if (![\"http:\", \"https:\"].includes(url.protocol) || url.username || url.password || url.search || url.hash || !options.apiKey.trim() || !options.teamId.trim()) throw new Error(\"A clean API origin and workspace credentials are required.\");\n this.baseUrl = url.toString().replace(/\\/+$/, \"\");\n }\n async catalog(value: z.input<typeof GraderCatalogQuerySchema> = {}, signal?: AbortSignal) {\n const query = GraderCatalogQuerySchema.parse(value);\n const page = GraderCatalogPageSchema.parse(await this.read(\"\", query, signal));\n if (page.teamId !== this.options.teamId || page.items.length > query.limit || new Set(page.items.map(item => item.reward.id)).size !== page.items.length) throw new Error(\"Grader catalog differs from its requested workspace or bounds.\");\n return page;\n }\n async versions(id: string, query: { beforeRevision?: number; limit?: number } = {}, signal?: AbortSignal) {\n const options = z.object({ beforeRevision: z.number().int().positive().optional(), limit: z.number().int().min(1).max(100).default(25) }).strict().parse(query);\n const page = GraderVersionsPageSchema.parse(await this.read(`/${encodeURIComponent(Id.parse(id))}/versions`, options, signal));\n if (page.teamId !== this.options.teamId || page.id !== id || page.items.length > options.limit || page.items.some((item, index) => item.id !== id || options.beforeRevision && item.revision >= options.beforeRevision || index > 0 && item.revision >= page.items[index - 1]!.revision)) throw new Error(\"Grader versions differ from their requested identity or revision order.\");\n return page;\n }\n async usage(id: string, value: z.input<typeof GraderUsageQuerySchema>, signal?: AbortSignal) {\n const query = GraderUsageQuerySchema.parse(value);\n const page = GraderUsagePageSchema.parse(await this.read(`/${encodeURIComponent(Id.parse(id))}/usage`, query, signal));\n if (page.teamId !== this.options.teamId || page.id !== id || page.section !== query.section || page.items.length > query.limit) throw new Error(\"Grader usage differs from its requested workspace, identity or bounds.\");\n return page;\n }\n private async read(path: string, query: Record<string, unknown>, signal?: AbortSignal) {\n const params = new URLSearchParams(Object.entries(query).filter(([, value]) => value !== undefined).map(([key, value]) => [key, String(value)]));\n const response = await (this.options.fetch ?? fetch)(`${this.baseUrl}/v1/learning/read/graders${path}?${params}`, { signal, redirect: \"error\", headers: { Authorization: `Bearer ${this.options.apiKey}`, \"X-OpenPond-Team-Id\": this.options.teamId, Accept: \"application/json\" } });\n const value: unknown = await response.json();\n if (!response.ok) throw new Error(z.object({ error: z.string() }).parse(value).error);\n return value;\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,cAAc;;;ACDd,SAAS,qBAAqB,6BAA6B,6BAA6B,aAAa,iBAAiB,2BAA+F;AAQ9M,SAAS,2BAA2B,OAA2G;AACpJ,QAAM,WAAW,2BAA2B,MAAM,MAAM,QAAQ;AAChE,QAAM,EAAE,SAAS,WAAW,IAAI;AAChC,MAAI,CAAC,QAAQ,cAAc,oBAAoB,CAAC,gBAAgB,WAAW,eAAe,QAAQ,cAAc,gBAAgB,EAAG,OAAM,IAAI,oBAAoB,oCAAoC,KAAK,uDAAuD;AACjQ,QAAM,SAAS,4BAA4B,MAAM;AAAA,IAAE,eAAe;AAAA,IAA8B,IAAI,gBAAgB,YAAY,CAAC,QAAQ,mBAAmB,YAAY,UAAU,C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AuB,MAAM,KAAK;AAChD,UAAM,OAAO,sBAAsB,MAAM,MAAM,KAAK,KAAK,IAAI,mBAAmB,GAAG,MAAM,EAAE,CAAC,CAAC,UAAU,OAAO,MAAM,CAAC;AACrH,QAAI,KAAK,WAAW,KAAK,QAAQ,UAAU,KAAK,OAAO,MAAM,KAAK,YAAY,MAAM,WAAW,KAAK,MAAM,SAAS,MAAM,MAAO,OAAM,IAAI,MAAM,wEAAwE;AACxN,WAAO;AAAA,EACT;AAAA,EACA,MAAc,KAAK,MAAc,OAAgC,QAAsB;AACrF,UAAM,SAAS,IAAI,gBAAgB,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,EAAEA,MAAK,MAAMA,WAAU,MAAS,EAAE,IAAI,CAAC,CAAC,KAAKA,MAAK,MAAM,CAAC,KAAK,OAAOA,MAAK,CAAC,CAAC,CAAC;AAC/I,UAAM,WAAW,OAAO,KAAK,QAAQ,SAAS,OAAO,GAAG,KAAK,OAAO,4BAA4B,IAAI,IAAI,MAAM,IAAI,EAAE,QAAQ,UAAU,SAAS,SAAS,EAAE,eAAe,UAAU,KAAK,QAAQ,MAAM,IAAI,sBAAsB,KAAK,QAAQ,QAAQ,QAAQ,mBAAmB,EAAE,CAAC;AACnR,UAAM,QAAiB,MAAM,SAAS,KAAK;AAC3C,QAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,EAAE,KAAK;AACpF,WAAO;AAAA,EACT;AACF;",
6
+ "names": ["value"]
7
7
  }
@@ -23,7 +23,7 @@ import {
23
23
  prepareAuthoredTasksetSource,
24
24
  prepareModelTasksetDraft,
25
25
  publishModelTasksetDraftPackage
26
- } from "./chunk-DNBAJUVR.js";
26
+ } from "./chunk-6D4JIOOC.js";
27
27
  import {
28
28
  TasksetDraftSchema,
29
29
  configuredTasksetDraftFiles,
@@ -52,6 +52,7 @@ var TrainingProjectSchema = z.object({
52
52
  id: Id,
53
53
  teamId: Id,
54
54
  creatorUserId: Id,
55
+ ownerScope: z.enum(["workspace", "personal"]).optional(),
55
56
  revision: Revision,
56
57
  content: TrainingProjectContentSchema,
57
58
  archived: z.boolean(),
@@ -62,7 +63,8 @@ var TrainingProjectWriteSchema = z.object({
62
63
  operationId: Id,
63
64
  id: Id,
64
65
  expectedRevision: z.number().int().nonnegative(),
65
- content: TrainingProjectContentSchema
66
+ content: TrainingProjectContentSchema,
67
+ ownerScope: z.enum(["workspace", "personal"]).optional()
66
68
  }).strict();
67
69
  var TrainingProjectArchiveSchema = z.object({ operationId: Id, expectedRevision: Revision, archived: z.boolean() }).strict();
68
70
  var TrainingProjectListSchema = z.object({ teamId: Id, projects: z.array(TrainingProjectSchema).max(100), nextCursor: Id.nullable() }).strict();
@@ -103,6 +105,7 @@ var OpenPondTrainingProjectClient = class {
103
105
  const request = TrainingProjectWriteSchema.parse(input);
104
106
  const result = this.readback(await this.request(`/${encodeURIComponent(request.id)}`, "PUT", request, signal), request.id);
105
107
  if (result.revision !== request.expectedRevision + 1 || contentHash(result.content) !== contentHash(request.content)) throw new Error("Project write revision mismatch.");
108
+ if (request.ownerScope && result.ownerScope !== request.ownerScope) throw new Error("Project owner scope mismatch.");
106
109
  return result;
107
110
  }
108
111
  async archive(id, input, signal) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/training-project-contracts.ts", "../src/training-project-client.ts"],
4
- "sourcesContent": ["import { ProfileEvaluationRunSourceSchema } from \"@openpond/evals\";\nimport { z } from \"zod\";\nimport { ImmutableReleaseRefSchema, contentHash } from \"@openpond/harness\";\n\nconst Id = z.string().trim().min(1).max(240);\nconst Revision = z.number().int().positive();\nexport const TrainingResourceKindSchema = z.enum([\"dataset\", \"evaluator\", \"model\", \"training_configuration\", \"training_run\", \"harness\", \"environment\", \"experiment\", \"learning_policy\", \"deployment\"]);\nexport const TrainingResourceLinkSchema = z.object({\n kind: TrainingResourceKindSchema, resourceId: Id, release: ImmutableReleaseRefSchema.nullable(),\n role: z.enum([\"training\", \"validation\", \"holdout\", \"target\", \"reward\", \"evaluation\", \"serving\", \"source\"]),\n}).strict();\nexport const TrainingTargetSchema = z.discriminatedUnion(\"kind\", [\n z.object({ kind: z.literal(\"model\"), providerId: Id, modelId: Id, artifact: ImmutableReleaseRefSchema.nullable(),\n messages: z.array(z.object({ role: z.enum([\"system\", \"user\", \"assistant\"]), content: z.string().max(100_000) }).strict()).max(100) }).strict(),\n z.object({ kind: z.literal(\"harness\"), profileRepositoryId: Id, source: ProfileEvaluationRunSourceSchema }).strict(),\n z.object({ kind: z.literal(\"suite\"), profileRepositoryId: Id, suiteId: Id, sources: z.array(ProfileEvaluationRunSourceSchema).min(1).max(1_000) }).strict().superRefine((value, ctx) => {\n const first = value.sources[0]!;\n const identities = new Set<string>();\n for (const [index, source] of value.sources.entries()) {\n if (identities.has(source.definitionId)) ctx.addIssue({ code: \"custom\", path: [\"sources\", index], message: \"Suite definitions must be unique.\" });\n identities.add(source.definitionId);\n if (source.profileId !== first.profileId || source.sourceRevision !== first.sourceRevision || source.catalogHash !== first.catalogHash || contentHash(source.harnessRelease) !== contentHash(first.harnessRelease))\n ctx.addIssue({ code: \"custom\", path: [\"sources\", index], message: \"Suite checks must belong to the same pinned Profile source and Harness release.\" });\n }\n }),\n]);\nexport const TrainingProjectContentSchema = z.object({\n name: z.string().trim().min(1).max(200), description: z.string().max(10_000),\n targets: z.array(z.object({ id: Id, name: z.string().trim().min(1).max(200), target: TrainingTargetSchema }).strict()).max(100),\n defaultTargetId: Id.nullable(), resources: z.array(TrainingResourceLinkSchema).max(1_000),\n}).strict().superRefine((value, ctx) => {\n if (new Set(value.targets.map(t => t.id)).size !== value.targets.length) ctx.addIssue({ code: \"custom\", path: [\"targets\"], message: \"Target identities must be unique.\" });\n if (value.defaultTargetId && !value.targets.some(t => t.id === value.defaultTargetId)) ctx.addIssue({ code: \"custom\", path: [\"defaultTargetId\"], message: \"Default target must belong to this Project.\" });\n if (new Set(value.resources.map(r => contentHash(r))).size !== value.resources.length) ctx.addIssue({ code: \"custom\", path: [\"resources\"], message: \"Resource links must be unique.\" });\n});\nexport const TrainingProjectSchema = z.object({\n schemaVersion: z.literal(\"openpond.trainingProject.v1\"), id: Id, teamId: Id, creatorUserId: Id,\n revision: Revision, content: TrainingProjectContentSchema, archived: z.boolean(),\n createdAt: z.string().datetime(), updatedAt: z.string().datetime(),\n}).strict();\nexport const TrainingProjectWriteSchema = z.object({\n operationId: Id, id: Id, expectedRevision: z.number().int().nonnegative(), content: TrainingProjectContentSchema,\n}).strict();\nexport const TrainingProjectArchiveSchema = z.object({ operationId: Id, expectedRevision: Revision, archived: z.boolean() }).strict();\nexport const TrainingProjectListSchema = z.object({ teamId: Id, projects: z.array(TrainingProjectSchema).max(100), nextCursor: Id.nullable() }).strict();\nexport const TrainingOperationReadinessSchema = z.object({\n operation: z.enum([\"evaluate\", \"train\", \"enable_learning\", \"accept_candidate\", \"serve\"]),\n support: z.enum([\"supported\", \"unsupported\"]), state: z.enum([\"ready\", \"needs_setup\", \"blocked\"]),\n reasons: z.array(z.object({ code: Id, message: z.string().min(1).max(2_000), field: z.string().nullable(),\n action: z.enum([\"choose_target\", \"choose_data\", \"choose_evaluator\", \"configure_runtime\", \"request_access\", \"configure_budget\", \"wait\", \"review_evidence\"]).nullable() }).strict()).max(100),\n}).strict().superRefine((value, ctx) => {\n if (value.state === \"ready\" && (value.support !== \"supported\" || value.reasons.length)) ctx.addIssue({ code: \"custom\", message: \"Ready operations must be supported with no blockers.\" });\n if (value.state !== \"ready\" && !value.reasons.length) ctx.addIssue({ code: \"custom\", message: \"Unavailable operations must explain the next step.\" });\n});\nexport type TrainingProject = z.infer<typeof TrainingProjectSchema>;\nexport type TrainingProjectContent = z.infer<typeof TrainingProjectContentSchema>;\nexport type TrainingProjectWrite = z.infer<typeof TrainingProjectWriteSchema>;\nexport type TrainingResourceLink = z.infer<typeof TrainingResourceLinkSchema>;\nexport type TrainingTarget = z.infer<typeof TrainingTargetSchema>;\n", "import { contentHash } from \"@openpond/harness\";\nimport { TrainingProjectSchema, TrainingProjectWriteSchema, TrainingProjectArchiveSchema, TrainingProjectListSchema, type TrainingProjectWrite } from \"./training-project-contracts.js\";\n\nexport class OpenPondTrainingProjectClient {\n private readonly baseUrl: string;\n constructor(private readonly options: { baseUrl: string; apiKey: string; teamId: string; fetch?: typeof fetch }) {\n const url = new URL(options.baseUrl);\n if (![\"http:\", \"https:\"].includes(url.protocol) || url.username || url.password || url.search || url.hash || !options.apiKey.trim() || !options.teamId.trim()) throw new Error(\"A clean API origin and workspace credentials are required.\");\n this.baseUrl = url.toString().replace(/\\/+$/, \"\");\n }\n async list(options: { cursor?: string; signal?: AbortSignal } = {}) {\n const result = TrainingProjectListSchema.parse(await this.request(`?${new URLSearchParams(options.cursor ? { cursor: options.cursor } : {})}`, \"GET\", undefined, options.signal));\n if (result.teamId !== this.options.teamId || result.projects.some(p => p.teamId !== this.options.teamId)) throw new Error(\"Project list workspace mismatch.\");\n return result;\n }\n async get(id: string, signal?: AbortSignal) { return this.readback(await this.request(`/${encodeURIComponent(id)}`, \"GET\", undefined, signal), id); }\n async save(input: TrainingProjectWrite, signal?: AbortSignal) {\n const request = TrainingProjectWriteSchema.parse(input);\n const result = this.readback(await this.request(`/${encodeURIComponent(request.id)}`, \"PUT\", request, signal), request.id);\n if (result.revision !== request.expectedRevision + 1 || contentHash(result.content) !== contentHash(request.content)) throw new Error(\"Project write revision mismatch.\");\n return result;\n }\n async archive(id: string, input: { operationId: string; expectedRevision: number; archived: boolean }, signal?: AbortSignal) {\n const request = TrainingProjectArchiveSchema.parse(input);\n const result = this.readback(await this.request(`/${encodeURIComponent(id)}/archive`, \"POST\", request, signal), id);\n if (result.revision !== request.expectedRevision + 1 || result.archived !== request.archived) throw new Error(\"Project archive receipt mismatch.\");\n return result;\n }\n private readback(value: unknown, id: string) {\n const result = TrainingProjectSchema.parse(value);\n if (result.id !== id || result.teamId !== this.options.teamId) throw new Error(\"Project identity mismatch.\");\n return result;\n }\n private async request(path: string, method: string, body?: unknown, signal?: AbortSignal): Promise<unknown> {\n const response = await (this.options.fetch ?? fetch)(`${this.baseUrl}/v1/training-projects${path}`, {\n method, signal, redirect: \"error\", headers: { Authorization: `Bearer ${this.options.apiKey}`, \"X-OpenPond-Team-Id\": this.options.teamId, \"Content-Type\": \"application/json\" },\n ...(body === undefined ? {} : { body: JSON.stringify(body) }),\n });\n if (!response.ok) throw new Error(`Project request failed (${response.status}).`);\n return response.json();\n }\n}\n"],
5
- "mappings": ";;;;;;;AAAA,SAAS,wCAAwC;AACjD,SAAS,SAAS;AAGlB,IAAM,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAC3C,IAAM,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AACpC,IAAM,6BAA6B,EAAE,KAAK,CAAC,WAAW,aAAa,SAAS,0BAA0B,gBAAgB,WAAW,eAAe,cAAc,mBAAmB,YAAY,CAAC;AAC9L,IAAM,6BAA6B,EAAE,OAAO;AAAA,EACjD,MAAM;AAAA,EAA4B,YAAY;AAAA,EAAI,SAAS,0BAA0B,SAAS;AAAA,EAC9F,MAAM,EAAE,KAAK,CAAC,YAAY,cAAc,WAAW,UAAU,UAAU,cAAc,WAAW,QAAQ,CAAC;AAC3G,CAAC,EAAE,OAAO;AACH,IAAM,uBAAuB,EAAE,mBAAmB,QAAQ;AAAA,EAC/D,EAAE,OAAO;AAAA,IAAE,MAAM,EAAE,QAAQ,OAAO;AAAA,IAAG,YAAY;AAAA,IAAI,SAAS;AAAA,IAAI,UAAU,0BAA0B,SAAS;AAAA,IAC7G,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,UAAU,QAAQ,WAAW,CAAC,GAAG,SAAS,EAAE,OAAO,EAAE,IAAI,GAAO,EAAE,CAAC,EAAE,OAAO,CAAC,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,MAAM,KAAK,QAAQ,IAAI,mBAAmB,EAAE,CAAC,YAAY,QAAQ,SAAS,MAAM,GAAG,EAAE;AAClH,QAAI,OAAO,aAAa,QAAQ,mBAAmB,KAAK,OAAO,aAAa,QAAQ,SAAU,OAAM,IAAI,MAAM,mCAAmC;AACjJ,WAAO;AAAA,EACT;AAAA,EACQ,SAAS,OAAgB,IAAY;AAC3C,UAAM,SAAS,sBAAsB,MAAM,KAAK;AAChD,QAAI,OAAO,OAAO,MAAM,OAAO,WAAW,KAAK,QAAQ,OAAQ,OAAM,IAAI,MAAM,4BAA4B;AAC3G,WAAO;AAAA,EACT;AAAA,EACA,MAAc,QAAQ,MAAc,QAAgB,MAAgB,QAAwC;AAC1G,UAAM,WAAW,OAAO,KAAK,QAAQ,SAAS,OAAO,GAAG,KAAK,OAAO,wBAAwB,IAAI,IAAI;AAAA,MAClG;AAAA,MAAQ;AAAA,MAAQ,UAAU;AAAA,MAAS,SAAS,EAAE,eAAe,UAAU,KAAK,QAAQ,MAAM,IAAI,sBAAsB,KAAK,QAAQ,QAAQ,gBAAgB,mBAAmB;AAAA,MAC5K,GAAI,SAAS,SAAY,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,IAAI,EAAE;AAAA,IAC7D,CAAC;AACD,QAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,2BAA2B,SAAS,MAAM,IAAI;AAChF,WAAO,SAAS,KAAK;AAAA,EACvB;AACF;",
4
+ "sourcesContent": ["import { ProfileEvaluationRunSourceSchema } from \"@openpond/evals\";\nimport { z } from \"zod\";\nimport { ImmutableReleaseRefSchema, contentHash } from \"@openpond/harness\";\n\nconst Id = z.string().trim().min(1).max(240);\nconst Revision = z.number().int().positive();\nexport const TrainingResourceKindSchema = z.enum([\"dataset\", \"evaluator\", \"model\", \"training_configuration\", \"training_run\", \"harness\", \"environment\", \"experiment\", \"learning_policy\", \"deployment\"]);\nexport const TrainingResourceLinkSchema = z.object({\n kind: TrainingResourceKindSchema, resourceId: Id, release: ImmutableReleaseRefSchema.nullable(),\n role: z.enum([\"training\", \"validation\", \"holdout\", \"target\", \"reward\", \"evaluation\", \"serving\", \"source\"]),\n}).strict();\nexport const TrainingTargetSchema = z.discriminatedUnion(\"kind\", [\n z.object({ kind: z.literal(\"model\"), providerId: Id, modelId: Id, artifact: ImmutableReleaseRefSchema.nullable(),\n messages: z.array(z.object({ role: z.enum([\"system\", \"user\", \"assistant\"]), content: z.string().max(100_000) }).strict()).max(100) }).strict(),\n z.object({ kind: z.literal(\"harness\"), profileRepositoryId: Id, source: ProfileEvaluationRunSourceSchema }).strict(),\n z.object({ kind: z.literal(\"suite\"), profileRepositoryId: Id, suiteId: Id, sources: z.array(ProfileEvaluationRunSourceSchema).min(1).max(1_000) }).strict().superRefine((value, ctx) => {\n const first = value.sources[0]!;\n const identities = new Set<string>();\n for (const [index, source] of value.sources.entries()) {\n if (identities.has(source.definitionId)) ctx.addIssue({ code: \"custom\", path: [\"sources\", index], message: \"Suite definitions must be unique.\" });\n identities.add(source.definitionId);\n if (source.profileId !== first.profileId || source.sourceRevision !== first.sourceRevision || source.catalogHash !== first.catalogHash || contentHash(source.harnessRelease) !== contentHash(first.harnessRelease))\n ctx.addIssue({ code: \"custom\", path: [\"sources\", index], message: \"Suite checks must belong to the same pinned Profile source and Harness release.\" });\n }\n }),\n]);\nexport const TrainingProjectContentSchema = z.object({\n name: z.string().trim().min(1).max(200), description: z.string().max(10_000),\n targets: z.array(z.object({ id: Id, name: z.string().trim().min(1).max(200), target: TrainingTargetSchema }).strict()).max(100),\n defaultTargetId: Id.nullable(), resources: z.array(TrainingResourceLinkSchema).max(1_000),\n}).strict().superRefine((value, ctx) => {\n if (new Set(value.targets.map(t => t.id)).size !== value.targets.length) ctx.addIssue({ code: \"custom\", path: [\"targets\"], message: \"Target identities must be unique.\" });\n if (value.defaultTargetId && !value.targets.some(t => t.id === value.defaultTargetId)) ctx.addIssue({ code: \"custom\", path: [\"defaultTargetId\"], message: \"Default target must belong to this Project.\" });\n if (new Set(value.resources.map(r => contentHash(r))).size !== value.resources.length) ctx.addIssue({ code: \"custom\", path: [\"resources\"], message: \"Resource links must be unique.\" });\n});\nexport const TrainingProjectSchema = z.object({\n schemaVersion: z.literal(\"openpond.trainingProject.v1\"), id: Id, teamId: Id, creatorUserId: Id,\n ownerScope: z.enum([\"workspace\", \"personal\"]).optional(),\n revision: Revision, content: TrainingProjectContentSchema, archived: z.boolean(),\n createdAt: z.string().datetime(), updatedAt: z.string().datetime(),\n}).strict();\nexport const TrainingProjectWriteSchema = z.object({\n operationId: Id, id: Id, expectedRevision: z.number().int().nonnegative(), content: TrainingProjectContentSchema,\n ownerScope: z.enum([\"workspace\", \"personal\"]).optional(),\n}).strict();\nexport const TrainingProjectArchiveSchema = z.object({ operationId: Id, expectedRevision: Revision, archived: z.boolean() }).strict();\nexport const TrainingProjectListSchema = z.object({ teamId: Id, projects: z.array(TrainingProjectSchema).max(100), nextCursor: Id.nullable() }).strict();\nexport const TrainingOperationReadinessSchema = z.object({\n operation: z.enum([\"evaluate\", \"train\", \"enable_learning\", \"accept_candidate\", \"serve\"]),\n support: z.enum([\"supported\", \"unsupported\"]), state: z.enum([\"ready\", \"needs_setup\", \"blocked\"]),\n reasons: z.array(z.object({ code: Id, message: z.string().min(1).max(2_000), field: z.string().nullable(),\n action: z.enum([\"choose_target\", \"choose_data\", \"choose_evaluator\", \"configure_runtime\", \"request_access\", \"configure_budget\", \"wait\", \"review_evidence\"]).nullable() }).strict()).max(100),\n}).strict().superRefine((value, ctx) => {\n if (value.state === \"ready\" && (value.support !== \"supported\" || value.reasons.length)) ctx.addIssue({ code: \"custom\", message: \"Ready operations must be supported with no blockers.\" });\n if (value.state !== \"ready\" && !value.reasons.length) ctx.addIssue({ code: \"custom\", message: \"Unavailable operations must explain the next step.\" });\n});\nexport type TrainingProject = z.infer<typeof TrainingProjectSchema>;\nexport type TrainingProjectContent = z.infer<typeof TrainingProjectContentSchema>;\nexport type TrainingProjectWrite = z.infer<typeof TrainingProjectWriteSchema>;\nexport type TrainingResourceLink = z.infer<typeof TrainingResourceLinkSchema>;\nexport type TrainingTarget = z.infer<typeof TrainingTargetSchema>;\n", "import { contentHash } from \"@openpond/harness\";\nimport { TrainingProjectSchema, TrainingProjectWriteSchema, TrainingProjectArchiveSchema, TrainingProjectListSchema, type TrainingProjectWrite } from \"./training-project-contracts.js\";\n\nexport class OpenPondTrainingProjectClient {\n private readonly baseUrl: string;\n constructor(private readonly options: { baseUrl: string; apiKey: string; teamId: string; fetch?: typeof fetch }) {\n const url = new URL(options.baseUrl);\n if (![\"http:\", \"https:\"].includes(url.protocol) || url.username || url.password || url.search || url.hash || !options.apiKey.trim() || !options.teamId.trim()) throw new Error(\"A clean API origin and workspace credentials are required.\");\n this.baseUrl = url.toString().replace(/\\/+$/, \"\");\n }\n async list(options: { cursor?: string; signal?: AbortSignal } = {}) {\n const result = TrainingProjectListSchema.parse(await this.request(`?${new URLSearchParams(options.cursor ? { cursor: options.cursor } : {})}`, \"GET\", undefined, options.signal));\n if (result.teamId !== this.options.teamId || result.projects.some(p => p.teamId !== this.options.teamId)) throw new Error(\"Project list workspace mismatch.\");\n return result;\n }\n async get(id: string, signal?: AbortSignal) { return this.readback(await this.request(`/${encodeURIComponent(id)}`, \"GET\", undefined, signal), id); }\n async save(input: TrainingProjectWrite, signal?: AbortSignal) {\n const request = TrainingProjectWriteSchema.parse(input);\n const result = this.readback(await this.request(`/${encodeURIComponent(request.id)}`, \"PUT\", request, signal), request.id);\n if (result.revision !== request.expectedRevision + 1 || contentHash(result.content) !== contentHash(request.content)) throw new Error(\"Project write revision mismatch.\");\n if (request.ownerScope && result.ownerScope !== request.ownerScope) throw new Error(\"Project owner scope mismatch.\");\n return result;\n }\n async archive(id: string, input: { operationId: string; expectedRevision: number; archived: boolean }, signal?: AbortSignal) {\n const request = TrainingProjectArchiveSchema.parse(input);\n const result = this.readback(await this.request(`/${encodeURIComponent(id)}/archive`, \"POST\", request, signal), id);\n if (result.revision !== request.expectedRevision + 1 || result.archived !== request.archived) throw new Error(\"Project archive receipt mismatch.\");\n return result;\n }\n private readback(value: unknown, id: string) {\n const result = TrainingProjectSchema.parse(value);\n if (result.id !== id || result.teamId !== this.options.teamId) throw new Error(\"Project identity mismatch.\");\n return result;\n }\n private async request(path: string, method: string, body?: unknown, signal?: AbortSignal): Promise<unknown> {\n const response = await (this.options.fetch ?? fetch)(`${this.baseUrl}/v1/training-projects${path}`, {\n method, signal, redirect: \"error\", headers: { Authorization: `Bearer ${this.options.apiKey}`, \"X-OpenPond-Team-Id\": this.options.teamId, \"Content-Type\": \"application/json\" },\n ...(body === undefined ? {} : { body: JSON.stringify(body) }),\n });\n if (!response.ok) throw new Error(`Project request failed (${response.status}).`);\n return response.json();\n }\n}\n"],
5
+ "mappings": ";;;;;;;AAAA,SAAS,wCAAwC;AACjD,SAAS,SAAS;AAGlB,IAAM,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAC3C,IAAM,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AACpC,IAAM,6BAA6B,EAAE,KAAK,CAAC,WAAW,aAAa,SAAS,0BAA0B,gBAAgB,WAAW,eAAe,cAAc,mBAAmB,YAAY,CAAC;AAC9L,IAAM,6BAA6B,EAAE,OAAO;AAAA,EACjD,MAAM;AAAA,EAA4B,YAAY;AAAA,EAAI,SAAS,0BAA0B,SAAS;AAAA,EAC9F,MAAM,EAAE,KAAK,CAAC,YAAY,cAAc,WAAW,UAAU,UAAU,cAAc,WAAW,QAAQ,CAAC;AAC3G,CAAC,EAAE,OAAO;AACH,IAAM,uBAAuB,EAAE,mBAAmB,QAAQ;AAAA,EAC/D,EAAE,OAAO;AAAA,IAAE,MAAM,EAAE,QAAQ,OAAO;AAAA,IAAG,YAAY;AAAA,IAAI,SAAS;AAAA,IAAI,UAAU,0BAA0B,SAAS;AAAA,IAC7G,UAAU,EAAE,MAAM,EAAE,OAAO,EA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