a2aproject / a2aproject/a2a-cli

feat: add support for SLIMRPC custom protocol binding

未关闭
#17 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
95
派生
4
平均合并
3 天 2 小时
30 天内合并 PR
24

描述

## Summary

Add support for the [SLIMRPC custom protocol binding](https://github.com/a2aproject/experimental-cpb-slimrpc) as an optional transport in the A2A CLI, selectable via `--transport slimrpc`.

## Background

SLIMRPC is Protobuf RPC over [SLIM](https://github.com/agntcy/slim) (Secure Low-Latency Interactive Messaging) — a transport layer designed for agentic workloads that provides:

- Peer-to-peer architecture with NAT/firewall traversal (no centralized broker)
- Hierarchical name-based addressing (`org/namespace/service`) instead of URLs
- End-to-end encryption via [MLS](https://www.rfc-editor.org/rfc/rfc9420)
- Native multicast and group communication
- Bidirectional low-latency messaging

The protocol binding identifier is `https://a2a-protocol.org/bindings/experimental-slimrpc/v1`. Reference Go implementation: [`github.com/agntcy/slim-a2a-go`](https://github.com/agntcy/slim-a2a-go).

## Proposed Changes

- Add `slimrpc` to the `--transport` flag (alongside `rest`, `jsonrpc`, `grpc`)
- Add SLIM-specific flags:
- `--slim-endpoint` — SLIM node endpoint (default `http://127.0.0.1:46357`)
- `--slim-local-name` — local SLIM identity (`org/namespace/app`, default `agntcy/a2a-cli/client`)
- `--slim-secret` — shared secret for app authentication (optional)
- CGO-gated implementation: the SLIM bindings require CGO (`github.com/agntcy/slim-bindings-go/v2`); a stub with a clear error message is compiled when `CGO_ENABLED=0`
- CI: run `slim-bindings-setup` to install the native library before build/test

## Usage

```
a2a send --transport slimrpc --endpoint agntcy/demo/echo_agent \
--slim-endpoint http://127.0.0.1:46357 \
--slim-secret my_secret \
"hello"
```

## References

- Spec: https://github.com/a2aproject/experimental-cpb-slimrpc
- Go library: https://github.com/agntcy/slim-a2a-go
- SLIM project: https://github.com/agntcy/slim

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。