User Request
Implement three related changes in the API schema repository to align with the architecture documentation:
- Rename
teams → agents in the protobuf definitions
- Add gateway ConnectRPC proto services that import and reuse message types from internal protos
- Remove OpenAPI specs — ConnectRPC makes proto the single source of truth
Specification
1. Rename teams → agents (protobuf)
| Aspect |
Current |
Target |
| File path |
proto/agynio/api/teams/v1/teams.proto |
proto/agynio/api/agents/v1/agents.proto |
| Package |
agynio.api.teams.v1 |
agynio.api.agents.v1 |
go_package |
github.com/agynio/api/gen/agynio/api/teams/v1;teamsv1 |
github.com/agynio/api/gen/agynio/api/agents/v1;agentsv1 |
| Service name |
TeamsService |
AgentsService |
All message types, RPCs, field numbers, and field names remain identical — only package, path, service name, and go_package change.
File operations:
- Create
proto/agynio/api/agents/v1/agents.proto
- Delete
proto/agynio/api/teams/v1/teams.proto (and the teams/ directory)
Breaking change note: This is a package rename which will fail Buf's FILE breaking strategy. This is intentional — document in the PR.
2. Add Gateway ConnectRPC Proto Services
Create proto/agynio/api/gateway/v1/ with these files. All share:
syntax = "proto3";
package agynio.api.gateway.v1;
option go_package = "github.com/agynio/api/gen/agynio/api/gateway/v1;gatewayv1";
Each file imports the corresponding internal proto and exposes a subset of RPCs.
2.1 agents.proto — AgentsGateway
- Import:
agynio/api/agents/v1/agents.proto
- Expose: All 40 RPCs (all CRUD for agents, volumes, volume attachments, MCPs, skills, hooks, envs, init scripts)
2.2 threads.proto — ThreadsGateway
- Import:
agynio/api/threads/v1/threads.proto
- Expose: All 8 RPCs (CreateThread, ArchiveThread, AddParticipant, SendMessage, GetThreads, GetMessages, GetUnackedMessages, AckMessages)
2.3 chat.proto — ChatGateway
- Import:
agynio/api/chat/v1/chat.proto
- Expose: All 5 RPCs (CreateChat, GetChats, GetMessages, SendMessage, MarkAsRead)
2.4 notifications.proto — NotificationsGateway
- Import:
agynio/api/notifications/v1/notifications.proto
- Expose: 1 RPC —
Subscribe (server-streaming). Publish is internal-only.
2.5 files.proto — FilesGateway
- Import:
agynio/api/files/v1/files.proto
- Expose: All 3 RPCs (UploadFile client-streaming, GetFileMetadata, GetDownloadUrl)
2.6 agent_state.proto — AgentStateGateway
- Import:
agynio/api/agent_state/v1/agent_state.proto
- Expose: All 9 RPCs
2.7 token_counting.proto — TokenCountingGateway
- Import:
agynio/api/token_counting/v1/token_counting.proto
- Expose: All 1 RPC (CountTokens)
2.8 llm.proto — LLMGateway
- Import:
agynio/api/llm/v1/llm.proto
- Expose: 2 RPCs —
CreateResponse (unary) and CreateResponseStream (server-streaming). Provider/model CRUD methods are internal-only.
2.9 secrets.proto — SecretsGateway
- Import:
agynio/api/secrets/v1/secrets.proto
- Expose: 1 RPC —
ResolveSecret
Skip TracingGateway — no tracing/v1 proto exists yet.
3. Remove OpenAPI Specs
Delete entirely:
openapi/ directory (all contents — team/v1, llm/v1, files/v1, chat/v1)
.spectral.yaml (OpenAPI linter config, no longer needed)
.github/workflows/openapi-publish.yml (bundles/publishes OpenAPI specs)
Keep unchanged:
.github/workflows/buf-pr.yaml
.github/workflows/buf-publish.yaml
buf.yaml (new gateway protos auto-discovered under proto/)
Summary of File Operations
| Operation |
Path |
| Add |
proto/agynio/api/agents/v1/agents.proto |
| Delete |
proto/agynio/api/teams/v1/teams.proto |
| Add |
proto/agynio/api/gateway/v1/agents.proto |
| Add |
proto/agynio/api/gateway/v1/threads.proto |
| Add |
proto/agynio/api/gateway/v1/chat.proto |
| Add |
proto/agynio/api/gateway/v1/notifications.proto |
| Add |
proto/agynio/api/gateway/v1/files.proto |
| Add |
proto/agynio/api/gateway/v1/agent_state.proto |
| Add |
proto/agynio/api/gateway/v1/token_counting.proto |
| Add |
proto/agynio/api/gateway/v1/llm.proto |
| Add |
proto/agynio/api/gateway/v1/secrets.proto |
| Delete |
openapi/ (entire tree) |
| Delete |
.spectral.yaml |
| Delete |
.github/workflows/openapi-publish.yml |
User Request
Implement three related changes in the API schema repository to align with the architecture documentation:
teams→agentsin the protobuf definitionsSpecification
1. Rename
teams→agents(protobuf)proto/agynio/api/teams/v1/teams.protoproto/agynio/api/agents/v1/agents.protoagynio.api.teams.v1agynio.api.agents.v1go_packagegithub.com/agynio/api/gen/agynio/api/teams/v1;teamsv1github.com/agynio/api/gen/agynio/api/agents/v1;agentsv1TeamsServiceAgentsServiceAll message types, RPCs, field numbers, and field names remain identical — only package, path, service name, and
go_packagechange.File operations:
proto/agynio/api/agents/v1/agents.protoproto/agynio/api/teams/v1/teams.proto(and theteams/directory)Breaking change note: This is a package rename which will fail Buf's
FILEbreaking strategy. This is intentional — document in the PR.2. Add Gateway ConnectRPC Proto Services
Create
proto/agynio/api/gateway/v1/with these files. All share:Each file imports the corresponding internal proto and exposes a subset of RPCs.
2.1
agents.proto— AgentsGatewayagynio/api/agents/v1/agents.proto2.2
threads.proto— ThreadsGatewayagynio/api/threads/v1/threads.proto2.3
chat.proto— ChatGatewayagynio/api/chat/v1/chat.proto2.4
notifications.proto— NotificationsGatewayagynio/api/notifications/v1/notifications.protoSubscribe(server-streaming).Publishis internal-only.2.5
files.proto— FilesGatewayagynio/api/files/v1/files.proto2.6
agent_state.proto— AgentStateGatewayagynio/api/agent_state/v1/agent_state.proto2.7
token_counting.proto— TokenCountingGatewayagynio/api/token_counting/v1/token_counting.proto2.8
llm.proto— LLMGatewayagynio/api/llm/v1/llm.protoCreateResponse(unary) andCreateResponseStream(server-streaming). Provider/model CRUD methods are internal-only.2.9
secrets.proto— SecretsGatewayagynio/api/secrets/v1/secrets.protoResolveSecretSkip TracingGateway — no
tracing/v1proto exists yet.3. Remove OpenAPI Specs
Delete entirely:
openapi/directory (all contents — team/v1, llm/v1, files/v1, chat/v1).spectral.yaml(OpenAPI linter config, no longer needed).github/workflows/openapi-publish.yml(bundles/publishes OpenAPI specs)Keep unchanged:
.github/workflows/buf-pr.yaml.github/workflows/buf-publish.yamlbuf.yaml(new gateway protos auto-discovered underproto/)Summary of File Operations
proto/agynio/api/agents/v1/agents.protoproto/agynio/api/teams/v1/teams.protoproto/agynio/api/gateway/v1/agents.protoproto/agynio/api/gateway/v1/threads.protoproto/agynio/api/gateway/v1/chat.protoproto/agynio/api/gateway/v1/notifications.protoproto/agynio/api/gateway/v1/files.protoproto/agynio/api/gateway/v1/agent_state.protoproto/agynio/api/gateway/v1/token_counting.protoproto/agynio/api/gateway/v1/llm.protoproto/agynio/api/gateway/v1/secrets.protoopenapi/(entire tree).spectral.yaml.github/workflows/openapi-publish.yml