@oro-ai/sdk 0.6.9 → 0.7.1

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/index.d.mts CHANGED
@@ -500,6 +500,10 @@ type CodeAnalysisError = {
500
500
  violations?: Array<{
501
501
  [key: string]: unknown;
502
502
  }>;
503
+ /**
504
+ * Seconds remaining on cooldown (if cooldown was consumed by this submission)
505
+ */
506
+ remaining_seconds?: (number | null);
503
507
  };
504
508
  /**
505
509
  * Request to complete an evaluation run.
@@ -1782,6 +1786,28 @@ type ValidatorPublic = {
1782
1786
  * Status of a validator.
1783
1787
  */
1784
1788
  type ValidatorStatus = 'evaluating' | 'available';
1789
+ /**
1790
+ * Request body for waitlist signup.
1791
+ */
1792
+ type WaitlistSignupRequest = {
1793
+ /**
1794
+ * Email address to add to the waitlist
1795
+ */
1796
+ email: string;
1797
+ /**
1798
+ * Signup source
1799
+ */
1800
+ source?: string;
1801
+ };
1802
+ /**
1803
+ * Response from waitlist signup.
1804
+ */
1805
+ type WaitlistSignupResponse = {
1806
+ /**
1807
+ * Whether signup was recorded
1808
+ */
1809
+ success: boolean;
1810
+ };
1785
1811
  /**
1786
1812
  * Status of the work item after completion.
1787
1813
  */
@@ -1912,6 +1938,11 @@ type GetPendingEvaluationsData = {
1912
1938
  };
1913
1939
  type GetPendingEvaluationsResponse = (PendingEvaluationsResponse);
1914
1940
  type GetPendingEvaluationsError = (HTTPValidationError);
1941
+ type JoinWaitlistData = {
1942
+ body: WaitlistSignupRequest;
1943
+ };
1944
+ type JoinWaitlistResponse = (WaitlistSignupResponse);
1945
+ type JoinWaitlistError = (HTTPValidationError);
1915
1946
  type RequestChallengeData = {
1916
1947
  body: ChallengeRequest;
1917
1948
  };
@@ -2151,6 +2182,18 @@ type GetAuditEventsResponse = (AuditEventsResponse);
2151
2182
  type GetAuditEventsError = (HTTPValidationError);
2152
2183
  type GetReaperStatsResponse = (ReaperStatsResponse);
2153
2184
  type GetReaperStatsError = unknown;
2185
+ type ClearMinerCooldownData = {
2186
+ path: {
2187
+ /**
2188
+ * Miner hotkey
2189
+ */
2190
+ hotkey: string;
2191
+ };
2192
+ };
2193
+ type ClearMinerCooldownResponse = ({
2194
+ [key: string]: unknown;
2195
+ });
2196
+ type ClearMinerCooldownError = (HTTPValidationError);
2154
2197
 
2155
2198
  declare const client: _hey_api_client_fetch.Client<Request, Response, unknown, _hey_api_client_fetch.RequestOptions<boolean, string>>;
2156
2199
  /**
@@ -2223,6 +2266,11 @@ declare const getRunningEvaluations: <ThrowOnError extends boolean = false>(opti
2223
2266
  * Get all open work items awaiting validator evaluations, with queue summary.
2224
2267
  */
2225
2268
  declare const getPendingEvaluations: <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetPendingEvaluationsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<PendingEvaluationsResponse, HTTPValidationError, ThrowOnError>;
2269
+ /**
2270
+ * Join waitlist
2271
+ * Submit an email to join the ORO waitlist.
2272
+ */
2273
+ declare const joinWaitlist: <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<JoinWaitlistData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<WaitlistSignupResponse, HTTPValidationError, ThrowOnError>;
2226
2274
  /**
2227
2275
  * Request Challenge
2228
2276
  * Request a challenge for wallet authentication.
@@ -2316,11 +2364,16 @@ declare const unbanValidator: <ThrowOnError extends boolean = false>(options: Op
2316
2364
  /**
2317
2365
  * Discard an agent version from leaderboard
2318
2366
  * Discard an agent version from the leaderboard (reversible tombstone).
2367
+ *
2368
+ * Also cancels any active evaluation runs and closes the work item
2369
+ * to prevent the validator from claiming new work for this version.
2319
2370
  */
2320
2371
  declare const discardAgentVersion: <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DiscardAgentVersionData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<DiscardResponse, DiscardAgentVersionError, ThrowOnError>;
2321
2372
  /**
2322
2373
  * Reinstate a discarded agent version
2323
2374
  * Reinstate a previously discarded agent version.
2375
+ *
2376
+ * Also reopens the work item so validators can claim work again.
2324
2377
  */
2325
2378
  declare const reinstateAgentVersion: <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ReinstateAgentVersionData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<DiscardResponse, ReinstateAgentVersionError, ThrowOnError>;
2326
2379
  /**
@@ -2383,6 +2436,11 @@ declare const getAuditEvents: <ThrowOnError extends boolean = false>(options?: O
2383
2436
  * consistent visibility across all replicas.
2384
2437
  */
2385
2438
  declare const getReaperStats: <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => _hey_api_client_fetch.RequestResult<ReaperStatsResponse, unknown, ThrowOnError>;
2439
+ /**
2440
+ * Clear miner cooldown
2441
+ * Clear the submission cooldown for a miner.
2442
+ */
2443
+ declare const clearMinerCooldown: <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ClearMinerCooldownData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<ClearMinerCooldownResponse, HTTPValidationError, ThrowOnError>;
2386
2444
 
2387
2445
  /**
2388
2446
  * Auto-generated error code type.
@@ -2615,6 +2673,15 @@ declare function configurePublicClient(baseUrl: string, retryConfig?: RetryConfi
2615
2673
  * and logout — matching the convenience of the Python SDK's BittensorAuthClient.
2616
2674
  */
2617
2675
 
2676
+ /**
2677
+ * A serializable snapshot of a session, suitable for caching
2678
+ * in sessionStorage or similar.
2679
+ */
2680
+ interface CachedSession {
2681
+ token: string;
2682
+ expiresAt: number;
2683
+ role: string;
2684
+ }
2618
2685
  /**
2619
2686
  * Configuration for session-based authentication.
2620
2687
  */
@@ -2630,6 +2697,12 @@ interface SessionAuthConfig {
2630
2697
  refreshBufferSeconds?: number;
2631
2698
  /** Called when the session has expired and cannot be refreshed. */
2632
2699
  onSessionExpired?: () => void;
2700
+ /**
2701
+ * Previously cached session to restore without re-authenticating.
2702
+ * If provided and the token hasn't expired, the manager starts
2703
+ * in an authenticated state — no login() call needed.
2704
+ */
2705
+ cachedSession?: CachedSession;
2633
2706
  }
2634
2707
  /**
2635
2708
  * Information about the current session.
@@ -2677,6 +2750,14 @@ declare class SessionAuthManager {
2677
2750
  sessionNeedsRefresh(): boolean;
2678
2751
  /** Returns current session info, or null if no active session. */
2679
2752
  getSessionInfo(): SessionInfo | null;
2753
+ /**
2754
+ * Returns a serializable snapshot of the current session for caching.
2755
+ * Returns null if no active session.
2756
+ *
2757
+ * Store the result in sessionStorage and pass it back as
2758
+ * `cachedSession` in the constructor to restore without re-authenticating.
2759
+ */
2760
+ getSessionToken(): CachedSession | null;
2680
2761
  /**
2681
2762
  * Returns authorization headers. Auto-refreshes if the session is
2682
2763
  * within the refresh buffer. Throws if not authenticated or session expired.
@@ -2712,4 +2793,4 @@ declare class SessionAuthManager {
2712
2793
  */
2713
2794
  declare function configureSessionAuth(baseUrl: string, config: SessionAuthConfig): SessionAuthManager;
2714
2795
 
2715
- export { type ActivateSuiteData, type ActivateSuiteError, type ActivateSuiteResponse, type ActivateSuiteResponse2, type AdmissionReason, type AdmissionStatus, type AgentNotFoundError, type AgentPublic, type AgentVersionHistoryEntry, type AgentVersionNotFoundError, type AgentVersionProblemsResponse, type AgentVersionPublic, type AgentVersionState, type AgentVersionStatus, type AlreadyInvalidatedError, type ArtifactDownloadRequest, type ArtifactDownloadResponse, type ArtifactNotFoundError, type ArtifactNotReleasedError, type ArtifactReleaseState, type ArtifactType, type AtCapacityError, type AuditEventEntry, type AuditEventsResponse, type BanMinerData, type BanMinerError, type BanMinerResponse, type BanRequest, type BanResponse, type BanValidatorData, type BanValidatorError, type BanValidatorResponse, type BittensorAuthConfig, type Body_submit_agent, type CancelAgentVersionData, type CancelAgentVersionError, type CancelAgentVersionResponse, type CancelRequest, type CancelResponse, type ChallengeRequest, type ChallengeResponse, type ClaimWorkError, type ClaimWorkResponse, type ClaimWorkResponse2, type CodeAnalysisError, type CompleteRunData, type CompleteRunError, type CompleteRunRequest, type CompleteRunResponse, type CompleteRunResponse2, type CooldownActiveError, type CreateSessionEndpointData, type CreateSessionEndpointError, type CreateSessionEndpointResponse, type CreateSuiteData, type CreateSuiteError, type CreateSuiteRequest, type CreateSuiteResponse, type CreateSuiteResponse2, type DiscardAgentVersionData, type DiscardAgentVersionError, type DiscardAgentVersionResponse, type DiscardRequest, type DiscardResponse, type ErrorCategory, type EvalRunNotFoundError, type EvaluationRunDetail, type EvaluationRunPublic, type EvaluationRunStatus, type EvaluationRunStatusPublic, type FileTooLargeError, type GetAgentVersionData, type GetAgentVersionError, type GetAgentVersionProblemsData, type GetAgentVersionProblemsError, type GetAgentVersionProblemsResponse, type GetAgentVersionResponse, type GetAgentVersionRunsData, type GetAgentVersionRunsError, type GetAgentVersionRunsResponse, type GetAgentVersionStatusData, type GetAgentVersionStatusError, type GetAgentVersionStatusResponse, type GetArtifactDownloadUrlData, type GetArtifactDownloadUrlError, type GetArtifactDownloadUrlResponse, type GetAuditEventsData, type GetAuditEventsError, type GetAuditEventsResponse, type GetCurrentSuiteError, type GetCurrentSuiteResponse, type GetEvaluationRunData, type GetEvaluationRunError, type GetEvaluationRunResponse, type GetLeaderboardData, type GetLeaderboardError, type GetLeaderboardResponse, type GetOwnedAgentVersionStatusData, type GetOwnedAgentVersionStatusError, type GetOwnedAgentVersionStatusResponse, type GetPendingEvaluationsData, type GetPendingEvaluationsError, type GetPendingEvaluationsResponse, type GetReaperStatsError, type GetReaperStatsResponse, type GetRunningEvaluationsError, type GetRunningEvaluationsResponse, type GetSuiteProblemsData, type GetSuiteProblemsError, type GetSuiteProblemsResponse, type GetTopAgentError, type GetTopAgentResponse, type GetValidatorsError, type GetValidatorsResponse, type HTTPValidationError, type HealthCheckError, type HealthCheckResponse, type HeartbeatData, type HeartbeatError, type HeartbeatRequest, type HeartbeatResponse, type HeartbeatResponse2, type InvalidAgentNameError, type InvalidArtifactTypeError, type InvalidFileError, type InvalidProblemIdError, type InvalidateEvaluationRunData, type InvalidateEvaluationRunError, type InvalidateEvaluationRunResponse, type InvalidateRunRequest, type LeaderboardEntry, type LeaderboardResponse, type LeaseExpiredError, type ListAgentVersionsData, type ListAgentVersionsError, type ListAgentVersionsResponse, type ListMinerAgentsError, type ListMinerAgentsResponse, type LogoutData, type LogoutError, type LogoutResponse, type LogoutResponse2, type MinerAgentsResponse, type MinerNotFoundError, type MissingParameterError, type MissingScoreError, type NoActiveSuiteError, type NotRunOwnerError, type OroErrorCode, type PendingEvaluation, type PendingEvaluationSummary, type PendingEvaluationsResponse, type PresignUploadData, type PresignUploadError, type PresignUploadRequest, type PresignUploadResponse, type PresignUploadResponse2, type ProblemNotFoundError, type ProblemProgressEntry, type ProblemProgressUpdate, type ProblemPublic, type ProblemStatus, type ProgressUpdateRequest, type ProgressUpdateResponse, type RateLimitExceededError, type ReaperStatsResponse, type ReevaluateAgentVersionData, type ReevaluateAgentVersionError, type ReevaluateAgentVersionResponse, type ReevaluateRequest, type ReevaluateResponse, type ReinstateAgentVersionData, type ReinstateAgentVersionError, type ReinstateAgentVersionResponse, type ReinstateRequest, type RequestChallengeData, type RequestChallengeError, type RequestChallengeResponse, type RetryConfig, type RetryContext, type RunAlreadyCompleteError, type RunningEvaluation, type ScoreBelowThresholdError, type SessionAuthConfig, SessionAuthManager, type SessionInfo, type SessionRequest, type SessionResponse, type SetTopAgentData, type SetTopAgentError, type SetTopAgentResponse, type SetTopRequest, type SetTopResponse, type SubmitAgentData, type SubmitAgentError, type SubmitAgentResponse, type SubmitAgentResponse2, type SuiteNotFoundError, type SuitePublic, type SuiteWithProblemsResponse, type TerminalStatus, type TopAgentResponse, type UnbanMinerData, type UnbanMinerError, type UnbanMinerResponse, type UnbanValidatorData, type UnbanValidatorError, type UnbanValidatorResponse, type UpdateProgressData, type UpdateProgressError, type UpdateProgressResponse, type ValidationError, type ValidatorCurrentAgent, type ValidatorNotFoundError, type ValidatorProblemResult, type ValidatorPublic, type ValidatorStatus, type WorkItemStatus, activateSuite, banMiner, banValidator, cancelAgentVersion, claimWork, classifyError, classifyStatus, client, completeRun, computeDelay, configureBittensorAuth, configurePublicClient, configureSessionAuth, createRetryFetch, createSessionEndpoint, createSuite, discardAgentVersion, generateAuthHeaders, getAgentVersion, getAgentVersionProblems, getAgentVersionRuns, getAgentVersionStatus, getArtifactDownloadUrl, getAuditEvents, getCurrentSuite, getErrorCode, getErrorDetail, getEvaluationRun, getLeaderboard, getOwnedAgentVersionStatus, getPendingEvaluations, getReaperStats, getRunningEvaluations, getSuiteProblems, getTopAgent, getValidators, hasDetail, hasErrorCode, healthCheck, heartbeat, invalidateEvaluationRun, isTransient, isTransientError, listAgentVersions, listMinerAgents, logout, parseRetryAfter, presignUpload, reevaluateAgentVersion, reinstateAgentVersion, requestChallenge, setTopAgent, submitAgent, unbanMiner, unbanValidator, updateProgress };
2796
+ export { type ActivateSuiteData, type ActivateSuiteError, type ActivateSuiteResponse, type ActivateSuiteResponse2, type AdmissionReason, type AdmissionStatus, type AgentNotFoundError, type AgentPublic, type AgentVersionHistoryEntry, type AgentVersionNotFoundError, type AgentVersionProblemsResponse, type AgentVersionPublic, type AgentVersionState, type AgentVersionStatus, type AlreadyInvalidatedError, type ArtifactDownloadRequest, type ArtifactDownloadResponse, type ArtifactNotFoundError, type ArtifactNotReleasedError, type ArtifactReleaseState, type ArtifactType, type AtCapacityError, type AuditEventEntry, type AuditEventsResponse, type BanMinerData, type BanMinerError, type BanMinerResponse, type BanRequest, type BanResponse, type BanValidatorData, type BanValidatorError, type BanValidatorResponse, type BittensorAuthConfig, type Body_submit_agent, type CachedSession, type CancelAgentVersionData, type CancelAgentVersionError, type CancelAgentVersionResponse, type CancelRequest, type CancelResponse, type ChallengeRequest, type ChallengeResponse, type ClaimWorkError, type ClaimWorkResponse, type ClaimWorkResponse2, type ClearMinerCooldownData, type ClearMinerCooldownError, type ClearMinerCooldownResponse, type CodeAnalysisError, type CompleteRunData, type CompleteRunError, type CompleteRunRequest, type CompleteRunResponse, type CompleteRunResponse2, type CooldownActiveError, type CreateSessionEndpointData, type CreateSessionEndpointError, type CreateSessionEndpointResponse, type CreateSuiteData, type CreateSuiteError, type CreateSuiteRequest, type CreateSuiteResponse, type CreateSuiteResponse2, type DiscardAgentVersionData, type DiscardAgentVersionError, type DiscardAgentVersionResponse, type DiscardRequest, type DiscardResponse, type ErrorCategory, type EvalRunNotFoundError, type EvaluationRunDetail, type EvaluationRunPublic, type EvaluationRunStatus, type EvaluationRunStatusPublic, type FileTooLargeError, type GetAgentVersionData, type GetAgentVersionError, type GetAgentVersionProblemsData, type GetAgentVersionProblemsError, type GetAgentVersionProblemsResponse, type GetAgentVersionResponse, type GetAgentVersionRunsData, type GetAgentVersionRunsError, type GetAgentVersionRunsResponse, type GetAgentVersionStatusData, type GetAgentVersionStatusError, type GetAgentVersionStatusResponse, type GetArtifactDownloadUrlData, type GetArtifactDownloadUrlError, type GetArtifactDownloadUrlResponse, type GetAuditEventsData, type GetAuditEventsError, type GetAuditEventsResponse, type GetCurrentSuiteError, type GetCurrentSuiteResponse, type GetEvaluationRunData, type GetEvaluationRunError, type GetEvaluationRunResponse, type GetLeaderboardData, type GetLeaderboardError, type GetLeaderboardResponse, type GetOwnedAgentVersionStatusData, type GetOwnedAgentVersionStatusError, type GetOwnedAgentVersionStatusResponse, type GetPendingEvaluationsData, type GetPendingEvaluationsError, type GetPendingEvaluationsResponse, type GetReaperStatsError, type GetReaperStatsResponse, type GetRunningEvaluationsError, type GetRunningEvaluationsResponse, type GetSuiteProblemsData, type GetSuiteProblemsError, type GetSuiteProblemsResponse, type GetTopAgentError, type GetTopAgentResponse, type GetValidatorsError, type GetValidatorsResponse, type HTTPValidationError, type HealthCheckError, type HealthCheckResponse, type HeartbeatData, type HeartbeatError, type HeartbeatRequest, type HeartbeatResponse, type HeartbeatResponse2, type InvalidAgentNameError, type InvalidArtifactTypeError, type InvalidFileError, type InvalidProblemIdError, type InvalidateEvaluationRunData, type InvalidateEvaluationRunError, type InvalidateEvaluationRunResponse, type InvalidateRunRequest, type JoinWaitlistData, type JoinWaitlistError, type JoinWaitlistResponse, type LeaderboardEntry, type LeaderboardResponse, type LeaseExpiredError, type ListAgentVersionsData, type ListAgentVersionsError, type ListAgentVersionsResponse, type ListMinerAgentsError, type ListMinerAgentsResponse, type LogoutData, type LogoutError, type LogoutResponse, type LogoutResponse2, type MinerAgentsResponse, type MinerNotFoundError, type MissingParameterError, type MissingScoreError, type NoActiveSuiteError, type NotRunOwnerError, type OroErrorCode, type PendingEvaluation, type PendingEvaluationSummary, type PendingEvaluationsResponse, type PresignUploadData, type PresignUploadError, type PresignUploadRequest, type PresignUploadResponse, type PresignUploadResponse2, type ProblemNotFoundError, type ProblemProgressEntry, type ProblemProgressUpdate, type ProblemPublic, type ProblemStatus, type ProgressUpdateRequest, type ProgressUpdateResponse, type RateLimitExceededError, type ReaperStatsResponse, type ReevaluateAgentVersionData, type ReevaluateAgentVersionError, type ReevaluateAgentVersionResponse, type ReevaluateRequest, type ReevaluateResponse, type ReinstateAgentVersionData, type ReinstateAgentVersionError, type ReinstateAgentVersionResponse, type ReinstateRequest, type RequestChallengeData, type RequestChallengeError, type RequestChallengeResponse, type RetryConfig, type RetryContext, type RunAlreadyCompleteError, type RunningEvaluation, type ScoreBelowThresholdError, type SessionAuthConfig, SessionAuthManager, type SessionInfo, type SessionRequest, type SessionResponse, type SetTopAgentData, type SetTopAgentError, type SetTopAgentResponse, type SetTopRequest, type SetTopResponse, type SubmitAgentData, type SubmitAgentError, type SubmitAgentResponse, type SubmitAgentResponse2, type SuiteNotFoundError, type SuitePublic, type SuiteWithProblemsResponse, type TerminalStatus, type TopAgentResponse, type UnbanMinerData, type UnbanMinerError, type UnbanMinerResponse, type UnbanValidatorData, type UnbanValidatorError, type UnbanValidatorResponse, type UpdateProgressData, type UpdateProgressError, type UpdateProgressResponse, type ValidationError, type ValidatorCurrentAgent, type ValidatorNotFoundError, type ValidatorProblemResult, type ValidatorPublic, type ValidatorStatus, type WaitlistSignupRequest, type WaitlistSignupResponse, type WorkItemStatus, activateSuite, banMiner, banValidator, cancelAgentVersion, claimWork, classifyError, classifyStatus, clearMinerCooldown, client, completeRun, computeDelay, configureBittensorAuth, configurePublicClient, configureSessionAuth, createRetryFetch, createSessionEndpoint, createSuite, discardAgentVersion, generateAuthHeaders, getAgentVersion, getAgentVersionProblems, getAgentVersionRuns, getAgentVersionStatus, getArtifactDownloadUrl, getAuditEvents, getCurrentSuite, getErrorCode, getErrorDetail, getEvaluationRun, getLeaderboard, getOwnedAgentVersionStatus, getPendingEvaluations, getReaperStats, getRunningEvaluations, getSuiteProblems, getTopAgent, getValidators, hasDetail, hasErrorCode, healthCheck, heartbeat, invalidateEvaluationRun, isTransient, isTransientError, joinWaitlist, listAgentVersions, listMinerAgents, logout, parseRetryAfter, presignUpload, reevaluateAgentVersion, reinstateAgentVersion, requestChallenge, setTopAgent, submitAgent, unbanMiner, unbanValidator, updateProgress };
package/dist/index.d.ts CHANGED
@@ -500,6 +500,10 @@ type CodeAnalysisError = {
500
500
  violations?: Array<{
501
501
  [key: string]: unknown;
502
502
  }>;
503
+ /**
504
+ * Seconds remaining on cooldown (if cooldown was consumed by this submission)
505
+ */
506
+ remaining_seconds?: (number | null);
503
507
  };
504
508
  /**
505
509
  * Request to complete an evaluation run.
@@ -1782,6 +1786,28 @@ type ValidatorPublic = {
1782
1786
  * Status of a validator.
1783
1787
  */
1784
1788
  type ValidatorStatus = 'evaluating' | 'available';
1789
+ /**
1790
+ * Request body for waitlist signup.
1791
+ */
1792
+ type WaitlistSignupRequest = {
1793
+ /**
1794
+ * Email address to add to the waitlist
1795
+ */
1796
+ email: string;
1797
+ /**
1798
+ * Signup source
1799
+ */
1800
+ source?: string;
1801
+ };
1802
+ /**
1803
+ * Response from waitlist signup.
1804
+ */
1805
+ type WaitlistSignupResponse = {
1806
+ /**
1807
+ * Whether signup was recorded
1808
+ */
1809
+ success: boolean;
1810
+ };
1785
1811
  /**
1786
1812
  * Status of the work item after completion.
1787
1813
  */
@@ -1912,6 +1938,11 @@ type GetPendingEvaluationsData = {
1912
1938
  };
1913
1939
  type GetPendingEvaluationsResponse = (PendingEvaluationsResponse);
1914
1940
  type GetPendingEvaluationsError = (HTTPValidationError);
1941
+ type JoinWaitlistData = {
1942
+ body: WaitlistSignupRequest;
1943
+ };
1944
+ type JoinWaitlistResponse = (WaitlistSignupResponse);
1945
+ type JoinWaitlistError = (HTTPValidationError);
1915
1946
  type RequestChallengeData = {
1916
1947
  body: ChallengeRequest;
1917
1948
  };
@@ -2151,6 +2182,18 @@ type GetAuditEventsResponse = (AuditEventsResponse);
2151
2182
  type GetAuditEventsError = (HTTPValidationError);
2152
2183
  type GetReaperStatsResponse = (ReaperStatsResponse);
2153
2184
  type GetReaperStatsError = unknown;
2185
+ type ClearMinerCooldownData = {
2186
+ path: {
2187
+ /**
2188
+ * Miner hotkey
2189
+ */
2190
+ hotkey: string;
2191
+ };
2192
+ };
2193
+ type ClearMinerCooldownResponse = ({
2194
+ [key: string]: unknown;
2195
+ });
2196
+ type ClearMinerCooldownError = (HTTPValidationError);
2154
2197
 
2155
2198
  declare const client: _hey_api_client_fetch.Client<Request, Response, unknown, _hey_api_client_fetch.RequestOptions<boolean, string>>;
2156
2199
  /**
@@ -2223,6 +2266,11 @@ declare const getRunningEvaluations: <ThrowOnError extends boolean = false>(opti
2223
2266
  * Get all open work items awaiting validator evaluations, with queue summary.
2224
2267
  */
2225
2268
  declare const getPendingEvaluations: <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetPendingEvaluationsData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<PendingEvaluationsResponse, HTTPValidationError, ThrowOnError>;
2269
+ /**
2270
+ * Join waitlist
2271
+ * Submit an email to join the ORO waitlist.
2272
+ */
2273
+ declare const joinWaitlist: <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<JoinWaitlistData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<WaitlistSignupResponse, HTTPValidationError, ThrowOnError>;
2226
2274
  /**
2227
2275
  * Request Challenge
2228
2276
  * Request a challenge for wallet authentication.
@@ -2316,11 +2364,16 @@ declare const unbanValidator: <ThrowOnError extends boolean = false>(options: Op
2316
2364
  /**
2317
2365
  * Discard an agent version from leaderboard
2318
2366
  * Discard an agent version from the leaderboard (reversible tombstone).
2367
+ *
2368
+ * Also cancels any active evaluation runs and closes the work item
2369
+ * to prevent the validator from claiming new work for this version.
2319
2370
  */
2320
2371
  declare const discardAgentVersion: <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DiscardAgentVersionData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<DiscardResponse, DiscardAgentVersionError, ThrowOnError>;
2321
2372
  /**
2322
2373
  * Reinstate a discarded agent version
2323
2374
  * Reinstate a previously discarded agent version.
2375
+ *
2376
+ * Also reopens the work item so validators can claim work again.
2324
2377
  */
2325
2378
  declare const reinstateAgentVersion: <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ReinstateAgentVersionData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<DiscardResponse, ReinstateAgentVersionError, ThrowOnError>;
2326
2379
  /**
@@ -2383,6 +2436,11 @@ declare const getAuditEvents: <ThrowOnError extends boolean = false>(options?: O
2383
2436
  * consistent visibility across all replicas.
2384
2437
  */
2385
2438
  declare const getReaperStats: <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => _hey_api_client_fetch.RequestResult<ReaperStatsResponse, unknown, ThrowOnError>;
2439
+ /**
2440
+ * Clear miner cooldown
2441
+ * Clear the submission cooldown for a miner.
2442
+ */
2443
+ declare const clearMinerCooldown: <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ClearMinerCooldownData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<ClearMinerCooldownResponse, HTTPValidationError, ThrowOnError>;
2386
2444
 
2387
2445
  /**
2388
2446
  * Auto-generated error code type.
@@ -2615,6 +2673,15 @@ declare function configurePublicClient(baseUrl: string, retryConfig?: RetryConfi
2615
2673
  * and logout — matching the convenience of the Python SDK's BittensorAuthClient.
2616
2674
  */
2617
2675
 
2676
+ /**
2677
+ * A serializable snapshot of a session, suitable for caching
2678
+ * in sessionStorage or similar.
2679
+ */
2680
+ interface CachedSession {
2681
+ token: string;
2682
+ expiresAt: number;
2683
+ role: string;
2684
+ }
2618
2685
  /**
2619
2686
  * Configuration for session-based authentication.
2620
2687
  */
@@ -2630,6 +2697,12 @@ interface SessionAuthConfig {
2630
2697
  refreshBufferSeconds?: number;
2631
2698
  /** Called when the session has expired and cannot be refreshed. */
2632
2699
  onSessionExpired?: () => void;
2700
+ /**
2701
+ * Previously cached session to restore without re-authenticating.
2702
+ * If provided and the token hasn't expired, the manager starts
2703
+ * in an authenticated state — no login() call needed.
2704
+ */
2705
+ cachedSession?: CachedSession;
2633
2706
  }
2634
2707
  /**
2635
2708
  * Information about the current session.
@@ -2677,6 +2750,14 @@ declare class SessionAuthManager {
2677
2750
  sessionNeedsRefresh(): boolean;
2678
2751
  /** Returns current session info, or null if no active session. */
2679
2752
  getSessionInfo(): SessionInfo | null;
2753
+ /**
2754
+ * Returns a serializable snapshot of the current session for caching.
2755
+ * Returns null if no active session.
2756
+ *
2757
+ * Store the result in sessionStorage and pass it back as
2758
+ * `cachedSession` in the constructor to restore without re-authenticating.
2759
+ */
2760
+ getSessionToken(): CachedSession | null;
2680
2761
  /**
2681
2762
  * Returns authorization headers. Auto-refreshes if the session is
2682
2763
  * within the refresh buffer. Throws if not authenticated or session expired.
@@ -2712,4 +2793,4 @@ declare class SessionAuthManager {
2712
2793
  */
2713
2794
  declare function configureSessionAuth(baseUrl: string, config: SessionAuthConfig): SessionAuthManager;
2714
2795
 
2715
- export { type ActivateSuiteData, type ActivateSuiteError, type ActivateSuiteResponse, type ActivateSuiteResponse2, type AdmissionReason, type AdmissionStatus, type AgentNotFoundError, type AgentPublic, type AgentVersionHistoryEntry, type AgentVersionNotFoundError, type AgentVersionProblemsResponse, type AgentVersionPublic, type AgentVersionState, type AgentVersionStatus, type AlreadyInvalidatedError, type ArtifactDownloadRequest, type ArtifactDownloadResponse, type ArtifactNotFoundError, type ArtifactNotReleasedError, type ArtifactReleaseState, type ArtifactType, type AtCapacityError, type AuditEventEntry, type AuditEventsResponse, type BanMinerData, type BanMinerError, type BanMinerResponse, type BanRequest, type BanResponse, type BanValidatorData, type BanValidatorError, type BanValidatorResponse, type BittensorAuthConfig, type Body_submit_agent, type CancelAgentVersionData, type CancelAgentVersionError, type CancelAgentVersionResponse, type CancelRequest, type CancelResponse, type ChallengeRequest, type ChallengeResponse, type ClaimWorkError, type ClaimWorkResponse, type ClaimWorkResponse2, type CodeAnalysisError, type CompleteRunData, type CompleteRunError, type CompleteRunRequest, type CompleteRunResponse, type CompleteRunResponse2, type CooldownActiveError, type CreateSessionEndpointData, type CreateSessionEndpointError, type CreateSessionEndpointResponse, type CreateSuiteData, type CreateSuiteError, type CreateSuiteRequest, type CreateSuiteResponse, type CreateSuiteResponse2, type DiscardAgentVersionData, type DiscardAgentVersionError, type DiscardAgentVersionResponse, type DiscardRequest, type DiscardResponse, type ErrorCategory, type EvalRunNotFoundError, type EvaluationRunDetail, type EvaluationRunPublic, type EvaluationRunStatus, type EvaluationRunStatusPublic, type FileTooLargeError, type GetAgentVersionData, type GetAgentVersionError, type GetAgentVersionProblemsData, type GetAgentVersionProblemsError, type GetAgentVersionProblemsResponse, type GetAgentVersionResponse, type GetAgentVersionRunsData, type GetAgentVersionRunsError, type GetAgentVersionRunsResponse, type GetAgentVersionStatusData, type GetAgentVersionStatusError, type GetAgentVersionStatusResponse, type GetArtifactDownloadUrlData, type GetArtifactDownloadUrlError, type GetArtifactDownloadUrlResponse, type GetAuditEventsData, type GetAuditEventsError, type GetAuditEventsResponse, type GetCurrentSuiteError, type GetCurrentSuiteResponse, type GetEvaluationRunData, type GetEvaluationRunError, type GetEvaluationRunResponse, type GetLeaderboardData, type GetLeaderboardError, type GetLeaderboardResponse, type GetOwnedAgentVersionStatusData, type GetOwnedAgentVersionStatusError, type GetOwnedAgentVersionStatusResponse, type GetPendingEvaluationsData, type GetPendingEvaluationsError, type GetPendingEvaluationsResponse, type GetReaperStatsError, type GetReaperStatsResponse, type GetRunningEvaluationsError, type GetRunningEvaluationsResponse, type GetSuiteProblemsData, type GetSuiteProblemsError, type GetSuiteProblemsResponse, type GetTopAgentError, type GetTopAgentResponse, type GetValidatorsError, type GetValidatorsResponse, type HTTPValidationError, type HealthCheckError, type HealthCheckResponse, type HeartbeatData, type HeartbeatError, type HeartbeatRequest, type HeartbeatResponse, type HeartbeatResponse2, type InvalidAgentNameError, type InvalidArtifactTypeError, type InvalidFileError, type InvalidProblemIdError, type InvalidateEvaluationRunData, type InvalidateEvaluationRunError, type InvalidateEvaluationRunResponse, type InvalidateRunRequest, type LeaderboardEntry, type LeaderboardResponse, type LeaseExpiredError, type ListAgentVersionsData, type ListAgentVersionsError, type ListAgentVersionsResponse, type ListMinerAgentsError, type ListMinerAgentsResponse, type LogoutData, type LogoutError, type LogoutResponse, type LogoutResponse2, type MinerAgentsResponse, type MinerNotFoundError, type MissingParameterError, type MissingScoreError, type NoActiveSuiteError, type NotRunOwnerError, type OroErrorCode, type PendingEvaluation, type PendingEvaluationSummary, type PendingEvaluationsResponse, type PresignUploadData, type PresignUploadError, type PresignUploadRequest, type PresignUploadResponse, type PresignUploadResponse2, type ProblemNotFoundError, type ProblemProgressEntry, type ProblemProgressUpdate, type ProblemPublic, type ProblemStatus, type ProgressUpdateRequest, type ProgressUpdateResponse, type RateLimitExceededError, type ReaperStatsResponse, type ReevaluateAgentVersionData, type ReevaluateAgentVersionError, type ReevaluateAgentVersionResponse, type ReevaluateRequest, type ReevaluateResponse, type ReinstateAgentVersionData, type ReinstateAgentVersionError, type ReinstateAgentVersionResponse, type ReinstateRequest, type RequestChallengeData, type RequestChallengeError, type RequestChallengeResponse, type RetryConfig, type RetryContext, type RunAlreadyCompleteError, type RunningEvaluation, type ScoreBelowThresholdError, type SessionAuthConfig, SessionAuthManager, type SessionInfo, type SessionRequest, type SessionResponse, type SetTopAgentData, type SetTopAgentError, type SetTopAgentResponse, type SetTopRequest, type SetTopResponse, type SubmitAgentData, type SubmitAgentError, type SubmitAgentResponse, type SubmitAgentResponse2, type SuiteNotFoundError, type SuitePublic, type SuiteWithProblemsResponse, type TerminalStatus, type TopAgentResponse, type UnbanMinerData, type UnbanMinerError, type UnbanMinerResponse, type UnbanValidatorData, type UnbanValidatorError, type UnbanValidatorResponse, type UpdateProgressData, type UpdateProgressError, type UpdateProgressResponse, type ValidationError, type ValidatorCurrentAgent, type ValidatorNotFoundError, type ValidatorProblemResult, type ValidatorPublic, type ValidatorStatus, type WorkItemStatus, activateSuite, banMiner, banValidator, cancelAgentVersion, claimWork, classifyError, classifyStatus, client, completeRun, computeDelay, configureBittensorAuth, configurePublicClient, configureSessionAuth, createRetryFetch, createSessionEndpoint, createSuite, discardAgentVersion, generateAuthHeaders, getAgentVersion, getAgentVersionProblems, getAgentVersionRuns, getAgentVersionStatus, getArtifactDownloadUrl, getAuditEvents, getCurrentSuite, getErrorCode, getErrorDetail, getEvaluationRun, getLeaderboard, getOwnedAgentVersionStatus, getPendingEvaluations, getReaperStats, getRunningEvaluations, getSuiteProblems, getTopAgent, getValidators, hasDetail, hasErrorCode, healthCheck, heartbeat, invalidateEvaluationRun, isTransient, isTransientError, listAgentVersions, listMinerAgents, logout, parseRetryAfter, presignUpload, reevaluateAgentVersion, reinstateAgentVersion, requestChallenge, setTopAgent, submitAgent, unbanMiner, unbanValidator, updateProgress };
2796
+ export { type ActivateSuiteData, type ActivateSuiteError, type ActivateSuiteResponse, type ActivateSuiteResponse2, type AdmissionReason, type AdmissionStatus, type AgentNotFoundError, type AgentPublic, type AgentVersionHistoryEntry, type AgentVersionNotFoundError, type AgentVersionProblemsResponse, type AgentVersionPublic, type AgentVersionState, type AgentVersionStatus, type AlreadyInvalidatedError, type ArtifactDownloadRequest, type ArtifactDownloadResponse, type ArtifactNotFoundError, type ArtifactNotReleasedError, type ArtifactReleaseState, type ArtifactType, type AtCapacityError, type AuditEventEntry, type AuditEventsResponse, type BanMinerData, type BanMinerError, type BanMinerResponse, type BanRequest, type BanResponse, type BanValidatorData, type BanValidatorError, type BanValidatorResponse, type BittensorAuthConfig, type Body_submit_agent, type CachedSession, type CancelAgentVersionData, type CancelAgentVersionError, type CancelAgentVersionResponse, type CancelRequest, type CancelResponse, type ChallengeRequest, type ChallengeResponse, type ClaimWorkError, type ClaimWorkResponse, type ClaimWorkResponse2, type ClearMinerCooldownData, type ClearMinerCooldownError, type ClearMinerCooldownResponse, type CodeAnalysisError, type CompleteRunData, type CompleteRunError, type CompleteRunRequest, type CompleteRunResponse, type CompleteRunResponse2, type CooldownActiveError, type CreateSessionEndpointData, type CreateSessionEndpointError, type CreateSessionEndpointResponse, type CreateSuiteData, type CreateSuiteError, type CreateSuiteRequest, type CreateSuiteResponse, type CreateSuiteResponse2, type DiscardAgentVersionData, type DiscardAgentVersionError, type DiscardAgentVersionResponse, type DiscardRequest, type DiscardResponse, type ErrorCategory, type EvalRunNotFoundError, type EvaluationRunDetail, type EvaluationRunPublic, type EvaluationRunStatus, type EvaluationRunStatusPublic, type FileTooLargeError, type GetAgentVersionData, type GetAgentVersionError, type GetAgentVersionProblemsData, type GetAgentVersionProblemsError, type GetAgentVersionProblemsResponse, type GetAgentVersionResponse, type GetAgentVersionRunsData, type GetAgentVersionRunsError, type GetAgentVersionRunsResponse, type GetAgentVersionStatusData, type GetAgentVersionStatusError, type GetAgentVersionStatusResponse, type GetArtifactDownloadUrlData, type GetArtifactDownloadUrlError, type GetArtifactDownloadUrlResponse, type GetAuditEventsData, type GetAuditEventsError, type GetAuditEventsResponse, type GetCurrentSuiteError, type GetCurrentSuiteResponse, type GetEvaluationRunData, type GetEvaluationRunError, type GetEvaluationRunResponse, type GetLeaderboardData, type GetLeaderboardError, type GetLeaderboardResponse, type GetOwnedAgentVersionStatusData, type GetOwnedAgentVersionStatusError, type GetOwnedAgentVersionStatusResponse, type GetPendingEvaluationsData, type GetPendingEvaluationsError, type GetPendingEvaluationsResponse, type GetReaperStatsError, type GetReaperStatsResponse, type GetRunningEvaluationsError, type GetRunningEvaluationsResponse, type GetSuiteProblemsData, type GetSuiteProblemsError, type GetSuiteProblemsResponse, type GetTopAgentError, type GetTopAgentResponse, type GetValidatorsError, type GetValidatorsResponse, type HTTPValidationError, type HealthCheckError, type HealthCheckResponse, type HeartbeatData, type HeartbeatError, type HeartbeatRequest, type HeartbeatResponse, type HeartbeatResponse2, type InvalidAgentNameError, type InvalidArtifactTypeError, type InvalidFileError, type InvalidProblemIdError, type InvalidateEvaluationRunData, type InvalidateEvaluationRunError, type InvalidateEvaluationRunResponse, type InvalidateRunRequest, type JoinWaitlistData, type JoinWaitlistError, type JoinWaitlistResponse, type LeaderboardEntry, type LeaderboardResponse, type LeaseExpiredError, type ListAgentVersionsData, type ListAgentVersionsError, type ListAgentVersionsResponse, type ListMinerAgentsError, type ListMinerAgentsResponse, type LogoutData, type LogoutError, type LogoutResponse, type LogoutResponse2, type MinerAgentsResponse, type MinerNotFoundError, type MissingParameterError, type MissingScoreError, type NoActiveSuiteError, type NotRunOwnerError, type OroErrorCode, type PendingEvaluation, type PendingEvaluationSummary, type PendingEvaluationsResponse, type PresignUploadData, type PresignUploadError, type PresignUploadRequest, type PresignUploadResponse, type PresignUploadResponse2, type ProblemNotFoundError, type ProblemProgressEntry, type ProblemProgressUpdate, type ProblemPublic, type ProblemStatus, type ProgressUpdateRequest, type ProgressUpdateResponse, type RateLimitExceededError, type ReaperStatsResponse, type ReevaluateAgentVersionData, type ReevaluateAgentVersionError, type ReevaluateAgentVersionResponse, type ReevaluateRequest, type ReevaluateResponse, type ReinstateAgentVersionData, type ReinstateAgentVersionError, type ReinstateAgentVersionResponse, type ReinstateRequest, type RequestChallengeData, type RequestChallengeError, type RequestChallengeResponse, type RetryConfig, type RetryContext, type RunAlreadyCompleteError, type RunningEvaluation, type ScoreBelowThresholdError, type SessionAuthConfig, SessionAuthManager, type SessionInfo, type SessionRequest, type SessionResponse, type SetTopAgentData, type SetTopAgentError, type SetTopAgentResponse, type SetTopRequest, type SetTopResponse, type SubmitAgentData, type SubmitAgentError, type SubmitAgentResponse, type SubmitAgentResponse2, type SuiteNotFoundError, type SuitePublic, type SuiteWithProblemsResponse, type TerminalStatus, type TopAgentResponse, type UnbanMinerData, type UnbanMinerError, type UnbanMinerResponse, type UnbanValidatorData, type UnbanValidatorError, type UnbanValidatorResponse, type UpdateProgressData, type UpdateProgressError, type UpdateProgressResponse, type ValidationError, type ValidatorCurrentAgent, type ValidatorNotFoundError, type ValidatorProblemResult, type ValidatorPublic, type ValidatorStatus, type WaitlistSignupRequest, type WaitlistSignupResponse, type WorkItemStatus, activateSuite, banMiner, banValidator, cancelAgentVersion, claimWork, classifyError, classifyStatus, clearMinerCooldown, client, completeRun, computeDelay, configureBittensorAuth, configurePublicClient, configureSessionAuth, createRetryFetch, createSessionEndpoint, createSuite, discardAgentVersion, generateAuthHeaders, getAgentVersion, getAgentVersionProblems, getAgentVersionRuns, getAgentVersionStatus, getArtifactDownloadUrl, getAuditEvents, getCurrentSuite, getErrorCode, getErrorDetail, getEvaluationRun, getLeaderboard, getOwnedAgentVersionStatus, getPendingEvaluations, getReaperStats, getRunningEvaluations, getSuiteProblems, getTopAgent, getValidators, hasDetail, hasErrorCode, healthCheck, heartbeat, invalidateEvaluationRun, isTransient, isTransientError, joinWaitlist, listAgentVersions, listMinerAgents, logout, parseRetryAfter, presignUpload, reevaluateAgentVersion, reinstateAgentVersion, requestChallenge, setTopAgent, submitAgent, unbanMiner, unbanValidator, updateProgress };
package/dist/index.js CHANGED
@@ -38,6 +38,7 @@ __export(index_exports, {
38
38
  claimWork: () => claimWork,
39
39
  classifyError: () => classifyError,
40
40
  classifyStatus: () => classifyStatus,
41
+ clearMinerCooldown: () => clearMinerCooldown,
41
42
  client: () => client,
42
43
  completeRun: () => completeRun,
43
44
  computeDelay: () => computeDelay,
@@ -74,6 +75,7 @@ __export(index_exports, {
74
75
  invalidateEvaluationRun: () => invalidateEvaluationRun,
75
76
  isTransient: () => isTransient,
76
77
  isTransientError: () => isTransientError,
78
+ joinWaitlist: () => joinWaitlist,
77
79
  listAgentVersions: () => listAgentVersions,
78
80
  listMinerAgents: () => listMinerAgents,
79
81
  logout: () => logout,
@@ -177,6 +179,12 @@ var getPendingEvaluations = (options) => {
177
179
  url: "/v1/public/evaluations/pending"
178
180
  });
179
181
  };
182
+ var joinWaitlist = (options) => {
183
+ return (options?.client ?? client).post({
184
+ ...options,
185
+ url: "/v1/public/waitlist"
186
+ });
187
+ };
180
188
  var requestChallenge = (options) => {
181
189
  return (options?.client ?? client).post({
182
190
  ...options,
@@ -338,6 +346,12 @@ var getReaperStats = (options) => {
338
346
  url: "/v1/admin/reaper/stats"
339
347
  });
340
348
  };
349
+ var clearMinerCooldown = (options) => {
350
+ return (options?.client ?? client).post({
351
+ ...options,
352
+ url: "/v1/admin/miners/{hotkey}/clear-cooldown"
353
+ });
354
+ };
341
355
 
342
356
  // src/errors.ts
343
357
  function classifyStatus(status) {
@@ -550,6 +564,14 @@ var SessionAuthManager = class {
550
564
  this.sign = config.sign;
551
565
  this.refreshBufferSeconds = config.refreshBufferSeconds ?? 300;
552
566
  this.onSessionExpired = config.onSessionExpired;
567
+ if (config.cachedSession) {
568
+ const now = Date.now() / 1e3;
569
+ if (now < config.cachedSession.expiresAt) {
570
+ this.token = config.cachedSession.token;
571
+ this.expiresAt = config.cachedSession.expiresAt;
572
+ this.role = config.cachedSession.role;
573
+ }
574
+ }
553
575
  }
554
576
  /**
555
577
  * Perform challenge/response login flow.
@@ -626,6 +648,21 @@ var SessionAuthManager = class {
626
648
  expiresAt: this.expiresAt
627
649
  };
628
650
  }
651
+ /**
652
+ * Returns a serializable snapshot of the current session for caching.
653
+ * Returns null if no active session.
654
+ *
655
+ * Store the result in sessionStorage and pass it back as
656
+ * `cachedSession` in the constructor to restore without re-authenticating.
657
+ */
658
+ getSessionToken() {
659
+ if (!this.token || Date.now() / 1e3 >= this.expiresAt) return null;
660
+ return {
661
+ token: this.token,
662
+ expiresAt: this.expiresAt,
663
+ role: this.role
664
+ };
665
+ }
629
666
  /**
630
667
  * Returns authorization headers. Auto-refreshes if the session is
631
668
  * within the refresh buffer. Throws if not authenticated or session expired.
@@ -685,6 +722,7 @@ function configureSessionAuth(baseUrl, config) {
685
722
  claimWork,
686
723
  classifyError,
687
724
  classifyStatus,
725
+ clearMinerCooldown,
688
726
  client,
689
727
  completeRun,
690
728
  computeDelay,
@@ -721,6 +759,7 @@ function configureSessionAuth(baseUrl, config) {
721
759
  invalidateEvaluationRun,
722
760
  isTransient,
723
761
  isTransientError,
762
+ joinWaitlist,
724
763
  listAgentVersions,
725
764
  listMinerAgents,
726
765
  logout,
package/dist/index.mjs CHANGED
@@ -85,6 +85,12 @@ var getPendingEvaluations = (options) => {
85
85
  url: "/v1/public/evaluations/pending"
86
86
  });
87
87
  };
88
+ var joinWaitlist = (options) => {
89
+ return (options?.client ?? client).post({
90
+ ...options,
91
+ url: "/v1/public/waitlist"
92
+ });
93
+ };
88
94
  var requestChallenge = (options) => {
89
95
  return (options?.client ?? client).post({
90
96
  ...options,
@@ -246,6 +252,12 @@ var getReaperStats = (options) => {
246
252
  url: "/v1/admin/reaper/stats"
247
253
  });
248
254
  };
255
+ var clearMinerCooldown = (options) => {
256
+ return (options?.client ?? client).post({
257
+ ...options,
258
+ url: "/v1/admin/miners/{hotkey}/clear-cooldown"
259
+ });
260
+ };
249
261
 
250
262
  // src/errors.ts
251
263
  function classifyStatus(status) {
@@ -458,6 +470,14 @@ var SessionAuthManager = class {
458
470
  this.sign = config.sign;
459
471
  this.refreshBufferSeconds = config.refreshBufferSeconds ?? 300;
460
472
  this.onSessionExpired = config.onSessionExpired;
473
+ if (config.cachedSession) {
474
+ const now = Date.now() / 1e3;
475
+ if (now < config.cachedSession.expiresAt) {
476
+ this.token = config.cachedSession.token;
477
+ this.expiresAt = config.cachedSession.expiresAt;
478
+ this.role = config.cachedSession.role;
479
+ }
480
+ }
461
481
  }
462
482
  /**
463
483
  * Perform challenge/response login flow.
@@ -534,6 +554,21 @@ var SessionAuthManager = class {
534
554
  expiresAt: this.expiresAt
535
555
  };
536
556
  }
557
+ /**
558
+ * Returns a serializable snapshot of the current session for caching.
559
+ * Returns null if no active session.
560
+ *
561
+ * Store the result in sessionStorage and pass it back as
562
+ * `cachedSession` in the constructor to restore without re-authenticating.
563
+ */
564
+ getSessionToken() {
565
+ if (!this.token || Date.now() / 1e3 >= this.expiresAt) return null;
566
+ return {
567
+ token: this.token,
568
+ expiresAt: this.expiresAt,
569
+ role: this.role
570
+ };
571
+ }
537
572
  /**
538
573
  * Returns authorization headers. Auto-refreshes if the session is
539
574
  * within the refresh buffer. Throws if not authenticated or session expired.
@@ -592,6 +627,7 @@ export {
592
627
  claimWork,
593
628
  classifyError,
594
629
  classifyStatus,
630
+ clearMinerCooldown,
595
631
  client,
596
632
  completeRun,
597
633
  computeDelay,
@@ -628,6 +664,7 @@ export {
628
664
  invalidateEvaluationRun,
629
665
  isTransient,
630
666
  isTransientError,
667
+ joinWaitlist,
631
668
  listAgentVersions,
632
669
  listMinerAgents,
633
670
  logout,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oro-ai/sdk",
3
- "version": "0.6.9",
3
+ "version": "0.7.1",
4
4
  "description": "Official TypeScript SDK for the ORO Bittensor Subnet API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
3
  import { createClient, createConfig, type OptionsLegacyParser, formDataBodySerializer } from '@hey-api/client-fetch';
4
- import type { HealthCheckError, HealthCheckResponse, GetCurrentSuiteError, GetCurrentSuiteResponse, GetSuiteProblemsData, GetSuiteProblemsError, GetSuiteProblemsResponse, GetLeaderboardData, GetLeaderboardError, GetLeaderboardResponse, GetTopAgentError, GetTopAgentResponse, GetAgentVersionStatusData, GetAgentVersionStatusError, GetAgentVersionStatusResponse, GetAgentVersionRunsData, GetAgentVersionRunsError, GetAgentVersionRunsResponse, GetAgentVersionProblemsData, GetAgentVersionProblemsError, GetAgentVersionProblemsResponse, GetAgentVersionData, GetAgentVersionError, GetAgentVersionResponse, GetArtifactDownloadUrlData, GetArtifactDownloadUrlError, GetArtifactDownloadUrlResponse, GetEvaluationRunData, GetEvaluationRunError, GetEvaluationRunResponse, GetValidatorsError, GetValidatorsResponse, GetRunningEvaluationsError, GetRunningEvaluationsResponse, GetPendingEvaluationsData, GetPendingEvaluationsError, GetPendingEvaluationsResponse, RequestChallengeData, RequestChallengeError, RequestChallengeResponse, CreateSessionEndpointData, CreateSessionEndpointError, CreateSessionEndpointResponse, LogoutData, LogoutError, LogoutResponse2, SubmitAgentData, SubmitAgentError, SubmitAgentResponse2, ListMinerAgentsError, ListMinerAgentsResponse, ListAgentVersionsData, ListAgentVersionsError, ListAgentVersionsResponse, GetOwnedAgentVersionStatusData, GetOwnedAgentVersionStatusError, GetOwnedAgentVersionStatusResponse, ClaimWorkError, ClaimWorkResponse2, HeartbeatData, HeartbeatError, HeartbeatResponse2, UpdateProgressData, UpdateProgressError, UpdateProgressResponse, PresignUploadData, PresignUploadError, PresignUploadResponse2, CompleteRunData, CompleteRunError, CompleteRunResponse2, BanMinerData, BanMinerError, BanMinerResponse, UnbanMinerData, UnbanMinerError, UnbanMinerResponse, BanValidatorData, BanValidatorError, BanValidatorResponse, UnbanValidatorData, UnbanValidatorError, UnbanValidatorResponse, DiscardAgentVersionData, DiscardAgentVersionError, DiscardAgentVersionResponse, ReinstateAgentVersionData, ReinstateAgentVersionError, ReinstateAgentVersionResponse, SetTopAgentData, SetTopAgentError, SetTopAgentResponse, InvalidateEvaluationRunData, InvalidateEvaluationRunError, InvalidateEvaluationRunResponse, ReevaluateAgentVersionData, ReevaluateAgentVersionError, ReevaluateAgentVersionResponse, CancelAgentVersionData, CancelAgentVersionError, CancelAgentVersionResponse, CreateSuiteData, CreateSuiteError, CreateSuiteResponse2, ActivateSuiteData, ActivateSuiteError, ActivateSuiteResponse2, GetAuditEventsData, GetAuditEventsError, GetAuditEventsResponse, GetReaperStatsError, GetReaperStatsResponse } from './types.gen';
4
+ import type { HealthCheckError, HealthCheckResponse, GetCurrentSuiteError, GetCurrentSuiteResponse, GetSuiteProblemsData, GetSuiteProblemsError, GetSuiteProblemsResponse, GetLeaderboardData, GetLeaderboardError, GetLeaderboardResponse, GetTopAgentError, GetTopAgentResponse, GetAgentVersionStatusData, GetAgentVersionStatusError, GetAgentVersionStatusResponse, GetAgentVersionRunsData, GetAgentVersionRunsError, GetAgentVersionRunsResponse, GetAgentVersionProblemsData, GetAgentVersionProblemsError, GetAgentVersionProblemsResponse, GetAgentVersionData, GetAgentVersionError, GetAgentVersionResponse, GetArtifactDownloadUrlData, GetArtifactDownloadUrlError, GetArtifactDownloadUrlResponse, GetEvaluationRunData, GetEvaluationRunError, GetEvaluationRunResponse, GetValidatorsError, GetValidatorsResponse, GetRunningEvaluationsError, GetRunningEvaluationsResponse, GetPendingEvaluationsData, GetPendingEvaluationsError, GetPendingEvaluationsResponse, JoinWaitlistData, JoinWaitlistError, JoinWaitlistResponse, RequestChallengeData, RequestChallengeError, RequestChallengeResponse, CreateSessionEndpointData, CreateSessionEndpointError, CreateSessionEndpointResponse, LogoutData, LogoutError, LogoutResponse2, SubmitAgentData, SubmitAgentError, SubmitAgentResponse2, ListMinerAgentsError, ListMinerAgentsResponse, ListAgentVersionsData, ListAgentVersionsError, ListAgentVersionsResponse, GetOwnedAgentVersionStatusData, GetOwnedAgentVersionStatusError, GetOwnedAgentVersionStatusResponse, ClaimWorkError, ClaimWorkResponse2, HeartbeatData, HeartbeatError, HeartbeatResponse2, UpdateProgressData, UpdateProgressError, UpdateProgressResponse, PresignUploadData, PresignUploadError, PresignUploadResponse2, CompleteRunData, CompleteRunError, CompleteRunResponse2, BanMinerData, BanMinerError, BanMinerResponse, UnbanMinerData, UnbanMinerError, UnbanMinerResponse, BanValidatorData, BanValidatorError, BanValidatorResponse, UnbanValidatorData, UnbanValidatorError, UnbanValidatorResponse, DiscardAgentVersionData, DiscardAgentVersionError, DiscardAgentVersionResponse, ReinstateAgentVersionData, ReinstateAgentVersionError, ReinstateAgentVersionResponse, SetTopAgentData, SetTopAgentError, SetTopAgentResponse, InvalidateEvaluationRunData, InvalidateEvaluationRunError, InvalidateEvaluationRunResponse, ReevaluateAgentVersionData, ReevaluateAgentVersionError, ReevaluateAgentVersionResponse, CancelAgentVersionData, CancelAgentVersionError, CancelAgentVersionResponse, CreateSuiteData, CreateSuiteError, CreateSuiteResponse2, ActivateSuiteData, ActivateSuiteError, ActivateSuiteResponse2, GetAuditEventsData, GetAuditEventsError, GetAuditEventsResponse, GetReaperStatsError, GetReaperStatsResponse, ClearMinerCooldownData, ClearMinerCooldownError, ClearMinerCooldownResponse } from './types.gen';
5
5
 
6
6
  export const client = createClient(createConfig());
7
7
 
@@ -159,6 +159,17 @@ export const getPendingEvaluations = <ThrowOnError extends boolean = false>(opti
159
159
  });
160
160
  };
161
161
 
162
+ /**
163
+ * Join waitlist
164
+ * Submit an email to join the ORO waitlist.
165
+ */
166
+ export const joinWaitlist = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<JoinWaitlistData, ThrowOnError>) => {
167
+ return (options?.client ?? client).post<JoinWaitlistResponse, JoinWaitlistError, ThrowOnError>({
168
+ ...options,
169
+ url: '/v1/public/waitlist'
170
+ });
171
+ };
172
+
162
173
  /**
163
174
  * Request Challenge
164
175
  * Request a challenge for wallet authentication.
@@ -353,6 +364,9 @@ export const unbanValidator = <ThrowOnError extends boolean = false>(options: Op
353
364
  /**
354
365
  * Discard an agent version from leaderboard
355
366
  * Discard an agent version from the leaderboard (reversible tombstone).
367
+ *
368
+ * Also cancels any active evaluation runs and closes the work item
369
+ * to prevent the validator from claiming new work for this version.
356
370
  */
357
371
  export const discardAgentVersion = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DiscardAgentVersionData, ThrowOnError>) => {
358
372
  return (options?.client ?? client).post<DiscardAgentVersionResponse, DiscardAgentVersionError, ThrowOnError>({
@@ -364,6 +378,8 @@ export const discardAgentVersion = <ThrowOnError extends boolean = false>(option
364
378
  /**
365
379
  * Reinstate a discarded agent version
366
380
  * Reinstate a previously discarded agent version.
381
+ *
382
+ * Also reopens the work item so validators can claim work again.
367
383
  */
368
384
  export const reinstateAgentVersion = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ReinstateAgentVersionData, ThrowOnError>) => {
369
385
  return (options?.client ?? client).post<ReinstateAgentVersionResponse, ReinstateAgentVersionError, ThrowOnError>({
@@ -478,4 +494,15 @@ export const getReaperStats = <ThrowOnError extends boolean = false>(options?: O
478
494
  ...options,
479
495
  url: '/v1/admin/reaper/stats'
480
496
  });
497
+ };
498
+
499
+ /**
500
+ * Clear miner cooldown
501
+ * Clear the submission cooldown for a miner.
502
+ */
503
+ export const clearMinerCooldown = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ClearMinerCooldownData, ThrowOnError>) => {
504
+ return (options?.client ?? client).post<ClearMinerCooldownResponse, ClearMinerCooldownError, ThrowOnError>({
505
+ ...options,
506
+ url: '/v1/admin/miners/{hotkey}/clear-cooldown'
507
+ });
481
508
  };
@@ -528,6 +528,10 @@ export type CodeAnalysisError = {
528
528
  violations?: Array<{
529
529
  [key: string]: unknown;
530
530
  }>;
531
+ /**
532
+ * Seconds remaining on cooldown (if cooldown was consumed by this submission)
533
+ */
534
+ remaining_seconds?: (number | null);
531
535
  };
532
536
 
533
537
  /**
@@ -1878,6 +1882,30 @@ export type ValidatorPublic = {
1878
1882
  */
1879
1883
  export type ValidatorStatus = 'evaluating' | 'available';
1880
1884
 
1885
+ /**
1886
+ * Request body for waitlist signup.
1887
+ */
1888
+ export type WaitlistSignupRequest = {
1889
+ /**
1890
+ * Email address to add to the waitlist
1891
+ */
1892
+ email: string;
1893
+ /**
1894
+ * Signup source
1895
+ */
1896
+ source?: string;
1897
+ };
1898
+
1899
+ /**
1900
+ * Response from waitlist signup.
1901
+ */
1902
+ export type WaitlistSignupResponse = {
1903
+ /**
1904
+ * Whether signup was recorded
1905
+ */
1906
+ success: boolean;
1907
+ };
1908
+
1881
1909
  /**
1882
1910
  * Status of the work item after completion.
1883
1911
  */
@@ -2046,6 +2074,14 @@ export type GetPendingEvaluationsResponse = (PendingEvaluationsResponse);
2046
2074
 
2047
2075
  export type GetPendingEvaluationsError = (HTTPValidationError);
2048
2076
 
2077
+ export type JoinWaitlistData = {
2078
+ body: WaitlistSignupRequest;
2079
+ };
2080
+
2081
+ export type JoinWaitlistResponse = (WaitlistSignupResponse);
2082
+
2083
+ export type JoinWaitlistError = (HTTPValidationError);
2084
+
2049
2085
  export type RequestChallengeData = {
2050
2086
  body: ChallengeRequest;
2051
2087
  };
@@ -2358,4 +2394,19 @@ export type GetAuditEventsError = (HTTPValidationError);
2358
2394
 
2359
2395
  export type GetReaperStatsResponse = (ReaperStatsResponse);
2360
2396
 
2361
- export type GetReaperStatsError = unknown;
2397
+ export type GetReaperStatsError = unknown;
2398
+
2399
+ export type ClearMinerCooldownData = {
2400
+ path: {
2401
+ /**
2402
+ * Miner hotkey
2403
+ */
2404
+ hotkey: string;
2405
+ };
2406
+ };
2407
+
2408
+ export type ClearMinerCooldownResponse = ({
2409
+ [key: string]: unknown;
2410
+ });
2411
+
2412
+ export type ClearMinerCooldownError = (HTTPValidationError);