Environment
Category: Core
Source: environment.dart
Classes
Environment
Runtime environment abstraction for paths and environment variables.
Constructor
dart
factory Environment.detect({
String? cwd,
Map<String, String>? vars,
bool? isWindows,
})dart
factory Environment.test({
required String home,
String? cwd,
Map<String, String> vars = const {},
bool isWindows = false,
})Properties
| Property | Type | Description |
|---|---|---|
cwd | String | |
home | String | |
vars | Map<String, String> | |
isWindows | bool | |
glueHomeOverride | String? | Explicit override for the Glue home directory. When set (via the GLUE_HOME environment variable), glueDir returns this path directly instead of $HOME/.glue. null when not overridden. |
glueDir | String get | |
configPath | String get | |
configYamlPath | String get | |
credentialsPath | String get | |
modelsYamlPath | String get | |
sessionsDir | String get | |
logsDir | String get | |
skillsDir | String get | |
cacheDir | String get | |
glueDir | String get | |
configPath | String get | |
configYamlPath | String get | |
credentialsPath | String get | |
modelsYamlPath | String get | |
sessionsDir | String get | |
logsDir | String get | |
skillsDir | String get | |
cacheDir | String get | |
catalogCachePath | String get | Path the refreshed remote catalog is written to and loaded from. Honours $GLUE_CATALOG_CACHE so tests and power users can redirect it without touching $GLUE_HOME. Used by `glue catalog refresh |
Methods
String sessionDir(SessionId sessionId)
String shortenPath(String path)
Replace a leading [home] with ~ for compact display. Returns [path] unchanged when [home] is empty or [path] doesn't sit beneath it.