openpond-sdk 0.5.10 → 0.5.12
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/dist/{chunk-TKJU3BOW.js → chunk-5M3PPP7D.js} +9 -1
- package/dist/chunk-5M3PPP7D.js.map +7 -0
- package/dist/index.js +1 -1
- package/dist/learning.js +1 -1
- package/dist/types/packages/sdk/src/learning-client.d.ts +40 -0
- package/dist/types/packages/sdk/src/learning-client.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/taskset-authored-contracts.d.ts +10 -10
- package/dist/types/packages/sdk/src/taskset-authored-files.d.ts +10 -10
- package/dist/types/packages/sdk/src/taskset-draft-api-contracts.d.ts +20 -20
- package/dist/types/packages/sdk/src/taskset-draft-client.d.ts +50 -50
- package/dist/types/packages/sdk/src/taskset-draft-core.d.ts +12 -12
- package/dist/types/packages/sdk/src/taskset-draft-dataset-sources.d.ts +16 -16
- package/dist/types/packages/sdk/src/taskset-draft-document.d.ts +10 -10
- package/dist/types/packages/sdk/src/taskset-draft-source.d.ts +20 -20
- package/dist/types/packages/sdk/src/taskset-draft-workspace.d.ts +20 -20
- package/dist/types/packages/sdk/src/taskset-package-projection.d.ts +10 -10
- package/dist/types/packages/sdk/src/training-learning-batch.d.ts +20 -20
- package/package.json +2 -2
- package/dist/chunk-TKJU3BOW.js.map +0 -7
|
@@ -59,6 +59,7 @@ import {
|
|
|
59
59
|
LearningReadRequestSchema,
|
|
60
60
|
TaskEvidenceInspectionResultSchema,
|
|
61
61
|
sameLearningRef,
|
|
62
|
+
LearningPolicyInspectionResultSchema,
|
|
62
63
|
assertLearningRequestJson,
|
|
63
64
|
learningResourceSchemas
|
|
64
65
|
} from "@openpond/evals/learning";
|
|
@@ -118,6 +119,13 @@ var OpenPondLearningClient = class {
|
|
|
118
119
|
if (!sameLearningRef(result.evidence, evidence)) throw new OpenPondLearningError(502, "evidence_identity_mismatch", "Inspection did not match the requested evidence release.", null);
|
|
119
120
|
return result;
|
|
120
121
|
}
|
|
122
|
+
/** Read current shared eligibility and budget without reserving or launching work. */
|
|
123
|
+
async inspectPolicy(policy, options = {}) {
|
|
124
|
+
const request = LearningReadRequestSchema.parse({ action: "inspect_policy", scope: this.#options.scope, policy });
|
|
125
|
+
const result = LearningPolicyInspectionResultSchema.parse(await this.#request("read", request, options));
|
|
126
|
+
if (!sameLearningRef(result.policy, policy)) throw new OpenPondLearningError(502, "policy_identity_mismatch", "Inspection did not match the requested policy release.", null);
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
121
129
|
/** Prepare once with createSourceCredentialRequest and reuse it for retries. */
|
|
122
130
|
async createSourceCredential(input, options = {}) {
|
|
123
131
|
const request = LearningSourceCredentialRequestSchema.parse({ ...input, action: "create", scope: this.#options.scope });
|
|
@@ -217,4 +225,4 @@ export {
|
|
|
217
225
|
OpenPondLearningError,
|
|
218
226
|
OpenPondLearningClient
|
|
219
227
|
};
|
|
220
|
-
//# sourceMappingURL=chunk-
|
|
228
|
+
//# sourceMappingURL=chunk-5M3PPP7D.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/learning-credentials.ts", "../src/learning-client.ts"],
|
|
4
|
+
"sourcesContent": ["import { z } from \"zod\";\nimport { ReleaseIdSchema } from \"@openpond/harness\";\nimport { LearningRevisionRefSchema } from \"@openpond/evals/learning\";\nimport { TaskSplitSchema } from \"@openpond/evals/tasksets\";\n\n/** Source credentials can submit evidence and feedback for one source only. */\nexport const LearningSourceCredentialSchema = z.object({\n id: ReleaseIdSchema,\n scope: ReleaseIdSchema,\n sourceId: ReleaseIdSchema,\n name: z.string().trim().min(1).max(100),\n keyPrefix: z.string().min(1).max(100),\n createdAt: z.iso.datetime(),\n expiresAt: z.iso.datetime(),\n revokedAt: z.iso.datetime().nullable(),\n}).strict();\nexport type LearningSourceCredential = z.infer<typeof LearningSourceCredentialSchema>;\nexport const LearningSourceCredentialSecretSchema = z.string().regex(/^opk_key_[A-Za-z0-9]{16}_[A-Za-z0-9]{48}$/);\n\nexport const LearningSourceCredentialRequestSchema = z.discriminatedUnion(\"action\", [\n z.object({ action: z.literal(\"create\"), scope: ReleaseIdSchema, sourceId: ReleaseIdSchema, name: z.string().trim().min(1).max(100), expiresAt: z.iso.datetime(), operationId: ReleaseIdSchema, apiKey: LearningSourceCredentialSecretSchema }).strict(),\n z.object({ action: z.literal(\"list\"), scope: ReleaseIdSchema, sourceId: ReleaseIdSchema, afterId: ReleaseIdSchema.optional(), limit: z.number().int().min(1).max(100).default(30) }).strict(),\n z.object({ action: z.literal(\"revoke\"), scope: ReleaseIdSchema, sourceId: ReleaseIdSchema, id: ReleaseIdSchema }).strict(),\n]);\nexport type LearningSourceCredentialRequest = z.infer<typeof LearningSourceCredentialRequestSchema>;\nexport const LearningSourceCredentialCreatedSchema = z.object({ credential: LearningSourceCredentialSchema, apiKey: LearningSourceCredentialSecretSchema }).strict();\nexport const LearningSourceCredentialPageSchema = z.object({ items: z.array(LearningSourceCredentialSchema).max(100), nextCursor: ReleaseIdSchema.nullable() }).strict();\nexport const LearningSourceConfigurationRequestSchema = z.object({ scope: ReleaseIdSchema, sourceId: ReleaseIdSchema }).strict();\nexport const LearningSourceConfigurationSchema = z.object({\n scope: ReleaseIdSchema, source: LearningRevisionRefSchema, taskDefinition: LearningRevisionRefSchema,\n enabled: z.boolean(), allowedSplits: z.array(TaskSplitSchema).min(1).max(4),\n}).strict();\n\n/** Keep this request in memory for retries. Hosts persist hashes, never its secret. */\nexport function createSourceCredentialRequest(input: { sourceId: string; name: string; expiresAt: string }) {\n return { ...input, operationId: crypto.randomUUID(), apiKey: `opk_key_${randomToken(16)}_${randomToken(48)}` };\n}\n\nfunction randomToken(length: number): string {\n const alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n let value = \"\";\n while (value.length < length) {\n for (const byte of crypto.getRandomValues(new Uint8Array(64))) {\n // Rejection sampling avoids modulo bias in the 62-character alphabet.\n if (byte < 248) value += alphabet[byte % 62];\n if (value.length === length) return value;\n }\n }\n return value;\n}\n\n/** Hosts enforce expiry when issuing and authenticating; tokens are never permanent. */\nexport function assertLearningCredentialExpiry(expiresAt: string, now: Date): void {\n const expires = Date.parse(z.iso.datetime().parse(expiresAt));\n if (expires <= now.getTime() || expires > now.getTime() + 90 * 24 * 60 * 60 * 1_000) throw new Error(\"Source credentials must expire within 90 days.\");\n}\n", "import { z } from \"zod\";\nimport {\n LearningCommandRequestSchema, LearningOperationResultSchema, LearningReadRequestSchema,\n TaskEvidenceInspectionResultSchema, sameLearningRef, type LearningRevisionRef,\n LearningPolicyInspectionResultSchema,\n assertLearningRequestJson,\n learningResourceSchemas, type LearningCommand, type LearningOperationResult,\n type LearningResourceFor, type LearningResourceKind, type LearningResourcePage,\n type LearningResourceQuery, type TaskExampleSubmission, type TaskFeedbackSubmission,\n} from \"@openpond/evals/learning\";\nimport { assertBoundedTaskJson } from \"@openpond/evals/task-schema\";\nimport { LearningSourceCredentialSchema, LearningSourceCredentialRequestSchema, LearningSourceCredentialCreatedSchema, LearningSourceCredentialPageSchema, LearningSourceConfigurationRequestSchema, LearningSourceConfigurationSchema, type LearningSourceCredentialRequest } from \"./learning-credentials.js\";\n\nexport interface OpenPondLearningClientOptions {\n apiKey: string;\n baseUrl: string;\n /** Local profile or hosted team scope. The server checks the credential's ownership. */\n scope: string;\n fetch?: typeof globalThis.fetch;\n}\nexport interface LearningRequestOptions { signal?: AbortSignal }\nexport const LearningBatchPublicationSchema = z.object({\n batchId: z.string().trim().min(1).max(500), modelProjectId: z.string().trim().min(1).max(500),\n}).strict();\nexport const LearningBatchPublicationResultSchema = z.object({\n batchId: z.string().min(1), projectId: z.string().min(1), tasksetId: z.string().min(1),\n releaseId: z.string().min(1), revision: z.number().int().positive(), contentHash: z.string().regex(/^[a-f0-9]{64}$/),\n}).strict();\nexport class OpenPondLearningError extends Error {\n constructor(readonly status: number, readonly code: string, message: string, readonly details: unknown) {\n super(message);\n this.name = \"OpenPondLearningError\";\n }\n}\n\n/** The same portable commands are sent to the local and hosted execution owner. */\nexport class OpenPondLearningClient {\n readonly #options: OpenPondLearningClientOptions;\n constructor(options: OpenPondLearningClientOptions) {\n if (!options.apiKey.trim() || !options.scope.trim()) throw new Error(\"Learning API key and scope are required.\");\n const url = new URL(options.baseUrl);\n if (![\"http:\", \"https:\"].includes(url.protocol) || url.username || url.password || url.search || url.hash) throw new Error(\"Learning base URL must be an HTTP(S) endpoint without credentials, query, or fragment.\");\n this.#options = { ...options, baseUrl: url.toString().replace(/\\/+$/, \"\") };\n }\n\n async command(command: LearningCommand, options: LearningRequestOptions = {}): Promise<LearningOperationResult> {\n assertLearningRequestJson(command);\n const request = LearningCommandRequestSchema.parse({ scope: this.#options.scope, command });\n const result = LearningOperationResultSchema.parse(await this.#request(\"commands\", request, options));\n if (result.operationId !== command.operationId) throw new OpenPondLearningError(502, \"operation_identity_mismatch\", \"Learning response did not match the submitted operation.\", null);\n return result;\n }\n\n submitExample(example: TaskExampleSubmission, options: LearningRequestOptions = {}) {\n return this.command({ action: \"submit_example\", operationId: example.idempotencyKey, example }, options);\n }\n\n submitFeedback(feedback: TaskFeedbackSubmission, options: LearningRequestOptions = {}) {\n return this.command({ action: \"submit_feedback\", operationId: feedback.idempotencyKey, feedback }, options);\n }\n\n async get<K extends LearningResourceKind>(kind: K, id: string, revision?: number, options: LearningRequestOptions = {}): Promise<LearningResourceFor<K>> {\n const request = LearningReadRequestSchema.parse({ action: \"get\", scope: this.#options.scope, kind, id, ...(revision === undefined ? {} : { revision }) });\n return learningResourceSchemas[kind].parse(await this.#request(\"read\", request, options)) as LearningResourceFor<K>;\n }\n\n async inspectEvidence(evidence: LearningRevisionRef, options: LearningRequestOptions = {}) {\n const request = LearningReadRequestSchema.parse({ action: \"inspect_evidence\", scope: this.#options.scope, evidence });\n const result = TaskEvidenceInspectionResultSchema.parse(await this.#request(\"read\", request, options));\n if (!sameLearningRef(result.evidence, evidence)) throw new OpenPondLearningError(502, \"evidence_identity_mismatch\", \"Inspection did not match the requested evidence release.\", null);\n return result;\n }\n\n /** Read current shared eligibility and budget without reserving or launching work. */\n async inspectPolicy(policy: LearningRevisionRef, options: LearningRequestOptions = {}) {\n const request = LearningReadRequestSchema.parse({ action: \"inspect_policy\", scope: this.#options.scope, policy });\n const result = LearningPolicyInspectionResultSchema.parse(await this.#request(\"read\", request, options));\n if (!sameLearningRef(result.policy, policy)) throw new OpenPondLearningError(502, \"policy_identity_mismatch\", \"Inspection did not match the requested policy release.\", null);\n return result;\n }\n\n /** Prepare once with createSourceCredentialRequest and reuse it for retries. */\n async createSourceCredential(input: Omit<Extract<LearningSourceCredentialRequest, { action: \"create\" }>, \"action\" | \"scope\">, options: LearningRequestOptions = {}) {\n const request = LearningSourceCredentialRequestSchema.parse({ ...input, action: \"create\", scope: this.#options.scope });\n const result = LearningSourceCredentialCreatedSchema.parse(await this.#request(\"credentials\", request, options));\n this.#assertCredentialScope(result.credential, input.sourceId);\n if (result.apiKey !== input.apiKey || !input.apiKey.startsWith(`${result.credential.keyPrefix}_`)) throw new OpenPondLearningError(502, \"credential_identity_mismatch\", \"Credential response did not match the prepared credential.\", null);\n return result;\n }\n\n async listSourceCredentials(sourceId: string, query: { afterId?: string; limit?: number } = {}, options: LearningRequestOptions = {}) {\n const request = LearningSourceCredentialRequestSchema.parse({ ...query, action: \"list\", scope: this.#options.scope, sourceId });\n const result = LearningSourceCredentialPageSchema.parse(await this.#request(\"credentials\", request, options));\n if (result.items.length > (query.limit ?? 30)) throw new OpenPondLearningError(502, \"credential_page_invalid\", \"Credential response exceeded the requested page size.\", null);\n for (const item of result.items) this.#assertCredentialScope(item, sourceId);\n return result;\n }\n\n async revokeSourceCredential(sourceId: string, id: string, options: LearningRequestOptions = {}) {\n const request = LearningSourceCredentialRequestSchema.parse({ action: \"revoke\", scope: this.#options.scope, sourceId, id });\n const result = LearningSourceCredentialSchema.parse(await this.#request(\"credentials\", request, options));\n this.#assertCredentialScope(result, sourceId);\n if (result.id !== id || result.revokedAt === null) throw new OpenPondLearningError(502, \"credential_revocation_mismatch\", \"Credential revocation did not match the requested credential.\", null);\n return result;\n }\n\n async sourceConfiguration(sourceId: string, options: LearningRequestOptions = {}) {\n const request = LearningSourceConfigurationRequestSchema.parse({ scope: this.#options.scope, sourceId });\n const result = LearningSourceConfigurationSchema.parse(await this.#request(\"source-config\", request, options));\n if (result.scope !== this.#options.scope || result.source.id !== sourceId) throw new OpenPondLearningError(502, \"source_identity_mismatch\", \"Source configuration did not match the requested source.\", null);\n return result;\n }\n\n #assertCredentialScope(value: { scope: string; sourceId: string }, sourceId: string) {\n if (value.scope !== this.#options.scope || value.sourceId !== sourceId) throw new OpenPondLearningError(502, \"credential_scope_mismatch\", \"Credential response did not match the requested source.\", null);\n }\n\n async list<K extends LearningResourceKind>(kind: K, query: Partial<LearningResourceQuery> = {}, options: LearningRequestOptions = {}): Promise<LearningResourcePage<K>> {\n const request = LearningReadRequestSchema.parse({ action: \"list\", scope: this.#options.scope, kind, ...query });\n return z.object({ items: z.array(learningResourceSchemas[kind]).max(100), nextCursor: z.string().nullable() }).strict().parse(await this.#request(\"read\", request, options)) as LearningResourcePage<K>;\n }\n\n /** Hosted publication only: stores an immutable package and attaches it, without starting training. */\n async publishBatch(input: z.infer<typeof LearningBatchPublicationSchema>, options: LearningRequestOptions = {}) {\n const request = LearningBatchPublicationSchema.parse(input);\n const result = LearningBatchPublicationResultSchema.parse(await this.#request(\"publish-batch\", { ...request, scope: this.#options.scope }, options));\n if (result.batchId !== request.batchId) throw new OpenPondLearningError(502, \"batch_identity_mismatch\", \"Published batch response did not match the requested batch.\", null);\n return result;\n }\n\n async #request(endpoint: \"commands\" | \"read\" | \"publish-batch\" | \"credentials\" | \"source-config\", body: unknown, options: LearningRequestOptions): Promise<unknown> {\n assertBoundedTaskJson(body, 16_777_216);\n const response = await (this.#options.fetch ?? globalThis.fetch)(`${this.#options.baseUrl}/v1/learning/${endpoint}`, {\n method: \"POST\", headers: { Authorization: `Bearer ${this.#options.apiKey}`, \"Content-Type\": \"application/json\", Accept: \"application/json\", \"X-OpenPond-Team-Id\": this.#options.scope }, body: JSON.stringify(body), signal: options.signal,\n redirect: \"error\",\n });\n const payload = await readBoundedLearningResponse(response);\n if (!response.ok) {\n const error = z.object({ code: z.string().optional(), error: z.string().optional() }).passthrough().safeParse(payload);\n throw new OpenPondLearningError(response.status, error.success ? error.data.code ?? \"learning_request_failed\" : \"learning_request_failed\", error.success ? error.data.error ?? `Learning request failed (${response.status}).` : `Learning request failed (${response.status}).`, payload);\n }\n return payload;\n }\n}\n\nasync function readBoundedLearningResponse(response: Response): Promise<unknown> {\n const maximumBytes = 16_777_216;\n const reader = response.body?.getReader();\n if (!reader) throw new OpenPondLearningError(response.status, \"empty_response\", \"Learning response was empty.\", null);\n const decoder = new TextDecoder();\n let bytes = 0;\n let text = \"\";\n try {\n while (true) {\n const next = await reader.read();\n if (next.done) break;\n bytes += next.value.byteLength;\n if (bytes > maximumBytes) throw new OpenPondLearningError(response.status, \"response_too_large\", \"Learning response exceeded 16 MiB; request a smaller page.\", null);\n text += decoder.decode(next.value, { stream: true });\n }\n text += decoder.decode();\n const value: unknown = JSON.parse(text);\n assertBoundedTaskJson(value, maximumBytes);\n return value;\n } finally {\n await reader.cancel();\n reader.releaseLock();\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA,SAAS,SAAS;AAElB,SAAS,iCAAiC;AAC1C,SAAS,uBAAuB;AAGzB,IAAM,iCAAiC,EAAE,OAAO;AAAA,EACrD,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,UAAU;AAAA,EACV,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EACtC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EACpC,WAAW,EAAE,IAAI,SAAS;AAAA,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OAAO,MAAM,OAAO,KAAK;AAC/B,UAAI,KAAK,KAAM;AACf,eAAS,KAAK,MAAM;AACpB,UAAI,QAAQ,aAAc,OAAM,IAAI,sBAAsB,SAAS,QAAQ,sBAAsB,8DAA8D,IAAI;AACnK,cAAQ,QAAQ,OAAO,KAAK,OAAO,EAAE,QAAQ,KAAK,CAAC;AAAA,IACrD;AACA,YAAQ,QAAQ,OAAO;AACvB,UAAM,QAAiB,KAAK,MAAM,IAAI;AACtC,0BAAsB,OAAO,YAAY;AACzC,WAAO;AAAA,EACT,UAAE;AACA,UAAM,OAAO,OAAO;AACpB,WAAO,YAAY;AAAA,EACrB;AACF;",
|
|
6
|
+
"names": ["z", "z"]
|
|
7
|
+
}
|
package/dist/index.js
CHANGED
package/dist/learning.js
CHANGED
|
@@ -59,6 +59,46 @@ export declare class OpenPondLearningClient {
|
|
|
59
59
|
}[];
|
|
60
60
|
};
|
|
61
61
|
}>;
|
|
62
|
+
/** Read current shared eligibility and budget without reserving or launching work. */
|
|
63
|
+
inspectPolicy(policy: LearningRevisionRef, options?: LearningRequestOptions): Promise<{
|
|
64
|
+
policy: {
|
|
65
|
+
id: string;
|
|
66
|
+
contentHash: string;
|
|
67
|
+
revision: number;
|
|
68
|
+
};
|
|
69
|
+
modelProjectId: string;
|
|
70
|
+
inspectedAt: string;
|
|
71
|
+
chain: {
|
|
72
|
+
schemaVersion: "openpond.learningChain.v1";
|
|
73
|
+
id: string;
|
|
74
|
+
revision: number;
|
|
75
|
+
modelProjectId: string;
|
|
76
|
+
activeIterationId: string | null;
|
|
77
|
+
latestIterationId: string;
|
|
78
|
+
lastReservedAt: string | null;
|
|
79
|
+
updatedAt: string;
|
|
80
|
+
} | null;
|
|
81
|
+
counts: {
|
|
82
|
+
eligible: number;
|
|
83
|
+
awaitingReview: number;
|
|
84
|
+
excluded: number;
|
|
85
|
+
consumed: number;
|
|
86
|
+
} | null;
|
|
87
|
+
minimumApprovedExamples: number;
|
|
88
|
+
canReserve: boolean;
|
|
89
|
+
blockers: {
|
|
90
|
+
code: string;
|
|
91
|
+
message: string;
|
|
92
|
+
}[];
|
|
93
|
+
cooldownUntil: string | null;
|
|
94
|
+
budget: {
|
|
95
|
+
reservedSpendUsd: number;
|
|
96
|
+
settledSpendUsd: number;
|
|
97
|
+
committedSpendUsd: number;
|
|
98
|
+
maximumIterationSpendUsd: number;
|
|
99
|
+
maximumDailySpendUsd: number;
|
|
100
|
+
};
|
|
101
|
+
}>;
|
|
62
102
|
/** Prepare once with createSourceCredentialRequest and reuse it for retries. */
|
|
63
103
|
createSourceCredential(input: Omit<Extract<LearningSourceCredentialRequest, {
|
|
64
104
|
action: "create";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"learning-client.d.ts","sourceRoot":"","sources":["../../../../../src/learning-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEgD,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"learning-client.d.ts","sourceRoot":"","sources":["../../../../../src/learning-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEgD,KAAK,mBAAmB,EAGpD,KAAK,eAAe,EAAE,KAAK,uBAAuB,EAC3E,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,KAAK,oBAAoB,EAC9E,KAAK,qBAAqB,EAAE,KAAK,qBAAqB,EAAE,KAAK,sBAAsB,EACpF,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAiO,KAAK,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAEhT,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AACD,MAAM,WAAW,sBAAs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EAAE,QAAQ,GAAG,OAAO,CAAC,EAAE,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;IAQ5J,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,GAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,EAAE,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;IAQ9H,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B;;;;;;;;;;IAQzF,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;IAW1E,IAAI,CAAC,CAAC,SAAS,oBAAoB,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,GAAE,OAAO,CAAC,qBAAqB,CAAM,EAAE,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAKvK,uGAAuG;IACjG,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,EAAE,OAAO,GAAE,sBAA2B;;;;;;;;CAoB/G"}
|
|
@@ -390,14 +390,14 @@ export declare const TasksetSchema: z.ZodObject<{
|
|
|
390
390
|
connectedAppIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
391
391
|
secretScanStatus: z.ZodEnum<{
|
|
392
392
|
pending: "pending";
|
|
393
|
-
passed: "passed";
|
|
394
393
|
blocked: "blocked";
|
|
394
|
+
passed: "passed";
|
|
395
395
|
}>;
|
|
396
396
|
piiScanStatus: z.ZodEnum<{
|
|
397
397
|
pending: "pending";
|
|
398
398
|
review: "review";
|
|
399
|
-
passed: "passed";
|
|
400
399
|
blocked: "blocked";
|
|
400
|
+
passed: "passed";
|
|
401
401
|
}>;
|
|
402
402
|
licensingStatus: z.ZodEnum<{
|
|
403
403
|
pending: "pending";
|
|
@@ -420,14 +420,14 @@ export declare const TasksetSchema: z.ZodObject<{
|
|
|
420
420
|
}>;
|
|
421
421
|
secretScanStatus: z.ZodEnum<{
|
|
422
422
|
pending: "pending";
|
|
423
|
-
passed: "passed";
|
|
424
423
|
blocked: "blocked";
|
|
424
|
+
passed: "passed";
|
|
425
425
|
}>;
|
|
426
426
|
piiScanStatus: z.ZodEnum<{
|
|
427
427
|
pending: "pending";
|
|
428
428
|
review: "review";
|
|
429
|
-
passed: "passed";
|
|
430
429
|
blocked: "blocked";
|
|
430
|
+
passed: "passed";
|
|
431
431
|
}>;
|
|
432
432
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
433
433
|
schemaVersion: z.ZodLiteral<"openpond.huggingFaceDatasetSource.v1">;
|
|
@@ -455,14 +455,14 @@ export declare const TasksetSchema: z.ZodObject<{
|
|
|
455
455
|
}>;
|
|
456
456
|
secretScanStatus: z.ZodEnum<{
|
|
457
457
|
pending: "pending";
|
|
458
|
-
passed: "passed";
|
|
459
458
|
blocked: "blocked";
|
|
459
|
+
passed: "passed";
|
|
460
460
|
}>;
|
|
461
461
|
piiScanStatus: z.ZodEnum<{
|
|
462
462
|
pending: "pending";
|
|
463
463
|
review: "review";
|
|
464
|
-
passed: "passed";
|
|
465
464
|
blocked: "blocked";
|
|
465
|
+
passed: "passed";
|
|
466
466
|
}>;
|
|
467
467
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
468
468
|
schemaVersion: z.ZodLiteral<"openpond.uploadedFileDatasetSource.v1">;
|
|
@@ -486,14 +486,14 @@ export declare const TasksetSchema: z.ZodObject<{
|
|
|
486
486
|
}>;
|
|
487
487
|
secretScanStatus: z.ZodEnum<{
|
|
488
488
|
pending: "pending";
|
|
489
|
-
passed: "passed";
|
|
490
489
|
blocked: "blocked";
|
|
490
|
+
passed: "passed";
|
|
491
491
|
}>;
|
|
492
492
|
piiScanStatus: z.ZodEnum<{
|
|
493
493
|
pending: "pending";
|
|
494
494
|
review: "review";
|
|
495
|
-
passed: "passed";
|
|
496
495
|
blocked: "blocked";
|
|
496
|
+
passed: "passed";
|
|
497
497
|
}>;
|
|
498
498
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
499
499
|
schemaVersion: z.ZodLiteral<"openpond.generatedDatasetSource.v1">;
|
|
@@ -516,14 +516,14 @@ export declare const TasksetSchema: z.ZodObject<{
|
|
|
516
516
|
}>;
|
|
517
517
|
secretScanStatus: z.ZodEnum<{
|
|
518
518
|
pending: "pending";
|
|
519
|
-
passed: "passed";
|
|
520
519
|
blocked: "blocked";
|
|
520
|
+
passed: "passed";
|
|
521
521
|
}>;
|
|
522
522
|
piiScanStatus: z.ZodEnum<{
|
|
523
523
|
pending: "pending";
|
|
524
524
|
review: "review";
|
|
525
|
-
passed: "passed";
|
|
526
525
|
blocked: "blocked";
|
|
526
|
+
passed: "passed";
|
|
527
527
|
}>;
|
|
528
528
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
529
529
|
schemaVersion: z.ZodLiteral<"openpond.learningBatchDatasetSource.v1">;
|
|
@@ -55,8 +55,8 @@ export declare function prepareAuthoredTasksetSource(tasksetInput: Taskset, sour
|
|
|
55
55
|
sourceHash: string;
|
|
56
56
|
occurredAt: string;
|
|
57
57
|
licensingStatus: "pending" | "review" | "approved" | "blocked";
|
|
58
|
-
secretScanStatus: "pending" | "
|
|
59
|
-
piiScanStatus: "pending" | "review" | "
|
|
58
|
+
secretScanStatus: "pending" | "blocked" | "passed";
|
|
59
|
+
piiScanStatus: "pending" | "review" | "blocked" | "passed";
|
|
60
60
|
metadata: Record<string, unknown>;
|
|
61
61
|
schemaVersion: "openpond.huggingFaceDatasetSource.v1";
|
|
62
62
|
kind: "huggingface";
|
|
@@ -76,8 +76,8 @@ export declare function prepareAuthoredTasksetSource(tasksetInput: Taskset, sour
|
|
|
76
76
|
sourceHash: string;
|
|
77
77
|
occurredAt: string;
|
|
78
78
|
licensingStatus: "pending" | "review" | "approved" | "blocked";
|
|
79
|
-
secretScanStatus: "pending" | "
|
|
80
|
-
piiScanStatus: "pending" | "review" | "
|
|
79
|
+
secretScanStatus: "pending" | "blocked" | "passed";
|
|
80
|
+
piiScanStatus: "pending" | "review" | "blocked" | "passed";
|
|
81
81
|
metadata: Record<string, unknown>;
|
|
82
82
|
schemaVersion: "openpond.uploadedFileDatasetSource.v1";
|
|
83
83
|
kind: "uploaded_file";
|
|
@@ -93,8 +93,8 @@ export declare function prepareAuthoredTasksetSource(tasksetInput: Taskset, sour
|
|
|
93
93
|
sourceHash: string;
|
|
94
94
|
occurredAt: string;
|
|
95
95
|
licensingStatus: "pending" | "review" | "approved" | "blocked";
|
|
96
|
-
secretScanStatus: "pending" | "
|
|
97
|
-
piiScanStatus: "pending" | "review" | "
|
|
96
|
+
secretScanStatus: "pending" | "blocked" | "passed";
|
|
97
|
+
piiScanStatus: "pending" | "review" | "blocked" | "passed";
|
|
98
98
|
metadata: Record<string, unknown>;
|
|
99
99
|
schemaVersion: "openpond.generatedDatasetSource.v1";
|
|
100
100
|
kind: "generated";
|
|
@@ -109,8 +109,8 @@ export declare function prepareAuthoredTasksetSource(tasksetInput: Taskset, sour
|
|
|
109
109
|
sourceHash: string;
|
|
110
110
|
occurredAt: string;
|
|
111
111
|
licensingStatus: "pending" | "review" | "approved" | "blocked";
|
|
112
|
-
secretScanStatus: "pending" | "
|
|
113
|
-
piiScanStatus: "pending" | "review" | "
|
|
112
|
+
secretScanStatus: "pending" | "blocked" | "passed";
|
|
113
|
+
piiScanStatus: "pending" | "review" | "blocked" | "passed";
|
|
114
114
|
metadata: Record<string, unknown>;
|
|
115
115
|
schemaVersion: "openpond.learningBatchDatasetSource.v1";
|
|
116
116
|
kind: "learning_batch";
|
|
@@ -144,8 +144,8 @@ export declare function prepareAuthoredTasksetSource(tasksetInput: Taskset, sour
|
|
|
144
144
|
purpose: "task_authoring_and_evaluation";
|
|
145
145
|
};
|
|
146
146
|
connectedAppIds: string[];
|
|
147
|
-
secretScanStatus: "pending" | "
|
|
148
|
-
piiScanStatus: "pending" | "review" | "
|
|
147
|
+
secretScanStatus: "pending" | "blocked" | "passed";
|
|
148
|
+
piiScanStatus: "pending" | "review" | "blocked" | "passed";
|
|
149
149
|
licensingStatus: "pending" | "review" | "approved" | "blocked";
|
|
150
150
|
metadata: Record<string, unknown>;
|
|
151
151
|
})[];
|
|
@@ -130,14 +130,14 @@ export declare const TasksetDraftReadbackSchema: z.ZodObject<{
|
|
|
130
130
|
connectedAppIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
131
131
|
secretScanStatus: z.ZodEnum<{
|
|
132
132
|
pending: "pending";
|
|
133
|
-
passed: "passed";
|
|
134
133
|
blocked: "blocked";
|
|
134
|
+
passed: "passed";
|
|
135
135
|
}>;
|
|
136
136
|
piiScanStatus: z.ZodEnum<{
|
|
137
137
|
pending: "pending";
|
|
138
138
|
review: "review";
|
|
139
|
-
passed: "passed";
|
|
140
139
|
blocked: "blocked";
|
|
140
|
+
passed: "passed";
|
|
141
141
|
}>;
|
|
142
142
|
licensingStatus: z.ZodEnum<{
|
|
143
143
|
pending: "pending";
|
|
@@ -160,14 +160,14 @@ export declare const TasksetDraftReadbackSchema: z.ZodObject<{
|
|
|
160
160
|
}>;
|
|
161
161
|
secretScanStatus: z.ZodEnum<{
|
|
162
162
|
pending: "pending";
|
|
163
|
-
passed: "passed";
|
|
164
163
|
blocked: "blocked";
|
|
164
|
+
passed: "passed";
|
|
165
165
|
}>;
|
|
166
166
|
piiScanStatus: z.ZodEnum<{
|
|
167
167
|
pending: "pending";
|
|
168
168
|
review: "review";
|
|
169
|
-
passed: "passed";
|
|
170
169
|
blocked: "blocked";
|
|
170
|
+
passed: "passed";
|
|
171
171
|
}>;
|
|
172
172
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
173
173
|
schemaVersion: z.ZodLiteral<"openpond.huggingFaceDatasetSource.v1">;
|
|
@@ -195,14 +195,14 @@ export declare const TasksetDraftReadbackSchema: z.ZodObject<{
|
|
|
195
195
|
}>;
|
|
196
196
|
secretScanStatus: z.ZodEnum<{
|
|
197
197
|
pending: "pending";
|
|
198
|
-
passed: "passed";
|
|
199
198
|
blocked: "blocked";
|
|
199
|
+
passed: "passed";
|
|
200
200
|
}>;
|
|
201
201
|
piiScanStatus: z.ZodEnum<{
|
|
202
202
|
pending: "pending";
|
|
203
203
|
review: "review";
|
|
204
|
-
passed: "passed";
|
|
205
204
|
blocked: "blocked";
|
|
205
|
+
passed: "passed";
|
|
206
206
|
}>;
|
|
207
207
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
208
208
|
schemaVersion: z.ZodLiteral<"openpond.uploadedFileDatasetSource.v1">;
|
|
@@ -226,14 +226,14 @@ export declare const TasksetDraftReadbackSchema: z.ZodObject<{
|
|
|
226
226
|
}>;
|
|
227
227
|
secretScanStatus: z.ZodEnum<{
|
|
228
228
|
pending: "pending";
|
|
229
|
-
passed: "passed";
|
|
230
229
|
blocked: "blocked";
|
|
230
|
+
passed: "passed";
|
|
231
231
|
}>;
|
|
232
232
|
piiScanStatus: z.ZodEnum<{
|
|
233
233
|
pending: "pending";
|
|
234
234
|
review: "review";
|
|
235
|
-
passed: "passed";
|
|
236
235
|
blocked: "blocked";
|
|
236
|
+
passed: "passed";
|
|
237
237
|
}>;
|
|
238
238
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
239
239
|
schemaVersion: z.ZodLiteral<"openpond.generatedDatasetSource.v1">;
|
|
@@ -256,14 +256,14 @@ export declare const TasksetDraftReadbackSchema: z.ZodObject<{
|
|
|
256
256
|
}>;
|
|
257
257
|
secretScanStatus: z.ZodEnum<{
|
|
258
258
|
pending: "pending";
|
|
259
|
-
passed: "passed";
|
|
260
259
|
blocked: "blocked";
|
|
260
|
+
passed: "passed";
|
|
261
261
|
}>;
|
|
262
262
|
piiScanStatus: z.ZodEnum<{
|
|
263
263
|
pending: "pending";
|
|
264
264
|
review: "review";
|
|
265
|
-
passed: "passed";
|
|
266
265
|
blocked: "blocked";
|
|
266
|
+
passed: "passed";
|
|
267
267
|
}>;
|
|
268
268
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
269
269
|
schemaVersion: z.ZodLiteral<"openpond.learningBatchDatasetSource.v1">;
|
|
@@ -942,14 +942,14 @@ export declare const TasksetDraftSaveRequestSchema: z.ZodObject<{
|
|
|
942
942
|
connectedAppIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
943
943
|
secretScanStatus: z.ZodEnum<{
|
|
944
944
|
pending: "pending";
|
|
945
|
-
passed: "passed";
|
|
946
945
|
blocked: "blocked";
|
|
946
|
+
passed: "passed";
|
|
947
947
|
}>;
|
|
948
948
|
piiScanStatus: z.ZodEnum<{
|
|
949
949
|
pending: "pending";
|
|
950
950
|
review: "review";
|
|
951
|
-
passed: "passed";
|
|
952
951
|
blocked: "blocked";
|
|
952
|
+
passed: "passed";
|
|
953
953
|
}>;
|
|
954
954
|
licensingStatus: z.ZodEnum<{
|
|
955
955
|
pending: "pending";
|
|
@@ -972,14 +972,14 @@ export declare const TasksetDraftSaveRequestSchema: z.ZodObject<{
|
|
|
972
972
|
}>;
|
|
973
973
|
secretScanStatus: z.ZodEnum<{
|
|
974
974
|
pending: "pending";
|
|
975
|
-
passed: "passed";
|
|
976
975
|
blocked: "blocked";
|
|
976
|
+
passed: "passed";
|
|
977
977
|
}>;
|
|
978
978
|
piiScanStatus: z.ZodEnum<{
|
|
979
979
|
pending: "pending";
|
|
980
980
|
review: "review";
|
|
981
|
-
passed: "passed";
|
|
982
981
|
blocked: "blocked";
|
|
982
|
+
passed: "passed";
|
|
983
983
|
}>;
|
|
984
984
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
985
985
|
schemaVersion: z.ZodLiteral<"openpond.huggingFaceDatasetSource.v1">;
|
|
@@ -1007,14 +1007,14 @@ export declare const TasksetDraftSaveRequestSchema: z.ZodObject<{
|
|
|
1007
1007
|
}>;
|
|
1008
1008
|
secretScanStatus: z.ZodEnum<{
|
|
1009
1009
|
pending: "pending";
|
|
1010
|
-
passed: "passed";
|
|
1011
1010
|
blocked: "blocked";
|
|
1011
|
+
passed: "passed";
|
|
1012
1012
|
}>;
|
|
1013
1013
|
piiScanStatus: z.ZodEnum<{
|
|
1014
1014
|
pending: "pending";
|
|
1015
1015
|
review: "review";
|
|
1016
|
-
passed: "passed";
|
|
1017
1016
|
blocked: "blocked";
|
|
1017
|
+
passed: "passed";
|
|
1018
1018
|
}>;
|
|
1019
1019
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1020
1020
|
schemaVersion: z.ZodLiteral<"openpond.uploadedFileDatasetSource.v1">;
|
|
@@ -1038,14 +1038,14 @@ export declare const TasksetDraftSaveRequestSchema: z.ZodObject<{
|
|
|
1038
1038
|
}>;
|
|
1039
1039
|
secretScanStatus: z.ZodEnum<{
|
|
1040
1040
|
pending: "pending";
|
|
1041
|
-
passed: "passed";
|
|
1042
1041
|
blocked: "blocked";
|
|
1042
|
+
passed: "passed";
|
|
1043
1043
|
}>;
|
|
1044
1044
|
piiScanStatus: z.ZodEnum<{
|
|
1045
1045
|
pending: "pending";
|
|
1046
1046
|
review: "review";
|
|
1047
|
-
passed: "passed";
|
|
1048
1047
|
blocked: "blocked";
|
|
1048
|
+
passed: "passed";
|
|
1049
1049
|
}>;
|
|
1050
1050
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1051
1051
|
schemaVersion: z.ZodLiteral<"openpond.generatedDatasetSource.v1">;
|
|
@@ -1068,14 +1068,14 @@ export declare const TasksetDraftSaveRequestSchema: z.ZodObject<{
|
|
|
1068
1068
|
}>;
|
|
1069
1069
|
secretScanStatus: z.ZodEnum<{
|
|
1070
1070
|
pending: "pending";
|
|
1071
|
-
passed: "passed";
|
|
1072
1071
|
blocked: "blocked";
|
|
1072
|
+
passed: "passed";
|
|
1073
1073
|
}>;
|
|
1074
1074
|
piiScanStatus: z.ZodEnum<{
|
|
1075
1075
|
pending: "pending";
|
|
1076
1076
|
review: "review";
|
|
1077
|
-
passed: "passed";
|
|
1078
1077
|
blocked: "blocked";
|
|
1078
|
+
passed: "passed";
|
|
1079
1079
|
}>;
|
|
1080
1080
|
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1081
1081
|
schemaVersion: z.ZodLiteral<"openpond.learningBatchDatasetSource.v1">;
|