diff --git a/packages/shared/src/types/workspace-runtime.ts b/packages/shared/src/types/workspace-runtime.ts index f2b79f8981c..fcde0ef0fc3 100644 --- a/packages/shared/src/types/workspace-runtime.ts +++ b/packages/shared/src/types/workspace-runtime.ts @@ -1,4 +1,5 @@ import type { TrustAuthorizationPolicy } from "../trust-policy.js"; +import type { RuntimeExposureStatus } from "./runtime-exposure.js"; export type ExecutionWorkspaceStrategyType = | "project_primary" @@ -211,6 +212,8 @@ export interface WorkspaceOverviewPrimaryService { url: string | null; port: number | null; healthStatus: WorkspaceRuntimeService["healthStatus"]; + /** HTTPS exposure state, surfaced separately from process `healthStatus`. */ + exposure?: RuntimeExposureStatus | null; updatedAt: Date; } @@ -305,6 +308,12 @@ export interface WorkspaceRuntimeService { stoppedAt: Date | null; stopPolicy: Record | null; healthStatus: "unknown" | "healthy" | "unhealthy"; + /** + * Structured HTTPS exposure state for the opt-in `tailscale_https` mode, + * modelled independently of `healthStatus` (process health). Null when the + * service does not opt into exposure. See PAP-17049 / PAP-17050. + */ + exposure?: RuntimeExposureStatus | null; configIndex?: number | null; createdAt: Date; updatedAt: Date; diff --git a/server/src/services/execution-workspaces.ts b/server/src/services/execution-workspaces.ts index 2a3cddc4d05..379298de336 100644 --- a/server/src/services/execution-workspaces.ts +++ b/server/src/services/execution-workspaces.ts @@ -981,6 +981,7 @@ function toRuntimeService( stoppedAt: row.stoppedAt ?? null, stopPolicy: (row.stopPolicy as Record | null) ?? null, healthStatus: row.healthStatus as WorkspaceRuntimeService["healthStatus"], + exposure: (row.exposure as WorkspaceRuntimeService["exposure"]) ?? null, configIndex: row.configIndex ?? null, createdAt: row.createdAt, updatedAt: row.updatedAt, @@ -1059,6 +1060,7 @@ function toWorkspaceOverviewPrimaryService( url: service.url, port: service.port, healthStatus: service.healthStatus, + exposure: service.exposure ?? null, updatedAt: service.updatedAt, }; }