feat(automations): static_inputs on triggers + vertical-slice api/services

This commit is contained in:
CREDO23 2026-05-27 21:21:43 +02:00
parent 84d99f19a2
commit 27ab367a13
27 changed files with 915 additions and 356 deletions

View file

@ -11,7 +11,7 @@ AGENT_TASK_ACTION = ActionDefinition(
type="agent_task",
name="Agent task",
description="Run a multi_agent_chat turn from an automation step.",
params_schema=AgentTaskActionParams.model_json_schema(),
params_model=AgentTaskActionParams,
build_handler=build_handler,
)

View file

@ -7,6 +7,7 @@ from dataclasses import dataclass
from typing import Any
from uuid import UUID
from pydantic import BaseModel
from sqlalchemy.ext.asyncio import AsyncSession
@ -30,5 +31,10 @@ class ActionDefinition:
type: str
name: str
description: str
params_schema: dict[str, Any]
params_model: type[BaseModel]
build_handler: ActionHandlerFactory
@property
def params_schema(self) -> dict[str, Any]:
"""JSON Schema (draft 2020-12) derived from ``params_model``."""
return self.params_model.model_json_schema()