Expose list/get/claim/close for agent-harness intake against the same auth as POST /issues/ ingestion (HARNESS-WP-0001-T03).
29 lines
805 B
Python
29 lines
805 B
Python
"""
|
|
FastAPI application factory for issue-core.
|
|
"""
|
|
|
|
from fastapi import FastAPI
|
|
|
|
from .. import __version__
|
|
from .ingest import router as ingest_router
|
|
from .query import router as query_router
|
|
|
|
|
|
def create_app() -> FastAPI:
|
|
app = FastAPI(
|
|
title="issue-core",
|
|
description=(
|
|
"Authoritative task lifecycle manager for the Coulomb org. "
|
|
"POST /issues/ is the ingestion surface for activity-core's IssueSink; "
|
|
"GET/PATCH /issues/ is the worker poll/claim surface for agent-harness."
|
|
),
|
|
version=__version__,
|
|
)
|
|
app.include_router(ingest_router)
|
|
app.include_router(query_router)
|
|
|
|
@app.get("/healthz", tags=["meta"])
|
|
async def healthz() -> dict:
|
|
return {"status": "ok", "version": __version__}
|
|
|
|
return app
|