feat(connect): keep macOS hosts reachable after reboot

This commit is contained in:
Theo Browne committed 2026-07-30 03:16:05 -07:00
1 parent 90f3913a81
commit ec3c5f68d2
12 files changed
+690 -91

No files matched your search

+2 -2
View File
@@ -21,8 +21,8 @@ export const ExecutionEnvironmentPlatform = Schema.Struct({
export type ExecutionEnvironmentPlatform = typeof ExecutionEnvironmentPlatform.Type;
/** How a server can replace itself with another version when asked over RPC:
"boot-service" rewrites the systemd user unit and restarts it; "respawn"
installs the target version and respawns the foreground process. */
"boot-service" hands off through its systemd unit or macOS LaunchAgent;
"respawn" installs the target version and replaces the foreground process. */
export const ServerSelfUpdateMethod = Schema.Literals(["boot-service", "respawn"]);
export type ServerSelfUpdateMethod = typeof ServerSelfUpdateMethod.Type;
+7
View File
@@ -51,4 +51,11 @@ export const HostProcessArguments = Context.Reference<ReadonlyArray<string>>(
},
);
export const HostProcessUserId = Context.Reference<number | null>(
"@t3tools/shared/hostProcess/HostProcessUserId",
{
defaultValue: () => (typeof process.getuid === "function" ? process.getuid() : null),
},
);
export const isHostWindows = Effect.map(HostProcessPlatform, (platform) => platform === "win32");