feat(automation): scaffold isolated module structure

Create app/automations/ with the SRP-per-file / grouped-folders layout
that mirrors app/agents/multi_agent_chat/. Twelve __init__.py files,
each a thin re-export with a single-line docstring describing the
subpackage's role, no exports yet (filled in subsequent commits).

Tree:
  app/automations/
  ├── persistence/
  │   ├── enums/      (status / type enums; one per file)
  │   └── models/     (SQLAlchemy tables; one per file)
  ├── schemas/
  │   ├── definition/ (the JSON envelope, broken by concern)
  │   ├── triggers/   (per-trigger config schemas)
  │   └── actions/    (per-action config schemas)
  └── registries/
      ├── capabilities/  (types.py + store.py)
      ├── actions/       (types.py + store.py)
      └── triggers/      (types.py + store.py)

The persistence/ folder is named to avoid surfsense_backend/.gitignore's
data/ ignore rule, which silently masked the original data/ name and
its contents from version control.

Isolation invariant: the module imports only from app.db (foundational
Base + FK targets, unavoidable) and stdlib / SQLAlchemy / Pydantic.
No imports from app.agents.*, app.services.*, app.tasks.*, app.routes.*
or any other business-logic module. Confirmed importable with no side
effects.
This commit is contained in:
CREDO23 2026-05-26 22:38:41 +02:00
parent db8c472664
commit 113748dfd5
12 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,5 @@
"""Persistence layer: SQLAlchemy enums under ``enums/`` and models under ``models/``."""
from __future__ import annotations
__all__: list[str] = []

View file

@ -0,0 +1,5 @@
"""SQLAlchemy / Python enums backing the three automation tables."""
from __future__ import annotations
__all__: list[str] = []

View file

@ -0,0 +1,5 @@
"""SQLAlchemy models: one file per table (``automation.py``, ``trigger.py``, ``run.py``)."""
from __future__ import annotations
__all__: list[str] = []