docs: record hub-core utilities slice
This commit is contained in:
@@ -63,6 +63,9 @@ Current implementation status:
|
||||
- 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.
|
||||
- 2026-06-06: shared utilities and migration scaffold were added: slug
|
||||
normalization, pagination, repo path resolution, trailing-slash path
|
||||
normalization, Alembic templates, and an initial core-schema migration.
|
||||
|
||||
## Extract Now
|
||||
|
||||
@@ -95,6 +98,31 @@ 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.
|
||||
|
||||
## Shared Utilities
|
||||
|
||||
The initial utility set is intentionally small and dependency-light:
|
||||
|
||||
| Module | Purpose |
|
||||
| --- | --- |
|
||||
| `hub_core.utils.slugs` | Convert user-facing names into stable lowercase slugs. |
|
||||
| `hub_core.utils.pagination` | Shared limit/offset bounds and SQLAlchemy pagination. |
|
||||
| `hub_core.utils.paths` | Resolve repo paths from `host_paths` before falling back to `local_path`. |
|
||||
| `hub_core.utils.routing` | Normalize a path or URL path component while preserving query strings and fragments. |
|
||||
|
||||
## Migration Scaffold
|
||||
|
||||
`/home/worsch/hub-core` now carries Alembic template files under
|
||||
`hub_core/migrations/` plus `versions/0001_core_schema.py`. The first migration
|
||||
covers only the currently extracted core tables:
|
||||
|
||||
- `domains`
|
||||
- `managed_repos`
|
||||
- `agent_messages`
|
||||
- `capability_catalog`
|
||||
- `tpsc_catalog`
|
||||
- `tpsc_snapshots`
|
||||
- `tpsc_entries`
|
||||
|
||||
## Needs An Adapter Seam
|
||||
|
||||
These are still part of the target architecture, but the current State Hub
|
||||
|
||||
@@ -171,6 +171,13 @@ binding to State Hub globals, preserving the package boundary for future hubs.
|
||||
Verification currently covers package compilation, SQLAlchemy metadata
|
||||
registration, and router factory construction.
|
||||
|
||||
Implementation slice 3 (2026-06-06): added hub-core shared utilities for slug
|
||||
normalization, pagination, repo path resolution, and trailing-slash path
|
||||
normalization. Added Alembic migration templates plus an initial core schema
|
||||
migration covering domains, managed repos, agent messages, capability catalog,
|
||||
and TPSC tables. Hub-core verification now covers package compilation, router
|
||||
construction, registered metadata, and utility behavior.
|
||||
|
||||
### T06 — Hub-core FastMCP base server
|
||||
|
||||
```task
|
||||
|
||||
Reference in New Issue
Block a user