-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
User Request
Implement three related changes in the API schema repository to align with the architecture documentation:
- Rename
teams→agentsin 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 theteams/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).Publishis 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) andCreateResponseStream(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.yamlbuf.yaml(new gateway protos auto-discovered underproto/)
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 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels