@dxos/react-client
    Preparing search index...

    Interface DebugPortController

    Start/stop handle for the agent debug port.

    The port evaluates arbitrary code in the page, so activation is always a deliberate act: flipping the switch in the running app, or launching a dev server with the debug-port flag (compiled out of production builds, so it cannot reach a deployed origin). The flag's caller knows the session id up front only when it supplied DX_DEBUG_PORT_SESSION; with DX_DEBUG_PORT alone the id is generated and read back from temp/debug-port.json.

    interface DebugPortController {
        getStatus(): DebugPortStatus;
        resume(options?: DebugPortStartOptions): undefined | string;
        start(options?: DebugPortStartOptions): string;
        stop(): void;
        subscribe(listener: () => void): () => void;
    }
    Index

    Methods

    • Restart a session persisted by start({ persist: true }) in this tab, reusing its id so the agent's existing session id keeps working across the reload. Returns the id, or undefined when there is nothing live to resume. Never mints a new session: with no unexpired record this is a no-op, so calling it at startup cannot turn the port on by itself.

      Parameters

      Returns undefined | string

    • Returns the new session id; a no-op returning the current session if already running.

      Parameters

      Returns string

    • Returns void

    • Parameters

      • listener: () => void

      Returns () => void