inter-hub-haskell/Web/Controller
Bernd Worsch 3cac021213 feat(WP-0010): IHF Phase 9 — External API Surface and Consumer SDKs
Delivers the full Phase 9 external API layer:

- Versioned REST API (/api/v2/) with OpenAPI 3.1 spec; enum arrays for
  widget_type, event_type, annotation category drawn live from registry tables
- OAuth 2.0 client credentials flow (/api/v2/token); hub:*:write scopes
  gated on active HubCapabilityManifest FK
- API key management: SHA256-hashed tokens, key_prefix for display,
  one-time reveal on creation, revocation support
- TypeScript and Python consumer SDKs generated from registry tables
  (/api/v2/sdk/ihf-client.ts, /api/v2/sdk/ihf-client.py)
- Webhook delivery: HMAC-SHA256 signing, append-only webhook_deliveries,
  fire-and-forget dispatch via forkIO, 3-retry logic
- Admin API dashboard with 24h stats (request count, error rate, last seen)
- Rate limiting (per-minute) and daily quota enforcement via api_request_log
- Schema migration: api_consumers, api_keys, webhook_subscriptions (CHECK
  constraint on 6 framework lifecycle topics), webhook_deliveries
  (append-only trigger), api_request_log
- ARCHITECTURE-LAYERS.md scorecard: 3.34 → 3.41 (approaching Strong)
- contracts/functional/interaction-reporting-v1.md extended with Phase 9
  endpoint catalogue and 422 validation error format

GAAF: no bare TEXT discriminators; webhook event_type uses CHECK constraint
over 6 allowed framework lifecycle topic strings (not widget event types).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 19:52:20 +00:00
..
Api/V2 feat(WP-0010): IHF Phase 9 — External API Surface and Consumer SDKs 2026-04-01 19:52:20 +00:00
AgentProposals.hs feat(P5): IHF Phase 5 complete — agent-assisted distillation 2026-03-29 15:54:33 +00:00
Annotations.hs feat(WP-0009): IHF GAAF Compliance Foundation — type registries, extension manifests, architectural contracts 2026-03-31 21:17:39 +00:00
AnnotationThreads.hs feat(P2+P3): IHF Phase 2 complete; register Phase 3 workplan 2026-03-29 10:42:56 +00:00
ApiConsumers.hs feat(WP-0010): IHF Phase 9 — External API Surface and Consumer SDKs 2026-04-01 19:52:20 +00:00
ApiDashboard.hs feat(WP-0010): IHF Phase 9 — External API Surface and Consumer SDKs 2026-04-01 19:52:20 +00:00
ApiInteractionEvents.hs feat(WP-0009): IHF GAAF Compliance Foundation — type registries, extension manifests, architectural contracts 2026-03-31 21:17:39 +00:00
ApiKeys.hs feat(WP-0010): IHF Phase 9 — External API Surface and Consumer SDKs 2026-04-01 19:52:20 +00:00
ArchiveRecords.hs feat(P8): IHF Phase 8 complete — Federated Hub Maturity 2026-03-29 22:53:01 +00:00
CrossHubPropagations.hs feat(P7): IHF Phase 7 complete — advanced observability and operational integration 2026-03-29 21:49:22 +00:00
DecisionRecords.hs feat(P5): IHF Phase 5 complete — agent-assisted distillation 2026-03-29 15:54:33 +00:00
DeploymentRecords.hs feat(P4): IHF Phase 4 complete — Outcome Observation and Antifragility Loop 2026-03-29 12:27:30 +00:00
EnvelopeEmissionContracts.hs feat(P6/T02-T03): EnvelopeEmissionContract and InteractionReportingContract 2026-03-29 21:11:03 +00:00
FederatedGovernance.hs feat(P8): IHF Phase 8 complete — Federated Hub Maturity 2026-03-29 22:53:01 +00:00
FederatedPolicyOverlays.hs feat(P8): IHF Phase 8 complete — Federated Hub Maturity 2026-03-29 22:53:01 +00:00
HubCapabilityManifests.hs feat(WP-0009): IHF GAAF Compliance Foundation — type registries, extension manifests, architectural contracts 2026-03-31 21:17:39 +00:00
HubRoutingRules.hs feat(WP-0009): IHF GAAF Compliance Foundation — type registries, extension manifests, architectural contracts 2026-03-31 21:17:39 +00:00
Hubs.hs feat(WP-0009): IHF GAAF Compliance Foundation — type registries, extension manifests, architectural contracts 2026-03-31 21:17:39 +00:00
InteractionEvents.hs feat(T02-T11): IHF Phase 1 schema, controllers, views, and helpers 2026-03-27 01:42:43 +00:00
InteractionReportingContracts.hs feat(P6/T02-T03): EnvelopeEmissionContract and InteractionReportingContract 2026-03-29 21:11:03 +00:00
RequirementCandidates.hs feat(WP-0010): IHF Phase 9 — External API Surface and Consumer SDKs 2026-04-01 19:52:20 +00:00
Requirements.hs feat(P3): IHF Phase 3 complete — Governance and Decision Linkage 2026-03-29 10:42:56 +00:00
Sessions.hs feat(T02-T11): IHF Phase 1 schema, controllers, views, and helpers 2026-03-27 01:42:43 +00:00
StewardshipRoles.hs feat(P8): IHF Phase 8 complete — Federated Hub Maturity 2026-03-29 22:53:01 +00:00
TypeRegistries.hs feat(WP-0009): IHF GAAF Compliance Foundation — type registries, extension manifests, architectural contracts 2026-03-31 21:17:39 +00:00
WebhookSubscriptions.hs feat(WP-0010): IHF Phase 9 — External API Surface and Consumer SDKs 2026-04-01 19:52:20 +00:00
WidgetAdapterSpecs.hs feat(P6/T04): WidgetAdapterSpecsController, registry, widget adapter integration 2026-03-29 21:14:57 +00:00
WidgetOwnerships.hs feat(P8): IHF Phase 8 complete — Federated Hub Maturity 2026-03-29 22:53:01 +00:00
Widgets.hs feat(WP-0009): IHF GAAF Compliance Foundation — type registries, extension manifests, architectural contracts 2026-03-31 21:17:39 +00:00