Skip to content

feat(teams): rewrite teams contracts#33

Merged
vitramir merged 3 commits intomainfrom
noa/issue-32
Mar 18, 2026
Merged

feat(teams): rewrite teams contracts#33
vitramir merged 3 commits intomainfrom
noa/issue-32

Conversation

@casey-brooks
Copy link
Contributor

Summary

  • replace teams.proto with the new resource model and RPCs
  • rebuild the team OpenAPI spec with cursor pagination and new resources

Testing

  • buf lint
  • buf build
  • $(npm config get prefix)/bin/redocly bundle openapi/team/v1/openapi.yaml -o dist/team-v1.yaml
  • $(npm config get prefix)/bin/redocly bundle openapi/files/v1/openapi.yaml -o dist/files-v1.yaml
  • $(npm config get prefix)/bin/redocly bundle openapi/llm/v1/openapi.yaml -o dist/llm-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/team-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/files-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/llm-v1.yaml

#32

@casey-brooks casey-brooks requested a review from a team as a code owner March 18, 2026 00:59
@github-actions
Copy link

github-actions bot commented Mar 18, 2026

The latest Buf updates on your PR. Results from workflow buf-pr / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed❌ failed (138)Mar 18, 2026, 1:15 AM

@casey-brooks
Copy link
Contributor Author

Summary

  • replace teams.proto with the new resource model and RPCs
  • rebuild team OpenAPI specs with new schemas/paths and cursor pagination

Tests & Lint

Commands:

  • buf lint
  • buf build
  • $(npm config get prefix)/bin/redocly bundle openapi/team/v1/openapi.yaml -o dist/team-v1.yaml
  • $(npm config get prefix)/bin/redocly bundle openapi/files/v1/openapi.yaml -o dist/files-v1.yaml
  • $(npm config get prefix)/bin/redocly bundle openapi/llm/v1/openapi.yaml -o dist/llm-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/team-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/files-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/llm-v1.yaml

Tests: passed 1, failed 0, skipped 0 (buf build)
Lint: buf lint clean; spectral lint warnings only

@casey-brooks
Copy link
Contributor Author

Summary

  • add parent filter fields to Teams list RPCs
  • add matching list query parameters in team OpenAPI paths

Tests & Lint

Commands:

  • buf lint
  • buf build
  • $(npm config get prefix)/bin/redocly bundle openapi/team/v1/openapi.yaml -o dist/team-v1.yaml
  • $(npm config get prefix)/bin/redocly bundle openapi/files/v1/openapi.yaml -o dist/files-v1.yaml
  • $(npm config get prefix)/bin/redocly bundle openapi/llm/v1/openapi.yaml -o dist/llm-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/team-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/files-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/llm-v1.yaml

Tests: passed 1, failed 0, skipped 0 (buf build)
Lint: buf lint clean; spectral lint warnings only

@rowan-stein
Copy link
Collaborator

Implementation complete. Requesting review.

Changes:

  • Full rewrite of teams.proto — 39 RPCs across 8 new entities (Agent, Volume, VolumeAttachment, Mcp, Skill, Hook, Env, InitScript)
  • Full rewrite of OpenAPI spec — 42 new files, 48 old files deleted, 7 modified
  • All old entities removed (Tool, McpServer, WorkspaceConfiguration, MemoryBucket, Variable, Attachment)
  • New flat-field entity model per agynio/architecture resource-definitions.md

CI status: validate (OpenAPI lint) passes. buf fails on breaking change detection — expected and intentional for this PR.

noa-lucent
noa-lucent previously approved these changes Mar 18, 2026
Copy link

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, well-structured rewrite that faithfully implements the architecture spec from agynio/architecture.

Verified against architecture source of truth:

  • All 8 entities (Agent, Volume, VolumeAttachment, Mcp, Skill, Hook, Env, InitScript) match resource-definitions.md field-for-field.
  • 39 RPCs across all entities, including immutable VolumeAttachment (Create/Get/Delete/List only, no Update). ✓
  • Ownership immutability enforced — agent_id, mcp_id, hook_id correctly excluded from Update requests. ✓
  • oneof for mutually exclusive fields (VolumeAttachment target, Env target+source, InitScript target). ✓
  • UpdateEnvRequest correctly uses flat optional fields instead of oneof for partial update semantics. ✓
  • ComputeResources shared across Agent, Mcp, Hook as specified. ✓
  • Cursor-based pagination (pageSize/pageToken/nextPageToken) everywhere. Old Pagination.yaml deleted. ✓
  • OpenAPI list endpoints include correct filter parameters matching proto list requests. ✓
  • All old entities, enums, and schemas cleanly removed.

One nit left inline. LGTM.

rpc DeleteVolumeAttachment(DeleteVolumeAttachmentRequest) returns (DeleteVolumeAttachmentResponse);
rpc ListVolumeAttachments(ListVolumeAttachmentsRequest) returns (ListVolumeAttachmentsResponse);

// --- MCP Servers ---

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] Comment says // --- MCP Servers --- but the entity and RPCs are now just Mcp (e.g., CreateMcp, ListMcps). Update to // --- MCPs --- for consistency with the new naming.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in latest commit.

@casey-brooks
Copy link
Contributor Author

Summary

  • rename MCPs section comment in teams.proto

Tests & Lint

Commands:

  • buf lint
  • buf build
  • $(npm config get prefix)/bin/redocly bundle openapi/team/v1/openapi.yaml -o dist/team-v1.yaml
  • $(npm config get prefix)/bin/redocly bundle openapi/files/v1/openapi.yaml -o dist/files-v1.yaml
  • $(npm config get prefix)/bin/redocly bundle openapi/llm/v1/openapi.yaml -o dist/llm-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/team-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/files-v1.yaml
  • $(npm config get prefix)/bin/spectral lint dist/llm-v1.yaml

Tests: passed 1, failed 0, skipped 0 (buf build)
Lint: buf lint clean; spectral lint warnings only

@vitramir vitramir merged commit 18f65e9 into main Mar 18, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants