import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { IBinaryWriter } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { IBinaryReader } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { Feature } from "../features/features.js"; /** * @generated from protobuf message replit.goval.api.repl.Buckets */ export interface Buckets { /** * Snapshots is the GCS bucket where btrfs snapshots are stored. * * @generated from protobuf field: string snapshots = 1 */ snapshots: string; /** * Metadata is the GCS bucket where OT metadata is stored. * * @generated from protobuf field: string metadata = 2 */ metadata: string; /** * DiskBlocks is the name of the GCS bucket where block device blocks are * stored for the repl. * * @generated from protobuf field: string disk_blocks = 3 */ diskBlocks: string; } /** * This message constitutes the repl metadata and define the repl we're * connecting to. All fields are required unless otherwise stated. * * @generated from protobuf message replit.goval.api.repl.Repl */ export interface Repl { /** * @generated from protobuf field: string id = 1 */ id: string; /** * @generated from protobuf field: string language = 2 */ language: string; /** * Bucket is GCS bucket where repl files are stored. * * @generated from protobuf field: string bucket = 3 */ bucket: string; /** * @generated from protobuf field: string slug = 4 */ slug: string; /** * User is the username of the user who owns the repl. This may change if a * user changes their username. * * @generated from protobuf field: string user = 5 */ user: string; /** * (Optional) The Org information associated with this Repl, and used to pass * to autocontainer to help determine what kind of GCP project to use. See * message for more info. * * @generated from protobuf field: replit.goval.api.repl.Org org = 14 */ org?: Org; /** * (Optional) The replID of a repl to be used as the source filesystem. All * writes will still go to the actual repl. This is intended to be a * replacement for guest repls, giving us cheap COW semantics so all * connections can have a real repl. * * One exception: * * It's important to note that data is not implicitly copied from src to * dest. Only what is explicitly written when talking to pid1 (either * gcsfiles or snapshots) will persist. This makes it slightly different * than just forking. * * It's unclear what the behaviour should be if: * - the dest and src repl both exist * - the dest and src are the same * - we have an src but no dest * * Consider these unsupported/undefined for now. * * @generated from protobuf field: string sourceRepl = 6 */ sourceRepl: string; /** * Database is the ID for the repldb instance that is used for this repl. If * let empty, the repl ID is used. * * @generated from protobuf field: string database = 7 */ database: string; /** * Buckets are the GCS buckets where repl contents are stored. * * @generated from protobuf field: replit.goval.api.repl.Buckets buckets = 8 */ buckets?: Buckets; /** * User ID is the user's ID from Replit web. A user's ID will never change. * * @generated from protobuf field: replit.goval.api.repl.UserId user_id = 9 */ userId?: UserId; /** * A boolean indicating if the owner of the repl is a team. * * @generated from protobuf field: bool is_team = 10 */ isTeam: boolean; /** * A list of roles for the user who owns the repl. * * @generated from protobuf field: repeated string roles = 11 */ roles: string[]; /** * JSON of fields that should be added to logs * * @generated from protobuf field: string log_fields = 13 */ logFields: string; /** * A boolean indicating if replshield should be enabled for this repl. * * @generated from protobuf field: bool use_repl_shield = 15 */ useReplShield: boolean; /** * The host for which replspace should use to talk to OpenInt * * @generated from protobuf field: string connectors_host = 16 */ connectorsHost: string; /** * Metadata that are passed into backer job as environment variables * * @generated from protobuf field: map backer_job_metadata = 17 */ backerJobMetadata: { [key: string]: string; }; /** * GCS bucket for this owner's custom skills. Empty for free owners and * for owners that have not authored any custom skills yet. * * @generated from protobuf field: string custom_skills_bucket = 18 */ customSkillsBucket: string; } /** * autocontainer needs to know if we are in a teams org * so we can create a organization GCP project to host your deployments * and cloud services. We do not support legacy org types, and a personal * org should behave as a user GCP project (the existing behavior) * * @generated from protobuf message replit.goval.api.repl.Org */ export interface Org { /** * @generated from protobuf field: string id = 1 */ id: string; /** * @generated from protobuf field: replit.goval.api.repl.Org.OrgType type = 2 */ type: Org_OrgType; /** * @generated from protobuf field: string slug = 3 */ slug: string; /** * Whether this org has an enterprise deal * * @generated from protobuf field: bool is_enterprise = 4 */ isEnterprise: boolean; } /** * Organization type. There are legacy types, but we are not * supporting them, and they should not be getting passed. * * @generated from protobuf enum replit.goval.api.repl.Org.OrgType */ export declare enum Org_OrgType { /** * @generated from protobuf enum value: TYPE_UNSPECIFIED = 0; */ TYPE_UNSPECIFIED = 0, /** * @generated from protobuf enum value: PERSONAL = 1; */ PERSONAL = 1, /** * @generated from protobuf enum value: TEAM = 2; */ TEAM = 2 } /** * @generated from protobuf message replit.goval.api.repl.UserId */ export interface UserId { /** * @generated from protobuf field: int64 id = 1 */ id: bigint; /** * @generated from protobuf field: replit.goval.api.repl.Environment environment = 2 */ environment: Environment; } /** * The resource limits that should be applied to the Repl's container. * * @generated from protobuf message replit.goval.api.repl.ResourceLimits */ export interface ResourceLimits { /** * Whether the repl has network access. * * @generated from protobuf field: bool net = 1 */ net: boolean; /** * The amount of RAM in bytes that this repl will have. * * @generated from protobuf field: int64 memory = 2 */ memory: bigint; /** * The number of cores that the container will be allowed to have. * * @generated from protobuf field: double threads = 3 */ threads: number; /** * The Docker container weight factor for the scheduler. Similar to the * `--cpu-shares` commandline flag. * * @generated from protobuf field: double shares = 4 */ shares: number; /** * The size of the disk in bytes. * * @generated from protobuf field: int64 disk = 5 */ disk: bigint; /** * The size of the disk in bytes. * * @generated from protobuf field: int64 minimum_disk = 10 */ minimumDisk: bigint; /** * The size of the scratch_disk in bytes. * * @generated from protobuf field: int64 scratch_disk = 9 */ scratchDisk: bigint; /** * @generated from protobuf field: replit.goval.api.repl.ResourceLimits.Cachability cache = 6 */ cache: ResourceLimits_Cachability; /** * If set, apply a restrictive allowlist-based network policy to the container * The container will only be able to communicate with the minimum domains * necessary to make Replit work, such as package managers. * * @generated from protobuf field: bool restrictNetwork = 7 */ restrictNetwork: boolean; } /** * Whether these limits are cachable, and if they are, by what facet of the * token. * * @generated from protobuf enum replit.goval.api.repl.ResourceLimits.Cachability */ export declare enum ResourceLimits_Cachability { /** * Do not cache these limits. * * @generated from protobuf enum value: NONE = 0; */ NONE = 0, /** * These limits can be cached and applied to this and any of the user's * other repls. * * @generated from protobuf enum value: USER = 1; */ USER = 1, /** * These limits can be cached and applied only to this repl. * * @generated from protobuf enum value: REPL = 2; */ REPL = 2 } /** * Metadata is a strict subset of ReplToken (with the same ordinals and * everything). * * @generated from protobuf message replit.goval.api.repl.Metadata */ export interface Metadata { /** * Repl is the core metadata about the Repl. The Repl that matches the ID of * this field will have all of its fields updated to match the rest of the * contents of this message. * * @generated from protobuf field: replit.goval.api.repl.Repl repl = 7 */ repl?: Repl; /** * The resource limits for the container. * * @generated from protobuf field: replit.goval.api.repl.ResourceLimits resourceLimits = 10 */ resourceLimits?: ResourceLimits; /** * The resource limits for the container, when running in interactive mode. * These limits have priority over `resourceLimits` if present, and are never * cached. * * @generated from protobuf field: replit.goval.api.repl.ResourceLimits interactiveResourceLimits = 17 */ interactiveResourceLimits?: ResourceLimits; /** * Whether to persist filesystem, metadata, or both. When connecting to an * already running/existing repl, its settings will be updated to match this * mode. * * @generated from protobuf field: replit.goval.api.repl.Persistence persistence = 6 */ persistence: Persistence; /** * Flags are handy for passing arbitrary configs along. Mostly used so * the client can try out new features * * @generated from protobuf field: repeated string flags = 14 */ flags: string[]; /** * Features enable certain capabilities that are not enabled by default, * typically because they require specific support for the feature that needs * additional setup. Not every feature can coexist with each other, and * servers should reject acquires that mix features that are incompatible with * each other. Some features also require placement (via PlaceRepl) to have * used a certain subset to acquire a machine that supports the feature. * * @generated from protobuf field: repeated replit.goval.api.features.Feature features = 16 */ features: Feature[]; /** * BuildInfo is present if this is a build repl which is allowed to convert a * repl to a container image and deploy it to Replit's deployment infra. * * @generated from protobuf field: replit.goval.api.repl.BuildInfo build_info = 18 */ buildInfo?: BuildInfo; } /** * BuildInfo includes information about which deployment this repl is allowed to * create or update. * * @generated from protobuf message replit.goval.api.repl.BuildInfo */ export interface BuildInfo { /** * ID is a unique identifier for the deployment that this builder repl is * allowed to push to. * * @generated from protobuf field: string deployment_id = 1 */ deploymentId: string; /** * URL is the replit.app URL that will be used for the deployment. * * @generated from protobuf field: string url = 2 */ url: string; /** * Build ID is a unique identifier for this particular deployment build * * @generated from protobuf field: string build_id = 3 */ buildId: string; /** * Tier refers to the GCE machine tier that will be used for the build * * @generated from protobuf field: string machine_tier = 4 */ machineTier: string; /** * The canonical repl ID this build container acts on behalf of for * authentication purposes (e.g. looking up connections in OpenInt). * Mapped to GovalReplIdentity.originReplid by replvisor. * * @generated from protobuf field: string origin_repl_id = 5 */ originReplId: string; } /** * Pid2 includes information about the pid2 payload we want to use for this * Repl. This is mostly used for development. * * @generated from protobuf message replit.goval.api.repl.Pid2Binary */ export interface Pid2Binary { /** * Version is the version that will be loaded. The full object URI is then * `gs://${bucket}/${version}` * * @generated from protobuf field: string version = 1 */ version: string; } /** * Environment is used to namespace development Replit from production Replit * since user ID collisions will occur between them. * * @generated from protobuf enum replit.goval.api.repl.Environment */ export declare enum Environment { /** * @generated from protobuf enum value: DEVELOPMENT = 0; */ DEVELOPMENT = 0, /** * @generated from protobuf enum value: PRODUCTION = 1; */ PRODUCTION = 1 } /** * Whether to persist filesystem, metadata, or both. * * @generated from protobuf enum replit.goval.api.repl.Persistence */ export declare enum Persistence { /** * This is the usual mode of operation: both filesystem and metadata will be * persisted. * * @generated from protobuf enum value: PERSISTENT = 0; */ PERSISTENT = 0, /** * The ephemeral flag indicates the repl being connected to will have a time * restriction (~1h) on stored metadata: the records in all controlplane * tables. This has the consequence that repl will be forcibly terminated * and completely evicted from the cluster as-if it never existed, and will * then be unable to wakeup or serve static traffic. This option does NOT * affect filesystem and other data persistence. * * For context, this value is used on the client when repls are created for: * - replrun * - guests * - anon users * - temp vnc repls * - users with non-verified emails * * @generated from protobuf enum value: EPHEMERAL = 1; */ EPHEMERAL = 1, /** * This indicates that the repl being connected does not have the ability to * persist files or be woken up after the lifetime of this repl expires. * * For context, this value is used on the client when repls are created for: * - replrun * - guests * - language pages * * @generated from protobuf enum value: NONE = 2; */ NONE = 2, /** * This indicates that the repl's filesystem should be mounted as read-only. * * @generated from protobuf enum value: READ_ONLY = 3; */ READ_ONLY = 3 } declare class Buckets$Type extends MessageType { constructor(); create(value?: PartialMessage): Buckets; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Buckets): Buckets; internalBinaryWrite(message: Buckets, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.repl.Buckets */ export declare const Buckets: Buckets$Type; declare class Repl$Type extends MessageType { constructor(); create(value?: PartialMessage): Repl; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Repl): Repl; private binaryReadMap17; internalBinaryWrite(message: Repl, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.repl.Repl */ export declare const Repl: Repl$Type; declare class Org$Type extends MessageType { constructor(); create(value?: PartialMessage): Org; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Org): Org; internalBinaryWrite(message: Org, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.repl.Org */ export declare const Org: Org$Type; declare class UserId$Type extends MessageType { constructor(); create(value?: PartialMessage): UserId; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserId): UserId; internalBinaryWrite(message: UserId, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.repl.UserId */ export declare const UserId: UserId$Type; declare class ResourceLimits$Type extends MessageType { constructor(); create(value?: PartialMessage): ResourceLimits; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceLimits): ResourceLimits; internalBinaryWrite(message: ResourceLimits, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.repl.ResourceLimits */ export declare const ResourceLimits: ResourceLimits$Type; declare class Metadata$Type extends MessageType { constructor(); create(value?: PartialMessage): Metadata; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Metadata): Metadata; internalBinaryWrite(message: Metadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.repl.Metadata */ export declare const Metadata: Metadata$Type; declare class BuildInfo$Type extends MessageType { constructor(); create(value?: PartialMessage): BuildInfo; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BuildInfo): BuildInfo; internalBinaryWrite(message: BuildInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.repl.BuildInfo */ export declare const BuildInfo: BuildInfo$Type; declare class Pid2Binary$Type extends MessageType { constructor(); create(value?: PartialMessage): Pid2Binary; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Pid2Binary): Pid2Binary; internalBinaryWrite(message: Pid2Binary, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.repl.Pid2Binary */ export declare const Pid2Binary: Pid2Binary$Type; export {};