import type { RegistryImage as ProtoRegistryImage, RegistryImageDetail as ProtoRegistryImageDetail, RegistryImageSummary as ProtoRegistryImageSummary, RegistryShareGrant as ProtoRegistryShareGrant, RegistryTag as ProtoRegistryTag, ResolvedRegistryRef as ProtoResolvedRegistryRef } from "./internal/proto/tenki/sandbox/v1/registry_pb.js";
import { RegistryImageKind as ProtoRegistryImageKind, RegistrySortBy as ProtoRegistrySortBy, RegistryVisibility as ProtoRegistryVisibility } from "./internal/proto/tenki/sandbox/v1/registry_pb.js";
import type { RuntimeSecretFile } from "./secret-files.js";
export type RegistryImageKind = "template" | "snapshot";
export type RegistryVisibility = "private" | "public" | "shared";
export type RegistrySortBy = "updated_at" | "name";
export interface RegistryTag {
    id: string;
    imageId: string;
    tag: string;
    snapshotId: string;
    ref: string;
    updatedAt: Date;
}
export interface RegistryImage {
    id: string;
    /** Empty for a system image, which belongs to a namespace rather than a workspace. */
    workspaceId: string;
    workspaceSlug: string;
    name: string;
    kind: RegistryImageKind;
    visibility: RegistryVisibility;
    title?: string;
    description?: string;
    labels: string[];
    sourceTemplateId?: string;
    sourceSnapshotId?: string;
    tags: RegistryTag[];
    createdAt: Date;
    updatedAt: Date;
    changesNotYetPublished: boolean;
}
export interface RegistryImageSummary {
    id: string;
    /** Empty for a system image, which belongs to a namespace rather than a workspace. */
    workspaceId: string;
    workspaceSlug: string;
    name: string;
    kind: RegistryImageKind;
    visibility: RegistryVisibility;
    labels: string[];
    tags: RegistryTag[];
    latestSnapshotId?: string;
    latestRef: string;
    updatedAt: Date;
    changesNotYetPublished: boolean;
}
export interface RegistryImageDetail {
    runtimeSecretEnv: Record<string, string>;
    runtimeSecretPolicies: string[];
    runtimeSecretFiles: RuntimeSecretFile[];
    runtimeVariableEnv: Record<string, string>;
    image?: RegistryImage;
    resolvedSnapshotId?: string;
    resolvedRef?: string;
    workspaceActive: boolean;
    tombstoned: boolean;
    maskedEnvVarKeys: string[];
    metadata: Record<string, string>;
    envVars: Record<string, string>;
}
export interface RegistryShareGrant {
    id: string;
    imageId: string;
    ownerWorkspaceId: string;
    targetWorkspaceId: string;
    currentSnapshotId: string;
    grantedViaTokenId?: string;
    acceptedBy?: string;
    acceptedAt: Date;
    revokedAt?: Date;
    followMode: string;
    followTag?: string;
}
export interface ResolvedRegistryRef {
    imageId: string;
    owningWorkspaceId: string;
    owningWorkspaceSlug: string;
    imageName: string;
    snapshotId?: string;
    resolvedRef: string;
    kind: RegistryImageKind;
    visibility: RegistryVisibility;
}
export interface RegistryPublishResult {
    image?: RegistryImage;
    tag?: RegistryTag;
    snapshotId: string;
    digestRef: string;
}
export interface RegistryListResult {
    images: RegistryImageSummary[];
    nextCursor: string;
}
export interface RegistryShareResult {
    image?: RegistryImage;
    currentSnapshotId: string;
    digestRef: string;
    grant?: RegistryShareGrant;
}
export interface RegistryUnshareResult {
    image?: RegistryImage;
    revokedTokenCount: number;
    revokedGrantCount: number;
}
export interface RegistryDeleteResult {
    image?: RegistryImage;
    revokedTokenCount: number;
    revokedGrantCount: number;
}
export interface RegistryVersionDeleteResult {
    imageId: string;
    snapshotId: string;
}
export declare function registryKindFromProto(kind: ProtoRegistryImageKind): RegistryImageKind;
export declare function registryKindToProto(kind: RegistryImageKind): ProtoRegistryImageKind;
export declare function registryVisibilityFromProto(visibility: ProtoRegistryVisibility): RegistryVisibility;
export declare function registryVisibilityToProto(visibility: RegistryVisibility): ProtoRegistryVisibility;
export declare function registrySortToProto(sort: RegistrySortBy): ProtoRegistrySortBy;
export declare function registryTagFromProto(proto: ProtoRegistryTag | undefined): RegistryTag | undefined;
export declare function registryImageFromProto(proto: ProtoRegistryImage): RegistryImage;
export declare function registryImageSummaryFromProto(proto: ProtoRegistryImageSummary): RegistryImageSummary;
export declare function registryImageDetailFromProto(proto: ProtoRegistryImageDetail | undefined): RegistryImageDetail;
export declare function resolvedRegistryRefFromProto(proto: ProtoResolvedRegistryRef | undefined): ResolvedRegistryRef;
export declare function registryShareGrantFromProto(proto: ProtoRegistryShareGrant | undefined): RegistryShareGrant | undefined;
