Skip to content

Commit b4b545b

Browse files
committed
sync api/openapi.yaml with upstream GrayCodeAI/hawk
1 parent fdd6a82 commit b4b545b

1 file changed

Lines changed: 28 additions & 8 deletions

File tree

api/openapi.yaml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ components:
4343
description: The user prompt to send to the agent
4444
session_id:
4545
type: string
46-
description: Reserved for session continuation (currently ignored; every chat creates a fresh engine session)
46+
maxLength: 128
47+
pattern: '^[A-Za-z0-9._-]+$'
48+
description: Durable session ID to continue. The session must already exist; successful continuation returns the same ID.
4749
model:
4850
type: string
4951
description: Optional model override
@@ -55,10 +57,10 @@ components:
5557
description: Autonomy preset controlling non-interactive permission approval
5658
cwd:
5759
type: string
58-
description: Working directory for the agent session
60+
description: Existing directory associated with session metadata. The daemon executes tools from its startup working directory; it never performs a process-wide chdir per request.
5961
agent:
6062
type: string
61-
description: Named agent persona to run
63+
description: Named Hawk agent persona to apply. Continuations inherit the persisted persona when omitted.
6264

6365
ChatResponse:
6466
type: object
@@ -79,7 +81,7 @@ components:
7981

8082
Session:
8183
type: object
82-
description: Lightweight in-memory record of a daemon chat session.
84+
description: Lightweight active record for a durably persisted daemon chat session.
8385
properties:
8486
id:
8587
type: string
@@ -93,6 +95,8 @@ components:
9395
type: integer
9496
cwd:
9597
type: string
98+
agent:
99+
type: string
96100

97101
SessionDetail:
98102
type: object
@@ -110,6 +114,8 @@ components:
110114
type: string
111115
provider:
112116
type: string
117+
agent:
118+
type: string
113119
cwd:
114120
type: string
115121
name:
@@ -277,8 +283,9 @@ paths:
277283
tags: [system]
278284
summary: Readiness probe
279285
description: |
280-
Returns 200 when the daemon can serve chat (engine configured),
281-
503 with a reason otherwise.
286+
Returns 200 only when a session factory is configured and Eyrie's local
287+
preflight confirms provider state, catalog, credentials, and model
288+
selection are ready. Returns 503 with the failed dependency otherwise.
282289
security: []
283290
responses:
284291
"200":
@@ -301,8 +308,10 @@ paths:
301308
description: |
302309
Non-streaming: returns the full response in one JSON object.
303310
Streaming: send `Accept: text/event-stream` to receive Server-Sent Events.
304-
Each request creates a new agent session; there is no standalone
305-
session-creation endpoint.
311+
Omit `session_id` to create and durably persist a new session. Supply a
312+
previously returned `session_id` to load its transcript, append a turn,
313+
and update that same durable session. The returned JSON field and the
314+
`X-Hawk-Session-ID` header identify a retrievable `/v1/sessions/{id}`.
306315
requestBody:
307316
required: true
308317
content:
@@ -312,6 +321,11 @@ paths:
312321
responses:
313322
"200":
314323
description: Agent response (or SSE stream)
324+
headers:
325+
X-Hawk-Session-ID:
326+
description: Durable session ID created or continued by this request.
327+
schema:
328+
type: string
315329
content:
316330
application/json:
317331
schema:
@@ -331,6 +345,12 @@ paths:
331345
application/json:
332346
schema:
333347
$ref: "#/components/schemas/Error"
348+
"404":
349+
description: Requested continuation session does not exist
350+
content:
351+
application/json:
352+
schema:
353+
$ref: "#/components/schemas/Error"
334354
"503":
335355
description: Engine not configured
336356
content:

0 commit comments

Comments
 (0)