Add managed desktop daemon runtime support

This commit is contained in:
Mohamed Boudra
2026-03-08 15:40:02 +07:00
parent faa5aaab6f
commit 2d5d0dcacd
35 changed files with 5377 additions and 421 deletions
@@ -289,7 +289,12 @@ export function resolveTcpHostFromListen(listen: string): string | null {
return null
}
if (normalized.startsWith('/') || normalized.startsWith('unix://')) {
if (
normalized.startsWith('/') ||
normalized.startsWith('unix://') ||
normalized.startsWith('pipe://') ||
normalized.startsWith('\\\\.\\pipe\\')
) {
return null
}
+19 -2
View File
@@ -4,14 +4,16 @@ import { generateLocalPairingOffer, loadConfig, resolvePaseoHome } from '@getpas
interface PairOptions {
home?: string
json?: boolean
}
export function pairCommand(): Command {
return new Command('pair')
.description('Print the daemon pairing QR code and link')
.option('--json', 'Output in JSON format')
.option('--home <path>', 'Paseo home directory (default: ~/.paseo)')
.action(async (options: PairOptions) => {
await runPairCommand(options)
.action(async (_options: PairOptions, command: Command) => {
await runPairCommand(command.optsWithGlobals() as PairOptions)
})
}
@@ -37,6 +39,21 @@ export async function runPairCommand(options: PairOptions): Promise<void> {
process.exit(1)
}
if (options.json) {
process.stdout.write(
`${JSON.stringify(
{
relayEnabled: pairing.relayEnabled,
url: pairing.url,
qr: pairing.qr,
},
null,
2
)}\n`
)
return
}
const qrBlock = pairing.qr ? `${pairing.qr}\n` : ''
process.stdout.write(`\nScan to pair:\n${qrBlock}${pairing.url}\n`)
}