NodeConfig class
Configuration for a NodeRuntime.
Constructors
-
NodeConfig({required Uri hubUri, required NodeId nodeId, required CredentialProvider credentials, required ShellBackend backend, NodeCapabilities? capabilities, String displayName = '', Map<
String, String> labels = const {}, SecurityContext? securityContext, bool onBadCertificate(X509Certificate cert, String host, int port)?, Duration heartbeatInterval = const Duration(seconds: 10), Duration pingInterval = const Duration(seconds: 20), ReconnectPolicy? reconnectPolicy, String agentVersion = omnyShellVersion, bool driveEnabled = true, List<String> driveRoots = const [], bool autoDetachOnDisconnect = true, Duration? autoDetachTimeout, Duration cleanupInterval = const Duration(minutes: 1), Clock clock = const SystemClock(), void logger(String message)?}) - Creates a node configuration.
Properties
- agentVersion → String
-
The OmnyShell build version this node advertises about itself, reported in
PlatformInfo.agentVersion and shown to clients (e.g.
Agent: …in:info). Defaults to omnyShellVersion; SDK embedders may override it with their own agent string.final - autoDetachOnDisconnect → bool
-
Whether a client connection that drops (network loss, crash, terminal
closed) automatically detaches its session — keeping the PTY, shell and
child processes alive for a later resume — instead of terminating it.
Reuses the same detach path as the
:detachcommand. Defaulttrue.final - autoDetachTimeout → Duration?
-
Expiry applied to sessions detached automatically on disconnect, or
nullto keep them indefinitely. (Explicit:detach <timeout>overrides this.)final - backend → ShellBackend
-
Starts sessions on behalf of authorized clients.
final
- capabilities → NodeCapabilities
-
Advertised capabilities.
final
- cleanupInterval → Duration
-
How often the cleanup service scans for expired detached sessions.
final
- clock → Clock
-
The clock (overridable in tests).
final
- credentials → CredentialProvider
-
How the node authenticates to the Hub.
final
- displayName → String
-
A human-friendly display name.
final
- driveEnabled → bool
-
Whether this node accepts OmnyDrive mount sessions (SessionMode.drive).
final
-
driveRoots
→ List<
String> -
Absolute path prefixes a mount may target. Empty allows any path (the
operator is trusted, as with exec). A non-empty list rejects mounts whose
resolved path is not under one of these roots.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heartbeatInterval → Duration
-
How often to send heartbeats.
final
- hubUri → Uri
-
The Hub WebSocket URL (
wss://host:port/...).final -
labels
→ Map<
String, String> -
Operator labels (drive discovery and authorization policy).
final
- logger → void Function(String message)?
-
Optional diagnostic logger.
final
- nodeId → NodeId
-
This node's stable id.
final
- onBadCertificate → bool Function(X509Certificate cert, String host, int port)?
-
Optional TLS certificate override (pinning / self-signed test certs).
nullenforces standard verification.final - pingInterval → Duration
-
WebSocket ping interval used to detect a silently-dropped Hub connection.
If a ping goes unanswered within this interval the socket closes, which
drives reconnection.
final
- reconnectPolicy → ReconnectPolicy
-
The reconnect backoff policy.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- securityContext → SecurityContext?
-
TLS trust roots for verifying the Hub certificate.
nulluses the system trust store.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited