|
|
|
|
@@ -34,12 +34,17 @@ hub_core/
|
|
|
|
|
domain.py
|
|
|
|
|
managed_repo.py
|
|
|
|
|
agent_message.py
|
|
|
|
|
capability_catalog.py
|
|
|
|
|
capability_request.py
|
|
|
|
|
progress_event.py
|
|
|
|
|
tpsc.py
|
|
|
|
|
schemas/
|
|
|
|
|
__init__.py
|
|
|
|
|
domain.py
|
|
|
|
|
managed_repo.py
|
|
|
|
|
agent_message.py
|
|
|
|
|
capability.py
|
|
|
|
|
progress_event.py
|
|
|
|
|
tpsc.py
|
|
|
|
|
routers/
|
|
|
|
|
__init__.py
|
|
|
|
|
@@ -63,6 +68,12 @@ 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.
|
|
|
|
|
- 2026-06-06: progress event and capability request adapter seams were added.
|
|
|
|
|
Hub-core uses generic JSON context fields where State Hub currently has
|
|
|
|
|
dev-specific workstream/task/topic/decision foreign keys.
|
|
|
|
|
|
|
|
|
|
## Extract Now
|
|
|
|
|
|
|
|
|
|
@@ -95,6 +106,33 @@ 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`
|
|
|
|
|
- `capability_requests`
|
|
|
|
|
- `progress_events`
|
|
|
|
|
- `tpsc_catalog`
|
|
|
|
|
- `tpsc_snapshots`
|
|
|
|
|
- `tpsc_entries`
|
|
|
|
|
|
|
|
|
|
## Needs An Adapter Seam
|
|
|
|
|
|
|
|
|
|
These are still part of the target architecture, but the current State Hub
|
|
|
|
|
@@ -104,10 +142,17 @@ implementation is coupled to dev-hub concepts:
|
|
|
|
|
| --- | --- |
|
|
|
|
|
| `Domain` and `domains.py` detail views | Counts topics, workstreams, extension points, and technical debt. Hub-core should expose a domain summary hook that dev-hub can implement. |
|
|
|
|
|
| `ManagedRepo` | Contains `topic_id`, SBOM fields, and state-sync timestamps. Keep minimal repo identity in core, then add dev-hub extensions. |
|
|
|
|
|
| `CapabilityRequest` | Points at workstreams and tasks. Hub-core needs generic context fields or optional extension references before extraction. |
|
|
|
|
|
| `ProgressEvent` | Points at topics, workstreams, tasks, and decisions. Hub-core should define event identity, type, summary, detail, author, and timestamps, with hub-specific subject references added by each hub. |
|
|
|
|
|
| `CapabilityRequest` | Adapter seam implemented with generic `request_context` and `fulfillment_context`; State Hub still needs a later refactor to map workstream/task references into those fields or a dev-hub extension table. |
|
|
|
|
|
| `ProgressEvent` | Adapter seam implemented with generic `subject_refs`; State Hub still needs a later refactor to map topic/workstream/task/decision foreign keys into that field or a dev-hub extension table. |
|
|
|
|
|
| MCP tools in `mcp_server/server.py` | Generic tools are mixed into a single dev-hub server module. T06 should create a base registration class that receives API client/config dependencies and lets dev-hub add its own tools. |
|
|
|
|
|
|
|
|
|
|
The first two adapter seams are now implemented in hub-core:
|
|
|
|
|
|
|
|
|
|
- `ProgressEvent.subject_refs`: generic JSON references for hub-local subjects.
|
|
|
|
|
- `CapabilityRequest.request_context` and `fulfillment_context`: generic JSON
|
|
|
|
|
context for hub-local workstreams, tasks, incidents, services, budgets, or
|
|
|
|
|
other future hub entities.
|
|
|
|
|
|
|
|
|
|
## Keep In Dev-Hub
|
|
|
|
|
|
|
|
|
|
The following State Hub areas should not move into hub-core during T05:
|
|
|
|
|
|