openpond-sdk 0.8.2 → 0.9.0

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.
@@ -248,3 +248,18 @@ the Taskset and training bundle.
248
248
  `createTrainingClient().publishHarnessSource(sourcePackage)` publishes a verified, portable, policy-visible `@openpond/harness` source package to the authenticated workspace without starting a Job. `getHarnessSource({ id, contentHash })` retrieves and verifies that exact release. The endpoints are `PUT` and `GET /v1/training/harness-sources/:releaseId/:contentHash`; they use the existing Training media type and read/write scopes.
249
249
 
250
250
  Hosted learning resolves this immutable source with Desktop closed. Publish before selecting the release on a hosted Model. Preparation still checks the Taskset adapter, required tools, private grading boundary and effective context; publication is not training or quality qualification. Existing prepared Jobs retain their captured source when a newer release is published.
251
+
252
+ ## Project Profile source binding
253
+
254
+ SDK 0.9 requires `profileRepositoryId` on Training Project `harness` and `suite`
255
+ targets. This is the authorized hosted repository locator; `source.profileId`
256
+ is the Profile name inside that repository and must not be used as a repository
257
+ ID. Keep both identities through preparation and execution. Existing incomplete
258
+ Profile selections must be reselected explicitly; model targets are unchanged.
259
+
260
+ Suite sources must contain unique definitions from one exact Profile source,
261
+ catalog and Harness release. Their environment hashes may differ. A host must
262
+ resolve the repository under the caller's workspace/permissions, verify the
263
+ internal Profile ID and all selected immutable identities, and fail admission
264
+ when they no longer match. Project association does not grant repository access
265
+ or permission to execute a Profile's connected applications.
@@ -24,8 +24,17 @@ var TrainingTargetSchema = z.discriminatedUnion("kind", [
24
24
  artifact: ImmutableReleaseRefSchema.nullable(),
25
25
  messages: z.array(z.object({ role: z.enum(["system", "user", "assistant"]), content: z.string().max(1e5) }).strict()).max(100)
26
26
  }).strict(),
27
- z.object({ kind: z.literal("harness"), source: ProfileEvaluationRunSourceSchema }).strict(),
28
- z.object({ kind: z.literal("suite"), suiteId: Id, sources: z.array(ProfileEvaluationRunSourceSchema).min(1).max(1e3) }).strict()
27
+ z.object({ kind: z.literal("harness"), profileRepositoryId: Id, source: ProfileEvaluationRunSourceSchema }).strict(),
28
+ z.object({ kind: z.literal("suite"), profileRepositoryId: Id, suiteId: Id, sources: z.array(ProfileEvaluationRunSourceSchema).min(1).max(1e3) }).strict().superRefine((value, ctx) => {
29
+ const first = value.sources[0];
30
+ const identities = /* @__PURE__ */ new Set();
31
+ for (const [index, source] of value.sources.entries()) {
32
+ if (identities.has(source.definitionId)) ctx.addIssue({ code: "custom", path: ["sources", index], message: "Suite definitions must be unique." });
33
+ identities.add(source.definitionId);
34
+ if (source.profileId !== first.profileId || source.sourceRevision !== first.sourceRevision || source.catalogHash !== first.catalogHash || contentHash(source.harnessRelease) !== contentHash(first.harnessRelease))
35
+ ctx.addIssue({ code: "custom", path: ["sources", index], message: "Suite checks must belong to the same pinned Profile source and Harness release." });
36
+ }
37
+ })
29
38
  ]);
30
39
  var TrainingProjectContentSchema = z.object({
31
40
  name: z.string().trim().min(1).max(200),
@@ -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\"), source: ProfileEvaluationRunSourceSchema }).strict(),\n z.object({ kind: z.literal(\"suite\"), suiteId: Id, sources: z.array(ProfileEvaluationRunSourceSchema).min(1).max(1_000) }).strict(),\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,WA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AAS,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 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,EAAE,IA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AAK,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;",
6
6
  "names": []
7
7
  }
@@ -26,20 +26,10 @@ export declare class OpenPondTrainingProjectClient {
26
26
  id: string;
27
27
  name: string;
28
28
  target: {
29
- kind: "model";
30
- providerId: string;
31
- modelId: string;
32
- artifact: {
33
- id: string;
34
- contentHash: string;
35
- } | null;
36
- messages: {
37
- role: "user" | "system" | "assistant";
38
- content: string;
39
- }[];
40
- } | {
41
- kind: "harness";
42
- source: {
29
+ kind: "suite";
30
+ profileRepositoryId: string;
31
+ suiteId: string;
32
+ sources: {
43
33
  profileId: string;
44
34
  sourceRevision: string;
45
35
  harnessRelease: {
@@ -62,11 +52,23 @@ export declare class OpenPondTrainingProjectClient {
62
52
  actionId: string;
63
53
  };
64
54
  environmentHash: string;
65
- };
55
+ }[];
66
56
  } | {
67
- kind: "suite";
68
- suiteId: string;
69
- sources: {
57
+ kind: "model";
58
+ providerId: string;
59
+ modelId: string;
60
+ artifact: {
61
+ id: string;
62
+ contentHash: string;
63
+ } | null;
64
+ messages: {
65
+ role: "user" | "system" | "assistant";
66
+ content: string;
67
+ }[];
68
+ } | {
69
+ kind: "harness";
70
+ profileRepositoryId: string;
71
+ source: {
70
72
  profileId: string;
71
73
  sourceRevision: string;
72
74
  harnessRelease: {
@@ -89,7 +91,7 @@ export declare class OpenPondTrainingProjectClient {
89
91
  actionId: string;
90
92
  };
91
93
  environmentHash: string;
92
- }[];
94
+ };
93
95
  };
94
96
  }[];
95
97
  defaultTargetId: string | null;
@@ -122,20 +124,10 @@ export declare class OpenPondTrainingProjectClient {
122
124
  id: string;
123
125
  name: string;
124
126
  target: {
125
- kind: "model";
126
- providerId: string;
127
- modelId: string;
128
- artifact: {
129
- id: string;
130
- contentHash: string;
131
- } | null;
132
- messages: {
133
- role: "user" | "system" | "assistant";
134
- content: string;
135
- }[];
136
- } | {
137
- kind: "harness";
138
- source: {
127
+ kind: "suite";
128
+ profileRepositoryId: string;
129
+ suiteId: string;
130
+ sources: {
139
131
  profileId: string;
140
132
  sourceRevision: string;
141
133
  harnessRelease: {
@@ -158,11 +150,23 @@ export declare class OpenPondTrainingProjectClient {
158
150
  actionId: string;
159
151
  };
160
152
  environmentHash: string;
161
- };
153
+ }[];
162
154
  } | {
163
- kind: "suite";
164
- suiteId: string;
165
- sources: {
155
+ kind: "model";
156
+ providerId: string;
157
+ modelId: string;
158
+ artifact: {
159
+ id: string;
160
+ contentHash: string;
161
+ } | null;
162
+ messages: {
163
+ role: "user" | "system" | "assistant";
164
+ content: string;
165
+ }[];
166
+ } | {
167
+ kind: "harness";
168
+ profileRepositoryId: string;
169
+ source: {
166
170
  profileId: string;
167
171
  sourceRevision: string;
168
172
  harnessRelease: {
@@ -185,7 +189,7 @@ export declare class OpenPondTrainingProjectClient {
185
189
  actionId: string;
186
190
  };
187
191
  environmentHash: string;
188
- }[];
192
+ };
189
193
  };
190
194
  }[];
191
195
  defaultTargetId: string | null;
@@ -216,20 +220,10 @@ export declare class OpenPondTrainingProjectClient {
216
220
  id: string;
217
221
  name: string;
218
222
  target: {
219
- kind: "model";
220
- providerId: string;
221
- modelId: string;
222
- artifact: {
223
- id: string;
224
- contentHash: string;
225
- } | null;
226
- messages: {
227
- role: "user" | "system" | "assistant";
228
- content: string;
229
- }[];
230
- } | {
231
- kind: "harness";
232
- source: {
223
+ kind: "suite";
224
+ profileRepositoryId: string;
225
+ suiteId: string;
226
+ sources: {
233
227
  profileId: string;
234
228
  sourceRevision: string;
235
229
  harnessRelease: {
@@ -252,11 +246,23 @@ export declare class OpenPondTrainingProjectClient {
252
246
  actionId: string;
253
247
  };
254
248
  environmentHash: string;
255
- };
249
+ }[];
256
250
  } | {
257
- kind: "suite";
258
- suiteId: string;
259
- sources: {
251
+ kind: "model";
252
+ providerId: string;
253
+ modelId: string;
254
+ artifact: {
255
+ id: string;
256
+ contentHash: string;
257
+ } | null;
258
+ messages: {
259
+ role: "user" | "system" | "assistant";
260
+ content: string;
261
+ }[];
262
+ } | {
263
+ kind: "harness";
264
+ profileRepositoryId: string;
265
+ source: {
260
266
  profileId: string;
261
267
  sourceRevision: string;
262
268
  harnessRelease: {
@@ -279,7 +285,7 @@ export declare class OpenPondTrainingProjectClient {
279
285
  actionId: string;
280
286
  };
281
287
  environmentHash: string;
282
- }[];
288
+ };
283
289
  };
284
290
  }[];
285
291
  defaultTargetId: string | null;
@@ -314,20 +320,10 @@ export declare class OpenPondTrainingProjectClient {
314
320
  id: string;
315
321
  name: string;
316
322
  target: {
317
- kind: "model";
318
- providerId: string;
319
- modelId: string;
320
- artifact: {
321
- id: string;
322
- contentHash: string;
323
- } | null;
324
- messages: {
325
- role: "user" | "system" | "assistant";
326
- content: string;
327
- }[];
328
- } | {
329
- kind: "harness";
330
- source: {
323
+ kind: "suite";
324
+ profileRepositoryId: string;
325
+ suiteId: string;
326
+ sources: {
331
327
  profileId: string;
332
328
  sourceRevision: string;
333
329
  harnessRelease: {
@@ -350,11 +346,23 @@ export declare class OpenPondTrainingProjectClient {
350
346
  actionId: string;
351
347
  };
352
348
  environmentHash: string;
353
- };
349
+ }[];
354
350
  } | {
355
- kind: "suite";
356
- suiteId: string;
357
- sources: {
351
+ kind: "model";
352
+ providerId: string;
353
+ modelId: string;
354
+ artifact: {
355
+ id: string;
356
+ contentHash: string;
357
+ } | null;
358
+ messages: {
359
+ role: "user" | "system" | "assistant";
360
+ content: string;
361
+ }[];
362
+ } | {
363
+ kind: "harness";
364
+ profileRepositoryId: string;
365
+ source: {
358
366
  profileId: string;
359
367
  sourceRevision: string;
360
368
  harnessRelease: {
@@ -377,7 +385,7 @@ export declare class OpenPondTrainingProjectClient {
377
385
  actionId: string;
378
386
  };
379
387
  environmentHash: string;
380
- }[];
388
+ };
381
389
  };
382
390
  }[];
383
391
  defaultTargetId: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"training-project-client.d.ts","sourceRoot":"","sources":["../../../../../src/training-project-client.ts"],"names":[],"mappings":"AACA,OAAO,EAA8G,KAAK,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAExL,qBAAa,6BAA6B;IAE5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IADpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBACJ,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;KAAE;IAKzG,IAAI,CAAC,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,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;IAKzG,IAAI,CAAC,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK5D,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACpC,IAAI,CAAC,KAAK,EAAE,oBAAoB,EAAE,MAAM,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMtD,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,MAAM,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM3H,OAAO,CAAC,QAAQ;YAKF,OAAO;CAQtB"}
@@ -58,6 +58,7 @@ export declare const TrainingTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
58
58
  }, z.core.$strict>>;
59
59
  }, z.core.$strict>, z.ZodObject<{
60
60
  kind: z.ZodLiteral<"harness">;
61
+ profileRepositoryId: z.ZodString;
61
62
  source: z.ZodObject<{
62
63
  profileId: z.ZodString;
63
64
  sourceRevision: z.ZodString;
@@ -84,6 +85,7 @@ export declare const TrainingTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
84
85
  }, z.core.$strict>;
85
86
  }, z.core.$strict>, z.ZodObject<{
86
87
  kind: z.ZodLiteral<"suite">;
88
+ profileRepositoryId: z.ZodString;
87
89
  suiteId: z.ZodString;
88
90
  sources: z.ZodArray<z.ZodObject<{
89
91
  profileId: z.ZodString;
@@ -134,6 +136,7 @@ export declare const TrainingProjectContentSchema: z.ZodObject<{
134
136
  }, z.core.$strict>>;
135
137
  }, z.core.$strict>, z.ZodObject<{
136
138
  kind: z.ZodLiteral<"harness">;
139
+ profileRepositoryId: z.ZodString;
137
140
  source: z.ZodObject<{
138
141
  profileId: z.ZodString;
139
142
  sourceRevision: z.ZodString;
@@ -160,6 +163,7 @@ export declare const TrainingProjectContentSchema: z.ZodObject<{
160
163
  }, z.core.$strict>;
161
164
  }, z.core.$strict>, z.ZodObject<{
162
165
  kind: z.ZodLiteral<"suite">;
166
+ profileRepositoryId: z.ZodString;
163
167
  suiteId: z.ZodString;
164
168
  sources: z.ZodArray<z.ZodObject<{
165
169
  profileId: z.ZodString;
@@ -248,6 +252,7 @@ export declare const TrainingProjectSchema: z.ZodObject<{
248
252
  }, z.core.$strict>>;
249
253
  }, z.core.$strict>, z.ZodObject<{
250
254
  kind: z.ZodLiteral<"harness">;
255
+ profileRepositoryId: z.ZodString;
251
256
  source: z.ZodObject<{
252
257
  profileId: z.ZodString;
253
258
  sourceRevision: z.ZodString;
@@ -274,6 +279,7 @@ export declare const TrainingProjectSchema: z.ZodObject<{
274
279
  }, z.core.$strict>;
275
280
  }, z.core.$strict>, z.ZodObject<{
276
281
  kind: z.ZodLiteral<"suite">;
282
+ profileRepositoryId: z.ZodString;
277
283
  suiteId: z.ZodString;
278
284
  sources: z.ZodArray<z.ZodObject<{
279
285
  profileId: z.ZodString;
@@ -364,6 +370,7 @@ export declare const TrainingProjectWriteSchema: z.ZodObject<{
364
370
  }, z.core.$strict>>;
365
371
  }, z.core.$strict>, z.ZodObject<{
366
372
  kind: z.ZodLiteral<"harness">;
373
+ profileRepositoryId: z.ZodString;
367
374
  source: z.ZodObject<{
368
375
  profileId: z.ZodString;
369
376
  sourceRevision: z.ZodString;
@@ -390,6 +397,7 @@ export declare const TrainingProjectWriteSchema: z.ZodObject<{
390
397
  }, z.core.$strict>;
391
398
  }, z.core.$strict>, z.ZodObject<{
392
399
  kind: z.ZodLiteral<"suite">;
400
+ profileRepositoryId: z.ZodString;
393
401
  suiteId: z.ZodString;
394
402
  sources: z.ZodArray<z.ZodObject<{
395
403
  profileId: z.ZodString;
@@ -486,6 +494,7 @@ export declare const TrainingProjectListSchema: z.ZodObject<{
486
494
  }, z.core.$strict>>;
487
495
  }, z.core.$strict>, z.ZodObject<{
488
496
  kind: z.ZodLiteral<"harness">;
497
+ profileRepositoryId: z.ZodString;
489
498
  source: z.ZodObject<{
490
499
  profileId: z.ZodString;
491
500
  sourceRevision: z.ZodString;
@@ -512,6 +521,7 @@ export declare const TrainingProjectListSchema: z.ZodObject<{
512
521
  }, z.core.$strict>;
513
522
  }, z.core.$strict>, z.ZodObject<{
514
523
  kind: z.ZodLiteral<"suite">;
524
+ profileRepositoryId: z.ZodString;
515
525
  suiteId: z.ZodString;
516
526
  sources: z.ZodArray<z.ZodObject<{
517
527
  profileId: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"training-project-contracts.d.ts","sourceRoot":"","sources":["../../../../../src/training-project-contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;EAA+J,CAAC;AACvM,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAG5B,CAAC;AACZ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAK/B,CAAC;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;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OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openpond-sdk",
3
- "version": "0.8.2",
3
+ "version": "0.9.0",
4
4
  "description": "Server-side TypeScript SDK for OpenPond sandboxes and agentic work",
5
5
  "license": "MIT",
6
6
  "type": "module",