AP2.2b/c: A1-Stufenwechsel, Team-Fix, Agent-Anlage, Steuerungs-Hinweise.
AP2.0e rotiert Recurring bei maturity_stage reached. Maturity-Strategie priorisiert Routinen. Team zeigt Namen und Agent-Formular. Archetyp-Hints in Kontrolle und Stufe-A-Gruppierung bei Anlage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2b0d5dd3d9
commit
0b57e2ec75
18 files changed
+507
-107
No files matched your search
@@ -20,6 +20,11 @@ class ServiceTokenCreateRequest(BaseModel):
|
||||
expires_in_days: Optional[int] = Field(default=365, ge=1, le=730)
|
||||
|
||||
|
||||
class ActorCreateRequest(BaseModel):
|
||||
name: str = Field(min_length=1, max_length=255)
|
||||
actor_type: Literal["human", "agent", "working_group", "external_system"] = "agent"
|
||||
|
||||
|
||||
@router.get("")
|
||||
def list_actors(
|
||||
actor_type: Optional[Literal["human", "agent", "working_group", "external_system"]] = None,
|
||||
@@ -38,6 +43,26 @@ def list_actors(
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
|
||||
|
||||
@router.post("", status_code=201)
|
||||
def create_actor(
|
||||
body: ActorCreateRequest,
|
||||
ctx: TenantContext = Depends(require_capability("kairo.actor.manage")),
|
||||
):
|
||||
if body.actor_type == "human":
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail="Human-Actors werden über User-Provisioning angelegt",
|
||||
)
|
||||
try:
|
||||
return actor_service.create_actor(
|
||||
tenant_id=ctx.tenant_id,
|
||||
actor_type=body.actor_type,
|
||||
name=body.name.strip(),
|
||||
)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
|
||||
|
||||
@router.get("/{actor_id}")
|
||||
def get_actor(
|
||||
actor_id: str,
|
||||
|
||||
Reference in new issue
Block a user