AP1.10a: Initiative-Standardfelder vision, Zielzustand und Archetyp-Schlüssel.
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 1m51s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 12s
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 1m51s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 12s
Migration 016, Archetyp-Registry-API, erweitertes Profil-Modal und Plan-Profil-Ansicht. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
495993cad6
commit
408050bcb8
14 files changed
+342
-40
No files matched your search
@@ -0,0 +1,21 @@
|
||||
"""Entity-Archetypen API — AP1.10a (In-Memory-Registry bis 10b)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from capabilities import require_capability
|
||||
from entity_archetypes import list_archetypes
|
||||
from fastapi import APIRouter, Depends, Query
|
||||
from tenant_context import TenantContext
|
||||
|
||||
router = APIRouter(prefix="/api/entity-archetypes", tags=["entity-archetypes"])
|
||||
|
||||
|
||||
@router.get("")
|
||||
def get_entity_archetypes(
|
||||
entity_type: Optional[str] = Query(default=None),
|
||||
ctx: TenantContext = Depends(require_capability("kairo.initiative.read")),
|
||||
):
|
||||
_ = ctx
|
||||
return list_archetypes(entity_type=entity_type)
|
||||
@@ -27,6 +27,9 @@ router = APIRouter(prefix="/api/initiatives", tags=["initiatives"])
|
||||
class InitiativeCreateRequest(BaseModel):
|
||||
title: str = Field(min_length=1, max_length=255)
|
||||
goal: str = ""
|
||||
vision: str = ""
|
||||
target_state_summary: str = ""
|
||||
archetype_key: str = "initiative.generic"
|
||||
status: Literal["active", "paused", "completed", "archived"] = "active"
|
||||
priority: Literal["low", "normal", "high"] = "normal"
|
||||
owner_actor_id: Optional[str] = None
|
||||
@@ -35,6 +38,9 @@ class InitiativeCreateRequest(BaseModel):
|
||||
class InitiativeUpdateRequest(BaseModel):
|
||||
title: Optional[str] = Field(default=None, min_length=1, max_length=255)
|
||||
goal: Optional[str] = None
|
||||
vision: Optional[str] = None
|
||||
target_state_summary: Optional[str] = None
|
||||
archetype_key: Optional[str] = None
|
||||
status: Optional[Literal["active", "paused", "completed", "archived"]] = None
|
||||
priority: Optional[Literal["low", "normal", "high"]] = None
|
||||
owner_actor_id: Optional[str] = None
|
||||
@@ -138,6 +144,9 @@ def create_initiative(
|
||||
tenant_id=ctx.tenant_id,
|
||||
title=body.title,
|
||||
goal=body.goal,
|
||||
vision=body.vision,
|
||||
target_state_summary=body.target_state_summary,
|
||||
archetype_key=body.archetype_key,
|
||||
status=body.status,
|
||||
priority=body.priority,
|
||||
owner_actor_id=owner_actor_id,
|
||||
@@ -198,6 +207,9 @@ def update_initiative(
|
||||
user_id=ctx.user_id,
|
||||
title=body.title,
|
||||
goal=body.goal,
|
||||
vision=body.vision,
|
||||
target_state_summary=body.target_state_summary,
|
||||
archetype_key=body.archetype_key,
|
||||
status=body.status,
|
||||
priority=body.priority,
|
||||
owner_actor_id=body.owner_actor_id,
|
||||
|
||||
Reference in new issue
Block a user