SurfSense/surfsense_backend/app
CREDO23 7a96c0e29c feat(automation): add empty Capability / Action / Trigger registries
Three registries under app/automations/registries/, each as its own
folder with the same SRP-per-file split (types.py for the dataclass,
store.py for the in-memory dict + register/get/all functions). All
three start empty; concrete entries land when the user signs off on
which capabilities / actions / triggers to include (step 2).

Capability (locked at v1-minimum five fields — see commit 2):
  - id, description, input_schema, output_schema, handler
  - CapabilityHandler = Callable[[dict[str, Any]], Awaitable[Any]]
  - Frozen, slotted dataclass (immutable post-registration).

ActionDefinition (v1-trim of design plan §4):
  - type, name, description, config_schema, handler
  - Defers output_contract (handled per-step by agent_task's
    config.output_schema), uses_capabilities (no static analysis
    needed until >1 action ships), and produces_artifacts (deferred
    alongside the artifact pipeline).

TriggerDefinition (declarative, no handler):
  - type, description, config_schema, payload_schema
  - No handler field — firing is a single dispatcher's
    responsibility, not a per-trigger one.

store.py contract for all three:
  - register_*: idempotent at process startup, raises on duplicate
  - get_*: returns None on miss
  - all_*: returns a defensive copy of the registry dict

Verified by an inline smoke test (10 checks): empty initial state,
registration and lookup work, duplicates raise, frozen dataclasses
reject mutation, snapshots are copies, handlers are awaitable.

Isolation invariant audit: grep across the full app/automations/
tree shows only three app.* imports, all of them
``from app.db import BaseModel, TimestampMixin`` in the model files.
No imports from app.agents.*, app.services.*, app.tasks.*,
app.routes.*, or any other business-logic module.
2026-05-26 22:54:17 +02:00
..
agents Merge pull request #1429 from CREDO23/fix-desktop-redirects 2026-05-23 15:51:59 -07:00
automations feat(automation): add empty Capability / Action / Trigger registries 2026-05-26 22:54:17 +02:00
config perf(kb-planner): route internal planner calls to dedicated small/fast LLM 2026-05-20 11:42:52 +02:00
connectors chore: linting 2026-04-27 14:04:50 -07:00
etl_pipeline feat(pipeline): enrich ETL and indexing failure telemetry 2026-05-22 17:49:46 +05:30
indexing_pipeline feat(pipeline): enrich ETL and indexing failure telemetry 2026-05-22 17:49:46 +05:30
observability feat(env): add SURFSENSE_ENV variable for deployment environment and update observability resource attributes 2026-05-23 02:13:24 +05:30
prompts feat: add PDF preview and export functionality for Typst-based reports, enhance report content handling 2026-04-15 21:11:27 +05:30
retriever feat(retriever): instrument knowledge base search 2026-05-21 23:03:31 +05:30
routes feat(connectors): add retry and auth telemetry events 2026-05-22 17:50:02 +05:30
schemas feat: add team memory routes 2026-05-20 02:02:27 +05:30
services Merge remote-tracking branch 'upstream/dev' into improvement-agent-speed 2026-05-20 21:23:48 +02:00
tasks refactor(chat): add streaming/flows/resume_chat/orchestrator + flows public API 2026-05-25 21:50:09 +02:00
templates feat: update report generation and export capabilities to support multiple formats (PDF, DOCX, HTML, LaTeX, EPUB, ODT, plain text) across documentation and backend 2026-03-09 18:41:21 -07:00
utils feat(observability): add SurfSense metric helpers 2026-05-21 23:02:20 +05:30
__init__.py feat: SurfSense v0.0.6 init 2025-03-14 18:53:14 -07:00
app.py feat(observability): add OpenTelemetry process bootstrap 2026-05-21 23:01:54 +05:30
celery_app.py feat(tasks): enhance Celery task telemetry with queue metadata and latency tracking 2026-05-22 18:19:38 +05:30
db.py feat: moved chat persistance to Server Side 2026-05-04 03:06:15 -07:00
exceptions.py feat: add processing mode support for document uploads and ETL pipeline, improded error handling ux 2026-04-14 21:26:00 -07:00
rate_limiter.py try: ip fix for cludflare 2026-04-16 02:13:52 -07:00
users.py Seed default prompts on registration and for existing users 2026-03-31 18:12:09 +02:00