mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-20 13:13:06 +00:00
fix: keep mac local gateway attached
This commit is contained in:
@@ -7,6 +7,7 @@ Docs: https://docs.openclaw.ai
|
||||
### Fixes
|
||||
|
||||
- Memory/QMD: resolve slugified `memory_search` file hints back to the indexed filesystem path before returning search hits, so `memory_get` works again for mixed-case and spaced paths. (#50313) Thanks @erra9x.
|
||||
- macOS/local gateway: stop OpenClaw.app from killing healthy local gateway listeners after startup by recognizing the current `openclaw-gateway` process title and using the current `openclaw gateway` launch shape.
|
||||
|
||||
## 2026.3.28-beta.1
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ enum GatewayEnvironment {
|
||||
let port = self.gatewayPort()
|
||||
if let gatewayBin {
|
||||
let bind = self.preferredGatewayBind() ?? "loopback"
|
||||
let cmd = [gatewayBin, "gateway-daemon", "--port", "\(port)", "--bind", bind]
|
||||
let cmd = [gatewayBin, "gateway", "--port", "\(port)", "--bind", bind]
|
||||
return GatewayCommandResolution(status: status, command: cmd)
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ enum GatewayEnvironment {
|
||||
case let .success(resolvedRuntime) = runtime
|
||||
{
|
||||
let bind = self.preferredGatewayBind() ?? "loopback"
|
||||
let cmd = [resolvedRuntime.path, entry, "gateway-daemon", "--port", "\(port)", "--bind", bind]
|
||||
let cmd = [resolvedRuntime.path, entry, "gateway", "--port", "\(port)", "--bind", bind]
|
||||
return GatewayCommandResolution(status: status, command: cmd)
|
||||
}
|
||||
|
||||
|
||||
@@ -368,8 +368,12 @@ actor PortGuardian {
|
||||
if port == GatewayEnvironment.gatewayPort() { return true }
|
||||
return false
|
||||
case .local:
|
||||
// The gateway daemon may listen as `openclaw` or as its runtime (`node`, `bun`, etc).
|
||||
if full.contains("gateway-daemon") { return true }
|
||||
// Preserve both the legacy hidden alias and the current service process title.
|
||||
if full.contains("gateway-daemon") || full.contains("openclaw-gateway")
|
||||
|| cmd.contains("openclaw-gateway")
|
||||
{
|
||||
return true
|
||||
}
|
||||
// If args are unavailable, treat a CLI listener as expected.
|
||||
if cmd.contains("openclaw"), full == cmd { return true }
|
||||
return false
|
||||
|
||||
@@ -7,7 +7,7 @@ struct GatewayLaunchAgentManagerTests {
|
||||
let url = FileManager().temporaryDirectory
|
||||
.appendingPathComponent("openclaw-launchd-\(UUID().uuidString).plist")
|
||||
let plist: [String: Any] = [
|
||||
"ProgramArguments": ["openclaw", "gateway-daemon", "--port", "18789", "--bind", "loopback"],
|
||||
"ProgramArguments": ["openclaw", "gateway", "--port", "18789", "--bind", "loopback"],
|
||||
"EnvironmentVariables": [
|
||||
"OPENCLAW_GATEWAY_TOKEN": " secret ",
|
||||
"OPENCLAW_GATEWAY_PASSWORD": "pw",
|
||||
@@ -28,7 +28,7 @@ struct GatewayLaunchAgentManagerTests {
|
||||
let url = FileManager().temporaryDirectory
|
||||
.appendingPathComponent("openclaw-launchd-\(UUID().uuidString).plist")
|
||||
let plist: [String: Any] = [
|
||||
"ProgramArguments": ["openclaw", "gateway-daemon", "--port", "18789"],
|
||||
"ProgramArguments": ["openclaw", "gateway", "--port", "18789"],
|
||||
]
|
||||
let data = try PropertyListSerialization.data(fromPropertyList: plist, format: .xml, options: 0)
|
||||
try data.write(to: url, options: [.atomic])
|
||||
|
||||
@@ -167,6 +167,11 @@ struct LowCoverageHelperTests {
|
||||
fullCommand: "python server.py",
|
||||
port: 18789, mode: .local) == false)
|
||||
|
||||
#expect(PortGuardian._testIsExpected(
|
||||
command: "node",
|
||||
fullCommand: "openclaw-gateway",
|
||||
port: 18789, mode: .local) == true)
|
||||
|
||||
#expect(PortGuardian._testIsExpected(
|
||||
command: "node",
|
||||
fullCommand: "node /path/to/gateway-daemon",
|
||||
|
||||
Reference in New Issue
Block a user