wayof-a2a-bridge 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,42 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Way-Of
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ ## Upstream Licenses
26
+
27
+ This distribution includes components from the following upstream projects, each with their own MIT license:
28
+
29
+ - **a2abridge** — Copyright (c) 2024 Vladimir Cherepanov — https://github.com/vbcherepanov/a2abridge
30
+ - **pi-a2a-adaptor** — Copyright (c) 2024 ww2521 — https://github.com/ww2521/pi-a2a-adaptor
31
+ - **real-a2a** — Copyright (c) 2024 EQTY Lab — https://github.com/eqtylab/real-a2a
32
+ - **coding-agent-a2a** — Copyright (c) 2024 casabre — https://github.com/casabre/coding-agent-a2a
33
+ - **opencode-a2a** — Copyright (c) 2024 Intelligent Internet — https://github.com/Intelligent-Internet/opencode-a2a
34
+ - **a2a-bridge** — Copyright (c) 2024 firstintent — https://github.com/firstintent/a2a-bridge
35
+ - **a2acode** — Copyright (c) 2024 kanywst — https://github.com/kanywst/a2acode
36
+ - **agent-comms** — Copyright (c) 2024 GGCryptoh — https://github.com/GGCryptoh/agent-comms
37
+ - **pi-acp-agents** — Copyright (c) 2024 buihongduc132 — https://github.com/buihongduc132/pi-acp-agents
38
+ - **pi-a2a-communication** — Copyright (c) 2024 DrOlu — https://pi.dev/packages/pi-a2a-communication
39
+ - **pi-acp** — Copyright (c) 2024 harms-haus — https://github.com/harms-haus/pi-acp
40
+
41
+ All upstream licenses are preserved in their respective source repositories.
42
+ See CREDITS.md for full attribution details.
package/README.md ADDED
@@ -0,0 +1,355 @@
1
+ # Way of A2A — Agent-to-Agent Mesh for Way of Teams
2
+
3
+ **The missing link between your AI coding agents and team coordination.**
4
+
5
+ Way of A2A connects **opencode, Claude Code, Codex, Cursor, Aider, pi, Zed, VS Code** into a single interoperable mesh using the open **A2A Protocol v1.0** — with **Way of Teams** as the coordination brain (tickets, plans, memory, knowledge).
6
+
7
+ ```bash
8
+ # Linux/macOS
9
+ curl -fsSL https://raw.githubusercontent.com/Way-Of/wayofa2a/main/install.sh | bash
10
+
11
+ # Windows PowerShell
12
+ irm https://raw.githubusercontent.com/Way-Of/wayofa2a/main/install.ps1 | iex
13
+ ```
14
+
15
+ ---
16
+
17
+ ## Why This Exists
18
+
19
+ | Problem | Solution |
20
+ |---------|----------|
21
+ | Agents can't talk to each other | **A2A Protocol** — open standard for agent-to-agent communication |
22
+ | Each agent needs custom integration | **a2abridge** — one MCP bridge, auto-configures all IDEs |
23
+ | No shared context across machines | **Tailscale + a2abridge directory** — global mesh over your tailnet |
24
+ | Work isn't traceable to tickets | **Way of Teams A2A** — coordination layer with full audit trail |
25
+ | Pi is isolated from other agents | **pi-a2a-adaptor** — pi becomes first-class A2A peer |
26
+
27
+ ---
28
+
29
+ ## Architecture
30
+
31
+ ```mermaid
32
+ graph TB
33
+ subgraph ControlPlane["🎯 Way of Teams — Control Plane"]
34
+ Tickets["📋 Tickets"]
35
+ Plans["📐 Plans"]
36
+ Standups["📅 Standups"]
37
+ Kanban["📊 Kanban"]
38
+ Docs["📚 Docs"]
39
+ Knowledge["🧠 Knowledge"]
40
+ Memory["💾 Memory"]
41
+ Coordinator["👑 Coordinator Agent"]
42
+ end
43
+
44
+ subgraph DataPlane["🔗 A2A Mesh — Data Plane"]
45
+ Directory["📡 a2abridge Directory<br/>(Port 7777)"]
46
+
47
+ subgraph IDEAgents["💻 IDE Agents (via a2abridge MCP)"]
48
+ OE1["opencode-private"]
49
+ OE2["opencode-work"]
50
+ OE3["opencode-oczer"]
51
+ CC["Claude Code"]
52
+ CX["Codex"]
53
+ CR["Cursor"]
54
+ AD["Aider"]
55
+ GM["Gemini CLI"]
56
+ CN["Continue"]
57
+ CL["Cline"]
58
+ end
59
+
60
+ subgraph PiAgents["🤖 Pi Agents"]
61
+ PiA2A["pi-a2a-adaptor<br/>(A2A Client)"]
62
+ PiACP["pi-acp-agents<br/>(ACP Client)"]
63
+ PiComm["pi-a2a-communication<br/>(A2A Server)"]
64
+ end
65
+
66
+ subgraph Optional["⚙️ Optional Add-ons"]
67
+ RealA2A["real-a2a<br/>(P2P Swarms)"]
68
+ CodingA2A["coding-agent-a2a<br/>(Docker A2A+MCP)"]
69
+ LiteLLM["LiteLLM<br/>(Model Gateway)"]
70
+ Nacos["Nacos<br/>(Service Registry)"]
71
+ end
72
+ end
73
+
74
+ subgraph Network["🌐 Tailscale Tailnet"]
75
+ Zerwiz["zerwiz (Linux)<br/>100.100.93.103"]
76
+ Zerwiz1["zerwiz-1 (Windows)<br/>100.113.219.49"]
77
+ Craigema["craigema (Fedora)<br/>Tailscale IP"]
78
+ Server["zerwizserver<br/>100.88.238.83"]
79
+ end
80
+
81
+ %% Connections
82
+ Coordinator -->|assigns work| Directory
83
+ Tickets -.->|become A2A tasks| Directory
84
+ Knowledge -.->|inject context| Directory
85
+ Memory -.->|store results| Directory
86
+
87
+ Directory <-->|A2A JSON-RPC + SSE| IDEAgents
88
+ Directory <-->|A2A JSON-RPC + SSE| PiA2A
89
+ Directory <-->|A2A JSON-RPC + SSE| PiComm
90
+
91
+ PiACP -->|ACP stdio| Gemini["Gemini CLI"]
92
+ PiACP -->|ACP stdio| CustomACP["Custom ACP Agents"]
93
+
94
+ RealA2A -.->|Iroh P2P| Directory
95
+ CodingA2A -.->|Docker| Directory
96
+ LiteLLM -.->|Model API| IDEAgents
97
+ Nacos -.->|Service Discovery| Directory
98
+
99
+ Zerwiz -->|Directory Hub :7777| Directory
100
+ Zerwiz1 -.->|Client| Directory
101
+ Craigema -.->|Client| Directory
102
+ Server -.->|Way of Teams| ControlPlane
103
+
104
+ %% Styling
105
+ classDef control fill:#1e3a5f,color:#fff,stroke:#3b82f6
106
+ classDef data fill:#0f172a,color:#fff,stroke:#22c55e
107
+ classDef net fill:#7c2d12,color:#fff,stroke:#f97316
108
+ classDef opt fill:#374151,color:#fff,stroke:#6b7280,stroke-dasharray: 5 5
109
+
110
+ class Tickets,Plans,Standups,Kanban,Docs,Knowledge,Memory,Coordinator control
111
+ class Directory,OE1,OE2,OE3,CC,CX,CR,AD,GM,CN,CL,PiA2A,PiACP,PiComm data
112
+ class Zerwiz,Zerwiz1,Craigema,Server net
113
+ class RealA2A,CodingA2A,LiteLLM,Nacos,Gemini,CustomACP opt
114
+ ```
115
+
116
+ ---
117
+
118
+ ## What This Installs (Core Only)
119
+
120
+ | Component | Purpose | Protocol |
121
+ |-----------|---------|----------|
122
+ | **a2abridge** | Central directory (port 7777) + MCP bridge for all IDE agents | A2A 1.0 + MCP |
123
+ | **pi-a2a-adaptor** | Pi as A2A client — discovers/calls any A2A agent | A2A |
124
+ | **pi-acp-agents** (optional) | Pi as ACP client — spawns Gemini CLI, custom ACP agents | ACP |
125
+ | **Way of Teams MCP** | Coordination layer — tickets, plans, memory, knowledge | Custom MCP |
126
+
127
+ > **Note:** LiteLLM, Nacos, real-a2a are **optional extras** — not required for the core mesh. See [Optional Extras](#optional-extras-separate-from-core-a2a).
128
+ ┌─────────────────────────────────────────────────────────────────┐
129
+ │ WAY OF TEAMS (Control Plane) │
130
+ │ Tickets • Plans • Standups • Kanban • Docs • Knowledge • Memory │
131
+ └─────────────────────────────────────────────────────────────────┘
132
+ │
133
+ ▼
134
+ ┌─────────────────────────────────────────────────────────────────┐
135
+ │ A2A MESH (Data Plane) │
136
+ │ │
137
+ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
138
+ │ │ a2abridge │────►│ Directory │◄────│ pi-a2a- │ │
139
+ │ │ (MCP Hub) │ │ (port 7777) │ │ adaptor │ │
140
+ │ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │
141
+ │ │ │ │ │
142
+ │ ┌────┼────┐ ┌────┼────┐ ┌────┼────┐ │
143
+ │ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ │
144
+ │ opencode claude codex pi opencode real-a2a aider │
145
+ │ (3 prof) code cli (A2A -a2a (P2P) (MCP) │
146
+ │ client) (native) │ │
147
+ └─────────────────────────────────────────────────────────────────┘
148
+ │
149
+ ▼
150
+ ┌────────────────┐
151
+ │ Tailscale │
152
+ │ (cross-machine)│
153
+ └────────────────┘
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Quick Start
159
+
160
+ ### Prerequisites
161
+ - **Tailscale** installed & authenticated (for cross-machine mesh)
162
+ - **Pi** v0.84+ (`pi --version`)
163
+ - **Opencode** latest (`opencode --version`)
164
+ - **Claude Code** latest (`claude --version`)
165
+ - **Codex** latest (`codex --version`)
166
+
167
+ ### Install
168
+
169
+ ```bash
170
+ # 1. Clone (private repo - requires Way-Of access)
171
+ git clone https://github.com/Way-Of/wayofa2a.git
172
+ cd wayofa2a
173
+
174
+ # 2. Run installer
175
+ ./install.sh
176
+
177
+ # 3. Configure (edit with your settings)
178
+ cp configs/a2abridge.env.example ~/.a2abridge/env
179
+ # Edit: A2A_DIRECTORY, A2A_NAME, A2A_MODEL, A2A_SKILLS
180
+
181
+ # 4. Connect to Way of Teams (optional)
182
+ export WOTEAMS_URL=https://teams.zerwiz.org
183
+ export WOTEAMS_TOKEN=<your-token>
184
+
185
+ # 5. Restart & verify
186
+ ~/.a2abridge/bin/a2abridge service restart
187
+ pi --reload
188
+ /a2a-agents # in pi - should list all agents
189
+ ```
190
+
191
+ ---
192
+
193
+ ## Configuration
194
+
195
+ ### a2abridge Environment (`~/.a2abridge/env`)
196
+
197
+ ```bash
198
+ # Directory service (run on hub machine)
199
+ A2A_DIRECTORY=http://100.100.93.103:7777
200
+ A2A_BIND=127.0.0.1:0
201
+ A2A_ADVERTISE_HOST=100.100.93.103
202
+
203
+ # Per-agent identity (set in each agent's shell/profile)
204
+ # opencode-private: A2A_NAME=opencode-private A2A_SKILLS=build,refactor,test
205
+ # opencode-work: A2A_NAME=opencode-work A2A_SKILLS=build,review,deploy
206
+ # opencode-oczer: A2A_NAME=opencode-oczer A2A_SKILLS=research,plan,document
207
+ # claude: A2A_NAME=claude-code A2A_MODEL=claude-opus-4-7 A2A_SKILLS=architect,review
208
+ # codex: A2A_NAME=codex A2A_SKILLS=code,plan
209
+ # pi-a2a: A2A_NAME=pi-a2a-client A2A_SKILLS=orchestrate,research
210
+ ```
211
+
212
+ ### Pi Extensions (auto-installed)
213
+
214
+ ```bash
215
+ # A2A Client (calls other agents)
216
+ pi install pi-a2a-adaptor
217
+
218
+ # ACP Client (spawns Gemini CLI, etc.) - optional
219
+ pi install @buihongduc132/pi-acp-agents
220
+
221
+ # ACP Server (Zed/VS Code drive pi) - optional
222
+ pi install git:github.com/harms-haus/pi-acp
223
+ ```
224
+
225
+ ### Way of Teams Connection
226
+
227
+ ```bash
228
+ # Set in shell profile
229
+ export WOTEAMS_URL=https://teams.zerwiz.org
230
+ export WOTEAMS_TOKEN=<your-api-token>
231
+
232
+ # In pi - discover WoT A2A endpoint
233
+ /a2a-discover https://teams.zerwiz.org/.well-known/agent-card.json
234
+ /a2a-send wayofteams.tickets "Create ticket for feature X"
235
+ ```
236
+
237
+ ---
238
+
239
+ ## Usage Examples
240
+
241
+ ### Pi → Opencode (via a2abridge)
242
+ ```bash
243
+ # In pi:
244
+ /a2a-discover http://100.100.93.103:7777/.well-known/agent-card.json
245
+ /a2a-send opencode-work "Implement JWT auth in src/auth.ts"
246
+ ```
247
+
248
+ ### Opencode → Pi (via pi-a2a-communication server)
249
+ ```bash
250
+ # Requires pi-a2a-communication server on port 10000
251
+ # In opencode (with a2abridge MCP):
252
+ a2a_send_message --target "http://100.100.93.103:10000/.well-known/agent-card.json" --message "Research A2A security"
253
+ ```
254
+
255
+ ### Pi → Way of Teams (coordination)
256
+ ```bash
257
+ # In pi:
258
+ /a2a-send wayofteams.tickets "Create ticket: refactor auth module"
259
+ /a2a-send wayofteams.plans "Get plan for ticket WOTEAMS-123"
260
+ ```
261
+
262
+ ### Cross-Machine (Tailscale)
263
+ ```bash
264
+ # On zerwiz-1 (Windows) or craigema (Fedora):
265
+ # Same install, points to zerwiz directory:
266
+ export A2A_DIRECTORY=http://100.100.93.103:7777
267
+
268
+ # All machines see each other's agents
269
+ /a2a-agents # shows agents from ALL machines
270
+ ```
271
+
272
+ ---
273
+
274
+ ## Verification
275
+
276
+ ```bash
277
+ # a2abridge health
278
+ ~/.a2abridge/bin/a2abridge doctor
279
+
280
+ # List all registered agents
281
+ curl http://100.100.93.103:7777/agents
282
+
283
+ # Pi discovers mesh
284
+ pi -c "/a2a-agents"
285
+
286
+ # Way of Teams A2A endpoint
287
+ curl https://teams.zerwiz.org/.well-known/agent-card.json
288
+ ```
289
+
290
+ ---
291
+
292
+ ## Optional Extras (Separate from Core A2A)
293
+
294
+ These are **NOT required** for the A2A mesh. Only use if you need them.
295
+
296
+ | Extra | Purpose | When to Use |
297
+ |-------|---------|-------------|
298
+ | **LiteLLM Gateway** | Unified model routing (OpenAI, Anthropic, local LM Studio, Ollama) | You want one endpoint for all models across agents |
299
+ | **Nacos Registry** | Scalable A2A service discovery | You have 50+ agents across many machines |
300
+ | **real-a2a** | True P2P swarms (Iroh/gossip) | You want decentralized, no-directory agent chats |
301
+
302
+ ### Install Extras
303
+
304
+ ```bash
305
+ # LiteLLM + Nacos (model routing + service discovery)
306
+ docker-compose -f docker/docker-compose.yml -f docker/docker-compose.extras.yml up -d
307
+
308
+ # real-a2a (P2P swarms)
309
+ curl -fsSL https://raw.githubusercontent.com/eqtylab/real-a2a/main/scripts/install.sh | bash
310
+ ```
311
+
312
+ **Core A2A mesh works WITHOUT any of these.** They're addons for specific scale/architecture needs.
313
+
314
+ ---
315
+
316
+ ## Uninstall
317
+
318
+ ```bash
319
+ ~/.a2abridge/bin/a2abridge uninstall --purge
320
+ pi uninstall pi-a2a-adaptor
321
+ pi uninstall @buihongduc132/pi-acp-agents
322
+ # Remove MCP configs from agents (backed up as .bak)
323
+
324
+ # If you installed extras:
325
+ docker-compose -f docker/docker-compose.yml -f docker/docker-compose.extras.yml down
326
+ ```
327
+
328
+ ---
329
+
330
+ ## License
331
+
332
+ **MIT** — All upstream components are MIT licensed. See [CREDITS.md](CREDITS.md) for full attribution.
333
+
334
+ ---
335
+
336
+ ## Credits
337
+
338
+ This package bundles and configures upstream open-source projects:
339
+
340
+ | Component | Author | Upstream |
341
+ |-----------|--------|----------|
342
+ | a2abridge | Vladimir Cherepanov | https://github.com/vbcherepanov/a2abridge |
343
+ | pi-a2a-adaptor | ww2521 | https://github.com/ww2521/pi-a2a-adaptor |
344
+ | real-a2a | EQTY Lab | https://github.com/eqtylab/real-a2a |
345
+ | coding-agent-a2a | casabre | https://github.com/casabre/coding-agent-a2a |
346
+ | opencode-a2a | Intelligent Internet | https://github.com/Intelligent-Internet/opencode-a2a |
347
+ | a2a-bridge | firstintent | https://github.com/firstintent/a2a-bridge |
348
+ | a2acode | kanywst | https://github.com/kanywst/a2acode |
349
+ | agent-comms | GGCryptoh | https://github.com/GGCryptoh/agent-comms |
350
+ | pi-acp-agents | buihongduc132 | https://github.com/buihongduc132/pi-acp-agents |
351
+ | pi-a2a-communication | DrOlu | https://pi.dev/packages/pi-a2a-communication |
352
+ | pi-acp | harms-haus | https://github.com/harms-haus/pi-acp |
353
+ | Way of Teams A2A | Way-Of team | https://github.com/Way-Of/wayofteams (WOTEAMS-556) |
354
+
355
+ **Thank you to all upstream authors for building the protocols and tools that make this mesh possible.**
@@ -0,0 +1,25 @@
1
+ import type { AgentCard, A2ATask, InboxMessage, A2AToolName, ToolResult } from './types.js';
2
+ export declare function whoami(): Promise<ToolResult<AgentCard>>;
3
+ export declare function listAgents(): Promise<ToolResult<AgentCard[]>>;
4
+ export declare function sendMessage(peerUrl: string, text: string, options?: {
5
+ taskId?: string;
6
+ blocking?: boolean;
7
+ }): Promise<ToolResult<A2ATask>>;
8
+ export declare function sendStreaming(peerUrl: string, text: string): Promise<ToolResult<void>>;
9
+ export declare function getTask(peerUrl: string, taskId: string): Promise<ToolResult<A2ATask>>;
10
+ export declare function cancelTask(peerUrl: string, taskId: string): Promise<ToolResult<void>>;
11
+ export declare function inbox(peek?: boolean): Promise<ToolResult<InboxMessage[]>>;
12
+ export declare function completeTask(taskId: string, text: string): Promise<ToolResult<void>>;
13
+ export declare function register(agentCard: Omit<AgentCard, 'url'> & {
14
+ url?: string;
15
+ }): Promise<ToolResult<AgentCard>>;
16
+ export declare function unregister(): Promise<ToolResult<void>>;
17
+ export declare const TOOLS: A2AToolName[];
18
+ export declare const SKILL_METADATA: {
19
+ name: string;
20
+ version: string;
21
+ description: string;
22
+ tools: A2AToolName[];
23
+ };
24
+ export type { AgentCard, A2AMessage, A2ATask, InboxMessage, A2AToolName, ToolResult } from './types.js';
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAET,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAA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I,CAAC,CAAC,CAE5D;AAED,eAAO,MAAM,KAAK,EAAE,WAAW,EAW9B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;CAK1B,CAAC;AAEF,YAAY,EACV,SAAS,EACT,UAAU,EACV,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAAU,EACX,MAAM,YAAY,CAAC"}
@@ -0,0 +1,65 @@
1
+ function getTools() {
2
+ const g = globalThis;
3
+ if (g.a2a_tools) {
4
+ return g.a2a_tools;
5
+ }
6
+ throw new Error('A2A tools not available. Ensure running in an MCP host with a2a-bridge skill loaded.');
7
+ }
8
+ function callTool(toolName, args) {
9
+ const tools = getTools();
10
+ return tools[toolName](args);
11
+ }
12
+ export async function whoami() {
13
+ return callTool('a2a_whoami', {});
14
+ }
15
+ export async function listAgents() {
16
+ return callTool('a2a_list_agents', {});
17
+ }
18
+ export async function sendMessage(peerUrl, text, options) {
19
+ const msg = {
20
+ text,
21
+ task_id: options?.taskId,
22
+ blocking: options?.blocking
23
+ };
24
+ return callTool('a2a_send_message', { peer_url: peerUrl, ...msg });
25
+ }
26
+ export async function sendStreaming(peerUrl, text) {
27
+ return callTool('a2a_send_streaming', { peer_url: peerUrl, text });
28
+ }
29
+ export async function getTask(peerUrl, taskId) {
30
+ return callTool('a2a_get_task', { peer_url: peerUrl, task_id: taskId });
31
+ }
32
+ export async function cancelTask(peerUrl, taskId) {
33
+ return callTool('a2a_cancel_task', { peer_url: peerUrl, task_id: taskId });
34
+ }
35
+ export async function inbox(peek = false) {
36
+ return callTool('a2a_inbox', { peek });
37
+ }
38
+ export async function completeTask(taskId, text) {
39
+ return callTool('a2a_complete_task', { task_id: taskId, text });
40
+ }
41
+ export async function register(agentCard) {
42
+ return callTool('a2a_register', agentCard);
43
+ }
44
+ export async function unregister() {
45
+ return callTool('a2a_unregister', {});
46
+ }
47
+ export const TOOLS = [
48
+ 'a2a_whoami',
49
+ 'a2a_list_agents',
50
+ 'a2a_send_message',
51
+ 'a2a_send_streaming',
52
+ 'a2a_get_task',
53
+ 'a2a_cancel_task',
54
+ 'a2a_inbox',
55
+ 'a2a_complete_task',
56
+ 'a2a_register',
57
+ 'a2a_unregister'
58
+ ];
59
+ export const SKILL_METADATA = {
60
+ name: 'a2a-bridge',
61
+ version: '1.0.0',
62
+ description: 'Inter-agent collaboration via the A2A 1.0 protocol',
63
+ tools: TOOLS
64
+ };
65
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAaA,SAAS,QAAQ;IACf,MAAM,CAAC,GAAG,UAA2C,CAAC;IACtD,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;QAChB,OAAO,CAAC,CAAC,SAAS,CAAC;IACrB,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,sFAAsF,CAAC,CAAC;AAC1G,CAAC;AAED,SAAS,QAAQ,CAAI,QAAqB,EAAE,IAAa;IACvD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAA2B,CAAC;AACzD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,OAAO,QAAQ,CAAY,YAAY,EAAE,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,OAAO,QAAQ,CAAc,iBAAiB,EAAE,EAAE,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAAe,EACf,IAAY,EACZ,OAAiD;IAEjD,MAAM,GAAG,GAAe;QACtB,IAAI;QACJ,OAAO,EAAE,OAAO,EAAE,MAAM;QACxB,QAAQ,EAAE,OAAO,EAAE,QAAQ;KAC5B,CAAC;IACF,OAAO,QAAQ,CAAU,kBAAkB,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;AAC9E,CAAC;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;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,oDAAoD;IACjE,KAAK,EAAE,KAAK;CACb,CAAC"}
@@ -0,0 +1,32 @@
1
+ export interface AgentCard {
2
+ name: string;
3
+ url: string;
4
+ version: string;
5
+ description?: string;
6
+ skills?: string[];
7
+ cwd?: string;
8
+ }
9
+ export interface A2AMessage {
10
+ task_id?: string;
11
+ text: string;
12
+ blocking?: boolean;
13
+ }
14
+ export interface A2ATask {
15
+ id: string;
16
+ status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
17
+ result?: string;
18
+ error?: string;
19
+ }
20
+ export interface InboxMessage {
21
+ task_id: string;
22
+ from: string;
23
+ text: string;
24
+ timestamp: number;
25
+ }
26
+ export type A2AToolName = 'a2a_whoami' | 'a2a_list_agents' | 'a2a_send_message' | 'a2a_send_streaming' | 'a2a_get_task' | 'a2a_cancel_task' | 'a2a_inbox' | 'a2a_complete_task' | 'a2a_register' | 'a2a_unregister';
27
+ export interface ToolResult<T = unknown> {
28
+ success: boolean;
29
+ data?: T;
30
+ error?: string;
31
+ }
32
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,mBAAmB,GACnB,cAAc,GACd,gBAAgB,CAAC;AAErB,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,OAAO;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import type { AgentCard, A2ATask, InboxMessage, A2AToolName, ToolResult } from './types.js';
2
+ export declare function whoami(): Promise<ToolResult<AgentCard>>;
3
+ export declare function listAgents(): Promise<ToolResult<AgentCard[]>>;
4
+ export declare function sendMessage(peerUrl: string, text: string, options?: {
5
+ taskId?: string;
6
+ blocking?: boolean;
7
+ }): Promise<ToolResult<A2ATask>>;
8
+ export declare function sendStreaming(peerUrl: string, text: string): Promise<ToolResult<void>>;
9
+ export declare function getTask(peerUrl: string, taskId: string): Promise<ToolResult<A2ATask>>;
10
+ export declare function cancelTask(peerUrl: string, taskId: string): Promise<ToolResult<void>>;
11
+ export declare function inbox(peek?: boolean): Promise<ToolResult<InboxMessage[]>>;
12
+ export declare function completeTask(taskId: string, text: string): Promise<ToolResult<void>>;
13
+ export declare function register(agentCard: Omit<AgentCard, 'url'> & {
14
+ url?: string;
15
+ }): Promise<ToolResult<AgentCard>>;
16
+ export declare function unregister(): Promise<ToolResult<void>>;
17
+ export declare const TOOLS: A2AToolName[];
18
+ export declare const SKILL_METADATA: {
19
+ name: string;
20
+ version: string;
21
+ description: string;
22
+ tools: A2AToolName[];
23
+ };
24
+ export type { AgentCard, A2AMessage, A2ATask, InboxMessage, A2AToolName, ToolResult } from './types.js';
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAET,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAAU,EACX,MAAM,YAAY,CAAC;AAmBpB,wBAAsB,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAE7D;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC,CAEnE;AAED,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAChD,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAO9B;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAE5F;AAED,wBAAsB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAE3F;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAE3F;AAED,wBAAsB,KAAK,CAAC,IAAI,UAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC,CAE7E;AAED,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAE1F;AAED,wBAAsB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAEnH;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAE5D;AAED,eAAO,MAAM,KAAK,EAAE,WAAW,EAW9B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;CAK1B,CAAC;AAEF,YAAY,EACV,SAAS,EACT,UAAU,EACV,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAAU,EACX,MAAM,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SKILL_METADATA = exports.TOOLS = void 0;
4
+ exports.whoami = whoami;
5
+ exports.listAgents = listAgents;
6
+ exports.sendMessage = sendMessage;
7
+ exports.sendStreaming = sendStreaming;
8
+ exports.getTask = getTask;
9
+ exports.cancelTask = cancelTask;
10
+ exports.inbox = inbox;
11
+ exports.completeTask = completeTask;
12
+ exports.register = register;
13
+ exports.unregister = unregister;
14
+ function getTools() {
15
+ const g = globalThis;
16
+ if (g.a2a_tools) {
17
+ return g.a2a_tools;
18
+ }
19
+ throw new Error('A2A tools not available. Ensure running in an MCP host with a2a-bridge skill loaded.');
20
+ }
21
+ function callTool(toolName, args) {
22
+ const tools = getTools();
23
+ return tools[toolName](args);
24
+ }
25
+ async function whoami() {
26
+ return callTool('a2a_whoami', {});
27
+ }
28
+ async function listAgents() {
29
+ return callTool('a2a_list_agents', {});
30
+ }
31
+ async function sendMessage(peerUrl, text, options) {
32
+ const msg = {
33
+ text,
34
+ task_id: options?.taskId,
35
+ blocking: options?.blocking
36
+ };
37
+ return callTool('a2a_send_message', { peer_url: peerUrl, ...msg });
38
+ }
39
+ async function sendStreaming(peerUrl, text) {
40
+ return callTool('a2a_send_streaming', { peer_url: peerUrl, text });
41
+ }
42
+ async function getTask(peerUrl, taskId) {
43
+ return callTool('a2a_get_task', { peer_url: peerUrl, task_id: taskId });
44
+ }
45
+ async function cancelTask(peerUrl, taskId) {
46
+ return callTool('a2a_cancel_task', { peer_url: peerUrl, task_id: taskId });
47
+ }
48
+ async function inbox(peek = false) {
49
+ return callTool('a2a_inbox', { peek });
50
+ }
51
+ async function completeTask(taskId, text) {
52
+ return callTool('a2a_complete_task', { task_id: taskId, text });
53
+ }
54
+ async function register(agentCard) {
55
+ return callTool('a2a_register', agentCard);
56
+ }
57
+ async function unregister() {
58
+ return callTool('a2a_unregister', {});
59
+ }
60
+ exports.TOOLS = [
61
+ 'a2a_whoami',
62
+ 'a2a_list_agents',
63
+ 'a2a_send_message',
64
+ 'a2a_send_streaming',
65
+ 'a2a_get_task',
66
+ 'a2a_cancel_task',
67
+ 'a2a_inbox',
68
+ 'a2a_complete_task',
69
+ 'a2a_register',
70
+ 'a2a_unregister'
71
+ ];
72
+ exports.SKILL_METADATA = {
73
+ name: 'a2a-bridge',
74
+ version: '1.0.0',
75
+ description: 'Inter-agent collaboration via the A2A 1.0 protocol',
76
+ tools: exports.TOOLS
77
+ };
78
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AA0BA,wBAEC;AAED,gCAEC;AAED,kCAWC;AAED,sCAEC;A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AC,CAAC;AACnF,CAAC;AAEM,KAAK,UAAU,UAAU,CAAC,OAAe,EAAE,MAAc;IAC9D,OAAO,QAAQ,CAAO,iBAAiB,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;AACnF,CAAC;AAEM,KAAK,UAAU,KAAK,CAAC,IAAI,GAAG,KAAK;IACtC,OAAO,QAAQ,CAAiB,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AACzD,CAAC;AAEM,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,IAAY;IAC7D,OAAO,QAAQ,CAAO,mBAAmB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AACxE,CAAC;AAEM,KAAK,UAAU,QAAQ,CAAC,SAAoD;IACjF,OAAO,QAAQ,CAAY,cAAc,EAAE,SAAS,CAAC,CAAC;AACxD,CAAC;AAEM,KAAK,UAAU,UAAU;IAC9B,OAAO,QAAQ,CAAO,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAC9C,CAAC;AAEY,QAAA,KAAK,GAAkB;IAClC,YAAY;IACZ,iBAAiB;IACjB,kBAAkB;IAClB,oBAAoB;IACpB,cAAc;IACd,iBAAiB;IACjB,WAAW;IACX,mBAAmB;IACnB,cAAc;IACd,gBAAgB;CACjB,CAAC;AAEW,QAAA,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,oDAAoD;IACjE,KAAK,EAAE,aAAK;CACb,CAAC"}
@@ -0,0 +1,32 @@
1
+ export interface AgentCard {
2
+ name: string;
3
+ url: string;
4
+ version: string;
5
+ description?: string;
6
+ skills?: string[];
7
+ cwd?: string;
8
+ }
9
+ export interface A2AMessage {
10
+ task_id?: string;
11
+ text: string;
12
+ blocking?: boolean;
13
+ }
14
+ export interface A2ATask {
15
+ id: string;
16
+ status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
17
+ result?: string;
18
+ error?: string;
19
+ }
20
+ export interface InboxMessage {
21
+ task_id: string;
22
+ from: string;
23
+ text: string;
24
+ timestamp: number;
25
+ }
26
+ export type A2AToolName = 'a2a_whoami' | 'a2a_list_agents' | 'a2a_send_message' | 'a2a_send_streaming' | 'a2a_get_task' | 'a2a_cancel_task' | 'a2a_inbox' | 'a2a_complete_task' | 'a2a_register' | 'a2a_unregister';
27
+ export interface ToolResult<T = unknown> {
28
+ success: boolean;
29
+ data?: T;
30
+ error?: string;
31
+ }
32
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,mBAAmB,GACnB,cAAc,GACd,gBAAgB,CAAC;AAErB,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,OAAO;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "wayof-a2a-bridge",
3
+ "version": "1.0.0",
4
+ "description": "A2A 1.0 protocol SDK for inter-agent collaboration via the Agent-to-Agent protocol",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
15
+ "scripts": {
16
+ "build": "tsc",
17
+ "dev": "tsc -w",
18
+ "test": "vitest run",
19
+ "lint": "eslint src --ext .ts",
20
+ "prepublishOnly": "npm run build"
21
+ },
22
+ "keywords": [
23
+ "a2a",
24
+ "agent-to-agent",
25
+ "protocol",
26
+ "inter-agent",
27
+ "collaboration",
28
+ "mcp"
29
+ ],
30
+ "author": "",
31
+ "license": "MIT",
32
+ "devDependencies": {
33
+ "typescript": "^5.4.0",
34
+ "vitest": "^1.4.0",
35
+ "@types/node": "^20.12.0"
36
+ },
37
+ "files": [
38
+ "dist"
39
+ ]
40
+ }