/** * What Settings › Infrastructure shows under Environment, and the setup tags * its Services rows carry: the database this deployment uses, where it is * hosted and at which addresses, which deploy variables are set, and what the * app profile requires. Values are never returned, only whether each is set. * * Read through the `get-infrastructure-status` action (owners and admins). */ import { type DeployPlatform } from "./deploy-environment.js"; export type InfrastructureDatabaseProvider = "neon" | "supabase" | "aws-rds" | "postgres" | "pglite"; export interface InfrastructureDatabase { /** A database URL resolved for this process. */ configured: boolean; /** A PGlite file on this machine, not a shared Postgres server. */ local: boolean; provider: InfrastructureDatabaseProvider | null; /** The server's host name. Never the URL or its credentials. */ host: string | null; /** The variable the URL came from, e.g. `DATABASE_URL`. */ sourceKey: string | null; /** The variable that gives only this app its own database. */ appDatabaseKey: string | null; } export interface InfrastructureApp { id: string; name: string; /** The app's public address, when the workspace manifest names one. */ url: string | null; /** The app's mount path under the workspace gateway. */ path: string | null; } export interface InfrastructureHosting { platform: DeployPlatform; /** Deploy environment, e.g. `production`, `preview`, or `local`. */ environment: string; /** Every app of the workspace, or this app alone outside one. */ apps: InfrastructureApp[]; /** Where the workspace serves its apps; null outside a workspace. */ gatewayUrl: string | null; } export type InfrastructureVariableKey = "DATABASE_URL" | "A2A_SECRET" | "BETTER_AUTH_SECRET" | "APP_URL" | "SECRETS_ENCRYPTION_KEY"; export interface InfrastructureVariable { key: InfrastructureVariableKey; required: boolean; set: boolean; /** Set, but shorter than the 32 characters a secret needs. */ weak?: true; } export type InfrastructureSetupTag = "required" | "recommended"; /** Setup tags from the app profile, keyed by the Services row they mark. */ export interface InfrastructureSetupTags { model: InfrastructureSetupTag | null; storage: InfrastructureSetupTag | null; voice: InfrastructureSetupTag | null; images: InfrastructureSetupTag | null; embeddings: InfrastructureSetupTag | null; } export interface InfrastructureStatus { /** The app runs inside a multi-app workspace. */ workspace: boolean; database: InfrastructureDatabase; hosting: InfrastructureHosting; variables: InfrastructureVariable[]; setupTags: InfrastructureSetupTags; } export declare function databaseProviderForHost(host: string | undefined): InfrastructureDatabaseProvider; /** * The apps in a workspace manifest (`AGENT_NATIVE_WORKSPACE_APPS_JSON`). A * manifest that doesn't parse throws: an empty list would read as a workspace * with no apps. */ export declare function parseWorkspaceApps(raw: string): InfrastructureApp[]; export declare function getInfrastructureStatus(options?: { appId?: string; }): InfrastructureStatus;