-
Notifications
You must be signed in to change notification settings - Fork 0
Description
User Request
Replace all old team entities in both the gRPC proto and OpenAPI spec with the new resource model defined in agynio/architecture (architecture/resource-definitions.md, architecture/teams.md). This is an intentional breaking change — no new API version needed, update in place.
Old entities to remove: Agent (config-blob style), Tool, McpServer, WorkspaceConfiguration, MemoryBucket, Variable, Attachment (generic source/target)
New entities: Agent (flat fields), Volume, VolumeAttachment, MCP, Skill, Hook, ENV, InitScript
Specification
Design Decisions
- EntityMeta stays slim —
{id, created_at, updated_at}.descriptionis a direct field on each entity that supports it (all except VolumeAttachment). - Cursor-based pagination everywhere — proto already uses
page_size/page_token/next_page_token. OpenAPI switches from offset to cursor-based (pageSize/pageToken/nextPageToken). DeletePagination.yaml. - Mutually-exclusive fields — proto uses
oneoffor VolumeAttachment target, Env target+source, InitScript target. OpenAPI uses optional fields with descriptive constraints. - Naming:
Mcp(notMcpServer),Env(notVariable). Paths kebab-case:/volume-attachments,/init-scripts. - VolumeAttachment — immutable: Create/Get/Delete/List only, no Update.
- Ownership immutability —
agent_id,mcp_id,hook_idexcluded from Update requests. - ComputeResources — shared sub-message:
requests_cpu,requests_memory,limits_cpu,limits_memory(all optional strings).
Proto Changes
File: proto/agynio/api/teams/v1/teams.proto — full replacement.
- Remove
google/protobuf/struct.protoimport - 39 RPCs across 8 entities in
TeamsService - All old enums removed (ToolType, EntityType, AttachmentKind, etc.)
- New messages: Agent, Volume, VolumeAttachment, Mcp, Skill, Hook, Env, InitScript + ComputeResources + EntityMeta
oneoffor mutually exclusive fields
OpenAPI Changes
Files to DELETE (48):
Schemas (35): AgentConfig, Attachment, AttachmentCreateRequest, AttachmentKind, EntityType, McpEnvItem, McpServer, McpServerConfig, McpServerCreateRequest, McpServerUpdateRequest, MemoryBucket, MemoryBucketConfig, MemoryBucketCreateRequest, MemoryBucketUpdateRequest, Pagination, PaginatedAttachments, PaginatedMcpServers, PaginatedMemoryBuckets, PaginatedTools, PaginatedVariables, PaginatedWorkspaceConfigurations, Tool, ToolCreateRequest, ToolType, ToolUpdateRequest, Variable, VariableCreateRequest, VariableUpdateRequest, WorkspaceConfig, WorkspaceConfiguration, WorkspaceConfigurationCreateRequest, WorkspaceConfigurationUpdateRequest, WorkspaceEnvItem, WorkspacePlatform, WorkspaceVolumeConfig
Paths (13): attachments, attachment-by-id, mcp-servers, mcp-server-by-id, memory-buckets, memory-bucket-by-id, tools, tool-by-id, variables, variable-by-id, variable-resolve, workspace-configurations, workspace-configuration-by-id
Files to KEEP unchanged (4): IdPath.yaml, ProblemResponse.yaml, EntityMeta.yaml, Problem.yaml
Files to MODIFY (7): openapi.yaml, Agent.yaml, AgentCreateRequest.yaml, AgentUpdateRequest.yaml, PaginatedAgents.yaml, paths/agents.yaml, paths/agent-by-id.yaml
Files to CREATE (42):
- 28 schemas: ComputeResources, Volume, VolumeCreateRequest, VolumeUpdateRequest, PaginatedVolumes, VolumeAttachment, VolumeAttachmentCreateRequest, PaginatedVolumeAttachments, Mcp, McpCreateRequest, McpUpdateRequest, PaginatedMcps, Skill, SkillCreateRequest, SkillUpdateRequest, PaginatedSkills, Hook, HookCreateRequest, HookUpdateRequest, PaginatedHooks, Env, EnvCreateRequest, EnvUpdateRequest, PaginatedEnvs, InitScript, InitScriptCreateRequest, InitScriptUpdateRequest, PaginatedInitScripts
- 14 paths: volumes, volume-by-id, volume-attachments, volume-attachment-by-id, mcps, mcp-by-id, skills, skill-by-id, hooks, hook-by-id, envs, env-by-id, init-scripts, init-script-by-id
CI Note
The buf-pr workflow runs breaking change detection. This PR will intentionally break the proto contract — that CI check is expected to fail and should be overridden for merge.