/** * Bridge from the CLI to the AgenticROS MCP server's `ros2_discover_robots` tool. * * Rather than re-implement live-topic discovery in the CLI (which would * force `@agenticros/core` and its transport deps into the published * `agenticros` tarball), we spawn the existing MCP server binary * (`packages/agenticros-claude-code/dist/index.js`) and JSON-RPC the * `ros2_discover_robots` tool — the exact code path Claude Code uses. * This keeps the CLI light AND ensures the CLI sees the same robots * the agent sees. * * Resilience: the spawn-and-rpc dance is wrapped in an overall timeout * so a hung Zenoh router or a malformed reply can't lock up the CLI. * The stderr stream is drained silently — the MCP server emits a * connection banner that isn't useful for the CLI consumer. */ export interface DetectedRobot { id: string; cmdVelTopic: string; topicCount: number; configuredRobotId: string | null; } export interface ConfiguredRobotSummary { id: string; name: string; namespace: string; cameraTopic: string; source: "config" | "legacy"; } export interface DiscoveryResult { total_topics: number; detected: DetectedRobot[]; configured_online: ConfiguredRobotSummary[]; configured_offline: ConfiguredRobotSummary[]; unknown_detected: DetectedRobot[]; } /** * Resolve the path to the AgenticROS MCP server entrypoint, mirroring * the same lookup the rest of the CLI uses. Returns undefined when the * dist hasn't been built yet (so the caller can surface an actionable * error rather than a cryptic spawn failure). */ export declare function findMcpEntry(): string | undefined; /** * Run `ros2_discover_robots` against the MCP server and return the * parsed `DiscoveryResult`. * * Throws with an actionable message when: * - the MCP server binary can't be found (suggests `pnpm build`) * - the initialize handshake times out (suggests Zenoh / config issues) * - the tool reports `isError: true` (surfaces the inner error) * * Always cleans up the child process — no orphan node processes after * a failed call. */ export declare function discoverViaMcp(): Promise; //# sourceMappingURL=mcp-discovery.d.ts.map