UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

45 lines (44 loc) 1.68 kB
import { t as definePluginEntry } from "../../plugin-entry-C7DUzV0e.js"; //#region extensions/bonjour/index.ts /** * Bonjour gateway-discovery plugin entry. It advertises the local gateway over * mDNS and lazily loads the ciao-based advertiser. */ function formatBonjourInstanceName(displayName) { const trimmed = displayName.trim(); if (!trimmed) return "OpenClaw"; if (/openclaw/i.test(trimmed)) return trimmed; return `${trimmed} (OpenClaw)`; } /** Plugin entry for Bonjour/mDNS gateway discovery. */ var bonjour_default = definePluginEntry({ id: "bonjour", name: "Bonjour Gateway Discovery", description: "Advertise the local OpenClaw gateway over Bonjour/mDNS.", register(api) { api.registerGatewayDiscoveryService({ id: "bonjour", advertise: async (ctx) => { const [{ startGatewayBonjourAdvertiser }, { registerUncaughtExceptionHandler, registerUnhandledRejectionHandler }] = await Promise.all([import("../../advertiser-NRPYpq1u.js"), import("../../plugin-sdk/runtime.js")]); return { stop: (await startGatewayBonjourAdvertiser({ instanceName: formatBonjourInstanceName(ctx.machineDisplayName), gatewayPort: ctx.gatewayPort, gatewayTlsEnabled: ctx.gatewayTlsEnabled, gatewayTlsFingerprintSha256: ctx.gatewayTlsFingerprintSha256, gatewayDirectReachable: ctx.gatewayDirectReachable, canvasPort: ctx.canvasPort, sshPort: ctx.sshPort, tailnetDns: ctx.tailnetDns, cliPath: ctx.cliPath, minimal: ctx.minimal }, { logger: api.logger, registerUncaughtExceptionHandler, registerUnhandledRejectionHandler })).stop }; } }); } }); //#endregion export { bonjour_default as default };