/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { IA2AAgentDescriptor } from "@workglow/a2a/util"; import type { TaskGraphJson } from "@workglow/task-graph"; import type { Command } from "commander"; /** Nothing standard sits here, and it is one along from the MCP server. */ export declare const DEFAULT_A2A_PORT = 8789; /** * Loopback by default, and deliberately not a wildcard by accident. * * Every message this server accepts runs an agent that can spend model quota * and call whatever tools its saved graph holds, so binding it where the * network can reach it must be something an operator says out loud. */ export declare const DEFAULT_A2A_HOST = "127.0.0.1"; /** * The environment variable a pinned token can arrive in. * * Preferred over `--token`: a peer's config has to hold the same token across * restarts, and an argument that never changes is one every other process on * the machine can read out of `ps`. */ export declare const A2A_TOKEN_ENV = "WORKGLOW_A2A_TOKEN"; /** * A saved graph, as one servable agent — or the reason it is not one. * * Only a single `AgentTask` maps: A2A publishes one agent per card, and an * agent is a conversation a peer continues. A larger graph has no single * conversation, and the rest of the agents folder holds graphs that cannot * answer a message at all. A node saved without a model is refused here too, * at startup, rather than discovered by the first peer to write. */ export declare function descriptorFromGraph(id: string, graph: TaskGraphJson): IA2AAgentDescriptor; /** Adds `serve` to the `a2a` group: one saved agent, published to A2A peers. */ export declare function registerA2AServeCommand(a2a: Command): void;