export { OpenPondLearningError } from "./learning-error.js"; import { z } from "zod"; import { type LearningRevisionRef, type LearningCommand, type LearningOperationResult, type LearningResourceFor, type LearningResourceKind, type LearningResourcePage, type LearningResourceQuery, type TaskExampleSubmission, type TaskFeedbackSubmission } from "@openpond/evals/learning"; import { type LearningSourceCredentialRequest } from "./learning-credentials.js"; export interface OpenPondLearningClientOptions { apiKey: string; baseUrl: string; /** Local profile or hosted team scope. The server checks the credential's ownership. */ scope: string; fetch?: typeof globalThis.fetch; } export interface LearningRequestOptions { signal?: AbortSignal; } export declare const LearningBatchPublicationSchema: z.ZodObject<{ batchId: z.ZodString; modelProjectId: z.ZodString; }, z.core.$strict>; export declare const LearningBatchPublicationResultSchema: z.ZodObject<{ batchId: z.ZodString; projectId: z.ZodString; tasksetId: z.ZodString; releaseId: z.ZodString; revision: z.ZodNumber; contentHash: z.ZodString; }, z.core.$strict>; /** The same portable commands are sent to the local and hosted execution owner. */ export declare class OpenPondLearningClient { #private; constructor(options: OpenPondLearningClientOptions); command(command: LearningCommand, options?: LearningRequestOptions): Promise; submitExample(example: TaskExampleSubmission, options?: LearningRequestOptions): Promise; submitFeedback(feedback: TaskFeedbackSubmission, options?: LearningRequestOptions): Promise; get(kind: K, id: string, revision?: number, options?: LearningRequestOptions): Promise>; inspectEvidence(evidence: LearningRevisionRef, options?: LearningRequestOptions): Promise<{ evidence: { id: string; contentHash: string; revision: number; }; definition: { id: string; contentHash: string; revision: number; }; inspection: { evidenceValidity: "invalid" | "valid"; taskReady: boolean; observedOutputValid: boolean | null; issues: { path: string; code: string; message: string; }[]; }; }>; /** Read current shared eligibility and budget without reserving or launching work. */ inspectTaskQueue(modelProjectId?: string | null, options?: LearningRequestOptions): Promise<{ modelProjectId: string | null; inspectedAt: string; pendingTrainingCount: number | null; issues: { policyId: string; code: string; message: string; }[]; }>; /** Read current shared eligibility and budget without reserving or launching work. */ inspectPolicy(policy: LearningRevisionRef, options?: LearningRequestOptions): Promise<{ policy: { id: string; contentHash: string; revision: number; }; modelProjectId: string; inspectedAt: string; chain: { schemaVersion: "openpond.learningChain.v1"; id: string; revision: number; modelProjectId: string; activeIterationId: string | null; acceptedParent?: { iterationId: string; iterationRevision: number; candidate: { id: string; contentHash: string; }; decision: { id: string; contentHash: string; revision: number; }; decidedAt: string; } | null | undefined; latestIterationId: string; lastReservedAt: string | null; updatedAt: string; } | null; trainingParent: { reference: { id: string; contentHash: string; }; selection: { iterationId: string; iterationRevision: number; candidate: { id: string; contentHash: string; }; decision: { id: string; contentHash: string; revision: number; }; decidedAt: string; } | null; } | null; counts: { eligible: number; awaitingReview: number; excluded: number; consumed: number; } | null; minimumApprovedExamples: number; canReserve: boolean; blockers: { code: string; message: string; }[]; cooldownUntil: string | null; budget: { reservedSpendUsd: number; settledSpendUsd: number; committedSpendUsd: number; maximumIterationSpendUsd: number; maximumDailySpendUsd: number; }; }>; /** Prepare once with createSourceCredentialRequest and reuse it for retries. */ createSourceCredential(input: Omit, "action" | "scope">, options?: LearningRequestOptions): Promise<{ credential: { id: string; scope: string; sourceId: string; name: string; keyPrefix: string; createdAt: string; expiresAt: string; revokedAt: string | null; }; apiKey: string; }>; listSourceCredentials(sourceId: string, query?: { afterId?: string; limit?: number; }, options?: LearningRequestOptions): Promise<{ items: { id: string; scope: string; sourceId: string; name: string; keyPrefix: string; createdAt: string; expiresAt: string; revokedAt: string | null; }[]; nextCursor: string | null; }>; revokeSourceCredential(sourceId: string, id: string, options?: LearningRequestOptions): Promise<{ id: string; scope: string; sourceId: string; name: string; keyPrefix: string; createdAt: string; expiresAt: string; revokedAt: string | null; }>; sourceConfiguration(sourceId: string, options?: LearningRequestOptions): Promise<{ scope: string; source: { id: string; contentHash: string; revision: number; }; taskDefinition: { id: string; contentHash: string; revision: number; }; enabled: boolean; allowedSplits: ("frozen_eval" | "test" | "train" | "validation")[]; }>; list(kind: K, query?: Partial, options?: LearningRequestOptions): Promise>; /** Hosted publication only: stores an immutable package and attaches it, without starting training. */ publishBatch(input: z.infer, options?: LearningRequestOptions): Promise<{ batchId: string; projectId: string; tasksetId: string; releaseId: string; revision: number; contentHash: string; }>; } export declare function readBoundedLearningResponse(response: Response): Promise; //# sourceMappingURL=learning-client.d.ts.map