Start Core Hub FastAPI replacement foundation

This commit is contained in:
2026-06-27 11:41:26 +02:00
parent 75963233b6
commit 1e87adbcbb
37 changed files with 3292 additions and 30 deletions

14
contracts/README.md Normal file
View File

@@ -0,0 +1,14 @@
# Core Hub Contract Artifacts
This directory contains the implementation-neutral contract artifacts consumed by the Core Hub runtime and future adapters.
- `schemas/` - JSON Schema contracts
- `catalogs/` - seed event/widget/policy catalogs
- `fixtures/` - production-safe compatibility examples
- `openapi/` - generated OpenAPI snapshots
Regenerate OpenAPI after route changes:
```bash
make openapi
```

View File

@@ -0,0 +1,17 @@
[
{
"slug": "interaction.event",
"name": "Interaction Event",
"description": "Generic cross-hub interaction event."
},
{
"slug": "workplan.progress",
"name": "Workplan Progress",
"description": "Progress or task evidence from a file-first workplan."
},
{
"slug": "evidence.recorded",
"name": "Evidence Recorded",
"description": "Non-secret operational evidence attached to a hub workflow."
}
]

View File

@@ -0,0 +1,17 @@
[
{
"slug": "public-read",
"name": "Public Read",
"description": "Unauthenticated read access for public catalogs and docs."
},
{
"slug": "hub-write",
"name": "Hub Write",
"description": "Authenticated write access for hub-owned resources."
},
{
"slug": "operator-admin",
"name": "Operator Admin",
"description": "Privileged operator scope for administration."
}
]

View File

@@ -0,0 +1,17 @@
[
{
"slug": "status-summary",
"name": "Status Summary",
"description": "Compact status summary for an operator console."
},
{
"slug": "workplan-board",
"name": "Workplan Board",
"description": "Board view over active workplans and tasks."
},
{
"slug": "event-stream",
"name": "Event Stream",
"description": "Chronological stream of interaction and progress events."
}
]

View File

@@ -0,0 +1,6 @@
{
"detail": {
"code": "unauthorized",
"message": "Missing bearer token"
}
}

View File

@@ -0,0 +1,16 @@
[
{
"hub_slug": "core-hub",
"manifest_version": "0.1.0",
"capabilities": [
"capability.infotech.core-hub",
"api.v2.compatibility",
"contract.ir"
],
"endpoints": [
{"rel": "hubs", "href": "/api/v2/hubs"},
{"rel": "events", "href": "/api/v2/interaction-events"},
{"rel": "widgets", "href": "/api/v2/widgets"}
]
}
]

View File

@@ -0,0 +1,17 @@
[
{
"slug": "core-hub",
"name": "Core Hub",
"status": "active",
"description": "Third-generation production interaction framework.",
"capabilities": [
"hub-registry",
"interaction-events",
"workplan-coordination",
"operator-console"
],
"links": [
{"rel": "self", "href": "/api/v2/hubs/core-hub"}
]
}
]

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,35 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://core-hub.local/contracts/schemas/hub-manifest.schema.json",
"title": "Core Hub Capability Manifest",
"type": "object",
"required": ["hub_slug", "manifest_version", "capabilities"],
"additionalProperties": false,
"properties": {
"hub_slug": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]*$"
},
"manifest_version": {
"type": "string"
},
"capabilities": {
"type": "array",
"items": {"type": "string"},
"uniqueItems": true
},
"endpoints": {
"type": "array",
"items": {
"type": "object",
"required": ["rel", "href"],
"additionalProperties": false,
"properties": {
"rel": {"type": "string"},
"href": {"type": "string"}
}
},
"default": []
}
}
}