2026-06-16 02:39:36 +02:00
|
|
|
# Hub Core
|
2026-06-16 00:31:20 +00:00
|
|
|
|
2026-06-16 02:39:36 +02:00
|
|
|
Reusable FastAPI, SQLAlchemy, and MCP primitives for FOS hubs.
|
|
|
|
|
|
2026-07-11 01:26:47 +02:00
|
|
|
## Hub stack glossary
|
|
|
|
|
|
|
|
|
|
| Name | Role |
|
|
|
|
|
| --- | --- |
|
|
|
|
|
| **hub-core** | This repo — shared Python library (`hub_core`) |
|
|
|
|
|
| **state-hub** | Dev coordination host (workplans, MCP) |
|
|
|
|
|
| **core-hub** | Production framework (`/api/v2`, operator console) |
|
|
|
|
|
|
|
|
|
|
Ecosystem architecture: `/home/worsch/the-custodian/docs/hub-ecosystem-architecture.md`
|
|
|
|
|
|
2026-06-16 02:39:36 +02:00
|
|
|
`hub-core` is being extracted from the standalone State Hub repository as part
|
|
|
|
|
of `CUST-WP-0025`. The initial package slice contains only the generic database
|
|
|
|
|
models and schemas that can move without importing dev-hub concepts such as
|
2026-07-08 16:35:51 +02:00
|
|
|
topics, workplans, tasks, decisions, SBOM, or token accounting.
|
2026-06-16 02:39:36 +02:00
|
|
|
|
|
|
|
|
Source boundary notes live in:
|
|
|
|
|
|
|
|
|
|
```text
|
|
|
|
|
/home/worsch/the-custodian/docs/hub-core-extraction-boundary.md
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## First Slice
|
|
|
|
|
|
|
|
|
|
- SQLAlchemy base metadata and timestamp helpers.
|
|
|
|
|
- Domain and managed-repository registry primitives.
|
|
|
|
|
- Agent message inbox primitives.
|
|
|
|
|
- Progress-event and capability-request primitives with generic JSON context
|
|
|
|
|
fields for hub-specific references.
|
|
|
|
|
- Third-party service catalog and snapshot primitives.
|
|
|
|
|
- Matching Pydantic schemas for those primitives.
|
|
|
|
|
- Generic DoI report and summary schemas used by the MCP DoI tools.
|
|
|
|
|
- Router factory functions for domains, repos, messages, policy lookup, and
|
|
|
|
|
progress, capability, and TPSC catalog/snapshot/report endpoints.
|
|
|
|
|
- Canonical FOS §10 risk and alert event types with `/progress/risks` and
|
|
|
|
|
`/progress/alerts` read views.
|
|
|
|
|
- Shared utility helpers for slugs, pagination, repo path resolution, and
|
|
|
|
|
trailing-slash path normalization.
|
|
|
|
|
- Alembic templates plus an initial core-schema migration for hub adopters.
|
|
|
|
|
- FastMCP base-server wrapper for generic orientation, messaging, capability,
|
|
|
|
|
repo, DoI, TPSC/GDPR, risk/alert, and progress tools.
|
|
|
|
|
|
|
|
|
|
Domain-specific MCP tools follow in each hub package.
|