generated from coulomb/repo-seed
Start Core Hub FastAPI replacement foundation
This commit is contained in:
14
contracts/README.md
Normal file
14
contracts/README.md
Normal 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
|
||||
```
|
||||
17
contracts/catalogs/event-types.json
Normal file
17
contracts/catalogs/event-types.json
Normal 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."
|
||||
}
|
||||
]
|
||||
17
contracts/catalogs/policy-scopes.json
Normal file
17
contracts/catalogs/policy-scopes.json
Normal 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."
|
||||
}
|
||||
]
|
||||
17
contracts/catalogs/widget-types.json
Normal file
17
contracts/catalogs/widget-types.json
Normal 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."
|
||||
}
|
||||
]
|
||||
6
contracts/fixtures/api-v2/protected/unauthorized.json
Normal file
6
contracts/fixtures/api-v2/protected/unauthorized.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"detail": {
|
||||
"code": "unauthorized",
|
||||
"message": "Missing bearer token"
|
||||
}
|
||||
}
|
||||
@@ -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"}
|
||||
]
|
||||
}
|
||||
]
|
||||
17
contracts/fixtures/api-v2/public/hubs.json
Normal file
17
contracts/fixtures/api-v2/public/hubs.json
Normal 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"}
|
||||
]
|
||||
}
|
||||
]
|
||||
1408
contracts/openapi/core-hub.openapi.json
Normal file
1408
contracts/openapi/core-hub.openapi.json
Normal file
File diff suppressed because it is too large
Load Diff
35
contracts/schemas/hub-manifest.schema.json
Normal file
35
contracts/schemas/hub-manifest.schema.json
Normal 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": []
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user