feat(routers): add API endpoints for agents and skills

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-04-08 00:12:32 +08:00
parent 74fdfc2652
commit dc9051debc
4 changed files with 71 additions and 1 deletions

View File

@@ -29,6 +29,10 @@ async def create_skill(
visibility=data.visibility,
team_id=data.team_id,
is_active=data.is_active,
status=data.status,
scope=data.scope,
effectiveness=data.effectiveness,
review_after=data.review_after,
owner_id=current_user.id,
)
db.add(skill)
@@ -103,6 +107,14 @@ async def update_skill(
skill.team_id = data.team_id
if data.is_active is not None:
skill.is_active = data.is_active
if data.status is not None:
skill.status = data.status
if data.scope is not None:
skill.scope = data.scope
if data.effectiveness is not None:
skill.effectiveness = data.effectiveness
if data.review_after is not None:
skill.review_after = data.review_after
await db.commit()
await db.refresh(skill)