import { type RemoteWorkspaceSession } from "./remote-workspace-selection.js"; export declare const PRIVATE_PUBLICATION_MAX_BYTES: number; export interface CreatePrivateSkillInput { slug: string; displayName: string; description?: string; visibility?: "private" | "team"; confirm: true; } /** Only validated identifiers and enums are returned; server free text stays private. */ export interface CreatedPrivateSkill { id: string; slug: string; visibility: "private" | "team"; sourceType: "private_hosted"; ownerOrganizationId: string; } export type PrivatePublicationState = "awaiting_upload" | "queued" | "verifying" | "needs_attention" | "committed" | "rejected" | "cancelled" | "expired"; export interface PrivatePublicationDeclaration { idempotencyKey: string; version: string; expectedCurrentVersionId: string | null; manifestText: string; archiveSha256: string; archiveByteSize: number; } export interface PrivatePublicationView { id: string; skillId: string; version: string; expectedCurrentVersionId: string | null; archiveSha256: string; archiveByteSize: number; state: PrivatePublicationState; expiresAt: string; createdAt: string; versionId: string | null; } export interface PrivatePublishingCapability { contractVersion: 1; enabled: boolean; authentication: "interactive-session"; maxArchiveBytes: 16777216; uploadMaxTtlSeconds: 300; /** Server capability only; each execution still requires a separate quote and approval. */ executionEnabled: boolean; } /** Contains a short-lived bearer capability. Never print or persist this object. */ export interface PrivatePublicationUpload { method: "PUT"; uploadUrl: string; headers: Readonly>; expiresAt: string; } export declare class PrivatePublicationError extends Error { readonly code: string; readonly uncertain: boolean; readonly status?: number | undefined; constructor(code: string, message: string, uncertain?: boolean, status?: number | undefined); } export declare const publicationUuid: (v: unknown) => v is string; export declare const publicationSha256: (bytes: Uint8Array | string) => string; /** Validate and capture before verification or any await. Confirmation is local only. */ export declare function checkedPrivateSkillCreate(value: unknown): Omit, "confirm">; export declare function checkedPublicationDeclaration(value: unknown): PrivatePublicationDeclaration; export declare function checkedPublicationView(value: unknown, skillId: string, intentId?: string, declaration?: PrivatePublicationDeclaration): PrivatePublicationView; /** Metadata-only private history uses the existing interactive UUID route, * distinct from the public slug/API-key version contract. */ export interface PrivateSkillVersion { id: string; version: string; releasedAt: string | null; createdAt: string; } export interface PrivateSkillVersionHistory { organizationId: string; skillId: string; slug: string; currentVersion: string | null; currentVersionId: string | null; versions: readonly PrivateSkillVersion[]; nextCursor: string | null; } export interface PrivateSkillVersionHistoryOptions { limit?: number; cursor?: string; timeoutMs?: number; signal?: AbortSignal; } /** Read-only session consumer; permits viewer history without granting any publication action. * Tokens stay in a private field and are never persisted or serialized. */ export declare class RemotePrivateSkillHistoryClient { #private; readonly apiOrigin: string; readonly organizationId: string; readonly userId: string; readonly membershipId: string; constructor(apiUrl: string, session: RemoteWorkspaceSession); /** One page and one GET. Follow nextCursor explicitly; an error never prints partial history. */ listVersions(skillId: string, options?: PrivateSkillVersionHistoryOptions): Promise; } /** Explicit hosted contract, unrelated to registry publishSkill and its content revisions. * Session tokens stay in private fields and are never written to credentials. */ export declare class RemotePrivatePublicationsClient { #private; readonly apiOrigin: string; readonly organizationId: string; readonly userId: string; readonly membershipId: string; constructor(apiUrl: string, session: RemoteWorkspaceSession); /** One session-only POST. An uncertain result must be inspected, never replayed. */ createSkill(input: CreatePrivateSkillInput, options?: { timeoutMs?: number; signal?: AbortSignal; }): Promise; getCapability(options?: { timeoutMs?: number; signal?: AbortSignal; }): Promise; begin(skillId: string, input: PrivatePublicationDeclaration): Promise; get(skillId: string, intentId: string, options?: { timeoutMs?: number; signal?: AbortSignal; }): Promise; finalize(skillId: string, intentId: string): Promise; cancel(skillId: string, intentId: string): Promise; upload(skillId: string, intent: PrivatePublicationView, bytes: Uint8Array): Promise; wait(skillId: string, intentId: string, options?: { timeoutMs?: number; signal?: AbortSignal; }): Promise; }