From b330e7319ccd06bc04eb1ee5a22de2d81734ef3a Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Tue, 25 Aug 2026 09:29:38 +0530 Subject: [PATCH] chore: remove Dependabot and sync OpenAPI snapshot - Delete .github/dependabot.yml (manual version management) - Sync api/openapi.yaml from hawk main to fix contract snapshot --- api/openapi.yaml | 115 +++++++++++++++++++++++++++++++++ tests/test_openapi_coverage.py | 3 + 2 files changed, 118 insertions(+) diff --git a/api/openapi.yaml b/api/openapi.yaml index 4f81c14..feccfa5 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -435,6 +435,59 @@ paths: schema: $ref: "#/components/schemas/Error" + /v1/status: + get: + operationId: statusSnapshot + tags: [system] + summary: Get a redacted daemon status snapshot + responses: + "200": + description: Current daemon status + content: + application/json: + schema: + type: object + + /v1/agent/status: + get: + operationId: agentLiveStatus + tags: [system] + summary: Live per-agent status for external mission-control dashboards + description: | + Returns machine-readable live state (working/idle/stale) for every + active agent session, derived from daemon ground truth: an in-flight + generation means working; recency of last use distinguishes idle from + stale. Designed for supervisors such as terminal mission-control + dashboards to poll. + responses: + "200": + description: Live agent statuses + content: + application/json: + schema: + type: object + properties: + generated_at: + type: string + agents: + type: array + items: + type: object + properties: + session_id: + type: string + agent: + type: string + state: + type: string + enum: [working, idle, stale] + turns: + type: integer + cwd: + type: string + last_used: + type: string + /v1/ready: get: operationId: readinessProbe @@ -681,6 +734,68 @@ paths: schema: $ref: "#/components/schemas/Error" + /v1/sessions/{id}/lease: + post: + operationId: acquireSessionLease + tags: [sessions] + summary: Acquire a single-owner lease on a session + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + "200": + description: Lease acquired + content: + application/json: + schema: + type: object + properties: + session_id: + type: string + fence: + type: string + "400": + description: Invalid session id + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + delete: + operationId: releaseSessionLease + tags: [sessions] + summary: Release a session lease (requires the current fence) + parameters: + - name: id + in: path + required: true + schema: + type: string + - name: fence + in: query + schema: + type: string + responses: + "200": + description: Lease released + content: + application/json: + schema: + type: object + properties: + session_id: + type: string + released: + type: string + "409": + description: Lease owned by another fence + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /v1/sessions/{id}/graph: get: operationId: getSessionGraph diff --git a/tests/test_openapi_coverage.py b/tests/test_openapi_coverage.py index 04bfcdf..d89016a 100644 --- a/tests/test_openapi_coverage.py +++ b/tests/test_openapi_coverage.py @@ -17,7 +17,10 @@ def test_every_daemon_path_has_an_sdk_support_decision() -> None: "/v1/sessions/{id}": "supported", "/v1/sessions/{id}/graph": "supported", "/v1/sessions/{id}/messages": "supported", + "/v1/sessions/{id}/lease": "unsupported: session lease endpoint", "/v1/stats": "supported", + "/v1/status": "unsupported: daemon status endpoint", + "/v1/agent/status": "unsupported: agent status endpoint", "/v1/review": "unsupported: asynchronous review orchestration", "/v1/review/status": "unsupported: review worker status", "/v1/cancel": "unsupported: in-flight request cancellation",