generated from coulomb/repo-seed
Implements the first live layer of the Custodian cognitive infrastructure: PostgreSQL schema, FastAPI REST API, FastMCP stdio server, and Observable Framework telemetry dashboard. - state-hub/: full stack (docker-compose, FastAPI, Alembic, MCP server, dashboard) - 5 DB tables: topics, workstreams, tasks, decisions, progress_events - 11 MCP tools + 5 resources registered in .mcp.json - Observable dashboard: Overview, Workstreams, Decisions, Progress pages - CLAUDE.md: session protocol (get_state_summary / add_progress_event ritual) - ~/.claude/CLAUDE.md: global cross-project reference to the hub - scripts/pull_image.py: WSL2 TLS-resilient Docker image downloader Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1020 B
Python
48 lines
1020 B
Python
import uuid
|
|
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
from api.models.topic import Domain, TopicStatus
|
|
|
|
|
|
class TopicCreate(BaseModel):
|
|
slug: str
|
|
title: str
|
|
description: str | None = None
|
|
domain: Domain
|
|
status: TopicStatus = TopicStatus.active
|
|
|
|
|
|
class TopicUpdate(BaseModel):
|
|
title: str | None = None
|
|
description: str | None = None
|
|
domain: Domain | None = None
|
|
status: TopicStatus | None = None
|
|
|
|
|
|
class WorkstreamStub(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
id: uuid.UUID
|
|
slug: str
|
|
title: str
|
|
status: str
|
|
owner: str | None = None
|
|
due_date: datetime | None = None
|
|
|
|
|
|
class TopicRead(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
id: uuid.UUID
|
|
slug: str
|
|
title: str
|
|
description: str | None = None
|
|
domain: Domain
|
|
status: TopicStatus
|
|
created_at: datetime
|
|
updated_at: datetime
|
|
|
|
|
|
class TopicWithWorkstreams(TopicRead):
|
|
workstreams: list[WorkstreamStub] = []
|