A library boundary between shared hub infrastructure and host-specific hub implementations.
Find a file
tegwick 2dcec7718c
Some checks failed
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / pytest-smoke (push) Failing after 2s
fix: pin migration schema after role switch
Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a053ff-1d6f-7fe2-ac1c-a6eb40a42a0c
2026-09-01 01:54:18 +02:00
.claude/rules docs: workplan-first agent guidance prose (CUST-WP-0055 T04) 2026-07-08 16:35:51 +02:00
.forgejo/workflows feat(ecosystem): hub-core library lane for three-repo stack (HUB-WP-0003) 2026-07-11 01:26:47 +02:00
docs feat: consume Repo Manager classification publisher 2026-09-01 00:49:30 +02:00
hub_core fix: pin migration schema after role switch 2026-09-01 01:54:18 +02:00
registry feat(ecosystem): hub-core library lane for three-repo stack (HUB-WP-0003) 2026-07-11 01:26:47 +02:00
tests fix: pin migration schema after role switch 2026-09-01 01:54:18 +02:00
workplans feat: consume Repo Manager classification publisher 2026-09-01 00:49:30 +02:00
.custodian-brief.md chore(consistency): sync task status from DB [auto] 2026-08-25 20:12:06 +02:00
.dockerignore feat: add hub runtime and extension contract 2026-08-21 10:58:03 +02:00
.gitignore Initial commit 2026-06-16 00:31:20 +00:00
.repo-classification.yaml feat(ecosystem): hub-core library lane for three-repo stack (HUB-WP-0003) 2026-07-11 01:26:47 +02:00
AGENTS.md docs(agents): repoint remote State Hub URL to the in-cluster address 2026-08-25 00:21:08 +02:00
CLAUDE.md Regenerate agent instruction files for dev-hub MCP name 2026-06-22 21:24:35 +02:00
Containerfile feat: add hub runtime and extension contract 2026-08-21 10:58:03 +02:00
INTENT.md feat: transport authoritative workload projections 2026-08-23 10:54:40 +02:00
LICENSE Adopt Target Revenue Source License V1C1 (org-wide preliminary rollout) 2026-07-30 00:22:33 +02:00
Makefile feat: add hub runtime and extension contract 2026-08-21 10:58:03 +02:00
pyproject.toml feat: add durable Core Hub absorption runtime 2026-08-21 16:16:42 +02:00
README.md feat: reconcile legacy message identities 2026-08-23 11:59:52 +02:00
SCOPE.md feat: transport authoritative workload projections 2026-08-23 10:54:40 +02:00
uv.lock feat: add durable Core Hub absorption runtime 2026-08-21 16:16:42 +02:00
WORK-RECORDS.md add extension conformance residual 2026-08-31 21:30:03 +02:00

Hub Core

Contracts, reusable Python primitives, and the surviving runtime for HelixForge hubs.

Hub stack glossary

Name Role
hub-core This repo — importable package plus target primary runtime image
state-hub Legacy coordination host being replaced capability by capability
core-hub Previous /api/v2 runtime retained temporarily as live rollback

Ecosystem architecture: /home/worsch/the-custodian/docs/hub-ecosystem-architecture.md

Runtime packaging is fixed by docs/adr/ADR-0001-runtime-packaging.md: the wheel remains importable, while this repository will also own the primary OCI image. API, MCP, and migration workloads may run separately from that same image. Core-hub is not a permanent thin host.

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 topics, workplans, tasks, decisions, SBOM, or token accounting.

Source boundary notes live in:

/home/worsch/the-custodian/docs/hub-core-extraction-boundary.md

Extension contract

The wheel includes helixforge.hub-extension 0.1.0 under hub_core.contracts. Use extension_contract_root() to locate the packaged descriptor and manifest schemas, event catalog schema and seed, named-port OpenAPI fragments, ops-hub fixture, and compatibility matrix.

from hub_core.contracts import CONTRACT_VERSION, extension_contract_root

contract_root = extension_contract_root()

The wheel also includes the frozen helixforge.repository-navigation 1.0.0 receiving and query contract. Its packaged schemas, fixtures, compatibility matrix, and read-only OpenAPI surface are located with repository_navigation_contract_root(); normative rebuild and cursor rules are in docs/repository-navigation-contract.md.

helixforge.workload-projection 1.0.0 transports Repo Manager's authoritative workload index through a separate injected port.repo reader. The runtime offers GET-only list and exact-reference resolution at /ports/projections/workloads, plus matching MCP tools, without importing Repo Manager internals or inferring workload identity.

Runtime scaffold

Install the runtime extra and start the API, MCP, or migration process through the shared console entrypoint:

uv sync --extra runtime
hub-core api
hub-core mcp --api-base http://127.0.0.1:8010
hub-core migrate head --database-url postgresql+asyncpg://...
hub-core migration validate core-hub-export.json
hub-core migration import core-hub-export.json --database-url postgresql+asyncpg://...

The runtime exposes registry, messaging, progress-event, interaction-event, and projection-query ports, plus the governed Core Hub /api/v2 compatibility surface. Its PostgreSQL backend includes migrations, audit, and idempotent seven-table migration tooling. The memory backend remains for local/conformance use and fails production readiness unless explicitly enabled. See docs/runtime.md.

The reusable Tier 2/3 scaffold is documented in docs/conformance.md and runs against any compatible HTTP target with hub-core conformance --base-url <url>.

The staged Core Hub transition is defined in docs/core-hub-absorption-plan.md; it keeps one writer per capability and retains Core Hub as rollback until data, consumer, and stabilization gates close.

Production authority moved to hub-core on 2026-08-21. The public compatibility surface runs the immutable 055cf49 image while Core Hub remains deployed with an empty writer set through the seven-day stabilization window ending no earlier than 2026-08-28T20:49:50+02:00.

Repository classification remains authoritative in each repository and is validated/projected by Repo Manager. Hub-core consumes that versioned projection for cross-domain navigation under docs/adr/ADR-0002-repository-classification-projections.md; it does not own a mutable topic or classification write surface. Implementation and A5 handoff are tracked in HUB-WP-0006.

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.
  • Explicit, attributable legacy message identity aliases that preserve the canonical message row and never guess malformed references.
  • 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.
  • Packaged helixforge.hub-extension 0.1.0 Tier 1 schemas, OpenAPI port fragments, event catalog, compatibility matrix, and ops-hub fixture.
  • Packaged helixforge.repository-navigation 1.0.0 schemas, fixtures, compatibility policy, and read-only projection query contract.
  • Injectable primary runtime scaffold with five named ports, health/readiness, API/MCP/migration commands, and a locked non-root OCI image.

Domain-specific MCP tools follow in each hub package.