{"version":3,"sources":["../src/iac/index.ts","../src/iac/graph.ts","../src/iac/compatibility.ts","../src/iac/cli-version.ts","../src/iac/sdk.ts","../src/core/errors.ts","../src/core/logger.ts","../src/generated/graphql.ts","../src/core/version.ts","../src/core/graphql-client.ts","../src/core/project-token.ts","../src/core/config.ts","../src/sandbox/errors.ts","../src/core/exec-ws-client.ts","../src/sandbox/shell.ts","../src/sandbox/exec.ts","../src/core/files-ws-client.ts","../src/sandbox/files-transfer.ts","../src/sandbox/files.ts","../src/sandbox/engine.ts","../src/sandbox/template.ts","../src/sandbox/sandbox.ts","../src/flags/scope.ts","../src/flags/types.ts","../src/flags/context.ts","../src/flags/clause.ts","../src/flags/bucket.ts","../src/flags/expression.ts","../src/flags/expression-sync.ts","../src/flags/resolver.ts","../src/flags/graphql.ts","../src/flags/client.ts"],"names":["process","execFileSync","createHash","path","fileURLToPath","isAbsolute","resolve","readFileSync","callSites","dirname","print","Kind","signal","SHELL_SUBPROTOCOL","SEND_HIGH_WATER_BYTES","SEND_POLL_MS","handleBinaryFrame","sleep","normalizeSource","bytes","shellQuote","entry","template","build","engine","info","readEnv","isClause","isBucketCompare","compareBucket","value","parse","data"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,WAAA,GAAA;AAAA,QAAA,CAAA,WAAA,EAAA;AAAA,EAAA,yBAAA,EAAA,MAAA,yBAAA;AAAA,EAAA,qBAAA,EAAA,MAAA,qBAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,oBAAA,EAAA,MAAA,oBAAA;AAAA,EAAA,QAAA,EAAA,MAAA,QAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,EAAA,EAAA,MAAA,EAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,KA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eAAe,0BAAA,CACb,QACA,UAAA,EAC8B;AAC9B,EAAA,MAAM,GAAA,GAAM,UAAA,CAAW,MAAA,EAAQ,UAAU,CAAA;AACzC,EAAA,MAAM,QAAA,GAAW,eAAA,CAAgB,GAAA,CAAI,GAAG,CAAA;AACxC,EAAA,IAAI,QAAA,EAAU;AACZ,IAAA,OAAO,QAAA;AAAA,EACT;AAEA,EAAA,MAAM,UAAU,oBAAA,CAAqB,MAAA,EAAQ,UAAU,CAAA,CAAE,QAAQ,MAAM;AACrE,IAAA,eAAA,CAAgB,OAAO,GAAG,CAAA;AAAA,EAC5B,CAAC,CAAA;AACD,EAAA,eAAA,CAAgB,GAAA,CAAI,KAAK,OAAO,CAAA;AAChC,EAAA,OAAO,OAAA;AACT;AAEA,SAAS,UAAA,CACP,QACA,UAAA,EACQ;AACR,EAAA,OAAO;AAAA,IACL,MAAA,CAAO,QAAA;AAAA,IACP,UAAA,IAAc,SAAA;AAAA,IACd,MAAA,CAAO,KAAA;AAAA,IACP,aAAA,CAAc,OAAO,KAAK;AAAA,GAC5B,CAAE,KAAK,IAAI,CAAA;AACb;AAEA,SAAS,cAAc,SAAA,EAAiC;AACtD,EAAA,MAAM,GAAA,GAAM,SAAA;AACZ,EAAA,MAAM,QAAA,GAAW,QAAA,CAAS,GAAA,CAAI,GAAG,CAAA;AACjC,EAAA,IAAI,aAAa,MAAA,EAAW;AAC1B,IAAA,OAAO,QAAA;AAAA,EACT;AACA,EAAA,MAAM,EAAA,GAAK,WAAA,EAAA;AACX,EAAA,QAAA,CAAS,GAAA,CAAI,KAAK,EAAE,CAAA;AACpB,EAAA,OAAO,EAAA;AACT;AAGO,IAAM,KAAA,GAAQ,IAAI,WAAA","file":"index.cjs","sourcesContent":["export * from \"./graph.js\";\nexport * from \"./project.js\";\nexport * from \"./schema.js\";\nexport * from \"./sdk.js\";\n","import type {\n  BucketConfig,\n  BuildConfig,\n  DeployConfig,\n  EnvironmentConfig,\n  ServiceConfig,\n  ServiceNetworking,\n  ServiceSource,\n  VariableConfig,\n  VolumeConfig,\n  VolumeMount,\n} from \"./schema.js\";\n\nexport const RAILWAY_GRAPH_VERSION = 1 as const;\n\nexport type GraphVersion = typeof RAILWAY_GRAPH_VERSION;\nexport type ResourceType = \"service\" | \"database\" | \"volume\" | \"bucket\" | \"group\";\nexport type ResourceAddress = `${ResourceType}.${string}`;\n\nexport interface RailwayGraph {\n  version: GraphVersion;\n  project: ProjectNode;\n  environments: EnvironmentNode[];\n  resources: ResourceNode[];\n  edges: Edge[];\n}\n\nexport interface ProjectNode {\n  name: string;\n}\n\nexport interface EnvironmentNode {\n  name: string;\n}\n\nexport interface GraphResourceBase {\n  /** Deterministic graph handle. Remote Railway IDs live in bindings/lock state. */\n  address: ResourceAddress;\n  type: ResourceType;\n  name: string;\n  groupId?: string;\n}\n\nexport type ResourceNode = ServiceNode | DatabaseNode | VolumeNode | BucketNode | GroupNode;\n\nexport type ServiceKind = \"empty\" | \"github\" | \"docker-image\" | \"database\" | \"function\" | \"template\";\n\nexport interface SourceConfig extends ServiceSource {\n  type: \"github\" | \"image\" | \"empty\" | \"template\";\n  repo?: string | null;\n  image?: string | null;\n  template?: string | null;\n}\n\nexport interface ServiceNode extends GraphResourceBase {\n  address: `service.${string}`;\n  type: \"service\";\n  kind: ServiceKind;\n  source?: SourceConfig;\n  build?: BuildConfig;\n  deploy?: DeployConfig;\n  networking?: ServiceNetworking;\n  variables?: Record<string, VariableValue>;\n  volumeMounts?: Record<string, VolumeMount | null>;\n  // volumeConfig carries an inline-declared volume's config to the compiler, which\n  // hoists it onto the synthesized volume resource and strips it from the wire graph.\n  volumeAttachments?: Record<string, { volume: ResourceAddress; mountPath: string; backupSchedules?: VolumeMount[\"backupSchedules\"]; volumeConfig?: VolumeConfig }>;\n  configFile?: string;\n  parentServiceId?: string;\n  groupId?: string;\n  clusterRole?: ServiceConfig[\"clusterRole\"];\n  replicaConfig?: ServiceConfig[\"replicaConfig\"];\n  clusterDisplay?: ServiceConfig[\"clusterDisplay\"];\n  tracing?: ServiceConfig[\"tracing\"];\n  cdn?: ServiceConfig[\"cdn\"];\n}\n\nexport interface DatabaseNode extends Omit<ServiceNode, \"address\" | \"id\" | \"type\" | \"kind\"> {\n  address: `database.${string}`;\n  type: \"database\";\n  kind: \"database\";\n  engine: \"postgres\" | \"mysql\" | \"redis\" | \"mongo\" | \"private\";\n  image: string;\n  output: string;\n  defaultMountPath?: string;\n}\n\nexport interface VolumeNode extends GraphResourceBase {\n  address: `volume.${string}`;\n  type: \"volume\";\n  config?: VolumeConfig;\n}\n\nexport interface BucketNode extends GraphResourceBase {\n  address: `bucket.${string}`;\n  type: \"bucket\";\n  config?: BucketConfig;\n}\n\nexport interface GroupNode extends GraphResourceBase {\n  address: `group.${string}`;\n  type: \"group\";\n  color?: string;\n  icon?: string;\n  isCollapsed?: boolean;\n}\n\nexport type VariableValue =\n  | ({ type: \"literal\" } & VariableConfig)\n  | { type: \"reference\"; resource: ResourceAddress; output: string }\n  | { type: \"sharedReference\"; name: string }\n  | { type: \"preserve\" }\n  | { type: \"raw\"; value: VariableConfig };\n\nexport interface Edge {\n  from: ResourceAddress;\n  to: ResourceAddress;\n  type: \"variable\" | \"mount\" | \"group\";\n  key?: string;\n}\n\nexport type GroupableResourceNode = ResourceNode;\nexport type GroupableResourceInput = GroupableResourceNode | GroupableResourceNode[];\nexport type ProjectResourceInput = ResourceNode | ResourceNode[];\n\nexport interface ProjectDefinition {\n  name: string;\n  environments?: string[];\n  resources?: ProjectResourceInput[];\n  /** @deprecated Use resources instead. */\n  services?: ProjectResourceInput[];\n}\n\nexport interface GraphCompileOptions {\n  serviceIdsByName?: Record<string, string>;\n  existingServiceIds?: string[];\n  volumeIdsByServiceName?: Record<string, string>;\n  volumeIdsByName?: Record<string, string>;\n  bucketIdsByName?: Record<string, string>;\n}\n\nexport interface CompileResult {\n  graph: RailwayGraph;\n  desiredConfig: EnvironmentConfig;\n}\n\nexport interface GraphIndex {\n  byAddress: Map<ResourceAddress, ResourceNode>;\n  byTypeAndName: Map<`${ResourceType}:${string}`, ResourceNode>;\n}\n\nexport function resourceAddress(type: ResourceType, name: string): ResourceAddress {\n  return `${type}.${name}` as ResourceAddress;\n}\n\nexport function indexGraph(graph: RailwayGraph): GraphIndex {\n  const byAddress = new Map<ResourceAddress, ResourceNode>();\n  const byTypeAndName = new Map<`${ResourceType}:${string}`, ResourceNode>();\n\n  for (const resource of graph.resources) {\n    byAddress.set(resource.address, resource);\n    byTypeAndName.set(`${resource.type}:${resource.name}`, resource);\n  }\n\n  return { byAddress, byTypeAndName };\n}\n\nexport function validateGraph(graph: RailwayGraph): string[] {\n  const errors: string[] = [];\n  if (graph.version !== RAILWAY_GRAPH_VERSION) errors.push(`Unsupported graph version: ${graph.version}`);\n\n  const addresses = new Set<ResourceAddress>();\n  for (const resource of graph.resources) {\n    if (addresses.has(resource.address)) errors.push(`Duplicate resource address: ${resource.address}`);\n    addresses.add(resource.address);\n  }\n\n  for (const edge of graph.edges) {\n    if (!addresses.has(edge.from)) errors.push(`Edge references missing source: ${edge.from}`);\n    if (!addresses.has(edge.to)) errors.push(`Edge references missing target: ${edge.to}`);\n  }\n\n  return errors;\n}\n","export const MINIMUM_IAC_CLI_VERSION = \"5.42.1\";\nexport const MINIMUM_IAC_CLI_MESSAGE =\n  `This version of railway/iac requires Railway CLI ${MINIMUM_IAC_CLI_VERSION} or newer. ` +\n  \"Upgrade the CLI and run the command again. The IaC engine now ships in the CLI, not the TypeScript SDK.\";\n","import { execFileSync } from \"node:child_process\";\nimport process from \"node:process\";\nimport { MINIMUM_IAC_CLI_MESSAGE } from \"./compatibility.js\";\n\nexport function assertMinimumIacCliVersion(): void {\n  if (!isNativeCliEvaluation()) return;\n\n  const executable = process.env._ || \"railway\";\n  let output = \"\";\n  try {\n    output = execFileSync(executable, [\"--version\"], {\n      encoding: \"utf8\",\n      stdio: [\"ignore\", \"pipe\", \"ignore\"],\n    });\n  } catch {\n    throw new Error(MINIMUM_IAC_CLI_MESSAGE);\n  }\n\n  const version = output.match(/\\b(\\d+)\\.(\\d+)\\.(\\d+)\\b/);\n  if (!version || compareVersions(version.slice(1).map(Number), [5, 42, 1]) < 0) {\n    throw new Error(MINIMUM_IAC_CLI_MESSAGE);\n  }\n}\n\nfunction isNativeCliEvaluation(): boolean {\n  const evalFlag = process.execArgv.indexOf(\"-e\");\n  const source = evalFlag >= 0 ? process.execArgv[evalFlag + 1] : undefined;\n  return (\n    process.execArgv.includes(\"--experimental-strip-types\") &&\n    process.execArgv.includes(\"--input-type=module\") &&\n    source?.includes(\"const partial = mod.partial\") === true &&\n    source.includes(\"process.stdout.write(JSON.stringify({ partial, project: graph }))\")\n  );\n}\n\nfunction compareVersions(left: number[], right: number[]): number {\n  for (let index = 0; index < 3; index += 1) {\n    const difference = (left[index] ?? 0) - (right[index] ?? 0);\n    if (difference !== 0) return difference;\n  }\n  return 0;\n}\n","import { createHash } from \"node:crypto\";\nimport { readFileSync } from \"node:fs\";\nimport { dirname, isAbsolute, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { assertMinimumIacCliVersion } from \"./cli-version.js\";\nimport { resourceAddress } from \"./graph.js\";\nimport type {\n  BucketNode,\n  DatabaseNode,\n  GroupNode,\n  GroupableResourceInput,\n  GroupableResourceNode,\n  ProjectDefinition,\n  ProjectResourceInput,\n  ResourceNode,\n  ServiceNode,\n  SourceConfig,\n  VariableValue,\n  VolumeNode,\n} from \"./graph.js\";\nimport type {\n  AutoUpdateScheduleWindow,\n  BucketConfig,\n  BuildConfig,\n  DeployConfig,\n  ServiceConfig,\n  ServiceNetworking,\n  VariableConfig,\n  VolumeConfig,\n  VolumeMount,\n} from \"./schema.js\";\n\nassertMinimumIacCliVersion();\n\nexport interface RailwayContextInput {\n  command?: string;\n  projectId?: string;\n  projectName?: string;\n  environmentId?: string;\n  environment?: string;\n  environmentName?: string;\n}\n\nexport interface RailwayContext extends RailwayContextInput {\n  randomString: (label?: string, bytes?: number) => string;\n  isEnvironment: (name: string) => boolean;\n  shared: SharedVariableRef;\n}\n\nexport type RailwayProgram = (\n  ctx: RailwayContext,\n  project: (name: string, definition: Omit<ProjectDefinition, \"name\">) => ProjectDefinition,\n) => ProjectDefinition | Promise<ProjectDefinition>;\n\nexport function defineRailway(program: RailwayProgram): RailwayProgram {\n  return program;\n}\n\nexport const define = defineRailway;\n\nexport function project(name: string, definition: Omit<ProjectDefinition, \"name\">): ProjectDefinition {\n  const resources = (definition.resources ?? definition.services ?? []).flat();\n  return { name, ...definition, resources };\n}\n\nexport function createRailwayContext(input: RailwayContextInput = {}): RailwayContext {\n  const environment = input.environment ?? input.environmentName;\n  return {\n    ...input,\n    ...(environment ? { environment, environmentName: environment } : {}),\n    randomString: (label = \"random\", bytes = 12) =>\n      createHash(\"sha256\").update(`railway-iac:${environment ?? \"default\"}:${label}`).digest(\"hex\").slice(0, bytes * 2),\n    isEnvironment: (name: string) => environment === name,\n    shared: createSharedVariableRefs(),\n  };\n}\n\nexport type RegionConfig = number | { count?: number; replicas?: number; stacker?: string | null };\n\nexport interface IntentServiceConfig {\n  source?: SourceConfig | Omit<SourceConfig, \"type\">;\n  root?: string;\n  rootDirectory?: string;\n  build?: string | BuildConfig;\n  deploy?: DeployConfig;\n  run?: { command?: string; preDeploy?: string | string[]; healthcheck?: string; healthcheckTimeout?: number };\n  start?: string;\n  startCommand?: string;\n  preDeploy?: string | string[];\n  preDeployCommand?: string | string[];\n  healthcheck?: string;\n  healthcheckPath?: string;\n  healthcheckTimeout?: number;\n  replicas?: number | Record<string, RegionConfig>;\n  regions?: Record<string, RegionConfig>;\n  networking?: ServiceNetworking;\n  domains?: Array<string | { domain: string; port?: number }>;\n  tcp?: Array<string | number>;\n  tcpProxies?: string[];\n  env?: Record<string, string | VariableConfig | VariableValue>;\n  variables?: Record<string, string | VariableConfig | VariableValue>;\n  volumeMounts?: Record<string, VolumeMount | null | VolumeNode>;\n  configFile?: string;\n  parentServiceId?: string;\n  groupId?: string;\n  clusterRole?: ServiceConfig[\"clusterRole\"];\n  replicaConfig?: ServiceConfig[\"replicaConfig\"];\n  clusterDisplay?: ServiceConfig[\"clusterDisplay\"];\n  tracing?: ServiceConfig[\"tracing\"];\n  cdn?: ServiceConfig[\"cdn\"];\n}\n\nexport type ServiceConfigInput = IntentServiceConfig;\n\nexport type RailwayProvidedVariable =\n  | \"RAILWAY_PUBLIC_DOMAIN\"\n  | \"RAILWAY_PRIVATE_DOMAIN\"\n  | \"RAILWAY_TCP_PROXY_DOMAIN\"\n  | \"RAILWAY_TCP_PROXY_PORT\"\n  | \"RAILWAY_DEPLOYMENT_ID\"\n  | \"RAILWAY_DEPLOYMENT_DRAINING_SECONDS\"\n  | \"RAILWAY_ENVIRONMENT\"\n  | \"RAILWAY_ENVIRONMENT_ID\"\n  | \"RAILWAY_PROJECT_ID\"\n  | \"RAILWAY_PROJECT_NAME\"\n  | \"RAILWAY_SERVICE_ID\"\n  | \"RAILWAY_SERVICE_NAME\"\n  | \"RAILWAY_REPLICA_ID\"\n  | \"PORT\";\n\nexport type PostgresVariable = RailwayProvidedVariable | \"DATABASE_PUBLIC_URL\" | \"DATABASE_URL\" | \"PGDATA\" | \"PGDATABASE\" | \"PGHOST\" | \"PGPASSWORD\" | \"PGPORT\" | \"PGUSER\" | \"POSTGRES_DB\" | \"POSTGRES_PASSWORD\" | \"POSTGRES_USER\" | \"SSL_CERT_DAYS\";\nexport type RedisVariable = RailwayProvidedVariable | \"REDIS_PASSWORD\" | \"REDIS_PUBLIC_URL\" | \"REDIS_URL\" | \"REDISHOST\" | \"REDISPASSWORD\" | \"REDISPORT\" | \"REDISUSER\";\nexport type MongoVariable = RailwayProvidedVariable | \"MONGO_INITDB_ROOT_PASSWORD\" | \"MONGO_INITDB_ROOT_USERNAME\" | \"MONGO_PUBLIC_URL\" | \"MONGO_URL\" | \"MONGOHOST\" | \"MONGOPASSWORD\" | \"MONGOPORT\" | \"MONGOUSER\";\nexport type MySqlVariable = RailwayProvidedVariable | \"MYSQL_DATABASE\" | \"MYSQL_PUBLIC_URL\" | \"MYSQL_ROOT_PASSWORD\" | \"MYSQL_URL\" | \"MYSQLDATABASE\" | \"MYSQLHOST\" | \"MYSQLPASSWORD\" | \"MYSQLPORT\" | \"MYSQLUSER\";\nexport type DatabaseVariable<E extends DatabaseNode[\"engine\"]> = E extends \"postgres\" ? PostgresVariable : E extends \"redis\" ? RedisVariable : E extends \"mongo\" ? MongoVariable : E extends \"mysql\" ? MySqlVariable : RailwayProvidedVariable | string;\nexport type ServiceVariableRef<K extends string = RailwayProvidedVariable | string> = { readonly [P in K]: VariableValue };\nexport type SharedVariableRef = { readonly [name: string]: VariableValue } & { readonly [name: string]: any };\nexport type ReferencableServiceNode<K extends string = RailwayProvidedVariable | string> = ServiceNode & { readonly env: ServiceVariableRef<K> };\nexport type ReferencableDatabaseNode<E extends DatabaseNode[\"engine\"]> = DatabaseNode & { readonly env: ServiceVariableRef<DatabaseVariable<E>> };\n\nexport function github(repo: string, options: Omit<SourceConfig, \"type\" | \"repo\" | \"image\" | \"autoUpdates\"> = {}): SourceConfig {\n  if ((options as { autoUpdates?: unknown }).autoUpdates !== undefined) {\n    throw new Error(\"Image auto updates are only supported for Docker image sources.\");\n  }\n  return { type: \"github\", repo, branch: options.branch ?? \"main\", ...options };\n}\n\nexport function image(imageName: string, options: Pick<SourceConfig, \"rootDirectory\" | \"autoUpdates\"> = {}): SourceConfig {\n  if (options.autoUpdates !== undefined && !supportsImageAutoUpdates(imageName)) {\n    throw new Error(\"Image auto updates are only supported for Docker Hub and GHCR images.\");\n  }\n  if (options.autoUpdates?.schedule != null) {\n    validateAutoUpdateSchedule(options.autoUpdates.schedule);\n  }\n  return { type: \"image\", image: imageName, ...options };\n}\n\n// Mirrors backboard's schedule window schema (@railway/models): day 0-6,\n// startHour 0-23, endHour 1-24 exclusive and after startHour, all integers.\n// Backboard rejects anything else at commit time; failing here surfaces the\n// mistake at authoring time with the offending window named.\nfunction validateAutoUpdateSchedule(schedule: unknown): asserts schedule is AutoUpdateScheduleWindow[] {\n  if (!Array.isArray(schedule)) {\n    throw new Error(\"Image auto update schedule must be an array of { day, startHour, endHour } windows.\");\n  }\n  schedule.forEach((window, index) => {\n    const where = `autoUpdates.schedule[${index}]`;\n    if (typeof window !== \"object\" || window === null || Array.isArray(window)) {\n      throw new Error(`${where} must be an object with day, startHour and endHour.`);\n    }\n    const { day, startHour, endHour } = window as Record<string, unknown>;\n    if (!isIntegerInRange(day, 0, 6)) {\n      throw new Error(`${where}.day must be an integer from 0 (Sunday) to 6 (Saturday) UTC.`);\n    }\n    if (!isIntegerInRange(startHour, 0, 23)) {\n      throw new Error(`${where}.startHour must be an integer UTC hour from 0 to 23.`);\n    }\n    if (!isIntegerInRange(endHour, 1, 24)) {\n      throw new Error(`${where}.endHour must be an integer UTC hour from 1 to 24 (exclusive).`);\n    }\n    if (endHour <= startHour) {\n      throw new Error(`${where}.endHour must be greater than startHour; a window cannot cross midnight.`);\n    }\n  });\n}\n\nfunction isIntegerInRange(value: unknown, min: number, max: number): value is number {\n  return typeof value === \"number\" && Number.isInteger(value) && value >= min && value <= max;\n}\n\nfunction supportsImageAutoUpdates(imageName: string): boolean {\n  const normalized = imageName.trim().toLowerCase();\n  if (normalized === \"\") return false;\n  if (!normalized.includes(\"/\")) return true;\n  const registry = normalized.split(\"/\", 1)[0] ?? \"\";\n  return (!registry.includes(\".\") && !registry.includes(\":\") && registry !== \"localhost\") || registry === \"docker.io\" || registry === \"ghcr.io\";\n}\n\nexport function template(templateName: string, options: Omit<SourceConfig, \"type\" | \"template\"> = {}): SourceConfig {\n  return { type: \"template\", template: templateName, ...options };\n}\n\nexport function empty(): SourceConfig {\n  return { type: \"empty\" };\n}\n\nexport function service<const Env extends Record<string, string | VariableConfig | VariableValue> = {}>(name: string, config: Omit<ServiceConfigInput, \"env\" | \"variables\"> & { env?: Env; variables?: Env } = {}): ReferencableServiceNode<RailwayProvidedVariable | Extract<keyof Env, string>> {\n  const source = normalizeSource(config.source, config.root ?? config.rootDirectory);\n  const node = pruneEmpty({\n    address: resourceAddress(\"service\", name) as `service.${string}`,\n    type: \"service\",\n    kind: source?.type === \"github\" ? \"github\" : source?.type === \"image\" ? \"docker-image\" : source?.type === \"template\" ? \"template\" : \"empty\",\n    name,\n    ...(source ? { source } : {}),\n    build: normalizeBuild(config),\n    deploy: normalizeDeploy(config),\n    networking: normalizeNetworking(config),\n    ...(config.env || config.variables ? { variables: normalizeVariables({ ...(config.variables ?? {}), ...(config.env ?? {}) }) } : {}),\n    ...normalizeVolumeMounts(config.volumeMounts),\n    ...(config.configFile ? { configFile: config.configFile } : {}),\n    ...(config.parentServiceId ? { parentServiceId: config.parentServiceId } : {}),\n    ...(config.groupId ? { groupId: config.groupId } : {}),\n    ...(config.clusterRole ? { clusterRole: config.clusterRole } : {}),\n    ...(config.replicaConfig ? { replicaConfig: config.replicaConfig } : {}),\n    ...(config.clusterDisplay ? { clusterDisplay: config.clusterDisplay } : {}),\n    ...(config.tracing ? { tracing: config.tracing } : {}),\n    ...(config.cdn ? { cdn: config.cdn } : {}),\n  }) as ServiceNode;\n  return withVariableRefs(node) as ReferencableServiceNode<RailwayProvidedVariable | Extract<keyof Env, string>>;\n}\n\nexport type FunctionRuntime = \"bun\";\n\n// Runtime images for Railway Functions. Pinned so an authored function plans\n// the same on every machine; pass `source: image(...)` to pick another tag.\nconst FUNCTION_IMAGES: Readonly<Record<FunctionRuntime, string>> = {\n  bun: \"ghcr.io/railwayapp/function-bun:1.4.0\",\n};\n\n// A start command reaches the container as one argv string, and Linux caps a\n// single argument at MAX_ARG_STRLEN: 128 KiB counting the terminating NUL.\nconst MAX_COMMAND_BYTES = 128 * 1024 - 1;\nconst FUNCTION_START_COMMAND_PREFIX = \"./run.sh \";\n\n/**\n * Largest function source `fn()` accepts, in UTF-8 bytes: 98295. The source\n * is base64 after the `./run.sh ` prefix of that one argument, so the limit is\n * the largest whole number of 3-byte groups whose base64 still fits. The API\n * derives the same number and rejects anything larger on plan and apply.\n */\nexport const FUNCTION_SOURCE_MAX_BYTES = Math.floor((MAX_COMMAND_BYTES - FUNCTION_START_COMMAND_PREFIX.length) / 4) * 3;\n\nexport interface FunctionConfigInput extends IntentServiceConfig {\n  /**\n   * Path to the function's source file. `fn()` reads it when the config is\n   * evaluated and base64-encodes it into the deploy start command, which is\n   * how Railway stores function code; the service has no repository. A\n   * relative path resolves against the directory of the file calling `fn()`,\n   * normally `.railway/`. The file must stay within `FUNCTION_SOURCE_MAX_BYTES`.\n   */\n  codeFile?: string | URL;\n  /** Runtime image the function runs on. Defaults to `\"bun\"`. */\n  runtime?: FunctionRuntime;\n}\n\nexport function fn<const Env extends Record<string, string | VariableConfig | VariableValue> = {}>(name: string, config: Omit<FunctionConfigInput, \"env\" | \"variables\"> & { env?: Env; variables?: Env } = {}): ReferencableServiceNode<RailwayProvidedVariable | Extract<keyof Env, string>> {\n  const { codeFile, runtime, ...serviceConfig } = config;\n  if (runtime !== undefined && !Object.hasOwn(FUNCTION_IMAGES, runtime)) {\n    throw new Error(`Unknown function runtime \"${String(runtime)}\"; supported runtimes: ${Object.keys(FUNCTION_IMAGES).join(\", \")}.`);\n  }\n  if ((codeFile !== undefined || runtime !== undefined) && serviceConfig.source === undefined) {\n    serviceConfig.source = image(FUNCTION_IMAGES[runtime ?? \"bun\"]);\n  }\n  if (codeFile !== undefined) {\n    if (serviceConfig.start ?? serviceConfig.startCommand ?? serviceConfig.run?.command ?? serviceConfig.deploy?.startCommand) {\n      throw new Error(`fn(\"${name}\"): \"codeFile\" sets the start command; drop \"start\", \"startCommand\", \"run.command\" or \"deploy.startCommand\".`);\n    }\n    serviceConfig.start = functionStartCommand(readFunctionSource(name, codeFile));\n  }\n  return withVariableRefs({ ...service(name, serviceConfig), kind: \"function\" } as ServiceNode) as ReferencableServiceNode<RailwayProvidedVariable | Extract<keyof Env, string>>;\n}\n\nfunction readFunctionSource(name: string, codeFile: string | URL): string {\n  const path = codeFile instanceof URL ? fileURLToPath(codeFile) : isAbsolute(codeFile) ? codeFile : resolve(callerDirectory() ?? process.cwd(), codeFile);\n  try {\n    return readFileSync(path, \"utf8\");\n  } catch (error) {\n    throw new Error(`fn(\"${name}\"): cannot read codeFile ${path}: ${error instanceof Error ? error.message : String(error)}`);\n  }\n}\n\n// Directory of the module that called into this one: the config file, so a\n// relative `codeFile` means \"next to railway.ts\" no matter which directory\n// `railway config plan` or `node` runs from. Node's CallSite API gives file\n// names without parsing the stack text; ESM frames carry `file:` URLs (the\n// CLI imports the config with a cache-busting query, which `fileURLToPath`\n// drops). A host that overrides stack formatting or sets `stackTraceLimit`\n// to 0 yields no frames, and the caller falls back to the working directory.\nfunction callerDirectory(): string | undefined {\n  const original = Error.prepareStackTrace;\n  Error.prepareStackTrace = (_error, callSites) => callSites;\n  const stack: unknown = new Error().stack;\n  Error.prepareStackTrace = original;\n  if (!Array.isArray(stack)) return undefined;\n  const callSites = stack as NodeJS.CallSite[];\n  const self = callSites[0]?.getFileName();\n  for (const site of callSites) {\n    const file = site.getFileName();\n    if (!file || file === self || file.startsWith(\"node:\")) continue;\n    return dirname(file.startsWith(\"file:\") ? fileURLToPath(file) : file);\n  }\n  return undefined;\n}\n\n// The function image's `run.sh` decodes its argument, writes it to\n// `index.tsx` and runs it with the runtime; Railway decodes the same form to\n// show the source in the dashboard. The error text matches the API's.\nfunction functionStartCommand(code: string): string {\n  const bytes = Buffer.byteLength(code, \"utf8\");\n  if (bytes > FUNCTION_SOURCE_MAX_BYTES) {\n    throw new Error(`Function source code is ${bytes} bytes; the limit is ${FUNCTION_SOURCE_MAX_BYTES} bytes`);\n  }\n  return `${FUNCTION_START_COMMAND_PREFIX}${Buffer.from(code, \"utf8\").toString(\"base64\")}`;\n}\n\nexport interface DatabaseConfig {\n  region?: string;\n}\n\nexport function postgres(name: string, config: DatabaseConfig = {}): ReferencableDatabaseNode<\"postgres\"> {\n  return database(name, \"postgres\", {\n    image: \"ghcr.io/railwayapp-templates/postgres-ssl:18\",\n    output: \"DATABASE_URL\",\n    defaultMountPath: \"/var/lib/postgresql/data\",\n    ...config,\n  });\n}\n\nexport function mysql(name: string, config: DatabaseConfig = {}): ReferencableDatabaseNode<\"mysql\"> {\n  return database(name, \"mysql\", { image: \"mysql:9\", output: \"MYSQL_URL\", defaultMountPath: \"/var/lib/mysql\", ...config });\n}\n\nexport function redis(name: string, config: DatabaseConfig = {}): ReferencableDatabaseNode<\"redis\"> {\n  return database(name, \"redis\", { image: \"railwayapp/redis:8.2\", output: \"REDIS_URL\", defaultMountPath: \"/bitnami\", ...config });\n}\n\nexport function mongo(name: string, config: DatabaseConfig = {}): ReferencableDatabaseNode<\"mongo\"> {\n  return database(name, \"mongo\", { image: \"mongo:8\", output: \"MONGO_URL\", defaultMountPath: \"/data/db\", ...config });\n}\n\nexport function database<E extends DatabaseNode[\"engine\"]>(\n  name: string,\n  engine: E,\n  options: { image: string; output?: string; defaultMountPath?: string; region?: string },\n): ReferencableDatabaseNode<E> {\n  const output = options.output ?? \"DATABASE_URL\";\n  const node = {\n    address: resourceAddress(\"database\", name) as `database.${string}`,\n    type: \"database\",\n    kind: \"database\",\n    engine,\n    name,\n    image: options.image,\n    output,\n    defaultMountPath: options.defaultMountPath,\n    source: image(options.image),\n    ...(options.region ? { deploy: { multiRegionConfig: { [options.region]: { numReplicas: 1 } } } } : {}),\n  } as DatabaseNode;\n  return withVariableRefs(node) as ReferencableDatabaseNode<E>;\n}\n\nexport function volume(name: string, config: VolumeConfig = {}): VolumeNode {\n  return { address: resourceAddress(\"volume\", name) as `volume.${string}`, type: \"volume\", name, config };\n}\n\nexport function bucket(name: string, config: BucketConfig = {}): BucketNode {\n  return { address: resourceAddress(\"bucket\", name) as `bucket.${string}`, type: \"bucket\", name, config };\n}\n\nexport function group(name: string, resources: GroupableResourceInput[], options?: Omit<GroupNode, \"address\" | \"type\" | \"name\">): GroupableResourceNode[];\nexport function group(name: string, options?: Omit<GroupNode, \"address\" | \"type\" | \"name\">): GroupNode;\nexport function group(\n  name: string,\n  resourcesOrOptions: GroupableResourceInput[] | Omit<GroupNode, \"address\" | \"type\" | \"name\"> = {},\n  maybeOptions: Omit<GroupNode, \"address\" | \"type\" | \"name\"> = {},\n): GroupNode | GroupableResourceNode[] {\n  const resources = Array.isArray(resourcesOrOptions) ? resourcesOrOptions.flat(Infinity) as GroupableResourceNode[] : undefined;\n  const options = Array.isArray(resourcesOrOptions) ? maybeOptions : resourcesOrOptions;\n  const node: GroupNode = { address: resourceAddress(\"group\", name) as `group.${string}`, type: \"group\", name, ...options };\n  if (!resources) return node;\n  return [node, ...resources.map(resource => ({ ...resource, groupId: name }))];\n}\n\nexport function ref(resource: ResourceNode, output: string): VariableValue {\n  return variableReference(resource, output);\n}\n\nexport function preserve(): VariableValue {\n  return { type: \"preserve\" };\n}\n\nfunction variableReference(resource: ResourceNode, output: string): VariableValue {\n  return { type: \"reference\", resource: resource.address, output };\n}\n\nfunction sharedVariableReference(name: string): VariableValue {\n  return { type: \"sharedReference\", name };\n}\n\nfunction createSharedVariableRefs(): SharedVariableRef {\n  return new Proxy({} as SharedVariableRef, {\n    get(_target, property) {\n      if (typeof property !== \"string\") return undefined;\n      return sharedVariableReference(property);\n    },\n  });\n}\n\nfunction createVariableRefAccessor(resource: ResourceNode): ServiceVariableRef<string> {\n  return new Proxy({} as ServiceVariableRef<string>, {\n    get(_target, property) {\n      if (typeof property !== \"string\") return undefined;\n      return variableReference(resource, property);\n    },\n  });\n}\n\nfunction withVariableRefs<T extends ServiceNode | DatabaseNode>(node: T): T {\n  Object.defineProperty(node, \"env\", { enumerable: false, value: createVariableRefAccessor(node) });\n  return node;\n}\n\nfunction normalizeSource(source: ServiceConfigInput[\"source\"], rootDirectory?: string): SourceConfig | undefined {\n  if (source == null) return rootDirectory ? { type: \"empty\", rootDirectory } : undefined;\n  if (\"type\" in source && source.type) return pruneEmpty({ ...source, rootDirectory: source.rootDirectory ?? rootDirectory }) as SourceConfig;\n  if (\"repo\" in source && source.repo) return pruneEmpty({ type: \"github\", repo: source.repo, branch: source.branch ?? \"main\", rootDirectory }) as SourceConfig;\n  if (\"image\" in source && source.image) return pruneEmpty({ type: \"image\", image: source.image, rootDirectory }) as SourceConfig;\n  return rootDirectory ? { type: \"empty\", rootDirectory } : undefined;\n}\n\nfunction normalizeBuild(config: ServiceConfigInput): BuildConfig | undefined {\n  if (typeof config.build === \"string\") return { buildCommand: config.build };\n  return pruneEmpty({ ...config.build });\n}\n\nfunction normalizeDeploy(config: ServiceConfigInput): DeployConfig | undefined {\n  const preDeployCommand = config.preDeploy ?? config.preDeployCommand ?? config.run?.preDeploy;\n  const replicaConfig = normalizeReplicas(config.replicas, config.regions);\n  return pruneEmpty({\n    ...config.deploy,\n    startCommand: config.start ?? config.startCommand ?? config.run?.command ?? config.deploy?.startCommand,\n    preDeployCommand: Array.isArray(preDeployCommand) ? preDeployCommand : preDeployCommand ? [preDeployCommand] : config.deploy?.preDeployCommand,\n    healthcheckPath: config.healthcheck ?? config.healthcheckPath ?? config.run?.healthcheck ?? config.deploy?.healthcheckPath,\n    healthcheckTimeout: config.healthcheckTimeout ?? config.run?.healthcheckTimeout ?? config.deploy?.healthcheckTimeout,\n    ...replicaConfig,\n    multiRegionConfig: replicaConfig?.multiRegionConfig ?? config.deploy?.multiRegionConfig,\n  }) as DeployConfig | undefined;\n}\n\nfunction normalizeReplicas(replicas: ServiceConfigInput[\"replicas\"], regions: ServiceConfigInput[\"regions\"]): Pick<DeployConfig, \"numReplicas\" | \"multiRegionConfig\"> | undefined {\n  if (typeof replicas === \"number\") return { numReplicas: replicas };\n  if (replicas) return { multiRegionConfig: normalizeRegions(replicas) };\n  if (regions) return { multiRegionConfig: normalizeRegions(regions) };\n  return undefined;\n}\n\nfunction normalizeRegions(regions: Record<string, RegionConfig>): NonNullable<DeployConfig[\"multiRegionConfig\"]> {\n  return Object.fromEntries(\n    Object.entries(regions).map(([region, value]) => [\n      region,\n      typeof value === \"number\"\n        ? { numReplicas: value }\n        : (pruneEmpty({ numReplicas: value.count ?? value.replicas, stackerAssignment: value.stacker }) ?? {}),\n    ]),\n  ) as NonNullable<DeployConfig[\"multiRegionConfig\"]>;\n}\n\nfunction normalizeNetworking(config: ServiceConfigInput): ServiceNetworking | undefined {\n  const customDomains = config.domains\n    ? Object.fromEntries(config.domains.map(domain => (typeof domain === \"string\" ? [domain, { port: 8080 }] : [domain.domain, { port: domain.port ?? 8080 }])))\n    : undefined;\n  const tcpProxies = config.tcp\n    ? Object.fromEntries(config.tcp.map(port => [String(port), {}]))\n    : config.tcpProxies\n      ? Object.fromEntries(config.tcpProxies.map(port => [port, {}]))\n      : undefined;\n  return pruneEmpty({ ...config.networking, customDomains, tcpProxies }) as ServiceNetworking | undefined;\n}\n\nfunction normalizeVariables(variables: Record<string, string | VariableConfig | VariableValue>): Record<string, VariableValue> {\n  return Object.fromEntries(\n    Object.entries(variables).map(([key, value]) => {\n      if (typeof value === \"string\") return [key, { type: \"literal\", value }];\n      if (\"type\" in value) return [key, value];\n      return [key, { type: \"raw\", value }];\n    }),\n  );\n}\n\nfunction normalizeVolumeMounts(volumeMounts: ServiceConfigInput[\"volumeMounts\"]): Pick<ServiceNode, \"volumeMounts\" | \"volumeAttachments\"> {\n  if (!volumeMounts) return {};\n  const rawMounts: ServiceNode[\"volumeMounts\"] = {};\n  const attachments: NonNullable<ServiceNode[\"volumeAttachments\"]> = {};\n  for (const [key, value] of Object.entries(volumeMounts)) {\n    if (value && typeof value === \"object\" && \"type\" in value && value.type === \"volume\") {\n      attachments[value.name] = {\n        volume: value.address,\n        mountPath: key,\n        ...(value.config ? { volumeConfig: value.config } : {}),\n      };\n      continue;\n    }\n    rawMounts[key] = value as VolumeMount | null;\n  }\n  return pruneEmpty({ volumeMounts: rawMounts, volumeAttachments: attachments }) ?? {};\n}\n\nfunction pruneEmpty<T>(value: T): T | undefined {\n  if (value == null || typeof value !== \"object\") return value;\n  const entries = Object.entries(value).filter(([, child]) => child != null);\n  if (entries.length === 0) return undefined;\n  return Object.fromEntries(entries) as T;\n}\n","export interface RailwayGraphQLErrorItem {\n  message: string;\n  path?: readonly (string | number)[];\n  extensions?: Record<string, unknown>;\n  [key: string]: unknown;\n}\n\nexport class RailwayError extends Error {\n  constructor(message: string, options?: ErrorOptions) {\n    super(message, options);\n    this.name = new.target.name;\n  }\n}\n\nexport class RailwayAuthError extends RailwayError {\n  readonly variable: string;\n\n  constructor(variable: string, message?: string, options?: ErrorOptions) {\n    super(\n      message ??\n        `Missing Railway credential. Set ${variable} or pass it explicitly.`,\n      options,\n    );\n    this.variable = variable;\n  }\n}\n\n/** A WebSocket or network transport failure. */\nexport class RailwayConnectionError extends RailwayError {\n  readonly closeCode: number | undefined;\n\n  constructor(args: { message: string; closeCode?: number; cause?: unknown }) {\n    super(\n      args.message,\n      args.cause === undefined ? undefined : { cause: args.cause },\n    );\n    this.closeCode = args.closeCode;\n  }\n}\n\n/**\n * The exec connection failed before any command was sent, so nothing ran in the\n * sandbox and the exec is safe to retry.\n */\nexport class ExecNotStartedError extends RailwayConnectionError {}\n\n/**\n * The tcp-proxy closed the exec socket in answer to `exec_hello` without\n * advertising capabilities: it predates exec control. No command was sent, but\n * retrying the same request cannot succeed, so this is not an\n * `ExecNotStartedError`.\n */\nexport class ExecControlUnsupportedError extends RailwayConnectionError {}\n\n/** Stable code backboard sets in error extensions when an apply's base config is stale. */\nexport const STALE_ENVIRONMENT_BASE_CODE = \"STALE_ENVIRONMENT_BASE\";\n\n/** Thrown by IaC apply when the environment changed since the plan's base snapshot. */\nexport class StaleEnvironmentError extends RailwayError {}\n\nexport class RailwayGraphQLError extends RailwayError {\n  readonly status: number;\n  readonly errors: readonly RailwayGraphQLErrorItem[];\n  readonly responseBody: unknown;\n\n  constructor(args: {\n    message: string;\n    status: number;\n    errors?: readonly RailwayGraphQLErrorItem[];\n    responseBody?: unknown;\n  }) {\n    super(args.message);\n    this.status = args.status;\n    this.errors = args.errors ?? [];\n    this.responseBody = args.responseBody;\n  }\n}\n","/**\n * Opt-in verbose logging. A no-op unless enabled, so call sites stay\n * branch-free: `config.log(...)` does nothing when verbose is off.\n */\nexport type Logger = (message: string) => void;\n\nconst NOOP: Logger = () => {};\n\n/**\n * Returns a logger that writes `[railway] <message>` lines to stderr, or a\n * no-op when `verbose` is false. `console.error` exists in Node, browsers, and\n * edge runtimes, so this is safe to call anywhere.\n */\nexport function createLogger(verbose: boolean): Logger {\n  if (!verbose) return NOOP;\n  return message => console.error(`[railway] ${message}`);\n}\n","import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n  ID: { input: string; output: string; }\n  String: { input: string; output: string; }\n  Boolean: { input: boolean; output: boolean; }\n  Int: { input: number; output: number; }\n  Float: { input: number; output: number; }\n  BigInt: { input: string; output: string; }\n  CanvasConfig: { input: any; output: any; }\n  DateTime: { input: string; output: string; }\n  DeploymentDiagnosis: { input: any; output: any; }\n  DeploymentMeta: { input: any; output: any; }\n  DisplayConfig: { input: any; output: any; }\n  EnvironmentConfig: { input: any; output: any; }\n  EnvironmentVariables: { input: any; output: any; }\n  JSON: { input: unknown; output: unknown; }\n  NotificationChannelConfig: { input: any; output: any; }\n  NotificationPayload: { input: any; output: any; }\n  RailpackInfo: { input: any; output: any; }\n  SerializedTemplateConfig: { input: any; output: any; }\n  ServiceInstanceLimit: { input: any; output: any; }\n  SkippedResourceIds: { input: any; output: any; }\n  SpendCommitmentFeatureId: { input: any; output: any; }\n  SubscriptionPlanLimit: { input: any; output: any; }\n  SupportHealthMetrics: { input: any; output: any; }\n  TemplateConfig: { input: any; output: any; }\n  TemplateMetadata: { input: any; output: any; }\n  TemplateServiceConfig: { input: any; output: any; }\n  TemplateVolume: { input: any; output: any; }\n  Upload: { input: any; output: any; }\n};\n\nexport type AccessGroup = Node & {\n  __typename?: 'AccessGroup';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  members: AccessGroupMembersConnection;\n  name: Scalars['String']['output'];\n  projects: AccessGroupProjectsConnection;\n  role: ProjectRole;\n  source: AccessGroupSource;\n  updatedAt: Scalars['DateTime']['output'];\n  workspace: Workspace;\n  workspaceId: Scalars['String']['output'];\n};\n\n\nexport type AccessGroupMembersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type AccessGroupProjectsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type AccessGroupCreateInput = {\n  name: Scalars['String']['input'];\n  role: ProjectRole;\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type AccessGroupMember = Node & {\n  __typename?: 'AccessGroupMember';\n  accessGroup: AccessGroup;\n  accessGroupId: Scalars['String']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  user: User;\n  userId: Scalars['String']['output'];\n};\n\nexport type AccessGroupMemberInput = {\n  accessGroupId: Scalars['String']['input'];\n  userId: Scalars['String']['input'];\n};\n\nexport type AccessGroupMembersConnection = {\n  __typename?: 'AccessGroupMembersConnection';\n  edges: Array<AccessGroupMembersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type AccessGroupMembersConnectionEdge = {\n  __typename?: 'AccessGroupMembersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: AccessGroupMember;\n};\n\nexport type AccessGroupProject = Node & {\n  __typename?: 'AccessGroupProject';\n  accessGroup: AccessGroup;\n  accessGroupId: Scalars['String']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  project: Project;\n  projectId: Scalars['String']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type AccessGroupProjectInput = {\n  accessGroupId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type AccessGroupProjectsConnection = {\n  __typename?: 'AccessGroupProjectsConnection';\n  edges: Array<AccessGroupProjectsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type AccessGroupProjectsConnectionEdge = {\n  __typename?: 'AccessGroupProjectsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: AccessGroupProject;\n};\n\nexport type AccessGroupSource =\n  | 'MANUAL';\n\nexport type AccessGroupUpdateInput = {\n  name?: InputMaybe<Scalars['String']['input']>;\n  role?: InputMaybe<ProjectRole>;\n};\n\nexport type AccessRule = {\n  __typename?: 'AccessRule';\n  disallowed?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ActiveFeatureFlag =\n  | 'ACTIVITY_FEED_HISTORY'\n  | 'AGENT_BOOTSTRAPS'\n  | 'AGENT_BYOK'\n  | 'AGENT_BYOK_ANTHROPIC'\n  | 'AGENT_BYOK_CHATGPT'\n  | 'AGENT_BYOK_FIREWORKS'\n  | 'AGENT_BYOK_OPENAI'\n  | 'AGENT_BYOK_OPENROUTER'\n  | 'AGENT_CONNECTORS'\n  | 'AGENT_TASKS'\n  | 'CHAT_SANDBOX'\n  | 'CLEARANCE'\n  | 'CLOUD_AGENTS'\n  | 'CLOUD_AGENT_BUILDER'\n  | 'CLOUD_AGENT_CHAT'\n  | 'CS_MCP_EXPRESS'\n  | 'EMAIL_FORWARDING'\n  | 'HA_FOR_MONGO'\n  | 'IN_DASHBOARD_SUPPORT'\n  | 'MAGIC_CONFIG'\n  | 'MYSQL_PITR'\n  | 'PRIORITY_BOARDING'\n  | 'RAILWAY_AGENT_DASHBOARD'\n  | 'RAILWAY_AGENT_FEED'\n  | 'TRACING'\n  | 'USAGE_INSIGHTS'\n  | 'VM_STORAGE_TRACES';\n\nexport type ActivePlatformFlag =\n  | 'AGENT_USAGE_CH_INGEST'\n  | 'ALERT_SUS_USERS_CRON_KILLSWITCH'\n  | 'BLOCK_TRIAL_RESTRICTION_APPEALS'\n  | 'BUILDER_V4_ROLLOUT'\n  | 'BUILD_DEPLOY_QUEUE_V2'\n  | 'CAC_T0_KILLSWITCH'\n  | 'CANVAS_CROSS_ENV_GUARD_ENFORCE'\n  | 'CHAT_SANDBOX'\n  | 'CLICKHOUSE_WORKSPACE_LIMIT_ENFORCE'\n  | 'CS_MCP'\n  | 'CS_MCP_EXPRESS'\n  | 'CTRD_IMAGE_STORE_ROLLOUT'\n  | 'DEFAULT_USAGE_ALERTS'\n  | 'DEMO_PERCENTAGE_ROLLOUT'\n  | 'DEPLOYMENT_DIAGNOSIS_KILLSWITCH'\n  | 'DEPLOY_SUPERSEDE_ON_PUSH'\n  | 'DEV_STUDIO'\n  | 'DEV_STUDIO_ANON_PROVISIONS'\n  | 'DOMAIN_RECONCILE_KILLSWITCH'\n  | 'EMAIL_FORWARDING_KILLSWITCH'\n  | 'IN_DASHBOARD_SUPPORT'\n  | 'KAFKA_EPHEMERAL_ENVIRONMENT_UPDATES'\n  | 'LOGS_LONG_WINDOW_CHUNKING'\n  | 'MCP_OAUTH_AUDIENCE_ENFORCE'\n  | 'MCP_OAUTH_CIMD'\n  | 'MCP_OAUTH_SCOPE_CHALLENGES'\n  | 'MCP_OAUTH_TOKEN_ROUTE_FENCE'\n  | 'NEW_PROJECT_PAGE'\n  | 'NEW_STRIPE_WEBHOOK_VERSION_ROLLOUT'\n  | 'NUDGES'\n  | 'NUDGE_BACKUP_SCHEDULE_MISSING'\n  | 'NUDGE_FIRST_DEPLOY_FAILED'\n  | 'NUDGE_PUBLIC_DB_URL_WITHIN_PROJECT'\n  | 'NUDGE_RESUBSCRIBE_AFTER_DEAD_INVOICE'\n  | 'NUDGE_UPGRADE_TO_PRO'\n  | 'OAUTH_DCR_KILLSWITCH'\n  | 'PRE_DEPLOY_TIMEOUT_KILLSWITCH'\n  | 'PROJECT_HISTORY_DUAL_WRITE'\n  | 'RADAR_HTTP_PATTERN_DETECTION'\n  | 'RELAY_SPEND_RESERVATION_KILLSWITCH'\n  | 'REMOVE_DEPLOYMENT_COMPACT'\n  | 'SERVICEINSTANCE_DATALOADER_FOR_STATIC_URL'\n  | 'SPLIT_USAGE_QUERIES'\n  | 'SSH_ANON_PROVISIONING'\n  | 'SSH_TRIAL_GUEST_IDLE_SLEEP'\n  | 'STRIPE_INTERACTIVE_SUBSCRIPTION_ON_SESSION'\n  | 'STRIPE_METERS_NEW_ACCOUNTS'\n  | 'STRIPE_METERS_SHADOW_ENABLED'\n  | 'STRIPE_WEBHOOK_DISPUTE_CANCELLATION'\n  | 'TRIAL_RELAY_MODEL_ALLOWLIST_KILLSWITCH'\n  | 'UPDATED_VM_QUERIES'\n  | 'USAGE_CH_READS'\n  | 'VM_COUPON_MIGRATION'\n  | 'VM_USAGE_CH_INGEST'\n  | 'WORKSPACE_MCP_KILLSWITCH';\n\nexport type ActiveProjectFeatureFlag =\n  | 'PLACEHOLDER'\n  | 'RBS_VOLUMES';\n\nexport type ActiveServiceFeatureFlag =\n  | 'BUILDER_V4'\n  | 'COPY_VOLUME_TO_ENVIRONMENT'\n  | 'PLACEHOLDER'\n  | 'SKIPPED_BUILDS'\n  | 'USE_DEPLOYMENT_VMS';\n\nexport type AdoptionInfo = Node & {\n  __typename?: 'AdoptionInfo';\n  adoptionLevel?: Maybe<Scalars['Float']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  deltaLevel?: Maybe<Scalars['Float']['output']>;\n  id: Scalars['ID']['output'];\n  matchedIcpEmail?: Maybe<Scalars['String']['output']>;\n  monthlyEstimatedUsage?: Maybe<Scalars['Float']['output']>;\n  numConfigFile: Scalars['Int']['output'];\n  numCronSchedule: Scalars['Int']['output'];\n  numDeploys: Scalars['Int']['output'];\n  numEnvs: Scalars['Int']['output'];\n  numFailedDeploys: Scalars['Int']['output'];\n  numHealthcheck: Scalars['Int']['output'];\n  numIconConfig: Scalars['Int']['output'];\n  numRegion: Scalars['Int']['output'];\n  numReplicas: Scalars['Int']['output'];\n  numRootDirectory: Scalars['Int']['output'];\n  numSeats: Scalars['Int']['output'];\n  numServices: Scalars['Int']['output'];\n  numVariables: Scalars['Int']['output'];\n  numWatchPatterns: Scalars['Int']['output'];\n  totalCores?: Maybe<Scalars['Float']['output']>;\n  totalDisk?: Maybe<Scalars['Float']['output']>;\n  totalNetwork?: Maybe<Scalars['Float']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n  workspace: Workspace;\n};\n\nexport type AgentUsageLimitSetInput = {\n  hardLimitCents: Scalars['Int']['input'];\n  softLimitCents?: InputMaybe<Scalars['Int']['input']>;\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type AgentUsageSummary = {\n  __typename?: 'AgentUsageSummary';\n  billingPeriodEnd: Scalars['DateTime']['output'];\n  hardLimitCents?: Maybe<Scalars['Int']['output']>;\n  hasCustomHardLimit?: Maybe<Scalars['Boolean']['output']>;\n  softLimitCents?: Maybe<Scalars['Int']['output']>;\n  totalUsedCents: Scalars['Int']['output'];\n  usageRemaining?: Maybe<Scalars['Float']['output']>;\n};\n\n/** The aggregated usage of a single measurement. */\nexport type AggregatedUsage = {\n  __typename?: 'AggregatedUsage';\n  /** The measurement that was aggregated. */\n  measurement: MetricMeasurement;\n  /** The tags that were used to group the metric. Only the tags that were used in the `groupBy` will be present. */\n  tags: MetricTags;\n  /** The aggregated value. */\n  value: Scalars['Float']['output'];\n};\n\nexport type AllDomains = {\n  __typename?: 'AllDomains';\n  customDomains: Array<CustomDomain>;\n  serviceDomains: Array<ServiceDomain>;\n};\n\nexport type ApiToken = Node & {\n  __typename?: 'ApiToken';\n  displayToken: Scalars['String']['output'];\n  expiresAt?: Maybe<Scalars['DateTime']['output']>;\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\n/** Information about the current API token and its accessible workspaces. */\nexport type ApiTokenContext = {\n  __typename?: 'ApiTokenContext';\n  /** Workspaces this subject can operate on via this token or session. */\n  workspaces: Array<ApiTokenWorkspace>;\n};\n\nexport type ApiTokenCreateInput = {\n  name: Scalars['String']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ApiTokenRateLimit = {\n  __typename?: 'ApiTokenRateLimit';\n  remainingPoints: Scalars['Int']['output'];\n  resetsAt: Scalars['String']['output'];\n};\n\nexport type ApiTokenWorkspace = {\n  __typename?: 'ApiTokenWorkspace';\n  id: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type AppliedByMember = {\n  __typename?: 'AppliedByMember';\n  avatar?: Maybe<Scalars['String']['output']>;\n  email: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  username?: Maybe<Scalars['String']['output']>;\n};\n\nexport type AuditLog = Node & {\n  __typename?: 'AuditLog';\n  context?: Maybe<Scalars['JSON']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  environment?: Maybe<Environment>;\n  environmentId?: Maybe<Scalars['String']['output']>;\n  eventType: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  payload?: Maybe<Scalars['JSON']['output']>;\n  project?: Maybe<Project>;\n  projectId?: Maybe<Scalars['String']['output']>;\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type AuditLogEventTypeInfo = {\n  __typename?: 'AuditLogEventTypeInfo';\n  description: Scalars['String']['output'];\n  eventType: Scalars['String']['output'];\n};\n\nexport type AuditLogFilterInput = {\n  /** Filter events created on or before this date */\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  /** Filter events for a single environment */\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  /** List of event types to filter by */\n  eventTypes?: InputMaybe<Array<Scalars['String']['input']>>;\n  /** Filter events for a single project */\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  /** Filter events created on or after this date */\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\nexport type AutoUpdateScheduleWindowInput = {\n  /** UTC weekday: 0 (Sunday) through 6 (Saturday) */\n  day: Scalars['Int']['input'];\n  /** UTC hour the window closes (exclusive), 1-24 */\n  endHour: Scalars['Int']['input'];\n  /** UTC hour the window opens (inclusive), 0-23 */\n  startHour: Scalars['Int']['input'];\n};\n\nexport type BaseEnvironmentOverrideInput = {\n  baseEnvironmentOverrideId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** The billing period for a customers subscription. */\nexport type BillingPeriod = {\n  __typename?: 'BillingPeriod';\n  end: Scalars['DateTime']['output'];\n  start: Scalars['DateTime']['output'];\n};\n\nexport type BotScopeBindingInfo = {\n  __typename?: 'BotScopeBindingInfo';\n  canRemove: Scalars['Boolean']['output'];\n  id: Scalars['String']['output'];\n  platform: Scalars['String']['output'];\n  scopeId: Scalars['String']['output'];\n  scopeName?: Maybe<Scalars['String']['output']>;\n  scopeType: Scalars['String']['output'];\n  workspaceId: Scalars['String']['output'];\n  workspaceName: Scalars['String']['output'];\n};\n\nexport type Bucket = Node & {\n  __typename?: 'Bucket';\n  createdAt: Scalars['DateTime']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  groupId?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  parentServiceId?: Maybe<Scalars['String']['output']>;\n  project: Project;\n  projectId: Scalars['String']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type BucketCreateInput = {\n  /** [unimplemented] The environment to deploy the bucket instances into. If `null`, the bucket will not be deployed to any environment. `undefined` will deploy to all environments. */\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  /** The name of the bucket */\n  name?: InputMaybe<Scalars['String']['input']>;\n  /** The project to create the bucket in */\n  projectId: Scalars['String']['input'];\n};\n\nexport type BucketInstanceDetails = {\n  __typename?: 'BucketInstanceDetails';\n  objectCount: Scalars['BigInt']['output'];\n  sizeBytes: Scalars['BigInt']['output'];\n};\n\nexport type BucketS3CompatibleCredentials = {\n  __typename?: 'BucketS3CompatibleCredentials';\n  accessKeyId: Scalars['String']['output'];\n  bucketName: Scalars['String']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  endpoint: Scalars['String']['output'];\n  region: Scalars['String']['output'];\n  secretAccessKey: Scalars['String']['output'];\n  urlStyle: Scalars['String']['output'];\n};\n\nexport type BucketUpdateInput = {\n  name: Scalars['String']['input'];\n};\n\nexport type Builder =\n  | 'HEROKU'\n  | 'NIXPACKS'\n  | 'PAKETO'\n  | 'RAILPACK';\n\nexport type CdnProvider =\n  | 'DETECTED_CDN_PROVIDER_CLOUDFLARE'\n  | 'DETECTED_CDN_PROVIDER_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type CanvasViewMergePreview = {\n  __typename?: 'CanvasViewMergePreview';\n  mutations: Array<Scalars['JSON']['output']>;\n  state: Scalars['JSON']['output'];\n};\n\n/** The type of error that occurred during certificate issuance */\nexport type CertificateErrorType =\n  | 'CERTIFICATE_ERROR_TYPE_AUTHORIZATION_FAILED'\n  | 'CERTIFICATE_ERROR_TYPE_DNS_VALIDATION'\n  | 'CERTIFICATE_ERROR_TYPE_INTERNAL'\n  | 'CERTIFICATE_ERROR_TYPE_KEY_GENERATION'\n  | 'CERTIFICATE_ERROR_TYPE_ORDER_CREATION'\n  | 'CERTIFICATE_ERROR_TYPE_RATE_LIMIT'\n  | 'CERTIFICATE_ERROR_TYPE_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type CertificatePublicData = {\n  __typename?: 'CertificatePublicData';\n  domainNames: Array<Scalars['String']['output']>;\n  expiresAt?: Maybe<Scalars['DateTime']['output']>;\n  fingerprintSha256: Scalars['String']['output'];\n  issuedAt?: Maybe<Scalars['DateTime']['output']>;\n  keyType: KeyType;\n};\n\nexport type CertificateStatus =\n  | 'CERTIFICATE_STATUS_TYPE_ISSUE_FAILED'\n  | 'CERTIFICATE_STATUS_TYPE_ISSUING'\n  | 'CERTIFICATE_STATUS_TYPE_UNSPECIFIED'\n  | 'CERTIFICATE_STATUS_TYPE_VALID'\n  | 'CERTIFICATE_STATUS_TYPE_VALIDATING_OWNERSHIP'\n  | 'UNRECOGNIZED';\n\nexport type CertificateStatusDetailed =\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_CLEANING_UP'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_COMPLETE'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_CREATING_ORDER'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_DOWNLOADING_CERTIFICATE'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_FAILED'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_FETCHING_AUTHORIZATIONS'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_FINALIZING_ORDER'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_GENERATING_KEYS'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_INITIATING_CHALLENGES'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_POLLING_AUTHORIZATIONS'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_PRESENTING_CHALLENGES'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type ChangeOperationResult = {\n  __typename?: 'ChangeOperationResult';\n  kind: Scalars['String']['output'];\n  outputs?: Maybe<Scalars['JSON']['output']>;\n  path?: Maybe<Scalars['String']['output']>;\n  status: Scalars['String']['output'];\n  summary?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ChangeSetApplyResult = {\n  __typename?: 'ChangeSetApplyResult';\n  changes: Array<ChangeOperationResult>;\n  deploymentId?: Maybe<Scalars['String']['output']>;\n  diagnostics: Scalars['JSON']['output'];\n  id: Scalars['String']['output'];\n  operationId?: Maybe<Scalars['String']['output']>;\n  stagedPatchId?: Maybe<Scalars['String']['output']>;\n  status: Scalars['String']['output'];\n};\n\nexport type ChangeSetPreview = {\n  __typename?: 'ChangeSetPreview';\n  changeSet: Scalars['JSON']['output'];\n  diagnostics: Scalars['JSON']['output'];\n  effects: Scalars['JSON']['output'];\n};\n\n/** A Railway Authentication machine token: gets non-human callers past the sign-in on a project's protected services. The token itself is only returned when it's created. */\nexport type ClearanceToken = {\n  __typename?: 'ClearanceToken';\n  createdAt: Scalars['DateTime']['output'];\n  creator?: Maybe<ClearanceTokenCreator>;\n  /** Null means every environment of the project. */\n  environmentId?: Maybe<Scalars['String']['output']>;\n  environmentName?: Maybe<Scalars['String']['output']>;\n  expiresAt: Scalars['DateTime']['output'];\n  id: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type ClearanceTokenCreateInput = {\n  /** Limit the token to one persistent environment. Omit for every environment, including PR environments made later. */\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  /** Days until the token expires: 1 to 365, default 90. */\n  expiresInDays?: InputMaybe<Scalars['Int']['input']>;\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type ClearanceTokenCreatePayload = {\n  __typename?: 'ClearanceTokenCreatePayload';\n  clearanceToken: ClearanceToken;\n  /** The token. Shown this once; it isn't stored. */\n  token: Scalars['String']['output'];\n};\n\nexport type ClearanceTokenCreator = {\n  __typename?: 'ClearanceTokenCreator';\n  avatar?: Maybe<Scalars['String']['output']>;\n  email: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type CliAuthEventTrackInput = {\n  agentSessionId?: InputMaybe<Scalars['String']['input']>;\n  arch?: InputMaybe<Scalars['String']['input']>;\n  caller?: InputMaybe<Scalars['String']['input']>;\n  cliVersion?: InputMaybe<Scalars['String']['input']>;\n  errorMessage?: InputMaybe<Scalars['String']['input']>;\n  installRequestId?: InputMaybe<Scalars['String']['input']>;\n  isCi?: InputMaybe<Scalars['Boolean']['input']>;\n  os?: InputMaybe<Scalars['String']['input']>;\n  outcome: Scalars['String']['input'];\n  sessionId?: InputMaybe<Scalars['String']['input']>;\n  success: Scalars['Boolean']['input'];\n  transport: Scalars['String']['input'];\n  transportReason?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CliEventTrackInput = {\n  agentSessionId?: InputMaybe<Scalars['String']['input']>;\n  arch: Scalars['String']['input'];\n  caller?: InputMaybe<Scalars['String']['input']>;\n  cliVersion: Scalars['String']['input'];\n  command: Scalars['String']['input'];\n  durationMs: Scalars['Int']['input'];\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  errorClass?: InputMaybe<Scalars['String']['input']>;\n  errorMessage?: InputMaybe<Scalars['String']['input']>;\n  installRequestId?: InputMaybe<Scalars['String']['input']>;\n  isCi: Scalars['Boolean']['input'];\n  os: Scalars['String']['input'];\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  sessionId?: InputMaybe<Scalars['String']['input']>;\n  subCommand?: InputMaybe<Scalars['String']['input']>;\n  success: Scalars['Boolean']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** A persistent cloud agent for running coding harnesses. */\nexport type CloudAgent = {\n  __typename?: 'CloudAgent';\n  /** WebSocket endpoint of the in-VM harness gate, for the dashboard chat. Survives sleep: the domain is stable across sleep and wake. Prefers the machine observation; when that carries no gate domain it falls back to the domain network-cp actively serves, so an agent whose observation lagged still offers chat. Null on agents created before the gate existed, or asleep/absent machines. */\n  agentWsUrl?: Maybe<Scalars['String']['output']>;\n  /** Target ID for console or command execution. Null while unavailable. */\n  consoleTargetId?: Maybe<Scalars['String']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  /** The agent machine's public HTTP domain (port 8080) — the live preview. Prefers the observation (falling back to the first declared domain when 8080 was never requested); when the observation carries no domains it falls back to the domain network-cp actively serves on 8080, so a preview shows even when the observation lagged. Returns null while the machine sleeps. */\n  domain?: Maybe<Scalars['String']['output']>;\n  /** Every public domain on the agent's machine, one per port, in the order the machine declared them. */\n  domains: Array<CloudAgentDomain>;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  project: Project;\n  projectId: Scalars['String']['output'];\n  /** Region the agent's machine runs in. Null briefly after creation, before the machine has been placed. */\n  region?: Maybe<Scalars['String']['output']>;\n  /** Live coding-agent sessions, one entry per session. Retained for 24h after the last report, so a sleeping agent still shows what it was last doing. */\n  sessions: Array<CloudAgentSnapshot>;\n  /** Repo this agent's workspace was created from. Null for agents created without a source. */\n  source?: Maybe<CloudAgentSource>;\n  status: CloudAgentStatus;\n};\n\n/** A checkpoint of a cloud agent's disk. */\nexport type CloudAgentCheckpoint = {\n  __typename?: 'CloudAgentCheckpoint';\n  createdAt: Scalars['DateTime']['output'];\n  environmentId: Scalars['String']['output'];\n  /** Why the capture failed. */\n  failureReason?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  /** Region the checkpoint was captured in. */\n  region: Scalars['String']['output'];\n  status: CloudAgentCheckpointStatus;\n};\n\n/** Capture progress of a cloud agent checkpoint. */\nexport type CloudAgentCheckpointStatus =\n  | 'FAILED'\n  | 'IN_PROGRESS'\n  | 'SUCCEEDED';\n\n/** Opt-in public code endpoint, provisioned only when creating a cloud agent. */\nexport type CloudAgentCodeEndpointInput = {\n  /** Target port. Defaults to 4096; must be 1024-65535, excluding 8080 and 8790. */\n  port?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type CloudAgentCreateInput = {\n  /** Create the cloud agent from an existing checkpoint. */\n  cloudAgentCheckpointId?: InputMaybe<Scalars['String']['input']>;\n  /** Provision a code-* domain. Omit to disable, including when restoring a checkpoint or bootstrap. */\n  codeEndpoint?: InputMaybe<CloudAgentCodeEndpointInput>;\n  environmentId: Scalars['String']['input'];\n  name?: InputMaybe<Scalars['String']['input']>;\n  /** Region to run the agent in, e.g. us-west2. Defaults to the checkpoint's region when booting from one, else the workspace's preferred region. */\n  region?: InputMaybe<Scalars['String']['input']>;\n  source?: InputMaybe<CloudAgentSourceInput>;\n  variables?: InputMaybe<Scalars['JSON']['input']>;\n};\n\nexport type CloudAgentDeployResult = {\n  __typename?: 'CloudAgentDeployResult';\n  deploymentId: Scalars['String']['output'];\n  serviceId: Scalars['String']['output'];\n};\n\n/** One public domain on an agent's machine. */\nexport type CloudAgentDomain = {\n  __typename?: 'CloudAgentDomain';\n  /** Resolved FQDN. */\n  domain: Scalars['String']['output'];\n  /** Target port on the workload this domain routes to. */\n  port: Scalars['Int']['output'];\n  /** Label prefix the machine declared, e.g. app. */\n  prefix: Scalars['String']['output'];\n};\n\nexport type CloudAgentFeedbackInput = {\n  activeTools: Array<Scalars['String']['input']>;\n  agentVersion: Scalars['String']['input'];\n  cloudAgentId: Scalars['String']['input'];\n  description: Scalars['String']['input'];\n  elapsedMs?: InputMaybe<Scalars['Float']['input']>;\n  lastProgressAgeMs?: InputMaybe<Scalars['Float']['input']>;\n  model: Scalars['String']['input'];\n  reportId: Scalars['String']['input'];\n  reportedAtMs: Scalars['Float']['input'];\n  runId?: InputMaybe<Scalars['String']['input']>;\n  runStartedAtMs?: InputMaybe<Scalars['Float']['input']>;\n  sessionId: Scalars['String']['input'];\n  sessionName?: InputMaybe<Scalars['String']['input']>;\n  state: Scalars['String']['input'];\n  steps: Scalars['Int']['input'];\n  tuiVersion: Scalars['String']['input'];\n};\n\nexport type CloudAgentRepository = {\n  __typename?: 'CloudAgentRepository';\n  path: Scalars['String']['output'];\n  repo: Scalars['String']['output'];\n};\n\n/** The state of one coding agent session in a cloud agent. */\nexport type CloudAgentSnapshot = {\n  __typename?: 'CloudAgentSnapshot';\n  harness: Scalars['String']['output'];\n  lastEventKind: Scalars['String']['output'];\n  /** Truncated most recent prompt of the session, display-only. Null when the harness never reported one. */\n  latestPrompt?: Maybe<Scalars['String']['output']>;\n  /** Truncated first prompt of the session, display-only. Null when the harness never reported one. */\n  prompt?: Maybe<Scalars['String']['output']>;\n  sessionId: Scalars['String']['output'];\n  /** Durable console session name the harness ran inside. Null on older VMs that don't report it. */\n  sessionName?: Maybe<Scalars['String']['output']>;\n  /** One of: unknown, working, waiting, idle, failed, done. */\n  state: Scalars['String']['output'];\n  taskId?: Maybe<Scalars['String']['output']>;\n  terminal: Scalars['Boolean']['output'];\n  /** Generated display title for the session, display-only. Null until generated; fall back to latestPrompt, then prompt. */\n  title?: Maybe<Scalars['String']['output']>;\n  updatedAt: Scalars['String']['output'];\n};\n\nexport type CloudAgentSnapshotInput = {\n  harness: Scalars['String']['input'];\n  lastEventKind: Scalars['String']['input'];\n  latestPrompt?: InputMaybe<Scalars['String']['input']>;\n  prompt?: InputMaybe<Scalars['String']['input']>;\n  sessionId: Scalars['String']['input'];\n  sessionName?: InputMaybe<Scalars['String']['input']>;\n  state: Scalars['String']['input'];\n  taskId?: InputMaybe<Scalars['String']['input']>;\n  terminal: Scalars['Boolean']['input'];\n  updatedAt: Scalars['String']['input'];\n};\n\n/** Workspace provenance: the GitHub repo cloned into the agent's workspace at create time. */\nexport type CloudAgentSource = {\n  __typename?: 'CloudAgentSource';\n  /** Requested ref; null = the repo's default branch. */\n  branch?: Maybe<Scalars['String']['output']>;\n  /** Selected checkout directory; null means /app. */\n  dir?: Maybe<Scalars['String']['output']>;\n  /** owner/repo. */\n  repo: Scalars['String']['output'];\n  repos?: Maybe<Array<CloudAgentRepository>>;\n  /** Service the repo was resolved from, when given. */\n  serviceId?: Maybe<Scalars['String']['output']>;\n  /** Clone progress. Failed never blocks the agent; only CLONING should hold a launch. */\n  status?: Maybe<CloudAgentSourceStatus>;\n};\n\n/** Repo to clone into the agent's workspace: exactly one of repo/serviceId. */\nexport type CloudAgentSourceInput = {\n  /** Ref to check out; defaults to the repo's default branch. */\n  branch?: InputMaybe<Scalars['String']['input']>;\n  /** GitHub repo as owner/repo. */\n  repo?: InputMaybe<Scalars['String']['input']>;\n  /** Resolve the repo from this service's source. */\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CloudAgentSourceStatus =\n  | 'CLONING'\n  | 'FAILED'\n  | 'READY';\n\n/** State reported by a cloud agent. */\nexport type CloudAgentStateReportInput = {\n  agents: Array<CloudAgentSnapshotInput>;\n  cloudAgentId: Scalars['String']['input'];\n  reportedAt: Scalars['String']['input'];\n};\n\n/** The current lifecycle state of a cloud agent. */\nexport type CloudAgentStatus =\n  | 'CRASHED'\n  | 'DELETING'\n  | 'FAILED'\n  | 'RUNNING'\n  | 'SLEEPING'\n  | 'STARTING';\n\n/** Task lifecycle and correlation. Read cloudAgentTask for the latest session response. */\nexport type CloudAgentTask = {\n  __typename?: 'CloudAgentTask';\n  cloudAgentId?: Maybe<Scalars['ID']['output']>;\n  completedAt?: Maybe<Scalars['DateTime']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  createdVia: CloudAgentTaskVia;\n  error?: Maybe<Scalars['String']['output']>;\n  externalRef?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  metadata?: Maybe<Scalars['JSON']['output']>;\n  promptPreview?: Maybe<Scalars['String']['output']>;\n  requestedByUserId?: Maybe<Scalars['ID']['output']>;\n  sessionId?: Maybe<Scalars['String']['output']>;\n  startedAt?: Maybe<Scalars['DateTime']['output']>;\n  status: CloudAgentTaskStatus;\n  structuredOutput?: Maybe<Scalars['JSON']['output']>;\n  /** The turn's closing text, once it has finished. */\n  text?: Maybe<Scalars['String']['output']>;\n};\n\nexport type CloudAgentTaskCancelResult = {\n  __typename?: 'CloudAgentTaskCancelResult';\n  /** The status when cancel was requested. Poll cloudAgentTask for the outcome. */\n  status: CloudAgentTaskStatus;\n  taskId: Scalars['ID']['output'];\n};\n\nexport type CloudAgentTaskDispatchInput = {\n  agentName?: InputMaybe<Scalars['String']['input']>;\n  /** Explicit agent reuse. Omit all targets to create a fresh agent. */\n  cloudAgentId?: InputMaybe<Scalars['String']['input']>;\n  /** Up to 32 entries of {type, text?, ...scalar attributes} the model reads beside the prompt as background, not instructions: earlier messages, the page a user was on, a log excerpt. On a continued conversation, send only what is new since the last task: earlier turns are already in the session. */\n  context?: InputMaybe<Scalars['JSON']['input']>;\n  /** Your conversation's id (e.g. linear:DEMO-1). The first task starts an agent; later tasks with the same key continue its session, each waiting for the one before it to finish. Mutually exclusive with replyToTaskId and cloudAgentId/sessionId. */\n  conversationKey?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  externalRef?: InputMaybe<Scalars['String']['input']>;\n  idempotencyKey?: InputMaybe<Scalars['String']['input']>;\n  metadata?: InputMaybe<Scalars['JSON']['input']>;\n  mode?: InputMaybe<CloudAgentTaskMode>;\n  /** JSON Schema object for structured output; requires PROMPT mode. */\n  outputSchema?: InputMaybe<Scalars['JSON']['input']>;\n  projectId: Scalars['String']['input'];\n  prompt: Scalars['String']['input'];\n  /** Continue this task's original agent/session. Mutually exclusive with cloudAgentId/sessionId. */\n  replyToTaskId?: InputMaybe<Scalars['String']['input']>;\n  /** Existing session to continue; requires cloudAgentId. */\n  sessionId?: InputMaybe<Scalars['String']['input']>;\n  source?: InputMaybe<CloudAgentSourceInput>;\n  /** Also send task.progress callbacks, at most one per task every 15 seconds. */\n  webhookProgress?: InputMaybe<Scalars['Boolean']['input']>;\n  webhookSecret?: InputMaybe<Scalars['String']['input']>;\n  webhookUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CloudAgentTaskHandle = {\n  __typename?: 'CloudAgentTaskHandle';\n  cloudAgentId: Scalars['ID']['output'];\n  replayed: Scalars['Boolean']['output'];\n  sessionId: Scalars['String']['output'];\n  status: CloudAgentTaskStatus;\n  taskId: Scalars['ID']['output'];\n};\n\n/** A question the task's run is waiting on: a tool approval or an MCP server's form. */\nexport type CloudAgentTaskInteraction = {\n  __typename?: 'CloudAgentTaskInteraction';\n  actions: Array<CloudAgentTaskInteractionAction>;\n  expiresAt?: Maybe<Scalars['String']['output']>;\n  /** Elicitation: the form fields to fill for ACCEPT. */\n  fields?: Maybe<Scalars['JSON']['output']>;\n  kind: Scalars['String']['output'];\n  message?: Maybe<Scalars['String']['output']>;\n  requestId: Scalars['ID']['output'];\n  requestedAt?: Maybe<Scalars['String']['output']>;\n  /** Elicitation: the MCP server asking. */\n  server?: Maybe<Scalars['String']['output']>;\n  /** Approval: a preview of the tool call's arguments. */\n  summary?: Maybe<Scalars['JSON']['output']>;\n  /** Approval: the tool waiting to run. */\n  tool?: Maybe<Scalars['String']['output']>;\n};\n\nexport type CloudAgentTaskInteractionAction =\n  | 'ACCEPT'\n  | 'ALLOW'\n  | 'CANCEL'\n  | 'DECLINE'\n  | 'DENY';\n\nexport type CloudAgentTaskMode =\n  | 'FOLLOW_UP'\n  | 'PROMPT'\n  | 'STEER';\n\nexport type CloudAgentTaskPage = {\n  __typename?: 'CloudAgentTaskPage';\n  nextCursor?: Maybe<Scalars['String']['output']>;\n  tasks: Array<CloudAgentTask>;\n};\n\nexport type CloudAgentTaskProgress = {\n  __typename?: 'CloudAgentTaskProgress';\n  attempt?: Maybe<Scalars['Int']['output']>;\n  steps: Scalars['Int']['output'];\n  todos?: Maybe<Scalars['JSON']['output']>;\n  /** Tools running now, by name. */\n  tools: Array<Scalars['String']['output']>;\n  updatedAt: Scalars['String']['output'];\n};\n\nexport type CloudAgentTaskRespondInput = {\n  action: CloudAgentTaskInteractionAction;\n  /** Who gave the answer, for the audit log (e.g. linear:<userId>). Not verified. */\n  answeredBy?: InputMaybe<Scalars['String']['input']>;\n  /** ACCEPT only: the form values, keyed by field name. */\n  content?: InputMaybe<Scalars['JSON']['input']>;\n  /** pendingInteractions[].requestId */\n  requestId: Scalars['String']['input'];\n  taskId: Scalars['String']['input'];\n};\n\nexport type CloudAgentTaskRespondResult = {\n  __typename?: 'CloudAgentTaskRespondResult';\n  outcome: Scalars['String']['output'];\n  taskId: Scalars['ID']['output'];\n};\n\nexport type CloudAgentTaskResult = {\n  __typename?: 'CloudAgentTaskResult';\n  cloudAgentId: Scalars['ID']['output'];\n  completedAt?: Maybe<Scalars['String']['output']>;\n  error?: Maybe<Scalars['String']['output']>;\n  externalRef?: Maybe<Scalars['String']['output']>;\n  metadata?: Maybe<Scalars['JSON']['output']>;\n  /** Answer these with cloudAgentTaskRespond. */\n  pendingInteractions: Array<CloudAgentTaskInteraction>;\n  progress?: Maybe<CloudAgentTaskProgress>;\n  sessionId: Scalars['String']['output'];\n  sessionState?: Maybe<Scalars['String']['output']>;\n  status: CloudAgentTaskStatus;\n  structuredOutput?: Maybe<Scalars['JSON']['output']>;\n  taskId: Scalars['ID']['output'];\n  text?: Maybe<Scalars['String']['output']>;\n};\n\nexport type CloudAgentTaskStatus =\n  | 'AWAITING_INPUT'\n  | 'COMPLETED'\n  | 'FAILED'\n  | 'PENDING'\n  | 'RUNNING';\n\nexport type CloudAgentTaskVia =\n  | 'API'\n  | 'MCP';\n\nexport type CnameCheck = {\n  __typename?: 'CnameCheck';\n  link?: Maybe<Scalars['String']['output']>;\n  message: Scalars['String']['output'];\n  status: CnameCheckStatus;\n};\n\nexport type CnameCheckStatus =\n  | 'ERROR'\n  | 'INFO'\n  | 'INVALID'\n  | 'VALID'\n  | 'WAITING';\n\nexport type ComplianceAgreementsInfo = {\n  __typename?: 'ComplianceAgreementsInfo';\n  /** Whether the workspace has a signed Business Associate Agreement (HIPAA) */\n  hasBAA: Scalars['Boolean']['output'];\n  /** Whether the workspace has a Data Processing Agreement (GDPR) */\n  hasDPA: Scalars['Boolean']['output'];\n};\n\nexport type ConnectedServiceInstance = {\n  __typename?: 'ConnectedServiceInstance';\n  environmentId: Scalars['String']['output'];\n  projectId: Scalars['String']['output'];\n  serviceId: Scalars['String']['output'];\n  serviceName?: Maybe<Scalars['String']['output']>;\n};\n\nexport type Container = Node & {\n  __typename?: 'Container';\n  createdAt: Scalars['DateTime']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  environment: Environment;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  migratedAt?: Maybe<Scalars['DateTime']['output']>;\n  plugin: Plugin;\n  pluginId: Scalars['String']['output'];\n};\n\nexport type CreateNotificationRuleInput = {\n  channelConfigs: Array<Scalars['NotificationChannelConfig']['input']>;\n  ephemeralEnvironments?: InputMaybe<Scalars['Boolean']['input']>;\n  eventTypes: Array<Scalars['String']['input']>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  severities?: InputMaybe<Array<NotificationSeverity>>;\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type Credit = Node & {\n  __typename?: 'Credit';\n  amount: Scalars['Float']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  customerId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  memo?: Maybe<Scalars['String']['output']>;\n  type: CreditType;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type CreditType =\n  | 'APPLIED'\n  | 'CREDIT'\n  | 'DEBIT'\n  | 'STRIPE'\n  | 'TRANSFER'\n  | 'WAIVED';\n\nexport type CustomDomain = Domain & {\n  __typename?: 'CustomDomain';\n  /** @deprecated Removed; always null. */\n  cdnMode?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use the `status` field instead. */\n  cnameCheck: CnameCheck;\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  domain: Scalars['String']['output'];\n  edgeId?: Maybe<Scalars['String']['output']>;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  isRailwayDomain: Scalars['Boolean']['output'];\n  projectId?: Maybe<Scalars['String']['output']>;\n  serviceId: Scalars['String']['output'];\n  status: CustomDomainStatus;\n  syncStatus: CustomDomainSyncStatus;\n  targetPort?: Maybe<Scalars['Int']['output']>;\n  updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type CustomDomainCreateInput = {\n  domain: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n  targetPort?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type CustomDomainStatus = {\n  __typename?: 'CustomDomainStatus';\n  cdnProvider?: Maybe<CdnProvider>;\n  /** Human-readable error message when certificate issuance fails */\n  certificateErrorMessage?: Maybe<Scalars['String']['output']>;\n  /** Structured error type for programmatic handling */\n  certificateErrorType?: Maybe<CertificateErrorType>;\n  /** Whether the certificate issuance can be retried */\n  certificateRetryable?: Maybe<Scalars['Boolean']['output']>;\n  certificateStatus: CertificateStatus;\n  certificateStatusDetailed?: Maybe<CertificateStatusDetailed>;\n  certificates?: Maybe<Array<CertificatePublicData>>;\n  dnsRecords: Array<DnsRecords>;\n  verificationDnsHost?: Maybe<Scalars['String']['output']>;\n  verificationToken?: Maybe<Scalars['String']['output']>;\n  verified: Scalars['Boolean']['output'];\n};\n\nexport type CustomDomainSyncStatus =\n  | 'ACTIVE'\n  | 'CREATING'\n  | 'DELETED'\n  | 'DELETING'\n  | 'UNSPECIFIED'\n  | 'UPDATING';\n\nexport type Customer = Node & {\n  __typename?: 'Customer';\n  /** The total amount of credits that have been applied during the current billing period. */\n  appliedCredits: Scalars['Float']['output'];\n  billingAddress?: Maybe<CustomerAddress>;\n  billingEmail?: Maybe<Scalars['String']['output']>;\n  billingPeriod: BillingPeriod;\n  /** The total amount of unused credits for the customer. */\n  creditBalance: Scalars['Float']['output'];\n  credits: CustomerCreditsConnection;\n  /** The current usage for the customer. This value is cached and may not be up to date. */\n  currentUsage: Scalars['Float']['output'];\n  defaultPaymentMethod?: Maybe<PaymentMethod>;\n  defaultPaymentMethodId?: Maybe<Scalars['String']['output']>;\n  hasExhaustedFreePlan: Scalars['Boolean']['output'];\n  id: Scalars['ID']['output'];\n  invoices: Array<CustomerInvoice>;\n  isPrepaying: Scalars['Boolean']['output'];\n  isTrialing: Scalars['Boolean']['output'];\n  isUsageSubscriber: Scalars['Boolean']['output'];\n  isWithdrawingToCredits: Scalars['Boolean']['output'];\n  planLimitOverride?: Maybe<PlanLimitOverride>;\n  remainingUsageCreditBalance: Scalars['Float']['output'];\n  spendCommitment?: Maybe<SpendCommitment>;\n  state: SubscriptionState;\n  stripeCustomerId: Scalars['String']['output'];\n  subscriptions: Array<CustomerSubscription>;\n  supportedWithdrawalPlatforms: Array<WithdrawalPlatformTypes>;\n  taxIds: Array<CustomerTaxId>;\n  trialDaysRemaining: Scalars['Int']['output'];\n  usageLimit?: Maybe<UsageLimit>;\n  workspace: Workspace;\n};\n\n\nexport type CustomerCreditsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type CustomerAddress = {\n  __typename?: 'CustomerAddress';\n  city?: Maybe<Scalars['String']['output']>;\n  country?: Maybe<Scalars['String']['output']>;\n  line1?: Maybe<Scalars['String']['output']>;\n  line2?: Maybe<Scalars['String']['output']>;\n  name?: Maybe<Scalars['String']['output']>;\n  postalCode?: Maybe<Scalars['String']['output']>;\n  state?: Maybe<Scalars['String']['output']>;\n};\n\nexport type CustomerCreditsConnection = {\n  __typename?: 'CustomerCreditsConnection';\n  edges: Array<CustomerCreditsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type CustomerCreditsConnectionEdge = {\n  __typename?: 'CustomerCreditsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Credit;\n};\n\nexport type CustomerInvoice = {\n  __typename?: 'CustomerInvoice';\n  amountDue: Scalars['Float']['output'];\n  amountPaid: Scalars['Float']['output'];\n  hostedURL?: Maybe<Scalars['String']['output']>;\n  invoiceId: Scalars['String']['output'];\n  items: Array<SubscriptionItem>;\n  lastPaymentError?: Maybe<Scalars['String']['output']>;\n  paymentIntentStatus?: Maybe<Scalars['String']['output']>;\n  pdfURL?: Maybe<Scalars['String']['output']>;\n  periodEnd: Scalars['String']['output'];\n  periodStart: Scalars['String']['output'];\n  reissuedInvoiceFrom?: Maybe<Scalars['String']['output']>;\n  reissuedInvoiceOf?: Maybe<Scalars['String']['output']>;\n  spendCommitmentPrepayment?: Maybe<Scalars['Boolean']['output']>;\n  status?: Maybe<Scalars['String']['output']>;\n  subscriptionId?: Maybe<Scalars['String']['output']>;\n  subscriptionStatus?: Maybe<Scalars['String']['output']>;\n  total: Scalars['Int']['output'];\n};\n\nexport type CustomerSubscription = {\n  __typename?: 'CustomerSubscription';\n  billingCycleAnchor: Scalars['DateTime']['output'];\n  cancelAt?: Maybe<Scalars['String']['output']>;\n  cancelAtPeriodEnd: Scalars['Boolean']['output'];\n  couponId?: Maybe<Scalars['String']['output']>;\n  discounts: Array<SubscriptionDiscount>;\n  id: Scalars['String']['output'];\n  items: Array<SubscriptionItem>;\n  latestInvoiceId: Scalars['String']['output'];\n  nextInvoiceCurrentTotal: Scalars['Int']['output'];\n  nextInvoiceDate: Scalars['String']['output'];\n  status: Scalars['String']['output'];\n};\n\nexport type CustomerTaxId = {\n  __typename?: 'CustomerTaxId';\n  id: Scalars['String']['output'];\n  type: Scalars['String']['output'];\n  value: Scalars['String']['output'];\n};\n\nexport type DnsRecordPurpose =\n  | 'DNS_RECORD_PURPOSE_ACME_DNS01_CHALLENGE'\n  | 'DNS_RECORD_PURPOSE_TRAFFIC_ROUTE'\n  | 'DNS_RECORD_PURPOSE_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type DnsRecordStatus =\n  | 'DNS_RECORD_STATUS_PROPAGATED'\n  | 'DNS_RECORD_STATUS_REQUIRES_UPDATE'\n  | 'DNS_RECORD_STATUS_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type DnsRecordType =\n  | 'DNS_RECORD_TYPE_A'\n  | 'DNS_RECORD_TYPE_CNAME'\n  | 'DNS_RECORD_TYPE_NS'\n  | 'DNS_RECORD_TYPE_TXT'\n  | 'DNS_RECORD_TYPE_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type DnsRecords = {\n  __typename?: 'DNSRecords';\n  currentValue: Scalars['String']['output'];\n  fqdn: Scalars['String']['output'];\n  hostlabel: Scalars['String']['output'];\n  purpose: DnsRecordPurpose;\n  recordType: DnsRecordType;\n  requiredValue: Scalars['String']['output'];\n  status: DnsRecordStatus;\n  zone: Scalars['String']['output'];\n};\n\nexport type Deployment = Node & {\n  __typename?: 'Deployment';\n  canRedeploy: Scalars['Boolean']['output'];\n  canRollback: Scalars['Boolean']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  creator?: Maybe<DeploymentCreator>;\n  /** Check if a deployment's instances have all stopped */\n  deploymentStopped: Scalars['Boolean']['output'];\n  diagnosis?: Maybe<Scalars['DeploymentDiagnosis']['output']>;\n  environment: Environment;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  instances: Array<DeploymentDeploymentInstance>;\n  meta?: Maybe<Scalars['DeploymentMeta']['output']>;\n  projectId: Scalars['String']['output'];\n  service: Service;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  snapshotId?: Maybe<Scalars['String']['output']>;\n  sockets: Array<DeploymentSocket>;\n  staticUrl?: Maybe<Scalars['String']['output']>;\n  status: DeploymentStatus;\n  statusUpdatedAt?: Maybe<Scalars['DateTime']['output']>;\n  suggestAddServiceDomain: Scalars['Boolean']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  url?: Maybe<Scalars['String']['output']>;\n};\n\nexport type DeploymentCreator = {\n  __typename?: 'DeploymentCreator';\n  avatar?: Maybe<Scalars['String']['output']>;\n  email: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type DeploymentDeploymentInstance = {\n  __typename?: 'DeploymentDeploymentInstance';\n  id: Scalars['String']['output'];\n  status: DeploymentInstanceStatus;\n};\n\nexport type DeploymentEvent = Node & {\n  __typename?: 'DeploymentEvent';\n  completedAt?: Maybe<Scalars['DateTime']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  payload?: Maybe<DeploymentEventPayload>;\n  step: DeploymentEventStep;\n};\n\nexport type DeploymentEventPayload = {\n  __typename?: 'DeploymentEventPayload';\n  attempt?: Maybe<Scalars['Int']['output']>;\n  detail?: Maybe<Scalars['String']['output']>;\n  durationMs?: Maybe<Scalars['Int']['output']>;\n  error?: Maybe<Scalars['String']['output']>;\n  maxAttempts?: Maybe<Scalars['Int']['output']>;\n  reason?: Maybe<Scalars['String']['output']>;\n  skipped?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type DeploymentEventStep =\n  | 'BUILD_IMAGE'\n  | 'CONFIGURE_NETWORK'\n  | 'CREATE_CONTAINER'\n  | 'DRAIN_INSTANCES'\n  | 'HEALTHCHECK'\n  | 'MIGRATE_VOLUMES'\n  | 'PRE_DEPLOY_COMMAND'\n  | 'PUBLISH_IMAGE'\n  | 'SNAPSHOT_CODE'\n  | 'WAIT_FOR_DEPENDENCIES';\n\nexport type DeploymentInstanceExecution = Node & {\n  __typename?: 'DeploymentInstanceExecution';\n  completedAt?: Maybe<Scalars['DateTime']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  deploymentId: Scalars['String']['output'];\n  deploymentMeta: Scalars['DeploymentMeta']['output'];\n  id: Scalars['ID']['output'];\n  status: DeploymentInstanceStatus;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type DeploymentInstanceExecutionCreateInput = {\n  serviceInstanceId: Scalars['String']['input'];\n};\n\nexport type DeploymentInstanceExecutionInput = {\n  deploymentId: Scalars['String']['input'];\n};\n\nexport type DeploymentInstanceExecutionListInput = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type DeploymentInstanceStatus =\n  | 'CRASHED'\n  | 'CREATED'\n  | 'EXITED'\n  | 'INITIALIZING'\n  | 'REMOVED'\n  | 'REMOVING'\n  | 'RESTARTING'\n  | 'RUNNING'\n  | 'SKIPPED'\n  | 'STOPPED';\n\nexport type DeploymentListInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  status?: InputMaybe<DeploymentStatusInput>;\n};\n\nexport type DeploymentSnapshot = Node & {\n  __typename?: 'DeploymentSnapshot';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  variables: Scalars['EnvironmentVariables']['output'];\n};\n\nexport type DeploymentSocket = {\n  __typename?: 'DeploymentSocket';\n  ipv6: Scalars['Boolean']['output'];\n  port: Scalars['Int']['output'];\n  processName: Scalars['String']['output'];\n  updatedAt: Scalars['Int']['output'];\n};\n\nexport type DeploymentStatus =\n  | 'BUILDING'\n  | 'CRASHED'\n  | 'DEPLOYING'\n  | 'FAILED'\n  | 'INITIALIZING'\n  | 'NEEDS_APPROVAL'\n  | 'QUEUED'\n  | 'REMOVED'\n  | 'REMOVING'\n  | 'SKIPPED'\n  | 'SLEEPING'\n  | 'SUCCESS'\n  | 'WAITING';\n\nexport type DeploymentStatusInput = {\n  in?: InputMaybe<Array<DeploymentStatus>>;\n  notIn?: InputMaybe<Array<DeploymentStatus>>;\n};\n\nexport type DeploymentTrigger = Node & {\n  __typename?: 'DeploymentTrigger';\n  baseEnvironmentOverrideId?: Maybe<Scalars['String']['output']>;\n  branch: Scalars['String']['output'];\n  checkSuites: Scalars['Boolean']['output'];\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  projectId: Scalars['String']['output'];\n  provider: Scalars['String']['output'];\n  repository: Scalars['String']['output'];\n  serviceId?: Maybe<Scalars['String']['output']>;\n  validCheckSuites: Scalars['Int']['output'];\n};\n\nexport type DeploymentTriggerCreateInput = {\n  branch: Scalars['String']['input'];\n  checkSuites?: InputMaybe<Scalars['Boolean']['input']>;\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  provider: Scalars['String']['input'];\n  repository: Scalars['String']['input'];\n  rootDirectory?: InputMaybe<Scalars['String']['input']>;\n  serviceId: Scalars['String']['input'];\n};\n\nexport type DeploymentTriggerUpdateInput = {\n  branch?: InputMaybe<Scalars['String']['input']>;\n  checkSuites?: InputMaybe<Scalars['Boolean']['input']>;\n  repository?: InputMaybe<Scalars['String']['input']>;\n  rootDirectory?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type DisablePitrForHaClusterInput = {\n  /** Environment containing the cluster */\n  environmentId: Scalars['String']['input'];\n  /** Project containing the cluster (returned in payload) */\n  projectId: Scalars['String']['input'];\n  /** Root service of the HA Postgres cluster */\n  rootServiceId: Scalars['String']['input'];\n};\n\nexport type DisableServiceCdnInput = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n/** A single DNS query resolved for a service (one row per query, not aggregated) */\nexport type DnsQueryLog = {\n  __typename?: 'DnsQueryLog';\n  /** The IP addresses the name resolved to */\n  answers: Array<Scalars['String']['output']>;\n  /** Ordered CNAME targets the queried name aliased through before the final answer (empty when the response had no CNAME) */\n  cnameChain: Array<Scalars['String']['output']>;\n  /** The deployment ID */\n  deploymentId: Scalars['String']['output'];\n  /** The deployment instance ID */\n  deploymentInstanceId: Scalars['String']['output'];\n  /** The domain name that was looked up */\n  qname: Scalars['String']['output'];\n  /** The DNS record type queried (A, AAAA, TXT, ...) */\n  qtype: Scalars['String']['output'];\n  /** When the query was resolved (ISO timestamp) */\n  queriedAt: Scalars['String']['output'];\n  /** Whether the query targeted the internal zone or the public internet */\n  queryZone: DnsQueryZone;\n  /** The DNS response code (NOERROR, NXDOMAIN, SERVFAIL, ...) or synthetic TIMEOUT/ERROR when no upstream response was received */\n  rcode: Scalars['String']['output'];\n  /** The service ID that made the queries */\n  serviceId: Scalars['String']['output'];\n};\n\n/** Whether a DNS query targeted the internal zone or the public internet */\nexport type DnsQueryZone =\n  | 'external'\n  | 'internal';\n\nexport type DockerComposeImport = {\n  __typename?: 'DockerComposeImport';\n  errors: Array<Scalars['String']['output']>;\n  patch?: Maybe<Scalars['EnvironmentConfig']['output']>;\n};\n\nexport type Domain = {\n  /** @deprecated Removed; always null. */\n  cdnMode?: Maybe<Scalars['String']['output']>;\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  domain: Scalars['String']['output'];\n  edgeId?: Maybe<Scalars['String']['output']>;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  projectId?: Maybe<Scalars['String']['output']>;\n  serviceId: Scalars['String']['output'];\n  targetPort?: Maybe<Scalars['Int']['output']>;\n  updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type DomainAvailable = {\n  __typename?: 'DomainAvailable';\n  available: Scalars['Boolean']['output'];\n  message: Scalars['String']['output'];\n};\n\nexport type DomainWithStatus = {\n  __typename?: 'DomainWithStatus';\n  cdnProvider?: Maybe<CdnProvider>;\n  /** Human-readable error message when certificate issuance fails */\n  certificateErrorMessage?: Maybe<Scalars['String']['output']>;\n  /** Structured error type for programmatic handling */\n  certificateErrorType?: Maybe<CertificateErrorType>;\n  /** Whether the certificate issuance can be retried */\n  certificateRetryable?: Maybe<Scalars['Boolean']['output']>;\n  certificateStatus: CertificateStatus;\n  certificateStatusDetailed?: Maybe<CertificateStatusDetailed>;\n  certificates?: Maybe<Array<CertificatePublicData>>;\n  dnsRecords: Array<DnsRecords>;\n  domain?: Maybe<Domain>;\n};\n\nexport type EdgeCachingConfig = {\n  __typename?: 'EdgeCachingConfig';\n  defaultTtlSeconds: Scalars['Int']['output'];\n  htmlCaching: Scalars['String']['output'];\n  mode: Scalars['String']['output'];\n  purgeOnDeploy: PurgeOnDeploy;\n  staleWhileRevalidate: StaleWhileRevalidateConfig;\n};\n\nexport type EdgeCachingConfigInput = {\n  defaultTtlSeconds?: InputMaybe<Scalars['Int']['input']>;\n  htmlCaching?: InputMaybe<Scalars['String']['input']>;\n  mode?: InputMaybe<Scalars['String']['input']>;\n  purgeOnDeploy?: InputMaybe<PurgeOnDeploy>;\n  staleWhileRevalidate?: InputMaybe<StaleWhileRevalidateInput>;\n};\n\nexport type EdgeConfig = {\n  __typename?: 'EdgeConfig';\n  caching?: Maybe<EdgeCachingConfig>;\n  edgeRules?: Maybe<Scalars['JSON']['output']>;\n  enabled: Scalars['Boolean']['output'];\n  id: Scalars['String']['output'];\n  overrides: Scalars['JSON']['output'];\n  purgeEpoch: Scalars['Int']['output'];\n  purgeEpochByKind: Scalars['JSON']['output'];\n  tracing?: Maybe<EdgeTracingConfig>;\n  underAttackModeUntil?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type EdgeConfigInput = {\n  caching?: InputMaybe<EdgeCachingConfigInput>;\n};\n\nexport type EdgeRuleDiagnostic = {\n  __typename?: 'EdgeRuleDiagnostic';\n  code: Scalars['String']['output'];\n  message: Scalars['String']['output'];\n  path: Scalars['String']['output'];\n};\n\nexport type EdgeTracingConfig = {\n  __typename?: 'EdgeTracingConfig';\n  enabled: Scalars['Boolean']['output'];\n  sampleRate?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type EgressGateway = {\n  __typename?: 'EgressGateway';\n  ipv4: Scalars['String']['output'];\n  region: Scalars['String']['output'];\n  zone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type EgressGatewayCreateInput = {\n  environmentId: Scalars['String']['input'];\n  region?: InputMaybe<Scalars['String']['input']>;\n  serviceId: Scalars['String']['input'];\n};\n\nexport type EgressGatewayServiceTargetInput = {\n  allEnvironments?: InputMaybe<Scalars['Boolean']['input']>;\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type EgressMigrationEnvironmentResult = {\n  __typename?: 'EgressMigrationEnvironmentResult';\n  environmentId: Scalars['String']['output'];\n  environmentName: Scalars['String']['output'];\n  error?: Maybe<Scalars['String']['output']>;\n  gateways: Array<EgressGateway>;\n  success: Scalars['Boolean']['output'];\n};\n\nexport type EgressMigrationResult = {\n  __typename?: 'EgressMigrationResult';\n  environments: Array<EgressMigrationEnvironmentResult>;\n  ips: Array<EgressGateway>;\n};\n\nexport type EnablePitrForHaClusterInput = {\n  /** Environment containing the cluster */\n  environmentId: Scalars['String']['input'];\n  /** Project containing the cluster (returned in payload) */\n  projectId: Scalars['String']['input'];\n  /** Root service of the HA Postgres cluster */\n  rootServiceId: Scalars['String']['input'];\n};\n\nexport type EnableServiceCdnInput = {\n  config?: InputMaybe<EdgeConfigInput>;\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type Environment = Node & {\n  __typename?: 'Environment';\n  canAccess: Scalars['Boolean']['output'];\n  canvasGroupRefs: Scalars['JSON']['output'];\n  /** Services whose edge caching was turned off when the Railway Authentication default last turned on. */\n  clearanceCachingTurnedOff: Array<Scalars['String']['output']>;\n  /** Whether Railway Authentication protects this environment's services that have no setting of their own. */\n  clearanceDefault: Scalars['Boolean']['output'];\n  clearanceDefaultUpdatedAt?: Maybe<Scalars['DateTime']['output']>;\n  /** When the current Railway Authentication default last finished reaching every service that inherits it. */\n  clearancePropagatedAt?: Maybe<Scalars['DateTime']['output']>;\n  clearancePropagationError?: Maybe<Scalars['String']['output']>;\n  /** How many of the environment's services follow its Railway Authentication default, and how many have their own on or off. */\n  clearanceServiceCounts: EnvironmentClearanceServiceCounts;\n  config: Scalars['EnvironmentConfig']['output'];\n  /** Opaque snapshot token of the environment's IaC-relevant config. Echo it back as baseConfigEtag on environmentApplyChangeSet for optimistic concurrency. */\n  configEtag: Scalars['String']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  deploymentTriggers: EnvironmentDeploymentTriggersConnection;\n  deployments: EnvironmentDeploymentsConnection;\n  /** IaC resource address → partial name for this environment. '*' is the whole-project owner. Used so omit=delete only applies to resources this file already owns. */\n  iacPartials?: Maybe<Scalars['JSON']['output']>;\n  id: Scalars['ID']['output'];\n  isEphemeral: Scalars['Boolean']['output'];\n  meta?: Maybe<EnvironmentMeta>;\n  name: Scalars['String']['output'];\n  projectId: Scalars['String']['output'];\n  serviceInstances: EnvironmentServiceInstancesConnection;\n  sourceEnvironment?: Maybe<Environment>;\n  unmergedChangesCount?: Maybe<Scalars['Int']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n  variables: EnvironmentVariablesConnection;\n  volumeInstances: EnvironmentVolumeInstancesConnection;\n};\n\n\nexport type EnvironmentConfigArgs = {\n  decryptVariables?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type EnvironmentDeploymentTriggersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type EnvironmentDeploymentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type EnvironmentServiceInstancesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type EnvironmentVariablesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type EnvironmentVolumeInstancesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type EnvironmentClearanceDefaultUpdateInput = {\n  enabled: Scalars['Boolean']['input'];\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type EnvironmentClearanceServiceCounts = {\n  __typename?: 'EnvironmentClearanceServiceCounts';\n  inheriting: Scalars['Int']['output'];\n  off: Scalars['Int']['output'];\n  on: Scalars['Int']['output'];\n};\n\nexport type EnvironmentConfigPlanCommentUpsertInput = {\n  environmentId: Scalars['String']['input'];\n  /** GitHub Actions OIDC token (id-token: write) with audience `railway`. Its `repository` claim proves the caller runs in the repo the comment is posted to. */\n  githubOidcToken: Scalars['String']['input'];\n  /** Structured plan summary: { changes: [{ kind?, summary }], destructive, sourceTree, configEtag, changeSetHash, cliVersion? }. The comment body is composed server-side. */\n  plan: Scalars['JSON']['input'];\n  prNumber: Scalars['Int']['input'];\n};\n\nexport type EnvironmentConfigPlanCommentUpsertResult = {\n  __typename?: 'EnvironmentConfigPlanCommentUpsertResult';\n  commentId: Scalars['String']['output'];\n  url: Scalars['String']['output'];\n};\n\nexport type EnvironmentCreateInput = {\n  /** If true, the changes will be applied in the background and the mutation will return immediately. If false, the mutation will wait for the changes to be applied before returning. */\n  applyChangesInBackground?: InputMaybe<Scalars['Boolean']['input']>;\n  ephemeral?: InputMaybe<Scalars['Boolean']['input']>;\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  /** When committing the changes immediately, skip any initial deployments. */\n  skipInitialDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n  /** Create the environment with all of the services, volumes, configuration, and variables from this source environment. */\n  sourceEnvironmentId?: InputMaybe<Scalars['String']['input']>;\n  /** Stage the initial changes for the environment. If false (default), the changes will be committed immediately. */\n  stageInitialChanges?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type EnvironmentDeploymentTriggersConnection = {\n  __typename?: 'EnvironmentDeploymentTriggersConnection';\n  edges: Array<EnvironmentDeploymentTriggersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type EnvironmentDeploymentTriggersConnectionEdge = {\n  __typename?: 'EnvironmentDeploymentTriggersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentTrigger;\n};\n\nexport type EnvironmentDeploymentsConnection = {\n  __typename?: 'EnvironmentDeploymentsConnection';\n  edges: Array<EnvironmentDeploymentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type EnvironmentDeploymentsConnectionEdge = {\n  __typename?: 'EnvironmentDeploymentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Deployment;\n};\n\nexport type EnvironmentMeta = {\n  __typename?: 'EnvironmentMeta';\n  baseBranch?: Maybe<Scalars['String']['output']>;\n  branch?: Maybe<Scalars['String']['output']>;\n  latestSuccessfulGitHubDeploymentId?: Maybe<Scalars['Int']['output']>;\n  prCommentId?: Maybe<Scalars['Int']['output']>;\n  prNumber?: Maybe<Scalars['Int']['output']>;\n  prRepo?: Maybe<Scalars['String']['output']>;\n  prTitle?: Maybe<Scalars['String']['output']>;\n  skippedResourceIds?: Maybe<Scalars['SkippedResourceIds']['output']>;\n};\n\nexport type EnvironmentPatch = Node & {\n  __typename?: 'EnvironmentPatch';\n  appliedAt?: Maybe<Scalars['DateTime']['output']>;\n  appliedBy?: Maybe<AppliedByMember>;\n  createdAt: Scalars['DateTime']['output'];\n  environment: Environment;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  lastAppliedError?: Maybe<Scalars['String']['output']>;\n  message?: Maybe<Scalars['String']['output']>;\n  patch: Scalars['EnvironmentConfig']['output'];\n  status: EnvironmentPatchStatus;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\n\nexport type EnvironmentPatchPatchArgs = {\n  decryptVariables?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type EnvironmentPatchStatus =\n  | 'APPLYING'\n  | 'COMMITTED'\n  | 'FAILED'\n  | 'STAGED';\n\nexport type EnvironmentRenameInput = {\n  name: Scalars['String']['input'];\n};\n\nexport type EnvironmentServiceInstancesConnection = {\n  __typename?: 'EnvironmentServiceInstancesConnection';\n  edges: Array<EnvironmentServiceInstancesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type EnvironmentServiceInstancesConnectionEdge = {\n  __typename?: 'EnvironmentServiceInstancesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ServiceInstance;\n};\n\nexport type EnvironmentTriggersDeployInput = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type EnvironmentVariablesConnection = {\n  __typename?: 'EnvironmentVariablesConnection';\n  edges: Array<EnvironmentVariablesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type EnvironmentVariablesConnectionEdge = {\n  __typename?: 'EnvironmentVariablesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Variable;\n};\n\nexport type EnvironmentVolumeInstancesConnection = {\n  __typename?: 'EnvironmentVolumeInstancesConnection';\n  edges: Array<EnvironmentVolumeInstancesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type EnvironmentVolumeInstancesConnectionEdge = {\n  __typename?: 'EnvironmentVolumeInstancesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: VolumeInstance;\n};\n\n/** The estimated usage of a single measurement. */\nexport type EstimatedUsage = {\n  __typename?: 'EstimatedUsage';\n  /** The estimated value. */\n  estimatedValue: Scalars['Float']['output'];\n  /** The measurement that was estimated. */\n  measurement: MetricMeasurement;\n  projectId: Scalars['String']['output'];\n};\n\nexport type Event = Node & {\n  __typename?: 'Event';\n  action: Scalars['String']['output'];\n  /** Minimal event payload for activity feed list rendering. Avoids returning large deployment payload fields like commit messages. */\n  activityPayload?: Maybe<Scalars['JSON']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  environment?: Maybe<Environment>;\n  environmentId?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  object: Scalars['String']['output'];\n  payload?: Maybe<Scalars['JSON']['output']>;\n  project: Project;\n  projectId?: Maybe<Scalars['String']['output']>;\n  severity: EventSeverity;\n};\n\nexport type EventFilterInput = {\n  action?: InputMaybe<EventStringListFilter>;\n  object?: InputMaybe<EventStringListFilter>;\n  serviceId?: InputMaybe<EventStringListFilter>;\n};\n\nexport type EventSeverity =\n  | 'CRITICAL'\n  | 'INFO'\n  | 'NOTICE'\n  | 'WARNING';\n\nexport type EventStringListFilter = {\n  in?: InputMaybe<Array<Scalars['String']['input']>>;\n  notIn?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type ExplicitOwnerInput = {\n  /** The ID of the owner */\n  id: Scalars['String']['input'];\n  /** The type of owner */\n  type?: InputMaybe<ResourceOwnerType>;\n};\n\nexport type ExternalWorkspace = {\n  __typename?: 'ExternalWorkspace';\n  /** @deprecated Deprecated regions are no longer supported. */\n  allowDeprecatedRegions?: Maybe<Scalars['Boolean']['output']>;\n  avatar?: Maybe<Scalars['String']['output']>;\n  banReason?: Maybe<Scalars['String']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  currentSessionHasAccess?: Maybe<Scalars['Boolean']['output']>;\n  customerId?: Maybe<Scalars['String']['output']>;\n  customerState: SubscriptionState;\n  discordRole?: Maybe<Scalars['String']['output']>;\n  has2FAEnforcement: Scalars['Boolean']['output'];\n  hasAutomaticDiagnosis: Scalars['Boolean']['output'];\n  /** @deprecated Deprecated in favour of the SpendCommitment schema. */\n  hasBAA: Scalars['Boolean']['output'];\n  hasGuardrailsAccess: Scalars['Boolean']['output'];\n  /** @deprecated Deprecated in favour of the SpendCommitment schema. */\n  hasRBAC: Scalars['Boolean']['output'];\n  hasSAML: Scalars['Boolean']['output'];\n  id: Scalars['String']['output'];\n  isTrialing?: Maybe<Scalars['Boolean']['output']>;\n  name: Scalars['String']['output'];\n  plan: Plan;\n  preferredRegion?: Maybe<Scalars['String']['output']>;\n  projects: Array<Project>;\n  redactedDueTo2FAPending: Scalars['Boolean']['output'];\n  subscriptionPlanLimit?: Maybe<Scalars['SubscriptionPlanLimit']['output']>;\n  teamId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FeatureFlagToggleInput = {\n  flag: ActiveFeatureFlag;\n};\n\nexport type FunctionRuntime = {\n  __typename?: 'FunctionRuntime';\n  /** The image of the function runtime */\n  image: Scalars['String']['output'];\n  /** The latest version of the function runtime */\n  latestVersion: FunctionRuntimeVersion;\n  /** The name of the function runtime */\n  name: FunctionRuntimeName;\n  /** The versions of the function runtime */\n  versions: Array<FunctionRuntimeVersion>;\n};\n\n/** Supported function runtime environments */\nexport type FunctionRuntimeName =\n  | 'bun';\n\nexport type FunctionRuntimeVersion = {\n  __typename?: 'FunctionRuntimeVersion';\n  image: Scalars['String']['output'];\n  tag: Scalars['String']['output'];\n};\n\nexport type GitHubAccess = {\n  __typename?: 'GitHubAccess';\n  hasAccess: Scalars['Boolean']['output'];\n  isPublic: Scalars['Boolean']['output'];\n};\n\nexport type GitHubBranch = {\n  __typename?: 'GitHubBranch';\n  name: Scalars['String']['output'];\n};\n\nexport type GitHubCheck = {\n  __typename?: 'GitHubCheck';\n  name: Scalars['String']['output'];\n  status: Scalars['String']['output'];\n};\n\nexport type GitHubPrInfo = {\n  __typename?: 'GitHubPRInfo';\n  additions: Scalars['Int']['output'];\n  author: Scalars['String']['output'];\n  body: Scalars['String']['output'];\n  changedFiles: Scalars['Int']['output'];\n  checks: Array<GitHubCheck>;\n  deletions: Scalars['Int']['output'];\n  mergeable?: Maybe<Scalars['Boolean']['output']>;\n  state: Scalars['String']['output'];\n  title: Scalars['String']['output'];\n};\n\nexport type GitHubPrInfoResult = {\n  __typename?: 'GitHubPRInfoResult';\n  error?: Maybe<Scalars['String']['output']>;\n  prInfo?: Maybe<GitHubPrInfo>;\n};\n\nexport type GitHubRepo = {\n  __typename?: 'GitHubRepo';\n  defaultBranch: Scalars['String']['output'];\n  description?: Maybe<Scalars['String']['output']>;\n  fullName: Scalars['String']['output'];\n  id: Scalars['Int']['output'];\n  installationId: Scalars['String']['output'];\n  isPrivate: Scalars['Boolean']['output'];\n  name: Scalars['String']['output'];\n  ownerAvatarUrl?: Maybe<Scalars['String']['output']>;\n};\n\nexport type GitHubRepoDeployInput = {\n  branch?: InputMaybe<Scalars['String']['input']>;\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  projectId: Scalars['String']['input'];\n  repo: Scalars['String']['input'];\n};\n\nexport type GitHubRepoUpdateInput = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type GitHubRepoWithoutInstallation = {\n  __typename?: 'GitHubRepoWithoutInstallation';\n  defaultBranch: Scalars['String']['output'];\n  description?: Maybe<Scalars['String']['output']>;\n  fullName: Scalars['String']['output'];\n  id: Scalars['Int']['output'];\n  isPrivate: Scalars['Boolean']['output'];\n  name: Scalars['String']['output'];\n};\n\n/** An SSH public key from GitHub. */\nexport type GitHubSshKey = {\n  __typename?: 'GitHubSshKey';\n  id: Scalars['Int']['output'];\n  key: Scalars['String']['output'];\n  title: Scalars['String']['output'];\n};\n\nexport type Group = Node & {\n  __typename?: 'Group';\n  color?: Maybe<Scalars['String']['output']>;\n  groupId?: Maybe<Scalars['String']['output']>;\n  icon?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  isCollapsed?: Maybe<Scalars['Boolean']['output']>;\n  name?: Maybe<Scalars['String']['output']>;\n  project: Project;\n  projectId: Scalars['String']['output'];\n};\n\nexport type HerokuApp = {\n  __typename?: 'HerokuApp';\n  id: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type HerokuImportVariablesInput = {\n  environmentId: Scalars['String']['input'];\n  herokuAppId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type HistoryFilterInput = {\n  actions?: InputMaybe<Array<Scalars['String']['input']>>;\n  objects?: InputMaybe<Array<Scalars['String']['input']>>;\n  /** Any of '', 'applied', 'failed'. */\n  outcomes?: InputMaybe<Array<Scalars['String']['input']>>;\n  serviceIds?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n/** The result of an HTTP duration metrics query. */\nexport type HttpDurationMetricsResult = {\n  __typename?: 'HttpDurationMetricsResult';\n  /** The samples of HTTP duration metrics. */\n  samples: Array<HttpDurationMetricsSample>;\n};\n\n/** A single sample of HTTP duration metrics. */\nexport type HttpDurationMetricsSample = {\n  __typename?: 'HttpDurationMetricsSample';\n  /** 50th percentile (median) request duration in milliseconds. */\n  p50: Scalars['Float']['output'];\n  /** 90th percentile request duration in milliseconds. */\n  p90: Scalars['Float']['output'];\n  /** 95th percentile request duration in milliseconds. */\n  p95: Scalars['Float']['output'];\n  /** 99th percentile request duration in milliseconds. */\n  p99: Scalars['Float']['output'];\n  /** The timestamp of the sample. Represented as number of seconds since the Unix epoch. */\n  ts: Scalars['Int']['output'];\n};\n\n/** The result of a http logs query. */\nexport type HttpLog = {\n  __typename?: 'HttpLog';\n  /** The client user agent */\n  clientUa: Scalars['String']['output'];\n  /** The deployment ID that was requested */\n  deploymentId: Scalars['String']['output'];\n  /** The deployment instance ID that was requested */\n  deploymentInstanceId: Scalars['String']['output'];\n  /** The downstream HTTP protocol version */\n  downstreamProto: Scalars['String']['output'];\n  /** The edge region the client connected to */\n  edgeRegion: Scalars['String']['output'];\n  /** The requested host */\n  host: Scalars['String']['output'];\n  /** The http status of the log */\n  httpStatus: Scalars['Int']['output'];\n  /** The request HTTP method */\n  method: Scalars['String']['output'];\n  /** The requested path */\n  path: Scalars['String']['output'];\n  /** The unique request ID */\n  requestId: Scalars['String']['output'];\n  /** Details about the upstream response */\n  responseDetails: Scalars['String']['output'];\n  /** Received bytes */\n  rxBytes: Scalars['Int']['output'];\n  /** The source IP of the request */\n  srcIp: Scalars['String']['output'];\n  /** The timestamp the log was created */\n  timestamp: Scalars['String']['output'];\n  /** The total duration the request took */\n  totalDuration: Scalars['Int']['output'];\n  /** Outgoing bytes */\n  txBytes: Scalars['Int']['output'];\n  /** The upstream address */\n  upstreamAddress: Scalars['String']['output'];\n  /** Any upstream errors that occurred */\n  upstreamErrors: Scalars['String']['output'];\n  /** The upstream HTTP protocol version */\n  upstreamProto: Scalars['String']['output'];\n  /** How long the upstream request took to respond */\n  upstreamRqDuration: Scalars['Int']['output'];\n};\n\n/** Which HTTP metric an HTTP_METRICS_ITEM widget renders. */\nexport type HttpMetricKind =\n  | 'LATENCY'\n  | 'REQUESTS'\n  | 'STATUS_RATIO';\n\n/** HTTP metrics grouped by status code. */\nexport type HttpMetricsByStatusResult = {\n  __typename?: 'HttpMetricsByStatusResult';\n  /** The samples of HTTP metrics for this status code. */\n  samples: Array<HttpMetricsSample>;\n  /** The HTTP status code. */\n  statusCode: Scalars['Int']['output'];\n};\n\n/** The result of an HTTP metrics query. */\nexport type HttpMetricsResult = {\n  __typename?: 'HttpMetricsResult';\n  /** The samples of HTTP metrics. */\n  samples: Array<HttpMetricsSample>;\n};\n\n/** A single sample of an HTTP metric. */\nexport type HttpMetricsSample = {\n  __typename?: 'HttpMetricsSample';\n  /** The timestamp of the sample. Represented as number of seconds since the Unix epoch. */\n  ts: Scalars['Int']['output'];\n  /** The value of the sample (count of requests). */\n  value: Scalars['Float']['output'];\n};\n\nexport type IacPartialOwnershipResult = {\n  __typename?: 'IacPartialOwnershipResult';\n  /** Resource addresses whose ownership changed. */\n  affectedResources: Array<Scalars['String']['output']>;\n  /** The environment's complete ownership map after the change. */\n  iacPartials: Scalars['JSON']['output'];\n};\n\nexport type Incident = {\n  __typename?: 'Incident';\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  id: Scalars['String']['output'];\n  message: Scalars['String']['output'];\n  status: IncidentStatus;\n  url: Scalars['String']['output'];\n};\n\nexport type IncidentStatus =\n  | 'IDENTIFIED'\n  | 'INVESTIGATING'\n  | 'MONITORING'\n  | 'RESOLVED';\n\nexport type Integration = Node & {\n  __typename?: 'Integration';\n  config: Scalars['JSON']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  projectId: Scalars['String']['output'];\n};\n\nexport type IntegrationAuth = Node & {\n  __typename?: 'IntegrationAuth';\n  id: Scalars['ID']['output'];\n  integrations: IntegrationAuthIntegrationsConnection;\n  provider: Scalars['String']['output'];\n  providerId: Scalars['String']['output'];\n};\n\n\nexport type IntegrationAuthIntegrationsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type IntegrationAuthIntegrationsConnection = {\n  __typename?: 'IntegrationAuthIntegrationsConnection';\n  edges: Array<IntegrationAuthIntegrationsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type IntegrationAuthIntegrationsConnectionEdge = {\n  __typename?: 'IntegrationAuthIntegrationsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Integration;\n};\n\nexport type IntegrationCreateInput = {\n  config: Scalars['JSON']['input'];\n  integrationAuthId?: InputMaybe<Scalars['String']['input']>;\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type IntegrationUpdateInput = {\n  config: Scalars['JSON']['input'];\n  integrationAuthId?: InputMaybe<Scalars['String']['input']>;\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type InviteCode = Node & {\n  __typename?: 'InviteCode';\n  code: Scalars['String']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  project: Project;\n  projectId: Scalars['String']['output'];\n  role: ProjectRole;\n};\n\nexport type JobApplicationCreateInput = {\n  email: Scalars['String']['input'];\n  jobId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  why: Scalars['String']['input'];\n};\n\nexport type KeyType =\n  | 'KEY_TYPE_ECDSA'\n  | 'KEY_TYPE_RSA_2048'\n  | 'KEY_TYPE_RSA_4096'\n  | 'KEY_TYPE_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\n/** The result of a logs query. */\nexport type Log = {\n  __typename?: 'Log';\n  /** The attributes that were parsed from a structured log */\n  attributes: Array<LogAttribute>;\n  /** The contents of the log message */\n  message: Scalars['String']['output'];\n  /** The severity of the log message (eg. err) */\n  severity?: Maybe<Scalars['String']['output']>;\n  /** The tags that were associated with the log */\n  tags?: Maybe<LogTags>;\n  /** The timestamp of the log message in format RFC3339 (nano) */\n  timestamp: Scalars['String']['output'];\n};\n\n/** The attributes associated with a structured log */\nexport type LogAttribute = {\n  __typename?: 'LogAttribute';\n  key: Scalars['String']['output'];\n  value: Scalars['String']['output'];\n};\n\n/** The tags associated with a specific log */\nexport type LogTags = {\n  __typename?: 'LogTags';\n  deploymentId?: Maybe<Scalars['String']['output']>;\n  deploymentInstanceId?: Maybe<Scalars['String']['output']>;\n  environmentId?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Plugins have been removed */\n  pluginId?: Maybe<Scalars['String']['output']>;\n  projectId?: Maybe<Scalars['String']['output']>;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  snapshotId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type LoginSessionAuthInput = {\n  code: Scalars['String']['input'];\n  hostname?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type MaintainerWorkspace = {\n  __typename?: 'MaintainerWorkspace';\n  avatar?: Maybe<Scalars['String']['output']>;\n  id: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n  partnerProfile?: Maybe<PartnerProfile>;\n};\n\nexport type Maintenance = {\n  __typename?: 'Maintenance';\n  id: Scalars['String']['output'];\n  message: Scalars['String']['output'];\n  start: Scalars['DateTime']['output'];\n  status: MaintenanceStatus;\n  url: Scalars['String']['output'];\n};\n\nexport type MaintenanceStatus =\n  | 'COMPLETED'\n  | 'INPROGRESS'\n  | 'NOTSTARTEDYET';\n\n/** A single sample of a metric. */\nexport type Metric = {\n  __typename?: 'Metric';\n  /** The timestamp of the sample. Represented has number of seconds since the Unix epoch. */\n  ts: Scalars['Int']['output'];\n  /** The value of the sample. */\n  value: Scalars['Float']['output'];\n};\n\n/** A thing that can be measured on Railway. */\nexport type MetricMeasurement =\n  | 'AGENT_CACHE_READ_TOKENS'\n  | 'AGENT_CACHE_WRITE_TOKENS'\n  | 'AGENT_INPUT_TOKENS'\n  | 'AGENT_OUTPUT_TOKENS'\n  | 'AGENT_SPEND_USD'\n  | 'BACKUP_USAGE_GB'\n  | 'CPU_LIMIT'\n  | 'CPU_USAGE'\n  | 'CPU_USAGE_2'\n  | 'DISK_USAGE_GB'\n  | 'EPHEMERAL_DISK_USAGE_GB'\n  | 'MEASUREMENT_UNSPECIFIED'\n  | 'MEMORY_LIMIT_GB'\n  | 'MEMORY_USAGE_GB'\n  | 'NETWORK_RX_GB'\n  | 'NETWORK_TX_GB'\n  | 'UNRECOGNIZED';\n\n/** A property that can be used to group metrics. */\nexport type MetricTag =\n  | 'BILLABLE'\n  | 'DEPLOYMENT_ID'\n  | 'DEPLOYMENT_INSTANCE_ID'\n  | 'ENVIRONMENT_ID'\n  | 'FEATURE'\n  | 'HOST_TYPE'\n  | 'KEY_UNSPECIFIED'\n  | 'MODEL'\n  | 'PLUGIN_ID'\n  | 'PROJECT_ID'\n  | 'REGION'\n  | 'SERVICE_ID'\n  | 'UNRECOGNIZED'\n  | 'VM_ID'\n  | 'VOLUME_ID'\n  | 'VOLUME_INSTANCE_ID'\n  | 'WORKLOAD_KIND';\n\n/** The tags that were used to group the metric. */\nexport type MetricTags = {\n  __typename?: 'MetricTags';\n  deploymentId?: Maybe<Scalars['String']['output']>;\n  deploymentInstanceId?: Maybe<Scalars['String']['output']>;\n  environmentId?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Plugins have been removed */\n  pluginId?: Maybe<Scalars['String']['output']>;\n  projectId?: Maybe<Scalars['String']['output']>;\n  region?: Maybe<Scalars['String']['output']>;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  volumeId?: Maybe<Scalars['String']['output']>;\n  volumeInstanceId?: Maybe<Scalars['String']['output']>;\n};\n\n/** The result of a metrics query. */\nexport type MetricsResult = {\n  __typename?: 'MetricsResult';\n  /** The measurement of the metric. */\n  measurement: MetricMeasurement;\n  /** The tags that were used to group the metric. Only the tags that were used to by will be present. */\n  tags: MetricTags;\n  /** The samples of the metric. */\n  values: Array<Metric>;\n};\n\nexport type MonitorAlertResourceType =\n  | 'SERVICE'\n  | 'VOLUME';\n\nexport type MonitorStatus =\n  | 'ALERT'\n  | 'OK';\n\nexport type MonitorThresholdCondition =\n  | 'above'\n  | 'below';\n\nexport type MonitorThresholdConfig = {\n  __typename?: 'MonitorThresholdConfig';\n  condition: MonitorThresholdCondition;\n  measurement?: Maybe<MetricMeasurement>;\n  threshold: Scalars['Float']['output'];\n  type: Scalars['String']['output'];\n};\n\nexport type Mutation = {\n  __typename?: 'Mutation';\n  /** Create an access group in a workspace. */\n  accessGroupCreate: AccessGroup;\n  /** Delete an access group. */\n  accessGroupDelete: Scalars['Boolean']['output'];\n  /** Add a workspace member to an access group. */\n  accessGroupMemberAdd: AccessGroupMember;\n  /** Remove a member from an access group. */\n  accessGroupMemberRemove: Scalars['Boolean']['output'];\n  /** Attach a project to an access group. */\n  accessGroupProjectAttach: AccessGroupProject;\n  /** Detach a project from an access group. */\n  accessGroupProjectDetach: Scalars['Boolean']['output'];\n  /** Update an access group's name or role. */\n  accessGroupUpdate: AccessGroup;\n  /** Set agent usage limit for a workspace */\n  agentUsageLimitSet: Scalars['Boolean']['output'];\n  /** Creates a new API token. */\n  apiTokenCreate: Scalars['String']['output'];\n  /** Deletes an API token. */\n  apiTokenDelete: Scalars['Boolean']['output'];\n  /** Sets the base environment override for a deployment trigger. */\n  baseEnvironmentOverride: Scalars['Boolean']['output'];\n  /** Remove a Railway agent chat binding. Requires admin on the binding's workspace. */\n  botScopeBindingRemove: Scalars['Boolean']['output'];\n  /** Create a bucket in a project */\n  bucketCreate: Bucket;\n  /** Reset the credentials for a bucket in an environment */\n  bucketCredentialsReset: BucketS3CompatibleCredentials;\n  /** Updates a bucket. */\n  bucketUpdate: Bucket;\n  /** Cancels an in-progress PITR enable/disable rollout on an HA database cluster and resets its progress so the UI re-reads from the live cluster. No-ops when nothing is running. */\n  cancelPitrHaWorkflow: Scalars['Boolean']['output'];\n  /** Merge a canvas layout from one environment into another. Re-computes the merge from current state and applies mutations. */\n  canvasViewMerge: Scalars['Boolean']['output'];\n  /** Clears the recorded progress of a finished PITR enable/disable rollout so the Backups page starts fresh. A rollout still in progress cannot be cleared. */\n  clearPitrHaWorkflowProgress: Scalars['Boolean']['output'];\n  /** Creates a Railway Authentication token for a project's protected services and returns it once. Requires a workspace admin and the workspace's Railway Authentication entitlement. */\n  clearanceTokenCreate: ClearanceTokenCreatePayload;\n  /** Revokes a Railway Authentication token. Requires a workspace admin; works without the entitlement. Revoking a revoked token succeeds. */\n  clearanceTokenRevoke: Scalars['Boolean']['output'];\n  /** Track CLI authentication-attempt outcomes (signup / sign-in funnel) */\n  cliAuthEventTrack: Scalars['Boolean']['output'];\n  /** Track events from the Railway CLI */\n  cliEventTrack: Scalars['Boolean']['output'];\n  /** Checkpoint the agent's disk. Poll cloudAgentCheckpoint until SUCCEEDED. */\n  cloudAgentCheckpointCreate: CloudAgentCheckpoint;\n  /** Delete a checkpoint. */\n  cloudAgentCheckpointDelete: Scalars['Boolean']['output'];\n  /** Create a cloud agent. */\n  cloudAgentCreate: CloudAgent;\n  /** Delete a cloud agent. */\n  cloudAgentDelete: Scalars['Boolean']['output'];\n  /** Build the agent's code inside its own VM and deploy it. Creates the named service (default: the agent's name) or reuses it. Needs an agent booted with the builder. */\n  cloudAgentDeploy: CloudAgentDeployResult;\n  /** Send lightweight agent feedback to Railway. Returns the report ID after delivery. */\n  cloudAgentFeedbackCreate: Scalars['String']['output'];\n  /** Duplicate a running cloud agent. */\n  cloudAgentFork: CloudAgent;\n  /** Mint a short-lived (5m) JWT for the agent's harness WebSocket (see agentWsUrl). The in-VM gate verifies signature/exp/aud and pins it to this agent. Mint one per dial; the token only has to survive the upgrade. */\n  cloudAgentHarnessToken: Scalars['String']['output'];\n  /** Sleep a running cloud agent, keeping its volume. Processes on the machine are terminated; waking re-runs its entrypoint. */\n  cloudAgentSleep: CloudAgent;\n  /** Report the current coding-agent session state. */\n  cloudAgentStateReport: Scalars['Boolean']['output'];\n  /** Stop a task. Before its prompt is sent it never starts; after, only its own run is aborted. The task ends failed with \"The task was cancelled\". A finished task is left as is. */\n  cloudAgentTaskCancel: CloudAgentTaskCancelResult;\n  /** Start a task and return its handle. Creates a fresh agent by default; replyToTaskId continues the original conversation. */\n  cloudAgentTaskDispatch: CloudAgentTaskHandle;\n  /** Recover the latest task response from the agent. May wake the VM. */\n  cloudAgentTaskRecover: CloudAgentTaskResult;\n  /** Answer a question the task is waiting on. Never wakes the VM; poll cloudAgentTask for the outcome. */\n  cloudAgentTaskRespond: CloudAgentTaskRespondResult;\n  /** Wake a sleeping cloud agent. */\n  cloudAgentWake: CloudAgent;\n  /** Creates a new custom domain. */\n  customDomainCreate: CustomDomain;\n  /** Deletes a custom domain. */\n  customDomainDelete: Scalars['Boolean']['output'];\n  /** Issues a new certificate */\n  customDomainIssueCertificate: Scalars['Boolean']['output'];\n  /** Updates a custom domain. */\n  customDomainUpdate: Scalars['Boolean']['output'];\n  /** Create a free plan subscription for a customer */\n  customerCreateFreePlanSubscription: Scalars['Boolean']['output'];\n  /** Toggle whether a customer is automatically withdrawing to credits */\n  customerTogglePayoutsToCredits: Scalars['Boolean']['output'];\n  /** Approves a deployment. */\n  deploymentApprove: Scalars['Boolean']['output'];\n  /** Cancels a deployment. */\n  deploymentCancel: Scalars['Boolean']['output'];\n  /** Invoke a deployment instance execution. */\n  deploymentInstanceExecutionCreate: Scalars['Boolean']['output'];\n  /** Redeploys a deployment. */\n  deploymentRedeploy: Deployment;\n  /** Removes a deployment. */\n  deploymentRemove: Scalars['Boolean']['output'];\n  /** Restarts a deployment. */\n  deploymentRestart: Scalars['Boolean']['output'];\n  /** Rolls back to a deployment. */\n  deploymentRollback: Scalars['Boolean']['output'];\n  /** Stops a deployment. */\n  deploymentStop: Scalars['Boolean']['output'];\n  /** Creates a deployment trigger. */\n  deploymentTriggerCreate: DeploymentTrigger;\n  /** Deletes a deployment trigger. */\n  deploymentTriggerDelete: Scalars['Boolean']['output'];\n  /** Updates a deployment trigger. */\n  deploymentTriggerUpdate: DeploymentTrigger;\n  /** Forget the box `ssh dev.new` lands you in; the next connection creates a new one. */\n  devNewLandingTargetClear: Scalars['Boolean']['output'];\n  /** Make this cloud agent the box `ssh dev.new` lands you in. Replaces any previous choice. */\n  devNewLandingTargetSet: CloudAgent;\n  /** Disables point-in-time recovery on an HA database cluster with the same rolling rollout as enable. The backup bucket is left intact, so existing backup history is preserved. */\n  disablePitrForHaCluster: TemplateDeployPayload;\n  /** Disables CDN for a service, soft-deleting the edge config. */\n  disableServiceCdn: Scalars['Boolean']['output'];\n  /** Create services and volumes from docker compose */\n  dockerComposeImport: DockerComposeImport;\n  /** Create a new egress gateway association for a service instance */\n  egressGatewayAssociationCreate: Array<EgressGateway>;\n  /** Clear all egress gateway associations for a service instance */\n  egressGatewayAssociationsClear: Scalars['Boolean']['output'];\n  /** Preview the HA static egress IPs that would be assigned, without applying them. Set allEnvironments to cover all of the service's environments. */\n  egressGatewayHAMigrationPreview: EgressMigrationResult;\n  /** Switch a service from HA static egress IPs back to a standard static IP. Set allEnvironments to apply to all of the service's environments. */\n  egressGatewayRollbackFromHA: Array<EgressGateway>;\n  /** Enable HA static egress IPs for a service. Set allEnvironments to apply to all of the service's environments. */\n  egressGatewayUpgradeToHA: Array<EgressGateway>;\n  /** Change the User's account email if there is a valid change email request. */\n  emailChangeConfirm: Scalars['Boolean']['output'];\n  /** Initiate an email change request for a user */\n  emailChangeInitiate: Scalars['Boolean']['output'];\n  /** Enables point-in-time recovery on an HA database cluster (Postgres HA, MySQL HA) with a rolling, near-zero-downtime rollout across its members. Safe to retry. */\n  enablePitrForHaCluster: TemplateDeployPayload;\n  /** Enables CDN for a service, creating an edge config and attaching all live domains. */\n  enableServiceCdn: EdgeConfig;\n  /** Experimental: applies an intent-level RailwayChangeSet and returns operation results. */\n  environmentApplyChangeSet: ChangeSetApplyResult;\n  /** Sets whether Railway Authentication protects an environment's services that have no setting of their own, and pushes it to them. Requires a workspace admin; turning it on also requires the workspace's Railway Authentication entitlement. Services with edge caching on that it protects have their caching turned off. */\n  environmentClearanceDefaultUpdate: Scalars['Boolean']['output'];\n  /** Posts or updates a `railway config plan` comment on a GitHub pull request under the Railway app identity. The caller proves it runs in the target repo with a GitHub Actions OIDC token; the comment body is composed server-side from the structured plan. */\n  environmentConfigPlanCommentUpsert: EnvironmentConfigPlanCommentUpsertResult;\n  /** Creates a new environment. */\n  environmentCreate: Environment;\n  /** Deletes an environment. */\n  environmentDelete: Scalars['Boolean']['output'];\n  /** Release resources from a named IaC partial without deleting, redeploying, or changing them. Omit resources to release the entire partial. Whole-project management is possible once no named partials remain. A later named-partial apply can claim released resources again. */\n  environmentIacPartialRelease: IacPartialOwnershipResult;\n  /** Transfer resources between named IaC partials without deleting, redeploying, or changing them. Omit resources to transfer the entire source partial. The destination may be a new or existing partial. */\n  environmentIacPartialTransfer: IacPartialOwnershipResult;\n  /** Commit the provided patch to the environment. */\n  environmentPatchCommit: Scalars['String']['output'];\n  /** Commits the staged changes for a single environment. */\n  environmentPatchCommitStaged: Scalars['String']['output'];\n  /** Copy a FAILED patch's changes into the environment's staged patch (creating one if needed). The FAILED patch is left untouched. */\n  environmentPatchRestage: EnvironmentPatch;\n  /** Experimental: previews an intent-level RailwayChangeSet without side effects. */\n  environmentPreviewChangeSet: ChangeSetPreview;\n  /** Renames an environment. */\n  environmentRename: Environment;\n  /** Sets the staged patch for a single environment. */\n  environmentStageChanges: EnvironmentPatch;\n  /** Deploys all connected triggers for an environment. */\n  environmentTriggersDeploy: Scalars['Boolean']['output'];\n  /** Deploy a service that was skipped when its environment was created, along with its skipped transitive dependencies. */\n  environmentUnskipService: Scalars['Boolean']['output'];\n  /** Agree to the fair use policy for the currently authenticated user */\n  fairUseAgree: Scalars['Boolean']['output'];\n  /** Add a feature flag for a user */\n  featureFlagAdd: Scalars['Boolean']['output'];\n  /** Remove a feature flag for a user */\n  featureFlagRemove: Scalars['Boolean']['output'];\n  /** Mints a 5-minute JWT for opening a browser WS session against tcp-proxy. */\n  generateShellToken: Scalars['String']['output'];\n  /** Deploys a GitHub repo */\n  githubRepoDeploy: Scalars['String']['output'];\n  /** Updates a GitHub repo through the linked template */\n  githubRepoUpdate: Scalars['Boolean']['output'];\n  /** Import variables from a Heroku app into a Railway service. Returns the number of variables imports */\n  herokuImportVariables: Scalars['Int']['output'];\n  /** Create an integration for a project */\n  integrationCreate: Integration;\n  /** Delete an integration for a project */\n  integrationDelete: Scalars['Boolean']['output'];\n  /** Update an integration for a project */\n  integrationUpdate: Integration;\n  /** Join a project using an invite code */\n  inviteCodeUse: Project;\n  /** Creates a new job application. */\n  jobApplicationCreate: Scalars['Boolean']['output'];\n  /** Auth a login session for a user */\n  loginSessionAuth: Scalars['Boolean']['output'];\n  /** Cancel a login session */\n  loginSessionCancel: Scalars['Boolean']['output'];\n  /** Get a token for a login session if it exists */\n  loginSessionConsume?: Maybe<Scalars['String']['output']>;\n  /** Start a CLI login session */\n  loginSessionCreate: Scalars['String']['output'];\n  /** Verify if a login session is valid */\n  loginSessionVerify: Scalars['Boolean']['output'];\n  /** Marks notification deliveries as read */\n  notificationDeliveriesMarkAsRead: Scalars['Boolean']['output'];\n  /** Create a new notification rule */\n  notificationRuleCreate: NotificationRule;\n  /** Delete a notification rule */\n  notificationRuleDelete: Scalars['Boolean']['output'];\n  /** Update a notification rule */\n  notificationRuleUpdate: NotificationRule;\n  /** Create an observability dashboard */\n  observabilityDashboardCreate: Scalars['Boolean']['output'];\n  /** Reset an observability dashboard to default dashboard items */\n  observabilityDashboardReset: Scalars['Boolean']['output'];\n  /** Update an observability dashboard */\n  observabilityDashboardUpdate: Scalars['Boolean']['output'];\n  /** Deletes a Passkey */\n  passkeyDelete: Scalars['Boolean']['output'];\n  /**\n   * Creates a new plugin.\n   * @deprecated Plugins are deprecated on Railway. Use database templates instead.\n   */\n  pluginCreate: Plugin;\n  /**\n   * Deletes a plugin.\n   * @deprecated Plugins are deprecated\n   */\n  pluginDelete: Scalars['Boolean']['output'];\n  /**\n   * Reset envs and container for a plugin in an environment\n   * @deprecated Plugins are deprecated\n   */\n  pluginReset: Scalars['Boolean']['output'];\n  /**\n   * Resets the credentials for a plugin in an environment\n   * @deprecated Plugins are deprecated\n   */\n  pluginResetCredentials: Scalars['String']['output'];\n  /**\n   * Restarts a plugin.\n   * @deprecated Plugins are deprecated\n   */\n  pluginRestart: Plugin;\n  /**\n   * Force start a plugin\n   * @deprecated Plugins are deprecated\n   */\n  pluginStart: Scalars['Boolean']['output'];\n  /**\n   * Updates an existing plugin.\n   * @deprecated Plugins are deprecated\n   */\n  pluginUpdate: Plugin;\n  /** Update the email preferences for a user */\n  preferencesUpdate: Preferences;\n  /**\n   * Removed. Private networks and endpoints are managed by the platform; enable private networking on the environment instead.\n   * @deprecated Removed. Private networks and endpoints are managed by the platform; enable private networking on the environment instead.\n   */\n  privateNetworkCreateOrGet: PrivateNetwork;\n  /**\n   * Removed. Private networks and endpoints are managed by the platform; enable private networking on the environment instead.\n   * @deprecated Removed. Private networks and endpoints are managed by the platform; enable private networking on the environment instead.\n   */\n  privateNetworkEndpointCreateOrGet: PrivateNetworkEndpoint;\n  /**\n   * Removed. Private networks and endpoints are managed by the platform; enable private networking on the environment instead.\n   * @deprecated Removed. Private networks and endpoints are managed by the platform; enable private networking on the environment instead.\n   */\n  privateNetworkEndpointDelete: Scalars['Boolean']['output'];\n  /** Rename a private network endpoint. */\n  privateNetworkEndpointRename: Scalars['Boolean']['output'];\n  /**\n   * Removed. Private networks and endpoints are managed by the platform; enable private networking on the environment instead.\n   * @deprecated Removed. Private networks and endpoints are managed by the platform; enable private networking on the environment instead.\n   */\n  privateNetworksForEnvironmentDelete: Scalars['Boolean']['output'];\n  /** Claims a project. */\n  projectClaim: Project;\n  /** Sets whether environments created from now on start with Railway Authentication protecting services that have no setting of their own. Existing environments are unchanged. Requires a workspace admin; turning it on also requires the workspace's Railway Authentication entitlement. */\n  projectClearanceDefaultUpdate: Scalars['Boolean']['output'];\n  /** Creates a new project. */\n  projectCreate: Project;\n  /** Deletes a project. */\n  projectDelete: Scalars['Boolean']['output'];\n  /** Star or unstar a project for the authenticated user. Returns the resulting state. */\n  projectFavoriteSet: Scalars['Boolean']['output'];\n  /** Add a feature flag for a project */\n  projectFeatureFlagAdd: Scalars['Boolean']['output'];\n  /** Remove a feature flag for a project */\n  projectFeatureFlagRemove: Scalars['Boolean']['output'];\n  /** Accept a project invitation using the invite code */\n  projectInvitationAccept: ProjectPermission;\n  /** Create an invitation for a project */\n  projectInvitationCreate: ProjectInvitation;\n  /** Delete an invitation for a project */\n  projectInvitationDelete: Scalars['Boolean']['output'];\n  /** Resend an invitation for a project */\n  projectInvitationResend: ProjectInvitation;\n  /** Invite a user by email to a project */\n  projectInviteUser: Scalars['Boolean']['output'];\n  /** Leave project as currently authenticated user */\n  projectLeave: Scalars['Boolean']['output'];\n  /** Add a workspace member to a project with a specific role. The user must already be a member of the project's workspace. */\n  projectMemberAdd: ProjectMember;\n  /** Remove user from a project */\n  projectMemberRemove: Array<ProjectMember>;\n  /** Change the role for a user within a project */\n  projectMemberUpdate: ProjectMember;\n  /** Deletes a project with a 48 hour grace period. */\n  projectScheduleDelete: Scalars['Boolean']['output'];\n  /** Cancel scheduled deletion of a project */\n  projectScheduleDeleteCancel: Scalars['Boolean']['output'];\n  /** Force delete a scheduled deletion of a project (skips the grace period) */\n  projectScheduleDeleteForce: Scalars['Boolean']['output'];\n  /** Create a token for a project that has access to a specific environment */\n  projectTokenCreate: Scalars['String']['output'];\n  /** Delete a project token */\n  projectTokenDelete: Scalars['Boolean']['output'];\n  /** Transfer a project to a workspace */\n  projectTransfer: Scalars['Boolean']['output'];\n  /** Confirm the transfer of project ownership */\n  projectTransferConfirm: Scalars['Boolean']['output'];\n  /** Initiate the transfer of project ownership */\n  projectTransferInitiate: Scalars['Boolean']['output'];\n  /**\n   * Transfer a project to a team\n   * @deprecated Use projectTransfer instead\n   */\n  projectTransferToTeam: Scalars['Boolean']['output'];\n  /** Updates a project. */\n  projectUpdate: Project;\n  /** Deletes a ProviderAuth. */\n  providerAuthRemove: Scalars['Boolean']['output'];\n  /** Purges the CDN cache for a service. Bumps the edge config's purge epoch so every edge node treats prior cached entries as stale on next request. Idempotent; returns true even if CDN is disabled for the service. */\n  purgeServiceCache: Scalars['Boolean']['output'];\n  /** Create a DNS record for a Railway domain */\n  railwayDomainDnsRecordCreate: RailwayDomainDnsRecord;\n  /** Delete a DNS record for a Railway domain */\n  railwayDomainDnsRecordDelete: Scalars['Boolean']['output'];\n  /** Update a DNS record for a Railway domain */\n  railwayDomainDnsRecordUpdate: RailwayDomainDnsRecord;\n  /** Stop forwarding every address on this domain, and remove the mail records that delivered them */\n  railwayDomainEmailForwardingRemoveAll: RailwayDomainEmailForwardingTeardown;\n  /** Forward an address on this domain to an external inbox */\n  railwayDomainEmailForwardingRuleCreate: RailwayDomainEmailForwardingRule;\n  /** Stop forwarding an address on this domain */\n  railwayDomainEmailForwardingRuleDelete: Scalars['Boolean']['output'];\n  /** Send a message to a forwarded address so the customer can confirm it delivers. */\n  railwayDomainEmailForwardingRuleSendTest: RailwayDomainEmailForwardingRule;\n  /** Change where a forwarded address delivers */\n  railwayDomainEmailForwardingRuleUpdate: RailwayDomainEmailForwardingRule;\n  /** Delegate the domain's authoritative nameservers to an external DNS provider, or reset to Railway defaults by passing an empty list. */\n  railwayDomainNameserversSet: RailwayDomainNameservers;\n  /** Update a Railway domain's settings */\n  railwayDomainUpdate: RailwayDomain;\n  /** Generates a new set of recovery codes for the authenticated user. */\n  recoveryCodeGenerate: RecoveryCodes;\n  /** Validates a recovery code. */\n  recoveryCodeValidate: Scalars['Boolean']['output'];\n  /** Updates the ReferralInfo for the authenticated user. */\n  referralInfoUpdate: ReferralInfo;\n  /** Capture a running sandbox's current disk into a reusable, named checkpoint. Synchronous: the checkpoint is ready when this returns. */\n  sandboxCheckpointCreate: SandboxCheckpoint;\n  /** Delete a sandbox checkpoint. */\n  sandboxCheckpointDelete: Scalars['Boolean']['output'];\n  /** Rename a sandbox checkpoint. */\n  sandboxCheckpointRename: SandboxCheckpoint;\n  /** Create a sandbox in an environment. */\n  sandboxCreate: Sandbox;\n  /** Destroy a sandbox. */\n  sandboxDestroy?: Maybe<Sandbox>;\n  /** Execute a command inside a running sandbox. */\n  sandboxExec: SandboxExecResult;\n  /** Extend a sandbox's lifetime. */\n  sandboxHeartbeat?: Maybe<Sandbox>;\n  /** Build a sandbox template into a bootable checkpoint. */\n  sandboxTemplateBuild: SandboxTemplateBuild;\n  /** Connect a service to a source */\n  serviceConnect: Service;\n  /** Creates a new service. */\n  serviceCreate: Service;\n  /** Deletes a service. */\n  serviceDelete: Scalars['Boolean']['output'];\n  /** Disconnect a service from a repo */\n  serviceDisconnect: Service;\n  /** Creates a new service domain. */\n  serviceDomainCreate: ServiceDomain;\n  /** Deletes a service domain. */\n  serviceDomainDelete: Scalars['Boolean']['output'];\n  /** Updates a service domain. */\n  serviceDomainUpdate: Scalars['Boolean']['output'];\n  /**\n   * Duplicate a service, including its configuration, variables, and volumes.\n   * @deprecated This API route is used only by the CLI. We plan to remove it in a future version. Please use the UI to duplicate services.\n   */\n  serviceDuplicate: Service;\n  /** Add a feature flag for a service */\n  serviceFeatureFlagAdd: Scalars['Boolean']['output'];\n  /** Remove a feature flag for a service */\n  serviceFeatureFlagRemove: Scalars['Boolean']['output'];\n  /** Enables or disables auto-deploy for a service instance. */\n  serviceInstanceAutoDeployUpdate: ServiceInstanceAutoDeployUpdateResult;\n  /** Update the auto-update maintenance window for a service instance, applied immediately (no config staging, no redeploy). Only the schedule changes — the update policy is untouched. */\n  serviceInstanceAutoUpdateScheduleUpdate: Scalars['Boolean']['output'];\n  /** Skip the next scheduled auto-update occurrence for a service instance, applied immediately (no config staging, no redeploy). The recurring maintenance window and update policy are untouched — this only delays the next fire. */\n  serviceInstanceAutoUpdateSnooze: Scalars['Boolean']['output'];\n  /** Undo an active auto-update skip for a service instance, applied immediately (no config staging, no redeploy). The recurring maintenance window and update policy are untouched — the next scheduled occurrence fires normally again. */\n  serviceInstanceAutoUpdateSnoozeClear: Scalars['Boolean']['output'];\n  /** Sets a service instance's own Railway Authentication setting: on, off, or none (follow the environment's default). Requires a workspace admin; ending up on also requires the workspace's Railway Authentication entitlement and edge caching off. */\n  serviceInstanceClearanceUpdate: Scalars['Boolean']['output'];\n  /** Deploy a service instance */\n  serviceInstanceDeploy: Scalars['Boolean']['output'];\n  /** Deploy a service instance. Returns a deployment ID */\n  serviceInstanceDeployV2: Scalars['String']['output'];\n  /** Update the resource limits for a service instance */\n  serviceInstanceLimitsUpdate: Scalars['Boolean']['output'];\n  /** Redeploy a service instance */\n  serviceInstanceRedeploy: Scalars['Boolean']['output'];\n  /** Update a service instance */\n  serviceInstanceUpdate: Scalars['Boolean']['output'];\n  /** Dismiss a platform-armed database security update notice and stand down the scheduled redeploy */\n  serviceInstanceVulnRemediationDismiss: Scalars['Boolean']['output'];\n  /** Immediately apply a platform-armed database security update (backup + redeploy). Returns the new deployment id. */\n  serviceInstanceVulnRemediationPatchNow: Scalars['String']['output'];\n  /** Remove the upstream URL from all service instances for this service */\n  serviceRemoveUpstreamUrl: Service;\n  /** Updates a service. */\n  serviceUpdate: Service;\n  /** Deletes a session. */\n  sessionDelete: Scalars['Boolean']['output'];\n  /** Enables or disables Under Attack Mode for a service. While enabled, the edge serves a browser challenge to unverified visitors of the service's edge-routed domains; non-browser clients (APIs, webhooks) without a clearance cookie are rejected with a 429. Optionally time-boxed via durationSeconds, after which the mode disarms automatically. */\n  setServiceUnderAttackMode: EdgeConfig;\n  /** Track setup agent lifecycle events from the Railway CLI */\n  setupAgentEventTrack: Scalars['Boolean']['output'];\n  /** Configure a shared variable. */\n  sharedVariableConfigure: Variable;\n  /** Register a new signal for an owner scope. */\n  signalCreate: Signal;\n  /** Change a signal's canonical default (production floor). */\n  signalDefaultSet: Signal;\n  /** Delete a signal and its audit log. */\n  signalDelete: Signal;\n  /** Replace a signal's type and default, clearing all rules. Destructive — intended for CLI --force re-type. */\n  signalReplace: Signal;\n  /** Restore a signal to the snapshot captured before a change (reads prevState from the target change row). */\n  signalRollback: Signal;\n  /** Attach or replace a rule on a signal. Matching rules must agree at resolution time or the default is returned. */\n  signalRuleSet: Signal;\n  /** Remove a rule from a signal. */\n  signalRuleUnset: Signal;\n  /** Creates a new SSH public key. When workspaceId is provided (or omitted under a workspace-scoped API token, in which case it defaults to the token's workspace), the key is owned by the workspace and can be used by anyone authenticating as that workspace via native SSH; requires workspace ADMIN access. Otherwise the key is owned by the authenticated user. */\n  sshPublicKeyCreate: SshPublicKey;\n  /** Deletes an SSH public key. */\n  sshPublicKeyDelete: Scalars['Boolean']['output'];\n  /** Approve an SSH signup: register the offered SSH key on the authenticated account so the agent is recognized. When the key owns an anonymous trial box, claims that trial into workspaceId and re-owns the key. */\n  sshSignupApprove: Scalars['Boolean']['output'];\n  /**\n   * Creates a new TCP proxy for a service instance.\n   * @deprecated Use staged changes and apply them. Creating a TCP proxy with this endpoint requires you to redeploy the service for it to be active.\n   */\n  tcpProxyCreate: TcpProxy;\n  /** Deletes a TCP proxy by id */\n  tcpProxyDelete: Scalars['Boolean']['output'];\n  /** Duplicates an existing template */\n  templateClone: Template;\n  /** Deletes a template. */\n  templateDelete: Scalars['Boolean']['output'];\n  /**\n   * Deploys a template.\n   * @deprecated Deprecated in favor of templateDeployV2\n   */\n  templateDeploy: TemplateDeployPayload;\n  /** Deploys a template using the serialized template config */\n  templateDeployV2: TemplateDeployPayload;\n  /** Generate a template for a project */\n  templateGenerate: Template;\n  /** Publishes a template. */\n  templatePublish: Template;\n  /** Reverts an HA cluster to standalone mode using template metadata to derive variables to remove */\n  templateRevert: TemplateDeployPayload;\n  /** Ejects a service from the template and creates a new repo in the provided org. */\n  templateServiceSourceEject: Scalars['Boolean']['output'];\n  /** Unpublishes a template. */\n  templateUnpublish: Scalars['Boolean']['output'];\n  /** Sets the default size (in MB) for a volume mount in a template's config. New volumes created when the template is deployed are provisioned at this size, clamped to the deployer's plan maximum. Pass sizeMB: null to clear the pre-size and fall back to the plan default. Editing a template requires maintainer access. */\n  templateVolumeUpdate: Template;\n  /** Create a new trusted domain for this workspace */\n  trustedDomainCreate: TrustedDomain;\n  /** Delete a trusted domain */\n  trustedDomainDelete: Scalars['Boolean']['output'];\n  /** Retrigger verification for a failed trusted domain */\n  trustedDomainRetriggerVerification?: Maybe<TrustedDomain>;\n  /** Update the role of a trusted domain */\n  trustedDomainUpdate: TrustedDomain;\n  /** Setup 2FA authorization for authenticated user. */\n  twoFactorInfoCreate: RecoveryCodes;\n  /** Deletes the TwoFactorInfo for the authenticated user. */\n  twoFactorInfoDelete: Scalars['Boolean']['output'];\n  /** Generates the 2FA app secret for the authenticated user. */\n  twoFactorInfoSecret: TwoFactorInfoSecret;\n  /** Validates the token for a 2FA action or for a login request. */\n  twoFactorInfoValidate: Scalars['Boolean']['output'];\n  /** Updates the edge config (caching settings) for a service. */\n  updateServiceEdgeConfig: EdgeConfig;\n  /** Replaces the service's edge rules (whole-section replace; null clears). Rules are boolean expressions over request attributes plus one action (block/allow/challenge/redirect/cache_override), evaluated at the edge before requests reach the service. The ruleset is validated server-side; invalid rulesets are rejected with per-rule diagnostics and nothing is written. Rules without an id get a server-assigned stable `rul_` id. */\n  updateServiceEdgeRules: EdgeConfig;\n  /** Generate a Slack channel for a workspace */\n  upsertSlackChannel: Scalars['Boolean']['output'];\n  /** Remove the usage limit for a customer */\n  usageLimitRemove: Scalars['Boolean']['output'];\n  /** Set the usage limit for a customer */\n  usageLimitSet: Scalars['Boolean']['output'];\n  /** Unsubscribe from the Beta program. */\n  userBetaLeave: Scalars['Boolean']['output'];\n  /** Delete the currently authenticated user */\n  userDelete: Scalars['Boolean']['output'];\n  /** Disconnect your Railway account from Discord. */\n  userDiscordDisconnect: Scalars['Boolean']['output'];\n  /** Remove a flag on the user. */\n  userFlagsRemove: Scalars['Boolean']['output'];\n  /** Set flags on the authenticated user. */\n  userFlagsSet: Scalars['Boolean']['output'];\n  /** Updates the profile for the authenticated user */\n  userProfileUpdate: Scalars['Boolean']['output'];\n  /** Update date of TermsAgreedOn */\n  userTermsUpdate?: Maybe<User>;\n  /** Upserts a collection of variables. */\n  variableCollectionUpsert: Scalars['Boolean']['output'];\n  /** Deletes a variable. */\n  variableDelete: Scalars['Boolean']['output'];\n  /** Upserts a variable. */\n  variableUpsert: Scalars['Boolean']['output'];\n  /** Create a persistent volume in a project */\n  volumeCreate: Volume;\n  /** Delete a persistent volume in a project */\n  volumeDelete: Scalars['Boolean']['output'];\n  /** Create backup of a volume instance */\n  volumeInstanceBackupCreate: WorkflowId;\n  /** Deletes volume instance backup */\n  volumeInstanceBackupDelete: WorkflowId;\n  /** Removes backup expiration date */\n  volumeInstanceBackupLock: Scalars['Boolean']['output'];\n  /** Restore a volume instance from a backup */\n  volumeInstanceBackupRestore: WorkflowId;\n  /** Manage schedule for backups of a volume instance */\n  volumeInstanceBackupScheduleUpdate: Scalars['Boolean']['output'];\n  /** Point-in-time restore. Creates a brand-new database service in the project, recovered to the target timestamp from the source service's backup history. The source service stays online and untouched. */\n  volumeInstancePITRRestore: WorkflowId;\n  /** Update a volume instance. If no environmentId is provided, all volume instances for the volume will be updated. */\n  volumeInstanceUpdate: Scalars['Boolean']['output'];\n  /** Update a persistent volume in a project */\n  volumeUpdate: Volume;\n  /** Test a webhook URL by sending a sample payload. Returns the HTTP status code. Custom headers come from `headers`, plus the stored headers of `notificationRuleId` for names not passed. */\n  webhookTest: Scalars['Int']['output'];\n  /** Delete a workspace and all data associated with it */\n  workspaceDelete: Scalars['Boolean']['output'];\n  /** Get an invite code for a workspace and role */\n  workspaceInviteCodeCreate: Scalars['String']['output'];\n  /** Use an invite code to join a workspace */\n  workspaceInviteCodeUse: Workspace;\n  /** Leave a workspace */\n  workspaceLeave: Scalars['Boolean']['output'];\n  /** Changes a user workspace permissions. */\n  workspacePermissionChange: Scalars['Boolean']['output'];\n  /** Add a deploy source to a workspace policy allowlist. */\n  workspacePolicyDeploySourceAllowlistAdd: WorkspacePolicyDeploySourceAllowlist;\n  /** Remove a deploy source from a workspace policy allowlist. */\n  workspacePolicyDeploySourceAllowlistRemove: Scalars['Boolean']['output'];\n  /** Enable or disable a workspace policy. Enterprise workspaces only. */\n  workspacePolicyItemUpdate: Scalars['Boolean']['output'];\n  /** Control whether non-admin project visibility is restricted to access groups and direct project permissions. */\n  workspaceSetRestrictProjectVisibilityToGroups: Scalars['Boolean']['output'];\n  /** Enable or disable 2FA enforcement for a workspace */\n  workspaceTwoFactorEnforcementUpdate: Scalars['Boolean']['output'];\n  /** Update a workspace by id */\n  workspaceUpdate: Scalars['Boolean']['output'];\n  /** Generate a Slack channel for a workspace */\n  workspaceUpsertSlackChannel: Scalars['Boolean']['output'];\n  /** Invite a user by email to a workspace */\n  workspaceUserInvite: Scalars['Boolean']['output'];\n  /** Remove a user from a workspace */\n  workspaceUserRemove: Scalars['Boolean']['output'];\n};\n\n\nexport type MutationAccessGroupCreateArgs = {\n  input: AccessGroupCreateInput;\n};\n\n\nexport type MutationAccessGroupDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationAccessGroupMemberAddArgs = {\n  input: AccessGroupMemberInput;\n};\n\n\nexport type MutationAccessGroupMemberRemoveArgs = {\n  input: AccessGroupMemberInput;\n};\n\n\nexport type MutationAccessGroupProjectAttachArgs = {\n  input: AccessGroupProjectInput;\n};\n\n\nexport type MutationAccessGroupProjectDetachArgs = {\n  input: AccessGroupProjectInput;\n};\n\n\nexport type MutationAccessGroupUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: AccessGroupUpdateInput;\n};\n\n\nexport type MutationAgentUsageLimitSetArgs = {\n  input: AgentUsageLimitSetInput;\n};\n\n\nexport type MutationApiTokenCreateArgs = {\n  input: ApiTokenCreateInput;\n};\n\n\nexport type MutationApiTokenDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationBaseEnvironmentOverrideArgs = {\n  id: Scalars['String']['input'];\n  input: BaseEnvironmentOverrideInput;\n};\n\n\nexport type MutationBotScopeBindingRemoveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationBucketCreateArgs = {\n  input: BucketCreateInput;\n};\n\n\nexport type MutationBucketCredentialsResetArgs = {\n  bucketId: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  redeployDependents?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationBucketUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: BucketUpdateInput;\n};\n\n\nexport type MutationCancelPitrHaWorkflowArgs = {\n  environmentId: Scalars['String']['input'];\n  rootServiceId: Scalars['String']['input'];\n};\n\n\nexport type MutationCanvasViewMergeArgs = {\n  sourceEnvironmentId: Scalars['String']['input'];\n  targetEnvironmentId: Scalars['String']['input'];\n};\n\n\nexport type MutationClearPitrHaWorkflowProgressArgs = {\n  environmentId: Scalars['String']['input'];\n  rootServiceId: Scalars['String']['input'];\n};\n\n\nexport type MutationClearanceTokenCreateArgs = {\n  input: ClearanceTokenCreateInput;\n};\n\n\nexport type MutationClearanceTokenRevokeArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationCliAuthEventTrackArgs = {\n  input: CliAuthEventTrackInput;\n};\n\n\nexport type MutationCliEventTrackArgs = {\n  input: CliEventTrackInput;\n};\n\n\nexport type MutationCloudAgentCheckpointCreateArgs = {\n  id: Scalars['ID']['input'];\n  name?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationCloudAgentCheckpointDeleteArgs = {\n  id: Scalars['ID']['input'];\n};\n\n\nexport type MutationCloudAgentCreateArgs = {\n  input: CloudAgentCreateInput;\n};\n\n\nexport type MutationCloudAgentDeleteArgs = {\n  id: Scalars['ID']['input'];\n};\n\n\nexport type MutationCloudAgentDeployArgs = {\n  id: Scalars['ID']['input'];\n  path?: InputMaybe<Scalars['String']['input']>;\n  regions?: InputMaybe<Scalars['JSON']['input']>;\n  serviceName?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationCloudAgentFeedbackCreateArgs = {\n  input: CloudAgentFeedbackInput;\n};\n\n\nexport type MutationCloudAgentForkArgs = {\n  id: Scalars['ID']['input'];\n  name?: InputMaybe<Scalars['String']['input']>;\n  variables?: InputMaybe<Scalars['JSON']['input']>;\n};\n\n\nexport type MutationCloudAgentHarnessTokenArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n};\n\n\nexport type MutationCloudAgentSleepArgs = {\n  id: Scalars['ID']['input'];\n};\n\n\nexport type MutationCloudAgentStateReportArgs = {\n  input: CloudAgentStateReportInput;\n};\n\n\nexport type MutationCloudAgentTaskCancelArgs = {\n  taskId: Scalars['String']['input'];\n};\n\n\nexport type MutationCloudAgentTaskDispatchArgs = {\n  input: CloudAgentTaskDispatchInput;\n};\n\n\nexport type MutationCloudAgentTaskRecoverArgs = {\n  cloudAgentId: Scalars['String']['input'];\n  sessionId: Scalars['String']['input'];\n};\n\n\nexport type MutationCloudAgentTaskRespondArgs = {\n  input: CloudAgentTaskRespondInput;\n};\n\n\nexport type MutationCloudAgentWakeArgs = {\n  id: Scalars['ID']['input'];\n};\n\n\nexport type MutationCustomDomainCreateArgs = {\n  input: CustomDomainCreateInput;\n};\n\n\nexport type MutationCustomDomainDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationCustomDomainIssueCertificateArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationCustomDomainUpdateArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n  targetPort?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type MutationCustomerCreateFreePlanSubscriptionArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationCustomerTogglePayoutsToCreditsArgs = {\n  customerId: Scalars['String']['input'];\n  input: CustomerTogglePayoutsToCreditsInput;\n};\n\n\nexport type MutationDeploymentApproveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentCancelArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentInstanceExecutionCreateArgs = {\n  input: DeploymentInstanceExecutionCreateInput;\n};\n\n\nexport type MutationDeploymentRedeployArgs = {\n  id: Scalars['String']['input'];\n  usePreviousImageTag?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationDeploymentRemoveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentRestartArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentRollbackArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentStopArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentTriggerCreateArgs = {\n  input: DeploymentTriggerCreateInput;\n};\n\n\nexport type MutationDeploymentTriggerDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentTriggerUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: DeploymentTriggerUpdateInput;\n};\n\n\nexport type MutationDevNewLandingTargetSetArgs = {\n  cloudAgentId: Scalars['ID']['input'];\n};\n\n\nexport type MutationDisablePitrForHaClusterArgs = {\n  input: DisablePitrForHaClusterInput;\n};\n\n\nexport type MutationDisableServiceCdnArgs = {\n  input: DisableServiceCdnInput;\n};\n\n\nexport type MutationDockerComposeImportArgs = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  skipStagingPatch?: InputMaybe<Scalars['Boolean']['input']>;\n  yaml: Scalars['String']['input'];\n};\n\n\nexport type MutationEgressGatewayAssociationCreateArgs = {\n  input: EgressGatewayCreateInput;\n};\n\n\nexport type MutationEgressGatewayAssociationsClearArgs = {\n  input: EgressGatewayServiceTargetInput;\n};\n\n\nexport type MutationEgressGatewayHaMigrationPreviewArgs = {\n  input: EgressGatewayServiceTargetInput;\n};\n\n\nexport type MutationEgressGatewayRollbackFromHaArgs = {\n  input: EgressGatewayServiceTargetInput;\n};\n\n\nexport type MutationEgressGatewayUpgradeToHaArgs = {\n  input: EgressGatewayServiceTargetInput;\n};\n\n\nexport type MutationEmailChangeConfirmArgs = {\n  nonce: Scalars['String']['input'];\n};\n\n\nexport type MutationEmailChangeInitiateArgs = {\n  newEmail: Scalars['String']['input'];\n};\n\n\nexport type MutationEnablePitrForHaClusterArgs = {\n  input: EnablePitrForHaClusterInput;\n};\n\n\nexport type MutationEnableServiceCdnArgs = {\n  input: EnableServiceCdnInput;\n};\n\n\nexport type MutationEnvironmentApplyChangeSetArgs = {\n  baseConfigEtag?: InputMaybe<Scalars['String']['input']>;\n  commitMessage?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  input: Scalars['JSON']['input'];\n  waitForCompletion?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationEnvironmentClearanceDefaultUpdateArgs = {\n  input: EnvironmentClearanceDefaultUpdateInput;\n};\n\n\nexport type MutationEnvironmentConfigPlanCommentUpsertArgs = {\n  input: EnvironmentConfigPlanCommentUpsertInput;\n};\n\n\nexport type MutationEnvironmentCreateArgs = {\n  input: EnvironmentCreateInput;\n};\n\n\nexport type MutationEnvironmentDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationEnvironmentIacPartialReleaseArgs = {\n  baseConfigEtag?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  partial: Scalars['String']['input'];\n  resources?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type MutationEnvironmentIacPartialTransferArgs = {\n  baseConfigEtag?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  fromPartial: Scalars['String']['input'];\n  resources?: InputMaybe<Array<Scalars['String']['input']>>;\n  toPartial: Scalars['String']['input'];\n};\n\n\nexport type MutationEnvironmentPatchCommitArgs = {\n  commitMessage?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  patch?: InputMaybe<Scalars['EnvironmentConfig']['input']>;\n  skipDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationEnvironmentPatchCommitStagedArgs = {\n  commitMessage?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  skipDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationEnvironmentPatchRestageArgs = {\n  patchId: Scalars['String']['input'];\n};\n\n\nexport type MutationEnvironmentPreviewChangeSetArgs = {\n  environmentId: Scalars['String']['input'];\n  input: Scalars['JSON']['input'];\n};\n\n\nexport type MutationEnvironmentRenameArgs = {\n  id: Scalars['String']['input'];\n  input: EnvironmentRenameInput;\n};\n\n\nexport type MutationEnvironmentStageChangesArgs = {\n  environmentId: Scalars['String']['input'];\n  input: Scalars['EnvironmentConfig']['input'];\n  merge?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationEnvironmentTriggersDeployArgs = {\n  input: EnvironmentTriggersDeployInput;\n};\n\n\nexport type MutationEnvironmentUnskipServiceArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationFairUseAgreeArgs = {\n  agree: Scalars['Boolean']['input'];\n};\n\n\nexport type MutationFeatureFlagAddArgs = {\n  input: FeatureFlagToggleInput;\n};\n\n\nexport type MutationFeatureFlagRemoveArgs = {\n  input: FeatureFlagToggleInput;\n};\n\n\nexport type MutationGenerateShellTokenArgs = {\n  input: ShellTokenInput;\n};\n\n\nexport type MutationGithubRepoDeployArgs = {\n  input: GitHubRepoDeployInput;\n};\n\n\nexport type MutationGithubRepoUpdateArgs = {\n  input: GitHubRepoUpdateInput;\n};\n\n\nexport type MutationHerokuImportVariablesArgs = {\n  input: HerokuImportVariablesInput;\n};\n\n\nexport type MutationIntegrationCreateArgs = {\n  input: IntegrationCreateInput;\n};\n\n\nexport type MutationIntegrationDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationIntegrationUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: IntegrationUpdateInput;\n};\n\n\nexport type MutationInviteCodeUseArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationJobApplicationCreateArgs = {\n  input: JobApplicationCreateInput;\n  resume: Scalars['Upload']['input'];\n};\n\n\nexport type MutationLoginSessionAuthArgs = {\n  input: LoginSessionAuthInput;\n};\n\n\nexport type MutationLoginSessionCancelArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationLoginSessionConsumeArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationLoginSessionVerifyArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationNotificationDeliveriesMarkAsReadArgs = {\n  deliveryIds: Array<Scalars['String']['input']>;\n};\n\n\nexport type MutationNotificationRuleCreateArgs = {\n  input: CreateNotificationRuleInput;\n};\n\n\nexport type MutationNotificationRuleDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationNotificationRuleUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: UpdateNotificationRuleInput;\n};\n\n\nexport type MutationObservabilityDashboardCreateArgs = {\n  input: ObservabilityDashboardCreateInput;\n};\n\n\nexport type MutationObservabilityDashboardResetArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationObservabilityDashboardUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: Array<ObservabilityDashboardUpdateInput>;\n};\n\n\nexport type MutationPasskeyDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationPluginCreateArgs = {\n  input: PluginCreateInput;\n};\n\n\nexport type MutationPluginDeleteArgs = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationPluginResetArgs = {\n  id: Scalars['String']['input'];\n  input: ResetPluginInput;\n};\n\n\nexport type MutationPluginResetCredentialsArgs = {\n  id: Scalars['String']['input'];\n  input: ResetPluginCredentialsInput;\n};\n\n\nexport type MutationPluginRestartArgs = {\n  id: Scalars['String']['input'];\n  input: PluginRestartInput;\n};\n\n\nexport type MutationPluginStartArgs = {\n  id: Scalars['String']['input'];\n  input: PluginRestartInput;\n};\n\n\nexport type MutationPluginUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: PluginUpdateInput;\n};\n\n\nexport type MutationPreferencesUpdateArgs = {\n  input: PreferencesUpdateData;\n};\n\n\nexport type MutationPrivateNetworkCreateOrGetArgs = {\n  input: PrivateNetworkCreateOrGetInput;\n};\n\n\nexport type MutationPrivateNetworkEndpointCreateOrGetArgs = {\n  input: PrivateNetworkEndpointCreateOrGetInput;\n};\n\n\nexport type MutationPrivateNetworkEndpointDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationPrivateNetworkEndpointRenameArgs = {\n  dnsName: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n  privateNetworkId: Scalars['String']['input'];\n};\n\n\nexport type MutationPrivateNetworksForEnvironmentDeleteArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectClaimArgs = {\n  id: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectClearanceDefaultUpdateArgs = {\n  input: ProjectClearanceDefaultUpdateInput;\n};\n\n\nexport type MutationProjectCreateArgs = {\n  input: ProjectCreateInput;\n};\n\n\nexport type MutationProjectDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectFavoriteSetArgs = {\n  favorite: Scalars['Boolean']['input'];\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectFeatureFlagAddArgs = {\n  input: ProjectFeatureFlagToggleInput;\n};\n\n\nexport type MutationProjectFeatureFlagRemoveArgs = {\n  input: ProjectFeatureFlagToggleInput;\n};\n\n\nexport type MutationProjectInvitationAcceptArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectInvitationCreateArgs = {\n  id: Scalars['String']['input'];\n  input: ProjectInvitee;\n};\n\n\nexport type MutationProjectInvitationDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectInvitationResendArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectInviteUserArgs = {\n  id: Scalars['String']['input'];\n  input: ProjectInviteUserInput;\n};\n\n\nexport type MutationProjectLeaveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectMemberAddArgs = {\n  input: ProjectMemberAddInput;\n};\n\n\nexport type MutationProjectMemberRemoveArgs = {\n  input: ProjectMemberRemoveInput;\n};\n\n\nexport type MutationProjectMemberUpdateArgs = {\n  input: ProjectMemberUpdateInput;\n};\n\n\nexport type MutationProjectScheduleDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectScheduleDeleteCancelArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectScheduleDeleteForceArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectTokenCreateArgs = {\n  input: ProjectTokenCreateInput;\n};\n\n\nexport type MutationProjectTokenDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectTransferArgs = {\n  input: ProjectTransferInput;\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectTransferConfirmArgs = {\n  input: ProjectTransferConfirmInput;\n};\n\n\nexport type MutationProjectTransferInitiateArgs = {\n  input: ProjectTransferInitiateInput;\n};\n\n\nexport type MutationProjectTransferToTeamArgs = {\n  id: Scalars['String']['input'];\n  input: ProjectTransferToTeamInput;\n};\n\n\nexport type MutationProjectUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: ProjectUpdateInput;\n};\n\n\nexport type MutationProviderAuthRemoveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationPurgeServiceCacheArgs = {\n  input: PurgeServiceCacheInput;\n};\n\n\nexport type MutationRailwayDomainDnsRecordCreateArgs = {\n  input: RailwayDomainDnsRecordCreateInput;\n};\n\n\nexport type MutationRailwayDomainDnsRecordDeleteArgs = {\n  input: RailwayDomainDnsRecordDeleteInput;\n};\n\n\nexport type MutationRailwayDomainDnsRecordUpdateArgs = {\n  input: RailwayDomainDnsRecordUpdateInput;\n};\n\n\nexport type MutationRailwayDomainEmailForwardingRemoveAllArgs = {\n  input: RailwayDomainEmailForwardingRemoveAllInput;\n};\n\n\nexport type MutationRailwayDomainEmailForwardingRuleCreateArgs = {\n  input: RailwayDomainEmailForwardingRuleCreateInput;\n};\n\n\nexport type MutationRailwayDomainEmailForwardingRuleDeleteArgs = {\n  input: RailwayDomainEmailForwardingRuleDeleteInput;\n};\n\n\nexport type MutationRailwayDomainEmailForwardingRuleSendTestArgs = {\n  input: RailwayDomainEmailForwardingRuleTestInput;\n};\n\n\nexport type MutationRailwayDomainEmailForwardingRuleUpdateArgs = {\n  input: RailwayDomainEmailForwardingRuleUpdateInput;\n};\n\n\nexport type MutationRailwayDomainNameserversSetArgs = {\n  input: RailwayDomainNameserversSetInput;\n};\n\n\nexport type MutationRailwayDomainUpdateArgs = {\n  input: RailwayDomainUpdateInput;\n};\n\n\nexport type MutationRecoveryCodeValidateArgs = {\n  input: RecoveryCodeValidateInput;\n};\n\n\nexport type MutationReferralInfoUpdateArgs = {\n  input: ReferralInfoUpdateInput;\n};\n\n\nexport type MutationSandboxCheckpointCreateArgs = {\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  sandboxId: Scalars['String']['input'];\n};\n\n\nexport type MutationSandboxCheckpointDeleteArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n};\n\n\nexport type MutationSandboxCheckpointRenameArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n  name: Scalars['String']['input'];\n};\n\n\nexport type MutationSandboxCreateArgs = {\n  input: SandboxCreateInput;\n};\n\n\nexport type MutationSandboxDestroyArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationSandboxExecArgs = {\n  command: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n  timeoutSec?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type MutationSandboxHeartbeatArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationSandboxTemplateBuildArgs = {\n  environmentId: Scalars['String']['input'];\n  input: SandboxTemplateInput;\n};\n\n\nexport type MutationServiceConnectArgs = {\n  id: Scalars['String']['input'];\n  input: ServiceConnectInput;\n};\n\n\nexport type MutationServiceCreateArgs = {\n  input: ServiceCreateInput;\n};\n\n\nexport type MutationServiceDeleteArgs = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceDisconnectArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceDomainCreateArgs = {\n  input: ServiceDomainCreateInput;\n};\n\n\nexport type MutationServiceDomainDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceDomainUpdateArgs = {\n  input: ServiceDomainUpdateInput;\n};\n\n\nexport type MutationServiceDuplicateArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceFeatureFlagAddArgs = {\n  input: ServiceFeatureFlagToggleInput;\n};\n\n\nexport type MutationServiceFeatureFlagRemoveArgs = {\n  input: ServiceFeatureFlagToggleInput;\n};\n\n\nexport type MutationServiceInstanceAutoDeployUpdateArgs = {\n  input: ServiceInstanceAutoDeployUpdateInput;\n};\n\n\nexport type MutationServiceInstanceAutoUpdateScheduleUpdateArgs = {\n  environmentId: Scalars['String']['input'];\n  schedule: Array<AutoUpdateScheduleWindowInput>;\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceInstanceAutoUpdateSnoozeArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n  snoozeDays?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type MutationServiceInstanceAutoUpdateSnoozeClearArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceInstanceClearanceUpdateArgs = {\n  input: ServiceInstanceClearanceUpdateInput;\n};\n\n\nexport type MutationServiceInstanceDeployArgs = {\n  commitSha?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  latestCommit?: InputMaybe<Scalars['Boolean']['input']>;\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceInstanceDeployV2Args = {\n  commitSha?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceInstanceLimitsUpdateArgs = {\n  input: ServiceInstanceLimitsUpdateInput;\n};\n\n\nexport type MutationServiceInstanceRedeployArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceInstanceUpdateArgs = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  input: ServiceInstanceUpdateInput;\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceInstanceVulnRemediationDismissArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceInstanceVulnRemediationPatchNowArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceRemoveUpstreamUrlArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: ServiceUpdateInput;\n};\n\n\nexport type MutationSessionDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationSetServiceUnderAttackModeArgs = {\n  input: SetServiceUnderAttackModeInput;\n};\n\n\nexport type MutationSetupAgentEventTrackArgs = {\n  input: SetupAgentEventTrackInput;\n};\n\n\nexport type MutationSharedVariableConfigureArgs = {\n  input: SharedVariableConfigureInput;\n};\n\n\nexport type MutationSignalCreateArgs = {\n  input: SignalCreateInput;\n};\n\n\nexport type MutationSignalDefaultSetArgs = {\n  input: SignalDefaultSetInput;\n};\n\n\nexport type MutationSignalDeleteArgs = {\n  input: SignalDeleteInput;\n};\n\n\nexport type MutationSignalReplaceArgs = {\n  input: SignalReplaceInput;\n};\n\n\nexport type MutationSignalRollbackArgs = {\n  input: SignalRollbackInput;\n};\n\n\nexport type MutationSignalRuleSetArgs = {\n  input: SignalRuleSetInput;\n};\n\n\nexport type MutationSignalRuleUnsetArgs = {\n  input: SignalRuleUnsetInput;\n};\n\n\nexport type MutationSshPublicKeyCreateArgs = {\n  input: SshPublicKeyCreateInput;\n};\n\n\nexport type MutationSshPublicKeyDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationSshSignupApproveArgs = {\n  code: Scalars['String']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationTcpProxyCreateArgs = {\n  input: TcpProxyCreateInput;\n};\n\n\nexport type MutationTcpProxyDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationTemplateCloneArgs = {\n  input: TemplateCloneInput;\n};\n\n\nexport type MutationTemplateDeleteArgs = {\n  id: Scalars['String']['input'];\n  input: TemplateDeleteInput;\n};\n\n\nexport type MutationTemplateDeployArgs = {\n  input: TemplateDeployInput;\n};\n\n\nexport type MutationTemplateDeployV2Args = {\n  input: TemplateDeployV2Input;\n};\n\n\nexport type MutationTemplateGenerateArgs = {\n  input: TemplateGenerateInput;\n};\n\n\nexport type MutationTemplatePublishArgs = {\n  id: Scalars['String']['input'];\n  input: TemplatePublishInput;\n};\n\n\nexport type MutationTemplateRevertArgs = {\n  input: TemplateRevertInput;\n};\n\n\nexport type MutationTemplateServiceSourceEjectArgs = {\n  input: TemplateServiceSourceEjectInput;\n};\n\n\nexport type MutationTemplateUnpublishArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationTemplateVolumeUpdateArgs = {\n  serviceId: Scalars['String']['input'];\n  sizeMB?: InputMaybe<Scalars['Int']['input']>;\n  templateId: Scalars['String']['input'];\n  volumeId: Scalars['String']['input'];\n};\n\n\nexport type MutationTrustedDomainCreateArgs = {\n  input: WorkspaceTrustedDomainCreateInput;\n};\n\n\nexport type MutationTrustedDomainDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationTrustedDomainRetriggerVerificationArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationTrustedDomainUpdateArgs = {\n  input: WorkspaceTrustedDomainUpdateInput;\n};\n\n\nexport type MutationTwoFactorInfoCreateArgs = {\n  input: TwoFactorInfoCreateInput;\n};\n\n\nexport type MutationTwoFactorInfoValidateArgs = {\n  input: TwoFactorInfoValidateInput;\n};\n\n\nexport type MutationUpdateServiceEdgeConfigArgs = {\n  input: UpdateServiceEdgeConfigInput;\n};\n\n\nexport type MutationUpdateServiceEdgeRulesArgs = {\n  input: UpdateServiceEdgeRulesInput;\n};\n\n\nexport type MutationUpsertSlackChannelArgs = {\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationUsageLimitRemoveArgs = {\n  input: UsageLimitRemoveInput;\n};\n\n\nexport type MutationUsageLimitSetArgs = {\n  input: UsageLimitSetInput;\n};\n\n\nexport type MutationUserFlagsRemoveArgs = {\n  input: UserFlagsRemoveInput;\n};\n\n\nexport type MutationUserFlagsSetArgs = {\n  input: UserFlagsSetInput;\n};\n\n\nexport type MutationUserProfileUpdateArgs = {\n  input: UserProfileUpdateInput;\n};\n\n\nexport type MutationVariableCollectionUpsertArgs = {\n  input: VariableCollectionUpsertInput;\n};\n\n\nexport type MutationVariableDeleteArgs = {\n  input: VariableDeleteInput;\n};\n\n\nexport type MutationVariableUpsertArgs = {\n  input: VariableUpsertInput;\n};\n\n\nexport type MutationVolumeCreateArgs = {\n  input: VolumeCreateInput;\n};\n\n\nexport type MutationVolumeDeleteArgs = {\n  volumeId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstanceBackupCreateArgs = {\n  name?: InputMaybe<Scalars['String']['input']>;\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstanceBackupDeleteArgs = {\n  volumeInstanceBackupId: Scalars['String']['input'];\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstanceBackupLockArgs = {\n  volumeInstanceBackupId: Scalars['String']['input'];\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstanceBackupRestoreArgs = {\n  replicaServiceIds?: InputMaybe<Array<Scalars['String']['input']>>;\n  volumeInstanceBackupId: Scalars['String']['input'];\n  volumeInstanceId: Scalars['String']['input'];\n  wipeServiceIds?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type MutationVolumeInstanceBackupScheduleUpdateArgs = {\n  kinds: Array<VolumeInstanceBackupScheduleKind>;\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstancePitrRestoreArgs = {\n  newServiceName?: InputMaybe<Scalars['String']['input']>;\n  sourceRepoPath?: InputMaybe<Scalars['String']['input']>;\n  targetTimestamp: Scalars['DateTime']['input'];\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstanceUpdateArgs = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  input: VolumeInstanceUpdateInput;\n  volumeId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeUpdateArgs = {\n  input: VolumeUpdateInput;\n  volumeId: Scalars['String']['input'];\n};\n\n\nexport type MutationWebhookTestArgs = {\n  headers?: InputMaybe<Array<WebhookHeaderInput>>;\n  notificationRuleId?: InputMaybe<Scalars['String']['input']>;\n  payload: Scalars['String']['input'];\n  url: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceInviteCodeCreateArgs = {\n  input: WorkspaceInviteCodeCreateInput;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceInviteCodeUseArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceLeaveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspacePermissionChangeArgs = {\n  input: WorkspacePermissionChangeInput;\n};\n\n\nexport type MutationWorkspacePolicyDeploySourceAllowlistAddArgs = {\n  sourceId: Scalars['String']['input'];\n  sourceType: WorkspacePolicyDeploySourceType;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspacePolicyDeploySourceAllowlistRemoveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspacePolicyItemUpdateArgs = {\n  enabled?: InputMaybe<Scalars['Boolean']['input']>;\n  input?: InputMaybe<WorkspacePolicyItemUpdateInput>;\n  policy?: InputMaybe<WorkspacePolicyName>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceSetRestrictProjectVisibilityToGroupsArgs = {\n  enabled: Scalars['Boolean']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceTwoFactorEnforcementUpdateArgs = {\n  enabled: Scalars['Boolean']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: WorkspaceUpdateInput;\n};\n\n\nexport type MutationWorkspaceUpsertSlackChannelArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceUserInviteArgs = {\n  input: WorkspaceUserInviteInput;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceUserRemoveArgs = {\n  input: WorkspaceUserRemoveInput;\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type MysqlPitrRestorableWindow = {\n  __typename?: 'MysqlPitrRestorableWindow';\n  archiveConfigured: Scalars['Boolean']['output'];\n  ceilingAt?: Maybe<Scalars['String']['output']>;\n  fetchedAt: Scalars['String']['output'];\n  floorAt?: Maybe<Scalars['String']['output']>;\n  fullBackupCount: Scalars['Int']['output'];\n  fullBackupsTakenAt: Array<Scalars['String']['output']>;\n  lineageCount: Scalars['Int']['output'];\n  listingTruncated: Scalars['Boolean']['output'];\n};\n\n/** The direction of a network flow relative to the service */\nexport type NetworkFlowDirection =\n  | 'egress'\n  | 'ingress';\n\n/** The layer 4 protocol of a network flow */\nexport type NetworkFlowL4Protocol =\n  | 'icmp'\n  | 'icmpv6'\n  | 'tcp'\n  | 'udp'\n  | 'unknown';\n\n/** A single network flow log entry */\nexport type NetworkFlowLog = {\n  __typename?: 'NetworkFlowLog';\n  /** Number of bytes transferred */\n  byteCount: Scalars['Int']['output'];\n  /** When the flow capture ended (ISO timestamp) */\n  captureEnd: Scalars['String']['output'];\n  /** When the flow capture started (ISO timestamp) */\n  captureStart: Scalars['String']['output'];\n  /** The deployment ID */\n  deploymentId: Scalars['String']['output'];\n  /** The deployment instance ID */\n  deploymentInstanceId: Scalars['String']['output'];\n  /** Traffic direction (ingress or egress) */\n  direction: NetworkFlowDirection;\n  /** If packets were dropped, the reason */\n  dropCause?: Maybe<Scalars['String']['output']>;\n  /** Destination IP address */\n  dstAddr: Scalars['String']['output'];\n  /** Destination port number */\n  dstPort: Scalars['Int']['output'];\n  /** Unique identifier for the flow */\n  flowId: Scalars['String']['output'];\n  /** Whether the flow is partial or complete */\n  flowState: NetworkFlowState;\n  /** Layer 4 latency in milliseconds */\n  l4LatencyMs: Scalars['Float']['output'];\n  /** Layer 4 protocol (TCP, UDP, ICMP, etc) */\n  l4Protocol: NetworkFlowL4Protocol;\n  /** Number of packets transferred */\n  packetCount: Scalars['Int']['output'];\n  /** Type of peer (service, internet, DNS, etc) */\n  peerKind: NetworkFlowPeerKind;\n  /** Service instance ID of the peer (for service-to-service flows) */\n  peerServiceId?: Maybe<Scalars['String']['output']>;\n  /** The service ID this flow belongs to */\n  serviceId: Scalars['String']['output'];\n  /** Source IP address */\n  srcAddr: Scalars['String']['output'];\n  /** Source port number */\n  srcPort: Scalars['Int']['output'];\n};\n\n/** The type of peer in a network flow */\nexport type NetworkFlowPeerKind =\n  | 'edge_proxy'\n  | 'internet'\n  | 'local_dns'\n  | 'service'\n  | 'unknown';\n\n/** The state of a network flow */\nexport type NetworkFlowState =\n  | 'complete'\n  | 'partial';\n\nexport type Node = {\n  id: Scalars['ID']['output'];\n};\n\nexport type NotificationChannel = Node & {\n  __typename?: 'NotificationChannel';\n  /** Webhook header values are write-only: the read side carries header names with null values. */\n  config: Scalars['NotificationChannelConfig']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type NotificationDelivery = Node & {\n  __typename?: 'NotificationDelivery';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  notificationInstance: NotificationInstance;\n  readAt?: Maybe<Scalars['DateTime']['output']>;\n  status: NotificationDeliveryStatus;\n  type: NotificationDeliveryType;\n  updatedAt: Scalars['DateTime']['output'];\n  userId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type NotificationDeliveryCreated = {\n  __typename?: 'NotificationDeliveryCreated';\n  delivery: NotificationDelivery;\n  type: Scalars['String']['output'];\n};\n\nexport type NotificationDeliveryFilterInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  onlyUnread?: InputMaybe<Scalars['Boolean']['input']>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  status?: InputMaybe<NotificationStatus>;\n  type?: InputMaybe<NotificationDeliveryType>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type NotificationDeliveryResolved = {\n  __typename?: 'NotificationDeliveryResolved';\n  deliveryIds: Array<Scalars['String']['output']>;\n  type: Scalars['String']['output'];\n};\n\nexport type NotificationDeliveryStatus =\n  | 'FAILED'\n  | 'PENDING'\n  | 'SENT';\n\nexport type NotificationDeliveryType =\n  | 'EMAIL'\n  | 'INAPP'\n  | 'WEBHOOK';\n\nexport type NotificationDeliveryUpdate = NotificationDeliveryCreated | NotificationDeliveryResolved;\n\nexport type NotificationInstance = Node & {\n  __typename?: 'NotificationInstance';\n  createdAt: Scalars['DateTime']['output'];\n  environmentId?: Maybe<Scalars['String']['output']>;\n  event: Event;\n  eventId: Scalars['String']['output'];\n  eventType?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  payload: Scalars['NotificationPayload']['output'];\n  projectId?: Maybe<Scalars['String']['output']>;\n  resolvedAt?: Maybe<Scalars['DateTime']['output']>;\n  resourceId?: Maybe<Scalars['String']['output']>;\n  resourceType?: Maybe<Scalars['String']['output']>;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  severity: NotificationSeverity;\n  status: NotificationStatus;\n  updatedAt: Scalars['DateTime']['output'];\n  volumeId?: Maybe<Scalars['String']['output']>;\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type NotificationRule = Node & {\n  __typename?: 'NotificationRule';\n  channels: Array<NotificationChannel>;\n  createdAt: Scalars['DateTime']['output'];\n  environmentId?: Maybe<Scalars['String']['output']>;\n  ephemeralEnvironments?: Maybe<Scalars['Boolean']['output']>;\n  eventTypes: Array<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  projectId?: Maybe<Scalars['String']['output']>;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  severities: Array<NotificationSeverity>;\n  updatedAt: Scalars['DateTime']['output'];\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type NotificationSeverity =\n  | 'CRITICAL'\n  | 'INFO'\n  | 'NOTICE'\n  | 'WARNING';\n\nexport type NotificationStatus =\n  | 'ACTIVE'\n  | 'RESOLVED';\n\nexport type ObservabilityDashboard = Node & {\n  __typename?: 'ObservabilityDashboard';\n  id: Scalars['ID']['output'];\n  items: Array<ObservabilityDashboardItemInstance>;\n};\n\nexport type ObservabilityDashboardAlert = Node & {\n  __typename?: 'ObservabilityDashboardAlert';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  resolvedAt?: Maybe<Scalars['DateTime']['output']>;\n  resourceId?: Maybe<Scalars['String']['output']>;\n  resourceType: MonitorAlertResourceType;\n  status: MonitorStatus;\n};\n\nexport type ObservabilityDashboardCreateInput = {\n  environmentId: Scalars['String']['input'];\n  /** If no items are provided, a default dashboard will be created. */\n  items?: InputMaybe<Array<ObservabilityDashboardUpdateInput>>;\n};\n\nexport type ObservabilityDashboardItem = Node & {\n  __typename?: 'ObservabilityDashboardItem';\n  config: ObservabilityDashboardItemConfig;\n  description?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  monitors: Array<ObservabilityDashboardMonitor>;\n  name: Scalars['String']['output'];\n  type: ObservabilityDashboardItemType;\n};\n\nexport type ObservabilityDashboardItemConfig = {\n  __typename?: 'ObservabilityDashboardItemConfig';\n  httpMetric?: Maybe<HttpMetricKind>;\n  logsFilter?: Maybe<Scalars['String']['output']>;\n  measurements?: Maybe<Array<MetricMeasurement>>;\n  projectUsageProperties?: Maybe<Array<ProjectUsageProperty>>;\n  resourceIds?: Maybe<Array<Scalars['String']['output']>>;\n};\n\nexport type ObservabilityDashboardItemConfigInput = {\n  httpMetric?: InputMaybe<HttpMetricKind>;\n  logsFilter?: InputMaybe<Scalars['String']['input']>;\n  measurements?: InputMaybe<Array<MetricMeasurement>>;\n  projectUsageProperties?: InputMaybe<Array<ProjectUsageProperty>>;\n  resourceIds?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type ObservabilityDashboardItemCreateInput = {\n  config: ObservabilityDashboardItemConfigInput;\n  description?: InputMaybe<Scalars['String']['input']>;\n  id: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  type: ObservabilityDashboardItemType;\n};\n\nexport type ObservabilityDashboardItemInstance = Node & {\n  __typename?: 'ObservabilityDashboardItemInstance';\n  dashboardItem: ObservabilityDashboardItem;\n  displayConfig: Scalars['DisplayConfig']['output'];\n  id: Scalars['ID']['output'];\n};\n\nexport type ObservabilityDashboardItemType =\n  | 'DNS_LOGS_ITEM'\n  | 'HTTP_LOGS_ITEM'\n  | 'HTTP_METRICS_ITEM'\n  | 'NETWORK_LOGS_ITEM'\n  | 'PROJECT_USAGE_ITEM'\n  | 'SERVICE_LOGS_ITEM'\n  | 'SERVICE_METRICS_ITEM'\n  | 'VOLUME_METRICS_ITEM';\n\nexport type ObservabilityDashboardMonitor = Node & {\n  __typename?: 'ObservabilityDashboardMonitor';\n  alerts: Array<ObservabilityDashboardAlert>;\n  config: ObservabilityDashboardMonitorConfig;\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n};\n\n\nexport type ObservabilityDashboardMonitorAlertsArgs = {\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\nexport type ObservabilityDashboardMonitorConfig = MonitorThresholdConfig;\n\nexport type ObservabilityDashboardUpdateInput = {\n  dashboardItem: ObservabilityDashboardItemCreateInput;\n  displayConfig: Scalars['DisplayConfig']['input'];\n  id: Scalars['String']['input'];\n};\n\nexport type OperationStatus =\n  | 'applied'\n  | 'applying'\n  | 'failed'\n  | 'staged';\n\nexport type PageInfo = {\n  __typename?: 'PageInfo';\n  endCursor?: Maybe<Scalars['String']['output']>;\n  hasNextPage: Scalars['Boolean']['output'];\n  hasPreviousPage: Scalars['Boolean']['output'];\n  startCursor?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PartnerProfile = {\n  __typename?: 'PartnerProfile';\n  category: Scalars['String']['output'];\n  description: Scalars['String']['output'];\n  slug: Scalars['String']['output'];\n  type: PartnerProfileType;\n  website: Scalars['String']['output'];\n};\n\nexport type PartnerProfileType =\n  | 'BASIC_PARTNER'\n  | 'LIMITED_PARTNER'\n  | 'TEMPLATE_MAINTAINER';\n\nexport type Passkey = Node & {\n  __typename?: 'Passkey';\n  aaguid?: Maybe<Scalars['String']['output']>;\n  backedUp: Scalars['Boolean']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  credentialId: Scalars['String']['output'];\n  deviceName: Scalars['String']['output'];\n  deviceType: Scalars['String']['output'];\n  displayName?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  lastUsedAt?: Maybe<Scalars['DateTime']['output']>;\n  lastUsedDevice?: Maybe<Scalars['String']['output']>;\n  transports: Array<Scalars['String']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type PaymentMethod = {\n  __typename?: 'PaymentMethod';\n  card?: Maybe<PaymentMethodCard>;\n  id: Scalars['String']['output'];\n};\n\nexport type PaymentMethodCard = {\n  __typename?: 'PaymentMethodCard';\n  brand: Scalars['String']['output'];\n  country?: Maybe<Scalars['String']['output']>;\n  last4: Scalars['String']['output'];\n};\n\n/** Live replication health of an HA database cluster's members. Used to gate the Enable/Disable PITR buttons on the same 'caught up' definition the rollout enforces. */\nexport type PitrHaClusterReplicationHealth = {\n  __typename?: 'PitrHaClusterReplicationHealth';\n  allHealthy: Scalars['Boolean']['output'];\n  checkedAt: Scalars['String']['output'];\n  environmentId: Scalars['String']['output'];\n  members: Array<PitrHaMemberReplicationHealth>;\n  reachable: Scalars['Boolean']['output'];\n  rootServiceId: Scalars['String']['output'];\n};\n\nexport type PitrHaMemberReplicationHealth = {\n  __typename?: 'PitrHaMemberReplicationHealth';\n  healthy: Scalars['Boolean']['output'];\n  isLeader: Scalars['Boolean']['output'];\n  lagMb?: Maybe<Scalars['Int']['output']>;\n  patroniName?: Maybe<Scalars['String']['output']>;\n  serviceId: Scalars['String']['output'];\n  serviceName: Scalars['String']['output'];\n  state?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PitrHaWorkflowDirection =\n  | 'DISABLE'\n  | 'ENABLE';\n\nexport type PitrHaWorkflowMemberProgress = {\n  __typename?: 'PitrHaWorkflowMemberProgress';\n  isLeader: Scalars['Boolean']['output'];\n  serviceId: Scalars['String']['output'];\n  serviceName: Scalars['String']['output'];\n  status: PitrHaWorkflowMemberStatus;\n};\n\nexport type PitrHaWorkflowMemberStatus =\n  | 'HEALTHY'\n  | 'PENDING'\n  | 'RESTARTING'\n  | 'SKIPPED';\n\nexport type PitrHaWorkflowPhase =\n  | 'CREATING_BUCKET'\n  | 'DONE'\n  | 'FAILED'\n  | 'PATCHING_DCS'\n  | 'PLANNING'\n  | 'REMOVING_VARIABLES'\n  | 'ROLLING_EX_LEADER'\n  | 'ROLLING_REPLICAS'\n  | 'SWITCHING_OVER'\n  | 'VERIFYING'\n  | 'WRITING_VARIABLES';\n\n/** Progress of an in-flight or recently completed PITR enable/disable rollout on an HA database cluster. */\nexport type PitrHaWorkflowProgress = {\n  __typename?: 'PitrHaWorkflowProgress';\n  clusterMutated: Scalars['Boolean']['output'];\n  completedAt?: Maybe<Scalars['String']['output']>;\n  currentMemberServiceId?: Maybe<Scalars['String']['output']>;\n  direction: PitrHaWorkflowDirection;\n  engine?: Maybe<Scalars['String']['output']>;\n  environmentId: Scalars['String']['output'];\n  errorMessage?: Maybe<Scalars['String']['output']>;\n  failedAtPhase?: Maybe<PitrHaWorkflowPhase>;\n  members: Array<PitrHaWorkflowMemberProgress>;\n  newLeaderServiceId?: Maybe<Scalars['String']['output']>;\n  phase: PitrHaWorkflowPhase;\n  projectId: Scalars['String']['output'];\n  rootServiceId: Scalars['String']['output'];\n  startedAt: Scalars['String']['output'];\n  updatedAt: Scalars['String']['output'];\n  workflowId: Scalars['String']['output'];\n};\n\n/** Estimated destination-volume scratch a PITR restore to a target needs: the base backup's data plus every WAL segment replayed from that backup to the target (Postgres holds replayed WAL in pg_wal faster than restartpoints recycle it). A conservative over-estimate for a non-blocking pre-restore warning — not a gate. */\nexport type PitrRestoreScratchEstimate = {\n  __typename?: 'PitrRestoreScratchEstimate';\n  baseBackupLabel: Scalars['String']['output'];\n  dataMB: Scalars['Int']['output'];\n  estimatedScratchMB: Scalars['Int']['output'];\n  likelyToFit: Scalars['Boolean']['output'];\n  planMaxSizeMB: Scalars['Int']['output'];\n  walMB: Scalars['Int']['output'];\n};\n\nexport type Plan =\n  | 'FREE'\n  | 'HOBBY'\n  | 'PRO';\n\nexport type PlanLimitOverride = Node & {\n  __typename?: 'PlanLimitOverride';\n  config: Scalars['SubscriptionPlanLimit']['output'];\n  id: Scalars['ID']['output'];\n};\n\nexport type PlatformFeatureFlag =\n  | 'AGENT_USAGE_CH_INGEST'\n  | 'ALERT_SUS_USERS_CRON_KILLSWITCH'\n  | 'BLOCK_TRIAL_RESTRICTION_APPEALS'\n  | 'BUILDER_V4_ROLLOUT'\n  | 'BUILD_DEPLOY_QUEUE_V2'\n  | 'CAC_T0_KILLSWITCH'\n  | 'CANVAS_CROSS_ENV_GUARD_ENFORCE'\n  | 'CHAT_SANDBOX'\n  | 'CLICKHOUSE_WORKSPACE_LIMIT_ENFORCE'\n  | 'CS_MCP'\n  | 'CS_MCP_EXPRESS'\n  | 'CTRD_IMAGE_STORE_ROLLOUT'\n  | 'DEFAULT_USAGE_ALERTS'\n  | 'DEMO_PERCENTAGE_ROLLOUT'\n  | 'DEPLOYMENT_DIAGNOSIS_KILLSWITCH'\n  | 'DEPLOY_SUPERSEDE_ON_PUSH'\n  | 'DEV_STUDIO'\n  | 'DEV_STUDIO_ANON_PROVISIONS'\n  | 'DOMAIN_RECONCILE_KILLSWITCH'\n  | 'EMAIL_FORWARDING_KILLSWITCH'\n  | 'IN_DASHBOARD_SUPPORT'\n  | 'KAFKA_EPHEMERAL_ENVIRONMENT_UPDATES'\n  | 'LOGS_LONG_WINDOW_CHUNKING'\n  | 'MCP_OAUTH_AUDIENCE_ENFORCE'\n  | 'MCP_OAUTH_CIMD'\n  | 'MCP_OAUTH_SCOPE_CHALLENGES'\n  | 'MCP_OAUTH_TOKEN_ROUTE_FENCE'\n  | 'NEW_PROJECT_PAGE'\n  | 'NEW_STRIPE_WEBHOOK_VERSION_ROLLOUT'\n  | 'NUDGES'\n  | 'NUDGE_BACKUP_SCHEDULE_MISSING'\n  | 'NUDGE_FIRST_DEPLOY_FAILED'\n  | 'NUDGE_PUBLIC_DB_URL_WITHIN_PROJECT'\n  | 'NUDGE_RESUBSCRIBE_AFTER_DEAD_INVOICE'\n  | 'NUDGE_UPGRADE_TO_PRO'\n  | 'OAUTH_DCR_KILLSWITCH'\n  | 'PRE_DEPLOY_TIMEOUT_KILLSWITCH'\n  | 'PROJECT_HISTORY_DUAL_WRITE'\n  | 'RADAR_HTTP_PATTERN_DETECTION'\n  | 'RELAY_SPEND_RESERVATION_KILLSWITCH'\n  | 'REMOVE_DEPLOYMENT_COMPACT'\n  | 'SERVICEINSTANCE_DATALOADER_FOR_STATIC_URL'\n  | 'SPLIT_USAGE_QUERIES'\n  | 'SSH_ANON_PROVISIONING'\n  | 'SSH_TRIAL_GUEST_IDLE_SLEEP'\n  | 'STRIPE_INTERACTIVE_SUBSCRIPTION_ON_SESSION'\n  | 'STRIPE_METERS_NEW_ACCOUNTS'\n  | 'STRIPE_METERS_SHADOW_ENABLED'\n  | 'STRIPE_WEBHOOK_DISPUTE_CANCELLATION'\n  | 'TRIAL_RELAY_MODEL_ALLOWLIST_KILLSWITCH'\n  | 'UPDATED_VM_QUERIES'\n  | 'USAGE_CH_READS'\n  | 'VM_COUPON_MIGRATION'\n  | 'VM_USAGE_CH_INGEST'\n  | 'WORKSPACE_MCP_KILLSWITCH';\n\nexport type PlatformFeatureFlagStatus = {\n  __typename?: 'PlatformFeatureFlagStatus';\n  flag: PlatformFeatureFlag;\n  rolloutPercentage: Scalars['Int']['output'];\n  status: Scalars['Boolean']['output'];\n  type: PlatformFeatureFlagType;\n};\n\nexport type PlatformFeatureFlagType =\n  | 'BOOLEAN'\n  | 'PERCENTAGE';\n\nexport type PlatformStatus = {\n  __typename?: 'PlatformStatus';\n  incident?: Maybe<Incident>;\n  isStable: Scalars['Boolean']['output'];\n  maintenance?: Maybe<Maintenance>;\n};\n\nexport type Plugin = Node & {\n  __typename?: 'Plugin';\n  containers: PluginContainersConnection;\n  createdAt: Scalars['DateTime']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  deprecatedAt?: Maybe<Scalars['DateTime']['output']>;\n  friendlyName: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  logsEnabled: Scalars['Boolean']['output'];\n  migrationDatabaseServiceId?: Maybe<Scalars['String']['output']>;\n  name: PluginType;\n  project: Project;\n  status: PluginStatus;\n  variables: PluginVariablesConnection;\n};\n\n\nexport type PluginContainersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type PluginVariablesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type PluginContainersConnection = {\n  __typename?: 'PluginContainersConnection';\n  edges: Array<PluginContainersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type PluginContainersConnectionEdge = {\n  __typename?: 'PluginContainersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Container;\n};\n\nexport type PluginCreateInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  friendlyName?: InputMaybe<Scalars['String']['input']>;\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type PluginRestartInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type PluginStatus =\n  | 'DEPRECATED'\n  | 'LOCKED'\n  | 'REMOVED'\n  | 'RUNNING'\n  | 'STOPPED';\n\nexport type PluginType =\n  | 'mongodb'\n  | 'mysql'\n  | 'postgresql'\n  | 'redis';\n\nexport type PluginUpdateInput = {\n  friendlyName: Scalars['String']['input'];\n};\n\nexport type PluginVariablesConnection = {\n  __typename?: 'PluginVariablesConnection';\n  edges: Array<PluginVariablesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type PluginVariablesConnectionEdge = {\n  __typename?: 'PluginVariablesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Variable;\n};\n\nexport type Preferences = Node & {\n  __typename?: 'Preferences';\n  buildFailedEmail: Scalars['Boolean']['output'];\n  changelogEmail: Scalars['Boolean']['output'];\n  communityEmail: Scalars['Boolean']['output'];\n  deployCrashedEmail: Scalars['Boolean']['output'];\n  ephemeralEnvironmentEmail: Scalars['Boolean']['output'];\n  id: Scalars['ID']['output'];\n  marketingEmail: Scalars['Boolean']['output'];\n  subprocessorUpdatesEmail: Scalars['Boolean']['output'];\n  templateQueueEmail: Scalars['Boolean']['output'];\n  usageEmail: Scalars['Boolean']['output'];\n};\n\nexport type PreferencesUpdateData = {\n  buildFailedEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  changelogEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  communityEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  deployCrashedEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  ephemeralEnvironmentEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  marketingEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  subprocessorUpdatesEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  templateQueueEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  token?: InputMaybe<Scalars['String']['input']>;\n  usageEmail?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type PrivateNetwork = {\n  __typename?: 'PrivateNetwork';\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  dnsName: Scalars['String']['output'];\n  environmentId: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n  networkId: Scalars['BigInt']['output'];\n  projectId: Scalars['String']['output'];\n  publicId: Scalars['String']['output'];\n  tags: Array<Scalars['String']['output']>;\n};\n\nexport type PrivateNetworkCreateOrGetInput = {\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  tags: Array<Scalars['String']['input']>;\n};\n\nexport type PrivateNetworkEndpoint = {\n  __typename?: 'PrivateNetworkEndpoint';\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  dnsName: Scalars['String']['output'];\n  newDnsName?: Maybe<Scalars['String']['output']>;\n  privateIps: Array<Scalars['String']['output']>;\n  publicId: Scalars['String']['output'];\n  serviceInstanceId: Scalars['String']['output'];\n  syncStatus: PrivateNetworkEndpointSyncStatus;\n  tags: Array<Scalars['String']['output']>;\n};\n\nexport type PrivateNetworkEndpointCreateOrGetInput = {\n  environmentId: Scalars['String']['input'];\n  privateNetworkId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n  serviceName: Scalars['String']['input'];\n  tags: Array<Scalars['String']['input']>;\n};\n\nexport type PrivateNetworkEndpointSyncStatus =\n  | 'ACTIVE'\n  | 'CREATING'\n  | 'DELETED'\n  | 'DELETING'\n  | 'UNSPECIFIED'\n  | 'UPDATING';\n\nexport type Project = Node & {\n  __typename?: 'Project';\n  baseEnvironment?: Maybe<Environment>;\n  baseEnvironmentId?: Maybe<Scalars['String']['output']>;\n  botPrEnvironments: Scalars['Boolean']['output'];\n  buckets: ProjectBucketsConnection;\n  /** Whether environments created from now on start with Railway Authentication protecting services that have no setting of their own. Existing environments keep their own default. */\n  clearanceDefaultForNewEnvironments: Scalars['Boolean']['output'];\n  /** The project's Railway Authentication tokens that still work (not revoked, not expired), newest first. */\n  clearanceTokens: Array<ClearanceToken>;\n  createdAt: Scalars['DateTime']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  /** @deprecated Use environment.deploymentTriggers for properly scoped access control */\n  deploymentTriggers: ProjectDeploymentTriggersConnection;\n  /** @deprecated Use environment.deployments for properly scoped access control */\n  deployments: ProjectDeploymentsConnection;\n  description?: Maybe<Scalars['String']['output']>;\n  environments: ProjectEnvironmentsConnection;\n  expiredAt?: Maybe<Scalars['DateTime']['output']>;\n  featureFlags: Array<ActiveProjectFeatureFlag>;\n  focusedPrEnvironments: Scalars['Boolean']['output'];\n  groups: ProjectGroupsConnection;\n  id: Scalars['ID']['output'];\n  isPublic: Scalars['Boolean']['output'];\n  isTempProject: Scalars['Boolean']['output'];\n  members: Array<ProjectMember>;\n  name: Scalars['String']['output'];\n  /** @deprecated Plugins have been removed */\n  plugins: ProjectPluginsConnection;\n  prDeploys: Scalars['Boolean']['output'];\n  /** The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. */\n  primaryEnvironmentId?: Maybe<Scalars['String']['output']>;\n  projectPermissions: ProjectProjectPermissionsConnection;\n  services: ProjectServicesConnection;\n  subscriptionPlanLimit: Scalars['SubscriptionPlanLimit']['output'];\n  subscriptionType: SubscriptionPlanType;\n  /** @deprecated Use workspace */\n  team?: Maybe<Team>;\n  /** @deprecated Use workspaceId */\n  teamId?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Tracing is set per service instance: read ServiceInstance.tracingEnabled. True when any instance in the project is traced. */\n  tracingEnabled: Scalars['Boolean']['output'];\n  /** @deprecated The edge traces every client-facing request; there is no sample rate. Always null. */\n  tracingSampleRate?: Maybe<Scalars['Float']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n  /** Highest project-scoped role the current user holds on this project, through a direct project permission or an access group. Does not include the workspace role. */\n  viewerRole?: Maybe<ProjectRole>;\n  volumes: ProjectVolumesConnection;\n  workspace?: Maybe<Workspace>;\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\n\nexport type ProjectBucketsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectDeploymentTriggersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectDeploymentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectEnvironmentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  isEphemeral?: InputMaybe<Scalars['Boolean']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  sort?: InputMaybe<SortOrder>;\n};\n\n\nexport type ProjectGroupsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectPluginsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectProjectPermissionsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectServicesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectVolumesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type ProjectBucketsConnection = {\n  __typename?: 'ProjectBucketsConnection';\n  edges: Array<ProjectBucketsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectBucketsConnectionEdge = {\n  __typename?: 'ProjectBucketsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Bucket;\n};\n\nexport type ProjectClearanceDefaultUpdateInput = {\n  enabled: Scalars['Boolean']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type ProjectComplianceInfo = {\n  __typename?: 'ProjectComplianceInfo';\n  /** Permissions for each project member */\n  memberPermissions: Array<ProjectMemberPermissionsInfo>;\n  projectId: Scalars['String']['output'];\n  projectName: Scalars['String']['output'];\n  /** Backup schedules for database services */\n  serviceBackups: Array<ServiceBackupInfo>;\n  /** 2FA status for each project member */\n  twoFactorMembers: Array<ProjectMemberTwoFactorInfo>;\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type ProjectCreateInput = {\n  defaultEnvironmentName?: InputMaybe<Scalars['String']['input']>;\n  description?: InputMaybe<Scalars['String']['input']>;\n  isMonorepo?: InputMaybe<Scalars['Boolean']['input']>;\n  isPublic?: InputMaybe<Scalars['Boolean']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n  prDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n  repo?: InputMaybe<ProjectCreateRepo>;\n  runtime?: InputMaybe<PublicRuntime>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ProjectCreateRepo = {\n  branch: Scalars['String']['input'];\n  fullRepoName: Scalars['String']['input'];\n};\n\nexport type ProjectDeploymentTriggersConnection = {\n  __typename?: 'ProjectDeploymentTriggersConnection';\n  edges: Array<ProjectDeploymentTriggersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectDeploymentTriggersConnectionEdge = {\n  __typename?: 'ProjectDeploymentTriggersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentTrigger;\n};\n\nexport type ProjectDeploymentsConnection = {\n  __typename?: 'ProjectDeploymentsConnection';\n  edges: Array<ProjectDeploymentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectDeploymentsConnectionEdge = {\n  __typename?: 'ProjectDeploymentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Deployment;\n};\n\nexport type ProjectEnvironmentsConnection = {\n  __typename?: 'ProjectEnvironmentsConnection';\n  edges: Array<ProjectEnvironmentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectEnvironmentsConnectionEdge = {\n  __typename?: 'ProjectEnvironmentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Environment;\n};\n\nexport type ProjectFeatureFlagToggleInput = {\n  flag: ActiveProjectFeatureFlag;\n  projectId: Scalars['String']['input'];\n};\n\nexport type ProjectGroupsConnection = {\n  __typename?: 'ProjectGroupsConnection';\n  edges: Array<ProjectGroupsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectGroupsConnectionEdge = {\n  __typename?: 'ProjectGroupsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Group;\n};\n\nexport type ProjectHistoryConnection = {\n  __typename?: 'ProjectHistoryConnection';\n  edges: Array<ProjectHistoryEntryEdge>;\n  pageInfo: ProjectHistoryPageInfo;\n};\n\n/** One settled change in an environment: a system event or a terminal operation (patch, deploy, …). */\nexport type ProjectHistoryEntry = {\n  __typename?: 'ProjectHistoryEntry';\n  action: Scalars['String']['output'];\n  /** Minimal payload for activity feed list rendering. Same trimming as Event.activityPayload. */\n  activityPayload?: Maybe<Scalars['JSON']['output']>;\n  actor: ProjectOperationActor;\n  changes: Scalars['JSON']['output'];\n  /** When the change settled. */\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['String']['output'];\n  object: Scalars['String']['output'];\n  /** '' for a plain event; e.g. 'patch', 'deploy' for operations. */\n  operationKind: Scalars['String']['output'];\n  /** '' for a plain event; 'applied' or 'failed' for operations. */\n  outcome: Scalars['String']['output'];\n  parentRef?: Maybe<Scalars['String']['output']>;\n  payload?: Maybe<Scalars['JSON']['output']>;\n  serviceIds: Array<Scalars['String']['output']>;\n  severity: EventSeverity;\n  source: Scalars['String']['output'];\n  workflowId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ProjectHistoryEntryEdge = {\n  __typename?: 'ProjectHistoryEntryEdge';\n  cursor: Scalars['String']['output'];\n  node: ProjectHistoryEntry;\n};\n\nexport type ProjectHistoryPageInfo = {\n  __typename?: 'ProjectHistoryPageInfo';\n  endCursor?: Maybe<Scalars['String']['output']>;\n  hasNextPage: Scalars['Boolean']['output'];\n};\n\nexport type ProjectInvitation = {\n  __typename?: 'ProjectInvitation';\n  email: Scalars['String']['output'];\n  expiresAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  inviter?: Maybe<ProjectInvitationInviter>;\n  isExpired: Scalars['Boolean']['output'];\n  project: PublicProjectInformation;\n};\n\nexport type ProjectInvitationInviter = {\n  __typename?: 'ProjectInvitationInviter';\n  email: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ProjectInviteUserInput = {\n  email: Scalars['String']['input'];\n  link: Scalars['String']['input'];\n};\n\nexport type ProjectInvitee = {\n  email: Scalars['String']['input'];\n  role: ProjectRole;\n};\n\nexport type ProjectMember = {\n  __typename?: 'ProjectMember';\n  avatar?: Maybe<Scalars['String']['output']>;\n  email: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  role: ProjectRole;\n};\n\nexport type ProjectMemberAddInput = {\n  projectId: Scalars['String']['input'];\n  role: ProjectRole;\n  userId: Scalars['String']['input'];\n};\n\nexport type ProjectMemberPermissionsInfo = {\n  __typename?: 'ProjectMemberPermissionsInfo';\n  email: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  role: ProjectRole;\n};\n\nexport type ProjectMemberRemoveInput = {\n  projectId: Scalars['String']['input'];\n  userId: Scalars['String']['input'];\n};\n\nexport type ProjectMemberTwoFactorInfo = {\n  __typename?: 'ProjectMemberTwoFactorInfo';\n  email: Scalars['String']['output'];\n  /** List of enabled 2FA methods (AUTHENTICATOR, PASSKEY) */\n  enabledMethods: Array<TwoFactorMethodCompliance>;\n  name?: Maybe<Scalars['String']['output']>;\n  twoFactorAuthEnabled: Scalars['Boolean']['output'];\n};\n\nexport type ProjectMemberUpdateInput = {\n  projectId: Scalars['String']['input'];\n  role: ProjectRole;\n  userId: Scalars['String']['input'];\n};\n\nexport type ProjectOperation = {\n  __typename?: 'ProjectOperation';\n  actor: ProjectOperationActor;\n  changes: Scalars['JSON']['output'];\n  /** In-flight child operations (e.g. deployments created by this patch). */\n  children: Array<ProjectOperation>;\n  environmentId: Scalars['String']['output'];\n  finishedAt?: Maybe<Scalars['DateTime']['output']>;\n  id: Scalars['String']['output'];\n  kind: Scalars['String']['output'];\n  parentRef?: Maybe<Scalars['String']['output']>;\n  startedAt: Scalars['DateTime']['output'];\n  status: OperationStatus;\n  workflowId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ProjectOperationActor = {\n  __typename?: 'ProjectOperationActor';\n  onBehalfOf?: Maybe<Scalars['String']['output']>;\n  principal?: Maybe<Scalars['String']['output']>;\n  surface?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ProjectPermission = Node & {\n  __typename?: 'ProjectPermission';\n  id: Scalars['ID']['output'];\n  projectId: Scalars['String']['output'];\n  role: ProjectRole;\n  userId: Scalars['String']['output'];\n};\n\nexport type ProjectPluginsConnection = {\n  __typename?: 'ProjectPluginsConnection';\n  edges: Array<ProjectPluginsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectPluginsConnectionEdge = {\n  __typename?: 'ProjectPluginsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Plugin;\n};\n\nexport type ProjectProjectPermissionsConnection = {\n  __typename?: 'ProjectProjectPermissionsConnection';\n  edges: Array<ProjectProjectPermissionsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectProjectPermissionsConnectionEdge = {\n  __typename?: 'ProjectProjectPermissionsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ProjectPermission;\n};\n\nexport type ProjectResourceAccess = {\n  __typename?: 'ProjectResourceAccess';\n  customDomain: AccessRule;\n  databaseDeployment: AccessRule;\n  deployment: AccessRule;\n  environment: AccessRule;\n  /** @deprecated Plugins have been removed */\n  plugin: AccessRule;\n  sandbox: AccessRule;\n};\n\nexport type ProjectRole =\n  | 'ADMIN'\n  | 'MEMBER'\n  | 'VIEWER';\n\nexport type ProjectServiceUsagePage = {\n  __typename?: 'ProjectServiceUsagePage';\n  pageInfo: ProjectServiceUsagePageInfo;\n  usage: Array<AggregatedUsage>;\n};\n\nexport type ProjectServiceUsagePageInfo = {\n  __typename?: 'ProjectServiceUsagePageInfo';\n  endCursor?: Maybe<Scalars['String']['output']>;\n  hasNextPage: Scalars['Boolean']['output'];\n};\n\nexport type ProjectServicesConnection = {\n  __typename?: 'ProjectServicesConnection';\n  edges: Array<ProjectServicesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectServicesConnectionEdge = {\n  __typename?: 'ProjectServicesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Service;\n};\n\nexport type ProjectToken = Node & {\n  __typename?: 'ProjectToken';\n  createdAt: Scalars['DateTime']['output'];\n  displayToken: Scalars['String']['output'];\n  environment: Environment;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  project: Project;\n  projectId: Scalars['String']['output'];\n};\n\nexport type ProjectTokenCreateInput = {\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type ProjectTransferConfirmInput = {\n  destinationWorkspaceId?: InputMaybe<Scalars['String']['input']>;\n  ownershipTransferId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type ProjectTransferInitiateInput = {\n  memberId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type ProjectTransferInput = {\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type ProjectTransferToTeamInput = {\n  teamId: Scalars['String']['input'];\n};\n\nexport type ProjectUpdateInput = {\n  baseEnvironmentId?: InputMaybe<Scalars['String']['input']>;\n  /** Enable/disable pull request environments for PRs created by bots */\n  botPrEnvironments?: InputMaybe<Scalars['Boolean']['input']>;\n  description?: InputMaybe<Scalars['String']['input']>;\n  /** Enable focused PR environments that only deploy services affected by changed files */\n  focusedPrEnvironments?: InputMaybe<Scalars['Boolean']['input']>;\n  isPublic?: InputMaybe<Scalars['Boolean']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n  prDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type ProjectUsageProperty =\n  | 'BACKUP_USAGE'\n  | 'CPU_USAGE'\n  | 'CURRENT_USAGE'\n  | 'DISK_USAGE'\n  | 'ESTIMATED_USAGE'\n  | 'MEMORY_USAGE'\n  | 'NETWORK_USAGE';\n\nexport type ProjectVolumesConnection = {\n  __typename?: 'ProjectVolumesConnection';\n  edges: Array<ProjectVolumesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectVolumesConnectionEdge = {\n  __typename?: 'ProjectVolumesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Volume;\n};\n\nexport type ProjectWorkspaceMember = {\n  __typename?: 'ProjectWorkspaceMember';\n  email: Scalars['String']['output'];\n  /** List of enabled 2FA methods (AUTHENTICATOR, PASSKEY) */\n  enabledMethods: Array<TwoFactorMethodProjectWorkspace>;\n  name?: Maybe<Scalars['String']['output']>;\n  twoFactorAuthEnabled: Scalars['Boolean']['output'];\n};\n\nexport type ProjectWorkspaceMembersResponse = {\n  __typename?: 'ProjectWorkspaceMembersResponse';\n  members: Array<ProjectWorkspaceMember>;\n  projectId: Scalars['String']['output'];\n  projectName: Scalars['String']['output'];\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type ProjectsOrderBy =\n  | 'CREATED_AT_DESC'\n  | 'NAME_ASC'\n  | 'UPDATED_AT_DESC';\n\nexport type ProviderAuth = Node & {\n  __typename?: 'ProviderAuth';\n  email: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  isAuthEnabled: Scalars['Boolean']['output'];\n  metadata: Scalars['JSON']['output'];\n  provider: Scalars['String']['output'];\n  userId: Scalars['String']['output'];\n};\n\nexport type PublicProjectInformation = {\n  __typename?: 'PublicProjectInformation';\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type PublicProjectInvitation = InviteCode | ProjectInvitation;\n\nexport type PublicRuntime =\n  | 'LEGACY'\n  | 'UNSPECIFIED'\n  | 'V2';\n\nexport type PublicStats = {\n  __typename?: 'PublicStats';\n  totalDeploymentsLastMonth: Scalars['Int']['output'];\n  totalLogsLastMonth: Scalars['BigInt']['output'];\n  totalProjects: Scalars['Int']['output'];\n  totalRequestsLastMonth: Scalars['BigInt']['output'];\n  totalServices: Scalars['Int']['output'];\n  totalUsers: Scalars['Int']['output'];\n};\n\nexport type PurgeCacheScope =\n  | 'ALL'\n  | 'HTML';\n\nexport type PurgeOnDeploy =\n  | 'ALL'\n  | 'HTML'\n  | 'OFF';\n\nexport type PurgeServiceCacheInput = {\n  environmentId: Scalars['String']['input'];\n  scope: PurgeCacheScope;\n  serviceId: Scalars['String']['input'];\n};\n\nexport type Query = {\n  __typename?: 'Query';\n  /** Get all volume instances for a given volume */\n  adminVolumeInstancesForVolume: Array<VolumeInstance>;\n  /** Get unified AI usage for a workspace */\n  agentUsage: AgentUsageSummary;\n  /** Returns the platform feature flags enabled for the current user */\n  allPlatformFeatureFlags: Array<PlatformFeatureFlagStatus>;\n  /** Introspect the current API token and its accessible workspaces. */\n  apiToken: ApiTokenContext;\n  /** Gets all API tokens for the authenticated user. */\n  apiTokens: QueryApiTokensConnection;\n  /** Get an audit log by ID */\n  auditLog: AuditLog;\n  /** Get a list of all audit log event types and their description */\n  auditLogEventTypeInfo: Array<AuditLogEventTypeInfo>;\n  /** Gets audit logs for a workspace. */\n  auditLogs: QueryAuditLogsConnection;\n  /** Railway agent chat bindings (Slack/Discord scope → workspace) across the caller's workspaces. */\n  botScopeBindings: Array<BotScopeBindingInfo>;\n  /** Get the S3-compatible credentials for a bucket */\n  bucketInstanceDetails?: Maybe<BucketInstanceDetails>;\n  /** Get the S3-compatible credentials for a bucket */\n  bucketS3Credentials: Array<BucketS3CompatibleCredentials>;\n  /** Fetch logs for a build */\n  buildLogs: Array<Log>;\n  /** Preview a canvas layout merge from one environment to another. Returns the merged state and the mutations needed to reach it. */\n  canvasViewMergePreview: CanvasViewMergePreview;\n  /** Gets the image URL for a Notion image block */\n  changelogBlockImage: Scalars['String']['output'];\n  /** A cloud agent by ID, within an environment. Null when the agent belongs to another one, so a caller cannot render an agent it has switched away from. */\n  cloudAgent?: Maybe<CloudAgent>;\n  /** A cloud agent checkpoint by ID. */\n  cloudAgentCheckpoint: CloudAgentCheckpoint;\n  /** Cloud agent checkpoints in an environment, newest first. */\n  cloudAgentCheckpoints: QueryCloudAgentCheckpointsConnection;\n  /** Shell and exec sessions running on a cloud agent's VM that you can reconnect to. Null if the agent has no running machine. */\n  cloudAgentConsoleSessions?: Maybe<QueryCloudAgentConsoleSessionsConnection>;\n  /** Read a task turn without waking the VM: the latest on the agent/session, or taskId's. */\n  cloudAgentTask: CloudAgentTaskResult;\n  /** List task records in an environment, newest first. Filter to one agent, or with sessionId to one session's turns. */\n  cloudAgentTasks: CloudAgentTaskPage;\n  /** Cloud agents in an environment. */\n  cloudAgents: Array<CloudAgent>;\n  /** Get compliance agreements for a workspace including HIPAA BAA and GDPR DPA status. */\n  complianceAgreements: ComplianceAgreementsInfo;\n  /** Fetch details for a custom domain */\n  customDomain: CustomDomain;\n  /** Checks if a custom domain is available. */\n  customDomainAvailable: DomainAvailable;\n  /** Find a single deployment */\n  deployment: Deployment;\n  /** Get the deployment events for a deployment */\n  deploymentEvents: QueryDeploymentEventsConnection;\n  /** Get the deployment instance executions for a deployment. */\n  deploymentInstanceExecutions: QueryDeploymentInstanceExecutionsConnection;\n  /** Fetch logs for a deployment */\n  deploymentLogs: Array<Log>;\n  /** Find a single DeploymentSnapshot */\n  deploymentSnapshot?: Maybe<DeploymentSnapshot>;\n  /** All deployment triggers. */\n  deploymentTriggers: QueryDeploymentTriggersConnection;\n  /** Get all deployments */\n  deployments: QueryDeploymentsConnection;\n  /** The cloud agent `ssh dev.new` lands you in, or null when the next connection will create one. */\n  devNewLandingTarget?: Maybe<CloudAgent>;\n  /** Fetch individual DNS query logs for an environment */\n  dnsQueryLogs: Array<DnsQueryLog>;\n  /**\n   * Domain with status\n   * @deprecated Use the `status` field within the `domain` query instead\n   */\n  domainStatus: DomainWithStatus;\n  /** All domains for a service instance */\n  domains: AllDomains;\n  /** Preview HA static egress IPs that would be assigned without persisting */\n  egressGatewayHAPreview: Array<EgressGateway>;\n  /** Preview legacy static egress IP that would be assigned without persisting */\n  egressGatewayLegacyPreview: Array<EgressGateway>;\n  /** All egress gateways assigned to a service instance */\n  egressGateways: Array<EgressGateway>;\n  /** Find a single environment */\n  environment: Environment;\n  /** Returns the status or completed result of an asynchronous RailwayChangeSet apply. */\n  environmentChangeSetApply: ChangeSetApplyResult;\n  /** Whether any service in the environment is on legacy static egress (not HA). Used to surface the HA migration banner. */\n  environmentHasLegacyStaticEgress: Scalars['Boolean']['output'];\n  /** Settled history for an environment (system events + terminal operations), newest first. Cursor-paginated. */\n  environmentHistory: ProjectHistoryConnection;\n  /** Fetch logs for a project environment. Build logs are excluded unless a snapshot ID is explicitly provided in the filter */\n  environmentLogs: Array<Log>;\n  /** Get a single environment patch by ID */\n  environmentPatch: EnvironmentPatch;\n  /** Get the patches for an environment */\n  environmentPatches: QueryEnvironmentPatchesConnection;\n  /** Pending project-mutating work for an environment. Unions registered OperationSources (patches, standalone deploys) and returns parent rows only — not a stored inbox. */\n  environmentPendingWork: Array<ProjectOperation>;\n  /** Get the latest staged commit for a single environment. */\n  environmentStagedChanges: EnvironmentPatch;\n  /** Gets all environments for a project. */\n  environments: QueryEnvironmentsConnection;\n  /** Get the estimated total cost of the project at the end of the current billing cycle. If no `startDate` is provided, the usage for the current billing period of the project owner is returned. */\n  estimatedUsage: Array<EstimatedUsage>;\n  /** Gets the events for a project. */\n  events: QueryEventsConnection;\n  /** Get the workspaces the user doesn't belong to, but needs access (like when invited to a project) */\n  externalWorkspaces: Array<ExternalWorkspace>;\n  /** Get information about a specific function runtime */\n  functionRuntime: FunctionRuntime;\n  /** List available function runtimes */\n  functionRuntimes: Array<FunctionRuntime>;\n  /** Checks if user has access to GitHub repository */\n  gitHubRepoAccessAvailable: GitHubAccess;\n  /** Gets SSH public keys from the authenticated user's GitHub account. */\n  gitHubSshKeys: Array<GitHubSshKey>;\n  /** Check if a repo name is available */\n  githubIsRepoNameAvailable: Scalars['Boolean']['output'];\n  /** Get info for a GitHub pull request */\n  githubPRInfo?: Maybe<GitHubPrInfo>;\n  /** Get info for a GitHub pull request, including fetch errors */\n  githubPRInfoResult: GitHubPrInfoResult;\n  /** Checks if user has access to GitHub repository */\n  githubRepo: GitHubRepoWithoutInstallation;\n  /** Get branches for a GitHub repo that the authenticated user has access to */\n  githubRepoBranches: Array<GitHubBranch>;\n  /** Get a list of repos for a user that Railway has access to */\n  githubRepos: Array<GitHubRepo>;\n  /** Get a list of scopes the user has installed the installation to */\n  githubWritableScopes: Array<Scalars['String']['output']>;\n  /** Get the Herokus apps for the current user */\n  herokuApps: Array<HerokuApp>;\n  /** Get HTTP request duration metrics for a service (avg, p50, p90, p95, p99) */\n  httpDurationMetrics: HttpDurationMetricsResult;\n  /** Fetch HTTP logs for a deployment */\n  httpLogs: Array<HttpLog>;\n  /** Get HTTP request metrics for a service */\n  httpMetrics: HttpMetricsResult;\n  /** Get HTTP request metrics for a service, grouped by status code */\n  httpMetricsGroupedByStatus: Array<HttpMetricsByStatusResult>;\n  /** Get an integration auth by provider providerId */\n  integrationAuth: IntegrationAuth;\n  /** Get all integration auths for a user */\n  integrationAuths: QueryIntegrationAuthsConnection;\n  /** Get all integrations for a project */\n  integrations: QueryIntegrationsConnection;\n  /** Get an invite code by the code */\n  inviteCode: InviteCode;\n  /** Gets the authenticated user. */\n  me: User;\n  /** Get metrics for a project, environment, and service */\n  metrics: Array<MetricsResult>;\n  /** Cloud agents you own, across every project and environment you can reach. Answers \"where are my agents\" in one request; `cloudAgents` needs one call per environment. Machine fields (`status`, `domain`, `domains`) read the last observed state in batched queries, so selecting them across many environments is fine. */\n  myCloudAgents: Array<CloudAgent>;\n  /** The point-in-time window a MySQL service's binlog archive can restore to, resolved from the archive bucket: the oldest full backup (floor), the newest shipped binlog (ceiling) and every full backup's timestamp. archiveConfigured is false when the service carries no complete BINLOG_ARCHIVE_* contract. */\n  mysqlPitrRestorableWindow: MysqlPitrRestorableWindow;\n  /** Fetch individual network flow logs for an environment */\n  networkFlowLogs: Array<NetworkFlowLog>;\n  /** Gets notification deliveries for the authenticated user */\n  notificationDeliveries: QueryNotificationDeliveriesConnection;\n  /** Gets a notification delivery by ID for the authenticated user */\n  notificationDelivery?: Maybe<NotificationDelivery>;\n  /** Get all notification rules for a workspace and project */\n  notificationRules: Array<NotificationRule>;\n  /** Get all observability dashboards for an environment */\n  observabilityDashboards: QueryObservabilityDashboardsConnection;\n  /** Gets all passkeys for the authenticated user */\n  passkeys: QueryPasskeysConnection;\n  /** Live replication health for an HA database cluster (Postgres HA, MySQL HA). Use it to gate the Enable/Disable PITR buttons so a rollout can't start while a member is too far behind to rejoin. Returns null when the service isn't an HA root. */\n  pitrHaClusterReplicationHealth?: Maybe<PitrHaClusterReplicationHealth>;\n  /** One-shot read of the current progress of a PITR enable/disable rollout on an HA database cluster. Use it to rehydrate state on page load, then poll this field for updates. Returns null when no rollout has run recently. */\n  pitrHaWorkflowProgress?: Maybe<PitrHaWorkflowProgress>;\n  /** Get the current status of the platform */\n  platformStatus: PlatformStatus;\n  /**\n   * Get a plugin by ID.\n   * @deprecated Plugins are deprecated\n   */\n  plugin: Plugin;\n  /**\n   * Fetch logs for a plugin\n   * @deprecated Plugins are deprecated\n   */\n  pluginLogs: Array<Log>;\n  /** Get the email preferences for a user */\n  preferences: Preferences;\n  /** Get a private network endpoint for a service instance. */\n  privateNetworkEndpoint?: Maybe<PrivateNetworkEndpoint>;\n  /** Check if an endpoint name is available. */\n  privateNetworkEndpointNameAvailable: Scalars['Boolean']['output'];\n  /** List private networks for an environment. */\n  privateNetworks: Array<PrivateNetwork>;\n  /** Get a project by ID */\n  project: Project;\n  /** Get comprehensive compliance information for a project including 2FA status, member permissions, backup schedules, and compliance agreements. Requires workspace API token with admin access. */\n  projectCompliance: ProjectComplianceInfo;\n  /** The authenticated user's favorited project ids in a workspace, in the order the Favorites row should render them. Defaults to the order they were starred in. */\n  projectFavorites: Array<Scalars['String']['output']>;\n  /** Get a project invitation by code */\n  projectInvitation: PublicProjectInvitation;\n  /** Get invitations for a project */\n  projectInvitations: Array<ProjectInvitation>;\n  /** Get an invite code for a project for a specifc role */\n  projectInviteCode: InviteCode;\n  /** Gets users who belong to a project along with their role */\n  projectMembers: Array<ProjectMember>;\n  /** Get resource access rules for project-specific actions */\n  projectResourceAccess: ProjectResourceAccess;\n  /** Get paginated usage grouped by project and service for a workspace. */\n  projectServiceUsage: ProjectServiceUsagePage;\n  /** Get a single project token by the value in the header */\n  projectToken: ProjectToken;\n  /** Get all project tokens for a project */\n  projectTokens: QueryProjectTokensConnection;\n  /** Get workspace members for a project with 2FA details */\n  projectWorkspaceMembers: ProjectWorkspaceMembersResponse;\n  /** Gets all projects for a user or workspace. */\n  projects: QueryProjectsConnection;\n  /** Fetch multiple projects by id. Skips ids the caller cannot access (does not throw on partial denial). Intended for batched dashboard hydration of a small viewport-sized set of cards. */\n  projectsByIds: Array<Project>;\n  /** Get public Railway stats. */\n  publicStats: PublicStats;\n  /** Get a Railway domain by ID */\n  railwayDomain: RailwayDomain;\n  /** Get a Railway domain by its domain name within a workspace */\n  railwayDomainByName: RailwayDomain;\n  /** List DNS records for a Railway domain */\n  railwayDomainDnsRecords: Array<RailwayDomainDnsRecord>;\n  /** Whether email forwarding can be offered on this domain, or why it can't. */\n  railwayDomainEmailForwardingEligibility: RailwayDomainEmailForwardingEligibility;\n  /** Caps the forwarding UI surfaces before a rule is rejected server-side. Pass workspaceId for that workspace's alias allowance; without it the highest plan's is returned. */\n  railwayDomainEmailForwardingLimits: RailwayDomainEmailForwardingLimits;\n  /** List email forwarding rules for a Railway domain */\n  railwayDomainEmailForwardingRules: Array<RailwayDomainEmailForwardingRule>;\n  /** Get Railway domains for a workspace */\n  railwayDomains: Array<RailwayDomain>;\n  /** Gets the ReferralInfo for the authenticated user. */\n  referralInfo: ReferralInfo;\n  /** List available regions */\n  regions: Array<Region>;\n  /** Get resource access for the current user or workspace */\n  resourceAccess: ResourceAccess;\n  /** Get a sandbox by id. */\n  sandbox?: Maybe<Sandbox>;\n  /** List named sandbox checkpoints in an environment. */\n  sandboxCheckpoints: Array<SandboxCheckpoint>;\n  /** Resumable sessions inside a sandbox — interactive shells and one-off exec commands, live or recently exited. Null when the sandbox can't report them (e.g. its vm-init predates session listing). */\n  sandboxSessions?: Maybe<QuerySandboxSessionsConnection>;\n  /** Get a template's build state by id (the recipe content hash). READY once its checkpoint exists; BUILDING/FAILED reflect the build workflow. */\n  sandboxTemplateBuild: SandboxTemplateBuild;\n  /** List sandboxes in an environment, newest first. Passing first/after paginates; omitting them returns the full list. */\n  sandboxes: QuerySandboxesConnection;\n  /** Get a service by ID */\n  service: Service;\n  /** Checks if a service domain is available */\n  serviceDomainAvailable: DomainAvailable;\n  /** Get a service instance belonging to a service and environment */\n  serviceInstance: ServiceInstance;\n  /** Returns the auto-deploy status for a service instance, including whether it can be enabled. */\n  serviceInstanceAutoDeployStatus: ServiceInstanceAutoDeployStatus;\n  /** Check if the upstream repo for a service has an update available */\n  serviceInstanceIsUpdatable: Scalars['Boolean']['output'];\n  /** Get the service instance resource limit overrides (null if no overrides set) */\n  serviceInstanceLimitOverride?: Maybe<Scalars['ServiceInstanceLimit']['output']>;\n  /** Get the merged resource limits for a service instance (includes plan defaults) */\n  serviceInstanceLimits: Scalars['ServiceInstanceLimit']['output'];\n  /** Gets all sessions for authenticated user. */\n  sessions: QuerySessionsConnection;\n  /** Fetch a single signal by owner scope and name. */\n  signal?: Maybe<Signal>;\n  /** Recent audit log entries for a signal. */\n  signalChanges: Array<SignalChange>;\n  /** Evaluate a signal against an evaluation context (pure resolution; does not mutate registry state). */\n  signalEvaluate: SignalEvaluation;\n  /** List signals registered for an owner scope. */\n  signals: Array<Signal>;\n  /** Gets SSH public keys. If workspaceId is provided, returns the keys owned by that workspace (requires workspace MEMBER access). Under a workspace-scoped API token, workspaceId defaults to the token's workspace when omitted; otherwise returns the authenticated user's personal keys. */\n  sshPublicKeys: QuerySshPublicKeysConnection;\n  /** Details for an SSH signup confirm page: the SSH key fingerprint to verify before binding it to the account, and the trial box it owns if any. */\n  sshSignupInfo: SshSignupInfo;\n  /** All TCP proxies for a service instance */\n  tcpProxies: Array<TcpProxy>;\n  /**\n   * Find a team by ID\n   * @deprecated Teams are now workspaces. Use the workspace query instead.\n   */\n  team: Team;\n  /**\n   * Get all templates for a team.\n   * @deprecated Use templates instead - teams are now workspaces\n   */\n  teamTemplates: QueryTeamTemplatesConnection;\n  /** Get a template by code or ID or GitHub owner and repo. */\n  template: Template;\n  /** Get the metrics for a template. */\n  templateMetrics: TemplateMetrics;\n  /** Search published templates using the backend-ranked template search index. */\n  templateSearch: QueryTemplateSearchConnection;\n  /** Get the source template for a project. */\n  templateSourceForProject?: Maybe<Template>;\n  /** Get all published templates. */\n  templates: QueryTemplatesConnection;\n  /** Count all published templates. */\n  templatesCount: Scalars['Int']['output'];\n  /** The spans of one trace, oldest first. Only spans belonging to the environment are returned */\n  trace: Array<TraceSpan>;\n  /** Traces of an environment with at least one span matching the filter, newest first */\n  traces: Array<TraceSummary>;\n  /** Span activity per service of an environment within retention; a service absent from the list has produced no spans at all */\n  tracingStatus: Array<ServiceTracingStatus>;\n  /** Get all trusted domains for a workspace */\n  trustedDomains: QueryTrustedDomainsConnection;\n  /** Gets the TwoFactorInfo for the authenticated user. */\n  twoFactorInfo: TwoFactorInfo;\n  /** Get the usage for a single project or all projects for a user/workspace. If no `projectId` or `workspaceId` is provided, the usage for the current user is returned. If no `startDate` is provided, the usage for the current billing period of the project owner is returned. */\n  usage: Array<AggregatedUsage>;\n  /**\n   * Get the total kickback earnings for a user.\n   * @deprecated This field is deprecated and will be removed in future versions.\n   */\n  userKickbackEarnings: UserKickbackEarnings;\n  /** Get the public profile for a user */\n  userProfile: UserProfileResponse;\n  /**\n   * Get all templates for the current user.\n   * @deprecated Users don't have personal templates anymore, they belong to their team now\n   */\n  userTemplates: QueryUserTemplatesConnection;\n  /** Validates an edge ruleset without writing it — returns the same diagnostics updateServiceEdgeRules would reject with (empty list = valid). For live feedback in rule editors. */\n  validateServiceEdgeRules: Array<EdgeRuleDiagnostic>;\n  /** All variables by pluginId or serviceId. If neither are provided, all shared variables are returned. */\n  variables: Scalars['EnvironmentVariables']['output'];\n  /** All rendered variables that are required for a service deployment. */\n  variablesForServiceDeployment: Scalars['EnvironmentVariables']['output'];\n  /** Get information about the user's Vercel accounts */\n  vercelInfo: VercelInfo;\n  /** Get a single volume instance by id */\n  volumeInstance: VolumeInstance;\n  /** List backups of a volume instance */\n  volumeInstanceBackupList: Array<VolumeInstanceBackup>;\n  /** List backups schedules of a volume instance */\n  volumeInstanceBackupScheduleList: Array<VolumeInstanceBackupSchedule>;\n  /** Estimated destination-volume scratch a PITR restore of this volume instance to a target would need, and whether it fits the workspace plan's max volume size. Read-only pre-check the restore dialog calls to warn before a restore that would fill the disk mid-replay; returns null when no estimate can be formed (non-pgBackRest source, incomplete archive creds, or a target before the earliest backup). */\n  volumeInstancePitrRestoreEstimate?: Maybe<PitrRestoreScratchEstimate>;\n  /** Gets the status of a workflow */\n  workflowStatus: WorkflowResult;\n  /** Get the workspace */\n  workspace: Workspace;\n  /** Find a workspace by invite code */\n  workspaceByCode: Workspace;\n  /** Gets all identity providers of a workspace */\n  workspaceIdentityProviders: QueryWorkspaceIdentityProvidersConnection;\n  /** Get the policies for a workspace */\n  workspacePolicy?: Maybe<WorkspacePolicy>;\n  /** List deploy sources that can be added to a workspace policy. */\n  workspacePolicySelectableDeploySources: Array<WorkspacePolicySelectableDeploySource>;\n  /** Get all templates for a workspace. */\n  workspaceTemplates: QueryWorkspaceTemplatesConnection;\n  /** Workspace-wide SUM of the same UI usage rollup as `usage` grouped by project. Use this for the usage-page header so it does not wait on per-project rows. Deleted projects that still bill are included when `includeDeleted` is true. */\n  workspaceUsageTotals: Array<AggregatedUsage>;\n};\n\n\nexport type QueryAdminVolumeInstancesForVolumeArgs = {\n  volumeId: Scalars['String']['input'];\n};\n\n\nexport type QueryAgentUsageArgs = {\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryApiTokensArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryAuditLogArgs = {\n  id: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryAuditLogsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  filter?: InputMaybe<AuditLogFilterInput>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  sort?: InputMaybe<SortOrder>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryBucketInstanceDetailsArgs = {\n  bucketId: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type QueryBucketS3CredentialsArgs = {\n  bucketId: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryBuildLogsArgs = {\n  deploymentId: Scalars['String']['input'];\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\n\nexport type QueryCanvasViewMergePreviewArgs = {\n  sourceEnvironmentId: Scalars['String']['input'];\n  targetEnvironmentId: Scalars['String']['input'];\n};\n\n\nexport type QueryChangelogBlockImageArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryCloudAgentArgs = {\n  environmentId: Scalars['ID']['input'];\n  id: Scalars['ID']['input'];\n};\n\n\nexport type QueryCloudAgentCheckpointArgs = {\n  id: Scalars['ID']['input'];\n};\n\n\nexport type QueryCloudAgentCheckpointsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['ID']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryCloudAgentConsoleSessionsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  cloudAgentId: Scalars['ID']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryCloudAgentTaskArgs = {\n  cloudAgentId: Scalars['String']['input'];\n  sessionId: Scalars['String']['input'];\n  taskId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryCloudAgentTasksArgs = {\n  cloudAgentId?: InputMaybe<Scalars['String']['input']>;\n  cursor?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  sessionId?: InputMaybe<Scalars['String']['input']>;\n  status?: InputMaybe<CloudAgentTaskStatus>;\n};\n\n\nexport type QueryCloudAgentsArgs = {\n  environmentId: Scalars['ID']['input'];\n  mine?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type QueryComplianceAgreementsArgs = {\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryCustomDomainArgs = {\n  id: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryCustomDomainAvailableArgs = {\n  domain: Scalars['String']['input'];\n};\n\n\nexport type QueryDeploymentArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryDeploymentEventsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  id: Scalars['String']['input'];\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryDeploymentInstanceExecutionsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  input: DeploymentInstanceExecutionListInput;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryDeploymentLogsArgs = {\n  deploymentId: Scalars['String']['input'];\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\n\nexport type QueryDeploymentSnapshotArgs = {\n  deploymentId: Scalars['String']['input'];\n};\n\n\nexport type QueryDeploymentTriggersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryDeploymentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  input: DeploymentListInput;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryDnsQueryLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  deploymentInstanceId?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryDomainStatusArgs = {\n  id: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryDomainsArgs = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryEgressGatewayHaPreviewArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryEgressGatewayLegacyPreviewArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryEgressGatewaysArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentArgs = {\n  id: Scalars['String']['input'];\n  projectId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryEnvironmentChangeSetApplyArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentHasLegacyStaticEgressArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentHistoryArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<HistoryFilterInput>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryEnvironmentLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryEnvironmentPatchArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentPatchesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryEnvironmentPendingWorkArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentStagedChangesArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  isEphemeral?: InputMaybe<Scalars['Boolean']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryEstimatedUsageArgs = {\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  measurements: Array<MetricMeasurement>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryEventsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  filter?: InputMaybe<EventFilterInput>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryExternalWorkspacesArgs = {\n  projectId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryFunctionRuntimeArgs = {\n  name: FunctionRuntimeName;\n};\n\n\nexport type QueryGitHubRepoAccessAvailableArgs = {\n  fullRepoName: Scalars['String']['input'];\n};\n\n\nexport type QueryGithubIsRepoNameAvailableArgs = {\n  fullRepoName: Scalars['String']['input'];\n};\n\n\nexport type QueryGithubPrInfoArgs = {\n  prNumber: Scalars['Int']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryGithubPrInfoResultArgs = {\n  prNumber: Scalars['Int']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryGithubRepoArgs = {\n  fullRepoName: Scalars['String']['input'];\n};\n\n\nexport type QueryGithubRepoBranchesArgs = {\n  owner: Scalars['String']['input'];\n  repo: Scalars['String']['input'];\n};\n\n\nexport type QueryHttpDurationMetricsArgs = {\n  endDate: Scalars['DateTime']['input'];\n  environmentId: Scalars['String']['input'];\n  method?: InputMaybe<Scalars['String']['input']>;\n  path?: InputMaybe<Scalars['String']['input']>;\n  serviceId: Scalars['String']['input'];\n  startDate: Scalars['DateTime']['input'];\n  statusCode?: InputMaybe<Scalars['Int']['input']>;\n  stepSeconds?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryHttpLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  deploymentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryHttpMetricsArgs = {\n  endDate: Scalars['DateTime']['input'];\n  environmentId: Scalars['String']['input'];\n  method?: InputMaybe<Scalars['String']['input']>;\n  path?: InputMaybe<Scalars['String']['input']>;\n  serviceId: Scalars['String']['input'];\n  startDate: Scalars['DateTime']['input'];\n  statusCode?: InputMaybe<Scalars['Int']['input']>;\n  stepSeconds?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryHttpMetricsGroupedByStatusArgs = {\n  endDate: Scalars['DateTime']['input'];\n  environmentId: Scalars['String']['input'];\n  method?: InputMaybe<Scalars['String']['input']>;\n  path?: InputMaybe<Scalars['String']['input']>;\n  serviceId: Scalars['String']['input'];\n  startDate: Scalars['DateTime']['input'];\n  stepSeconds?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryIntegrationAuthArgs = {\n  provider: Scalars['String']['input'];\n  providerId: Scalars['String']['input'];\n};\n\n\nexport type QueryIntegrationAuthsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryIntegrationsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryInviteCodeArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type QueryMetricsArgs = {\n  averagingWindowSeconds?: InputMaybe<Scalars['Int']['input']>;\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  groupBy?: InputMaybe<Array<MetricTag>>;\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  measurements: Array<MetricMeasurement>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  sampleRateSeconds?: InputMaybe<Scalars['Int']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  startDate: Scalars['DateTime']['input'];\n  volumeId?: InputMaybe<Scalars['String']['input']>;\n  volumeInstanceExternalId?: InputMaybe<Scalars['String']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryMysqlPitrRestorableWindowArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryNetworkFlowLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  deploymentInstanceId?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryNotificationDeliveriesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  filter?: InputMaybe<NotificationDeliveryFilterInput>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryNotificationDeliveryArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryNotificationRulesArgs = {\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryObservabilityDashboardsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryPasskeysArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryPitrHaClusterReplicationHealthArgs = {\n  environmentId: Scalars['String']['input'];\n  rootServiceId: Scalars['String']['input'];\n};\n\n\nexport type QueryPitrHaWorkflowProgressArgs = {\n  environmentId: Scalars['String']['input'];\n  rootServiceId: Scalars['String']['input'];\n};\n\n\nexport type QueryPluginArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryPluginLogsArgs = {\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  pluginId: Scalars['String']['input'];\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\n\nexport type QueryPreferencesArgs = {\n  token?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryPrivateNetworkEndpointArgs = {\n  environmentId: Scalars['String']['input'];\n  privateNetworkId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryPrivateNetworkEndpointNameAvailableArgs = {\n  environmentId: Scalars['String']['input'];\n  prefix: Scalars['String']['input'];\n  privateNetworkId: Scalars['String']['input'];\n};\n\n\nexport type QueryPrivateNetworksArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectComplianceArgs = {\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectFavoritesArgs = {\n  orderBy?: InputMaybe<ProjectsOrderBy>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectInvitationArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectInvitationsArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectInviteCodeArgs = {\n  projectId: Scalars['String']['input'];\n  role: ProjectRole;\n};\n\n\nexport type QueryProjectMembersArgs = {\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectResourceAccessArgs = {\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectServiceUsageArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  endDate: Scalars['DateTime']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  measurements: Array<MetricMeasurement>;\n  startDate: Scalars['DateTime']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectTokensArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectWorkspaceMembersArgs = {\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  orderBy?: InputMaybe<ProjectsOrderBy>;\n  userId?: InputMaybe<Scalars['String']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryProjectsByIdsArgs = {\n  ids: Array<Scalars['String']['input']>;\n};\n\n\nexport type QueryRailwayDomainArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryRailwayDomainByNameArgs = {\n  domain: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryRailwayDomainDnsRecordsArgs = {\n  domain: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryRailwayDomainEmailForwardingEligibilityArgs = {\n  domain: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryRailwayDomainEmailForwardingLimitsArgs = {\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryRailwayDomainEmailForwardingRulesArgs = {\n  domain: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryRailwayDomainsArgs = {\n  status?: InputMaybe<RailwayDomainStatus>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryReferralInfoArgs = {\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryRegionsArgs = {\n  projectId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryResourceAccessArgs = {\n  explicitResourceOwner: ExplicitOwnerInput;\n};\n\n\nexport type QuerySandboxArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n};\n\n\nexport type QuerySandboxCheckpointsArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type QuerySandboxSessionsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  id: Scalars['String']['input'];\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QuerySandboxTemplateBuildArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n};\n\n\nexport type QuerySandboxesArgs = {\n  active?: InputMaybe<Scalars['Boolean']['input']>;\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryServiceArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceDomainAvailableArgs = {\n  domain: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceInstanceArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceInstanceAutoDeployStatusArgs = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceInstanceIsUpdatableArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceInstanceLimitOverrideArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceInstanceLimitsArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QuerySessionsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QuerySignalArgs = {\n  name: Scalars['String']['input'];\n  owner?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QuerySignalChangesArgs = {\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  name: Scalars['String']['input'];\n  owner?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QuerySignalEvaluateArgs = {\n  context: Scalars['JSON']['input'];\n  name: Scalars['String']['input'];\n  owner?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QuerySignalsArgs = {\n  owner?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QuerySshPublicKeysArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QuerySshSignupInfoArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type QueryTcpProxiesArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryTeamArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryTeamTemplatesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  teamId: Scalars['String']['input'];\n};\n\n\nexport type QueryTemplateArgs = {\n  code?: InputMaybe<Scalars['String']['input']>;\n  id?: InputMaybe<Scalars['String']['input']>;\n  owner?: InputMaybe<Scalars['String']['input']>;\n  repo?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryTemplateMetricsArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryTemplateSearchArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  category?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  query: Scalars['String']['input'];\n  verified?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type QueryTemplateSourceForProjectArgs = {\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryTemplatesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  recommended?: InputMaybe<Scalars['Boolean']['input']>;\n  verified?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type QueryTraceArgs = {\n  environmentId: Scalars['String']['input'];\n  maxSpans?: InputMaybe<Scalars['Int']['input']>;\n  traceId: Scalars['String']['input'];\n};\n\n\nexport type QueryTracesArgs = {\n  endDate?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  startDate?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryTracingStatusArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type QueryTrustedDomainsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryUsageArgs = {\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  groupBy?: InputMaybe<Array<MetricTag>>;\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  measurements: Array<MetricMeasurement>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryUserKickbackEarningsArgs = {\n  userId: Scalars['String']['input'];\n};\n\n\nexport type QueryUserProfileArgs = {\n  username: Scalars['String']['input'];\n};\n\n\nexport type QueryUserTemplatesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryValidateServiceEdgeRulesArgs = {\n  input: ValidateServiceEdgeRulesInput;\n};\n\n\nexport type QueryVariablesArgs = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  unrendered?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type QueryVariablesForServiceDeploymentArgs = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryVolumeInstanceArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryVolumeInstanceBackupListArgs = {\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type QueryVolumeInstanceBackupScheduleListArgs = {\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type QueryVolumeInstancePitrRestoreEstimateArgs = {\n  sourceRepoPath?: InputMaybe<Scalars['String']['input']>;\n  targetTimestamp: Scalars['DateTime']['input'];\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkflowStatusArgs = {\n  workflowId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspaceArgs = {\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspaceByCodeArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspaceIdentityProvidersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspacePolicyArgs = {\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspacePolicySelectableDeploySourcesArgs = {\n  sourceType: WorkspacePolicyDeploySourceType;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspaceTemplatesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspaceUsageTotalsArgs = {\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  measurements: Array<MetricMeasurement>;\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type QueryApiTokensConnection = {\n  __typename?: 'QueryApiTokensConnection';\n  edges: Array<QueryApiTokensConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryApiTokensConnectionEdge = {\n  __typename?: 'QueryApiTokensConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ApiToken;\n};\n\nexport type QueryAuditLogsConnection = {\n  __typename?: 'QueryAuditLogsConnection';\n  edges: Array<QueryAuditLogsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryAuditLogsConnectionEdge = {\n  __typename?: 'QueryAuditLogsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: AuditLog;\n};\n\nexport type QueryCloudAgentCheckpointsConnection = {\n  __typename?: 'QueryCloudAgentCheckpointsConnection';\n  edges: Array<QueryCloudAgentCheckpointsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryCloudAgentCheckpointsConnectionEdge = {\n  __typename?: 'QueryCloudAgentCheckpointsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: CloudAgentCheckpoint;\n};\n\nexport type QueryCloudAgentConsoleSessionsConnection = {\n  __typename?: 'QueryCloudAgentConsoleSessionsConnection';\n  edges: Array<QueryCloudAgentConsoleSessionsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryCloudAgentConsoleSessionsConnectionEdge = {\n  __typename?: 'QueryCloudAgentConsoleSessionsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: SandboxSession;\n};\n\nexport type QueryDeploymentEventsConnection = {\n  __typename?: 'QueryDeploymentEventsConnection';\n  edges: Array<QueryDeploymentEventsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryDeploymentEventsConnectionEdge = {\n  __typename?: 'QueryDeploymentEventsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentEvent;\n};\n\nexport type QueryDeploymentInstanceExecutionsConnection = {\n  __typename?: 'QueryDeploymentInstanceExecutionsConnection';\n  edges: Array<QueryDeploymentInstanceExecutionsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryDeploymentInstanceExecutionsConnectionEdge = {\n  __typename?: 'QueryDeploymentInstanceExecutionsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentInstanceExecution;\n};\n\nexport type QueryDeploymentTriggersConnection = {\n  __typename?: 'QueryDeploymentTriggersConnection';\n  edges: Array<QueryDeploymentTriggersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryDeploymentTriggersConnectionEdge = {\n  __typename?: 'QueryDeploymentTriggersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentTrigger;\n};\n\nexport type QueryDeploymentsConnection = {\n  __typename?: 'QueryDeploymentsConnection';\n  edges: Array<QueryDeploymentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryDeploymentsConnectionEdge = {\n  __typename?: 'QueryDeploymentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Deployment;\n};\n\nexport type QueryEnvironmentPatchesConnection = {\n  __typename?: 'QueryEnvironmentPatchesConnection';\n  edges: Array<QueryEnvironmentPatchesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryEnvironmentPatchesConnectionEdge = {\n  __typename?: 'QueryEnvironmentPatchesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: EnvironmentPatch;\n};\n\nexport type QueryEnvironmentsConnection = {\n  __typename?: 'QueryEnvironmentsConnection';\n  edges: Array<QueryEnvironmentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryEnvironmentsConnectionEdge = {\n  __typename?: 'QueryEnvironmentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Environment;\n};\n\nexport type QueryEventsConnection = {\n  __typename?: 'QueryEventsConnection';\n  edges: Array<QueryEventsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryEventsConnectionEdge = {\n  __typename?: 'QueryEventsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Event;\n};\n\nexport type QueryIntegrationAuthsConnection = {\n  __typename?: 'QueryIntegrationAuthsConnection';\n  edges: Array<QueryIntegrationAuthsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryIntegrationAuthsConnectionEdge = {\n  __typename?: 'QueryIntegrationAuthsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: IntegrationAuth;\n};\n\nexport type QueryIntegrationsConnection = {\n  __typename?: 'QueryIntegrationsConnection';\n  edges: Array<QueryIntegrationsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryIntegrationsConnectionEdge = {\n  __typename?: 'QueryIntegrationsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Integration;\n};\n\nexport type QueryNotificationDeliveriesConnection = {\n  __typename?: 'QueryNotificationDeliveriesConnection';\n  edges: Array<QueryNotificationDeliveriesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryNotificationDeliveriesConnectionEdge = {\n  __typename?: 'QueryNotificationDeliveriesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: NotificationDelivery;\n};\n\nexport type QueryObservabilityDashboardsConnection = {\n  __typename?: 'QueryObservabilityDashboardsConnection';\n  edges: Array<QueryObservabilityDashboardsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryObservabilityDashboardsConnectionEdge = {\n  __typename?: 'QueryObservabilityDashboardsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ObservabilityDashboard;\n};\n\nexport type QueryPasskeysConnection = {\n  __typename?: 'QueryPasskeysConnection';\n  edges: Array<QueryPasskeysConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryPasskeysConnectionEdge = {\n  __typename?: 'QueryPasskeysConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Passkey;\n};\n\nexport type QueryProjectTokensConnection = {\n  __typename?: 'QueryProjectTokensConnection';\n  edges: Array<QueryProjectTokensConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryProjectTokensConnectionEdge = {\n  __typename?: 'QueryProjectTokensConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ProjectToken;\n};\n\nexport type QueryProjectsConnection = {\n  __typename?: 'QueryProjectsConnection';\n  edges: Array<QueryProjectsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryProjectsConnectionEdge = {\n  __typename?: 'QueryProjectsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Project;\n};\n\nexport type QuerySandboxSessionsConnection = {\n  __typename?: 'QuerySandboxSessionsConnection';\n  edges: Array<QuerySandboxSessionsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QuerySandboxSessionsConnectionEdge = {\n  __typename?: 'QuerySandboxSessionsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: SandboxSession;\n};\n\nexport type QuerySandboxesConnection = {\n  __typename?: 'QuerySandboxesConnection';\n  edges: Array<QuerySandboxesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QuerySandboxesConnectionEdge = {\n  __typename?: 'QuerySandboxesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Sandbox;\n};\n\nexport type QuerySessionsConnection = {\n  __typename?: 'QuerySessionsConnection';\n  edges: Array<QuerySessionsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QuerySessionsConnectionEdge = {\n  __typename?: 'QuerySessionsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Session;\n};\n\nexport type QuerySshPublicKeysConnection = {\n  __typename?: 'QuerySshPublicKeysConnection';\n  edges: Array<QuerySshPublicKeysConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QuerySshPublicKeysConnectionEdge = {\n  __typename?: 'QuerySshPublicKeysConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: SshPublicKey;\n};\n\nexport type QueryTeamTemplatesConnection = {\n  __typename?: 'QueryTeamTemplatesConnection';\n  edges: Array<QueryTeamTemplatesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryTeamTemplatesConnectionEdge = {\n  __typename?: 'QueryTeamTemplatesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Template;\n};\n\nexport type QueryTemplateSearchConnection = {\n  __typename?: 'QueryTemplateSearchConnection';\n  edges: Array<QueryTemplateSearchConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryTemplateSearchConnectionEdge = {\n  __typename?: 'QueryTemplateSearchConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: TemplateSearchResult;\n};\n\nexport type QueryTemplatesConnection = {\n  __typename?: 'QueryTemplatesConnection';\n  edges: Array<QueryTemplatesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryTemplatesConnectionEdge = {\n  __typename?: 'QueryTemplatesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Template;\n};\n\nexport type QueryTrustedDomainsConnection = {\n  __typename?: 'QueryTrustedDomainsConnection';\n  edges: Array<QueryTrustedDomainsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryTrustedDomainsConnectionEdge = {\n  __typename?: 'QueryTrustedDomainsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: TrustedDomain;\n};\n\nexport type QueryUserTemplatesConnection = {\n  __typename?: 'QueryUserTemplatesConnection';\n  edges: Array<QueryUserTemplatesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryUserTemplatesConnectionEdge = {\n  __typename?: 'QueryUserTemplatesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Template;\n};\n\nexport type QueryWorkspaceIdentityProvidersConnection = {\n  __typename?: 'QueryWorkspaceIdentityProvidersConnection';\n  edges: Array<QueryWorkspaceIdentityProvidersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryWorkspaceIdentityProvidersConnectionEdge = {\n  __typename?: 'QueryWorkspaceIdentityProvidersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: WorkspaceIdentityProvider;\n};\n\nexport type QueryWorkspaceTemplatesConnection = {\n  __typename?: 'QueryWorkspaceTemplatesConnection';\n  edges: Array<QueryWorkspaceTemplatesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryWorkspaceTemplatesConnectionEdge = {\n  __typename?: 'QueryWorkspaceTemplatesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Template;\n};\n\nexport type RailwayDomain = {\n  __typename?: 'RailwayDomain';\n  autoRenewEnabled: Scalars['Boolean']['output'];\n  connectedServiceInstances: Array<ConnectedServiceInstance>;\n  createdAt: Scalars['DateTime']['output'];\n  domain: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  /** Authoritative nameservers currently delegated for this domain at the registrar. */\n  nameservers: RailwayDomainNameservers;\n  nextBillingDate?: Maybe<Scalars['DateTime']['output']>;\n  purchasePrice: Scalars['Int']['output'];\n  registrationYears: Scalars['Int']['output'];\n  renewalPrice: Scalars['Int']['output'];\n  status: RailwayDomainStatus;\n  workspaceId: Scalars['String']['output'];\n  workspaceName?: Maybe<Scalars['String']['output']>;\n};\n\nexport type RailwayDomainDnsRecord = {\n  __typename?: 'RailwayDomainDnsRecord';\n  answer: Scalars['String']['output'];\n  domainName: Scalars['String']['output'];\n  fqdn: Scalars['String']['output'];\n  host: Scalars['String']['output'];\n  id: Scalars['Int']['output'];\n  priority?: Maybe<Scalars['Int']['output']>;\n  ttl: Scalars['Int']['output'];\n  type: RailwayDomainDnsRecordType;\n};\n\nexport type RailwayDomainDnsRecordCreateInput = {\n  answer: Scalars['String']['input'];\n  domain: Scalars['String']['input'];\n  host: Scalars['String']['input'];\n  priority?: InputMaybe<Scalars['Int']['input']>;\n  ttl?: InputMaybe<Scalars['Int']['input']>;\n  type: RailwayDomainDnsRecordType;\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type RailwayDomainDnsRecordDeleteInput = {\n  domain: Scalars['String']['input'];\n  recordId: Scalars['Int']['input'];\n  /** Confirms that deleting a mail exchange may also remove every forwarding address and its sibling exchanges. */\n  removeEmailForwarding?: InputMaybe<Scalars['Boolean']['input']>;\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type RailwayDomainDnsRecordType =\n  | 'A'\n  | 'AAAA'\n  | 'ANAME'\n  | 'CNAME'\n  | 'MX'\n  | 'NS'\n  | 'SRV'\n  | 'TXT';\n\nexport type RailwayDomainDnsRecordUpdateInput = {\n  answer: Scalars['String']['input'];\n  domain: Scalars['String']['input'];\n  host: Scalars['String']['input'];\n  priority?: InputMaybe<Scalars['Int']['input']>;\n  recordId: Scalars['Int']['input'];\n  ttl?: InputMaybe<Scalars['Int']['input']>;\n  type: RailwayDomainDnsRecordType;\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type RailwayDomainEmailForwardingEligibility =\n  | 'DELEGATED'\n  | 'ELIGIBLE'\n  | 'EXTERNAL_MAIL'\n  | 'UNKNOWN';\n\nexport type RailwayDomainEmailForwardingLimits = {\n  __typename?: 'RailwayDomainEmailForwardingLimits';\n  maxAliases: Scalars['Int']['output'];\n};\n\nexport type RailwayDomainEmailForwardingRemoveAllInput = {\n  domain: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type RailwayDomainEmailForwardingRule = {\n  __typename?: 'RailwayDomainEmailForwardingRule';\n  /** Local part of the forwarded address, without the domain. */\n  alias: Scalars['String']['output'];\n  /** The external inbox mail for this alias is delivered to. */\n  destination: Scalars['String']['output'];\n};\n\nexport type RailwayDomainEmailForwardingRuleCreateInput = {\n  alias: Scalars['String']['input'];\n  destination: Scalars['String']['input'];\n  domain: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type RailwayDomainEmailForwardingRuleDeleteInput = {\n  alias: Scalars['String']['input'];\n  domain: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type RailwayDomainEmailForwardingRuleTestInput = {\n  alias: Scalars['String']['input'];\n  domain: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type RailwayDomainEmailForwardingRuleUpdateInput = {\n  alias: Scalars['String']['input'];\n  destination: Scalars['String']['input'];\n  domain: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n/** What removing forwarding took out of the zone. */\nexport type RailwayDomainEmailForwardingTeardown = {\n  __typename?: 'RailwayDomainEmailForwardingTeardown';\n  addressesRemoved: Scalars['Int']['output'];\n  mailRecordsRemoved: Scalars['Int']['output'];\n};\n\nexport type RailwayDomainNameservers = {\n  __typename?: 'RailwayDomainNameservers';\n  /** True when the domain is delegated to Name.com's nameservers (Railway-managed DNS). */\n  isDefault: Scalars['Boolean']['output'];\n  nameservers: Array<Scalars['String']['output']>;\n};\n\nexport type RailwayDomainNameserversSetInput = {\n  id: Scalars['String']['input'];\n  /** Hostnames of the nameservers to delegate to (2-13). Pass an empty list to reset to Name.com's account-level defaults for this domain. */\n  nameservers: Array<Scalars['String']['input']>;\n};\n\nexport type RailwayDomainStatus =\n  | 'ACTIVE'\n  | 'EXPIRED'\n  | 'PURCHASING'\n  | 'REFUNDED';\n\nexport type RailwayDomainUpdateInput = {\n  autoRenewEnabled?: InputMaybe<Scalars['Boolean']['input']>;\n  id: Scalars['String']['input'];\n};\n\nexport type RecoveryCodeValidateInput = {\n  code: Scalars['String']['input'];\n  twoFactorLinkingKey?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type RecoveryCodes = {\n  __typename?: 'RecoveryCodes';\n  recoveryCodes: Array<Scalars['String']['output']>;\n};\n\nexport type ReferralInfo = Node & {\n  __typename?: 'ReferralInfo';\n  code: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  referralStats: ReferralStats;\n  status: Scalars['String']['output'];\n};\n\nexport type ReferralInfoUpdateInput = {\n  code: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type ReferralStats = {\n  __typename?: 'ReferralStats';\n  credited: Scalars['Int']['output'];\n  pending: Scalars['Int']['output'];\n};\n\nexport type ReferralStatus =\n  | 'REFEREE_CREDITED'\n  | 'REFERRER_CREDITED'\n  | 'REGISTERED';\n\nexport type ReferralUser = {\n  __typename?: 'ReferralUser';\n  code: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  status: ReferralStatus;\n};\n\nexport type Region = {\n  __typename?: 'Region';\n  /** Region country */\n  country: Scalars['String']['output'];\n  deploymentConstraints?: Maybe<RegionDeploymentConstraints>;\n  /** Region ID (airport code) */\n  id?: Maybe<Scalars['String']['output']>;\n  location: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n  region?: Maybe<Scalars['String']['output']>;\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type RegionDeploymentConstraints = {\n  __typename?: 'RegionDeploymentConstraints';\n  /** Deprecation information for the region */\n  deprecationInfo?: Maybe<RegionDeprecationInfo>;\n};\n\nexport type RegionDeprecationInfo = {\n  __typename?: 'RegionDeprecationInfo';\n  /** Specifies if the region is deprecated */\n  isDeprecated: Scalars['Boolean']['output'];\n  /** Replacement region for the deprecated region */\n  replacementRegion: Scalars['String']['output'];\n};\n\nexport type RegistrationStatus =\n  | 'ONBOARDED'\n  | 'REGISTERED'\n  | 'WAITLISTED';\n\n/** Private Docker registry credentials. Only available for Pro plan deployments. */\nexport type RegistryCredentialsInput = {\n  password: Scalars['String']['input'];\n  username: Scalars['String']['input'];\n};\n\nexport type ReplicateVolumeInstanceSnapshotStatus =\n  | 'COMPLETED'\n  | 'FAILED'\n  | 'INITIATED'\n  | 'TRANSFERRING'\n  | 'UNRECOGNIZED';\n\n/** The status of a volume instance replication */\nexport type ReplicateVolumeInstanceStatus =\n  | 'COMPLETED'\n  | 'ERROR'\n  | 'QUEUED'\n  | 'TRANSFERRING_OFFLINE'\n  | 'TRANSFERRING_ONLINE';\n\nexport type ResetPluginCredentialsInput = {\n  environmentId: Scalars['String']['input'];\n};\n\nexport type ResetPluginInput = {\n  environmentId: Scalars['String']['input'];\n};\n\n/** The repo config file as of the most recent deployment that read it. */\nexport type ResolvedFileConfig = {\n  __typename?: 'ResolvedFileConfig';\n  /** Commit the config was read from. */\n  commitHash?: Maybe<Scalars['String']['output']>;\n  /** Path of the config file that was read, or null when the repo has none. */\n  configFile?: Maybe<Scalars['String']['output']>;\n  /** Deployment this config was read from. */\n  deploymentId: Scalars['String']['output'];\n  /** Manifest parsed from the config file. Empty means the repo has no config file. */\n  fileManifest: Scalars['JSON']['output'];\n  /** Manifest property path to its location within the config file. */\n  propertyFileMapping: Scalars['JSON']['output'];\n  repo?: Maybe<Scalars['String']['output']>;\n  /** When that deployment was created. Surface this when it is older than the latest deployment, so a stale config is not presented as current. */\n  resolvedAt: Scalars['DateTime']['output'];\n};\n\nexport type ResourceAccess = {\n  __typename?: 'ResourceAccess';\n  deployment: AccessRule;\n  project: AccessRule;\n};\n\nexport type ResourceOwnerType =\n  | 'WORKSPACE';\n\nexport type RestartPolicyType =\n  | 'ALWAYS'\n  | 'NEVER'\n  | 'ON_FAILURE';\n\nexport type SshSignupClaimableWorkspace = {\n  __typename?: 'SSHSignupClaimableWorkspace';\n  id: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type SshSignupInfo = {\n  __typename?: 'SSHSignupInfo';\n  claimableWorkspaces: Array<SshSignupClaimableWorkspace>;\n  fingerprint: Scalars['String']['output'];\n  trial?: Maybe<SshSignupTrial>;\n};\n\n/** The anonymous trial box the offered SSH key currently owns; approving the signup claims it. */\nexport type SshSignupTrial = {\n  __typename?: 'SSHSignupTrial';\n  buildExpiresAt?: Maybe<Scalars['DateTime']['output']>;\n  cloudAgentId?: Maybe<Scalars['String']['output']>;\n  projectId: Scalars['String']['output'];\n  projectName: Scalars['String']['output'];\n};\n\nexport type Sandbox = {\n  __typename?: 'Sandbox';\n  createdAt: Scalars['DateTime']['output'];\n  /** Railway-provided public HTTP domains whose routes have been published. */\n  domains: Array<SandboxDomain>;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  /** Minutes of inactivity before the sandbox is destroyed. 0 means it never idles out; null means unknown, including for a destroyed sandbox. */\n  idleTimeoutMinutes?: Maybe<Scalars['Int']['output']>;\n  networkIsolation: SandboxNetworkIsolation;\n  region: Scalars['String']['output'];\n  status: SandboxStatus;\n};\n\n/** A bootable snapshot of a sandbox's disk, scoped to an environment. Built from a template recipe or captured from a running sandbox. */\nexport type SandboxCheckpoint = {\n  __typename?: 'SandboxCheckpoint';\n  createdAt: Scalars['DateTime']['output'];\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  /** The checkpoint's identity within the environment (same as id): a recipe content hash for a built template, or the user-given name for one captured from a sandbox. */\n  key: Scalars['String']['output'];\n};\n\nexport type SandboxCreateInput = {\n  environmentId: Scalars['String']['input'];\n  /** Minutes of inactivity before the sandbox is destroyed. Any value <= 0 means never idle out (plan-gated). Defaults to the plan's default idle timeout. */\n  idleTimeoutMinutes?: InputMaybe<Scalars['Int']['input']>;\n  /** Network access for the sandbox. Defaults to ISOLATED (no private network access). Public domains require PRIVATE to be selected explicitly. */\n  networkIsolation?: InputMaybe<SandboxNetworkIsolation>;\n  /** Railway-provided HTTP domains to publish, one per unique prefix and port. Supports up to 10 and requires explicitly selecting PRIVATE networking. Domain prefixes are generated when omitted. */\n  publicDomains?: InputMaybe<Array<SandboxDomainInput>>;\n  /** Region to place the sandbox in (e.g. us-west2, us-east4-eqdc4a). Defaults to the platform default region when omitted. */\n  region?: InputMaybe<Scalars['String']['input']>;\n  /** Creation-time CPU and memory, including for forks and checkpoint restores. Each omitted or null field uses the workspace's sandbox default; explicit values must not exceed its independent VM maximum. */\n  resources?: InputMaybe<SandboxResourcesInput>;\n  /** Fork an existing running sandbox in this environment. Mutually exclusive with template. */\n  sourceSandboxId?: InputMaybe<Scalars['String']['input']>;\n  template?: InputMaybe<SandboxTemplateInput>;\n  /** Environment variables baked into the sandbox, available to every command. Values may contain Railway variable references (e.g. ${{shared.FOO}}, ${{ServiceName.BAR}}), resolved at create time. */\n  variables?: InputMaybe<Scalars['EnvironmentVariables']['input']>;\n};\n\n/** One public domain on a sandbox. */\nexport type SandboxDomain = {\n  __typename?: 'SandboxDomain';\n  /** Resolved FQDN. */\n  domain: Scalars['String']['output'];\n  /** Target port on the sandbox this domain routes to. */\n  port: Scalars['Int']['output'];\n  /** Label prefix requested when the sandbox was created. */\n  prefix: Scalars['String']['output'];\n};\n\nexport type SandboxDomainInput = {\n  /** Target port on the sandbox, from 1 through 65535. */\n  port: Scalars['Int']['input'];\n  /** Optional DNS label prefix for the generated domain. When omitted, a prefix is generated from the project name. Custom prefixes must be lowercase alphanumeric with optional interior hyphens, up to 46 characters. */\n  prefix?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type SandboxExecResult = {\n  __typename?: 'SandboxExecResult';\n  exitCode: Scalars['Int']['output'];\n  stderr: Scalars['String']['output'];\n  stdout: Scalars['String']['output'];\n  timedOut: Scalars['Boolean']['output'];\n  truncated: Scalars['Boolean']['output'];\n};\n\n/** Controls a sandbox's access to the environment's private network. */\nexport type SandboxNetworkIsolation =\n  /** Peer-isolated with public NAT egress only; no access to the environment's private network. Default. */\n  | 'ISOLATED'\n  /** Joins the environment's private network. */\n  | 'PRIVATE';\n\nexport type SandboxResourcesInput = {\n  /** Positive vCPU for the new sandbox; fractional values are supported. Omitted or null uses the workspace's sandbox default. Must not exceed its VM maximum. */\n  cpu?: InputMaybe<Scalars['Float']['input']>;\n  /** Memory in decimal GB (1 GB = 1,000,000,000 bytes), rounded to whole bytes. Must be at least 1 byte and at most the workspace's VM maximum. Omitted or null uses its sandbox default. */\n  memoryGB?: InputMaybe<Scalars['Float']['input']>;\n};\n\n/** A resumable session inside a sandbox: an interactive shell or a one-off exec command. */\nexport type SandboxSession = {\n  __typename?: 'SandboxSession';\n  /** Whether a client is currently connected. */\n  attached: Scalars['Boolean']['output'];\n  /** The command being run; empty for an interactive shell. */\n  command: Scalars['String']['output'];\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  /** For an interactive shell, whether a foreground program currently holds the terminal. Null otherwise, or when the runtime can't report it. */\n  foregroundActive?: Maybe<Scalars['Boolean']['output']>;\n  kind: SandboxSessionKind;\n  /** Stable session name; reconnect/attach by this. */\n  name: Scalars['String']['output'];\n  runState: SandboxSessionRunState;\n};\n\n/** Whether a session is an interactive shell or a one-off exec command. */\nexport type SandboxSessionKind =\n  | 'EXEC'\n  | 'SHELL';\n\n/** A session's process lifecycle. */\nexport type SandboxSessionRunState = {\n  __typename?: 'SandboxSessionRunState';\n  /** Process exit code; only meaningful once running is false. */\n  exitCode: Scalars['Int']['output'];\n  /** When the process exited; null while running. */\n  exitedAt?: Maybe<Scalars['DateTime']['output']>;\n  /** Whether the process is still alive. */\n  running: Scalars['Boolean']['output'];\n};\n\nexport type SandboxStatus =\n  | 'CREATING'\n  | 'DESTROYED'\n  | 'DESTROYING'\n  | 'FAILED'\n  | 'RUNNING';\n\n/** The state of a template build, derived from its workflow and the existence of its checkpoint. READY means the checkpoint exists and can be booted. */\nexport type SandboxTemplateBuild = {\n  __typename?: 'SandboxTemplateBuild';\n  environmentId: Scalars['String']['output'];\n  /** The template's resolved-content hash. */\n  id: Scalars['ID']['output'];\n  status: SandboxTemplateBuildStatus;\n};\n\nexport type SandboxTemplateBuildStatus =\n  | 'BUILDING'\n  | 'FAILED'\n  | 'PENDING'\n  | 'READY';\n\nexport type SandboxTemplateInput = {\n  /** Build a template by running these shell instructions on the base image. Mutually exclusive with name. */\n  instructions?: InputMaybe<Array<Scalars['String']['input']>>;\n  /** Boot from a saved checkpoint with this name (one captured from a sandbox). Mutually exclusive with instructions. */\n  name?: InputMaybe<Scalars['String']['input']>;\n  /** Placement region for the build sandbox. The resulting checkpoint lives in this region, and sandboxes created from the template boot there. Defaults to the platform default; only the cold build consults it (a built template's own region wins). */\n  region?: InputMaybe<Scalars['String']['input']>;\n  /** Environment variables available to the template's build instructions. Values may contain Railway variable references (e.g. ${{shared.FOO}}, ${{ServiceName.BAR}}), resolved at build time. */\n  variables?: InputMaybe<Scalars['EnvironmentVariables']['input']>;\n};\n\nexport type Service = Node & {\n  __typename?: 'Service';\n  /** @deprecated Set per service instance: read ServiceInstance.autoInstrumentationEnabled. Reports the production environment's instance. */\n  autoInstrumentationEnabled: Scalars['Boolean']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  /** @deprecated Use environment.deployments for properly scoped access control */\n  deployments: ServiceDeploymentsConnection;\n  featureFlags: Array<ActiveServiceFeatureFlag>;\n  groupId?: Maybe<Scalars['String']['output']>;\n  /** Whether this service has hidden registry credentials from a template. When true, the credentials are stored in the template and used during deployment. */\n  hasHiddenRegistryCredentialsFromTemplate: Scalars['Boolean']['output'];\n  icon?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  /** Whether this service has an active restriction that limits its capabilities. */\n  isRestricted: Scalars['Boolean']['output'];\n  name: Scalars['String']['output'];\n  project: Project;\n  projectId: Scalars['String']['output'];\n  repoTriggers: ServiceRepoTriggersConnection;\n  /** @deprecated Use environment.serviceInstances for properly scoped access control */\n  serviceInstances: ServiceServiceInstancesConnection;\n  templateId?: Maybe<Scalars['String']['output']>;\n  templateServiceId?: Maybe<Scalars['String']['output']>;\n  templateThreadSlug?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Tracing is set per service instance: read ServiceInstance.tracingEnabled. Reports the production environment's instance. */\n  tracingEnabled?: Maybe<Scalars['Boolean']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\n\nexport type ServiceDeploymentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ServiceRepoTriggersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ServiceServiceInstancesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type ServiceBackupInfo = {\n  __typename?: 'ServiceBackupInfo';\n  /** List of enabled backup schedule kinds (DAILY, WEEKLY, MONTHLY) */\n  schedules: Array<VolumeInstanceBackupScheduleKind>;\n  serviceId: Scalars['String']['output'];\n  serviceName: Scalars['String']['output'];\n};\n\nexport type ServiceConnectInput = {\n  /** The branch to connect to. e.g. 'main' */\n  branch?: InputMaybe<Scalars['String']['input']>;\n  /** Name of the Dockerhub or GHCR image to connect this service to. */\n  image?: InputMaybe<Scalars['String']['input']>;\n  /** The full name of the repo to connect to. e.g. 'railwayapp/starters' */\n  repo?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ServiceCreateInput = {\n  branch?: InputMaybe<Scalars['String']['input']>;\n  /** Environment ID. If the specified environment is a fork, the service will only be created in it. Otherwise it will created in all environments that are not forks of other environments */\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  icon?: InputMaybe<Scalars['String']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n  projectId: Scalars['String']['input'];\n  registryCredentials?: InputMaybe<RegistryCredentialsInput>;\n  source?: InputMaybe<ServiceSourceInput>;\n  /** Template ID. Required when templateServiceId is provided. */\n  templateId?: InputMaybe<Scalars['String']['input']>;\n  /** Template service ID within the template's serializedConfig. Required when templateId is provided. */\n  templateServiceId?: InputMaybe<Scalars['String']['input']>;\n  variables?: InputMaybe<Scalars['EnvironmentVariables']['input']>;\n};\n\nexport type ServiceDeploymentsConnection = {\n  __typename?: 'ServiceDeploymentsConnection';\n  edges: Array<ServiceDeploymentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ServiceDeploymentsConnectionEdge = {\n  __typename?: 'ServiceDeploymentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Deployment;\n};\n\nexport type ServiceDomain = Domain & {\n  __typename?: 'ServiceDomain';\n  /** @deprecated Removed; always null. */\n  cdnMode?: Maybe<Scalars['String']['output']>;\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  domain: Scalars['String']['output'];\n  edgeId?: Maybe<Scalars['String']['output']>;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  newDomainName?: Maybe<Scalars['String']['output']>;\n  newHostLabel?: Maybe<Scalars['String']['output']>;\n  projectId?: Maybe<Scalars['String']['output']>;\n  serviceId: Scalars['String']['output'];\n  suffix?: Maybe<Scalars['String']['output']>;\n  syncStatus: ServiceDomainSyncStatus;\n  targetPort?: Maybe<Scalars['Int']['output']>;\n  updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type ServiceDomainCreateInput = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n  targetPort?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type ServiceDomainSyncStatus =\n  | 'ACTIVE'\n  | 'CREATING'\n  | 'DELETED'\n  | 'DELETING'\n  | 'UNSPECIFIED'\n  | 'UPDATING';\n\nexport type ServiceDomainUpdateInput = {\n  domain: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n  serviceDomainId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n  targetPort?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type ServiceFeatureFlagToggleInput = {\n  flag: ActiveServiceFeatureFlag;\n  serviceId: Scalars['String']['input'];\n};\n\nexport type ServiceInstance = Node & {\n  __typename?: 'ServiceInstance';\n  /** All currently active (deployed and running) deployments for this service instance */\n  activeDeployments: Array<Deployment>;\n  /** Instrument the service's processes with eBPF (OBI) for supported runtimes, no code changes. Only active while tracingEnabled is true. */\n  autoInstrumentationEnabled: Scalars['Boolean']['output'];\n  buildCommand?: Maybe<Scalars['String']['output']>;\n  builder: Builder;\n  /** This service's own Railway Authentication setting. Null means no setting of its own: it follows the environment's default (see clearanceEffective). */\n  clearance?: Maybe<Scalars['Boolean']['output']>;\n  /** Whether Railway Authentication protects this service's HTTP domains: its own setting, else its environment's default. */\n  clearanceEffective: Scalars['Boolean']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  cronSchedule?: Maybe<Scalars['String']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  dockerfilePath?: Maybe<Scalars['String']['output']>;\n  domains: AllDomains;\n  drainingSeconds?: Maybe<Scalars['Int']['output']>;\n  edgeConfig?: Maybe<EdgeConfig>;\n  environmentId: Scalars['String']['output'];\n  /** Whether any deployment was ever created for this service instance, including deployments that have since been removed. Distinguishes a service that was torn down (all deployments removed) from one that has never deployed — latestDeployment and activeDeployments are null/empty for both. */\n  hasEverDeployed: Scalars['Boolean']['output'];\n  healthcheckPath?: Maybe<Scalars['String']['output']>;\n  healthcheckTimeout?: Maybe<Scalars['Int']['output']>;\n  id: Scalars['ID']['output'];\n  ipv6EgressEnabled?: Maybe<Scalars['Boolean']['output']>;\n  isUpdatable: Scalars['Boolean']['output'];\n  /** The most recent deployment for this service instance */\n  latestDeployment?: Maybe<Deployment>;\n  nextCronRunAt?: Maybe<Scalars['DateTime']['output']>;\n  nixpacksPlan?: Maybe<Scalars['JSON']['output']>;\n  numReplicas?: Maybe<Scalars['Int']['output']>;\n  overlapSeconds?: Maybe<Scalars['Int']['output']>;\n  preDeployCommand?: Maybe<Scalars['JSON']['output']>;\n  preDeployTimeoutSeconds?: Maybe<Scalars['Int']['output']>;\n  railpackInfo?: Maybe<Scalars['RailpackInfo']['output']>;\n  railwayConfigFile?: Maybe<Scalars['String']['output']>;\n  region?: Maybe<Scalars['String']['output']>;\n  /** Config read from the repo's config file, taken from the most recent deployment that actually read it. Null when no deployment has resolved a config file yet. An empty `fileManifest` is a real answer and means the repo has no config file — do not read this off the latest deployment instead, since a deployment whose snapshot never completed carries no file config at all and is not the same as a repo without one. */\n  resolvedFileConfig?: Maybe<ResolvedFileConfig>;\n  restartPolicyMaxRetries: Scalars['Int']['output'];\n  restartPolicyType: RestartPolicyType;\n  rootDirectory?: Maybe<Scalars['String']['output']>;\n  service: Service;\n  serviceId: Scalars['String']['output'];\n  serviceName: Scalars['String']['output'];\n  sleepApplication?: Maybe<Scalars['Boolean']['output']>;\n  source?: Maybe<ServiceSource>;\n  startCommand?: Maybe<Scalars['String']['output']>;\n  /** Trace requests to the service in this environment: the edge records a span per client-facing request to its domains and the next deploy provides the OpenTelemetry exporter variables. */\n  tracingEnabled: Scalars['Boolean']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  upstreamUrl?: Maybe<Scalars['String']['output']>;\n  watchPatterns: Array<Scalars['String']['output']>;\n};\n\nexport type ServiceInstanceAutoDeployStatus = {\n  __typename?: 'ServiceInstanceAutoDeployStatus';\n  canEnable: Scalars['Boolean']['output'];\n  enabled: Scalars['Boolean']['output'];\n  reason?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ServiceInstanceAutoDeployUpdateInput = {\n  enabled: Scalars['Boolean']['input'];\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type ServiceInstanceAutoDeployUpdateResult = {\n  __typename?: 'ServiceInstanceAutoDeployUpdateResult';\n  enabled: Scalars['Boolean']['output'];\n};\n\nexport type ServiceInstanceClearanceUpdateInput = {\n  /** On or off. Null (or omitted) removes the service's own setting so it follows the environment's default. */\n  enabled?: InputMaybe<Scalars['Boolean']['input']>;\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type ServiceInstanceLimitsUpdateInput = {\n  environmentId: Scalars['String']['input'];\n  /** Amount of memory in GB to allocate to the service instance */\n  memoryGB?: InputMaybe<Scalars['Float']['input']>;\n  serviceId: Scalars['String']['input'];\n  /** Number of vCPUs to allocate to the service instance */\n  vCPUs?: InputMaybe<Scalars['Float']['input']>;\n};\n\nexport type ServiceInstanceUpdateInput = {\n  /** Instrument the service's processes with eBPF (OBI) while its tracing is on. Reaches running containers within about a minute, no redeploy needed. */\n  autoInstrumentationEnabled?: InputMaybe<Scalars['Boolean']['input']>;\n  buildCommand?: InputMaybe<Scalars['String']['input']>;\n  builder?: InputMaybe<Builder>;\n  cronSchedule?: InputMaybe<Scalars['String']['input']>;\n  dockerfilePath?: InputMaybe<Scalars['String']['input']>;\n  drainingSeconds?: InputMaybe<Scalars['Int']['input']>;\n  healthcheckPath?: InputMaybe<Scalars['String']['input']>;\n  healthcheckTimeout?: InputMaybe<Scalars['Int']['input']>;\n  ipv6EgressEnabled?: InputMaybe<Scalars['Boolean']['input']>;\n  multiRegionConfig?: InputMaybe<Scalars['JSON']['input']>;\n  nixpacksPlan?: InputMaybe<Scalars['JSON']['input']>;\n  numReplicas?: InputMaybe<Scalars['Int']['input']>;\n  overlapSeconds?: InputMaybe<Scalars['Int']['input']>;\n  preDeployCommand?: InputMaybe<Array<Scalars['String']['input']>>;\n  preDeployTimeoutSeconds?: InputMaybe<Scalars['Int']['input']>;\n  railwayConfigFile?: InputMaybe<Scalars['String']['input']>;\n  region?: InputMaybe<Scalars['String']['input']>;\n  registryCredentials?: InputMaybe<RegistryCredentialsInput>;\n  restartPolicyMaxRetries?: InputMaybe<Scalars['Int']['input']>;\n  restartPolicyType?: InputMaybe<RestartPolicyType>;\n  rootDirectory?: InputMaybe<Scalars['String']['input']>;\n  sleepApplication?: InputMaybe<Scalars['Boolean']['input']>;\n  source?: InputMaybe<ServiceSourceInput>;\n  startCommand?: InputMaybe<Scalars['String']['input']>;\n  /** Trace requests to the service in this environment. Takes effect at the edge within seconds and in the app on the next deploy. */\n  tracingEnabled?: InputMaybe<Scalars['Boolean']['input']>;\n  watchPatterns?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type ServiceRepoTriggersConnection = {\n  __typename?: 'ServiceRepoTriggersConnection';\n  edges: Array<ServiceRepoTriggersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ServiceRepoTriggersConnectionEdge = {\n  __typename?: 'ServiceRepoTriggersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentTrigger;\n};\n\nexport type ServiceServiceInstancesConnection = {\n  __typename?: 'ServiceServiceInstancesConnection';\n  edges: Array<ServiceServiceInstancesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ServiceServiceInstancesConnectionEdge = {\n  __typename?: 'ServiceServiceInstancesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ServiceInstance;\n};\n\nexport type ServiceSource = {\n  __typename?: 'ServiceSource';\n  image?: Maybe<Scalars['String']['output']>;\n  repo?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ServiceSourceInput = {\n  image?: InputMaybe<Scalars['String']['input']>;\n  repo?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Whether a service's requests are producing spans, per exporting hop. The edge tracing a request says nothing about the app behind it. */\nexport type ServiceTracingStatus = {\n  __typename?: 'ServiceTracingStatus';\n  /** When the edge last exported a span for a request to the service; null when it never has within retention */\n  lastEdgeSpanAt?: Maybe<Scalars['DateTime']['output']>;\n  /** When the service's own app last exported a span; null when it never has within retention */\n  lastServiceSpanAt?: Maybe<Scalars['DateTime']['output']>;\n  serviceId: Scalars['String']['output'];\n};\n\nexport type ServiceUpdateInput = {\n  icon?: InputMaybe<Scalars['String']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type Session = Node & {\n  __typename?: 'Session';\n  createdAt: Scalars['DateTime']['output'];\n  expiredAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  isCurrent: Scalars['Boolean']['output'];\n  name: Scalars['String']['output'];\n  type: SessionType;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type SessionType =\n  | 'BROWSER'\n  | 'CLI'\n  | 'FORUMS';\n\nexport type SetServiceUnderAttackModeInput = {\n  durationSeconds?: InputMaybe<Scalars['Int']['input']>;\n  enabled: Scalars['Boolean']['input'];\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type SetupAgentEventTrackInput = {\n  agentSessionId?: InputMaybe<Scalars['String']['input']>;\n  arch?: InputMaybe<Scalars['String']['input']>;\n  caller?: InputMaybe<Scalars['String']['input']>;\n  cliVersion?: InputMaybe<Scalars['String']['input']>;\n  configuredClients?: InputMaybe<Array<Scalars['String']['input']>>;\n  errorMessage?: InputMaybe<Scalars['String']['input']>;\n  installRequestId?: InputMaybe<Scalars['String']['input']>;\n  isCi?: InputMaybe<Scalars['Boolean']['input']>;\n  os?: InputMaybe<Scalars['String']['input']>;\n  phase: Scalars['String']['input'];\n  sessionId?: InputMaybe<Scalars['String']['input']>;\n  success?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type SharedVariableConfigureInput = {\n  disabledServiceIds: Array<Scalars['String']['input']>;\n  enabledServiceIds: Array<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type ShellTokenInput = {\n  environmentId: Scalars['String']['input'];\n  instanceId: Scalars['String']['input'];\n  kind?: InputMaybe<Scalars['String']['input']>;\n  port?: InputMaybe<Scalars['Int']['input']>;\n  scope: Scalars['String']['input'];\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type Signal = Node & {\n  __typename?: 'Signal';\n  createdAt: Scalars['DateTime']['output'];\n  createdBy?: Maybe<Scalars['String']['output']>;\n  default: Scalars['JSON']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  owner: Scalars['String']['output'];\n  rules: Scalars['JSON']['output'];\n  type: SignalType;\n  updatedAt: Scalars['DateTime']['output'];\n  version: Scalars['BigInt']['output'];\n  writableBy: Array<Scalars['String']['output']>;\n};\n\nexport type SignalChange = Node & {\n  __typename?: 'SignalChange';\n  authorId?: Maybe<Scalars['String']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  kind: SignalChangeKind;\n  payload: Scalars['JSON']['output'];\n  prevState: Scalars['JSON']['output'];\n  seq: Scalars['BigInt']['output'];\n  signalId: Scalars['String']['output'];\n};\n\nexport type SignalChangeKind =\n  | 'default_changed'\n  | 'replaced'\n  | 'rollback'\n  | 'set'\n  | 'unset';\n\nexport type SignalCreateInput = {\n  default: Scalars['JSON']['input'];\n  name: Scalars['String']['input'];\n  owner: Scalars['String']['input'];\n  type: SignalType;\n  writableBy?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type SignalDefaultSetInput = {\n  default: Scalars['JSON']['input'];\n  name: Scalars['String']['input'];\n  owner: Scalars['String']['input'];\n};\n\nexport type SignalDeleteInput = {\n  name: Scalars['String']['input'];\n  owner: Scalars['String']['input'];\n};\n\nexport type SignalEvaluation = {\n  __typename?: 'SignalEvaluation';\n  reason: SignalEvaluationReason;\n  trace: Scalars['JSON']['output'];\n  value: Scalars['JSON']['output'];\n};\n\nexport type SignalEvaluationReason =\n  | 'DEFAULT'\n  | 'SPLIT'\n  | 'TARGETING_MATCH';\n\nexport type SignalReplaceInput = {\n  default: Scalars['JSON']['input'];\n  name: Scalars['String']['input'];\n  owner: Scalars['String']['input'];\n  type: SignalType;\n};\n\nexport type SignalRollbackInput = {\n  name: Scalars['String']['input'];\n  owner: Scalars['String']['input'];\n  seq: Scalars['BigInt']['input'];\n};\n\nexport type SignalRuleSetInput = {\n  expression: Scalars['JSON']['input'];\n  name: Scalars['String']['input'];\n  owner: Scalars['String']['input'];\n  ruleId: Scalars['String']['input'];\n  value: Scalars['JSON']['input'];\n};\n\nexport type SignalRuleUnsetInput = {\n  name: Scalars['String']['input'];\n  owner: Scalars['String']['input'];\n  ruleId: Scalars['String']['input'];\n};\n\nexport type SignalType =\n  | 'bool'\n  | 'json'\n  | 'number'\n  | 'string';\n\nexport type SimilarTemplate = {\n  __typename?: 'SimilarTemplate';\n  code: Scalars['String']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  creator?: Maybe<TemplateCreator>;\n  deploys: Scalars['Int']['output'];\n  description?: Maybe<Scalars['String']['output']>;\n  health?: Maybe<Scalars['Float']['output']>;\n  image?: Maybe<Scalars['String']['output']>;\n  name: Scalars['String']['output'];\n  /** @deprecated Use workspaceId */\n  teamId?: Maybe<Scalars['String']['output']>;\n  userId?: Maybe<Scalars['String']['output']>;\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SortOrder =\n  | 'asc'\n  | 'desc';\n\nexport type SpendCommitment = Node & {\n  __typename?: 'SpendCommitment';\n  features: Array<Scalars['SpendCommitmentFeatureId']['output']>;\n  id: Scalars['ID']['output'];\n  minSpendAmountCents: Scalars['Int']['output'];\n};\n\nexport type SshPublicKey = Node & {\n  __typename?: 'SshPublicKey';\n  createdAt: Scalars['DateTime']['output'];\n  fingerprint: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  publicKey: Scalars['String']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  userId?: Maybe<Scalars['String']['output']>;\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SshPublicKeyCreateInput = {\n  name: Scalars['String']['input'];\n  publicKey: Scalars['String']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type StaleWhileRevalidateConfig = {\n  __typename?: 'StaleWhileRevalidateConfig';\n  enabled: Scalars['Boolean']['output'];\n};\n\nexport type StaleWhileRevalidateInput = {\n  enabled: Scalars['Boolean']['input'];\n};\n\nexport type Subscription = {\n  __typename?: 'Subscription';\n  /** Stream logs for a build */\n  buildLogs: Array<Log>;\n  /** Subscribe to updates for a specific deployment */\n  deployment: Deployment;\n  /** Subscribe to deployment events for a specific deployment */\n  deploymentEvents: DeploymentEvent;\n  /** Subscribe to deployment instance executions for a specific deployment */\n  deploymentInstanceExecutions: DeploymentInstanceExecution;\n  /** Stream logs for a deployment */\n  deploymentLogs: Array<Log>;\n  /** Stream individual DNS query logs for an environment */\n  dnsQueryLogs: Array<DnsQueryLog>;\n  /** Stream logs for a project environment */\n  environmentLogs: Array<Log>;\n  /** Subscribe to updates for the staged patch for a single environment. */\n  environmentStagedPatch: EnvironmentPatch;\n  /** Stream HTTP logs for a deployment */\n  httpLogs: Array<HttpLog>;\n  /** Stream network flow logs for an environment */\n  networkFlowLogs: Array<NetworkFlowLog>;\n  /** Subscribe to notification delivery updates (created and resolved) for the authenticated user */\n  notificationDeliveryUpdated: NotificationDeliveryUpdate;\n  /**\n   * Stream logs for a plugin\n   * @deprecated Plugins are deprecated\n   */\n  pluginLogs: Array<Log>;\n  /** Subscribe to migration progress updates for a volume */\n  replicationProgress: VolumeReplicationProgressUpdate;\n};\n\n\nexport type SubscriptionBuildLogsArgs = {\n  deploymentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type SubscriptionDeploymentArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionDeploymentEventsArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionDeploymentInstanceExecutionsArgs = {\n  input: DeploymentInstanceExecutionInput;\n};\n\n\nexport type SubscriptionDeploymentLogsArgs = {\n  deploymentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type SubscriptionDnsQueryLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  deploymentInstanceId?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type SubscriptionEnvironmentLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type SubscriptionEnvironmentStagedPatchArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionHttpLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  deploymentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type SubscriptionNetworkFlowLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  deploymentInstanceId?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type SubscriptionPluginLogsArgs = {\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  pluginId: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionReplicationProgressArgs = {\n  volumeInstanceId: Scalars['String']['input'];\n};\n\nexport type SubscriptionDiscount = {\n  __typename?: 'SubscriptionDiscount';\n  couponId: Scalars['String']['output'];\n  couponName: Scalars['String']['output'];\n};\n\nexport type SubscriptionItem = {\n  __typename?: 'SubscriptionItem';\n  itemId: Scalars['String']['output'];\n  priceDollars?: Maybe<Scalars['Float']['output']>;\n  priceId: Scalars['String']['output'];\n  productId: Scalars['String']['output'];\n  quantity?: Maybe<Scalars['BigInt']['output']>;\n};\n\nexport type SubscriptionModel =\n  | 'FREE'\n  | 'TEAM'\n  | 'USER';\n\nexport type SubscriptionPlanType =\n  | 'free'\n  | 'hobby'\n  | 'pro'\n  | 'trial';\n\nexport type SubscriptionState =\n  | 'ACTIVE'\n  | 'CANCELLED'\n  | 'INACTIVE'\n  | 'PAST_DUE'\n  | 'UNPAID';\n\nexport type TcpProxy = {\n  __typename?: 'TCPProxy';\n  applicationPort: Scalars['Int']['output'];\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  domain: Scalars['String']['output'];\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  proxyPort: Scalars['Int']['output'];\n  serviceId: Scalars['String']['output'];\n  syncStatus: TcpProxySyncStatus;\n  updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type TcpProxyCreateInput = {\n  applicationPort: Scalars['Int']['input'];\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type TcpProxySyncStatus =\n  | 'ACTIVE'\n  | 'CREATING'\n  | 'DELETED'\n  | 'DELETING'\n  | 'UNSPECIFIED'\n  | 'UPDATING';\n\nexport type Team = Node & {\n  __typename?: 'Team';\n  /** @deprecated Use workspace object instead */\n  adoptionHistory: Array<AdoptionInfo>;\n  /** @deprecated Use workspace object instead */\n  adoptionLevel: Scalars['Float']['output'];\n  /** @deprecated Use workspace object instead */\n  apiTokenRateLimit?: Maybe<ApiTokenRateLimit>;\n  /** @deprecated Use workspace object instead */\n  avatar?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use workspace object instead */\n  createdAt: Scalars['DateTime']['output'];\n  /** @deprecated Use workspace object instead */\n  customer: Customer;\n  /** @deprecated Use workspace object instead */\n  id: Scalars['ID']['output'];\n  /** @deprecated Use workspace object instead */\n  members: Array<TeamMember>;\n  /** @deprecated Use workspace object instead */\n  name: Scalars['String']['output'];\n  /** @deprecated Use workspace object instead */\n  preferredRegion?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use workspace object instead */\n  projects: TeamProjectsConnection;\n  /** @deprecated Use workspace object instead */\n  slackChannelId?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use workspace object instead */\n  teamPermissions: Array<TeamPermission>;\n  /** @deprecated Use workspace object instead */\n  updatedAt: Scalars['DateTime']['output'];\n  /** @deprecated Use workspace object instead */\n  workspace: Workspace;\n};\n\n\nexport type TeamProjectsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type TeamMember = {\n  __typename?: 'TeamMember';\n  avatar?: Maybe<Scalars['String']['output']>;\n  email: Scalars['String']['output'];\n  /** Only retrieved if requested by an admin */\n  featureFlags?: Maybe<Array<ActiveFeatureFlag>>;\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  role: TeamRole;\n};\n\nexport type TeamPermission = Node & {\n  __typename?: 'TeamPermission';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  role: TeamRole;\n  updatedAt: Scalars['DateTime']['output'];\n  userId: Scalars['String']['output'];\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type TeamProjectsConnection = {\n  __typename?: 'TeamProjectsConnection';\n  edges: Array<TeamProjectsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type TeamProjectsConnectionEdge = {\n  __typename?: 'TeamProjectsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Project;\n};\n\nexport type TeamRole =\n  | 'ADMIN'\n  | 'MEMBER'\n  | 'VIEWER';\n\nexport type Template = Node & {\n  __typename?: 'Template';\n  activeProjects: Scalars['Int']['output'];\n  canvasConfig?: Maybe<Scalars['CanvasConfig']['output']>;\n  category?: Maybe<Scalars['String']['output']>;\n  code: Scalars['String']['output'];\n  communityThreadSlug?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use serializedConfig instead */\n  config: Scalars['TemplateConfig']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  creator?: Maybe<TemplateCreator>;\n  demoProjectId?: Maybe<Scalars['String']['output']>;\n  description?: Maybe<Scalars['String']['output']>;\n  guides?: Maybe<TemplateGuide>;\n  health?: Maybe<Scalars['Float']['output']>;\n  id: Scalars['ID']['output'];\n  image?: Maybe<Scalars['String']['output']>;\n  isApproved: Scalars['Boolean']['output'];\n  isV2Template: Scalars['Boolean']['output'];\n  isVerified: Scalars['Boolean']['output'];\n  languages?: Maybe<Array<Scalars['String']['output']>>;\n  maintainer?: Maybe<MaintainerWorkspace>;\n  /** @deprecated Deprecated in favor of listing the fields individually. */\n  metadata: Scalars['TemplateMetadata']['output'];\n  name: Scalars['String']['output'];\n  projects: Scalars['Int']['output'];\n  /** The active restriction stopping this workspace publishing templates, so a restricted author can be sent to the page that explains it and takes the appeal. Null when publishing is not restricted, and for anyone but the template's owner: the `template` query is public, and whether a workspace is under an abuse restriction is not. */\n  publishingRestrictionId?: Maybe<Scalars['String']['output']>;\n  readme?: Maybe<Scalars['String']['output']>;\n  recentProjects: Scalars['Int']['output'];\n  serializedConfig?: Maybe<Scalars['SerializedTemplateConfig']['output']>;\n  services: TemplateServicesConnection;\n  similarTemplates: Array<SimilarTemplate>;\n  status: TemplateStatus;\n  supportHealthMetrics?: Maybe<Scalars['SupportHealthMetrics']['output']>;\n  tags?: Maybe<Array<Scalars['String']['output']>>;\n  /** @deprecated Use workspaceId */\n  teamId?: Maybe<Scalars['String']['output']>;\n  totalPayout: Scalars['Float']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\n\nexport type TemplateServicesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type TemplateCloneInput = {\n  code: Scalars['String']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TemplateCreator = {\n  __typename?: 'TemplateCreator';\n  avatar?: Maybe<Scalars['String']['output']>;\n  hasPublicProfile: Scalars['Boolean']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  username?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TemplateDeleteInput = {\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TemplateDeployInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  services: Array<TemplateDeployService>;\n  templateCode?: InputMaybe<Scalars['String']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TemplateDeployPayload = {\n  __typename?: 'TemplateDeployPayload';\n  operationId?: Maybe<Scalars['String']['output']>;\n  projectId: Scalars['String']['output'];\n  workflowId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TemplateDeployService = {\n  commit?: InputMaybe<Scalars['String']['input']>;\n  /** Generate a service domain on the service's default port. Merged with serviceDomainPorts. */\n  hasDomain?: InputMaybe<Scalars['Boolean']['input']>;\n  healthcheckPath?: InputMaybe<Scalars['String']['input']>;\n  id: Scalars['String']['input'];\n  isPrivate?: InputMaybe<Scalars['Boolean']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n  owner?: InputMaybe<Scalars['String']['input']>;\n  preDeployCommand?: InputMaybe<Array<Scalars['String']['input']>>;\n  rootDirectory?: InputMaybe<Scalars['String']['input']>;\n  /** Generate a service domain per target port, in addition to hasDomain. */\n  serviceDomainPorts?: InputMaybe<Array<Scalars['Int']['input']>>;\n  serviceIcon?: InputMaybe<Scalars['String']['input']>;\n  serviceName: Scalars['String']['input'];\n  startCommand?: InputMaybe<Scalars['String']['input']>;\n  /** Merged with tcpProxyApplicationPorts. */\n  tcpProxyApplicationPort?: InputMaybe<Scalars['Int']['input']>;\n  tcpProxyApplicationPorts?: InputMaybe<Array<Scalars['Int']['input']>>;\n  template: Scalars['String']['input'];\n  variables?: InputMaybe<Scalars['EnvironmentVariables']['input']>;\n  volumes?: InputMaybe<Array<Scalars['TemplateVolume']['input']>>;\n};\n\nexport type TemplateDeployV2Input = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  /** Use an existing service as the cluster root instead of creating a new one. A live cluster edge is resolved to the root it fronts. Used for HA cluster conversion where an existing postgres becomes the primary. */\n  existingRootServiceId?: InputMaybe<Scalars['String']['input']>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  serializedConfig: Scalars['SerializedTemplateConfig']['input'];\n  /** If true, create resources and patch but don't deploy. Returns patchId for later commit. */\n  stageOnly?: InputMaybe<Scalars['Boolean']['input']>;\n  templateId: Scalars['String']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TemplateGenerateInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  projectId: Scalars['String']['input'];\n};\n\nexport type TemplateGuide = {\n  __typename?: 'TemplateGuide';\n  post?: Maybe<Scalars['String']['output']>;\n  video?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TemplateMetrics = {\n  __typename?: 'TemplateMetrics';\n  activeDeployments: Scalars['Int']['output'];\n  deploymentsLast90Days: Scalars['Int']['output'];\n  earningsLast30Days: Scalars['Float']['output'];\n  earningsLast90Days: Scalars['Float']['output'];\n  eligibleForSupportBonus: Scalars['Boolean']['output'];\n  supportHealth: Scalars['Float']['output'];\n  templateHealth: Scalars['Float']['output'];\n  totalDeployments: Scalars['Int']['output'];\n  totalEarnings: Scalars['Float']['output'];\n};\n\nexport type TemplatePublishInput = {\n  category: Scalars['String']['input'];\n  demoProjectId?: InputMaybe<Scalars['String']['input']>;\n  description: Scalars['String']['input'];\n  image?: InputMaybe<Scalars['String']['input']>;\n  readme: Scalars['String']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TemplateRevertInput = {\n  /** The environment ID containing the cluster */\n  environmentId: Scalars['String']['input'];\n  /** The group ID to delete when reverting */\n  groupId?: InputMaybe<Scalars['String']['input']>;\n  /** The project ID containing the cluster */\n  projectId: Scalars['String']['input'];\n  /** The root service ID of the HA cluster to revert */\n  rootServiceId: Scalars['String']['input'];\n  /** If true, stage changes instead of deploying. Returns patchId. */\n  stageOnly?: InputMaybe<Scalars['Boolean']['input']>;\n  /** The template code to revert (e.g., 'ha-postgres') */\n  templateCode: Scalars['String']['input'];\n};\n\nexport type TemplateSearchResult = {\n  __typename?: 'TemplateSearchResult';\n  code: Scalars['String']['output'];\n  creatorName?: Maybe<Scalars['String']['output']>;\n  deploymentCount: Scalars['Int']['output'];\n  description?: Maybe<Scalars['String']['output']>;\n  healthScore?: Maybe<Scalars['Float']['output']>;\n  id: Scalars['String']['output'];\n  image?: Maybe<Scalars['String']['output']>;\n  isVerified: Scalars['Boolean']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type TemplateService = Node & {\n  __typename?: 'TemplateService';\n  config: Scalars['TemplateServiceConfig']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  templateId: Scalars['String']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type TemplateServiceSourceEjectInput = {\n  projectId: Scalars['String']['input'];\n  repoName: Scalars['String']['input'];\n  repoOwner: Scalars['String']['input'];\n  /** Provide multiple serviceIds when ejecting services from a monorepo. */\n  serviceIds: Array<Scalars['String']['input']>;\n  upstreamUrl: Scalars['String']['input'];\n};\n\nexport type TemplateServicesConnection = {\n  __typename?: 'TemplateServicesConnection';\n  edges: Array<TemplateServicesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type TemplateServicesConnectionEdge = {\n  __typename?: 'TemplateServicesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: TemplateService;\n};\n\nexport type TemplateStatus =\n  | 'HIDDEN'\n  | 'PUBLISHED'\n  | 'UNPUBLISHED';\n\n/** One span of a trace */\nexport type TraceSpan = {\n  __typename?: 'TraceSpan';\n  /** Which hop exported the span: edge, proxy or service */\n  component: Scalars['String']['output'];\n  deploymentId?: Maybe<Scalars['String']['output']>;\n  deploymentInstanceId?: Maybe<Scalars['String']['output']>;\n  durationMs: Scalars['Float']['output'];\n  events: Array<TraceSpanEvent>;\n  /** INTERNAL, SERVER, CLIENT, PRODUCER, CONSUMER or UNSPECIFIED */\n  kind: Scalars['String']['output'];\n  links: Array<TraceSpanLink>;\n  name: Scalars['String']['output'];\n  /** Absent on a root span */\n  parentSpanId?: Maybe<Scalars['String']['output']>;\n  /** Resource attributes as exported, without the railway.* keys Railway promotes into typed fields */\n  resourceAttributes: Scalars['JSON']['output'];\n  /** Railway service the span belongs to, when known */\n  serviceId?: Maybe<Scalars['String']['output']>;\n  /** The exporter's service.name resource attribute */\n  serviceName: Scalars['String']['output'];\n  spanAttributes: Scalars['JSON']['output'];\n  /** 16 lower-case hex characters */\n  spanId: Scalars['String']['output'];\n  /** ISO timestamp */\n  startedAt: Scalars['String']['output'];\n  /** UNSET, OK or ERROR */\n  statusCode: Scalars['String']['output'];\n  statusMessage: Scalars['String']['output'];\n  traceId: Scalars['String']['output'];\n};\n\n/** A timestamped event on a span */\nexport type TraceSpanEvent = {\n  __typename?: 'TraceSpanEvent';\n  attributes: Scalars['JSON']['output'];\n  name: Scalars['String']['output'];\n  timestamp: Scalars['String']['output'];\n};\n\n/** A link from a span to a span in another trace */\nexport type TraceSpanLink = {\n  __typename?: 'TraceSpanLink';\n  spanId: Scalars['String']['output'];\n  traceId: Scalars['String']['output'];\n};\n\n/** One trace of an environment: the request as a whole, summarised from its spans */\nexport type TraceSummary = {\n  __typename?: 'TraceSummary';\n  /** From the earliest span start to the latest span end */\n  durationMs: Scalars['Float']['output'];\n  /** Spans with an error status */\n  errorCount: Scalars['Int']['output'];\n  /** Whether the edge exported any span of the trace */\n  hasEdge: Scalars['Boolean']['output'];\n  /** Which hop exported the root span: edge (hikari), proxy (tcp-proxy) or service */\n  rootComponent: Scalars['String']['output'];\n  /** The root span's server.address, when it set one */\n  rootServerAddress?: Maybe<Scalars['String']['output']>;\n  /** Railway service the root span belongs to */\n  rootServiceId: Scalars['String']['output'];\n  /** The root span's service.name */\n  rootServiceName: Scalars['String']['output'];\n  /** Name of the root span, or of the earliest span when the root is missing */\n  rootSpanName: Scalars['String']['output'];\n  /** The root span's url.path, when it set one */\n  rootUrlPath?: Maybe<Scalars['String']['output']>;\n  /** service.name of the earliest span a service exported; null when the request never reached one */\n  serviceName?: Maybe<Scalars['String']['output']>;\n  spanCount: Scalars['Int']['output'];\n  /** Start of the earliest span (ISO timestamp) */\n  startedAt: Scalars['String']['output'];\n  /** W3C trace id, 32 lower-case hex characters */\n  traceId: Scalars['String']['output'];\n};\n\nexport type TrustedDomain = {\n  __typename?: 'TrustedDomain';\n  domainName: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  role: Scalars['String']['output'];\n  status: TrustedDomainStatus;\n  verificationData: TrustedDomainVerificationData;\n  verificationType: Scalars['String']['output'];\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type TrustedDomainStatus =\n  | 'FAILED'\n  | 'PENDING'\n  | 'VERIFIED';\n\nexport type TrustedDomainVerificationData = {\n  __typename?: 'TrustedDomainVerificationData';\n  dnsHost?: Maybe<Scalars['String']['output']>;\n  domainMatch?: Maybe<Domain>;\n  domainStatus?: Maybe<CustomDomainStatus>;\n  token?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TwoFactorInfo = {\n  __typename?: 'TwoFactorInfo';\n  hasRecoveryCodes: Scalars['Boolean']['output'];\n  isVerified: Scalars['Boolean']['output'];\n};\n\nexport type TwoFactorInfoCreateInput = {\n  token: Scalars['String']['input'];\n};\n\nexport type TwoFactorInfoSecret = {\n  __typename?: 'TwoFactorInfoSecret';\n  secret: Scalars['String']['output'];\n  uri: Scalars['String']['output'];\n};\n\nexport type TwoFactorInfoValidateInput = {\n  token: Scalars['String']['input'];\n  twoFactorLinkingKey?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TwoFactorMethodCompliance =\n  | 'AUTHENTICATOR'\n  | 'PASSKEY';\n\nexport type TwoFactorMethodProjectWorkspace =\n  | 'AUTHENTICATOR'\n  | 'PASSKEY';\n\nexport type UpdateNotificationRuleInput = {\n  channelConfigs?: InputMaybe<Array<Scalars['NotificationChannelConfig']['input']>>;\n  ephemeralEnvironments?: InputMaybe<Scalars['Boolean']['input']>;\n  eventTypes?: InputMaybe<Array<Scalars['String']['input']>>;\n  severities?: InputMaybe<Array<NotificationSeverity>>;\n};\n\nexport type UpdateServiceEdgeConfigInput = {\n  config: EdgeConfigInput;\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type UpdateServiceEdgeRulesInput = {\n  edgeRules?: InputMaybe<Scalars['JSON']['input']>;\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type UsageLimit = Node & {\n  __typename?: 'UsageLimit';\n  agentHardLimitCents?: Maybe<Scalars['Int']['output']>;\n  agentSoftLimitCents?: Maybe<Scalars['Int']['output']>;\n  customerId: Scalars['String']['output'];\n  hardLimit?: Maybe<Scalars['Int']['output']>;\n  id: Scalars['ID']['output'];\n  isOverLimit: Scalars['Boolean']['output'];\n  softLimit: Scalars['Int']['output'];\n};\n\nexport type UsageLimitRemoveInput = {\n  customerId: Scalars['String']['input'];\n};\n\nexport type UsageLimitSetInput = {\n  customerId: Scalars['String']['input'];\n  hardLimitDollars?: InputMaybe<Scalars['Int']['input']>;\n  softLimitDollars: Scalars['Int']['input'];\n};\n\nexport type User = Node & {\n  __typename?: 'User';\n  agreedFairUse: Scalars['Boolean']['output'];\n  apiTokenRateLimit?: Maybe<ApiTokenRateLimit>;\n  avatar?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Resolve via the user's workspaces and check for an active BAN restriction. This field will be removed after the WorkspaceRestriction migration completes. */\n  banReason?: Maybe<Scalars['String']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  email: Scalars['String']['output'];\n  featureFlags: Array<ActiveFeatureFlag>;\n  flags: Array<UserFlag>;\n  githubProviderId?: Maybe<Scalars['String']['output']>;\n  githubUsername?: Maybe<Scalars['String']['output']>;\n  has2FA: Scalars['Boolean']['output'];\n  hasPasskeys: Scalars['Boolean']['output'];\n  id: Scalars['ID']['output'];\n  isAdmin: Scalars['Boolean']['output'];\n  isConductor: Scalars['Boolean']['output'];\n  isVerified: Scalars['Boolean']['output'];\n  lastLogin: Scalars['DateTime']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  platformFeatureFlags: Array<ActivePlatformFlag>;\n  profile?: Maybe<UserProfile>;\n  /** @deprecated This field will not return anything anymore, go through the workspace's projects */\n  projects: UserProjectsConnection;\n  providerAuths: UserProviderAuthsConnection;\n  registrationStatus: RegistrationStatus;\n  riskLevel?: Maybe<Scalars['Float']['output']>;\n  termsAgreedOn?: Maybe<Scalars['DateTime']['output']>;\n  username?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use user.workspaces instead, no user are associated to a workspace */\n  workspace?: Maybe<Workspace>;\n  /** Workspaces user is member of */\n  workspaces: Array<Workspace>;\n};\n\n\nexport type UserProjectsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type UserProviderAuthsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type UserFlag =\n  | 'BETA';\n\nexport type UserFlagsRemoveInput = {\n  flags: Array<UserFlag>;\n  userId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UserFlagsSetInput = {\n  flags: Array<UserFlag>;\n  userId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UserKickbackEarnings = {\n  __typename?: 'UserKickbackEarnings';\n  total_amount: Scalars['Float']['output'];\n};\n\nexport type UserProfile = {\n  __typename?: 'UserProfile';\n  bio?: Maybe<Scalars['String']['output']>;\n  isPublic: Scalars['Boolean']['output'];\n  website?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserProfileResponse = {\n  __typename?: 'UserProfileResponse';\n  avatar?: Maybe<Scalars['String']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  profile: UserProfile;\n  /** Gets all public projects for a user. */\n  publicProjects: UserProfileResponsePublicProjectsConnection;\n  /** @deprecated There are no personal templates anymore, they all belong to a workspace */\n  publishedTemplates: Array<SimilarTemplate>;\n  totalDeploys: Scalars['Int']['output'];\n  username?: Maybe<Scalars['String']['output']>;\n};\n\n\nexport type UserProfileResponsePublicProjectsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type UserProfileResponsePublicProjectsConnection = {\n  __typename?: 'UserProfileResponsePublicProjectsConnection';\n  edges: Array<UserProfileResponsePublicProjectsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type UserProfileResponsePublicProjectsConnectionEdge = {\n  __typename?: 'UserProfileResponsePublicProjectsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Project;\n};\n\nexport type UserProfileUpdateInput = {\n  bio?: InputMaybe<Scalars['String']['input']>;\n  isPublic: Scalars['Boolean']['input'];\n  website?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UserProjectsConnection = {\n  __typename?: 'UserProjectsConnection';\n  edges: Array<UserProjectsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type UserProjectsConnectionEdge = {\n  __typename?: 'UserProjectsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Project;\n};\n\nexport type UserProviderAuthsConnection = {\n  __typename?: 'UserProviderAuthsConnection';\n  edges: Array<UserProviderAuthsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type UserProviderAuthsConnectionEdge = {\n  __typename?: 'UserProviderAuthsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ProviderAuth;\n};\n\nexport type ValidateServiceEdgeRulesInput = {\n  edgeRules: Scalars['JSON']['input'];\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type Variable = Node & {\n  __typename?: 'Variable';\n  createdAt: Scalars['DateTime']['output'];\n  environment: Environment;\n  environmentId?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  isSealed: Scalars['Boolean']['output'];\n  name: Scalars['String']['output'];\n  plugin: Plugin;\n  /** @deprecated Plugins have been removed */\n  pluginId?: Maybe<Scalars['String']['output']>;\n  references: Array<Scalars['String']['output']>;\n  service: Service;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type VariableCollectionUpsertInput = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  /** When set to true, removes all existing variables before upserting the new collection. */\n  replace?: InputMaybe<Scalars['Boolean']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  /** Skip deploys for affected services */\n  skipDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n  variables: Scalars['EnvironmentVariables']['input'];\n};\n\nexport type VariableDeleteInput = {\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VariableUpsertInput = {\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  /** Skip deploys for affected services */\n  skipDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n  value: Scalars['String']['input'];\n};\n\nexport type VercelAccount = {\n  __typename?: 'VercelAccount';\n  id: Scalars['String']['output'];\n  integrationAuthId: Scalars['String']['output'];\n  isUser: Scalars['Boolean']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  projects: Array<VercelProject>;\n  slug?: Maybe<Scalars['String']['output']>;\n};\n\nexport type VercelInfo = {\n  __typename?: 'VercelInfo';\n  accounts: Array<VercelAccount>;\n};\n\nexport type VercelProject = {\n  __typename?: 'VercelProject';\n  accountId: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type Volume = Node & {\n  __typename?: 'Volume';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  project: Project;\n  projectId: Scalars['String']['output'];\n  /** @deprecated Use environment.volumeInstances for properly scoped access control */\n  volumeInstances: VolumeVolumeInstancesConnection;\n};\n\n\nexport type VolumeVolumeInstancesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type VolumeCreateInput = {\n  /** The environment to deploy the volume instances into. If `null`, the volume will not be deployed to any environment. `undefined` will deploy to all environments. */\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  /** The path in the container to mount the volume to */\n  mountPath: Scalars['String']['input'];\n  /** The project to create the volume in */\n  projectId: Scalars['String']['input'];\n  /** The region to create the volume instances in. If not provided, the default region will be used. */\n  region?: InputMaybe<Scalars['String']['input']>;\n  /** The service to attach the volume to. If not provided, the volume will be disconnected. */\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VolumeInstance = Node & {\n  __typename?: 'VolumeInstance';\n  createdAt: Scalars['DateTime']['output'];\n  currentSizeMB: Scalars['Float']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  environment: Environment;\n  environmentId: Scalars['String']['output'];\n  externalId?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  isPendingDeletion: Scalars['Boolean']['output'];\n  mountPath: Scalars['String']['output'];\n  region?: Maybe<Scalars['String']['output']>;\n  service: Service;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  sizeMB: Scalars['Int']['output'];\n  state?: Maybe<VolumeState>;\n  volume: Volume;\n  volumeId: Scalars['String']['output'];\n};\n\nexport type VolumeInstanceBackup = {\n  __typename?: 'VolumeInstanceBackup';\n  createdAt: Scalars['DateTime']['output'];\n  creatorId?: Maybe<Scalars['String']['output']>;\n  expiresAt?: Maybe<Scalars['DateTime']['output']>;\n  externalId: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  referencedMB?: Maybe<Scalars['Int']['output']>;\n  scheduleId?: Maybe<Scalars['String']['output']>;\n  usedMB?: Maybe<Scalars['Int']['output']>;\n  volumeInstanceSizeMB?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type VolumeInstanceBackupSchedule = Node & {\n  __typename?: 'VolumeInstanceBackupSchedule';\n  createdAt: Scalars['DateTime']['output'];\n  cron: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  kind: VolumeInstanceBackupScheduleKind;\n  name: Scalars['String']['output'];\n  retentionSeconds?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type VolumeInstanceBackupScheduleKind =\n  | 'DAILY'\n  | 'MONTHLY'\n  | 'WEEKLY';\n\nexport type VolumeInstanceReplicationProgress = {\n  __typename?: 'VolumeInstanceReplicationProgress';\n  bytesTransferred: Scalars['BigInt']['output'];\n  percentComplete: Scalars['Float']['output'];\n  timestamp: Scalars['DateTime']['output'];\n  transferRateMbps?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type VolumeInstanceUpdateInput = {\n  /** The mount path of the volume instance. If not provided, the mount path will not be updated. */\n  mountPath?: InputMaybe<Scalars['String']['input']>;\n  /** The service to attach the volume to. If not provided, the volume will be disconnected. */\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  /** The state of the volume instance. If not provided, the state will not be updated. */\n  state?: InputMaybe<VolumeState>;\n};\n\nexport type VolumeReplicationProgressUpdate = {\n  __typename?: 'VolumeReplicationProgressUpdate';\n  currentSnapshot: VolumeSnapshotReplicationProgressUpdate;\n  destExternalId: Scalars['String']['output'];\n  destRegion?: Maybe<Scalars['String']['output']>;\n  destStackerId?: Maybe<Scalars['String']['output']>;\n  error?: Maybe<Scalars['String']['output']>;\n  estimatedTimeRemainingMs?: Maybe<Scalars['BigInt']['output']>;\n  history: Array<VolumeInstanceReplicationProgress>;\n  nbSnapshots: Scalars['Int']['output'];\n  offlineBytesTransferred: Scalars['BigInt']['output'];\n  offlineTotalBytes: Scalars['BigInt']['output'];\n  onlineBytesTransferred: Scalars['BigInt']['output'];\n  onlineTotalBytes: Scalars['BigInt']['output'];\n  percentComplete: Scalars['Float']['output'];\n  snapshotsSizes: Array<Scalars['BigInt']['output']>;\n  srcExternalId: Scalars['String']['output'];\n  srcRegion?: Maybe<Scalars['String']['output']>;\n  srcStackerId?: Maybe<Scalars['String']['output']>;\n  status: ReplicateVolumeInstanceStatus;\n  transferRateMbps?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type VolumeSnapshotReplicationProgressUpdate = {\n  __typename?: 'VolumeSnapshotReplicationProgressUpdate';\n  bytesTransferred: Scalars['BigInt']['output'];\n  compressedBytesTransferred: Scalars['BigInt']['output'];\n  compressedTransferRateMbps?: Maybe<Scalars['Float']['output']>;\n  elapsedMs: Scalars['Int']['output'];\n  error?: Maybe<Scalars['String']['output']>;\n  estimatedTimeRemainingMs?: Maybe<Scalars['BigInt']['output']>;\n  index: Scalars['Int']['output'];\n  percentComplete: Scalars['Float']['output'];\n  startedAt?: Maybe<Scalars['DateTime']['output']>;\n  status: ReplicateVolumeInstanceSnapshotStatus;\n  totalBytes: Scalars['BigInt']['output'];\n  transferRateMbps?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type VolumeState =\n  | 'DELETED'\n  | 'DELETING'\n  | 'ERROR'\n  | 'MIGRATING'\n  | 'MIGRATION_PENDING'\n  | 'READY'\n  | 'RESTORING'\n  | 'UPDATING';\n\nexport type VolumeUpdateInput = {\n  /** The name of the volume */\n  name?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VolumeVolumeInstancesConnection = {\n  __typename?: 'VolumeVolumeInstancesConnection';\n  edges: Array<VolumeVolumeInstancesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type VolumeVolumeInstancesConnectionEdge = {\n  __typename?: 'VolumeVolumeInstancesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: VolumeInstance;\n};\n\nexport type WebhookHeaderInput = {\n  name: Scalars['String']['input'];\n  value: Scalars['String']['input'];\n};\n\nexport type WithdrawalPlatformTypes =\n  | 'BMAC'\n  | 'GITHUB'\n  | 'PAYPAL'\n  | 'STRIPE_CONNECT';\n\nexport type WorkflowId = {\n  __typename?: 'WorkflowId';\n  /** Why MySQL archive continuity could not be verified. The restore remains allowed and its image performs the authoritative replay check. */\n  archiveContinuityUnverifiedReason?: Maybe<Scalars['String']['output']>;\n  /** For MySQL PITR restores, whether archive continuity was verified before the workflow started. */\n  archiveContinuityVerified?: Maybe<Scalars['Boolean']['output']>;\n  workflowId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WorkflowResult = {\n  __typename?: 'WorkflowResult';\n  error?: Maybe<Scalars['String']['output']>;\n  status: WorkflowStatus;\n};\n\nexport type WorkflowStatus =\n  | 'Complete'\n  | 'Error'\n  | 'NotFound'\n  | 'Running';\n\nexport type Workspace = Node & {\n  __typename?: 'Workspace';\n  accessGroups: WorkspaceAccessGroupsConnection;\n  adoptionHistory: Array<AdoptionInfo>;\n  adoptionLevel: Scalars['Float']['output'];\n  /** @deprecated Deprecated regions are no longer supported. */\n  allowDeprecatedRegions?: Maybe<Scalars['Boolean']['output']>;\n  apiTokenRateLimit?: Maybe<ApiTokenRateLimit>;\n  avatar?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use `workspace.restriction` and check for an active BAN restriction. This field will be removed after the WorkspaceRestriction migration completes. */\n  banReason?: Maybe<Scalars['String']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  customer: Customer;\n  discordRole?: Maybe<Scalars['String']['output']>;\n  /** Whether 2FA enforcement is enabled for this workspace. */\n  has2FAEnforcement: Scalars['Boolean']['output'];\n  /** Whether automatic deployment diagnosis is enabled for this workspace. */\n  hasAutomaticDiagnosis: Scalars['Boolean']['output'];\n  /** Whether this workspace has access to guardrails policies. */\n  hasGuardrailsAccess: Scalars['Boolean']['output'];\n  /** Whether this workspace has a signed HIPAA Business Associate Agreement, from either the legacy hasBAA flag or the HIPAA_BAA spend commitment feature. */\n  hasHipaaBAA: Scalars['Boolean']['output'];\n  hasSAML: Scalars['Boolean']['output'];\n  id: Scalars['ID']['output'];\n  identityProviders: WorkspaceIdentityProvidersConnection;\n  members: Array<WorkspaceMember>;\n  name: Scalars['String']['output'];\n  partnerProfile?: Maybe<PartnerProfile>;\n  plan: Plan;\n  preferredRegion?: Maybe<Scalars['String']['output']>;\n  /** Total number of projects in this workspace. Used by the dashboard to show an exact count without paginating through every project. */\n  projectCount: Scalars['Int']['output'];\n  projects: WorkspaceProjectsConnection;\n  /** Whether the current user's access is redacted due to pending 2FA requirement. Returns true if the user is a workspace member, workspace has 2FA enforcement enabled, and the current user needs to enable 2FA. */\n  redactedDueTo2FAPending: Scalars['Boolean']['output'];\n  referredUsers: Array<ReferralUser>;\n  restrictProjectVisibilityToGroups: Scalars['Boolean']['output'];\n  slackChannelId?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use plan field instead */\n  subscriptionModel: SubscriptionModel;\n  subscriptionPlanLimit?: Maybe<Scalars['SubscriptionPlanLimit']['output']>;\n  /** @deprecated Teams are being removed from the system, don't use it */\n  team?: Maybe<Team>;\n  updatedAt: Scalars['DateTime']['output'];\n  /** Get a list of user emails in the workspace who do not have verified 2FA enabled. Returns an empty array if all users have 2FA enabled. */\n  usersWithout2FA: Array<Scalars['String']['output']>;\n};\n\n\nexport type WorkspaceAccessGroupsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type WorkspaceIdentityProvidersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type WorkspaceProjectCountArgs = {\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type WorkspaceProjectsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type WorkspaceAccessGroupsConnection = {\n  __typename?: 'WorkspaceAccessGroupsConnection';\n  edges: Array<WorkspaceAccessGroupsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type WorkspaceAccessGroupsConnectionEdge = {\n  __typename?: 'WorkspaceAccessGroupsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: AccessGroup;\n};\n\nexport type WorkspaceIdPConnection = {\n  __typename?: 'WorkspaceIdPConnection';\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  provider?: Maybe<Scalars['String']['output']>;\n  status: WorkspaceIdPConnectionStatus;\n  updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type WorkspaceIdPConnectionStatus =\n  | 'ACTIVE'\n  | 'DRAFT'\n  | 'INACTIVE'\n  | 'PENDING'\n  | 'VALIDATING';\n\nexport type WorkspaceIdentityProvider = Node & {\n  __typename?: 'WorkspaceIdentityProvider';\n  connection: WorkspaceIdPConnection;\n  createdAt: Scalars['DateTime']['output'];\n  enforcementEnabledAt?: Maybe<Scalars['DateTime']['output']>;\n  id: Scalars['ID']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  workspace: Workspace;\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type WorkspaceIdentityProvidersConnection = {\n  __typename?: 'WorkspaceIdentityProvidersConnection';\n  edges: Array<WorkspaceIdentityProvidersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type WorkspaceIdentityProvidersConnectionEdge = {\n  __typename?: 'WorkspaceIdentityProvidersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: WorkspaceIdentityProvider;\n};\n\nexport type WorkspaceInviteCodeCreateInput = {\n  role: Scalars['String']['input'];\n};\n\nexport type WorkspaceMember = {\n  __typename?: 'WorkspaceMember';\n  avatar?: Maybe<Scalars['String']['output']>;\n  email: Scalars['String']['output'];\n  /** Only retrieved if requested by an admin */\n  featureFlags?: Maybe<Array<ActiveFeatureFlag>>;\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  role: TeamRole;\n  /** Only retrieved if requested by an admin */\n  twoFactorAuthEnabled?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type WorkspacePermissionChangeInput = {\n  role: TeamRole;\n  userId: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type WorkspacePolicy = Node & {\n  __typename?: 'WorkspacePolicy';\n  deploySourceAllowlist: WorkspacePolicyDeploySourceAllowlistConnection;\n  id: Scalars['ID']['output'];\n  restrictDeploysToAllowedSources: Scalars['Boolean']['output'];\n  restrictPublicTcpProxies: Scalars['Boolean']['output'];\n  restrictRailwayDomainGeneration: Scalars['Boolean']['output'];\n};\n\n\nexport type WorkspacePolicyDeploySourceAllowlistArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type WorkspacePolicyDeploySourceAllowlist = Node & {\n  __typename?: 'WorkspacePolicyDeploySourceAllowlist';\n  addedBy?: Maybe<User>;\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  sourceIcon?: Maybe<Scalars['String']['output']>;\n  sourceId: Scalars['String']['output'];\n  sourceName: Scalars['String']['output'];\n  sourceType: WorkspacePolicyDeploySourceType;\n};\n\nexport type WorkspacePolicyDeploySourceAllowlistConnection = {\n  __typename?: 'WorkspacePolicyDeploySourceAllowlistConnection';\n  edges: Array<WorkspacePolicyDeploySourceAllowlistConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type WorkspacePolicyDeploySourceAllowlistConnectionEdge = {\n  __typename?: 'WorkspacePolicyDeploySourceAllowlistConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: WorkspacePolicyDeploySourceAllowlist;\n};\n\nexport type WorkspacePolicyDeploySourceType =\n  | 'GITHUB_ORG';\n\nexport type WorkspacePolicyItemUpdateInput = {\n  enabled: Scalars['Boolean']['input'];\n  policy: WorkspacePolicyName;\n};\n\nexport type WorkspacePolicyName =\n  | 'RESTRICT_DEPLOYS_TO_ALLOWED_SOURCES'\n  | 'RESTRICT_PUBLIC_TCP_PROXIES'\n  | 'RESTRICT_RAILWAY_DOMAIN_GENERATION';\n\nexport type WorkspacePolicySelectableDeploySource = {\n  __typename?: 'WorkspacePolicySelectableDeploySource';\n  sourceIcon?: Maybe<Scalars['String']['output']>;\n  sourceId: Scalars['String']['output'];\n  sourceName: Scalars['String']['output'];\n  sourceType: WorkspacePolicyDeploySourceType;\n};\n\nexport type WorkspaceProjectsConnection = {\n  __typename?: 'WorkspaceProjectsConnection';\n  edges: Array<WorkspaceProjectsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type WorkspaceProjectsConnectionEdge = {\n  __typename?: 'WorkspaceProjectsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Project;\n};\n\nexport type WorkspaceTrustedDomainCreateInput = {\n  domainName: Scalars['String']['input'];\n  role: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type WorkspaceTrustedDomainUpdateInput = {\n  id: Scalars['String']['input'];\n  role: Scalars['String']['input'];\n};\n\nexport type WorkspaceUpdateInput = {\n  avatar?: InputMaybe<Scalars['String']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n  preferredRegion?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type WorkspaceUserInviteInput = {\n  code: Scalars['String']['input'];\n  email: Scalars['String']['input'];\n};\n\nexport type WorkspaceUserRemoveInput = {\n  userId: Scalars['String']['input'];\n};\n\nexport type CustomerTogglePayoutsToCreditsInput = {\n  isWithdrawingToCredits: Scalars['Boolean']['input'];\n};\n\nexport type RailwayProjectTokenQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type RailwayProjectTokenQuery = { __typename?: 'Query', projectToken: { __typename?: 'ProjectToken', projectId: string, environmentId: string } };\n\nexport type RailwaySandboxFieldsFragment = { __typename?: 'Sandbox', id: string, status: SandboxStatus, networkIsolation: SandboxNetworkIsolation, environmentId: string, region: string, idleTimeoutMinutes?: number | null, createdAt: string, domains: Array<{ __typename?: 'SandboxDomain', prefix: string, port: number, domain: string }> };\n\nexport type RailwaySandboxQueryVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n}>;\n\n\nexport type RailwaySandboxQuery = { __typename?: 'Query', sandbox?: { __typename?: 'Sandbox', id: string, status: SandboxStatus, networkIsolation: SandboxNetworkIsolation, environmentId: string, region: string, idleTimeoutMinutes?: number | null, createdAt: string, domains: Array<{ __typename?: 'SandboxDomain', prefix: string, port: number, domain: string }> } | null };\n\nexport type RailwaySandboxesQueryVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n}>;\n\n\nexport type RailwaySandboxesQuery = { __typename?: 'Query', sandboxes: { __typename?: 'QuerySandboxesConnection', edges: Array<{ __typename?: 'QuerySandboxesConnectionEdge', node: { __typename?: 'Sandbox', id: string, status: SandboxStatus, networkIsolation: SandboxNetworkIsolation, environmentId: string, region: string, idleTimeoutMinutes?: number | null, createdAt: string, domains: Array<{ __typename?: 'SandboxDomain', prefix: string, port: number, domain: string }> } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null } } };\n\nexport type RailwaySandboxCreateMutationVariables = Exact<{\n  input: SandboxCreateInput;\n}>;\n\n\nexport type RailwaySandboxCreateMutation = { __typename?: 'Mutation', sandboxCreate: { __typename?: 'Sandbox', id: string, status: SandboxStatus, networkIsolation: SandboxNetworkIsolation, environmentId: string, region: string, idleTimeoutMinutes?: number | null, createdAt: string, domains: Array<{ __typename?: 'SandboxDomain', prefix: string, port: number, domain: string }> } };\n\nexport type RailwaySandboxDestroyMutationVariables = Exact<{\n  id: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n}>;\n\n\nexport type RailwaySandboxDestroyMutation = { __typename?: 'Mutation', sandboxDestroy?: { __typename?: 'Sandbox', id: string, status: SandboxStatus, networkIsolation: SandboxNetworkIsolation, environmentId: string, region: string, idleTimeoutMinutes?: number | null, createdAt: string, domains: Array<{ __typename?: 'SandboxDomain', prefix: string, port: number, domain: string }> } | null };\n\nexport type RailwaySandboxHeartbeatMutationVariables = Exact<{\n  id: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n}>;\n\n\nexport type RailwaySandboxHeartbeatMutation = { __typename?: 'Mutation', sandboxHeartbeat?: { __typename?: 'Sandbox', id: string, status: SandboxStatus, networkIsolation: SandboxNetworkIsolation, environmentId: string, region: string, idleTimeoutMinutes?: number | null, createdAt: string, domains: Array<{ __typename?: 'SandboxDomain', prefix: string, port: number, domain: string }> } | null };\n\nexport type RailwaySandboxTemplateBuildFieldsFragment = { __typename?: 'SandboxTemplateBuild', id: string, status: SandboxTemplateBuildStatus, environmentId: string };\n\nexport type RailwaySandboxTemplateBuildMutationVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  input: SandboxTemplateInput;\n}>;\n\n\nexport type RailwaySandboxTemplateBuildMutation = { __typename?: 'Mutation', sandboxTemplateBuild: { __typename?: 'SandboxTemplateBuild', id: string, status: SandboxTemplateBuildStatus, environmentId: string } };\n\nexport type RailwaySandboxTemplateBuildStatusQueryVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n}>;\n\n\nexport type RailwaySandboxTemplateBuildStatusQuery = { __typename?: 'Query', sandboxTemplateBuild: { __typename?: 'SandboxTemplateBuild', id: string, status: SandboxTemplateBuildStatus, environmentId: string } };\n\nexport type RailwaySandboxCheckpointFieldsFragment = { __typename?: 'SandboxCheckpoint', id: string, key: string, environmentId: string, createdAt: string };\n\nexport type RailwaySandboxCheckpointsQueryVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n}>;\n\n\nexport type RailwaySandboxCheckpointsQuery = { __typename?: 'Query', sandboxCheckpoints: Array<{ __typename?: 'SandboxCheckpoint', id: string, key: string, environmentId: string, createdAt: string }> };\n\nexport type RailwaySandboxCheckpointCreateMutationVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  sandboxId: Scalars['String']['input'];\n}>;\n\n\nexport type RailwaySandboxCheckpointCreateMutation = { __typename?: 'Mutation', sandboxCheckpointCreate: { __typename?: 'SandboxCheckpoint', id: string, key: string, environmentId: string, createdAt: string } };\n\nexport type RailwaySandboxCheckpointRenameMutationVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n  name: Scalars['String']['input'];\n}>;\n\n\nexport type RailwaySandboxCheckpointRenameMutation = { __typename?: 'Mutation', sandboxCheckpointRename: { __typename?: 'SandboxCheckpoint', id: string, key: string, environmentId: string, createdAt: string } };\n\nexport type RailwaySandboxCheckpointDeleteMutationVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n}>;\n\n\nexport type RailwaySandboxCheckpointDeleteMutation = { __typename?: 'Mutation', sandboxCheckpointDelete: boolean };\n\nexport type RailwaySandboxSessionFieldsFragment = { __typename?: 'SandboxSession', name: string, kind: SandboxSessionKind, attached: boolean, command: string, foregroundActive?: boolean | null, createdAt?: string | null, runState: { __typename?: 'SandboxSessionRunState', running: boolean, exitCode: number, exitedAt?: string | null } };\n\nexport type RailwaySandboxSessionsQueryVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n  after?: InputMaybe<Scalars['String']['input']>;\n}>;\n\n\nexport type RailwaySandboxSessionsQuery = { __typename?: 'Query', sandboxSessions?: { __typename?: 'QuerySandboxSessionsConnection', edges: Array<{ __typename?: 'QuerySandboxSessionsConnectionEdge', node: { __typename?: 'SandboxSession', name: string, kind: SandboxSessionKind, attached: boolean, command: string, foregroundActive?: boolean | null, createdAt?: string | null, runState: { __typename?: 'SandboxSessionRunState', running: boolean, exitCode: number, exitedAt?: string | null } } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null } } | null };\n\nexport type RailwaySandboxExecMutationVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n  command: Scalars['String']['input'];\n  timeoutSec?: InputMaybe<Scalars['Int']['input']>;\n}>;\n\n\nexport type RailwaySandboxExecMutation = { __typename?: 'Mutation', sandboxExec: { __typename?: 'SandboxExecResult', exitCode: number, stdout: string, stderr: string, truncated: boolean, timedOut: boolean } };\n\nexport type RailwayGenerateShellTokenMutationVariables = Exact<{\n  input: ShellTokenInput;\n}>;\n\n\nexport type RailwayGenerateShellTokenMutation = { __typename?: 'Mutation', generateShellToken: string };\n\nexport const RailwaySandboxFieldsFragmentDoc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Sandbox\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"networkIsolation\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domains\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"prefix\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"port\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domain\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"region\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idleTimeoutMinutes\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxFieldsFragment, unknown>;\nexport const RailwaySandboxTemplateBuildFieldsFragmentDoc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxTemplateBuild\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}]}}]} as unknown as DocumentNode<RailwaySandboxTemplateBuildFieldsFragment, unknown>;\nexport const RailwaySandboxCheckpointFieldsFragmentDoc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxCheckpoint\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"key\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxCheckpointFieldsFragment, unknown>;\nexport const RailwaySandboxSessionFieldsFragmentDoc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxSessionFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxSession\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"kind\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"runState\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"running\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"exitCode\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"exitedAt\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"attached\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"command\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"foregroundActive\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxSessionFieldsFragment, unknown>;\nexport const RailwayProjectTokenDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwayProjectToken\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"projectToken\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"projectId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}]}}]}}]} as unknown as DocumentNode<RailwayProjectTokenQuery, RailwayProjectTokenQueryVariables>;\nexport const RailwaySandboxDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandbox\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandbox\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Sandbox\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"networkIsolation\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domains\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"prefix\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"port\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domain\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"region\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idleTimeoutMinutes\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxQuery, RailwaySandboxQueryVariables>;\nexport const RailwaySandboxesDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxes\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"first\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Int\"}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"before\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"last\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Int\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxes\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"first\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"first\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"before\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"before\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"last\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"last\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"edges\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"node\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"}}]}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"pageInfo\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"hasNextPage\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"endCursor\"}}]}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Sandbox\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"networkIsolation\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domains\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"prefix\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"port\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domain\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"region\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idleTimeoutMinutes\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxesQuery, RailwaySandboxesQueryVariables>;\nexport const RailwaySandboxCreateDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCreate\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxCreateInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxCreate\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Sandbox\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"networkIsolation\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domains\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"prefix\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"port\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domain\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"region\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idleTimeoutMinutes\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxCreateMutation, RailwaySandboxCreateMutationVariables>;\nexport const RailwaySandboxDestroyDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxDestroy\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxDestroy\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Sandbox\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"networkIsolation\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domains\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"prefix\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"port\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domain\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"region\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idleTimeoutMinutes\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxDestroyMutation, RailwaySandboxDestroyMutationVariables>;\nexport const RailwaySandboxHeartbeatDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxHeartbeat\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxHeartbeat\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Sandbox\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"networkIsolation\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domains\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"prefix\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"port\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"domain\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"region\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idleTimeoutMinutes\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxHeartbeatMutation, RailwaySandboxHeartbeatMutationVariables>;\nexport const RailwaySandboxTemplateBuildDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuild\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxTemplateInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxTemplateBuild\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxTemplateBuild\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}]}}]} as unknown as DocumentNode<RailwaySandboxTemplateBuildMutation, RailwaySandboxTemplateBuildMutationVariables>;\nexport const RailwaySandboxTemplateBuildStatusDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildStatus\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ID\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxTemplateBuild\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxTemplateBuild\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}]}}]} as unknown as DocumentNode<RailwaySandboxTemplateBuildStatusQuery, RailwaySandboxTemplateBuildStatusQueryVariables>;\nexport const RailwaySandboxCheckpointsDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpoints\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxCheckpoints\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxCheckpoint\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"key\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxCheckpointsQuery, RailwaySandboxCheckpointsQueryVariables>;\nexport const RailwaySandboxCheckpointCreateDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointCreate\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxCheckpointCreate\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxId\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxCheckpoint\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"key\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxCheckpointCreateMutation, RailwaySandboxCheckpointCreateMutationVariables>;\nexport const RailwaySandboxCheckpointRenameDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointRename\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ID\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxCheckpointRename\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxCheckpoint\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"key\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxCheckpointRenameMutation, RailwaySandboxCheckpointRenameMutationVariables>;\nexport const RailwaySandboxCheckpointDeleteDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointDelete\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ID\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxCheckpointDelete\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}}]}]}}]} as unknown as DocumentNode<RailwaySandboxCheckpointDeleteMutation, RailwaySandboxCheckpointDeleteMutationVariables>;\nexport const RailwaySandboxSessionsDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxSessions\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxSessions\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"edges\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"node\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxSessionFields\"}}]}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"pageInfo\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"hasNextPage\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"endCursor\"}}]}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxSessionFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxSession\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"kind\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"runState\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"running\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"exitCode\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"exitedAt\"}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"attached\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"command\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"foregroundActive\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxSessionsQuery, RailwaySandboxSessionsQueryVariables>;\nexport const RailwaySandboxExecDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxExec\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"command\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"timeoutSec\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Int\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxExec\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"command\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"command\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"timeoutSec\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"timeoutSec\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"exitCode\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"stdout\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"stderr\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"truncated\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"timedOut\"}}]}}]}}]} as unknown as DocumentNode<RailwaySandboxExecMutation, RailwaySandboxExecMutationVariables>;\nexport const RailwayGenerateShellTokenDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwayGenerateShellToken\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ShellTokenInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"generateShellToken\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}]}]}}]} as unknown as DocumentNode<RailwayGenerateShellTokenMutation, RailwayGenerateShellTokenMutationVariables>;","// Injected by tsup at build time from package.json; falls back when running\n// unbundled (vitest/tsx).\ndeclare const __RAILWAY_SDK_VERSION__: string | undefined;\n\nconst SDK_VERSION =\n  typeof __RAILWAY_SDK_VERSION__ !== \"undefined\"\n    ? __RAILWAY_SDK_VERSION__\n    : \"0.0.0-dev\";\n\nexport const USER_AGENT = `railway-ts-sdk/${SDK_VERSION}`;\n","import type { TypedDocumentNode } from \"@graphql-typed-document-node/core\";\nimport { Kind, print, type DocumentNode } from \"graphql\";\n\nimport type { NormalizedRailwayClientConfig } from \"./config.js\";\nimport {\n  RailwayGraphQLError,\n  type RailwayGraphQLErrorItem,\n} from \"./errors.js\";\nimport { USER_AGENT } from \"./version.js\";\n\ninterface GraphQLResponse<TResult> {\n  data?: TResult;\n  errors?: RailwayGraphQLErrorItem[];\n}\n\nexport async function requestGraphQL<TResult, TVariables>(\n  config: NormalizedRailwayClientConfig,\n  document: TypedDocumentNode<TResult, TVariables>,\n  variables: TVariables,\n  signal?: AbortSignal,\n): Promise<TResult> {\n  signal?.throwIfAborted();\n  const operation = operationName(document as DocumentNode);\n  const start = Date.now();\n  config.log(`→ ${operation} POST ${config.endpoint}`);\n\n  const response = await config.fetch(config.endpoint, {\n    ...(signal ? { signal } : {}),\n    method: \"POST\",\n    headers: {\n      Accept: \"application/json\",\n      ...authHeader(config),\n      \"Content-Type\": \"application/json\",\n      \"User-Agent\": USER_AGENT,\n    },\n    body: JSON.stringify({\n      query: print(document as DocumentNode),\n      variables,\n    }),\n  });\n\n  const body = await parseGraphQLResponse<TResult>(response);\n  signal?.throwIfAborted();\n  const errors = body?.errors ?? [];\n  const elapsed = Date.now() - start;\n\n  if (!response.ok || errors.length > 0) {\n    config.log(\n      `← ${operation} failed http=${response.status} errors=${errors.length} in ${elapsed}ms`,\n    );\n    throw new RailwayGraphQLError({\n      message:\n        errors[0]?.message ??\n        `Railway GraphQL request failed with HTTP ${response.status}.`,\n      status: response.status,\n      errors,\n      responseBody: body,\n    });\n  }\n\n  if (!body?.data) {\n    config.log(`← ${operation} returned no data`);\n    throw new RailwayGraphQLError({\n      message: \"Railway GraphQL response did not include data.\",\n      status: response.status,\n      responseBody: body,\n    });\n  }\n\n  config.log(`← ${operation} ok in ${elapsed}ms`);\n  return body.data;\n}\n\nfunction operationName(document: DocumentNode): string {\n  for (const definition of document.definitions) {\n    if (definition.kind === Kind.OPERATION_DEFINITION) {\n      return definition.name?.value ?? \"anonymous\";\n    }\n  }\n  return \"operation\";\n}\n\nfunction authHeader(config: NormalizedRailwayClientConfig): Record<string, string> {\n  if (config.authType === \"project-token\") return { \"project-access-token\": config.token };\n  return { Authorization: `Bearer ${config.token}` };\n}\n\nasync function parseGraphQLResponse<TResult>(\n  response: Response,\n): Promise<GraphQLResponse<TResult> | undefined> {\n  try {\n    return (await response.json()) as GraphQLResponse<TResult>;\n  } catch {\n    return undefined;\n  }\n}\n","import { RailwayProjectTokenDocument } from \"../generated/graphql.js\";\nimport type { NormalizedRailwayClientConfig } from \"./config.js\";\nimport { RailwayGraphQLError } from \"./errors.js\";\nimport { requestGraphQL } from \"./graphql-client.js\";\n\n/** The project and environment a project token is bound to. */\nexport interface ProjectTokenScope {\n  projectId: string;\n  environmentId: string;\n}\n\n/**\n * One entry per endpoint + token. A token's scope never changes, so a resolved\n * promise is kept for the life of the process; holding the promise (not the\n * value) also makes concurrent first callers share a single request. Failed\n * lookups are evicted so the next call retries.\n */\nconst scopes = new Map<string, Promise<ProjectTokenScope>>();\n\n/**\n * Asks Backboard which project and environment the project token in the\n * request header belongs to (`query { projectToken { ... } }`).\n */\nexport function resolveProjectTokenScope(\n  config: NormalizedRailwayClientConfig,\n): Promise<ProjectTokenScope> {\n  const key = `${config.endpoint}\\n${config.token}`;\n  const cached = scopes.get(key);\n  if (cached) return cached;\n\n  const pending = lookupProjectTokenScope(config);\n  scopes.set(key, pending);\n  pending.catch(() => {\n    if (scopes.get(key) === pending) scopes.delete(key);\n  });\n  return pending;\n}\n\nasync function lookupProjectTokenScope(\n  config: NormalizedRailwayClientConfig,\n): Promise<ProjectTokenScope> {\n  config.log(\"resolving environment from project token\");\n  const data = await requestGraphQL(config, RailwayProjectTokenDocument, {});\n  const scope = data.projectToken as Partial<ProjectTokenScope> | null;\n  if (!scope?.environmentId || !scope.projectId) {\n    throw new RailwayGraphQLError({\n      message: \"Railway did not return an environment for the project token.\",\n      status: 200,\n      responseBody: data,\n    });\n  }\n  config.log(\n    `project token scope: project=${scope.projectId} env=${scope.environmentId}`,\n  );\n  return { projectId: scope.projectId, environmentId: scope.environmentId };\n}\n","import {\n  RailwayAuthError,\n  RailwayConnectionError,\n  RailwayGraphQLError,\n} from \"./errors.js\";\nimport { createLogger, type Logger } from \"./logger.js\";\nimport { resolveProjectTokenScope } from \"./project-token.js\";\n\nexport const DEFAULT_RAILWAY_GRAPHQL_ENDPOINT =\n  \"https://backboard.railway.com/graphql/v2\";\n\nconst RAILWAY_PROJECT_TOKEN_ENV = \"RAILWAY_TOKEN\";\nconst RAILWAY_API_TOKEN_ENV = \"RAILWAY_API_TOKEN\";\nconst RAILWAY_ENVIRONMENT_ENV = \"RAILWAY_ENVIRONMENT_ID\";\nconst RAILWAY_ENDPOINT_ENV = \"RAILWAY_GRAPHQL_ENDPOINT\";\nconst RAILWAY_TCP_PROXY_WS_ENV = \"RAILWAY_TCP_PROXY_WS_ENDPOINT\";\nconst RAILWAY_VERBOSE_ENV = \"RAILWAY_VERBOSE\";\n\nconst TCP_PROXY_WS_PORT = \"2226\";\nconst TCP_PROXY_WS_PATH = \"/ws/exec\";\nconst TCP_PROXY_FILES_WS_PATH = \"/ws/files\";\n\nexport type RailwayAuthType = \"bearer\" | \"project-token\";\n\nexport interface RailwayClientConfig {\n  token?: string;\n  authType?: RailwayAuthType;\n  endpoint?: string;\n  /** Alias used by IaC flows. Prefer endpoint for the stable SDK surface. */\n  graphqlEndpoint?: string;\n  fetch?: typeof fetch;\n  /**\n   * WebSocket constructor used to stream exec output. Defaults to the global\n   * `WebSocket` (available in Node >= 22, browsers, Deno, and edge runtimes);\n   * pass an implementation (e.g. the `ws` package) where no global exists.\n   */\n  webSocketImpl?: WebSocketConstructor;\n  /**\n   * tcp-proxy exec WebSocket endpoint. Defaults to the value derived from\n   * `endpoint` (`backboard.<host>` → `wss://ssh.<host>:2226/ws/exec`);\n   * override for non-standard deployments.\n   */\n  tcpProxyWsEndpoint?: string;\n  /**\n   * Print human-readable progress to stderr (requests, polling, lifecycle).\n   * Also enabled by `RAILWAY_VERBOSE`. Tokens and env values are never logged.\n   */\n  verbose?: boolean;\n}\n\n/** Structural constructor type satisfied by native WebSocket and the `ws` package. */\nexport type WebSocketConstructor = new (\n  url: string,\n  protocols?: string | string[],\n) => unknown;\n\nexport interface NormalizedRailwayClientConfig {\n  token: string;\n  authType: RailwayAuthType;\n  endpoint: string;\n  fetch: typeof fetch;\n  webSocketImpl?: WebSocketConstructor | undefined;\n  tcpProxyWsEndpoint: string;\n  log: Logger;\n}\n\n/**\n * Resolves credentials and transport with explicit values winning over\n * environment variables. Reading from env keeps the happy path config-free;\n * passing an explicit value lets callers source it from any variable they like.\n */\nexport function normalizeRailwayClientConfig(\n  config: RailwayClientConfig = {},\n): NormalizedRailwayClientConfig {\n  const resolved = resolveToken(config);\n  if (!resolved) {\n    throw new RailwayAuthError(\n      `${RAILWAY_PROJECT_TOKEN_ENV} (project token) or ${RAILWAY_API_TOKEN_ENV}`,\n    );\n  }\n  const { token, defaultAuthType } = resolved;\n\n  const fetchImpl = config.fetch ?? globalThis.fetch;\n  if (!fetchImpl) {\n    throw new Error(\"No fetch implementation found. Pass `fetch` in the config.\");\n  }\n\n  const endpoint =\n    firstNonEmpty(\n      config.endpoint,\n      config.graphqlEndpoint,\n      readEnv(RAILWAY_ENDPOINT_ENV),\n    ) ?? DEFAULT_RAILWAY_GRAPHQL_ENDPOINT;\n\n  const tcpProxyWsEndpoint =\n    firstNonEmpty(config.tcpProxyWsEndpoint, readEnv(RAILWAY_TCP_PROXY_WS_ENV)) ??\n    deriveTcpProxyWsEndpoint(endpoint);\n\n  const verbose = config.verbose ?? isTruthyEnv(readEnv(RAILWAY_VERBOSE_ENV));\n  const normalized: NormalizedRailwayClientConfig = {\n    token,\n    authType: config.authType ?? defaultAuthType,\n    endpoint,\n    fetch: fetchImpl,\n    webSocketImpl: config.webSocketImpl,\n    tcpProxyWsEndpoint,\n    log: createLogger(verbose),\n  };\n  normalized.log(\n    `config resolved: endpoint=${endpoint} authType=${normalized.authType}`,\n  );\n  return normalized;\n}\n\n/**\n * Token resolution order: explicit config → `RAILWAY_TOKEN` (project token,\n * the recommended on-platform credential) → `RAILWAY_API_TOKEN` (bearer\n * account/workspace token, last resort). A token sourced from `RAILWAY_TOKEN`\n * defaults `authType` to `project-token`; everything else defaults to\n * `bearer`. An explicit `authType` always wins.\n */\nfunction resolveToken(\n  config: RailwayClientConfig,\n): { token: string; defaultAuthType: RailwayAuthType } | undefined {\n  const explicit = firstNonEmpty(config.token);\n  if (explicit) return { token: explicit, defaultAuthType: \"bearer\" };\n\n  const projectToken = firstNonEmpty(readEnv(RAILWAY_PROJECT_TOKEN_ENV));\n  if (projectToken) {\n    return { token: projectToken, defaultAuthType: \"project-token\" };\n  }\n\n  const apiToken = firstNonEmpty(readEnv(RAILWAY_API_TOKEN_ENV));\n  if (apiToken) return { token: apiToken, defaultAuthType: \"bearer\" };\n\n  return undefined;\n}\n\n/**\n * Derives the tcp-proxy exec WebSocket endpoint from the GraphQL endpoint:\n * the host's leading `backboard.` label becomes `ssh.` (or `ssh.` is\n * prepended), scheme `wss`, port 2226, path `/ws/exec`. e.g.\n * `https://backboard.railway.com/graphql/v2` → `wss://ssh.railway.com:2226/ws/exec`.\n */\nexport function deriveTcpProxyWsEndpoint(endpoint: string): string {\n  const url = new URL(endpoint);\n  const host = url.hostname.startsWith(\"backboard.\")\n    ? `ssh.${url.hostname.slice(\"backboard.\".length)}`\n    : `ssh.${url.hostname}`;\n  return `wss://${host}:${TCP_PROXY_WS_PORT}${TCP_PROXY_WS_PATH}`;\n}\n\n/**\n * Derives the tcp-proxy files WebSocket endpoint from the exec endpoint by\n * swapping the bridge path: `wss://ssh.<host>:2226/ws/exec` →\n * `wss://ssh.<host>:2226/ws/files`. Custom `tcpProxyWsEndpoint` overrides are\n * assumed to follow the same path convention.\n */\nexport function deriveFilesWsEndpoint(tcpProxyWsEndpoint: string): string {\n  const url = new URL(tcpProxyWsEndpoint);\n  url.pathname = url.pathname.endsWith(TCP_PROXY_WS_PATH)\n    ? `${url.pathname.slice(0, -TCP_PROXY_WS_PATH.length)}${TCP_PROXY_FILES_WS_PATH}`\n    : TCP_PROXY_FILES_WS_PATH;\n  return url.toString();\n}\n\nexport function resolveWebSocketImpl(\n  config: NormalizedRailwayClientConfig,\n): WebSocketConstructor {\n  const impl =\n    config.webSocketImpl ??\n    (globalThis as { WebSocket?: WebSocketConstructor }).WebSocket;\n  if (!impl) {\n    throw new RailwayConnectionError({\n      message:\n        \"No WebSocket implementation found. Pass `webSocketImpl` in the config \" +\n        \"(e.g. the `ws` package) to stream exec output.\",\n    });\n  }\n  return impl;\n}\n\n/**\n * Environment resolution order: explicit option → `RAILWAY_ENVIRONMENT_ID` →\n * the environment the project token is bound to (one `projectToken` query per\n * token, cached). Bearer tokens (account/workspace, `RAILWAY_API_TOKEN`) span\n * environments, so without an explicit id they throw `RailwayAuthError`.\n */\nexport async function resolveEnvironmentId(\n  config: NormalizedRailwayClientConfig,\n  explicit?: string,\n): Promise<string> {\n  const environmentId = firstNonEmpty(\n    explicit,\n    readEnv(RAILWAY_ENVIRONMENT_ENV),\n  );\n  if (environmentId) return environmentId;\n\n  if (config.authType !== \"project-token\") {\n    throw new RailwayAuthError(\n      RAILWAY_ENVIRONMENT_ENV,\n      \"Could not resolve the sandbox environment. Account and workspace tokens span environments, so it cannot be inferred. Use one of:\\n\" +\n        `  • set ${RAILWAY_PROJECT_TOKEN_ENV} to a Railway project token (recommended — the environment is automatic)\\n` +\n        '  • token: \"...\", authType: \"project-token\" to pass a project token explicitly\\n' +\n        `  • environmentId: \"...\" or set ${RAILWAY_ENVIRONMENT_ENV}`,\n    );\n  }\n\n  try {\n    return (await resolveProjectTokenScope(config)).environmentId;\n  } catch (error) {\n    throw environmentLookupError(error);\n  }\n}\n\nfunction environmentLookupError(cause: unknown): Error {\n  const reason = cause instanceof Error ? cause.message : String(cause);\n  const prefix = \"Could not resolve the sandbox environment from the project token\";\n  if (cause instanceof RailwayGraphQLError) {\n    return new RailwayAuthError(\n      RAILWAY_ENVIRONMENT_ENV,\n      `${prefix}: Railway rejected the lookup (${reason}). ` +\n        `Check that the token is a valid, unrevoked project token, or set ${RAILWAY_ENVIRONMENT_ENV} / pass environmentId.`,\n      { cause },\n    );\n  }\n  return new RailwayConnectionError({\n    message:\n      `${prefix}: the lookup request failed (${reason}). ` +\n      `Retry, or set ${RAILWAY_ENVIRONMENT_ENV} / pass environmentId to skip the lookup.`,\n    cause,\n  });\n}\n\n/**\n * Reads an environment variable without assuming a Node runtime, so the SDK is\n * safe to import in browsers, Deno, and edge runtimes where `process` is absent.\n */\nfunction readEnv(name: string): string | undefined {\n  if (typeof process === \"undefined\") return undefined;\n  return process.env?.[name];\n}\n\n/** Treats `1`/`true`/`yes` as on so `RAILWAY_VERBOSE=0` doesn't accidentally enable. */\nfunction isTruthyEnv(value: string | undefined): boolean {\n  if (value === undefined) return false;\n  const normalized = value.trim().toLowerCase();\n  return normalized === \"1\" || normalized === \"true\" || normalized === \"yes\";\n}\n\nfunction firstNonEmpty(...values: (string | undefined)[]): string | undefined {\n  for (const value of values) {\n    if (value !== undefined && value.trim().length > 0) return value;\n  }\n  return undefined;\n}\n","import { RailwayConnectionError, RailwayError } from \"../core/errors.js\";\nimport type { SandboxStatus } from \"./types.js\";\n\n/** The exec transport failed before a valid remote exit; retained output may be incomplete. */\nexport class ExecInterruptedError extends RailwayConnectionError {\n  readonly stdout: string;\n  readonly stderr: string;\n\n  constructor(args: {\n    closeCode?: number;\n    reason: string;\n    stdout: string;\n    stderr: string;\n    cause?: unknown;\n  }) {\n    super({\n      message:\n        `The exec session closed before the command reported an exit ` +\n        (args.closeCode === undefined\n          ? `(${args.reason || \"invalid exec protocol\"}). `\n          : `(code ${args.closeCode}${args.reason ? `: ${args.reason}` : \"\"}). `) +\n        `The command's outcome is unknown; the sandbox may have been destroyed.`,\n      ...(args.closeCode === undefined ? {} : { closeCode: args.closeCode }),\n      cause: args.cause,\n    });\n    this.stdout = args.stdout;\n    this.stderr = args.stderr;\n  }\n}\n\nexport class SandboxNotFoundError extends RailwayError {\n  readonly id: string;\n  readonly environmentId: string;\n\n  constructor(args: { id: string; environmentId: string }) {\n    super(\n      `Sandbox \"${args.id}\" was not found in environment \"${args.environmentId}\".`,\n    );\n    this.id = args.id;\n    this.environmentId = args.environmentId;\n  }\n}\n\n/** A sandbox reached FAILED/DESTROYING/DESTROYED before becoming RUNNING. */\nexport class SandboxFailedError extends RailwayError {\n  readonly id: string;\n  readonly status: SandboxStatus;\n\n  constructor(args: { id: string; status: SandboxStatus }) {\n    super(\n      `Sandbox \"${args.id}\" entered terminal state \"${args.status}\" before becoming ready.`,\n    );\n    this.id = args.id;\n    this.status = args.status;\n  }\n}\n\n/** A server-side template build finished in the FAILED state. */\nexport class SandboxTemplateBuildError extends RailwayError {\n  readonly templateId: string;\n  readonly environmentId: string;\n\n  constructor(args: { templateId: string; environmentId: string }) {\n    super(\n      `Sandbox template \"${args.templateId}\" failed to build in environment \"${args.environmentId}\".`,\n    );\n    this.templateId = args.templateId;\n    this.environmentId = args.environmentId;\n  }\n}\n\n/** A file operation was rejected by the sandbox (the message is the VM's error text). */\nexport class SandboxFilesError extends RailwayError {\n  readonly operation: string;\n  readonly path: string;\n\n  constructor(args: { operation: string; path: string; message: string }) {\n    super(`File ${args.operation} failed for \"${args.path}\": ${args.message}`);\n    this.operation = args.operation;\n    this.path = args.path;\n  }\n}\n\n/** The path does not exist in the sandbox. */\nexport class SandboxFileNotFoundError extends SandboxFilesError {}\n\n/** A readiness wait timed out. */\nexport class SandboxTimeoutError extends RailwayError {\n  readonly resource: \"sandbox\" | \"template\";\n  readonly id: string;\n  readonly lastStatus: string;\n  readonly timeoutMs: number;\n\n  constructor(args: {\n    resource: \"sandbox\" | \"template\";\n    id: string;\n    lastStatus: string;\n    timeoutMs: number;\n  }) {\n    super(\n      `Timed out after ${args.timeoutMs}ms waiting for ${args.resource} \"${args.id}\" ` +\n        `to become ready (last status: ${args.lastStatus}).`,\n    );\n    this.resource = args.resource;\n    this.id = args.id;\n    this.lastStatus = args.lastStatus;\n    this.timeoutMs = args.timeoutMs;\n  }\n}\n","import {\n  resolveWebSocketImpl,\n  type NormalizedRailwayClientConfig,\n  type WebSocketConstructor,\n} from \"./config.js\";\nimport { ExecControlUnsupportedError, ExecNotStartedError, RailwayConnectionError } from \"./errors.js\";\nimport type { RailwayWsSocket } from \"./ws-socket.js\";\n\n/**\n * tcp-proxy `/ws/exec` wire protocol: stdout/stderr ride binary frames tagged\n * by a leading byte; init, stdin-EOF, and exit are JSON text frames.\n */\nconst STDOUT_FRAME = 0x01;\nconst STDIN_FRAME = 0x02;\nconst STDERR_FRAME = 0x03;\n// /ws/exec keeps coder/websocket's default 32 KiB message limit (unlike\n// /ws/files). Leave room for the leading stdin tag within every message.\nconst STDIN_CHUNK_BYTES = 16 * 1024;\nconst SEND_HIGH_WATER_BYTES = 128 * 1024;\n/** How long the local WebSocket send buffer may stay above the high-water mark. */\nconst SEND_STALL_TIMEOUT_MS = 30_000;\nconst SEND_POLL_MS = 10;\n/** Lowest exec-control version this client speaks. */\nconst MIN_EXEC_CONTROL_VERSION = 2;\nconst MAX_STDIN_CHUNKS = 64;\n/**\n * Close codes for a session the server dropped before it started, where a new\n * connection can succeed: going away (deploys), abnormal closure, service\n * restart, try again later.\n */\nconst TRANSIENT_CLOSE_CODES: ReadonlySet<number> = new Set([1001, 1006, 1012, 1013]);\n/** What a proxy that predates exec control sends after rejecting the bare hello. */\nconst LEGACY_REJECT_CLOSE_CODE = 1000;\n\nconst notRetryable = new WeakSet<object>();\n\n/**\n * Whether a connection failure left nothing running AND is worth one more try.\n * Denials (policy, limits) and routing failures are not.\n */\nexport function shouldRetryBeforeStart(error: unknown): boolean {\n  return error instanceof ExecNotStartedError && !notRetryable.has(error);\n}\n\nfunction notStarted(\n  message: string,\n  options: { retryable: boolean; closeCode?: number; cause?: unknown },\n): ExecNotStartedError {\n  const error = new ExecNotStartedError({\n    message,\n    ...(options.closeCode !== undefined ? { closeCode: options.closeCode } : {}),\n    ...(options.cause !== undefined ? { cause: options.cause } : {}),\n  });\n  if (!options.retryable) notRetryable.add(error);\n  return error;\n}\n\n/** Subprotocol the tcp-proxy bridges expect alongside the JWT. */\nconst SHELL_SUBPROTOCOL = \"railway-shell\";\n\nexport interface ExecWsHandlers {\n  onError(error: RailwayConnectionError): void;\n  onStdinError(error: RailwayConnectionError): void;\n  onStdout(bytes: Uint8Array): void;\n  onStderr(bytes: Uint8Array): void;\n  /** The command exited with this code. */\n  onExit(code: number, reason: string): void;\n  /** The socket closed without an exit frame having settled the command. */\n  onClose(info: { code: number; reason: string }): void;\n  /**\n   * The VM assigned (or confirmed) a durable session id for this exec — only\n   * emitted when durable sessions are enabled server-side. Use it as the resume\n   * handle. No-op by default.\n   */\n  onDurableSession?(id: string): void;\n}\n\nexport interface ExecWsConnection {\n  /**\n   * True when the proxy negotiated exec control (credit-bounded stdin, typed\n   * errors, confirmed exits). False on a legacy connection.\n   */\n  readonly negotiated: boolean;\n  /** Send stdin with bounded frames and WebSocket send-buffer backpressure. */\n  writeStdin(data: Uint8Array, signal: AbortSignal): Promise<void>;\n  /** Half-close stdin (EOF) so commands that read stdin can finish. */\n  closeStdin(): void;\n  /** Deliver a signal to the command's process group (e.g. \"TERM\", \"KILL\"). */\n  signal(name: string): void;\n  close(): void;\n}\n\n/**\n * Opens a tcp-proxy `/ws/exec` session for `command` and resolves once it is\n * live (socket open and the init frame sent). The JWT travels as the last\n * `Sec-WebSocket-Protocol` value, per the bridge's token-extraction contract;\n * a `shell`-scoped token authorizes `/ws/exec`.\n */\nexport function connectExecWs(args: {\n  config: NormalizedRailwayClientConfig;\n  jwt: string;\n  command: string;\n  /** Working directory for the command; omit for the sandbox default. */\n  cwd?: string;\n  /** Extra environment variables for the command. */\n  env?: Record<string, string>;\n  /** Resume an existing durable session by name; omit/empty to start fresh. */\n  sessionName?: string;\n  /** Resume from the server's last-read cursor. Note some loss if previous clients read didn't keep up */\n  resumeFromLastRead?: boolean;\n  ephemeral?: boolean;\n  /**\n   * Skip `exec_hello` and send `init_exec` first, for a proxy that predates exec\n   * control. Stdin is then bounded only by the local send buffer.\n   */\n  legacy?: boolean;\n  /** Cancels connection establishment only; a live command must be signalled. */\n  signal?: AbortSignal;\n  handlers: ExecWsHandlers;\n}): Promise<ExecWsConnection> {\n  const {\n    config, jwt, command, cwd, env, sessionName, resumeFromLastRead,\n    ephemeral, legacy = false, signal, handlers,\n  } = args;\n  signal?.throwIfAborted();\n  const WS: WebSocketConstructor = resolveWebSocketImpl(config);\n\n  return new Promise<ExecWsConnection>((resolve, reject) => {\n    let opened = false;\n    let closed = false;\n    let helloSent = false;\n    let credits = 0;\n    let window = 0;\n    let creditWaiters: Array<() => void> = [];\n    const wakeCreditWaiters = () => {\n      const waiters = creditWaiters;\n      creditWaiters = [];\n      for (const wake of waiters) wake();\n    };\n    // Credits pace input to the remote command. A command that is slow to read\n    // stdin is legitimate, so this waits without a deadline; abort and close\n    // still end the wait.\n    const waitForCredit = (abort: AbortSignal) => new Promise<void>((resolve, rejectWait) => {\n      const onWaitAbort = () => {\n        creditWaiters = creditWaiters.filter(w => w !== wake);\n        rejectWait(abort.reason);\n      };\n      const wake = () => {\n        abort.removeEventListener(\"abort\", onWaitAbort);\n        resolve();\n      };\n      creditWaiters.push(wake);\n      abort.addEventListener(\"abort\", onWaitAbort, { once: true });\n    });\n    const socket = new WS(config.tcpProxyWsEndpoint, [\n      SHELL_SUBPROTOCOL,\n      jwt,\n    ]) as unknown as RailwayWsSocket;\n    socket.binaryType = \"arraybuffer\";\n    const assertOpen = () => {\n      if (closed) {\n        throw new RailwayConnectionError({\n          message: \"Exec connection is closed.\",\n        });\n      }\n    };\n    const onAbort = () => {\n      closed = true;\n      signal?.removeEventListener(\"abort\", onAbort);\n      reject(signal?.reason);\n      socket.close(1000, \"\");\n    };\n    signal?.addEventListener(\"abort\", onAbort, { once: true });\n    if (signal?.aborted) onAbort();\n\n    const start = () => {\n      if (closed || signal?.aborted) {\n        socket.close(1000, \"\");\n        return;\n      }\n      opened = true;\n      signal?.removeEventListener(\"abort\", onAbort);\n      const data: {\n        command: string;\n        cwd?: string;\n        env?: Record<string, string>;\n        durable_session_name?: string;\n        resume_from_last_read?: boolean;\n        ephemeral?: boolean;\n      } = { command };\n      if (cwd) data.cwd = cwd;\n      if (env && Object.keys(env).length > 0) data.env = env;\n      if (sessionName) data.durable_session_name = sessionName;\n      if (resumeFromLastRead) data.resume_from_last_read = true;\n      if (ephemeral) data.ephemeral = true;\n      try {\n        socket.send(JSON.stringify({ type: \"init_exec\", data }));\n      } catch (error) {\n        closed = true;\n        reject(error);\n        socket.close(1000, \"\");\n        return;\n      }\n      resolve({\n        negotiated: !legacy,\n        async writeStdin(bytes, signal) {\n          signal.throwIfAborted();\n          assertOpen();\n          for (let offset = 0; offset < bytes.length; offset += STDIN_CHUNK_BYTES) {\n            while (credits === 0) {\n              signal.throwIfAborted();\n              assertOpen();\n              await waitForCredit(signal);\n            }\n            const started = Date.now();\n            while ((socket.bufferedAmount ?? 0) > SEND_HIGH_WATER_BYTES) {\n              signal.throwIfAborted();\n              assertOpen();\n              if (Date.now() - started >= SEND_STALL_TIMEOUT_MS) {\n                throw new RailwayConnectionError({\n                  message: `Exec stdin send buffer stalled for ${SEND_STALL_TIMEOUT_MS}ms.`,\n                });\n              }\n              await new Promise(resolve => setTimeout(resolve, SEND_POLL_MS));\n            }\n            signal.throwIfAborted();\n            assertOpen();\n            const chunk = bytes.subarray(offset, offset + STDIN_CHUNK_BYTES);\n            const frame = new Uint8Array(chunk.length + 1);\n            frame[0] = STDIN_FRAME;\n            frame.set(chunk, 1);\n            credits--;\n            socket.send(frame);\n          }\n        },\n        closeStdin: () => {\n          assertOpen();\n          socket.send(JSON.stringify({ type: \"stdin_close\" }));\n        },\n        signal: name => {\n          assertOpen();\n          socket.send(JSON.stringify({ type: \"signal\", data: { signal: name } }));\n        },\n        close: () => {\n          closed = true;\n          wakeCreditWaiters();\n          socket.close(1000, \"\");\n        },\n      });\n    };\n\n    socket.onopen = () => {\n      if (closed) return;\n      if (legacy) {\n        // No flow control to negotiate: stdin is paced by bufferedAmount alone.\n        credits = window = Number.POSITIVE_INFINITY;\n        start();\n        return;\n      }\n      // Negotiate BEFORE transmitting a command. An old proxy rejects the\n      // command-less hello, so unsupported peers cannot start an orphan exec.\n      try {\n        socket.send(JSON.stringify({ type: \"exec_hello\" }));\n        helloSent = true;\n      } catch (error) {\n        signal?.removeEventListener(\"abort\", onAbort);\n        closed = true;\n        reject(error);\n        socket.close(1000, \"\");\n      }\n    };\n\n    socket.onmessage = event => {\n      if (closed) return;\n      const { data } = event;\n      if (data instanceof ArrayBuffer) {\n        if (opened) handleBinaryFrame(data, handlers);\n        return;\n      }\n      if (typeof data !== \"string\") return;\n      const frame = parseControlFrame(data);\n      if (!frame) return;\n      if (!opened) {\n        if (frame.type !== \"exec_capabilities\") return;\n        try {\n          credits = window = negotiatedStdinWindow(frame.data);\n        } catch (error) {\n          signal?.removeEventListener(\"abort\", onAbort);\n          closed = true;\n          reject(error);\n          socket.close(1000, \"\");\n          return;\n        }\n        start();\n        return;\n      }\n      switch (frame.type) {\n        case \"stdin_credit\":\n          if (validCreditGrant(frame.data?.chunks, window - credits)) {\n            credits += frame.data!.chunks!;\n            wakeCreditWaiters();\n          } else {\n            handlers.onError(new RailwayConnectionError({\n              message: \"Invalid exec stdin credit frame.\",\n            }));\n          }\n          break;\n        case \"stdin_error\":\n          handlers.onStdinError(new RailwayConnectionError({\n            message: \"Remote exec stdin write failed.\",\n          }));\n          break;\n        case \"exit\":\n          emitExit(frame.data, handlers);\n          break;\n        // The proxy's typed failure (exit_unconfirmed, output_failed, ...),\n        // sent just before it closes. The outcome is unknown, not an exit.\n        case \"error\":\n          handlers.onError(new RailwayConnectionError({\n            message: `tcp-proxy exec error (${\n              typeof frame.data?.code === \"string\" ? frame.data.code : \"unknown\"\n            })${\n              typeof frame.data?.message === \"string\" && frame.data.message\n                ? `: ${frame.data.message}`\n                : \"\"\n            }.`,\n          }));\n          break;\n        case \"durable_session\":\n          emitDurableSession(frame.data, handlers);\n          break;\n      }\n    };\n\n    socket.onclose = event => {\n      closed = true;\n      wakeCreditWaiters();\n      signal?.removeEventListener(\"abort\", onAbort);\n      if (!opened) {\n        const detail = `code ${event.code}${event.reason ? `: ${event.reason}` : \"\"}`;\n        // The proxy routes the session after accepting the socket, so a close\n        // here can be a denial, a routing failure, or a deploy, not only an old\n        // proxy. An old proxy answers the bare hello with a normal closure.\n        if (helloSent && event.code === LEGACY_REJECT_CLOSE_CODE) {\n          reject(new ExecControlUnsupportedError({\n            message: `tcp-proxy does not support exec control (${detail}); no command was sent.`,\n            closeCode: event.code,\n          }));\n          return;\n        }\n        reject(notStarted(\n          `tcp-proxy exec session closed before the command was sent (${detail}).`,\n          { retryable: TRANSIENT_CLOSE_CODES.has(event.code), closeCode: event.code },\n        ));\n        return;\n      }\n      handlers.onClose({ code: event.code, reason: event.reason });\n    };\n\n    socket.onerror = event => {\n      if (opened) return;\n      closed = true;\n      signal?.removeEventListener(\"abort\", onAbort);\n      reject(notStarted(\n        \"tcp-proxy exec WebSocket connection failed; no command was sent.\",\n        { retryable: true, cause: event },\n      ));\n      socket.close(1000, \"\");\n    };\n  });\n}\n\n/** Binary frame: a leading tag byte selects the stream, the rest is payload. */\nfunction handleBinaryFrame(buffer: ArrayBuffer, handlers: ExecWsHandlers): void {\n  const view = new Uint8Array(buffer);\n  if (view.length <= 1) return;\n  if (view[0] === STDOUT_FRAME) handlers.onStdout(view.subarray(1));\n  else if (view[0] === STDERR_FRAME) handlers.onStderr(view.subarray(1));\n}\n\ninterface ControlFrameData {\n  version?: number;\n  stdin_chunk_bytes?: number;\n  stdin_chunks?: number;\n  chunks?: number;\n  exit_code?: number;\n  reason?: string;\n  durable_session_name?: string;\n  code?: string;\n  message?: string;\n}\n\nfunction parseControlFrame(text: string): { type?: string; data?: ControlFrameData } | undefined {\n  try {\n    return JSON.parse(text) ?? undefined;\n  } catch {\n    return undefined;\n  }\n}\n\nfunction validCreditGrant(chunks: unknown, available: number): chunks is number {\n  return typeof chunks === \"number\" && Number.isSafeInteger(chunks) &&\n    chunks > 0 && chunks <= available;\n}\n\n/**\n * Accepts any later protocol version and any chunk limit at least as large as\n * the chunks this client sends, so a newer proxy does not break deployed SDKs.\n */\nfunction negotiatedStdinWindow(data: ControlFrameData | undefined): number {\n  if (typeof data?.version !== \"number\" || data.version < MIN_EXEC_CONTROL_VERSION ||\n    typeof data.stdin_chunk_bytes !== \"number\" || data.stdin_chunk_bytes < STDIN_CHUNK_BYTES ||\n    !validCreditGrant(data.stdin_chunks, MAX_STDIN_CHUNKS)) {\n    throw new RailwayConnectionError({\n      message: \"Unsupported exec control capabilities; no command was sent.\",\n    });\n  }\n  return data.stdin_chunks;\n}\n\nfunction emitExit(\n  data: ControlFrameData | undefined,\n  handlers: ExecWsHandlers,\n): void {\n  const code = data?.exit_code;\n  if (typeof code !== \"number\" || !Number.isInteger(code) || code < -1 || code > 2_147_483_647) {\n    handlers.onError(new RailwayConnectionError({ message: \"Exec exit frame has no valid remote exit code; the command's outcome is unknown.\" }));\n    return;\n  }\n  handlers.onExit(code, data?.reason ?? \"\");\n}\n\nfunction emitDurableSession(\n  data: ControlFrameData | undefined,\n  handlers: ExecWsHandlers,\n): void {\n  if (data?.durable_session_name) {\n    handlers.onDurableSession?.(data.durable_session_name);\n  }\n}\n","export function shellQuote(value: string): string {\n  return `'${value.replaceAll(\"'\", \"'\\\\''\")}'`;\n}\n\n// Login shell: VM exec sessions get no PATH from the image env, so the\n// profile chain is what makes mise shims and /root/.local/bin resolvable.\nexport function loginShellCommand(command: string): string {\n  return `bash -lc ${shellQuote(command)}`;\n}\n","import type { NormalizedRailwayClientConfig } from \"../core/config.js\";\nimport {\n  ExecControlUnsupportedError,\n  RailwayConnectionError,\n  RailwayError,\n} from \"../core/errors.js\";\nimport {\n  connectExecWs,\n  shouldRetryBeforeStart,\n  type ExecWsConnection,\n} from \"../core/exec-ws-client.js\";\nimport { requestGraphQL } from \"../core/graphql-client.js\";\nimport { ExecInterruptedError } from \"./errors.js\";\nimport { loginShellCommand } from \"./shell.js\";\nimport {\n  RailwayGenerateShellTokenDocument,\n  type RailwayGenerateShellTokenMutation,\n  type RailwayGenerateShellTokenMutationVariables,\n} from \"../generated/graphql.js\";\nimport type {\n  ExecOptions,\n  ExecResult,\n  ExecSignal,\n  ExecStdin,\n  ExecTarget,\n} from \"./types.js\";\n\nconst decoder = () => new TextDecoder();\n/** TERM to KILL escalation. */\nconst KILL_GRACE_MS = 5_000;\n/** How long termination may take to produce a confirmed exit before the outcome is unknown. */\nconst TERMINATION_CONFIRM_MS = KILL_GRACE_MS * 2;\n/** Pause before the single reconnect after a failure that sent no command. */\nconst CONNECT_RETRY_DELAY_MS = 250;\n\n/**\n * Reattach carries a durable session id, not a command, but the `/ws/exec`\n * bridge requires a non-empty command. The VM ignores it when the id resolves\n * to a live session; this no-op is what runs only if the id has already expired\n * (a fresh session the caller can't tell apart — see the reattach caveat).\n */\nconst REATTACH_PLACEHOLDER_COMMAND = \":\";\n\n/** Module-internal access to ExecHandle's private constructor. */\nlet constructHandle: (args: {\n  sessionName: Promise<string>;\n  result: Promise<ExecResult>;\n  kill: (signal: ExecSignal) => Promise<boolean>;\n  detach: () => Promise<string>;\n  stdin: ExecStdin;\n}) => ExecHandle;\n\n/**\n * An in-flight exec. Awaiting it (or any Promise method) yields the final\n * `ExecResult`; `sessionName` and `kill()` manage the command while it runs.\n */\nexport class ExecHandle implements Promise<ExecResult> {\n  /** Durable session name for this exec; reattach via `exec({ sessionName })`. */\n  readonly sessionName: Promise<string>;\n  /** Writable only when exec was started with stdin: true. */\n  readonly stdin: ExecStdin;\n  readonly [Symbol.toStringTag] = \"ExecHandle\";\n  readonly #result: Promise<ExecResult>;\n  readonly #kill: (signal: ExecSignal) => Promise<boolean>;\n  readonly #detach: () => Promise<string>;\n\n  /** Constructed by `Sandbox.exec`; not constructible from outside the SDK. */\n  private constructor(args: {\n    sessionName: Promise<string>;\n    result: Promise<ExecResult>;\n    kill: (signal: ExecSignal) => Promise<boolean>;\n    detach: () => Promise<string>;\n    stdin: ExecStdin;\n  }) {\n    this.sessionName = args.sessionName;\n    this.stdin = args.stdin;\n    this.#result = args.result;\n    this.#kill = args.kill;\n    this.#detach = args.detach;\n    // Side taps: a handle held only for kill()/callbacks must not surface\n    // unhandled rejections. Awaiting the handle still rejects normally.\n    this.sessionName.catch(() => {});\n    this.#result.catch(() => {});\n  }\n\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  then<TResult1 = ExecResult, TResult2 = never>(\n    onfulfilled?: ((value: ExecResult) => TResult1 | PromiseLike<TResult1>) | null,\n    onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null,\n  ): Promise<TResult1 | TResult2> {\n    return this.#result.then(onfulfilled, onrejected);\n  }\n\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  catch<TResult = never>(\n    onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null,\n  ): Promise<ExecResult | TResult> {\n    return this.#result.catch(onrejected);\n  }\n\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  finally(onfinally?: (() => void) | null): Promise<ExecResult> {\n    return this.#result.finally(onfinally);\n  }\n\n  /** The final result as a plain promise; identical to awaiting the handle. */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  result(): Promise<ExecResult> {\n    return this.#result;\n  }\n\n  /**\n   * Terminate the running command with a signal (default `TERM`) delivered to\n   * its process group — a real kill, regardless of durable sessions. The handle\n   * then settles with the command's exit (a signalled process reports exit code\n   * `-1`). To stop streaming WITHOUT ending the command, use `detach()`.\n   */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  kill(signal: ExecSignal = \"TERM\"): Promise<boolean> {\n    return this.#kill(signal);\n  }\n\n  /**\n   * Stop streaming and close the WebSocket without ending the command — the\n   * durable session keeps running server-side. Resolves with its `sessionName`\n   * so you can reattach later via `exec({ sessionName })`; rejects if the server\n   * assigned no durable session (reattach is impossible). The handle itself\n   * settles with the output captured up to the detach.\n   */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  detach(): Promise<string> {\n    return this.#detach();\n  }\n\n  static {\n    constructHandle = args => new ExecHandle(args);\n  }\n}\n\nexport interface ExecContext {\n  config: NormalizedRailwayClientConfig;\n  environmentId: string;\n  sandboxId: string;\n}\n\ninterface ExecControl {\n  connection?: ExecWsConnection;\n  pendingSignal?: ExecSignal;\n  detached: boolean;\n  finished: boolean;\n  terminating: boolean;\n  stdinController: AbortController;\n}\n\n/**\n * Runs an exec over the tcp-proxy `/ws/exec` bridge: a non-PTY session with\n * separated stdout/stderr and a real exit code. A `shell`-scoped JWT (minted by\n * `generateShellToken`) authorizes the path.\n *\n * Durable sessions survive disconnects. Only detach closes a live session\n * without terminating it; timeout/abort send signals and await a remote exit.\n */\nexport function startExec(\n  context: ExecContext,\n  target: ExecTarget,\n  options: ExecOptions,\n): ExecHandle {\n  if (\n    typeof target !== \"string\" &&\n    (options.cwd !== undefined ||\n      options.ephemeral === true ||\n      (options.env && Object.keys(options.env).length > 0))\n  ) {\n    throw new RailwayError(\n      \"cwd/env/ephemeral apply only to fresh execs; a reattached session is already running.\",\n    );\n  }\n  if (\n    options.timeoutSec !== undefined &&\n    (!Number.isFinite(options.timeoutSec) || options.timeoutSec <= 0 ||\n      options.timeoutSec * 1000 > 2_147_483_647)\n  ) {\n    throw new TypeError(\n      \"`timeoutSec` must be a positive number of seconds that fits in a JavaScript timer.\",\n    );\n  }\n  if (\n    options.maxOutputBytes !== undefined &&\n    (!Number.isSafeInteger(options.maxOutputBytes) || options.maxOutputBytes < 0)\n  ) {\n    throw new TypeError(\"`maxOutputBytes` must be a non-negative safe integer.\");\n  }\n\n  let resolveSessionName!: (value: string) => void;\n  let rejectSessionName!: (reason?: unknown) => void;\n  const sessionName = new Promise<string>((resolve, reject) => {\n    resolveSessionName = resolve;\n    rejectSessionName = reject;\n  });\n\n  const control: ExecControl = {\n    detached: false,\n    finished: false,\n    terminating: false,\n    stdinController: new AbortController(),\n  };\n  let resolveConnection!: (connection: ExecWsConnection) => void;\n  let rejectConnection!: (error: unknown) => void;\n  const ready = new Promise<ExecWsConnection>((resolve, reject) => {\n    resolveConnection = resolve;\n    rejectConnection = reject;\n  });\n  ready.catch(() => {});\n  if (options.ephemeral) {\n    rejectSessionName(\n      new RailwayError(\"Ephemeral execs have no durable session name.\"),\n    );\n  }\n\n  const kill = async (signal: ExecSignal): Promise<boolean> => {\n    if (control.finished || control.detached) return false;\n    if (!control.connection) {\n      control.pendingSignal = signal; // delivered once the socket exists\n      return true;\n    }\n    try {\n      control.connection.signal(signal);\n      return true;\n    } catch {\n      return false;\n    }\n  };\n\n  const detach = async (): Promise<string> => {\n    if (options.ephemeral) {\n      throw new RailwayError(\"Ephemeral execs cannot be detached; omit `ephemeral` to run a durable command.\");\n    }\n    // Prove that this command is reattachable before closing its only transport.\n    const name = await sessionName;\n    if (control.terminating) {\n      throw new RailwayError(\"Cannot detach an exec while it is terminating.\");\n    }\n    control.detached = true;\n    control.stdinController.abort(\n      new RailwayError(\"Exec stdin is no longer writable.\"),\n    );\n    control.connection?.close();\n    return name;\n  };\n\n  let stdinEnded = !options.stdin;\n  let stdinTail = Promise.resolve();\n  const assertWritable = () => {\n    if (control.finished || control.detached || control.terminating) {\n      throw new RailwayError(\"Exec stdin is no longer writable.\");\n    }\n  };\n  const enqueueStdin = (\n    send: (connection: ExecWsConnection) => void | Promise<void>,\n  ) => {\n    stdinTail = stdinTail.then(async () => {\n      const connection = await ready;\n      assertWritable();\n      await send(connection);\n    });\n    stdinTail.catch(() => {});\n    return stdinTail;\n  };\n  const stdin: ExecStdin = {\n    async write(data) {\n      if (stdinEnded) {\n        throw new RailwayError(\n          \"Exec stdin is closed; pass stdin: true to enable writes.\",\n        );\n      }\n      assertWritable();\n      return enqueueStdin(connection => connection.writeStdin(\n        typeof data === \"string\" ? new TextEncoder().encode(data) : data,\n        control.stdinController.signal,\n      ));\n    },\n    async end() {\n      // Ending stdin of a command that already exited (e.g. `head -1`) is a no-op.\n      if (control.finished) return;\n      if (stdinEnded) return stdinTail;\n      stdinEnded = true;\n      return enqueueStdin(connection => connection.closeStdin());\n    },\n  };\n\n  const result = runExec(\n    context,\n    target,\n    options,\n    resolveSessionName,\n    rejectSessionName,\n    control,\n    resolveConnection,\n  ).then(\n    value => {\n      control.finished = true;\n      return value;\n    },\n    error => {\n      control.finished = true;\n      rejectConnection(error);\n      rejectSessionName(error);\n      throw error;\n    },\n  );\n\n  return constructHandle({ sessionName, result, kill, detach, stdin });\n}\n\nasync function runExec(\n  context: ExecContext,\n  target: ExecTarget,\n  options: ExecOptions,\n  onSessionName: (name: string) => void,\n  onNoSessionName: (reason: unknown) => void,\n  control: ExecControl,\n  onConnection: (connection: ExecWsConnection) => void,\n): Promise<ExecResult> {\n  options.signal?.throwIfAborted();\n  const init = execParameters(target, options);\n\n  // Never fabricate a durable id when the server did not assign one.\n  let sessionNameResolved = options.ephemeral === true;\n  const resolveSessionNameOnce = (name: string) => {\n    if (sessionNameResolved) return;\n    sessionNameResolved = true;\n    onSessionName(name);\n  };\n\n  const input: RailwayGenerateShellTokenMutationVariables[\"input\"] = {\n    environmentId: context.environmentId,\n    instanceId: context.sandboxId,\n    kind: \"sandbox\",\n    scope: \"shell\",\n  };\n  const mintShellToken = async () => {\n    let tokenData: RailwayGenerateShellTokenMutation;\n    try {\n      tokenData = await requestGraphQL<\n        RailwayGenerateShellTokenMutation,\n        RailwayGenerateShellTokenMutationVariables\n      >(context.config, RailwayGenerateShellTokenDocument, { input }, options.signal);\n    } catch (error) {\n      // A custom fetch may reject an aborted request with its own AbortError;\n      // callers are promised the signal's reason.\n      options.signal?.throwIfAborted();\n      throw error;\n    }\n    options.signal?.throwIfAborted();\n    return tokenData.generateShellToken;\n  };\n  const jwt = await mintShellToken();\n\n  // Unbounded unless the caller asks for a cap, as in 3.12. Long-running or\n  // streamed commands should pass `captureOutput: false` instead.\n  const maxBytes = options.maxOutputBytes ?? Number.POSITIVE_INFINITY;\n  const stdout = new OutputCapture(options.captureOutput !== false, maxBytes);\n  const stderr = new OutputCapture(options.captureOutput !== false, maxBytes);\n  let exitCode: number | null = null;\n  let timedOut = false;\n  let settled = false;\n  let timer: ReturnType<typeof setTimeout> | undefined;\n  let escalation: ReturnType<typeof setTimeout> | undefined;\n  let terminationDeadline: ReturnType<typeof setTimeout> | undefined;\n  let failure: { reason: unknown } | undefined;\n  let callbackFailed = false;\n  const stdoutDecoder = decoder();\n  const stderrDecoder = decoder();\n\n  let resolveResult!: (value: ExecResult) => void;\n  let rejectResult!: (reason: unknown) => void;\n  const done = new Promise<ExecResult>((resolve, reject) => {\n    resolveResult = resolve;\n    rejectResult = reject;\n  });\n  done.catch(() => {});\n\n  const settle = (outcome?: { error: unknown }) => {\n    if (settled) return;\n    settled = true;\n    control.finished = true;\n    control.stdinController.abort(\n      new RailwayError(\"Exec stdin connection is closed.\"),\n    );\n    // Durable sessions assign a name up front; if none arrived by the time the\n    // exec settles, the server can't do durable — fail `sessionName` rather than\n    // hand back a fabricated id that can never reattach.\n    if (!sessionNameResolved) {\n      sessionNameResolved = true;\n      onNoSessionName(\n        new RailwayError(\n          \"Server did not return a durable session for this exec.\",\n        ),\n      );\n    }\n    if (timer) clearTimeout(timer);\n    if (escalation) clearTimeout(escalation);\n    if (terminationDeadline) clearTimeout(terminationDeadline);\n    options.signal?.removeEventListener(\"abort\", onAbort);\n    try {\n      control.connection?.close();\n    } catch {\n      // ignore\n    }\n    if (outcome) rejectResult(outcome.error);\n    else if (failure) rejectResult(failure.reason);\n    else resolveResult({\n      exitCode,\n      stdout: stdout.finish(),\n      stderr: stderr.finish(),\n      truncated: stdout.truncated || stderr.truncated,\n      timedOut,\n    });\n  };\n\n  const signalRemote = (signal: ExecSignal) => {\n    if (!control.connection) {\n      control.pendingSignal = signal;\n      return;\n    }\n    try {\n      control.connection.signal(signal);\n    } catch (error) {\n      settle({ error });\n    }\n  };\n\n  const terminate = (reason?: { reason: unknown }) => {\n    if (settled || control.detached) return;\n    failure ??= reason;\n    if (control.terminating || exitCode !== null) return;\n    control.terminating = true;\n    if (timer) clearTimeout(timer);\n    control.stdinController.abort(\n      new RailwayError(\"Exec stdin is no longer writable.\"),\n    );\n    // Keep the socket open: closing it merely detaches a durable process.\n    context.config.log(`exec: sending TERM in sandbox=${context.sandboxId}`);\n    signalRemote(\"TERM\");\n    if (settled) return;\n    escalation = setTimeout(() => {\n      context.config.log(`exec: no exit ${KILL_GRACE_MS}ms after TERM; sending KILL in sandbox=${context.sandboxId}`);\n      signalRemote(\"KILL\");\n    }, KILL_GRACE_MS);\n    terminationDeadline = setTimeout(() => {\n      // A timeout resolves as it did in 3.12 (`timedOut: true`, `exitCode: null`\n      // = unknown); only an abort or a callback failure rejects.\n      if (timedOut && !failure) {\n        settle();\n        return;\n      }\n      settle({\n        error: new RailwayConnectionError({\n          message: `Exec termination was not confirmed within ${TERMINATION_CONFIRM_MS}ms; the command's outcome is unknown.`,\n          cause: failure?.reason,\n        }),\n      });\n    }, TERMINATION_CONFIRM_MS);\n  };\n  const onAbort = () => terminate({ reason: options.signal?.reason });\n\n  const emit = (callback: ExecOptions[\"onStdout\"], chunk: string) => {\n    if (!chunk || callbackFailed) return;\n    try {\n      callback?.(chunk);\n    } catch (error) {\n      // As in 3.12: reject right away. Settling closes the socket, which ends an\n      // ephemeral exec and leaves a durable one running (reattachable).\n      callbackFailed = true;\n      settle({ error });\n    }\n  };\n\n  const handlers: Parameters<typeof connectExecWs>[0][\"handlers\"] = {\n      onError: error => settle({\n        error: new ExecInterruptedError({\n          reason: error.message,\n          stdout: stdout.finish(),\n          stderr: stderr.finish(),\n          cause: failure?.reason ?? error,\n        }),\n      }),\n      onStdinError: error => terminate({ reason: error }),\n      onDurableSession: name => resolveSessionNameOnce(name),\n      onStdout: bytes => {\n        if (settled) return;\n        stdout.append(bytes);\n        emit(options.onStdout, stdoutDecoder.decode(bytes, { stream: true }));\n      },\n      onStderr: bytes => {\n        if (settled) return;\n        stderr.append(bytes);\n        emit(options.onStderr, stderrDecoder.decode(bytes, { stream: true }));\n      },\n      onExit: code => {\n        if (settled) return;\n        exitCode = code;\n        emit(options.onStdout, stdoutDecoder.decode());\n        emit(options.onStderr, stderrDecoder.decode());\n        settle();\n      },\n      onClose: info => {\n        if (control.detached) {\n          settle();\n          return;\n        }\n        settle({\n          error: new ExecInterruptedError({\n            closeCode: info.code,\n            reason: info.reason,\n            stdout: stdout.finish(),\n            stderr: stderr.finish(),\n            cause: failure?.reason,\n          }),\n        });\n      },\n  };\n  // A connection that fails before the command is sent left nothing running, so\n  // one reconnect on a fresh token is safe. Only transient failures (a dropped\n  // socket, a deploy) are retried; denials, routing failures, the readiness\n  // timeout, an old proxy, and aborts are not. One attempt, unlike the files\n  // client's three, because each one mints a token and may wait out routing.\n  const connectWithRetry = async () => {\n    try {\n      return await connectExecWs({ config: context.config, jwt, ...init, handlers });\n    } catch (error) {\n      if (!shouldRetryBeforeStart(error)) throw error;\n      options.signal?.throwIfAborted();\n      context.config.log(\n        `exec: ${(error as Error).message} Retrying once in sandbox=${context.sandboxId}`,\n      );\n      await abortableDelay(CONNECT_RETRY_DELAY_MS, options.signal);\n      return connectExecWs({\n        config: context.config,\n        jwt: await mintShellToken(),\n        ...init,\n        handlers,\n      });\n    }\n  };\n\n  let connection: ExecWsConnection;\n  try {\n    connection = await connectWithRetry();\n  } catch (error) {\n    if (!(error instanceof ExecControlUnsupportedError)) throw error;\n    // The proxy predates exec control and refused the bare hello, so nothing ran.\n    // Writable stdin and ephemeral execs depend on it; a plain exec does not.\n    const required = [options.stdin && \"stdin\", options.ephemeral && \"ephemeral\"].filter(Boolean);\n    if (required.length > 0) {\n      throw new ExecControlUnsupportedError({\n        message: `This tcp-proxy does not support exec control, which ${required.join(\" and \")} require${required.length > 1 ? \"\" : \"s\"}. No command was sent.`,\n        ...(error.closeCode !== undefined ? { closeCode: error.closeCode } : {}),\n        cause: error,\n      });\n    }\n    context.config.log(\n      `exec: tcp-proxy predates exec control; reconnecting in legacy mode in sandbox=${context.sandboxId}`,\n    );\n    // One legacy attempt; no further retry stacks on the fallback.\n    connection = await connectExecWs({\n      config: context.config,\n      jwt: await mintShellToken(),\n      ...init,\n      legacy: true,\n      handlers,\n    });\n  }\n  control.connection = connection;\n  onConnection(connection);\n\n  // Handlers can settle before the connect continuation runs.\n  if (settled || control.detached) {\n    connection.close();\n    return done;\n  }\n  if (control.pendingSignal) signalRemote(control.pendingSignal);\n  options.signal?.addEventListener(\"abort\", onAbort, { once: true });\n  if (options.signal?.aborted) onAbort();\n\n  try {\n    if (!options.stdin) connection.closeStdin();\n  } catch (error) {\n    settle({ error });\n  }\n\n  if (!settled && !control.terminating && options.timeoutSec !== undefined) {\n    timer = setTimeout(() => {\n      timedOut = true;\n      terminate();\n    }, options.timeoutSec * 1000);\n  }\n\n  return done;\n}\n\n/** Only fresh execs apply process settings; reattach uses the existing process. */\nfunction execParameters(target: ExecTarget, options: ExecOptions) {\n  return {\n    ...(options.signal ? { signal: options.signal } : {}),\n    ...(typeof target === \"string\"\n      ? {\n          command: loginShellCommand(target),\n          ...(options.ephemeral ? { ephemeral: true } : {}),\n          ...(options.cwd !== undefined ? { cwd: options.cwd } : {}),\n          ...(options.env ? { env: options.env } : {}),\n        }\n      : {\n          command: REATTACH_PLACEHOLDER_COMMAND,\n          sessionName: target.sessionName,\n          resumeFromLastRead: options.resumeFromLastRead ?? false,\n        }),\n  };\n}\n\n/** Retains a UTF-8 prefix without splitting the final character at the byte cap. */\nclass OutputCapture {\n  truncated = false;\n  private text = \"\";\n  private bytes = 0;\n  private readonly decoder = new TextDecoder();\n  private finished = false;\n\n  constructor(\n    private readonly enabled: boolean,\n    private readonly maxBytes: number,\n  ) {}\n\n  append(bytes: Uint8Array): void {\n    if (!this.enabled) return;\n    const available = Math.min(bytes.length, this.maxBytes - this.bytes);\n    this.text += this.decoder.decode(bytes.subarray(0, available), { stream: true });\n    this.bytes += available;\n    if (available < bytes.length) this.truncated = true;\n  }\n\n  finish(): string {\n    if (!this.finished) {\n      const tail = this.decoder.decode();\n      if (!this.truncated) this.text += tail;\n      this.finished = true;\n    }\n    return this.text;\n  }\n}\n\n\nfunction abortableDelay(ms: number, signal: AbortSignal | undefined): Promise<void> {\n  return new Promise((resolve, reject) => {\n    if (signal?.aborted) {\n      reject(signal.reason);\n      return;\n    }\n    const onAbort = () => {\n      clearTimeout(timer);\n      reject(signal?.reason);\n    };\n    const timer = setTimeout(() => {\n      signal?.removeEventListener(\"abort\", onAbort);\n      resolve();\n    }, ms);\n    signal?.addEventListener(\"abort\", onAbort, { once: true });\n  });\n}\n","import {\n  resolveWebSocketImpl,\n  type NormalizedRailwayClientConfig,\n  type WebSocketConstructor,\n} from \"./config.js\";\nimport { RailwayConnectionError } from \"./errors.js\";\nimport type { RailwayWsSocket } from \"./ws-socket.js\";\n\n/**\n * tcp-proxy `/ws/files` wire protocol: JSON text frames carry requests and\n * replies (`{type, id, data}`); file content rides binary frames with a\n * 12-byte big-endian header (request id u16, frame type u16, sequence u32,\n * payload length u32) followed by the payload.\n */\nconst BINARY_HEADER_BYTES = 12;\nconst FRAME_READ_END = 0x02;\nconst FRAME_WRITE_CHUNK = 0x03;\nconst FRAME_WRITE_END = 0x04;\n\n/** Subprotocol the tcp-proxy bridges expect alongside the JWT. */\nconst SHELL_SUBPROTOCOL = \"railway-shell\";\n\n/** Content chunk size the bridge streams and expects (its read limit is 256KB). */\nconst FILES_CHUNK_BYTES = 64 * 1024;\n\n/**\n * Pause sending upload chunks while the socket holds more than this. Bounds\n * memory on large pushes and keeps the client's keepalive replies from\n * queueing behind seconds of buffered data: the server drops sessions whose\n * replies lag more than a few seconds, so the send buffer must stay shallow\n * relative to drain rate even on a slow link.\n */\nconst SEND_HIGH_WATER_BYTES = 128 * 1024;\nconst SEND_POLL_MS = 10;\n\n/**\n * Abandon an operation when the server goes silent this long while a reply is\n * due. Matches the bridge's own 30s per-chunk idle timeout on uploads.\n */\nconst INACTIVITY_TIMEOUT_MS = 30_000;\n\n/**\n * While an upload waits on a slow source, send an empty content frame at\n * this cadence so the server's per-chunk idle timeout (30s) never fires;\n * sources may pause arbitrarily long between chunks.\n */\nconst WRITE_HEARTBEAT_MS = 10_000;\n\n/** A `{type: \"error\"}` reply from the server; message is the remote error text. */\nexport class FilesRemoteError extends Error {\n  /**\n   * For uploads: whether the failure happened at `write_start` (before any\n   * content was consumed, so a retry is safe) or while streaming.\n   */\n  readonly stage?: \"start\" | \"stream\";\n\n  constructor(message: string, stage?: \"start\" | \"stream\") {\n    super(message);\n    if (stage) this.stage = stage;\n  }\n}\n\nexport interface FilesWsConnection {\n  /** Whether the socket is still open and usable for another operation. */\n  isOpen(): boolean;\n  /** Send a request and resolve with the reply frame's `data` value. */\n  call(type: string, data: unknown): Promise<unknown>;\n  /**\n   * Send a `read` request and deliver content chunks as they stream in.\n   * Resolves once the final chunk has been delivered.\n   */\n  read(\n    data: Record<string, unknown>,\n    onChunk: (bytes: Uint8Array) => void,\n  ): Promise<void>;\n  /**\n   * Run the `write_start` handshake, stream `chunks` as content frames\n   * (re-chunked to the bridge's frame size, with send backpressure), and\n   * resolve once the server acknowledges the completed write.\n   */\n  write(\n    start: { path: string; mode: number; size: number },\n    chunks: AsyncIterable<Uint8Array>,\n  ): Promise<void>;\n  close(): void;\n}\n\ninterface PendingOp {\n  /** JSON reply frames addressed to this op (including `error`). */\n  onReply(type: string, data: unknown): void;\n  /** Binary content frames addressed to this op. */\n  onBinary?(frameType: number, payload: Uint8Array): void;\n  /** Settle with a transport failure (socket closed mid-operation). */\n  fail(error: Error): void;\n}\n\nconst sleep = (ms: number): Promise<void> =>\n  new Promise(resolve => setTimeout(resolve, ms));\n\n/**\n * Opens a tcp-proxy `/ws/files` session and resolves once the socket is live.\n * The JWT travels as the last `Sec-WebSocket-Protocol` value, per the bridge's\n * token-extraction contract; a `files:*`-scoped token authorizes the path.\n *\n * The bridge handles one request at a time per connection (uploads are modal\n * server-side), so callers run one operation at a time and may reuse the\n * connection for the next one while it is still open.\n */\nexport function connectFilesWs(args: {\n  config: NormalizedRailwayClientConfig;\n  jwt: string;\n  endpoint: string;\n}): Promise<FilesWsConnection> {\n  const { config, jwt, endpoint } = args;\n  const WS: WebSocketConstructor = resolveWebSocketImpl(config);\n\n  return new Promise<FilesWsConnection>((resolve, reject) => {\n    let opened = false;\n    let closed = false;\n    let nextId = 1;\n    const pending = new Map<string, PendingOp>();\n\n    const socket = new WS(endpoint, [\n      SHELL_SUBPROTOCOL,\n      jwt,\n    ]) as unknown as RailwayWsSocket;\n    socket.binaryType = \"arraybuffer\";\n\n    const failAll = (error: Error) => {\n      const ops = [...pending.values()];\n      pending.clear();\n      for (const op of ops) op.fail(error);\n    };\n\n    const closeSocket = () => {\n      closed = true;\n      try {\n        socket.close(1000, \"\");\n      } catch {\n        // ignore\n      }\n    };\n\n    /**\n     * Registers an op and returns its frame id plus an inactivity guard. The\n     * timer only runs while armed: replies are server-driven, but during an\n     * upload the server is intentionally silent, so the guard stays off until\n     * the final chunk is sent.\n     */\n    const register = (op: PendingOp) => {\n      // Binary frames echo the id as a u16, so wrap before 65536. Requests\n      // on a connection are sequential, so a wrapped id is never in flight\n      // alongside its predecessor.\n      const id = String(nextId);\n      nextId = nextId >= 65535 ? 1 : nextId + 1;\n      let timer: ReturnType<typeof setTimeout> | undefined;\n      const disarm = () => {\n        if (timer) clearTimeout(timer);\n        timer = undefined;\n      };\n      const arm = () => {\n        disarm();\n        timer = setTimeout(() => {\n          pending.delete(id);\n          op.fail(\n            new RailwayConnectionError({\n              message: `tcp-proxy files operation timed out after ${INACTIVITY_TIMEOUT_MS}ms of inactivity.`,\n            }),\n          );\n          closeSocket();\n        }, INACTIVITY_TIMEOUT_MS);\n      };\n      pending.set(id, op);\n      return { id, arm, disarm };\n    };\n\n    const sendJson = (type: string, id: string, data: unknown) => {\n      socket.send(JSON.stringify({ type, id, data }));\n    };\n\n    /**\n     * Waits until the socket's send buffer drains below the high-water mark.\n     * A buffer that stays full past the inactivity window means the peer\n     * stopped draining (e.g. a half-open connection that never fires close);\n     * fail it like any dead transport instead of stalling forever.\n     */\n    const awaitDrain = async () => {\n      const start = Date.now();\n      while (!closed && (socket.bufferedAmount ?? 0) > SEND_HIGH_WATER_BYTES) {\n        if (Date.now() - start > INACTIVITY_TIMEOUT_MS) {\n          closeSocket();\n          throw new RailwayConnectionError({\n            message: `tcp-proxy files send buffer stalled for ${INACTIVITY_TIMEOUT_MS}ms.`,\n          });\n        }\n        await sleep(SEND_POLL_MS);\n      }\n    };\n\n    const connection: FilesWsConnection = {\n      call(type, data) {\n        return new Promise((resolveCall, rejectCall) => {\n          const { id, arm, disarm } = register({\n            onReply: (replyType, replyData) => {\n              disarm();\n              pending.delete(id);\n              if (replyType === \"error\") {\n                rejectCall(new FilesRemoteError(errorMessage(replyData)));\n              } else {\n                resolveCall(replyData);\n              }\n            },\n            fail: error => {\n              disarm();\n              rejectCall(error);\n            },\n          });\n          sendJson(type, id, data);\n          arm();\n        });\n      },\n\n      read(data, onChunk) {\n        return new Promise<void>((resolveRead, rejectRead) => {\n          const { id, arm, disarm } = register({\n            onReply: (replyType, replyData) => {\n              // The bridge replies to reads only with binary frames or an\n              // error; any other JSON frame is ignored.\n              if (replyType !== \"error\") return;\n              disarm();\n              pending.delete(id);\n              rejectRead(new FilesRemoteError(errorMessage(replyData)));\n            },\n            onBinary: (frameType, payload) => {\n              arm();\n              try {\n                if (payload.length > 0) onChunk(payload);\n              } catch (error) {\n                disarm();\n                pending.delete(id);\n                rejectRead(error);\n                closeSocket();\n                return;\n              }\n              if (frameType === FRAME_READ_END) {\n                disarm();\n                pending.delete(id);\n                resolveRead();\n              }\n            },\n            fail: error => {\n              disarm();\n              rejectRead(error);\n            },\n          });\n          sendJson(\"read\", id, data);\n          arm();\n        });\n      },\n\n      async write(start, chunks) {\n        let settled = false;\n        let notifySettled!: () => void;\n        const settledSignal = new Promise<\"settled\">(resolve => {\n          notifySettled = () => resolve(\"settled\");\n        });\n        let settle!: { resolve(): void; reject(error: Error): void };\n        const done = new Promise<void>((resolveWrite, rejectWrite) => {\n          settle = {\n            resolve: () => {\n              settled = true;\n              notifySettled();\n              resolveWrite();\n            },\n            reject: error => {\n              settled = true;\n              notifySettled();\n              rejectWrite(error);\n            },\n          };\n        });\n        // Side tap: `done` is also rejected while the chunk loop is in\n        // flight; the loop re-awaits it, so a bare rejection must not\n        // surface as unhandled.\n        done.catch(() => {});\n\n        let ready!: { resolve(): void; reject(error: Error): void };\n        const writeReady = new Promise<void>((resolveReady, rejectReady) => {\n          ready = { resolve: resolveReady, reject: rejectReady };\n        });\n\n        let awaitingReady = true;\n        const { id, arm, disarm } = register({\n          onReply: (replyType, replyData) => {\n            if (replyType === \"error\") {\n              disarm();\n              pending.delete(id);\n              const error = new FilesRemoteError(\n                errorMessage(replyData),\n                awaitingReady ? \"start\" : \"stream\",\n              );\n              if (awaitingReady) ready.reject(error);\n              settle.reject(error);\n              return;\n            }\n            if (awaitingReady && replyType === \"write_ready\") {\n              awaitingReady = false;\n              disarm();\n              ready.resolve();\n              return;\n            }\n            if (replyType === \"ok\") {\n              disarm();\n              pending.delete(id);\n              if (awaitingReady) {\n                // The server acked a write whose content was never sent;\n                // resolving would claim success for a file it never received.\n                const error = new FilesRemoteError(\n                  \"protocol error: ok before write_ready\",\n                  \"start\",\n                );\n                ready.reject(error);\n                settle.reject(error);\n                return;\n              }\n              settle.resolve();\n            }\n          },\n          fail: error => {\n            disarm();\n            if (awaitingReady) ready.reject(error);\n            settle.reject(error);\n          },\n        });\n\n        sendJson(\"write_start\", id, start);\n        arm();\n        await writeReady;\n\n        const reqId = Number(id);\n        let seq = 0;\n        const sendContent = (payload: Uint8Array, last: boolean) => {\n          socket.send(\n            binaryFrame(\n              reqId,\n              last ? FRAME_WRITE_END : FRAME_WRITE_CHUNK,\n              seq++,\n              payload,\n            ),\n          );\n        };\n\n        // Keep the server's per-chunk idle timer fresh while the source is\n        // slow; zero-payload content frames are valid no-ops server-side.\n        const heartbeat = setInterval(() => {\n          if (settled || closed) return;\n          try {\n            sendContent(new Uint8Array(0), false);\n          } catch {\n            // socket is closing; the close handler settles the write\n          }\n        }, WRITE_HEARTBEAT_MS);\n\n        let completed: boolean;\n        try {\n          completed = await streamUpload({\n            iterator: rechunk(chunks)[Symbol.asyncIterator](),\n            settledSignal,\n            isSettled: () => settled,\n            awaitDrain,\n            send: sendContent,\n          });\n        } catch (error) {\n          // The caller's source (or a stalled transport) failed; free the\n          // server's file handle. The partial file remains on disk.\n          pending.delete(id);\n          disarm();\n          closeSocket();\n          throw error;\n        } finally {\n          clearInterval(heartbeat);\n        }\n        // The end marker is out; guard the wait for the server's ack.\n        if (completed) arm();\n        return done;\n      },\n\n      isOpen: () => opened && !closed,\n\n      close: closeSocket,\n    };\n\n    socket.onopen = () => {\n      opened = true;\n      if (socket.bufferedAmount === undefined) {\n        config.log(\n          \"files: webSocketImpl exposes no bufferedAmount; upload pacing is disabled\",\n        );\n      }\n      resolve(connection);\n    };\n\n    socket.onmessage = event => {\n      const { data } = event;\n      if (data instanceof ArrayBuffer) {\n        handleBinaryFrame(data);\n      } else if (typeof data === \"string\") {\n        handleTextFrame(data);\n      }\n    };\n\n    socket.onclose = event => {\n      closed = true;\n      if (!opened) {\n        reject(\n          new RailwayConnectionError({\n            message: `tcp-proxy files WebSocket closed before opening (code ${event.code}${\n              event.reason ? `: ${event.reason}` : \"\"\n            }).`,\n            closeCode: event.code,\n          }),\n        );\n        return;\n      }\n      failAll(\n        new RailwayConnectionError({\n          message: `tcp-proxy files WebSocket closed (code ${event.code}${\n            event.reason ? `: ${event.reason}` : \"\"\n          }).`,\n          closeCode: event.code,\n        }),\n      );\n    };\n\n    socket.onerror = event => {\n      if (opened) return;\n      reject(\n        new RailwayConnectionError({\n          message: \"tcp-proxy files WebSocket connection failed.\",\n          cause: event,\n        }),\n      );\n    };\n\n    function handleTextFrame(text: string): void {\n      let frame: { type?: string; id?: string; data?: unknown };\n      try {\n        frame = JSON.parse(text);\n      } catch {\n        return;\n      }\n      if (!frame.type || !frame.id) return;\n      pending.get(frame.id)?.onReply(frame.type, frame.data);\n    }\n\n    function handleBinaryFrame(buffer: ArrayBuffer): void {\n      if (buffer.byteLength < BINARY_HEADER_BYTES) return;\n      const view = new DataView(buffer);\n      const reqId = view.getUint16(0);\n      const frameType = view.getUint16(2);\n      const payloadLen = view.getUint32(8);\n      const available = buffer.byteLength - BINARY_HEADER_BYTES;\n      const payload = new Uint8Array(\n        buffer,\n        BINARY_HEADER_BYTES,\n        Math.min(payloadLen, available),\n      );\n      pending.get(String(reqId))?.onBinary?.(frameType, payload);\n    }\n  });\n}\n\nfunction errorMessage(data: unknown): string {\n  const message = (data as { message?: string } | undefined)?.message;\n  return message || \"unknown error\";\n}\n\nfunction binaryFrame(\n  reqId: number,\n  frameType: number,\n  seq: number,\n  payload: Uint8Array,\n): Uint8Array {\n  const frame = new Uint8Array(BINARY_HEADER_BYTES + payload.length);\n  const view = new DataView(frame.buffer);\n  view.setUint16(0, reqId);\n  view.setUint16(2, frameType);\n  view.setUint32(4, seq);\n  view.setUint32(8, payload.length);\n  frame.set(payload, BINARY_HEADER_BYTES);\n  return frame;\n}\n\n/** Splits arbitrary-size source chunks into bridge-size frames; drops empties. */\nasync function* rechunk(\n  chunks: AsyncIterable<Uint8Array>,\n): AsyncGenerator<Uint8Array> {\n  for await (const chunk of chunks) {\n    for (let offset = 0; offset < chunk.length; offset += FILES_CHUNK_BYTES) {\n      yield chunk.subarray(\n        offset,\n        Math.min(offset + FILES_CHUNK_BYTES, chunk.length),\n      );\n    }\n  }\n}\n\n/**\n * Streams upload content with one-chunk lookahead so the final frame can\n * carry the end marker. Each pull races the settled signal: when the server\n * fails the write (or the connection drops) mid-pull, the transfer must not\n * stay suspended on a source that never yields again. Returns true once the\n * end marker has been sent, false when the write settled early.\n */\nasync function streamUpload(args: {\n  iterator: AsyncIterator<Uint8Array>;\n  settledSignal: Promise<\"settled\">;\n  isSettled: () => boolean;\n  awaitDrain: () => Promise<void>;\n  send: (payload: Uint8Array, last: boolean) => void;\n}): Promise<boolean> {\n  const { iterator, isSettled, awaitDrain, send } = args;\n  let held: Uint8Array | undefined;\n  for (;;) {\n    const next = await nextChunkOrSettled(args);\n    if (next === null) return false;\n    if (next.done) break;\n    if (held) {\n      await awaitDrain();\n      if (isSettled()) return false;\n      send(held, false);\n    }\n    held = next.value;\n  }\n  if (isSettled()) return false;\n  await awaitDrain();\n  if (isSettled()) return false;\n  send(held ?? new Uint8Array(0), true);\n  return true;\n}\n\n/**\n * Pulls the next source chunk, racing the settled signal. When the write\n * settled while waiting, releases the source and returns null, so a source\n * that never yields again cannot suspend the transfer.\n */\nasync function nextChunkOrSettled(args: {\n  iterator: AsyncIterator<Uint8Array>;\n  settledSignal: Promise<\"settled\">;\n  isSettled: () => boolean;\n}): Promise<IteratorResult<Uint8Array> | null> {\n  const { iterator, settledSignal, isSettled } = args;\n  const nextChunk = iterator.next();\n  void Promise.resolve(nextChunk).catch(() => {}); // may settle after losing the race\n  const next = await Promise.race([nextChunk, settledSignal]);\n  if (next !== \"settled\" && !isSettled()) return next;\n  // Release the source (runs generator/stream cleanup).\n  void Promise.resolve(iterator.return?.(undefined)).catch(() => {});\n  return null;\n}\n","import { RailwayConnectionError } from \"../core/errors.js\";\nimport {\n  FilesRemoteError,\n  type FilesWsConnection,\n} from \"../core/files-ws-client.js\";\nimport type { FileReadOptions, FileWriteData, SandboxFileEntry } from \"./types.js\";\n\n/**\n * Transfer engine for `sandbox.files`: segmented, resumable downloads and\n * replayable upload sources. The policies here compensate for two server\n * behaviors (see AGENTS.md): sessions are killed when keepalive replies\n * stall behind a long-streaming read request, and dropped sessions are a\n * routine failure mode for multi-second transfers. Reads are therefore\n * issued as bounded range segments and resumed by byte position, and writes\n * retry when their source can produce the content again.\n */\n\n/**\n * Reads are issued as bounded range requests rather than one whole-file\n * read: the server ends a session whose keepalive replies stall behind a\n * long-streaming read request (observed at ~15s), so no single request may\n * run that long. Segment size adapts toward the target duration, so faster\n * links use fewer round trips.\n */\nconst READ_SEGMENT_TARGET_MS = 5_000;\nconst READ_SEGMENT_MIN_BYTES = 256 * 1024;\nconst READ_SEGMENT_MAX_BYTES = 32 * 1024 * 1024;\nconst READ_SEGMENT_INITIAL_BYTES = 2 * 1024 * 1024;\n\n/**\n * Dropped sessions resume (reads) or restart (replayable writes) after a\n * short delay. The retry budget resets whenever bytes flow.\n */\nconst TRANSFER_MAX_RETRIES = 3;\nconst TRANSFER_RETRY_DELAY_MS = 300;\n\nconst sleep = (ms: number): Promise<void> =>\n  new Promise(resolve => setTimeout(resolve, ms));\n\n/** The server reports a missing path with an `os.ErrNotExist`-style message. */\nexport function isNotFound(message: string): boolean {\n  return /file does not exist|no such file|not found/i.test(message);\n}\n\n/**\n * A transport-level transfer failure: the session dropped, or the server\n * reported losing its own stream to the sandbox (\"connection lost\"). The WS\n * session is healthy in the latter case, but the operation failed the same\n * way.\n */\nfunction isTransientTransfer(error: unknown): boolean {\n  return (\n    error instanceof RailwayConnectionError ||\n    (error instanceof FilesRemoteError && /connection lost/i.test(error.message))\n  );\n}\n\n/**\n * A dropped session is retriable when the source can still produce the full\n * content: it is replayable, or it was never pulled (a failure during the\n * write_start handshake consumes nothing, so even one-shot streams are\n * intact). The file is truncated again by the next write_start.\n */\nexport function canRetryWrite(\n  error: unknown,\n  source: UploadSource,\n  retries: number,\n): boolean {\n  return (\n    isTransientTransfer(error) &&\n    (source.replayable || !source.consumed()) &&\n    retries <= TRANSFER_MAX_RETRIES\n  );\n}\n\nexport async function retryDelay(): Promise<void> {\n  await sleep(TRANSFER_RETRY_DELAY_MS);\n}\n\n/** An in-flight download; `abort()` stops it and resolves `done`. */\nexport interface PullHandle {\n  done: Promise<void>;\n  abort(): void;\n}\n\n/** Byte range under transfer; `position` advances as chunks arrive. */\ninterface PullRange {\n  position: number;\n  /** Exclusive end; `Infinity` reads until a short segment signals EOF. */\n  end: number;\n}\n\n/**\n * Drives a complete download: adaptive range segments, with transparent\n * resume on a fresh connection when one drops (the byte position is tracked\n * client-side). Only `fromEnd` needs the file size (one stat); everything\n * else reads ranges until a short segment signals EOF, so missing files and\n * directories surface the server's error from the first read request.\n */\nexport function startPull(args: {\n  connect: () => Promise<FilesWsConnection>;\n  log: (message: string) => void;\n  path: string;\n  options: FileReadOptions;\n  onChunk: (bytes: Uint8Array) => void;\n  /** Resolves when the consumer has room for the next segment. */\n  waitForCapacity?: () => Promise<void>;\n}): PullHandle {\n  const { connect, log, path, options, onChunk } = args;\n  let connection: FilesWsConnection | undefined;\n  let aborted = false;\n\n  const done = (async () => {\n    let range: PullRange | undefined;\n    let retries = 0;\n    for (;;) {\n      if (aborted) return; // cancelled during a retry backoff\n      try {\n        connection = await connect();\n        if (aborted) return;\n        range ??= await resolveRange(connection, path, options);\n        await pullSegments({\n          connection,\n          path,\n          range,\n          isAborted: () => aborted,\n          onChunk: bytes => {\n            retries = 0; // progress restores the retry budget\n            onChunk(bytes);\n          },\n          ...(args.waitForCapacity && { waitForCapacity: args.waitForCapacity }),\n        });\n        return;\n      } catch (error) {\n        if (aborted) return;\n        if (!canResumePull(error, ++retries)) throw error;\n        log(`files read ${path} resuming after connection loss`);\n        await retryDelay();\n      } finally {\n        connection?.close();\n        connection = undefined;\n      }\n    }\n  })();\n\n  return {\n    done,\n    abort: () => {\n      aborted = true;\n      connection?.close();\n    },\n  };\n}\n\n/** Every read is ranged, so any transport-level failure may resume. */\nfunction canResumePull(error: unknown, retries: number): boolean {\n  return isTransientTransfer(error) && retries <= TRANSFER_MAX_RETRIES;\n}\n\n/** Resolves read options to a byte range; stats only for tail reads. */\nasync function resolveRange(\n  connection: FilesWsConnection,\n  path: string,\n  options: FileReadOptions,\n): Promise<PullRange> {\n  if (options.fromEnd) {\n    // `length` is validated upstream to be present with `fromEnd`.\n    const info = (await connection.call(\"stat\", { path })) as SandboxFileEntry;\n    return { position: Math.max(0, info.size - options.length!), end: info.size };\n  }\n  const start = options.offset ?? 0;\n  return {\n    position: start,\n    end: options.length !== undefined ? start + options.length : Infinity,\n  };\n}\n\n/**\n * Streams `[range.position, range.end)` as adaptive bounded segments,\n * advancing `range.position` as bytes arrive so a caller can resume after a\n * drop. A segment that comes back short is EOF.\n */\nasync function pullSegments(args: {\n  connection: FilesWsConnection;\n  path: string;\n  range: PullRange;\n  isAborted: () => boolean;\n  onChunk: (bytes: Uint8Array) => void;\n  waitForCapacity?: () => Promise<void>;\n}): Promise<void> {\n  const { connection, path, range, isAborted, onChunk } = args;\n  let segmentBytes = READ_SEGMENT_INITIAL_BYTES;\n  while (range.position < range.end) {\n    await args.waitForCapacity?.();\n    if (isAborted()) return;\n    const length = Math.min(segmentBytes, range.end - range.position);\n    const started = Date.now();\n    let received = 0;\n    await connection.read({ path, offset: range.position, length }, bytes => {\n      received += bytes.length;\n      range.position += bytes.length;\n      onChunk(bytes);\n    });\n    if (received < length) return; // EOF before the requested range\n    segmentBytes = nextSegmentSize(segmentBytes, Date.now() - started);\n  }\n}\n\n/**\n * Scales the segment size toward the per-segment duration target. Growth is\n * capped at 4x per step so one unusually fast segment can't jump straight to\n * a size that takes far longer than the target if bandwidth drops.\n */\nfunction nextSegmentSize(current: number, elapsedMs: number): number {\n  const scaled = Math.round(\n    (current * READ_SEGMENT_TARGET_MS) / Math.max(elapsedMs, 1),\n  );\n  return Math.min(\n    READ_SEGMENT_MAX_BYTES,\n    current * 4,\n    Math.max(READ_SEGMENT_MIN_BYTES, scaled),\n  );\n}\n\n/** A normalized upload source; `size` 0 means unknown. */\nexport interface UploadSource {\n  chunks: () => AsyncIterable<Uint8Array>;\n  size: number;\n  /** Whether `chunks()` can produce the content again (enables retry). */\n  replayable: boolean;\n  /** Whether the source has ever been pulled (one-shot sources can't replay after this). */\n  consumed: () => boolean;\n}\n\n/**\n * Normalizes accepted write inputs to a chunk-source factory and tracks\n * whether the source was ever pulled: a one-shot source that was never\n * started is still safe to retry.\n */\nexport function uploadSource(data: FileWriteData): UploadSource {\n  const source = normalizeSource(data);\n  let consumed = false;\n  return {\n    ...source,\n    chunks: () =>\n      markOnFirstPull(source.chunks(), () => {\n        consumed = true;\n      }),\n    consumed: () => consumed,\n  };\n}\n\n/**\n * Wraps an iterable so `mark` fires when `next()` is first *called*, not when\n * it resolves: a one-shot generator loses the in-flight value to any replay\n * the moment it is pulled.\n */\nfunction markOnFirstPull(\n  iterable: AsyncIterable<Uint8Array>,\n  mark: () => void,\n): AsyncIterable<Uint8Array> {\n  return {\n    [Symbol.asyncIterator]() {\n      const inner = iterable[Symbol.asyncIterator]();\n      const iterator: AsyncIterator<Uint8Array> = {\n        next: (...args) => {\n          mark();\n          return inner.next(...args);\n        },\n      };\n      if (inner.return) iterator.return = inner.return.bind(inner);\n      if (inner.throw) iterator.throw = inner.throw.bind(inner);\n      return iterator;\n    },\n  };\n}\n\ninterface NormalizedSource {\n  chunks: () => AsyncIterable<Uint8Array>;\n  size: number;\n  replayable: boolean;\n}\n\nfunction normalizeSource(data: FileWriteData): NormalizedSource {\n  if (typeof data === \"string\") {\n    const bytes = new TextEncoder().encode(data);\n    return { chunks: () => single(bytes), size: bytes.length, replayable: true };\n  }\n  if (data instanceof Uint8Array) {\n    return { chunks: () => single(data), size: data.length, replayable: true };\n  }\n  if (data instanceof ArrayBuffer) {\n    const bytes = new Uint8Array(data);\n    return { chunks: () => single(bytes), size: bytes.length, replayable: true };\n  }\n  const streaming = streamingSource(data);\n  if (streaming) return streaming;\n  throw new TypeError(\n    \"Unsupported write data: pass a string, Uint8Array, ArrayBuffer, Blob, \" +\n      \"ReadableStream, AsyncIterable of Uint8Array, or a function returning \" +\n      \"a stream or iterable.\",\n  );\n}\n\n/** The streaming-shaped write inputs; undefined when `data` is none of them. */\nfunction streamingSource(data: FileWriteData): NormalizedSource | undefined {\n  if (typeof Blob !== \"undefined\" && data instanceof Blob) {\n    return {\n      chunks: () => streamChunks(data.stream()),\n      size: data.size,\n      replayable: true,\n    };\n  }\n  if (typeof ReadableStream !== \"undefined\" && data instanceof ReadableStream) {\n    const chunks = streamChunks(data);\n    return { chunks: () => chunks, size: 0, replayable: false };\n  }\n  if (isAsyncIterable(data)) {\n    return { chunks: () => data, size: 0, replayable: false };\n  }\n  if (typeof data === \"function\") {\n    // A factory produces fresh content per call, so the write may retry.\n    return { chunks: () => producedChunks(data()), size: 0, replayable: true };\n  }\n  return undefined;\n}\n\nasync function* single(bytes: Uint8Array): AsyncGenerator<Uint8Array> {\n  if (bytes.length > 0) yield bytes;\n}\n\nasync function* streamChunks(\n  stream: ReadableStream<Uint8Array>,\n): AsyncGenerator<Uint8Array> {\n  const reader = stream.getReader();\n  try {\n    for (;;) {\n      const { done, value } = await reader.read();\n      if (done) return;\n      if (value && value.length > 0) yield value;\n    }\n  } finally {\n    // Covers abnormal exits too (transfer failure): release the source.\n    try {\n      await reader.cancel();\n    } catch {\n      // source may already be errored\n    }\n    reader.releaseLock();\n  }\n}\n\nfunction producedChunks(\n  produced: ReadableStream<Uint8Array> | AsyncIterable<Uint8Array>,\n): AsyncIterable<Uint8Array> {\n  return produced instanceof ReadableStream ? streamChunks(produced) : produced;\n}\n\nfunction isAsyncIterable(value: unknown): value is AsyncIterable<Uint8Array> {\n  return (\n    typeof value === \"object\" &&\n    value !== null &&\n    Symbol.asyncIterator in value &&\n    typeof (value as AsyncIterable<Uint8Array>)[Symbol.asyncIterator] ===\n      \"function\"\n  );\n}\n","import {\n  deriveFilesWsEndpoint,\n  type NormalizedRailwayClientConfig,\n} from \"../core/config.js\";\nimport {\n  connectFilesWs,\n  FilesRemoteError,\n  type FilesWsConnection,\n} from \"../core/files-ws-client.js\";\nimport { requestGraphQL } from \"../core/graphql-client.js\";\nimport {\n  RailwayGenerateShellTokenDocument,\n  type RailwayGenerateShellTokenMutation,\n  type RailwayGenerateShellTokenMutationVariables,\n} from \"../generated/graphql.js\";\nimport { SandboxFileNotFoundError, SandboxFilesError } from \"./errors.js\";\nimport { startExec } from \"./exec.js\";\nimport {\n  canRetryWrite,\n  isNotFound,\n  retryDelay,\n  startPull,\n  uploadSource,\n  type PullHandle,\n  type UploadSource,\n} from \"./files-transfer.js\";\nimport type {\n  FileReadFormat,\n  FileReadOptions,\n  FileWriteData,\n  FileWriteOptions,\n  SandboxFileEntry,\n} from \"./types.js\";\n\nexport interface FilesContext {\n  config: NormalizedRailwayClientConfig;\n  environmentId: string;\n  sandboxId: string;\n}\n\n/** Read scope for inspection ops; the rw scope for anything that mutates. */\ntype FilesScope = \"files:read\" | \"files:read files:write\";\n\n/** Module-internal access to SandboxFiles' private constructor. */\nlet constructFiles: (context: FilesContext) => SandboxFiles;\n\n/**\n * How long an idle pooled file-session connection lingers before closing.\n * Long enough to carry a burst of sequential operations on one connection\n * (the platform rate-limits new connections per client), short enough that\n * a script's process exit is barely delayed by an open socket.\n */\nconst FILES_IDLE_CLOSE_MS = 2_000;\n\n/** Idle connections kept beyond this are closed on release instead of pooled. */\nconst FILES_MAX_IDLE_CONNECTIONS = 4;\n\n/** A pooled files session: the raw connection plus the scope its token holds. */\ninterface PooledFilesConnection {\n  connection: FilesWsConnection;\n  scope: FilesScope;\n  idleTimer?: ReturnType<typeof setTimeout>;\n}\n\n/**\n * File operations on a live sandbox, exposed as `sandbox.files`. Operations\n * run one at a time per file-session connection (the server serves one\n * request per connection), but connections are pooled: a finished\n * operation's connection lingers briefly and the next operation reuses it\n * instead of minting a new token and dialing again. Concurrent operations\n * still run independently on their own connections.\n *\n * Paths are absolute within the sandbox filesystem. Content streams in\n * 64KB frames both ways: pushes accept streams without buffering, and\n * `read(path, { format: \"stream\" })` holds at most one transfer segment in\n * memory, so files larger than memory transfer safely.\n */\nexport class SandboxFiles {\n  readonly #context: FilesContext;\n  readonly #idleConnections: PooledFilesConnection[] = [];\n\n  /** Constructed by `Sandbox#files`; not constructible from outside the SDK. */\n  private constructor(context: FilesContext) {\n    this.#context = context;\n  }\n\n  /** Read a file as text (UTF-8). */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  read(\n    path: string,\n    options?: FileReadOptions & { format?: \"text\" },\n  ): Promise<string>;\n  /** Read a file as raw bytes. */\n  read(\n    path: string,\n    options: FileReadOptions & { format: \"bytes\" },\n  ): Promise<Uint8Array>;\n  /**\n   * Read a file as a stream of byte chunks. Memory stays bounded regardless\n   * of file size: a consumer slower than the network holds back the transfer\n   * rather than buffering it. Cancelling the stream aborts the transfer.\n   * Errors after the stream is returned (including a missing file) surface\n   * through the stream.\n   */\n  read(\n    path: string,\n    options: FileReadOptions & { format: \"stream\" },\n  ): Promise<ReadableStream<Uint8Array>>;\n  async read(\n    path: string,\n    options: FileReadOptions & { format?: FileReadFormat } = {},\n  ): Promise<string | Uint8Array | ReadableStream<Uint8Array>> {\n    const target = validatePath(path);\n    validateReadOptions(options);\n    this.#log(`files read ${target} format=${options.format ?? \"text\"}`);\n\n    if (options.format === \"stream\") {\n      return this.#readAsStream(target, options);\n    }\n\n    const chunks: Uint8Array[] = [];\n    try {\n      await this.#startPull(target, options, bytes => chunks.push(bytes)).done;\n    } catch (error) {\n      throw this.#wrapError(\"read\", target, error);\n    }\n    const bytes = concat(chunks);\n    this.#log(`files read ${target} done (${bytes.length} bytes)`);\n    return options.format === \"bytes\" ? bytes : new TextDecoder().decode(bytes);\n  }\n\n  /**\n   * Write a file, creating it (and truncating any existing content). Missing\n   * parent directories are created automatically. Strings, bytes, blobs, and\n   * factory sources upload with retry if the session drops mid-transfer;\n   * bare streams and async iterables upload unbuffered but are one-shot, so\n   * a session dropped mid-stream surfaces as `RailwayConnectionError` (and a\n   * partial file may remain at `path`).\n   *\n   * Files are created `0644`; pass `mode` to set permissions (applied right\n   * after the upload completes).\n   */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  async write(\n    path: string,\n    data: FileWriteData,\n    options: FileWriteOptions = {},\n  ): Promise<void> {\n    const target = validatePath(path);\n    const mode = validateMode(options.mode);\n    const source = uploadSource(data);\n    // The server does not apply the protocol's mode yet; it is still sent so\n    // existing uploads pick it up natively once it does. Until then `mode`\n    // is applied with a chmod over the exec primitive after the upload.\n    const start = { path: target, mode: mode ?? 0, size: source.size };\n    this.#log(\n      `files write ${target} size=${source.size > 0 ? source.size : \"stream\"}`,\n    );\n\n    let retries = 0;\n    for (;;) {\n      try {\n        await this.#writeOnce(target, start, source);\n        break;\n      } catch (error) {\n        if (!canRetryWrite(error, source, ++retries)) {\n          throw this.#wrapError(\"write\", target, error);\n        }\n        this.#log(`files write ${target} retrying after connection loss`);\n        await retryDelay();\n      }\n    }\n\n    if (mode !== undefined) await this.#applyMode(target, mode);\n    this.#log(`files write ${target} done`);\n  }\n\n  /** List a directory (entries carry name, size, mode, and modify time). */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  async list(path: string): Promise<SandboxFileEntry[]> {\n    const target = validatePath(path);\n    const data = await this.#call(\"ls\", target, { path: target });\n    return (data as { entries?: SandboxFileEntry[] } | undefined)?.entries ?? [];\n  }\n\n  /** Stat a path (follows symlinks). Throws `SandboxFileNotFoundError` if absent. */\n  async stat(path: string): Promise<SandboxFileEntry> {\n    const target = validatePath(path);\n    const data = await this.#call(\"stat\", target, { path: target });\n    return data as SandboxFileEntry;\n  }\n\n  /** Whether a path exists (file or directory). */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  async exists(path: string): Promise<boolean> {\n    try {\n      await this.stat(path);\n      return true;\n    } catch (error) {\n      if (error instanceof SandboxFileNotFoundError) return false;\n      throw error;\n    }\n  }\n\n  /** Create a directory, including missing parents (like `mkdir -p`). */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  async mkdir(path: string): Promise<void> {\n    const target = validatePath(path);\n    await this.#call(\"mkdir\", target, { path: target });\n  }\n\n  /**\n   * Remove a file or empty directory. For recursive deletes use\n   * `sandbox.exec(\"rm -rf ...\")`.\n   */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  async remove(path: string): Promise<void> {\n    const target = validatePath(path);\n    await this.#call(\"rm\", target, { path: target });\n  }\n\n  /** Rename (move) a file or directory within the sandbox. */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  async rename(oldPath: string, newPath: string): Promise<void> {\n    const from = validatePath(oldPath);\n    const to = validatePath(newPath);\n    await this.#call(\"rename\", from, { old: from, new: to });\n  }\n\n  /** One upload attempt on its own connection, creating missing parents. */\n  async #writeOnce(\n    target: string,\n    start: { path: string; mode: number; size: number },\n    source: UploadSource,\n  ): Promise<void> {\n    const connection = await this.#connect(\"files:read files:write\");\n    try {\n      try {\n        await connection.write(start, source.chunks());\n      } catch (error) {\n        const parent = parentDir(target);\n        if (!isMissingParent(error) || !parent) throw error;\n        // The parent directory does not exist; create it and retry once.\n        // A `write_start` failure consumes no content, so the source is\n        // still intact.\n        await connection.call(\"mkdir\", { path: parent });\n        await connection.write(start, source.chunks());\n      }\n    } finally {\n      connection.close();\n    }\n  }\n\n  /** Sets `path`'s permissions with a chmod run through the exec primitive. */\n  async #applyMode(path: string, mode: number): Promise<void> {\n    const octal = mode.toString(8).padStart(3, \"0\");\n    const result = await startExec(\n      this.#context,\n      `chmod ${octal} -- ${shellQuote(path)}`,\n      { timeoutSec: 30 },\n    );\n    if (result.exitCode !== 0) {\n      throw new SandboxFilesError({\n        operation: \"write\",\n        path,\n        message:\n          result.stderr.trim() ||\n          `chmod ${octal} exited with code ${result.exitCode}`,\n      });\n    }\n  }\n\n  /** One-shot request/reply op on its own connection, with error mapping. */\n  async #call(type: string, path: string, payload: unknown): Promise<unknown> {\n    this.#log(`files ${type} ${path}`);\n    const scope: FilesScope =\n      type === \"ls\" || type === \"stat\"\n        ? \"files:read\"\n        : \"files:read files:write\";\n    const connection = await this.#connect(scope);\n    try {\n      return await connection.call(type, payload);\n    } catch (error) {\n      throw this.#wrapError(type, path, error);\n    } finally {\n      connection.close();\n    }\n  }\n\n  async #readAsStream(\n    path: string,\n    options: FileReadOptions,\n  ): Promise<ReadableStream<Uint8Array>> {\n    let controller!: ReadableStreamDefaultController<Uint8Array>;\n    let pull!: PullHandle;\n    let notifyPull: (() => void) | undefined;\n    const stream = new ReadableStream<Uint8Array>({\n      start: c => {\n        controller = c;\n      },\n      pull: () => notifyPull?.(),\n      cancel: () => {\n        pull.abort();\n        notifyPull?.(); // unblock a capacity wait so the pull loop can exit\n      },\n    });\n\n    // Consumer backpressure: the next segment isn't requested until the\n    // stream's queue has room, so a slow consumer holds at most one segment\n    // in memory rather than the whole file.\n    const waitForCapacity = (): Promise<void> => {\n      if ((controller.desiredSize ?? 0) > 0) return Promise.resolve();\n      return new Promise(resolve => {\n        notifyPull = () => {\n          notifyPull = undefined;\n          resolve();\n        };\n      });\n    };\n\n    pull = this.#startPull(\n      path,\n      options,\n      bytes => controller.enqueue(bytes),\n      waitForCapacity,\n    );\n    pull.done\n      .then(() => {\n        try {\n          controller.close();\n        } catch {\n          // already cancelled\n        }\n      })\n      .catch((error: unknown) => {\n        try {\n          controller.error(this.#wrapError(\"read\", path, error));\n        } catch {\n          // already cancelled\n        }\n      });\n    return stream;\n  }\n\n  #startPull(\n    path: string,\n    options: FileReadOptions,\n    onChunk: (bytes: Uint8Array) => void,\n    waitForCapacity?: () => Promise<void>,\n  ): PullHandle {\n    return startPull({\n      connect: () => this.#connect(\"files:read\"),\n      log: message => this.#log(message),\n      path,\n      options,\n      onChunk,\n      ...(waitForCapacity && { waitForCapacity }),\n    });\n  }\n\n  /**\n   * Leases a `/ws/files` session: an idle pooled connection whose token\n   * covers `scope` when one exists, otherwise a fresh dial. The returned\n   * connection's `close()` releases it back to the pool (dead or surplus\n   * connections are really closed), so callers manage it exactly like an\n   * owned connection.\n   */\n  async #connect(scope: FilesScope): Promise<FilesWsConnection> {\n    for (;;) {\n      // An rw-scoped token covers read-only operations too.\n      const index = this.#idleConnections.findIndex(\n        entry =>\n          entry.scope === scope || entry.scope === \"files:read files:write\",\n      );\n      if (index === -1) break;\n      const [entry] = this.#idleConnections.splice(index, 1);\n      if (!entry) break;\n      if (entry.idleTimer) clearTimeout(entry.idleTimer);\n      if (entry.connection.isOpen()) return this.#lease(entry);\n      entry.connection.close();\n    }\n    return this.#lease({ connection: await this.#dial(scope), scope });\n  }\n\n  /**\n   * Wraps a pooled entry so `close()` releases instead of destroying. Only a\n   * connection whose every operation succeeded is worth pooling: a failure\n   * may have poisoned the server's stream to the sandbox even when the\n   * socket itself stays open (reported as \"connection lost\"), and retry\n   * paths count on getting a genuinely fresh session.\n   */\n  #lease(entry: PooledFilesConnection): FilesWsConnection {\n    let released = false;\n    let failed = false;\n    const guard = <A extends unknown[], R>(\n      operation: (...args: A) => Promise<R>,\n    ): ((...args: A) => Promise<R>) => {\n      return async (...args) => {\n        try {\n          return await operation(...args);\n        } catch (error) {\n          failed = true;\n          throw error;\n        }\n      };\n    };\n    return {\n      isOpen: () => entry.connection.isOpen(),\n      call: guard((type, data) => entry.connection.call(type, data)),\n      read: guard((data, onChunk) => entry.connection.read(data, onChunk)),\n      write: guard((start, chunks) => entry.connection.write(start, chunks)),\n      close: () => {\n        if (released) return;\n        released = true;\n        if (failed) {\n          entry.connection.close();\n          return;\n        }\n        this.#release(entry);\n      },\n    };\n  }\n\n  #release(entry: PooledFilesConnection): void {\n    if (\n      !entry.connection.isOpen() ||\n      this.#idleConnections.length >= FILES_MAX_IDLE_CONNECTIONS\n    ) {\n      entry.connection.close();\n      return;\n    }\n    const timer = setTimeout(() => {\n      const index = this.#idleConnections.indexOf(entry);\n      if (index !== -1) this.#idleConnections.splice(index, 1);\n      entry.connection.close();\n    }, FILES_IDLE_CLOSE_MS);\n    // Node timers hold the event loop open; unref so the linger itself never\n    // delays process exit (the socket still lingers at most the idle window).\n    (timer as { unref?: () => void }).unref?.();\n    entry.idleTimer = timer;\n    this.#idleConnections.push(entry);\n  }\n\n  /** Mints a files-scoped token and opens a `/ws/files` session with it. */\n  async #dial(scope: FilesScope): Promise<FilesWsConnection> {\n    const { config, environmentId, sandboxId } = this.#context;\n    const input: RailwayGenerateShellTokenMutationVariables[\"input\"] = {\n      environmentId,\n      instanceId: sandboxId,\n      kind: \"sandbox\",\n      scope,\n    };\n    const tokenData = await requestGraphQL<\n      RailwayGenerateShellTokenMutation,\n      RailwayGenerateShellTokenMutationVariables\n    >(config, RailwayGenerateShellTokenDocument, { input });\n    return connectFilesWs({\n      config,\n      jwt: tokenData.generateShellToken,\n      endpoint: deriveFilesWsEndpoint(config.tcpProxyWsEndpoint),\n    });\n  }\n\n  #wrapError(operation: string, path: string, error: unknown): unknown {\n    if (error instanceof FilesRemoteError) {\n      const args = { operation, path, message: error.message };\n      return isNotFound(error.message)\n        ? new SandboxFileNotFoundError(args)\n        : new SandboxFilesError(args);\n    }\n    return error;\n  }\n\n  #log(message: string): void {\n    this.#context.config.log(`${message} sandbox=${this.#context.sandboxId}`);\n  }\n\n  static {\n    constructFiles = context => new SandboxFiles(context);\n  }\n}\n\nexport function createSandboxFiles(context: FilesContext): SandboxFiles {\n  return constructFiles(context);\n}\n\nfunction validatePath(path: string): string {\n  if (typeof path !== \"string\" || path.trim() === \"\") {\n    throw new TypeError(\"Path must be a non-empty string.\");\n  }\n  return path;\n}\n\nfunction validateReadOptions(options: FileReadOptions): void {\n  if (options.fromEnd && options.offset !== undefined) {\n    throw new TypeError(\"`offset` and `fromEnd` are mutually exclusive.\");\n  }\n  if (options.fromEnd && options.length === undefined) {\n    throw new TypeError(\"`fromEnd` requires `length` (the tail size to read).\");\n  }\n  requireIntegerAtLeast(\"offset\", options.offset, 0);\n  requireIntegerAtLeast(\"length\", options.length, 1);\n}\n\nfunction requireIntegerAtLeast(\n  name: string,\n  value: number | undefined,\n  min: number,\n): void {\n  if (value === undefined) return;\n  if (!Number.isInteger(value) || value < min) {\n    throw new TypeError(`\\`${name}\\` must be an integer >= ${min}.`);\n  }\n}\n\nfunction validateMode(mode: number | undefined): number | undefined {\n  if (mode === undefined) return undefined;\n  if (!Number.isInteger(mode) || mode < 0 || mode > 0o7777) {\n    throw new TypeError(\"`mode` must be POSIX permission bits (e.g. 0o755).\");\n  }\n  return mode;\n}\n\n/** Single-quotes a path for the in-sandbox shell. */\nfunction shellQuote(path: string): string {\n  return `'${path.replaceAll(\"'\", `'\\\\''`)}'`;\n}\n\n/** A `write_start` rejection caused by a missing parent directory. */\nfunction isMissingParent(error: unknown): boolean {\n  return (\n    error instanceof FilesRemoteError &&\n    error.stage === \"start\" &&\n    isNotFound(error.message)\n  );\n}\n\n/** POSIX dirname, or undefined for root-level or relative paths. */\nfunction parentDir(path: string): string | undefined {\n  const trimmed = path.replace(/\\/+$/, \"\");\n  const index = trimmed.lastIndexOf(\"/\");\n  return index > 0 ? trimmed.slice(0, index) : undefined;\n}\n\nfunction concat(chunks: Uint8Array[]): Uint8Array {\n  if (chunks.length === 1) return chunks[0]!;\n  const total = chunks.reduce((sum, chunk) => sum + chunk.length, 0);\n  const merged = new Uint8Array(total);\n  let offset = 0;\n  for (const chunk of chunks) {\n    merged.set(chunk, offset);\n    offset += chunk.length;\n  }\n  return merged;\n}\n","import {\n  normalizeRailwayClientConfig,\n  resolveEnvironmentId,\n  type NormalizedRailwayClientConfig,\n  type RailwayClientConfig,\n} from \"../core/config.js\";\nimport { requestGraphQL } from \"../core/graphql-client.js\";\nimport {\n  RailwaySandboxCreateDocument,\n  RailwaySandboxExecDocument,\n  RailwaySandboxSessionsDocument,\n  RailwaySandboxDestroyDocument,\n  RailwaySandboxHeartbeatDocument,\n  RailwaySandboxDocument,\n  RailwaySandboxesDocument,\n  RailwaySandboxCheckpointCreateDocument,\n  RailwaySandboxCheckpointDeleteDocument,\n  RailwaySandboxCheckpointRenameDocument,\n  RailwaySandboxCheckpointsDocument,\n  RailwaySandboxTemplateBuildDocument,\n  RailwaySandboxTemplateBuildStatusDocument,\n  type RailwaySandboxCheckpointCreateMutation,\n  type RailwaySandboxCheckpointCreateMutationVariables,\n  type RailwaySandboxCheckpointDeleteMutation,\n  type RailwaySandboxCheckpointDeleteMutationVariables,\n  type RailwaySandboxCheckpointRenameMutation,\n  type RailwaySandboxCheckpointRenameMutationVariables,\n  type RailwaySandboxCheckpointsQuery,\n  type RailwaySandboxCheckpointsQueryVariables,\n  type RailwaySandboxCreateMutation,\n  type RailwaySandboxCreateMutationVariables,\n  type RailwaySandboxDestroyMutation,\n  type RailwaySandboxDestroyMutationVariables,\n  type RailwaySandboxHeartbeatMutation,\n  type RailwaySandboxHeartbeatMutationVariables,\n  type RailwaySandboxSessionFieldsFragment,\n  type RailwaySandboxExecMutation,\n  type RailwaySandboxExecMutationVariables,\n  type RailwaySandboxSessionsQuery,\n  type RailwaySandboxSessionsQueryVariables,\n  type RailwaySandboxesQuery,\n  type RailwaySandboxesQueryVariables,\n  type RailwaySandboxQuery,\n  type RailwaySandboxQueryVariables,\n  type RailwaySandboxTemplateBuildMutation,\n  type RailwaySandboxTemplateBuildMutationVariables,\n  type RailwaySandboxTemplateBuildStatusQuery,\n  type RailwaySandboxTemplateBuildStatusQueryVariables,\n  type SandboxTemplateInput,\n} from \"../generated/graphql.js\";\nimport {\n  SandboxFailedError,\n  SandboxNotFoundError,\n  SandboxTemplateBuildError,\n  SandboxTimeoutError,\n} from \"./errors.js\";\nimport { startExec, type ExecContext, type ExecHandle } from \"./exec.js\";\nimport { createSandboxFiles, type SandboxFiles } from \"./files.js\";\nimport type {\n  CompiledTemplate,\n  CreateOptions,\n  ExecOptions,\n  ExecTarget,\n  ForkOptions,\n  ListOptions,\n  ExecHttpOptions,\n  ExecHttpResult,\n  SandboxCheckpointInfo,\n  SandboxCreationOptions,\n  SandboxInfo,\n  SandboxResources,\n  SandboxSessionInfo,\n  SandboxTemplateBuildInfo,\n  TemplateSource,\n} from \"./types.js\";\n\nconst READINESS_TIMEOUT_MS = 5 * 60_000;\n/** Upper bound on `sessions()` paging; a sandbox holds far fewer sessions. */\nconst MAX_SESSION_PAGES = 20;\nconst POLL_INITIAL_DELAY_MS = 500;\nconst POLL_MAX_DELAY_MS = 5_000;\n\nconst sleep = (ms: number): Promise<void> =>\n  new Promise(resolve => setTimeout(resolve, ms));\n\ninterface SandboxEngineConfig extends NormalizedRailwayClientConfig {\n  environmentId: string;\n}\n\nexport interface SandboxOptions extends RailwayClientConfig {\n  environmentId?: string;\n}\n\n/**\n * Binds resolved credentials and environment to sandbox GraphQL operations.\n */\nexport class SandboxEngine {\n  readonly #config: SandboxEngineConfig;\n\n  constructor(config: SandboxEngineConfig) {\n    this.#config = config;\n  }\n\n  get environmentId(): string {\n    return this.#config.environmentId;\n  }\n\n  async create(\n    options: CreateOptions = {},\n    template?: TemplateSource,\n  ): Promise<SandboxInfo> {\n    const input: RailwaySandboxCreateMutationVariables[\"input\"] = {\n      environmentId: this.#config.environmentId,\n    };\n    if (template !== undefined) {\n      // For a compiled recipe, echo its build-time variables so the backend\n      // hash matches the built snapshot and forks from it.\n      input.template = toTemplateInput(template);\n    }\n\n    return this.#createAndWait(input, options);\n  }\n\n  async fork(\n    sourceSandboxId: string,\n    options: ForkOptions = {},\n  ): Promise<SandboxInfo> {\n    return this.#createAndWait(\n      { environmentId: this.#config.environmentId, sourceSandboxId },\n      options,\n    );\n  }\n\n  /** Applies the shared creation knobs, runs the create mutation, and waits for RUNNING. */\n  async #createAndWait(\n    input: RailwaySandboxCreateMutationVariables[\"input\"],\n    options: SandboxCreationOptions,\n  ): Promise<SandboxInfo> {\n    if (options.idleTimeoutMinutes !== undefined) {\n      input.idleTimeoutMinutes = options.idleTimeoutMinutes;\n    }\n    if (options.networkIsolation !== undefined) {\n      input.networkIsolation = options.networkIsolation;\n    }\n    if (options.resources !== undefined) {\n      input.resources = validResources(options.resources);\n    }\n    if (options.domains !== undefined) {\n      input.publicDomains = options.domains;\n    }\n    if (options.region !== undefined) {\n      input.region = options.region;\n    }\n    if (options.env !== undefined) {\n      input.variables = options.env;\n    }\n\n    this.#config.log(creationLine(input));\n\n    const data = await requestGraphQL<\n      RailwaySandboxCreateMutation,\n      RailwaySandboxCreateMutationVariables\n    >(this.#config, RailwaySandboxCreateDocument, { input });\n\n    this.#config.log(\n      `created sandbox ${data.sandboxCreate.id} status=${data.sandboxCreate.status}`,\n    );\n\n    return this.#waitForRunning(data.sandboxCreate);\n  }\n\n  async buildTemplate(\n    template: CompiledTemplate,\n    region?: string,\n  ): Promise<SandboxTemplateBuildInfo> {\n    const variables: RailwaySandboxTemplateBuildMutationVariables = {\n      environmentId: this.#config.environmentId,\n      input: { ...toTemplateInput(template), ...(region && { region }) },\n    };\n    const data = await requestGraphQL<\n      RailwaySandboxTemplateBuildMutation,\n      RailwaySandboxTemplateBuildMutationVariables\n    >(this.#config, RailwaySandboxTemplateBuildDocument, variables);\n\n    return data.sandboxTemplateBuild;\n  }\n\n  async getTemplateBuild(id: string): Promise<SandboxTemplateBuildInfo> {\n    const variables: RailwaySandboxTemplateBuildStatusQueryVariables = {\n      id,\n      environmentId: this.#config.environmentId,\n    };\n    const data = await requestGraphQL<\n      RailwaySandboxTemplateBuildStatusQuery,\n      RailwaySandboxTemplateBuildStatusQueryVariables\n    >(this.#config, RailwaySandboxTemplateBuildStatusDocument, variables);\n\n    return data.sandboxTemplateBuild;\n  }\n\n  async buildTemplateUntilReady(\n    template: CompiledTemplate,\n    region?: string,\n  ): Promise<SandboxTemplateBuildInfo> {\n    const varCount = template.variables\n      ? Object.keys(template.variables).length\n      : 0;\n    this.#config.log(\n      `build template (${template.instructions.length} steps, vars=${varCount})`,\n    );\n    return this.#waitForBuildReady(await this.buildTemplate(template, region));\n  }\n\n  /**\n   * Capture a running sandbox's disk into a named checkpoint. Synchronous on\n   * the backend: the checkpoint is bootable when this resolves.\n   */\n  async checkpoint(\n    sandboxId: string,\n    name: string,\n  ): Promise<SandboxCheckpointInfo> {\n    this.#config.log(`checkpoint sandbox ${sandboxId} -> \"${name}\"`);\n    const variables: RailwaySandboxCheckpointCreateMutationVariables = {\n      environmentId: this.#config.environmentId,\n      name,\n      sandboxId,\n    };\n    const data = await requestGraphQL<\n      RailwaySandboxCheckpointCreateMutation,\n      RailwaySandboxCheckpointCreateMutationVariables\n    >(this.#config, RailwaySandboxCheckpointCreateDocument, variables);\n\n    this.#config.log(`checkpoint ${data.sandboxCheckpointCreate.id} ready`);\n    return data.sandboxCheckpointCreate;\n  }\n\n  async listCheckpoints(): Promise<SandboxCheckpointInfo[]> {\n    const data = await requestGraphQL<\n      RailwaySandboxCheckpointsQuery,\n      RailwaySandboxCheckpointsQueryVariables\n    >(this.#config, RailwaySandboxCheckpointsDocument, {\n      environmentId: this.#config.environmentId,\n    });\n\n    return data.sandboxCheckpoints;\n  }\n\n  async renameCheckpoint(\n    id: string,\n    name: string,\n  ): Promise<SandboxCheckpointInfo> {\n    this.#config.log(`rename checkpoint ${id} -> \"${name}\"`);\n    const data = await requestGraphQL<\n      RailwaySandboxCheckpointRenameMutation,\n      RailwaySandboxCheckpointRenameMutationVariables\n    >(this.#config, RailwaySandboxCheckpointRenameDocument, {\n      environmentId: this.#config.environmentId,\n      id,\n      name,\n    });\n\n    return data.sandboxCheckpointRename;\n  }\n\n  /**\n   * Every session in the sandbox (all pages), or null when its runtime cannot\n   * list them. A sandbox holds few sessions, so callers get the whole set.\n   */\n  async sessions(sandboxId: string): Promise<SandboxSessionInfo[] | null> {\n    const sessions: SandboxSessionInfo[] = [];\n    let after: string | undefined;\n    for (let page = 0; page < MAX_SESSION_PAGES; page++) {\n      const variables: RailwaySandboxSessionsQueryVariables = {\n        environmentId: this.#config.environmentId,\n        id: sandboxId,\n        ...(after !== undefined ? { after } : {}),\n      };\n      const data = await requestGraphQL<\n        RailwaySandboxSessionsQuery,\n        RailwaySandboxSessionsQueryVariables\n      >(this.#config, RailwaySandboxSessionsDocument, variables);\n      if (data.sandboxSessions == null) return null;\n      for (const { node } of data.sandboxSessions.edges) sessions.push(toSessionInfo(node));\n      const { hasNextPage, endCursor } = data.sandboxSessions.pageInfo;\n      if (!hasNextPage || !endCursor) return sessions;\n      after = endCursor;\n    }\n    this.#config.log(`sessions: stopped after ${MAX_SESSION_PAGES} pages in sandbox ${sandboxId}`);\n    return sessions;\n  }\n\n  /** One-request exec over HTTPS: no streaming, stdin, or cancellation. */\n  async execHttp(\n    sandboxId: string,\n    command: string,\n    options: ExecHttpOptions = {},\n  ): Promise<ExecHttpResult> {\n    if (\n      options.timeoutSec !== undefined &&\n      !(Number.isInteger(options.timeoutSec) && options.timeoutSec > 0)\n    ) {\n      // The HTTPS exec takes whole seconds, unlike the streaming exec's timer.\n      throw new TypeError(\"`timeoutSec` must be a positive whole number of seconds.\");\n    }\n    this.#config.log(`execHttp in sandbox ${sandboxId}`);\n    const data = await requestGraphQL<\n      RailwaySandboxExecMutation,\n      RailwaySandboxExecMutationVariables\n    >(this.#config, RailwaySandboxExecDocument, {\n      environmentId: this.#config.environmentId,\n      id: sandboxId,\n      command,\n      ...(options.timeoutSec !== undefined ? { timeoutSec: options.timeoutSec } : {}),\n    });\n    return { ...data.sandboxExec };\n  }\n\n  async deleteCheckpoint(id: string): Promise<void> {\n    this.#config.log(`delete checkpoint ${id}`);\n    await requestGraphQL<\n      RailwaySandboxCheckpointDeleteMutation,\n      RailwaySandboxCheckpointDeleteMutationVariables\n    >(this.#config, RailwaySandboxCheckpointDeleteDocument, {\n      environmentId: this.#config.environmentId,\n      id,\n    });\n  }\n\n  /**\n   * Resolves once the build is READY (its checkpoint exists). PENDING (no\n   * workflow yet) and BUILDING keep polling; only FAILED is terminal.\n   */\n  async #waitForBuildReady(\n    build: SandboxTemplateBuildInfo,\n  ): Promise<SandboxTemplateBuildInfo> {\n    if (build.status === \"READY\") {\n      this.#config.log(`template build ${build.id} ready (cached)`);\n      return build;\n    }\n    if (build.status === \"FAILED\") {\n      throw new SandboxTemplateBuildError({\n        templateId: build.id,\n        environmentId: this.environmentId,\n      });\n    }\n\n    return this.#pollUntilReady({\n      poll: () => this.getTemplateBuild(build.id),\n      isReady: build => build.status === \"READY\",\n      isTerminal: build => build.status === \"FAILED\",\n      describe: build => `template build ${build.id} status=${build.status}`,\n      onTerminal: build => {\n        throw new SandboxTemplateBuildError({\n          templateId: build.id,\n          environmentId: this.environmentId,\n        });\n      },\n      onTimeout: build => {\n        throw new SandboxTimeoutError({\n          resource: \"template\",\n          id: build.id,\n          lastStatus: build.status,\n          timeoutMs: READINESS_TIMEOUT_MS,\n        });\n      },\n    });\n  }\n\n  async #waitForRunning(created: SandboxInfo): Promise<SandboxInfo> {\n    if (created.status === \"RUNNING\") return created;\n    if (isSandboxTerminal(created.status)) {\n      throw new SandboxFailedError({ id: created.id, status: created.status });\n    }\n\n    return this.#pollUntilReady({\n      poll: () => this.#getOrThrow(created.id),\n      isReady: info => info.status === \"RUNNING\",\n      isTerminal: info => isSandboxTerminal(info.status),\n      describe: info => `sandbox ${info.id} status=${info.status}`,\n      onTerminal: info => {\n        throw new SandboxFailedError({ id: info.id, status: info.status });\n      },\n      onTimeout: info => {\n        throw new SandboxTimeoutError({\n          resource: \"sandbox\",\n          id: info.id,\n          lastStatus: info.status,\n          timeoutMs: READINESS_TIMEOUT_MS,\n        });\n      },\n    });\n  }\n\n  async #getOrThrow(id: string): Promise<SandboxInfo> {\n    const info = await this.get(id);\n    if (!info) {\n      throw new SandboxNotFoundError({ id, environmentId: this.environmentId });\n    }\n    return info;\n  }\n\n  async #pollUntilReady<T>(args: {\n    poll: () => Promise<T>;\n    isReady: (value: T) => boolean;\n    isTerminal: (value: T) => boolean;\n    onTerminal: (value: T) => never;\n    onTimeout: (value: T) => never;\n    describe?: (value: T) => string;\n  }): Promise<T> {\n    const start = Date.now();\n    const describe = args.describe;\n    let delay = POLL_INITIAL_DELAY_MS;\n    let last: T;\n    do {\n      await sleep(delay);\n      last = await args.poll();\n      const elapsedSec = ((Date.now() - start) / 1000).toFixed(1);\n      if (args.isReady(last)) {\n        if (describe) this.#config.log(`${describe(last)} ready after ${elapsedSec}s`);\n        return last;\n      }\n      if (args.isTerminal(last)) {\n        if (describe) this.#config.log(`${describe(last)} hit terminal state`);\n        return args.onTerminal(last);\n      }\n      delay = Math.min(delay * 2, POLL_MAX_DELAY_MS);\n      if (describe) {\n        this.#config.log(\n          `waiting on ${describe(last)}, retry in ${delay}ms (elapsed ${elapsedSec}s)`,\n        );\n      }\n    } while (Date.now() - start < READINESS_TIMEOUT_MS);\n    if (describe) {\n      const elapsedSec = ((Date.now() - start) / 1000).toFixed(1);\n      this.#config.log(`${describe(last)} timed out after ${elapsedSec}s`);\n    }\n    return args.onTimeout(last);\n  }\n\n  exec(id: string, target: ExecTarget, options: ExecOptions = {}): ExecHandle {\n    const context: ExecContext = {\n      config: this.#config,\n      environmentId: this.#config.environmentId,\n      sandboxId: id,\n    };\n    return startExec(context, target, options);\n  }\n\n  files(id: string): SandboxFiles {\n    return createSandboxFiles({\n      config: this.#config,\n      environmentId: this.#config.environmentId,\n      sandboxId: id,\n    });\n  }\n\n  async destroy(id: string): Promise<void> {\n    const variables: RailwaySandboxDestroyMutationVariables = {\n      id,\n      environmentId: this.#config.environmentId,\n    };\n    this.#config.log(`destroy sandbox ${id}`);\n    await requestGraphQL<\n      RailwaySandboxDestroyMutation,\n      RailwaySandboxDestroyMutationVariables\n    >(this.#config, RailwaySandboxDestroyDocument, variables);\n  }\n\n  async heartbeat(id: string): Promise<SandboxInfo> {\n    const variables: RailwaySandboxHeartbeatMutationVariables = {\n      id,\n      environmentId: this.#config.environmentId,\n    };\n    this.#config.log(`heartbeat sandbox ${id}`);\n    const data = await requestGraphQL<\n      RailwaySandboxHeartbeatMutation,\n      RailwaySandboxHeartbeatMutationVariables\n    >(this.#config, RailwaySandboxHeartbeatDocument, variables);\n    if (!data.sandboxHeartbeat) {\n      throw new SandboxNotFoundError({ id, environmentId: this.environmentId });\n    }\n    return data.sandboxHeartbeat;\n  }\n\n  async get(id: string): Promise<SandboxInfo | null> {\n    const variables: RailwaySandboxQueryVariables = {\n      id,\n      environmentId: this.#config.environmentId,\n    };\n    const data = await requestGraphQL<\n      RailwaySandboxQuery,\n      RailwaySandboxQueryVariables\n    >(this.#config, RailwaySandboxDocument, variables);\n\n    const info = data.sandbox ?? null;\n    if (!info) {\n      this.#config.log(`sandbox ${id} not found (env=${this.environmentId})`);\n    }\n    return info;\n  }\n\n  async list(options: ListOptions = {}): Promise<SandboxInfo[]> {\n    const variables: RailwaySandboxesQueryVariables = {\n      environmentId: this.#config.environmentId,\n    };\n    if (options.first !== undefined) variables.first = options.first;\n    if (options.after !== undefined) variables.after = options.after;\n\n    const data = await requestGraphQL<\n      RailwaySandboxesQuery,\n      RailwaySandboxesQueryVariables\n    >(this.#config, RailwaySandboxesDocument, variables);\n\n    return data.sandboxes.edges.map(edge => edge.node);\n  }\n}\n\nfunction isSandboxTerminal(status: SandboxInfo[\"status\"]): boolean {\n  return status === \"FAILED\" || status === \"DESTROYED\" || status === \"DESTROYING\";\n}\n\nfunction toTemplateInput(template: TemplateSource): SandboxTemplateInput {\n  if (\"name\" in template) {\n    return { name: template.name };\n  }\n  return {\n    instructions: [...template.instructions],\n    ...(template.variables && { variables: template.variables }),\n  };\n}\n\nfunction creationKind(\n  input: RailwaySandboxCreateMutationVariables[\"input\"],\n): string {\n  if (input.sourceSandboxId) return \"fork\";\n  if (input.template?.name) return \"create-from-checkpoint\";\n  if (input.template) return \"create-from-template\";\n  return \"create\";\n}\n\n/** Verbose line for a create/fork/template create. Logs env key names, never values. */\nfunction creationLine(\n  input: RailwaySandboxCreateMutationVariables[\"input\"],\n): string {\n  const kind = creationKind(input);\n  const envKeys = input.variables ? Object.keys(input.variables) : [];\n  const domains = (input.publicDomains ?? []).map(domain =>\n    domain.prefix ? `${domain.prefix}:${domain.port}` : String(domain.port),\n  );\n  const parts = [\n    kind,\n    `env=${input.environmentId}`,\n    `idleTimeout=${input.idleTimeoutMinutes ?? \"none\"}`,\n    `network=${input.networkIsolation ?? \"default\"}`,\n    `region=${input.region ?? \"default\"}`,\n    `envKeys=[${envKeys.join(\",\")}]`,\n    `domains=[${domains.join(\",\")}]`,\n  ];\n  if (input.resources) {\n    parts.push(`resources=cpu:${input.resources.cpu ?? \"default\"},memGB:${input.resources.memoryGB ?? \"default\"}`);\n  }\n  if (input.sourceSandboxId) parts.push(`source=${input.sourceSandboxId}`);\n  if (input.template?.name) parts.push(`checkpoint=\"${input.template.name}\"`);\n  return parts.join(\" \");\n}\n\nexport async function engineFromOptions(\n  options: SandboxOptions = {},\n): Promise<SandboxEngine> {\n  const base = normalizeRailwayClientConfig(options);\n  const environmentId = await resolveEnvironmentId(base, options.environmentId);\n  return new SandboxEngine({ ...base, environmentId });\n}\n\n/**\n * The platform validates sizes, but NaN and Infinity serialize to JSON `null`,\n * which it would silently read as \"use the default\". Reject them here.\n */\nfunction validResources(resources: SandboxResources): SandboxResources {\n  for (const key of [\"cpu\", \"memoryGB\"] as const) {\n    const value = resources[key];\n    if (value !== undefined && !(Number.isFinite(value) && value > 0)) {\n      throw new TypeError(`\\`resources.${key}\\` must be a positive finite number.`);\n    }\n  }\n  return {\n    ...(resources.cpu !== undefined ? { cpu: resources.cpu } : {}),\n    ...(resources.memoryGB !== undefined ? { memoryGB: resources.memoryGB } : {}),\n  };\n}\n\n/**\n * Flattens the run state. The schema reports `exitCode: 0` while a session is\n * still running, so a running session reports `null` instead.\n */\nfunction toSessionInfo(node: RailwaySandboxSessionFieldsFragment): SandboxSessionInfo {\n  return {\n    name: node.name,\n    kind: node.kind,\n    running: node.runState.running,\n    exitCode: node.runState.running ? null : node.runState.exitCode,\n    exitedAt: node.runState.exitedAt ?? null,\n    attached: node.attached,\n    command: node.command,\n    foregroundActive: node.foregroundActive ?? null,\n    createdAt: node.createdAt ?? null,\n  };\n}\n","import { engineFromOptions } from \"./engine.js\";\nimport { shellQuote } from \"./shell.js\";\nimport type { CompiledTemplate, TemplateBuildOptions } from \"./types.js\";\n\ninterface TemplateState {\n  readonly instructions: readonly string[];\n  readonly env: ReadonlyArray<readonly [string, string]>;\n  readonly workdir?: string;\n}\n\nconst EMPTY_STATE: TemplateState = { instructions: [], env: [] };\n\n/** Immutable sandbox base recipe returned by `Sandbox.template()`. */\nexport interface SandboxTemplate {\n  /** Add a shell command build step. */\n  run(command: string): SandboxTemplate;\n  /** Install Debian packages with apt. */\n  withPackages(...packages: string[]): SandboxTemplate;\n  /**\n   * Set build-time environment variables available to the build instructions.\n   * Values may use Railway references (e.g. `${{shared.FOO}}`), resolved at\n   * build time. Build-time only — runtime env comes from `create({ env })`.\n   */\n  withEnv(vars: Record<string, string>): SandboxTemplate;\n  /** Set the working directory for later build steps. */\n  workdir(dir: string): SandboxTemplate;\n  /** Build the template before creating sandboxes from it. */\n  build(options?: TemplateBuildOptions): Promise<SandboxTemplate>;\n}\n\nexport function createSandboxTemplate(): SandboxTemplate {\n  return new SandboxTemplateRecipe(EMPTY_STATE);\n}\n\nexport function isSandboxTemplate(value: unknown): value is SandboxTemplate {\n  return value instanceof SandboxTemplateRecipe;\n}\n\nexport function compileSandboxTemplate(\n  template: SandboxTemplate,\n): CompiledTemplate {\n  if (!(template instanceof SandboxTemplateRecipe)) {\n    throw new TypeError(\"Expected a SandboxTemplate returned by Sandbox.template().\");\n  }\n  return template.compile();\n}\n\nclass SandboxTemplateRecipe implements SandboxTemplate {\n  readonly #state: TemplateState;\n\n  constructor(state: TemplateState) {\n    this.#state = state;\n  }\n\n  run(command: string): SandboxTemplate {\n    return this.#append(command);\n  }\n\n  withPackages(...packages: string[]): SandboxTemplate {\n    if (packages.length === 0) return this;\n    return this.#append(\n      `apt-get update && apt-get install -y --no-install-recommends ${packages.join(\" \")}`,\n    );\n  }\n\n  withEnv(vars: Record<string, string>): SandboxTemplate {\n    let env = this.#state.env;\n    for (const [key, value] of Object.entries(vars)) {\n      env = upsertEnv(env, key, value);\n    }\n    return new SandboxTemplateRecipe({ ...this.#state, env });\n  }\n\n  workdir(dir: string): SandboxTemplate {\n    return new SandboxTemplateRecipe({ ...this.#state, workdir: dir });\n  }\n\n  async build(options: TemplateBuildOptions = {}): Promise<SandboxTemplate> {\n    const compiled = this.compile();\n    // Nothing to build without instructions; build-time env alone has no effect.\n    if (compiled.instructions.length > 0) {\n      const engine = await engineFromOptions(options);\n      await engine.buildTemplateUntilReady(compiled, options.region);\n    }\n    return this;\n  }\n\n  compile(): CompiledTemplate {\n    const instructions = [...this.#state.instructions];\n    if (this.#state.env.length === 0) return { instructions };\n    return { instructions, variables: Object.fromEntries(this.#state.env) };\n  }\n\n  #append(command: string): SandboxTemplate {\n    const instruction = compileInstruction(command, this.#state.workdir);\n    return new SandboxTemplateRecipe({\n      ...this.#state,\n      instructions: [...this.#state.instructions, instruction],\n    });\n  }\n}\n\nfunction compileInstruction(command: string, workdir: string | undefined): string {\n  if (workdir === undefined) return command;\n  const quoted = shellQuote(workdir);\n  return `mkdir -p ${quoted} && cd ${quoted} && ${command}`;\n}\n\nfunction upsertEnv(\n  env: ReadonlyArray<readonly [string, string]>,\n  key: string,\n  value: string,\n): ReadonlyArray<readonly [string, string]> {\n  const index = env.findIndex(([k]) => k === key);\n  if (index === -1) return [...env, [key, value]];\n  const next = env.slice();\n  next[index] = [key, value];\n  return next;\n}\n","import {\n  engineFromOptions,\n  type SandboxEngine,\n} from \"./engine.js\";\nimport { SandboxNotFoundError } from \"./errors.js\";\nimport {\n  compileSandboxTemplate,\n  createSandboxTemplate,\n  isSandboxTemplate,\n  type SandboxTemplate,\n} from \"./template.js\";\nimport type { ExecHandle } from \"./exec.js\";\nimport type { SandboxFiles } from \"./files.js\";\nimport type {\n  CheckpointOptions,\n  ConnectOptions,\n  CreateOptions,\n  ExecHttpOptions,\n  ExecHttpResult,\n  ExecOptions,\n  ExecReattachTarget,\n  ExecResult,\n  ExecTarget,\n  ForkOptions,\n  ListOptions,\n  SandboxCheckpointInfo,\n  SandboxDomain,\n  SandboxInfo,\n  SandboxNetworkIsolation,\n  SandboxSessionInfo,\n  SandboxStatus,\n} from \"./types.js\";\n\n/**\n * A live Railway sandbox. There is no separate client: a sandbox always comes\n * from somewhere — nothing (`Sandbox.create`), an id (`Sandbox.connect`), a\n * reusable base (`Sandbox.template()`), or a saved checkpoint\n * (`Sandbox.create(name)`). The constructor is private; use the\n * static factories.\n */\nexport class Sandbox implements AsyncDisposable {\n  readonly #engine: SandboxEngine;\n  #info: SandboxInfo;\n  #files: SandboxFiles | undefined;\n\n  private constructor(engine: SandboxEngine, info: SandboxInfo) {\n    this.#engine = engine;\n    this.#info = info;\n  }\n\n  get id(): string {\n    return this.#info.id;\n  }\n\n  get status(): SandboxStatus {\n    return this.#info.status;\n  }\n\n  /** Network access mode: `ISOLATED` (NAT egress only) or `PRIVATE` (joins the environment private network). */\n  get networkIsolation(): SandboxNetworkIsolation {\n    return this.#info.networkIsolation;\n  }\n\n  /** Railway-provided HTTP domains published for this sandbox. Empty when none. */\n  get domains(): SandboxDomain[] {\n    return this.#info.domains;\n  }\n\n  get environmentId(): string {\n    return this.#info.environmentId;\n  }\n\n  get region(): string {\n    return this.#info.region;\n  }\n\n  get idleTimeoutMinutes(): number | null {\n    return this.#info.idleTimeoutMinutes ?? null;\n  }\n\n  get createdAt(): string {\n    return this.#info.createdAt;\n  }\n\n  /** Return a new immutable sandbox template. */\n  static template(): SandboxTemplate {\n    return createSandboxTemplate();\n  }\n\n  /** Boot from a saved checkpoint (one captured with `checkpoint`). */\n  static create(checkpointName: string, options?: CreateOptions): Promise<Sandbox>;\n  static create(\n    template: SandboxTemplate,\n    options?: CreateOptions,\n  ): Promise<Sandbox>;\n  static create(source: Sandbox, options?: ForkOptions): Promise<Sandbox>;\n  static create(options?: CreateOptions): Promise<Sandbox>;\n  static async create(\n    sourceOrOptions: string | SandboxTemplate | Sandbox | CreateOptions = {},\n    maybeOptions: CreateOptions = {},\n  ): Promise<Sandbox> {\n    if (typeof sourceOrOptions === \"string\") {\n      const name = sourceOrOptions.trim();\n      if (name === \"\") {\n        throw new TypeError(\"Checkpoint name must be a non-empty string.\");\n      }\n      const engine = await engineFromOptions(maybeOptions);\n      const info = await engine.create(maybeOptions, { name });\n      return new Sandbox(engine, info);\n    }\n\n    if (sourceOrOptions instanceof Sandbox) {\n      return sourceOrOptions.fork(maybeOptions);\n    }\n\n    if (isSandboxTemplate(sourceOrOptions)) {\n      const engine = await engineFromOptions(maybeOptions);\n      const compiled = compileSandboxTemplate(sourceOrOptions);\n      if (compiled.instructions.length === 0) {\n        // No build steps → nothing to build. Build-time variables have no\n        // effect; runtime env still comes from `create({ env })`.\n        return new Sandbox(engine, await engine.create(maybeOptions));\n      }\n      await engine.buildTemplateUntilReady(compiled, maybeOptions.region);\n      const info = await engine.create(maybeOptions, compiled);\n      return new Sandbox(engine, info);\n    }\n\n    const engine = await engineFromOptions(sourceOrOptions);\n    const info = await engine.create(sourceOrOptions);\n    return new Sandbox(engine, info);\n  }\n\n  static async connect(\n    id: string,\n    options: ConnectOptions = {},\n  ): Promise<Sandbox> {\n    const engine = await engineFromOptions(options);\n    const info = await engine.get(id);\n    if (!info) {\n      throw new SandboxNotFoundError({ id, environmentId: engine.environmentId });\n    }\n    return new Sandbox(engine, info);\n  }\n\n  static async list(options: ListOptions = {}): Promise<SandboxInfo[]> {\n    const engine = await engineFromOptions(options);\n    return engine.list(options);\n  }\n\n  /** List the environment's named checkpoints (newest first). */\n  static async checkpoints(\n    options: CheckpointOptions = {},\n  ): Promise<SandboxCheckpointInfo[]> {\n    const engine = await engineFromOptions(options);\n    return engine.listCheckpoints();\n  }\n\n  /** Rename a checkpoint by id; new sandboxes boot from it via the new name. */\n  static async renameCheckpoint(\n    id: string,\n    name: string,\n    options: CheckpointOptions = {},\n  ): Promise<SandboxCheckpointInfo> {\n    const trimmed = name.trim();\n    if (trimmed === \"\") {\n      throw new TypeError(\"Checkpoint name must be a non-empty string.\");\n    }\n    const engine = await engineFromOptions(options);\n    return engine.renameCheckpoint(id, trimmed);\n  }\n\n  /** Delete a checkpoint by id (find it by `key` via `Sandbox.checkpoints`). */\n  static async deleteCheckpoint(\n    id: string,\n    options: CheckpointOptions = {},\n  ): Promise<void> {\n    const engine = await engineFromOptions(options);\n    await engine.deleteCheckpoint(id);\n  }\n\n  /**\n   * Run a command. Awaiting the handle resolves the final `ExecResult` —\n   * short commands return directly, long-running ones transparently stream\n   * output (see `ExecOptions.onStdout`/`onStderr`) until the command exits.\n   * The handle also exposes `sessionName` and `kill()`. A `timeoutSec` deadline\n   * kills the command and resolves with `timedOut: true` rather than\n   * rejecting.\n   */\n  exec(command: string, options?: ExecOptions): ExecHandle;\n  /** Reattach to a running exec by session name; resumes the retained output. */\n  exec(target: ExecReattachTarget, options?: ExecOptions): ExecHandle;\n  exec(target: ExecTarget, options: ExecOptions = {}): ExecHandle {\n    return this.#engine.exec(this.id, target, options);\n  }\n\n  /**\n   * File operations on this sandbox's filesystem: `read`, `write`, `list`,\n   * `stat`, `exists`, `mkdir`, `remove`, `rename`. Reads and writes stream,\n   * so files larger than memory transfer safely.\n   */\n  get files(): SandboxFiles {\n    this.#files ??= this.#engine.files(this.id);\n    return this.#files;\n  }\n\n  /**\n   * Fork this running sandbox into a new, independent one. Clones the\n   * filesystem (a fresh boot, not live processes) into the same environment.\n   */\n  async fork(options?: ForkOptions): Promise<Sandbox> {\n    const info = await this.#engine.fork(this.id, options);\n    return new Sandbox(this.#engine, info);\n  }\n\n  /**\n   * Capture this sandbox's current disk into a reusable named checkpoint,\n   * bootable as soon as this resolves. The sandbox must be running. Reusing an\n   * existing name replaces that checkpoint. Boot new sandboxes from it with\n   * `Sandbox.create(name)`; they start in this sandbox's region.\n   */\n  async checkpoint(name: string): Promise<SandboxCheckpointInfo> {\n    const trimmed = name.trim();\n    if (trimmed === \"\") {\n      throw new TypeError(\"Checkpoint name must be a non-empty string.\");\n    }\n    return this.#engine.checkpoint(this.id, trimmed);\n  }\n\n  async destroy(): Promise<void> {\n    await this.#engine.destroy(this.id);\n  }\n\n  /**\n   * Shells and exec sessions in this sandbox, running or recently exited.\n   * Reattach to one with `exec({ sessionName })`. Resolves null when the\n   * sandbox's runtime cannot report sessions.\n   */\n  async sessions(): Promise<SandboxSessionInfo[] | null> {\n    return this.#engine.sessions(this.id);\n  }\n\n  /**\n   * Run a command in one HTTPS request and get its result. No streaming, stdin,\n   * or cancellation: use it where a WebSocket isn't practical (short-lived\n   * functions, HTTP-only harnesses), and `exec` everywhere else. Each stream is cut at 16,000 bytes; the server timeout is\n   * 2 minutes by default and 10 at most.\n   */\n  async execHttp(command: string, options: ExecHttpOptions = {}): Promise<ExecHttpResult> {\n    return this.#engine.execHttp(this.id, command, options);\n  }\n\n  /** Reset the idle countdown and refresh this handle. Does not change the configured timeout. */\n  async heartbeat(): Promise<this> {\n    this.#info = await this.#engine.heartbeat(this.id);\n    return this;\n  }\n\n  /** Re-reads the sandbox to refresh `status` and other fields in place. */\n  async refresh(): Promise<this> {\n    const info = await this.#engine.get(this.id);\n    if (!info) {\n      throw new SandboxNotFoundError({\n        id: this.id,\n        environmentId: this.environmentId,\n      });\n    }\n    this.#info = info;\n    return this;\n  }\n\n  async [Symbol.asyncDispose](): Promise<void> {\n    await this.destroy();\n  }\n\n  toJSON(): SandboxInfo {\n    return { ...this.#info };\n  }\n}\n","import { RailwayError } from \"../core/errors.js\";\nimport type { NormalizedRailwayClientConfig } from \"../core/config.js\";\nimport type { FlagsInitOptions, FlagsScope } from \"./types.js\";\n\nexport const RAILWAY_PROJECT_ID_ENV = \"RAILWAY_PROJECT_ID\";\n\nexport class FlagsScopeError extends RailwayError {\n  constructor() {\n    super(\n      \"Could not resolve feature flag scope. Use one of:\\n\" +\n        \"  • set RAILWAY_TOKEN to a Railway project token (recommended — project scope is automatic)\\n\" +\n        \"  • scope: { projectId: \\\"...\\\" } or set RAILWAY_PROJECT_ID for project-scoped flags\\n\" +\n        \"  • scope: { workspaceId: \\\"...\\\" } for workspace-scoped flags\",\n    );\n  }\n}\n\n/**\n * Resolve the registry owner string used for GraphQL fetches.\n *\n * Returns `undefined` only for project tokens, where Backboard infers `project:<id>` from auth.\n */\nexport function resolveFlagsRegistryOwner(\n  options: FlagsInitOptions,\n  config: NormalizedRailwayClientConfig,\n): string | undefined {\n  if (options.scope != null) {\n    return serializeScope(options.scope);\n  }\n\n  if (config.authType === \"project-token\") {\n    return undefined;\n  }\n\n  const projectId = readEnv(RAILWAY_PROJECT_ID_ENV);\n  if (projectId != null) {\n    return serializeScope({ projectId });\n  }\n\n  throw new FlagsScopeError();\n}\n\nexport function serializeScope(scope: FlagsScope): string {\n  if (\"workspaceId\" in scope) {\n    return `workspace:${scope.workspaceId}`;\n  }\n  return `project:${scope.projectId}`;\n}\n\nfunction readEnv(name: string): string | undefined {\n  if (typeof process === \"undefined\") return undefined;\n  const value = process.env?.[name];\n  if (value === undefined || value.trim() === \"\") {\n    return undefined;\n  }\n  return value.trim();\n}\n","import type { RailwayAuthType } from \"../core/config.js\";\n\n/** Radar-style attribute clause reused by signal expressions. */\nexport type RadarOperator =\n  | \"eq\"\n  | \"neq\"\n  | \"gt\"\n  | \"lt\"\n  | \"gte\"\n  | \"lte\"\n  | \"in_list\"\n  | \"not_in_list\"\n  | \"contains\"\n  | \"not_contains\"\n  | \"matches\";\n\nexport interface RadarClause {\n  attr: string;\n  op: RadarOperator;\n  value?: string | number | boolean;\n  list?: string;\n  match?: \"exact\" | \"substring\";\n}\n\n/** Percentage rollout: bucket(attr) compared to a threshold in [0, 1]. */\nexport interface SignalBucketCompare {\n  bucket: {\n    attr: string;\n    salt?: string;\n  };\n  op: \"lt\" | \"lte\" | \"gt\" | \"gte\";\n  value: number;\n}\n\nexport type SignalExpression =\n  | { and: SignalExpression[] }\n  | { or: SignalExpression[] }\n  | { not: SignalExpression }\n  | RadarClause\n  | SignalBucketCompare;\n\nexport type SignalType = \"bool\" | \"string\" | \"number\" | \"json\";\n\nexport type SignalSource =\n  | { type: \"literal\"; value: unknown }\n  | { type: \"sandbox\"; sandboxId: string };\n\nexport interface SignalRule {\n  id: string;\n  expression: SignalExpression;\n  source: SignalSource;\n}\n\nexport interface SignalSnapshot {\n  default: unknown;\n  rules: SignalRule[];\n}\n\nexport interface SignalRuleset {\n  name: string;\n  type: SignalType;\n  default: unknown;\n  rules: SignalRule[];\n  version: string;\n}\n\nexport type SignalResolutionOutcome =\n  | \"default\"\n  | \"agreed\"\n  | \"disagreement\"\n  | \"no_match\";\n\nexport interface SignalResolutionRuleTrace {\n  ruleId: string;\n  matched: boolean;\n  source: SignalSource;\n  value: unknown | null;\n}\n\nexport interface SignalResolutionTrace {\n  signalName: string;\n  default: unknown;\n  matchedRules: SignalResolutionRuleTrace[];\n  outcome: SignalResolutionOutcome;\n  value: unknown;\n}\n\nexport interface SignalResolveResult {\n  value: unknown;\n  trace: SignalResolutionTrace;\n}\n\nexport type AttributeValue = string | number | boolean;\n\n/** Flat evaluation context. `key` is the stable bucketing identity for splits. */\nexport type Context = { key?: string } & Record<string, AttributeValue>;\n\n/** Internal normalized shape used by the resolver pipeline. */\nexport interface FlagEvaluationContext {\n  targetingKey?: string;\n  attributes?: Record<string, unknown>;\n}\n\nexport const SIGNAL_TARGETING_KEY_ATTR = \"targetingKey\";\nexport const SIGNAL_KEY_ATTR = \"key\";\n\nexport type Reason =\n  | \"TARGETING_MATCH\"\n  | \"SPLIT\"\n  | \"NO_MATCH\"\n  | \"CONFLICT\"\n  | \"NOT_FOUND\"\n  | \"TYPE_MISMATCH\"\n  | \"STALE\"\n  | \"NO_KEY\";\n\nexport interface TraceStep {\n  ruleId: string;\n  matched: boolean;\n  value: unknown | null;\n}\n\nexport interface Evaluation<T> {\n  value: T;\n  reason: Reason;\n  trace: TraceStep[];\n}\n\nexport type FlagsScope =\n  | { workspaceId: string; projectId?: never }\n  | { projectId: string; workspaceId?: never };\n\nexport interface FlagsInitOptions {\n  /**\n   * Override token for off-platform/local dev. By default the SDK reads\n   * `RAILWAY_TOKEN` (project token, recommended) and falls back to\n   * `RAILWAY_API_TOKEN` (bearer account/workspace token).\n   */\n  token?: string;\n  /** Flag scope. Omit with a project token (scope is inferred) or on Railway with `RAILWAY_PROJECT_ID`. */\n  scope?: FlagsScope;\n  /** Disable background polling after the initial load. */\n  refresh?: false;\n  /** Bound the initial sync wait (serverless cold starts). */\n  timeoutMs?: number;\n  /** Reject `init()` when the first registry sync fails. */\n  required?: true;\n  /**\n   * Auth header mode. Tokens read from `RAILWAY_TOKEN` default to\n   * `project-token`; explicit tokens and `RAILWAY_API_TOKEN` default to\n   * `bearer`. Set this only when passing a project token explicitly.\n   */\n  authType?: RailwayAuthType;\n  endpoint?: string;\n  fetch?: typeof fetch;\n  verbose?: boolean;\n}\n\nexport interface RegistrySignalRow {\n  name: string;\n  type: string;\n  default: unknown;\n  rules: unknown;\n  version: string;\n}\n","import type { Context, FlagEvaluationContext } from \"./types.js\";\nimport { SIGNAL_KEY_ATTR, SIGNAL_TARGETING_KEY_ATTR } from \"./types.js\";\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n  return value != null && typeof value === \"object\" && !Array.isArray(value);\n}\n\n/** Normalize the public flat `Context` into the internal resolver shape. */\nexport function normalizeEvaluationContext(raw: unknown): FlagEvaluationContext {\n  if (!isPlainObject(raw)) {\n    return {};\n  }\n\n  const { key, targetingKey, attributes, ...rest } = raw;\n  const resolvedKey =\n    typeof key === \"string\" ? key : typeof targetingKey === \"string\" ? targetingKey : undefined;\n\n  const normalizedAttributes: Record<string, unknown> = {\n    ...rest,\n    ...(isPlainObject(attributes) ? attributes : {}),\n  };\n\n  return {\n    ...(resolvedKey !== undefined ? { targetingKey: resolvedKey } : {}),\n    ...(Object.keys(normalizedAttributes).length > 0\n      ? { attributes: normalizedAttributes }\n      : {}),\n  };\n}\n\nfunction flattenAttributes(\n  value: unknown,\n  prefix: string,\n  out: Record<string, unknown>,\n): void {\n  if (value == null) {\n    if (prefix) out[prefix] = value;\n    return;\n  }\n\n  if (Array.isArray(value)) {\n    out[prefix || \"value\"] = value;\n    return;\n  }\n\n  if (isPlainObject(value)) {\n    if (prefix === \"\") {\n      for (const [key, nested] of Object.entries(value)) {\n        flattenAttributes(nested, key, out);\n      }\n      return;\n    }\n    for (const [key, nested] of Object.entries(value)) {\n      flattenAttributes(nested, `${prefix}.${key}`, out);\n    }\n    return;\n  }\n\n  out[prefix] = value;\n}\n\nexport function flattenEvaluationContext(\n  context: FlagEvaluationContext,\n): Record<string, unknown> {\n  const flat: Record<string, unknown> = {};\n\n  if (context.targetingKey != null) {\n    flat[SIGNAL_TARGETING_KEY_ATTR] = context.targetingKey;\n    flat[SIGNAL_KEY_ATTR] = context.targetingKey;\n  }\n\n  if (context.attributes != null) {\n    flattenAttributes(context.attributes, \"\", flat);\n  }\n\n  return flat;\n}\n\nexport interface AttributeResolver {\n  resolve(attr: string): Promise<unknown>;\n}\n\nexport interface ListResolver {\n  resolve(listName: string): Promise<string[]>;\n}\n\nexport class StaticAttributeResolver implements AttributeResolver {\n  constructor(private readonly attributes: Record<string, unknown>) {}\n\n  resolve(attr: string): Promise<unknown> {\n    return Promise.resolve(this.attributes[attr] ?? null);\n  }\n}\n\nexport class StaticListResolver implements ListResolver {\n  constructor(private readonly lists: Record<string, string[]>) {}\n\n  resolve(listName: string): Promise<string[]> {\n    return Promise.resolve(this.lists[listName] ?? []);\n  }\n}\n\nexport function createResolversFromContext(context: FlagEvaluationContext): {\n  attrResolver: AttributeResolver;\n  listResolver: ListResolver;\n} {\n  const flat = flattenEvaluationContext(context);\n  return {\n    attrResolver: new StaticAttributeResolver(flat),\n    listResolver: new StaticListResolver({}),\n  };\n}\n\nexport function contextFromPublic(ctx?: Context): FlagEvaluationContext {\n  return normalizeEvaluationContext(ctx ?? {});\n}\n","import type { RadarClause } from \"./types.js\";\nimport type { AttributeResolver, ListResolver } from \"./context.js\";\n\nexport async function evaluateClause(\n  clause: RadarClause,\n  attrResolver: AttributeResolver,\n  listResolver: ListResolver,\n): Promise<boolean> {\n  const result = await evaluateClauseNullable(clause, attrResolver, listResolver);\n  return result === true;\n}\n\nasync function evaluateClauseNullable(\n  clause: RadarClause,\n  attrResolver: AttributeResolver,\n  listResolver: ListResolver,\n): Promise<boolean | null> {\n  const attrValue = await attrResolver.resolve(clause.attr);\n\n  if (attrValue === null || attrValue === undefined) {\n    return null;\n  }\n\n  switch (clause.op) {\n    case \"eq\":\n      return attrValue === clause.value;\n    case \"neq\":\n      return attrValue !== clause.value;\n    case \"gt\":\n      if (typeof attrValue !== \"number\" || typeof clause.value !== \"number\") {\n        return null;\n      }\n      return attrValue > clause.value;\n    case \"lt\":\n      if (typeof attrValue !== \"number\" || typeof clause.value !== \"number\") {\n        return null;\n      }\n      return attrValue < clause.value;\n    case \"gte\":\n      if (typeof attrValue !== \"number\" || typeof clause.value !== \"number\") {\n        return null;\n      }\n      return attrValue >= clause.value;\n    case \"lte\":\n      if (typeof attrValue !== \"number\" || typeof clause.value !== \"number\") {\n        return null;\n      }\n      return attrValue <= clause.value;\n    case \"contains\":\n      if (typeof attrValue !== \"string\" || typeof clause.value !== \"string\") {\n        return null;\n      }\n      return attrValue.includes(clause.value);\n    case \"not_contains\":\n      if (typeof attrValue !== \"string\" || typeof clause.value !== \"string\") {\n        return null;\n      }\n      return !attrValue.includes(clause.value);\n    case \"matches\":\n      if (typeof attrValue !== \"string\" || typeof clause.value !== \"string\") {\n        return null;\n      }\n      try {\n        return new RegExp(clause.value).test(attrValue);\n      } catch {\n        return false;\n      }\n    case \"in_list\":\n      return evaluateListOp(attrValue, clause, listResolver, false);\n    case \"not_in_list\":\n      return evaluateListOp(attrValue, clause, listResolver, true);\n    default:\n      return false;\n  }\n}\n\nasync function evaluateListOp(\n  attrValue: unknown,\n  clause: RadarClause,\n  listResolver: ListResolver,\n  negate: boolean,\n): Promise<boolean | null> {\n  if (typeof attrValue !== \"string\" || !clause.list) {\n    return null;\n  }\n\n  const items = await listResolver.resolve(clause.list);\n  const matchMode = clause.match ?? \"exact\";\n\n  let found: boolean;\n  if (matchMode === \"substring\") {\n    found = items.some((item) => attrValue.includes(item));\n  } else {\n    found = items.includes(attrValue);\n  }\n\n  return negate ? !found : found;\n}\n\nexport function evaluateClauseSync(\n  clause: RadarClause,\n  attributes: Record<string, unknown>,\n  lists: Record<string, string[]> = {},\n): boolean {\n  const attrValue = attributes[clause.attr];\n\n  if (attrValue === null || attrValue === undefined) {\n    return false;\n  }\n\n  switch (clause.op) {\n    case \"eq\":\n      return attrValue === clause.value;\n    case \"neq\":\n      return attrValue !== clause.value;\n    case \"gt\":\n      if (typeof attrValue !== \"number\" || typeof clause.value !== \"number\") {\n        return false;\n      }\n      return attrValue > clause.value;\n    case \"lt\":\n      if (typeof attrValue !== \"number\" || typeof clause.value !== \"number\") {\n        return false;\n      }\n      return attrValue < clause.value;\n    case \"gte\":\n      if (typeof attrValue !== \"number\" || typeof clause.value !== \"number\") {\n        return false;\n      }\n      return attrValue >= clause.value;\n    case \"lte\":\n      if (typeof attrValue !== \"number\" || typeof clause.value !== \"number\") {\n        return false;\n      }\n      return attrValue <= clause.value;\n    case \"contains\":\n      if (typeof attrValue !== \"string\" || typeof clause.value !== \"string\") {\n        return false;\n      }\n      return attrValue.includes(clause.value);\n    case \"not_contains\":\n      if (typeof attrValue !== \"string\" || typeof clause.value !== \"string\") {\n        return false;\n      }\n      return !attrValue.includes(clause.value);\n    case \"matches\":\n      if (typeof attrValue !== \"string\" || typeof clause.value !== \"string\") {\n        return false;\n      }\n      try {\n        return new RegExp(clause.value).test(attrValue);\n      } catch {\n        return false;\n      }\n    case \"in_list\":\n      return evaluateListOpSync(attrValue, clause, lists, false);\n    case \"not_in_list\":\n      return evaluateListOpSync(attrValue, clause, lists, true);\n    default:\n      return false;\n  }\n}\n\nfunction evaluateListOpSync(\n  attrValue: unknown,\n  clause: RadarClause,\n  lists: Record<string, string[]>,\n  negate: boolean,\n): boolean {\n  if (typeof attrValue !== \"string\" || !clause.list) {\n    return false;\n  }\n\n  const items = lists[clause.list] ?? [];\n  const matchMode = clause.match ?? \"exact\";\n\n  let found: boolean;\n  if (matchMode === \"substring\") {\n    found = items.some((item) => attrValue.includes(item));\n  } else {\n    found = items.includes(attrValue);\n  }\n\n  return negate ? !found : found;\n}\n","import { createHash } from \"node:crypto\";\n\n/** Deterministic percentage bucket in [0, 1) for rollout expressions. */\nexport function signalBucketRatio(salt: string, subject: string): number {\n  const digest = createHash(\"sha256\").update(`${salt}:${subject}`).digest();\n  const n = digest.readUInt32BE(0) * 0x100000000 + digest.readUInt32BE(4);\n  return n / 0x1_0000_0000_0000_0000;\n}\n","import type {\n  RadarClause,\n  SignalBucketCompare,\n  SignalExpression,\n} from \"./types.js\";\nimport type { AttributeResolver, ListResolver } from \"./context.js\";\nimport { evaluateClause } from \"./clause.js\";\nimport { signalBucketRatio } from \"./bucket.js\";\n\nfunction isClause(expr: SignalExpression): expr is RadarClause {\n  return \"attr\" in expr && \"op\" in expr;\n}\n\nfunction isBucketCompare(expr: SignalExpression): expr is SignalBucketCompare {\n  return \"bucket\" in expr && \"op\" in expr && \"value\" in expr;\n}\n\nfunction compareBucket(\n  ratio: number,\n  op: SignalBucketCompare[\"op\"],\n  threshold: number,\n): boolean {\n  switch (op) {\n    case \"lt\":\n      return ratio < threshold;\n    case \"lte\":\n      return ratio <= threshold;\n    case \"gt\":\n      return ratio > threshold;\n    case \"gte\":\n      return ratio >= threshold;\n    default: {\n      const _exhaustive: never = op;\n      return _exhaustive;\n    }\n  }\n}\n\nexport async function evaluateSignalExpression(\n  expr: SignalExpression,\n  attrResolver: AttributeResolver,\n  listResolver: ListResolver,\n  opts: { signalName: string; bucketSalt?: string },\n): Promise<boolean> {\n  if (isClause(expr)) {\n    return evaluateClause(expr, attrResolver, listResolver);\n  }\n\n  if (isBucketCompare(expr)) {\n    const attrValue = await attrResolver.resolve(expr.bucket.attr);\n    if (attrValue === null || attrValue === undefined) {\n      return false;\n    }\n    if (typeof attrValue !== \"string\" && typeof attrValue !== \"number\") {\n      return false;\n    }\n\n    const salt = expr.bucket.salt ?? opts.bucketSalt ?? opts.signalName;\n    const ratio = signalBucketRatio(salt, String(attrValue));\n    return compareBucket(ratio, expr.op, expr.value);\n  }\n\n  if (\"and\" in expr) {\n    for (const sub of expr.and) {\n      const matched = await evaluateSignalExpression(\n        sub,\n        attrResolver,\n        listResolver,\n        opts,\n      );\n      if (!matched) return false;\n    }\n    return true;\n  }\n\n  if (\"or\" in expr) {\n    for (const sub of expr.or) {\n      const matched = await evaluateSignalExpression(\n        sub,\n        attrResolver,\n        listResolver,\n        opts,\n      );\n      if (matched) return true;\n    }\n    return false;\n  }\n\n  if (\"not\" in expr) {\n    const matched = await evaluateSignalExpression(\n      expr.not,\n      attrResolver,\n      listResolver,\n      opts,\n    );\n    return !matched;\n  }\n\n  return false;\n}\n","import type { RadarClause, SignalBucketCompare, SignalExpression } from \"./types.js\";\nimport { signalBucketRatio } from \"./bucket.js\";\nimport { flattenEvaluationContext } from \"./context.js\";\nimport type { FlagEvaluationContext } from \"./types.js\";\nimport { evaluateClauseSync } from \"./clause.js\";\n\nfunction isClause(expr: SignalExpression): expr is RadarClause {\n  return \"attr\" in expr && \"op\" in expr;\n}\n\nfunction isBucketCompare(expr: SignalExpression): expr is SignalBucketCompare {\n  return \"bucket\" in expr && \"op\" in expr && \"value\" in expr;\n}\n\nfunction compareBucket(\n  ratio: number,\n  op: SignalBucketCompare[\"op\"],\n  threshold: number,\n): boolean {\n  switch (op) {\n    case \"lt\":\n      return ratio < threshold;\n    case \"lte\":\n      return ratio <= threshold;\n    case \"gt\":\n      return ratio > threshold;\n    case \"gte\":\n      return ratio >= threshold;\n    default: {\n      const _exhaustive: never = op;\n      return _exhaustive;\n    }\n  }\n}\n\nexport function evaluateSignalExpressionSync(\n  expr: SignalExpression,\n  attributes: Record<string, unknown>,\n  opts: { signalName: string; bucketSalt?: string },\n): boolean {\n  if (isClause(expr)) {\n    return evaluateClauseSync(expr, attributes);\n  }\n\n  if (isBucketCompare(expr)) {\n    const attrValue = attributes[expr.bucket.attr];\n    if (attrValue === null || attrValue === undefined) {\n      return false;\n    }\n    if (typeof attrValue !== \"string\" && typeof attrValue !== \"number\") {\n      return false;\n    }\n\n    const salt = expr.bucket.salt ?? opts.bucketSalt ?? opts.signalName;\n    const ratio = signalBucketRatio(salt, String(attrValue));\n    return compareBucket(ratio, expr.op, expr.value);\n  }\n\n  if (\"and\" in expr) {\n    return expr.and.every((sub) =>\n      evaluateSignalExpressionSync(sub, attributes, opts),\n    );\n  }\n\n  if (\"or\" in expr) {\n    return expr.or.some((sub) =>\n      evaluateSignalExpressionSync(sub, attributes, opts),\n    );\n  }\n\n  if (\"not\" in expr) {\n    return !evaluateSignalExpressionSync(expr.not, attributes, opts);\n  }\n\n  return false;\n}\n\nexport function flattenContextAttributes(\n  context: FlagEvaluationContext,\n): Record<string, unknown> {\n  return flattenEvaluationContext(context);\n}\n","import type {\n  Context,\n  FlagEvaluationContext,\n  Reason,\n  SignalBucketCompare,\n  SignalRule,\n  SignalRuleset,\n  SignalResolutionTrace,\n  SignalResolveResult,\n  SignalExpression,\n  TraceStep,\n} from \"./types.js\";\nimport type { AttributeResolver, ListResolver } from \"./context.js\";\nimport {\n  createResolversFromContext,\n  normalizeEvaluationContext,\n} from \"./context.js\";\nimport { evaluateSignalExpression } from \"./expression.js\";\nimport {\n  evaluateSignalExpressionSync,\n  flattenContextAttributes,\n} from \"./expression-sync.js\";\nimport { SIGNAL_KEY_ATTR, SIGNAL_TARGETING_KEY_ATTR } from \"./types.js\";\n\nfunction sourceValue(source: SignalRule[\"source\"]): unknown | null {\n  if (source.type === \"literal\") {\n    return source.value;\n  }\n  return null;\n}\n\nfunction valuesAgree(values: unknown[]): boolean {\n  if (values.length <= 1) return true;\n  const first = JSON.stringify(values[0]);\n  return values.every((v) => JSON.stringify(v) === first);\n}\n\nfunction isBucketExpression(expr: SignalExpression): expr is SignalBucketCompare {\n  return \"bucket\" in expr;\n}\n\nfunction requiresBucketingKey(rules: SignalRule[]): boolean {\n  return rules.some((rule) => {\n    if (!isBucketExpression(rule.expression)) {\n      return false;\n    }\n    const attr = rule.expression.bucket.attr;\n    return attr === SIGNAL_KEY_ATTR || attr === SIGNAL_TARGETING_KEY_ATTR;\n  });\n}\n\nfunction hasBucketingKey(context: FlagEvaluationContext): boolean {\n  if (context.targetingKey != null && context.targetingKey !== \"\") {\n    return true;\n  }\n  const key = context.attributes?.[SIGNAL_KEY_ATTR];\n  return typeof key === \"string\" && key !== \"\";\n}\n\nexport function traceToSteps(trace: SignalResolutionTrace): TraceStep[] {\n  return trace.matchedRules.map((entry) => ({\n    ruleId: entry.ruleId,\n    matched: entry.matched,\n    value: entry.value,\n  }));\n}\n\nfunction evaluationReasonFromTrace(\n  trace: SignalResolutionTrace,\n  rules: SignalRule[],\n): Reason {\n  if (trace.outcome === \"no_match\") {\n    return \"NO_MATCH\";\n  }\n  if (trace.outcome === \"disagreement\") {\n    return \"CONFLICT\";\n  }\n\n  const matchedIds = new Set(\n    trace.matchedRules\n      .filter((entry) => entry.matched && entry.value !== null)\n      .map((entry) => entry.ruleId),\n  );\n\n  for (const rule of rules) {\n    if (matchedIds.has(rule.id) && isBucketExpression(rule.expression)) {\n      return \"SPLIT\";\n    }\n  }\n\n  return \"TARGETING_MATCH\";\n}\n\nexport async function resolveSignal(\n  ruleset: Pick<SignalRuleset, \"name\" | \"default\" | \"rules\">,\n  attrResolver: AttributeResolver,\n  listResolver: ListResolver,\n): Promise<SignalResolveResult> {\n  const matchedRules: SignalResolutionTrace[\"matchedRules\"] = [];\n  const matchedValues: unknown[] = [];\n\n  for (const rule of ruleset.rules) {\n    const matched = await evaluateSignalExpression(\n      rule.expression,\n      attrResolver,\n      listResolver,\n      { signalName: ruleset.name },\n    );\n    const value = matched ? sourceValue(rule.source) : null;\n\n    matchedRules.push({\n      ruleId: rule.id,\n      matched,\n      source: rule.source,\n      value,\n    });\n\n    if (matched && value !== null) {\n      matchedValues.push(value);\n    }\n  }\n\n  let outcome: SignalResolutionTrace[\"outcome\"];\n  let value: unknown;\n\n  if (matchedValues.length === 0) {\n    outcome = \"no_match\";\n    value = ruleset.default;\n  } else if (!valuesAgree(matchedValues)) {\n    outcome = \"disagreement\";\n    value = ruleset.default;\n  } else {\n    outcome = \"agreed\";\n    value = matchedValues[0];\n  }\n\n  return {\n    value,\n    trace: {\n      signalName: ruleset.name,\n      default: ruleset.default,\n      matchedRules,\n      outcome,\n      value,\n    },\n  };\n}\n\nexport async function evaluateFlagRuleset(\n  ruleset: SignalRuleset,\n  context: FlagEvaluationContext | Context = {},\n): Promise<SignalResolveResult & { reason: Reason }> {\n  const normalized = normalizeEvaluationContext(context);\n  if (requiresBucketingKey(ruleset.rules) && !hasBucketingKey(normalized)) {\n    return {\n      value: ruleset.default,\n      reason: \"NO_KEY\",\n      trace: {\n        signalName: ruleset.name,\n        default: ruleset.default,\n        matchedRules: [],\n        outcome: \"no_match\",\n        value: ruleset.default,\n      },\n    };\n  }\n\n  const { attrResolver, listResolver } = createResolversFromContext(normalized);\n  const result = await resolveSignal(ruleset, attrResolver, listResolver);\n\n  return {\n    ...result,\n    reason: evaluationReasonFromTrace(result.trace, ruleset.rules),\n  };\n}\n\nexport function evaluateFlagRulesetSync(\n  ruleset: SignalRuleset,\n  context: FlagEvaluationContext | Context = {},\n): SignalResolveResult & { reason: Reason } {\n  const normalized = normalizeEvaluationContext(context);\n  if (requiresBucketingKey(ruleset.rules) && !hasBucketingKey(normalized)) {\n    return {\n      value: ruleset.default,\n      reason: \"NO_KEY\",\n      trace: {\n        signalName: ruleset.name,\n        default: ruleset.default,\n        matchedRules: [],\n        outcome: \"no_match\",\n        value: ruleset.default,\n      },\n    };\n  }\n\n  const attributes = flattenContextAttributes(normalized);\n  const matchedRules: SignalResolutionTrace[\"matchedRules\"] = [];\n  const matchedValues: unknown[] = [];\n\n  for (const rule of ruleset.rules) {\n    const matched = evaluateSignalExpressionSync(rule.expression, attributes, {\n      signalName: ruleset.name,\n    });\n    const value = matched ? sourceValue(rule.source) : null;\n\n    matchedRules.push({\n      ruleId: rule.id,\n      matched,\n      source: rule.source,\n      value,\n    });\n\n    if (matched && value !== null) {\n      matchedValues.push(value);\n    }\n  }\n\n  let outcome: SignalResolutionTrace[\"outcome\"];\n  let value: unknown;\n\n  if (matchedValues.length === 0) {\n    outcome = \"no_match\";\n    value = ruleset.default;\n  } else if (!valuesAgree(matchedValues)) {\n    outcome = \"disagreement\";\n    value = ruleset.default;\n  } else {\n    outcome = \"agreed\";\n    value = matchedValues[0];\n  }\n\n  const trace: SignalResolutionTrace = {\n    signalName: ruleset.name,\n    default: ruleset.default,\n    matchedRules,\n    outcome,\n    value,\n  };\n\n  return {\n    value,\n    trace,\n    reason: evaluationReasonFromTrace(trace, ruleset.rules),\n  };\n}\n\nexport function parseSignalRules(raw: unknown): SignalRule[] {\n  if (!Array.isArray(raw)) {\n    throw new Error(\"invalid signal rules\");\n  }\n  return raw as SignalRule[];\n}\n\nexport function parseRegistrySignal(row: {\n  name: string;\n  type: string;\n  default: unknown;\n  rules: unknown;\n  version: string;\n}): SignalRuleset {\n  const type = normalizeSignalType(row.type);\n  if (type !== \"bool\" && type !== \"string\" && type !== \"number\" && type !== \"json\") {\n    throw new Error(`unsupported signal type: ${row.type}`);\n  }\n\n  return {\n    name: row.name,\n    type,\n    default: row.default,\n    rules: parseSignalRules(row.rules),\n    version: row.version,\n  };\n}\n\nfunction normalizeSignalType(type: string): SignalRuleset[\"type\"] | string {\n  return type.toLowerCase();\n}\n","import { Kind, parse, type DocumentNode } from \"graphql\";\nimport type { TypedDocumentNode } from \"@graphql-typed-document-node/core\";\n\nimport { requestGraphQL } from \"../core/graphql-client.js\";\nimport type { NormalizedRailwayClientConfig } from \"../core/config.js\";\nimport type { RegistrySignalRow } from \"./types.js\";\n\nexport interface SignalsQueryResult {\n  signals: RegistrySignalRow[];\n}\n\nexport interface SignalsQueryWithOwnerVariables {\n  owner: string;\n}\n\nconst SIGNALS_WITH_OWNER_QUERY = parse(`\n  query RailwaySignalsWithOwner($owner: String!) {\n    signals(owner: $owner) {\n      name\n      type\n      default\n      rules\n      version\n    }\n  }\n`) as DocumentNode;\n\nconst SIGNALS_INFERRED_QUERY = parse(`\n  query RailwaySignalsInferred {\n    signals {\n      name\n      type\n      default\n      rules\n      version\n    }\n  }\n`) as DocumentNode;\n\nexport const RailwaySignalsWithOwnerDocument =\n  SIGNALS_WITH_OWNER_QUERY as TypedDocumentNode<\n    SignalsQueryResult,\n    SignalsQueryWithOwnerVariables\n  >;\n\nexport const RailwaySignalsInferredDocument =\n  SIGNALS_INFERRED_QUERY as TypedDocumentNode<SignalsQueryResult, Record<string, never>>;\n\nexport async function fetchRegistrySignals(\n  config: NormalizedRailwayClientConfig,\n  owner: string | undefined,\n): Promise<RegistrySignalRow[]> {\n  if (owner === undefined) {\n    const data = await requestGraphQL(\n      config,\n      RailwaySignalsInferredDocument,\n      {},\n    );\n    return data.signals;\n  }\n\n  const data = await requestGraphQL(config, RailwaySignalsWithOwnerDocument, {\n    owner,\n  });\n  return data.signals;\n}\n\nexport function operationName(document: DocumentNode): string {\n  for (const definition of document.definitions) {\n    if (definition.kind === Kind.OPERATION_DEFINITION) {\n      return definition.name?.value ?? \"anonymous\";\n    }\n  }\n  return \"operation\";\n}\n","import {\n  normalizeRailwayClientConfig,\n  type NormalizedRailwayClientConfig,\n} from \"../core/config.js\";\nimport { resolveFlagsRegistryOwner, serializeScope } from \"./scope.js\";\nimport { contextFromPublic } from \"./context.js\";\nimport {\n  evaluateFlagRulesetSync,\n  parseRegistrySignal,\n  traceToSteps,\n} from \"./resolver.js\";\nimport { fetchRegistrySignals } from \"./graphql.js\";\nimport type {\n  Context,\n  Evaluation,\n  FlagsInitOptions,\n  FlagsScope,\n  Reason,\n  RegistrySignalRow,\n  SignalRuleset,\n  SignalType,\n  TraceStep,\n} from \"./types.js\";\n\nconst DEFAULT_ACTIVE_REFRESH_INTERVAL_MS = 10_000;\nconst DEFAULT_IDLE_REFRESH_INTERVAL_MS = 300_000;\nconst DEFAULT_ACTIVE_WINDOW_MS = 120_000;\nconst DEFAULT_REFRESH_JITTER = 0.2;\nconst DEFAULT_BACKOFF_MULTIPLIER = 2;\nconst DEFAULT_MAX_BACKOFF_MS = 300_000;\nconst DEFAULT_MIN_REFRESH_INTERVAL_MS = 1_000;\n\nconst sharedRefreshes = new Map<string, Promise<RegistrySignalRow[]>>();\nconst fetchIds = new WeakMap<object, number>();\nlet nextFetchId = 1;\n\ntype ConflictReporter = (flagName: string, scopeOwner: string | undefined) => void;\n\nclass FlagsRegistry {\n  #rulesets = new Map<string, SignalRuleset>();\n  #versionFingerprint = \"\";\n  synced = false;\n  stale = false;\n\n  constructor(readonly scopeOwner: string | undefined) {}\n\n  has(name: string): boolean {\n    return this.#rulesets.has(name);\n  }\n\n  list(): string[] {\n    return [...this.#rulesets.keys()].sort();\n  }\n\n  async load(config: NormalizedRailwayClientConfig): Promise<void> {\n    const rows = await fetchRegistrySignalsShared(config, this.scopeOwner);\n    const next = new Map<string, SignalRuleset>();\n    const versions: string[] = [];\n\n    for (const row of rows) {\n      const ruleset = parseRegistrySignal(row);\n      next.set(ruleset.name, ruleset);\n      versions.push(`${ruleset.name}:${ruleset.version}`);\n    }\n\n    versions.sort();\n    const fingerprint = versions.join(\"|\");\n    this.#rulesets = next;\n    this.#versionFingerprint = fingerprint;\n    this.synced = true;\n    this.stale = false;\n    config.log(`flags refreshed: scope=${this.scopeOwner ?? \"default\"} count=${next.size}`);\n    void this.#versionFingerprint;\n  }\n\n  markStale(): void {\n    this.stale = true;\n    this.synced = false;\n  }\n\n  evaluate<T>(\n    name: string,\n    expected: SignalType | null,\n    ctx: Context | undefined,\n    fallback: T,\n    zero: T,\n    onConflict: ConflictReporter,\n  ): Evaluation<T> {\n    if (this.stale) {\n      return evaluation(fallback ?? zero, \"STALE\", []);\n    }\n\n    const ruleset = this.#rulesets.get(name);\n    if (!ruleset) {\n      return evaluation(fallback ?? zero, \"NOT_FOUND\", []);\n    }\n\n    if (expected != null && ruleset.type !== expected) {\n      return evaluation(fallback ?? zero, \"TYPE_MISMATCH\", []);\n    }\n\n    const result = evaluateFlagRulesetSync(ruleset, contextFromPublic(ctx));\n    if (result.reason === \"CONFLICT\") {\n      onConflict(name, this.scopeOwner);\n    }\n\n    return evaluation(result.value as T, result.reason, traceToSteps(result.trace));\n  }\n}\n\nclass FlagsReadSurface {\n  constructor(\n    private readonly registry: FlagsRegistry,\n    private readonly assertReady: () => void,\n    private readonly onConflict: ConflictReporter,\n    private readonly getConfig: () => NormalizedRailwayClientConfig,\n  ) {}\n\n  getBoolean(name: string, ctx?: Context, fallback?: boolean): boolean {\n    return this.evaluateBoolean(name, ctx, fallback).value;\n  }\n\n  getString(name: string, ctx?: Context, fallback?: string): string {\n    return this.evaluateString(name, ctx, fallback).value;\n  }\n\n  getNumber(name: string, ctx?: Context, fallback?: number): number {\n    return this.evaluateNumber(name, ctx, fallback).value;\n  }\n\n  getJson<T = Record<string, never>>(name: string, ctx?: Context, fallback?: T): T {\n    return this.evaluateJson<T>(name, ctx, fallback).value;\n  }\n\n  /** Untyped read — returns the resolved value as `unknown` (assert at the call site). */\n  get(name: string, ctx?: Context, fallback?: unknown): unknown {\n    return this.evaluate(name, ctx, fallback).value;\n  }\n\n  evaluate(name: string, ctx?: Context, fallback?: unknown): Evaluation<unknown> {\n    this.assertReady();\n    return this.registry.evaluate(\n      name,\n      null,\n      ctx,\n      fallback,\n      undefined,\n      this.onConflict,\n    );\n  }\n\n  evaluateBoolean(name: string, ctx?: Context, fallback?: boolean): Evaluation<boolean> {\n    this.assertReady();\n    return this.registry.evaluate(\n      name,\n      \"bool\",\n      ctx,\n      fallback ?? false,\n      false,\n      this.onConflict,\n    );\n  }\n\n  evaluateString(name: string, ctx?: Context, fallback?: string): Evaluation<string> {\n    this.assertReady();\n    return this.registry.evaluate(name, \"string\", ctx, fallback ?? \"\", \"\", this.onConflict);\n  }\n\n  evaluateNumber(name: string, ctx?: Context, fallback?: number): Evaluation<number> {\n    this.assertReady();\n    return this.registry.evaluate(name, \"number\", ctx, fallback ?? 0, 0, this.onConflict);\n  }\n\n  evaluateJson<T = Record<string, never>>(\n    name: string,\n    ctx?: Context,\n    fallback?: T,\n  ): Evaluation<T> {\n    this.assertReady();\n    return this.registry.evaluate(name, \"json\", ctx, fallback ?? ({} as T), {} as T, this.onConflict);\n  }\n\n  has(name: string): boolean {\n    this.assertReady();\n    return this.registry.has(name);\n  }\n\n  list(): string[] {\n    this.assertReady();\n    return this.registry.list();\n  }\n\n  async refresh(): Promise<void> {\n    this.assertReady();\n    await refreshRegistry(this.registry, this.getConfig());\n  }\n}\n\nclass FlagsModule {\n  #initialized = false;\n  #initOptionsKey: string | undefined;\n  #initPromise: Promise<void> | undefined;\n  #readyResolve: (() => void) | undefined;\n  #ready: Promise<void> = Promise.resolve();\n  #config: NormalizedRailwayClientConfig | undefined;\n  #refreshEnabled = true;\n  #defaultRegistry = new FlagsRegistry(undefined);\n  #scopedRegistries = new Map<string, FlagsRegistry>();\n  #refreshTimer: ReturnType<typeof setTimeout> | null = null;\n  #refreshInFlight: Promise<void> | null = null;\n  #lastActivityAt = Number.NEGATIVE_INFINITY;\n  #lastRefreshStartedAt = 0;\n  #currentBackoffMs = 0;\n\n  get ready(): Promise<void> {\n    return this.#ready;\n  }\n\n  get synced(): boolean {\n    return this.#defaultRegistry.synced;\n  }\n\n  async init(options: FlagsInitOptions = {}): Promise<void> {\n    const optionsKey = initOptionsKey(options);\n    if (this.#initOptionsKey != null && this.#initOptionsKey !== optionsKey) {\n      throw new Error(\"flags.init() called with conflicting options\");\n    }\n\n    if (this.#initPromise) {\n      return this.#initPromise;\n    }\n\n    this.#initOptionsKey = optionsKey;\n    this.#initPromise = this.#initialize(options).catch((error: unknown) => {\n      if (options.required) {\n        this.#initialized = false;\n        this.#initPromise = undefined;\n        this.#initOptionsKey = undefined;\n        this.#config = undefined;\n      }\n      throw error;\n    });\n    return this.#initPromise;\n  }\n\n  scope(scope: FlagsScope): FlagsReadSurface {\n    const owner = serializeScope(scope);\n    let registry = this.#scopedRegistries.get(owner);\n    if (!registry) {\n      registry = new FlagsRegistry(owner);\n      this.#scopedRegistries.set(owner, registry);\n      if (this.#config) {\n        void refreshRegistry(registry, this.#config).catch((error: unknown) => {\n          this.#config?.log(\n            `flags scope refresh failed: ${error instanceof Error ? error.message : String(error)}`,\n          );\n        });\n      }\n    }\n    return this.#readSurface(registry);\n  }\n\n  getBoolean(name: string, ctx?: Context, fallback?: boolean): boolean {\n    return this.#defaultSurface().getBoolean(name, ctx, fallback);\n  }\n\n  getString(name: string, ctx?: Context, fallback?: string): string {\n    return this.#defaultSurface().getString(name, ctx, fallback);\n  }\n\n  getNumber(name: string, ctx?: Context, fallback?: number): number {\n    return this.#defaultSurface().getNumber(name, ctx, fallback);\n  }\n\n  getJson<T = Record<string, never>>(name: string, ctx?: Context, fallback?: T): T {\n    return this.#defaultSurface().getJson<T>(name, ctx, fallback);\n  }\n\n  get(name: string, ctx?: Context, fallback?: unknown): unknown {\n    return this.#defaultSurface().get(name, ctx, fallback);\n  }\n\n  evaluate(name: string, ctx?: Context, fallback?: unknown): Evaluation<unknown> {\n    return this.#defaultSurface().evaluate(name, ctx, fallback);\n  }\n\n  evaluateBoolean(name: string, ctx?: Context, fallback?: boolean): Evaluation<boolean> {\n    return this.#defaultSurface().evaluateBoolean(name, ctx, fallback);\n  }\n\n  evaluateString(name: string, ctx?: Context, fallback?: string): Evaluation<string> {\n    return this.#defaultSurface().evaluateString(name, ctx, fallback);\n  }\n\n  evaluateNumber(name: string, ctx?: Context, fallback?: number): Evaluation<number> {\n    return this.#defaultSurface().evaluateNumber(name, ctx, fallback);\n  }\n\n  evaluateJson<T = Record<string, never>>(\n    name: string,\n    ctx?: Context,\n    fallback?: T,\n  ): Evaluation<T> {\n    return this.#defaultSurface().evaluateJson<T>(name, ctx, fallback);\n  }\n\n  has(name: string): boolean {\n    return this.#defaultSurface().has(name);\n  }\n\n  list(): string[] {\n    return this.#defaultSurface().list();\n  }\n\n  async refresh(): Promise<void> {\n    await this.#defaultSurface().refresh();\n  }\n\n  close(): void {\n    if (this.#refreshTimer !== null) {\n      clearTimeout(this.#refreshTimer);\n      this.#refreshTimer = null;\n    }\n    this.#initialized = false;\n    this.#initPromise = undefined;\n    this.#initOptionsKey = undefined;\n    this.#ready = Promise.resolve();\n    this.#readyResolve = undefined;\n    this.#config = undefined;\n    this.#refreshEnabled = true;\n    this.#defaultRegistry = new FlagsRegistry(undefined);\n    this.#scopedRegistries.clear();\n    this.#refreshInFlight = null;\n    this.#currentBackoffMs = 0;\n    this.#lastActivityAt = Number.NEGATIVE_INFINITY;\n    this.#lastRefreshStartedAt = 0;\n  }\n\n  async #initialize(options: FlagsInitOptions): Promise<void> {\n    this.#initialized = true;\n    this.#config = normalizeFlagsConfig(options);\n    this.#refreshEnabled = options.refresh !== false;\n    this.#defaultRegistry = new FlagsRegistry(\n      resolveFlagsRegistryOwner(options, this.#config),\n    );\n    this.#scopedRegistries.clear();\n\n    this.#ready = new Promise<void>((resolve) => {\n      this.#readyResolve = resolve;\n    });\n\n    try {\n      await syncRegistryWithPolicy(this.#defaultRegistry, this.#config, options);\n      if (this.#refreshEnabled) {\n        this.#scheduleNextRefresh();\n      }\n    } finally {\n      this.#readyResolve?.();\n      this.#readyResolve = undefined;\n    }\n  }\n\n  #defaultSurface(): FlagsReadSurface {\n    return this.#readSurface(this.#defaultRegistry);\n  }\n\n  #readSurface(registry: FlagsRegistry): FlagsReadSurface {\n    return new FlagsReadSurface(\n      registry,\n      () => this.#assertInitialized(),\n      (name, scopeOwner) => {\n        this.#config?.log(\n          `flags conflict: flag=${name} scope=${scopeOwner ?? \"default\"} — matching rules disagreed`,\n        );\n      },\n      () => {\n        if (!this.#config) {\n          throw new Error(\"Call `await flags.init()` at startup before reading feature flags.\");\n        }\n        return this.#config;\n      },\n    );\n  }\n\n  #assertInitialized(): void {\n    if (!this.#initialized) {\n      throw new Error(\"Call `await flags.init()` at startup before reading feature flags.\");\n    }\n    this.#markActiveAndMaybeRefresh();\n  }\n\n  #markActiveAndMaybeRefresh(): void {\n    if (!this.#config || !this.#refreshEnabled) {\n      return;\n    }\n\n    const now = Date.now();\n    this.#lastActivityAt = now;\n    if (\n      !this.#refreshInFlight &&\n      now - this.#lastRefreshStartedAt >= DEFAULT_ACTIVE_REFRESH_INTERVAL_MS\n    ) {\n      void this.#refreshAll().catch((error: unknown) => {\n        this.#config?.log(\n          `flags refresh failed: ${error instanceof Error ? error.message : String(error)}`,\n        );\n      });\n    }\n    this.#scheduleNextRefresh();\n  }\n\n  #scheduleNextRefresh(): void {\n    if (this.#refreshTimer !== null) {\n      clearTimeout(this.#refreshTimer);\n      this.#refreshTimer = null;\n    }\n    if (!this.#config || !this.#refreshEnabled) {\n      return;\n    }\n\n    const delay = this.#nextRefreshDelayMs();\n    this.#refreshTimer = setTimeout(() => {\n      this.#refreshTimer = null;\n      void this.#refreshAll()\n        .catch((error: unknown) => {\n          this.#config?.log(\n            `flags refresh failed: ${error instanceof Error ? error.message : String(error)}`,\n          );\n        })\n        .finally(() => {\n          this.#scheduleNextRefresh();\n        });\n    }, delay);\n    if (typeof this.#refreshTimer === \"object\" && \"unref\" in this.#refreshTimer) {\n      this.#refreshTimer.unref();\n    }\n  }\n\n  #nextRefreshDelayMs(): number {\n    const now = Date.now();\n    const active = now - this.#lastActivityAt <= DEFAULT_ACTIVE_WINDOW_MS;\n    const base = active\n      ? DEFAULT_ACTIVE_REFRESH_INTERVAL_MS\n      : DEFAULT_IDLE_REFRESH_INTERVAL_MS;\n    const withBackoff = Math.max(base, this.#currentBackoffMs);\n    const elapsed = now - this.#lastRefreshStartedAt;\n    const minimumDelay = Math.max(0, DEFAULT_MIN_REFRESH_INTERVAL_MS - elapsed);\n    return Math.max(minimumDelay, applyJitter(withBackoff, DEFAULT_REFRESH_JITTER));\n  }\n\n  async #refreshAll(): Promise<void> {\n    if (this.#refreshInFlight) {\n      return this.#refreshInFlight;\n    }\n\n    if (!this.#config) {\n      return;\n    }\n\n    this.#lastRefreshStartedAt = Date.now();\n    this.#refreshInFlight = (async () => {\n      const registries = [this.#defaultRegistry, ...this.#scopedRegistries.values()];\n      try {\n        await Promise.all(registries.map((registry) => refreshRegistry(registry, this.#config!)));\n        this.#currentBackoffMs = 0;\n      } catch {\n        for (const registry of registries) {\n          registry.markStale();\n        }\n        this.#currentBackoffMs =\n          this.#currentBackoffMs > 0\n            ? Math.min(\n                this.#currentBackoffMs * DEFAULT_BACKOFF_MULTIPLIER,\n                DEFAULT_MAX_BACKOFF_MS,\n              )\n            : Math.min(DEFAULT_ACTIVE_REFRESH_INTERVAL_MS, DEFAULT_MAX_BACKOFF_MS);\n        throw new Error(\"flags registry refresh failed\");\n      }\n    })().finally(() => {\n      this.#refreshInFlight = null;\n    });\n\n    return this.#refreshInFlight;\n  }\n}\n\nfunction evaluation<T>(value: T, reason: Reason, trace: TraceStep[]): Evaluation<T> {\n  return { value, reason, trace };\n}\n\nasync function syncRegistryWithPolicy(\n  registry: FlagsRegistry,\n  config: NormalizedRailwayClientConfig,\n  options: FlagsInitOptions,\n): Promise<void> {\n  const sync = refreshRegistry(registry, config);\n  if (options.timeoutMs == null) {\n    try {\n      await sync;\n    } catch (error) {\n      registry.markStale();\n      if (options.required) {\n        throw error;\n      }\n    }\n    return;\n  }\n\n  try {\n    await Promise.race([\n      sync,\n      new Promise<never>((_, reject) => {\n        setTimeout(() => reject(new Error(\"flags init timed out\")), options.timeoutMs);\n      }),\n    ]);\n  } catch (error) {\n    registry.markStale();\n    if (options.required) {\n      throw error;\n    }\n  }\n}\n\nasync function refreshRegistry(\n  registry: FlagsRegistry,\n  config: NormalizedRailwayClientConfig,\n): Promise<void> {\n  await registry.load(config);\n}\n\nfunction normalizeFlagsConfig(options: FlagsInitOptions): NormalizedRailwayClientConfig {\n  return normalizeRailwayClientConfig({\n    ...(options.token !== undefined ? { token: options.token } : {}),\n    ...(options.authType !== undefined ? { authType: options.authType } : {}),\n    ...(options.endpoint !== undefined ? { endpoint: options.endpoint } : {}),\n    ...(options.fetch !== undefined ? { fetch: options.fetch } : {}),\n    ...(options.verbose !== undefined ? { verbose: options.verbose } : {}),\n  });\n}\n\nfunction initOptionsKey(options: FlagsInitOptions): string {\n  return JSON.stringify({\n    token: options.token,\n    scope: options.scope,\n    refresh: options.refresh,\n    timeoutMs: options.timeoutMs,\n    required: options.required,\n    authType: options.authType,\n    endpoint: options.endpoint,\n    verbose: options.verbose,\n  });\n}\n\nfunction applyJitter(delayMs: number, jitter: number): number {\n  if (delayMs <= 0 || jitter <= 0) {\n    return delayMs;\n  }\n  const boundedJitter = Math.min(Math.max(jitter, 0), 1);\n  const factor = 1 + (Math.random() * 2 - 1) * boundedJitter;\n  return Math.max(0, Math.round(delayMs * factor));\n}\n\nasync function fetchRegistrySignalsShared(\n  config: NormalizedRailwayClientConfig,\n  scopeOwner: string | undefined,\n): Promise<RegistrySignalRow[]> {\n  const key = refreshKey(config, scopeOwner);\n  const existing = sharedRefreshes.get(key);\n  if (existing) {\n    return existing;\n  }\n\n  const refresh = fetchRegistrySignals(config, scopeOwner).finally(() => {\n    sharedRefreshes.delete(key);\n  });\n  sharedRefreshes.set(key, refresh);\n  return refresh;\n}\n\nfunction refreshKey(\n  config: NormalizedRailwayClientConfig,\n  scopeOwner: string | undefined,\n): string {\n  return [\n    config.endpoint,\n    scopeOwner ?? \"default\",\n    config.token,\n    fetchIdentity(config.fetch),\n  ].join(\"\\0\");\n}\n\nfunction fetchIdentity(fetchImpl: typeof fetch): number {\n  const key = fetchImpl as unknown as object;\n  const existing = fetchIds.get(key);\n  if (existing !== undefined) {\n    return existing;\n  }\n  const id = nextFetchId++;\n  fetchIds.set(key, id);\n  return id;\n}\n\n/** Module singleton. Call `await flags.init()` once at startup, then read from `flags`. */\nexport const flags = new FlagsModule();\n\nexport type { FlagsReadSurface };\n"]}