AgentSdkServerInstaller class final

Installs the AI server's dependencies into the app's data folder, on the user's request.

sourceDir holds the three shipped files (agentSdkServerSourceFiles); installDir is <app-data>/ai, where the runnable server ends up. The install is built in a sibling directory and moved into place only after it passed verifyAgentSdkPayloadFor, so an interrupted or failed install leaves the previous state — installed or not — exactly as it was.

Constructors

AgentSdkServerInstaller({required String sourceDir, required String installDir, List<String>? npmCommand, AgentSdkCommandRunner? runCommand})
The Node the install runs with is not a property of the installer but of each install: it is the transport's resolution — the one the server will run on, so npm picks the CLI the SDK will look for — and the transport makes it on its first probe, after this installer exists.

Properties

hashCode → int
The hash code for this object.
no setterinherited
installDir → String
Where the server is installed: <app-data>/ai.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serverScript → String
The server script the transport runs once installed.
no setter
sourceDir → String
The shipped server source: the packaged app's ai/ folder, or a source checkout's tom_core_agentic/node.
final
state → AgentSdkServerInstallState
Whether the server is installed and current. A handful of stats and one lockfile comparison; called from a probe, never from the availability gate.
no setter

Methods

install({required LlmNodeResolution node, void onProgress(String line)?}) → Future<AgentSdkServerInstallResult>
Installs the server on the Node node resolved. Never throws; every failure is an outcome with a sentence for the user, and every one leaves the previous install alone.
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

Static Methods

installDirFor(String appDataDirectory) → String
The <app-data>/ai directory for an app data directory.