Skip to content

Commit 3d862c0

Browse files
committed
feat: merge agentanycast-proto into proto/ directory
Move protocol definitions from the standalone agentanycast-proto repo into the main repo under proto/. This eliminates cross-repo coordination overhead for proto changes while keeping downstream repos (node, relay, python, ts) independent. Changes: - Subtree merge of agentanycast-proto into proto/ - Add ci-proto.yml with path-filtered CI (buf lint, breaking, Go/Python/TS checks) - Update integration.yml to use local proto/ instead of cross-repo checkout - Update README, CONTRIBUTING, docs to reflect new location - Remove duplicated governance files from proto/ (use root-level ones)
1 parent c2520f9 commit 3d862c0

14 files changed

Lines changed: 156 additions & 353 deletions

.github/workflows/ci-proto.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: Proto CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths: ['proto/**']
7+
pull_request:
8+
branches: [main]
9+
paths: ['proto/**']
10+
11+
permissions:
12+
contents: read
13+
14+
defaults:
15+
run:
16+
working-directory: proto
17+
18+
jobs:
19+
buf-lint:
20+
name: Buf Lint
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: bufbuild/buf-setup-action@v1
26+
with:
27+
github_token: ${{ github.token }}
28+
29+
- name: Buf lint
30+
run: buf lint
31+
32+
buf-breaking:
33+
name: Buf Breaking Change Detection
34+
runs-on: ubuntu-latest
35+
if: github.event_name == 'pull_request'
36+
steps:
37+
- uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 0
40+
41+
- uses: bufbuild/buf-setup-action@v1
42+
with:
43+
github_token: ${{ github.token }}
44+
45+
- name: Buf breaking
46+
run: buf breaking --against '.git#branch=main'
47+
48+
go-build:
49+
name: Go Build Check
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- uses: bufbuild/buf-setup-action@v1
55+
with:
56+
github_token: ${{ github.token }}
57+
58+
- name: Generate code from proto
59+
run: buf generate
60+
61+
- uses: actions/setup-go@v5
62+
with:
63+
go-version-file: proto/go.mod
64+
cache: true
65+
66+
- name: Verify generated code compiles
67+
run: go build ./...
68+
69+
python-import:
70+
name: Python Import Check
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v4
74+
75+
- uses: bufbuild/buf-setup-action@v1
76+
with:
77+
github_token: ${{ github.token }}
78+
79+
- name: Generate code from proto
80+
run: buf generate
81+
82+
- uses: actions/setup-python@v5
83+
with:
84+
python-version: '3.12'
85+
86+
- name: Install dependencies
87+
run: pip install grpcio grpcio-tools protobuf
88+
89+
- name: Verify generated Python stubs import correctly
90+
run: |
91+
cd gen/python
92+
python -c "
93+
from agentanycast.v1 import common_pb2
94+
from agentanycast.v1 import a2a_models_pb2
95+
from agentanycast.v1 import agent_card_pb2
96+
from agentanycast.v1 import node_service_pb2
97+
from agentanycast.v1 import streaming_pb2
98+
from agentanycast.v1 import registry_service_pb2
99+
from agentanycast.v1 import node_service_pb2_grpc
100+
from agentanycast.v1 import registry_service_pb2_grpc
101+
print('All Python stubs import successfully')
102+
"
103+
104+
ts-build:
105+
name: TypeScript Build Check
106+
runs-on: ubuntu-latest
107+
steps:
108+
- uses: actions/checkout@v4
109+
110+
- uses: bufbuild/buf-setup-action@v1
111+
with:
112+
github_token: ${{ github.token }}
113+
114+
- name: Generate code from proto
115+
run: buf generate
116+
117+
- uses: actions/setup-node@v4
118+
with:
119+
node-version: '22'
120+
121+
- name: Install dependencies
122+
run: npm install && npm install typescript @grpc/grpc-js @grpc/proto-loader
123+
124+
- name: Verify generated TypeScript compiles
125+
run: npx tsc --noEmit --strict --esModuleInterop --module nodenext --moduleResolution nodenext gen/ts/agentanycast/v1/*.ts

.github/workflows/integration.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ jobs:
3333
repository: agentanycast/agentanycast-node
3434
path: agentanycast-node
3535

36-
- name: Checkout proto
37-
uses: actions/checkout@v4
38-
with:
39-
repository: agentanycast/agentanycast-proto
40-
path: agentanycast-proto
41-
4236
- name: Checkout python SDK
4337
uses: actions/checkout@v4
4438
with:
@@ -51,12 +45,12 @@ jobs:
5145
github_token: ${{ github.token }}
5246

5347
- name: Generate Go code from proto
54-
working-directory: agentanycast-proto
48+
working-directory: proto
5549
run: buf generate
5650

5751
- name: Configure node proto replace
5852
working-directory: agentanycast-node
59-
run: go mod edit -replace github.com/agentanycast/agentanycast-proto=../agentanycast-proto
53+
run: go mod edit -replace github.com/agentanycast/agentanycast-proto=../proto
6054

6155
- name: Set up Docker Buildx
6256
uses: docker/setup-buildx-action@v3

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
*.swp
33
*.swo
44
*~
5+
6+
# Proto code generation output
7+
proto/gen/
8+
proto/node_modules/

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ AgentAnycast is organized as multiple repositories. Choose the one that matches
1515
| Fix/improve the P2P daemon | [agentanycast-node](https://github.com/AgentAnycast/agentanycast-node) | Go 1.25+ | `make build && make test` |
1616
| Fix/improve the Python SDK | [agentanycast-python](https://github.com/AgentAnycast/agentanycast-python) | Python 3.10+ | `pip install -e ".[dev]" && pytest` |
1717
| Fix/improve the TypeScript SDK | [agentanycast-ts](https://github.com/AgentAnycast/agentanycast-ts) | TypeScript | `npm install && npm test` |
18-
| Fix/improve Protobuf definitions | [agentanycast-proto](https://github.com/AgentAnycast/agentanycast-proto) | Protobuf | `buf lint && buf generate` |
18+
| Fix/improve Protobuf definitions | [agentanycast/proto](https://github.com/AgentAnycast/agentanycast/tree/main/proto) | Protobuf | `cd proto && buf lint && buf generate` |
1919
| Fix/improve the Relay server | [agentanycast-relay](https://github.com/AgentAnycast/agentanycast-relay) | Go 1.25+ | `go build ./cmd/relay && go test ./...` |
2020
| Improve docs or report bugs | [agentanycast](https://github.com/AgentAnycast/agentanycast) | Markdown ||
2121

@@ -96,11 +96,11 @@ refactor: extract task state machine into separate module
9696

9797
Some changes span multiple repositories (e.g., adding a new RPC method):
9898

99-
1. Start with `agentanycast-proto` — define the new interface
99+
1. Start with [`proto/`](proto/) in the main repo — define the new interface
100100
2. Update `agentanycast-node` — implement the server side
101101
3. Update `agentanycast-python` and/or `agentanycast-ts` — implement the client side
102102

103-
Open linked PRs in each repository and reference them in your descriptions.
103+
Proto changes are submitted as PRs to the main repo. Downstream changes go to their respective repos with linked references.
104104

105105
## Reporting Security Issues
106106

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,12 @@ The relay is a **zero-knowledge forwarder** -- it passes only encrypted bytes. I
237237

238238
| Repository | Language | Description |
239239
|---|---|---|
240-
| **[agentanycast](https://github.com/AgentAnycast/agentanycast)** | -- | Documentation, examples, community hub -- **you are here** |
240+
| **[agentanycast](https://github.com/AgentAnycast/agentanycast)** | -- | Documentation, protocol definitions ([`proto/`](proto/)), examples -- **you are here** |
241241
| **[agentanycast-mcp](https://github.com/AgentAnycast/agentanycast-mcp)** | Python | MCP server for Claude, Cursor, VS Code, and 13+ AI tools |
242242
| **[agentanycast-python](https://github.com/AgentAnycast/agentanycast-python)** | Python | Python SDK -- `pip install agentanycast` |
243243
| **[agentanycast-ts](https://github.com/AgentAnycast/agentanycast-ts)** | TypeScript | TypeScript SDK -- `npm install agentanycast` |
244244
| **[agentanycast-node](https://github.com/AgentAnycast/agentanycast-node)** | Go | Core daemon -- P2P networking, encryption, A2A engine |
245245
| **[agentanycast-relay](https://github.com/AgentAnycast/agentanycast-relay)** | Go | Relay server + skill registry + multi-relay federation |
246-
| **[agentanycast-proto](https://github.com/AgentAnycast/agentanycast-proto)** | Protobuf | gRPC and A2A data model definitions |
247246

248247
## Documentation
249248

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The relay provides three services:
7575

7676
3. **Federation** — gossip-based synchronization across multiple relays for global agent discovery. Uses Last-Writer-Wins conflict resolution.
7777

78-
### Proto Definitions (`agentanycast-proto`)
78+
### Proto Definitions (`proto/`)
7979

8080
The single source of truth for all interfaces. Contains:
8181

docs/protocol.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ AgentAnycast implements the [A2A (Agent-to-Agent) protocol](https://github.com/a
1717

1818
## Proto Definitions
1919

20-
All types are defined in the `agentanycast.v1` proto package. Source files live in [`agentanycast-proto`](https://github.com/AgentAnycast/agentanycast-proto).
20+
All types are defined in the `agentanycast.v1` proto package. Source files live in [`proto/`](../proto/).
2121

2222
| File | Contents |
2323
|---|---|

docs/versioning.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Each repository follows [Semantic Versioning](https://semver.org/) independently
88

99
| Repository | Current | Versioning |
1010
|---|---|---|
11-
| agentanycast-proto | v0.x.y | Protobuf API contract |
11+
| agentanycast (`proto/`) | v0.x.y | Protobuf API contract |
1212
| agentanycast-node | v0.x.y | Go daemon binary |
1313
| agentanycast-relay | v0.x.y | Relay server binary |
1414
| agentanycast-python | v0.x.y | Python SDK (PyPI) |
@@ -19,7 +19,7 @@ Tags follow the format `v{major}.{minor}.{patch}` (e.g., `v0.3.1`).
1919

2020
## Proto as the Coordination Point
2121

22-
The `agentanycast-proto` repository is the single source of truth for all gRPC service definitions and A2A data models. Breaking changes to proto files require a coordinated release across all downstream repositories.
22+
The `proto/` directory in the main repo is the single source of truth for all gRPC service definitions and A2A data models. Breaking changes to proto files require a coordinated release across all downstream repositories.
2323

2424
**Proto compatibility rules:**
2525

@@ -32,7 +32,7 @@ The `agentanycast-proto` repository is the single source of truth for all gRPC s
3232
When a change touches the proto definitions, releases must happen in this order:
3333

3434
```
35-
agentanycast-proto
35+
proto/ (main repo)
3636
3737
├──► agentanycast-node
3838
@@ -43,7 +43,7 @@ agentanycast-proto
4343
└──► agentanycast-ts
4444
```
4545

46-
1. **Proto**publish the new proto version first.
46+
1. **Proto**merge proto changes to `main` in the main repo first.
4747
2. **Node / Relay** — update the Go module's `go.mod` replace directive, regenerate stubs, release.
4848
3. **Python / TypeScript SDKs** — regenerate stubs from the new proto, update vendored files, release.
4949

proto/CODE_OF_CONDUCT.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

proto/CONTRIBUTING.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)