server
Operate on Observal FastAPI backend routes, data services, auth, migrations, jobs, insights, and route-focused tests.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- server
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate on Observal FastAPI backend routes, data services, auth, migrations, jobs, insights, and route-focused tests.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-data-workflows.md12.1 KB
- 参考文档references/migrations-and-settings.md10.6 KB
- 参考文档references/server-architecture.md10.5 KB
- 参考文档references/troubleshooting.md13.5 KB
03 SKILL.md 正文
server
Use this sub-skill when a task touches the Observal FastAPI backend: REST or GraphQL route registration, PostgreSQL models and Pydantic schemas, service-layer behavior, auth/JWT/SSO/SCIM, registry and agent/component APIs, telemetry ingest storage, ClickHouse versus PostgreSQL migrations, dynamic settings, background jobs, insights, or route-focused tests.
Do not use this sub-skill for Typer CLI command hierarchy, frontend React/TanStack Router work, harness adapter/hook-spec/session-parser additions, or repo-wide release/compliance workflow except where they call into server APIs.
Start here
- Identify the backend surface:
- New or changed REST route: read
references/server-architecture.mdandreferences/api-data-workflows.md. - SQLAlchemy model, Alembic, ClickHouse, dynamic settings, or arq jobs: read
references/migrations-and-settings.md. - Auth, SSO, SCIM, route registration, ingest, insights, or failing backend tests: read
references/troubleshooting.mdfirst, then the focused reference above.
- New or changed REST route: read
- Verify the route graph before and after route registration changes with this sub-skill's bundled helper
scripts/check_server_routes.py. - Keep changes in the server-owned layers:
observal-server/api,models,schemas,services,jobs,alembic/versions, andclickhouse/migrations. - Add or update focused
tests/test_*routes*.py,tests/test_clickhouse_*.py,tests/test_migration*.py, ortests/test_insights*.pycoverage for the exact behavior.
Hard boundaries
- Server owns FastAPI, data models, migrations, settings, jobs, auth/admin routes, insights, and the ingest endpoint.
- Harness telemetry owns harness registry/adapters/hook specs/session parsers/session delivery. Server work may use ingest and ClickHouse storage patterns, but harness-specific parsing or hook installation belongs there.
- CLI owns Typer commands and bundled CLI skills.
- Web owns Vite/React/TanStack Router and Playwright/e2e guidance.
- Repo-development owns contributor policy, global lint/test/release workflow, and change-review process.
Non-negotiable backend invariants
- Register new top-level routers in
routes.py; package routers such asapi.routes.agentandapi.routes.adminmust import submodules so decorators attach to the shared router. - Authenticated HTTP APIs use
Authorization: Bearer <token>and dependencies fromapi.deps; do not add anX-API-Keybypass without confirming a deliberate auth design change. - PostgreSQL schema changes require Alembic migrations. ClickHouse schema changes require SQL files in
observal-server/clickhouse/migrations/. Do not add new ClickHouse DDL to startup code. - Runtime-tunable settings go through
services.dynamic_settings, not direct env-var reads. Boot-time infrastructure and crypto settings stay inconfig.py. - Use Loguru (
from loguru import logger as optic) with positional placeholders; never log secrets, JWTs, keys, or bearer tokens. - Outbound network from server services must pass the existing SSRF guard patterns.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.