optional FastAPI service skeleton

This commit is contained in:
2026-05-06 19:30:49 +02:00
parent f4f77b2eeb
commit e53bc4144d
8 changed files with 352 additions and 10 deletions

View File

@@ -4,13 +4,13 @@ type: workplan
title: "Service API And Agent-Safe Operation"
domain: markitect
repo: kontextual-engine
status: todo
status: active
owner: codex
topic_slug: markitect
planning_priority: high
planning_order: 9
created: "2026-05-05"
updated: "2026-05-05"
updated: "2026-05-06"
state_hub_workstream_id: "6e672b1a-2e57-489e-8516-cb75611d4354"
---
@@ -46,11 +46,20 @@ deterministic markdown operations. They must not expose the `mkt` CLI as the
engine control plane or let agents bypass engine policy, audit, lifecycle, and
review gates through Markitect APIs.
## Implementation Status
The first optional FastAPI service skeleton is implemented for health,
readiness, version, and OpenAPI contracts. See
`docs/service-api-implementation.md`.
Domain-resource endpoints, actor context, agent operations, context packages,
and dry-run/review-gate response contracts remain open in this workplan.
## S9.1 - Implement versioned FastAPI service skeleton and health contracts
```task
id: KONT-WP-0009-T001
status: todo
status: done
priority: high
state_hub_task_id: "bdb2380e-4ea1-4b8c-a6c9-fc8da2122813"
```
@@ -64,6 +73,15 @@ Acceptance:
- Service code wraps core contracts rather than becoming the architecture.
- API versioning policy is documented for MVP.
Implemented:
- `kontextual_engine.api.create_app()` creates an optional FastAPI adapter.
- `ServiceRuntime` provides health, readiness, and version payloads without
requiring FastAPI at import time.
- Operational probes are exposed at `/health`, `/ready`, and `/version`; MVP
versioned aliases are exposed under `/api/v1`.
- API versioning policy is documented in `docs/service-api-boundary.md`.
## S9.2 - Expose asset metadata relationship audit and policy APIs
```task