docs: record hub-core router slice
This commit is contained in:
@@ -55,6 +55,15 @@ large enough to prove packaging, import style, SQLAlchemy metadata ownership,
|
||||
router dependency injection, and State Hub compatibility before the more
|
||||
entangled surfaces move.
|
||||
|
||||
Current implementation status:
|
||||
|
||||
- 2026-06-06: `/home/worsch/hub-core` was created and committed with base,
|
||||
domain, managed repo, agent message, capability catalog, and TPSC models plus
|
||||
matching schemas.
|
||||
- 2026-06-06: router factory functions were added for domains, repos, messages,
|
||||
TPSC, and policy lookup. These factories accept host-supplied dependencies
|
||||
instead of importing State Hub globals.
|
||||
|
||||
## Extract Now
|
||||
|
||||
These State Hub files are suitable for the first extraction after import-path
|
||||
@@ -75,6 +84,17 @@ rewriting and small router seams:
|
||||
| `api/routers/tpsc.py` | Generic catalog and GDPR report router. |
|
||||
| `api/routers/policy.py` | Generic policy document router if policy roots become configurable. |
|
||||
|
||||
The first committed router seam is factory-based rather than global:
|
||||
|
||||
```python
|
||||
from hub_core.routers import create_domains_router
|
||||
|
||||
app.include_router(create_domains_router(get_session))
|
||||
```
|
||||
|
||||
That shape lets each hub keep its own database session configuration and mount
|
||||
only the generic routers it wants.
|
||||
|
||||
## Needs An Adapter Seam
|
||||
|
||||
These are still part of the target architecture, but the current State Hub
|
||||
|
||||
@@ -164,6 +164,13 @@ initial package slice should start with base DB primitives, domains, repos,
|
||||
messages, TPSC catalog/snapshots, and adapter seams for progress and capability
|
||||
requests rather than a blind file copy.
|
||||
|
||||
Implementation slice 2 (2026-06-06): expanded `/home/worsch/hub-core` with
|
||||
router factory functions for domains, repos, messages, TPSC, and policy lookup.
|
||||
The factories receive the host hub's `get_session` dependency instead of
|
||||
binding to State Hub globals, preserving the package boundary for future hubs.
|
||||
Verification currently covers package compilation, SQLAlchemy metadata
|
||||
registration, and router factory construction.
|
||||
|
||||
### T06 — Hub-core FastMCP base server
|
||||
|
||||
```task
|
||||
|
||||
Reference in New Issue
Block a user