| 1 | import { type EnvironmentConnectionPhase } from "@t3tools/client-runtime/connection"; |
| 2 | import { EnvironmentId, ThreadId, type ServerConfig } from "@t3tools/contracts"; |
| 3 | |
| 4 | export interface EnvironmentRuntimeState { |
| 5 | readonly connectionState: EnvironmentConnectionPhase; |
| 6 | readonly connectionError: string | null; |
| 7 | readonly connectionErrorTraceId: string | null; |
| 8 | readonly serverConfig: ServerConfig | null; |
| 9 | } |
| 10 | |
| 11 | export interface ConnectedEnvironmentSummary { |
| 12 | readonly environmentId: EnvironmentId; |
| 13 | readonly environmentLabel: string; |
| 14 | readonly displayUrl: string; |
| 15 | readonly isRelayManaged: boolean; |
| 16 | /** False when the user switched the environment off in Settings. */ |
| 17 | readonly isEnabled: boolean; |
| 18 | readonly connectionState: EnvironmentConnectionPhase; |
| 19 | readonly connectionError: string | null; |
| 20 | readonly connectionErrorTraceId: string | null; |
| 21 | } |
| 22 | |
| 23 | export interface SelectedThreadRef { |
| 24 | readonly environmentId: EnvironmentId; |
| 25 | readonly threadId: ThreadId; |
| 26 | } |