openmixer — generated API reference
    Preparing search index...

    Function detectForeignConsole

    • The single-instance guard's probe (2026-07-13 deploy incident): the PipeWire global id of a node named nodeName already LIVE on the graph — i.e. another engine's console — or undefined when the graph stays clean for the whole windowMs. Runs BEFORE this rig creates its own console node, so any hit is by definition foreign.

      Two engines on one graph never crash each other — they name-collide: every JACK-style node.name:port.name resolution can land on the OTHER engine's node, so links go to the wrong console and the boot-time session restore crawls through per-edge readiness retries against a registry both engines are mutating — a silent, minutes-long stall before the port ever binds, indistinguishable from a hang. The guard turns that into a bounded, one-line refusal.

      Polls the WHOLE window rather than trusting the first read: the registry mirror fills asynchronously after start(), so early emptiness is "not mirrored yet", not "absent".

      Parameters

      • graph: ConsolePresenceGraph
      • nodeName: string
      • windowMs: number = FOREIGN_CONSOLE_GUARD_MS
      • pollMs: number = FOREIGN_CONSOLE_POLL_MS

      Returns Promise<number | undefined>