fix: remove duplicate PID lock and simplify socket path config

- Remove duplicate acquirePidLock call from bootstrap.ts (keep in index.ts
  where proper error handling exists)
- Remove PASEO_SELF_ID_MCP_SOCK env var override from config.ts
This commit is contained in:
Mohamed Boudra
2026-01-30 11:54:15 +07:00
parent 1670c7084b
commit 829de66d2f
2 changed files with 3 additions and 11 deletions
+1 -4
View File
@@ -55,7 +55,7 @@ import {
} from "./connection-offer.js";
import { printPairingQrIfEnabled } from "./pairing-qr.js";
import { startRelayTransport, type RelayTransportController } from "./relay-transport.js";
import { acquirePidLock, releasePidLock } from "./pid-lock.js";
import { releasePidLock } from "./pid-lock.js";
import type {
AgentClient,
AgentProvider,
@@ -499,9 +499,6 @@ export async function createPaseoDaemon(
);
const start = async () => {
// Acquire PID lock to prevent multiple daemon instances
await acquirePidLock(config.paseoHome, selfIdMcpSocketPath);
// Start Self-ID MCP socket server first
await new Promise<void>((resolve, reject) => {
const onError = (err: Error) => {
+2 -7
View File
@@ -15,12 +15,7 @@ function getDefaultListen(): string {
return `127.0.0.1:${DEFAULT_PORT}`;
}
function getSelfIdMcpSocketPath(paseoHome: string, env: NodeJS.ProcessEnv): string {
// Allow override via PASEO_SELF_ID_MCP_SOCK for testing
if (env.PASEO_SELF_ID_MCP_SOCK) {
return env.PASEO_SELF_ID_MCP_SOCK;
}
// Default to ${PASEO_HOME}/self-id-mcp.sock
function getSelfIdMcpSocketPath(paseoHome: string): string {
return path.join(paseoHome, "self-id-mcp.sock");
}
@@ -87,7 +82,7 @@ export function loadConfig(
// Default is TCP at 127.0.0.1:6767
const listen = env.PASEO_LISTEN ?? persisted.listen ?? getDefaultListen();
const mcpListen = getListenForMcp(listen);
const selfIdMcpSocketPath = getSelfIdMcpSocketPath(paseoHome, env);
const selfIdMcpSocketPath = getSelfIdMcpSocketPath(paseoHome);
const envCorsOrigins = env.PASEO_CORS_ORIGINS
? env.PASEO_CORS_ORIGINS.split(",").map((s) => s.trim())