26 lines
809 B
Markdown
26 lines
809 B
Markdown
|
|
# Task ID: 152
|
||
|
|
|
||
|
|
**Title:** Agent membership routes
|
||
|
|
|
||
|
|
**Status:** pending
|
||
|
|
|
||
|
|
**Dependencies:** 120
|
||
|
|
|
||
|
|
**Priority:** medium
|
||
|
|
|
||
|
|
**Description:** Create API endpoints for managing agent-project memberships
|
||
|
|
|
||
|
|
**Details:**
|
||
|
|
|
||
|
|
Add to existing agent routes or create new file:
|
||
|
|
1. GET /api/v1/agents/:name/projects - list projects agent belongs to
|
||
|
|
2. POST /api/v1/agents/:name/projects/:project - add membership { role?, llm? }
|
||
|
|
3. DELETE /api/v1/agents/:name/projects/:project - remove membership
|
||
|
|
4. GET /api/v1/projects/:name/agents - list agents in project
|
||
|
|
5. Keep Agent.projectId in sync when membership added/removed (backward compat for one release)
|
||
|
|
6. Follow existing route patterns
|
||
|
|
|
||
|
|
**Test Strategy:**
|
||
|
|
|
||
|
|
Route tests: test add membership creates junction row, test remove deletes it, test list returns correct memberships.
|