Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cli/src/lib/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export async function startLocalDaemon(): Promise<void> {
for (const key of [
"ANTHROPIC_API_KEY",
"BASE_DATA_DIR",
"RUNTIME_HTTP_PORT",
"VELLUM_DAEMON_TCP_PORT",
"VELLUM_DAEMON_TCP_HOST",
"VELLUM_DAEMON_SOCKET",
Expand Down
10 changes: 4 additions & 6 deletions clients/macos/vellum-assistant/App/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,10 @@ public final class AppDelegate: NSObject, NSApplicationDelegate {

let assistant = loadAssistantFromLockfile()

// Ensure the daemon starts its runtime HTTP server so the app
// can communicate over HTTP instead of IPC.
if FeatureFlagManager.shared.isEnabled(.localHttpEnabled) {
if ProcessInfo.processInfo.environment["RUNTIME_HTTP_PORT"] == nil {
setenv("RUNTIME_HTTP_PORT", "7821", 0)
}
// Ensure the daemon starts its runtime HTTP server so the
// gateway can proxy iOS traffic to it.
if ProcessInfo.processInfo.environment["RUNTIME_HTTP_PORT"] == nil {
setenv("RUNTIME_HTTP_PORT", "7821", 0)
}

configureDaemonTransport(for: assistant)
Expand Down
7 changes: 3 additions & 4 deletions clients/macos/vellum-assistant/App/AssistantCli.swift
Original file line number Diff line number Diff line change
Expand Up @@ -602,10 +602,9 @@ final class AssistantCli {
env[key] = val
}
}
// Forward RUNTIME_HTTP_PORT only when the localHttpEnabled flag
// is active, so the daemon doesn't start its HTTP server by default.
if FeatureFlagManager.shared.isEnabled(.localHttpEnabled),
let port = fullEnv["RUNTIME_HTTP_PORT"] ?? getenv("RUNTIME_HTTP_PORT").flatMap({ String(cString: $0) }) {
// Always forward RUNTIME_HTTP_PORT so the daemon starts its
// HTTP server — required for iOS pairing via the gateway.
if let port = fullEnv["RUNTIME_HTTP_PORT"] ?? getenv("RUNTIME_HTTP_PORT").flatMap({ String(cString: $0) }) {
env["RUNTIME_HTTP_PORT"] = port
}
proc.environment = env
Expand Down