claude-agent-server 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/docs/openapi.json ADDED
@@ -0,0 +1,773 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Claude Agent Server API",
5
+ "description": "HTTP server wrapping the Claude Agent Ruby SDK as a REST + SSE API. Exposes Claude Code as a network service with session management, streaming, and authentication.",
6
+ "version": "0.1.0",
7
+ "license": {
8
+ "name": "MIT",
9
+ "url": "https://github.com/ya-luotao/claude-agent-server-ruby/blob/main/LICENSE"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "http://localhost:9292",
15
+ "description": "Local development"
16
+ }
17
+ ],
18
+ "security": [
19
+ {
20
+ "bearerAuth": []
21
+ }
22
+ ],
23
+ "paths": {
24
+ "/health": {
25
+ "get": {
26
+ "operationId": "getHealth",
27
+ "summary": "Health check (no auth)",
28
+ "security": [],
29
+ "tags": ["Health"],
30
+ "responses": {
31
+ "200": {
32
+ "description": "Server is healthy",
33
+ "content": {
34
+ "application/json": {
35
+ "schema": {
36
+ "$ref": "#/components/schemas/HealthResponse"
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ },
44
+ "/v1/health": {
45
+ "get": {
46
+ "operationId": "getV1Health",
47
+ "summary": "Health check (versioned, no auth)",
48
+ "security": [],
49
+ "tags": ["Health"],
50
+ "responses": {
51
+ "200": {
52
+ "description": "Server is healthy",
53
+ "content": {
54
+ "application/json": {
55
+ "schema": {
56
+ "$ref": "#/components/schemas/HealthResponse"
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ },
64
+ "/v1/info": {
65
+ "get": {
66
+ "operationId": "getInfo",
67
+ "summary": "Server info",
68
+ "tags": ["Health"],
69
+ "responses": {
70
+ "200": {
71
+ "description": "Server version and status",
72
+ "content": {
73
+ "application/json": {
74
+ "schema": {
75
+ "$ref": "#/components/schemas/InfoResponse"
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ },
83
+ "/v1/query": {
84
+ "post": {
85
+ "operationId": "postQuery",
86
+ "summary": "One-shot query (JSON response)",
87
+ "tags": ["Query"],
88
+ "requestBody": {
89
+ "required": true,
90
+ "content": {
91
+ "application/json": {
92
+ "schema": {
93
+ "$ref": "#/components/schemas/QueryRequest"
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "responses": {
99
+ "200": {
100
+ "description": "Query completed",
101
+ "content": {
102
+ "application/json": {
103
+ "schema": {
104
+ "$ref": "#/components/schemas/QueryResponse"
105
+ }
106
+ }
107
+ }
108
+ },
109
+ "400": { "$ref": "#/components/responses/InvalidRequest" },
110
+ "502": { "$ref": "#/components/responses/CLIError" }
111
+ }
112
+ }
113
+ },
114
+ "/v1/query/stream": {
115
+ "post": {
116
+ "operationId": "postQueryStream",
117
+ "summary": "One-shot query (SSE stream)",
118
+ "tags": ["Query"],
119
+ "requestBody": {
120
+ "required": true,
121
+ "content": {
122
+ "application/json": {
123
+ "schema": {
124
+ "$ref": "#/components/schemas/QueryRequest"
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "responses": {
130
+ "200": {
131
+ "description": "SSE event stream",
132
+ "content": {
133
+ "text/event-stream": {
134
+ "schema": {
135
+ "type": "string",
136
+ "description": "Newline-delimited SSE events: id, event, data fields"
137
+ }
138
+ }
139
+ }
140
+ },
141
+ "400": { "$ref": "#/components/responses/InvalidRequest" }
142
+ }
143
+ }
144
+ },
145
+ "/v1/sessions": {
146
+ "get": {
147
+ "operationId": "listSessions",
148
+ "summary": "List active sessions",
149
+ "tags": ["Sessions"],
150
+ "responses": {
151
+ "200": {
152
+ "description": "Session list",
153
+ "content": {
154
+ "application/json": {
155
+ "schema": {
156
+ "type": "object",
157
+ "properties": {
158
+ "sessions": {
159
+ "type": "array",
160
+ "items": { "$ref": "#/components/schemas/SessionInfo" }
161
+ }
162
+ },
163
+ "required": ["sessions"]
164
+ }
165
+ }
166
+ }
167
+ }
168
+ }
169
+ },
170
+ "post": {
171
+ "operationId": "createSession",
172
+ "summary": "Create interactive session",
173
+ "tags": ["Sessions"],
174
+ "requestBody": {
175
+ "required": true,
176
+ "content": {
177
+ "application/json": {
178
+ "schema": {
179
+ "$ref": "#/components/schemas/CreateSessionRequest"
180
+ }
181
+ }
182
+ }
183
+ },
184
+ "responses": {
185
+ "201": {
186
+ "description": "Session created",
187
+ "content": {
188
+ "application/json": {
189
+ "schema": {
190
+ "$ref": "#/components/schemas/SessionInfo"
191
+ }
192
+ }
193
+ }
194
+ },
195
+ "409": { "$ref": "#/components/responses/SessionAlreadyExists" },
196
+ "429": { "$ref": "#/components/responses/SessionLimitReached" }
197
+ }
198
+ }
199
+ },
200
+ "/v1/sessions/{sessionId}": {
201
+ "parameters": [
202
+ { "$ref": "#/components/parameters/SessionId" }
203
+ ],
204
+ "get": {
205
+ "operationId": "getSession",
206
+ "summary": "Get session info",
207
+ "tags": ["Sessions"],
208
+ "responses": {
209
+ "200": {
210
+ "description": "Session info",
211
+ "content": {
212
+ "application/json": {
213
+ "schema": {
214
+ "$ref": "#/components/schemas/SessionInfo"
215
+ }
216
+ }
217
+ }
218
+ },
219
+ "404": { "$ref": "#/components/responses/SessionNotFound" }
220
+ }
221
+ },
222
+ "delete": {
223
+ "operationId": "deleteSession",
224
+ "summary": "Disconnect and cleanup session",
225
+ "tags": ["Sessions"],
226
+ "responses": {
227
+ "200": {
228
+ "description": "Session disconnected",
229
+ "content": {
230
+ "application/json": {
231
+ "schema": {
232
+ "type": "object",
233
+ "properties": {
234
+ "status": { "type": "string", "example": "disconnected" },
235
+ "id": { "type": "string" }
236
+ }
237
+ }
238
+ }
239
+ }
240
+ },
241
+ "404": { "$ref": "#/components/responses/SessionNotFound" }
242
+ }
243
+ }
244
+ },
245
+ "/v1/sessions/{sessionId}/messages": {
246
+ "parameters": [
247
+ { "$ref": "#/components/parameters/SessionId" }
248
+ ],
249
+ "post": {
250
+ "operationId": "sendMessage",
251
+ "summary": "Send message to session",
252
+ "tags": ["Sessions"],
253
+ "requestBody": {
254
+ "required": true,
255
+ "content": {
256
+ "application/json": {
257
+ "schema": {
258
+ "$ref": "#/components/schemas/SendMessageRequest"
259
+ }
260
+ }
261
+ }
262
+ },
263
+ "responses": {
264
+ "200": {
265
+ "description": "Message sent",
266
+ "content": {
267
+ "application/json": {
268
+ "schema": {
269
+ "type": "object",
270
+ "properties": {
271
+ "status": { "type": "string", "example": "sent" },
272
+ "sessionId": { "type": "string" }
273
+ }
274
+ }
275
+ }
276
+ }
277
+ },
278
+ "400": { "$ref": "#/components/responses/InvalidRequest" },
279
+ "404": { "$ref": "#/components/responses/SessionNotFound" }
280
+ }
281
+ }
282
+ },
283
+ "/v1/sessions/{sessionId}/messages/stream": {
284
+ "parameters": [
285
+ { "$ref": "#/components/parameters/SessionId" }
286
+ ],
287
+ "get": {
288
+ "operationId": "streamMessages",
289
+ "summary": "SSE stream of session messages (legacy)",
290
+ "description": "Prefer /v1/sessions/{sessionId}/events/sse for new integrations.",
291
+ "tags": ["Sessions"],
292
+ "parameters": [
293
+ {
294
+ "name": "Last-Event-Id",
295
+ "in": "header",
296
+ "description": "Resume from this event index",
297
+ "schema": { "type": "string" }
298
+ }
299
+ ],
300
+ "responses": {
301
+ "200": {
302
+ "description": "SSE event stream",
303
+ "content": {
304
+ "text/event-stream": {
305
+ "schema": { "type": "string" }
306
+ }
307
+ }
308
+ },
309
+ "404": { "$ref": "#/components/responses/SessionNotFound" }
310
+ }
311
+ }
312
+ },
313
+ "/v1/sessions/{sessionId}/events": {
314
+ "parameters": [
315
+ { "$ref": "#/components/parameters/SessionId" }
316
+ ],
317
+ "get": {
318
+ "operationId": "listEvents",
319
+ "summary": "Poll events by offset",
320
+ "tags": ["Events"],
321
+ "parameters": [
322
+ {
323
+ "name": "offset",
324
+ "in": "query",
325
+ "description": "Event index to start from (default: 0)",
326
+ "schema": { "type": "integer", "default": 0 }
327
+ },
328
+ {
329
+ "name": "limit",
330
+ "in": "query",
331
+ "description": "Maximum number of events to return",
332
+ "schema": { "type": "integer" }
333
+ }
334
+ ],
335
+ "responses": {
336
+ "200": {
337
+ "description": "Events page",
338
+ "content": {
339
+ "application/json": {
340
+ "schema": {
341
+ "$ref": "#/components/schemas/EventsResponse"
342
+ }
343
+ }
344
+ }
345
+ },
346
+ "404": { "$ref": "#/components/responses/SessionNotFound" }
347
+ }
348
+ }
349
+ },
350
+ "/v1/sessions/{sessionId}/events/sse": {
351
+ "parameters": [
352
+ { "$ref": "#/components/parameters/SessionId" }
353
+ ],
354
+ "get": {
355
+ "operationId": "streamEvents",
356
+ "summary": "SSE stream with resume support",
357
+ "tags": ["Events"],
358
+ "parameters": [
359
+ {
360
+ "name": "Last-Event-Id",
361
+ "in": "header",
362
+ "description": "Resume from this event index",
363
+ "schema": { "type": "string" }
364
+ }
365
+ ],
366
+ "responses": {
367
+ "200": {
368
+ "description": "SSE event stream with id fields for resumption",
369
+ "content": {
370
+ "text/event-stream": {
371
+ "schema": { "type": "string" }
372
+ }
373
+ }
374
+ },
375
+ "404": { "$ref": "#/components/responses/SessionNotFound" }
376
+ }
377
+ }
378
+ },
379
+ "/v1/sessions/{sessionId}/interrupt": {
380
+ "parameters": [
381
+ { "$ref": "#/components/parameters/SessionId" }
382
+ ],
383
+ "post": {
384
+ "operationId": "interruptSession",
385
+ "summary": "Interrupt current turn",
386
+ "tags": ["Sessions"],
387
+ "responses": {
388
+ "200": {
389
+ "description": "Session interrupted",
390
+ "content": {
391
+ "application/json": {
392
+ "schema": {
393
+ "type": "object",
394
+ "properties": {
395
+ "status": { "type": "string", "example": "interrupted" },
396
+ "sessionId": { "type": "string" }
397
+ }
398
+ }
399
+ }
400
+ }
401
+ },
402
+ "404": { "$ref": "#/components/responses/SessionNotFound" }
403
+ }
404
+ }
405
+ },
406
+ "/v1/sessions/{sessionId}/model": {
407
+ "parameters": [
408
+ { "$ref": "#/components/parameters/SessionId" }
409
+ ],
410
+ "post": {
411
+ "operationId": "switchModel",
412
+ "summary": "Switch model mid-session",
413
+ "tags": ["Sessions"],
414
+ "requestBody": {
415
+ "required": true,
416
+ "content": {
417
+ "application/json": {
418
+ "schema": {
419
+ "$ref": "#/components/schemas/SwitchModelRequest"
420
+ }
421
+ }
422
+ }
423
+ },
424
+ "responses": {
425
+ "200": {
426
+ "description": "Model switched",
427
+ "content": {
428
+ "application/json": {
429
+ "schema": {
430
+ "type": "object",
431
+ "properties": {
432
+ "status": { "type": "string", "example": "model_changed" },
433
+ "model": { "type": "string" },
434
+ "sessionId": { "type": "string" }
435
+ }
436
+ }
437
+ }
438
+ }
439
+ },
440
+ "400": { "$ref": "#/components/responses/InvalidRequest" },
441
+ "404": { "$ref": "#/components/responses/SessionNotFound" }
442
+ }
443
+ }
444
+ },
445
+ "/v1/sessions/{sessionId}/mcp-status": {
446
+ "parameters": [
447
+ { "$ref": "#/components/parameters/SessionId" }
448
+ ],
449
+ "get": {
450
+ "operationId": "getMcpStatus",
451
+ "summary": "Get MCP server status",
452
+ "tags": ["Sessions"],
453
+ "responses": {
454
+ "200": {
455
+ "description": "MCP status",
456
+ "content": {
457
+ "application/json": {
458
+ "schema": {
459
+ "type": "object",
460
+ "properties": {
461
+ "sessionId": { "type": "string" },
462
+ "mcpStatus": { "type": "object" }
463
+ }
464
+ }
465
+ }
466
+ }
467
+ },
468
+ "404": { "$ref": "#/components/responses/SessionNotFound" }
469
+ }
470
+ }
471
+ },
472
+ "/v1/sessions/{sessionId}/history": {
473
+ "parameters": [
474
+ { "$ref": "#/components/parameters/SessionId" }
475
+ ],
476
+ "get": {
477
+ "operationId": "getHistory",
478
+ "summary": "Get full session event history",
479
+ "tags": ["Sessions"],
480
+ "responses": {
481
+ "200": {
482
+ "description": "Session history",
483
+ "content": {
484
+ "application/json": {
485
+ "schema": {
486
+ "type": "object",
487
+ "properties": {
488
+ "sessionId": { "type": "string" },
489
+ "messages": {
490
+ "type": "array",
491
+ "items": { "$ref": "#/components/schemas/IndexedEvent" }
492
+ }
493
+ }
494
+ }
495
+ }
496
+ }
497
+ },
498
+ "404": { "$ref": "#/components/responses/SessionNotFound" }
499
+ }
500
+ }
501
+ },
502
+ "/v1/cli-sessions": {
503
+ "get": {
504
+ "operationId": "listCliSessions",
505
+ "summary": "List past CLI sessions (read-only)",
506
+ "tags": ["CLI Sessions"],
507
+ "parameters": [
508
+ { "name": "directory", "in": "query", "schema": { "type": "string" } },
509
+ { "name": "limit", "in": "query", "schema": { "type": "integer" } },
510
+ { "name": "includeWorktrees", "in": "query", "schema": { "type": "string", "enum": ["true", "false"], "default": "true" } }
511
+ ],
512
+ "responses": {
513
+ "200": {
514
+ "description": "CLI sessions",
515
+ "content": {
516
+ "application/json": {
517
+ "schema": {
518
+ "type": "object",
519
+ "properties": {
520
+ "sessions": {
521
+ "type": "array",
522
+ "items": { "$ref": "#/components/schemas/CliSessionInfo" }
523
+ }
524
+ }
525
+ }
526
+ }
527
+ }
528
+ }
529
+ }
530
+ }
531
+ },
532
+ "/v1/cli-sessions/{sessionId}/messages": {
533
+ "parameters": [
534
+ { "$ref": "#/components/parameters/SessionId" }
535
+ ],
536
+ "get": {
537
+ "operationId": "getCliSessionMessages",
538
+ "summary": "Get CLI session transcript",
539
+ "tags": ["CLI Sessions"],
540
+ "parameters": [
541
+ { "name": "directory", "in": "query", "schema": { "type": "string" } },
542
+ { "name": "limit", "in": "query", "schema": { "type": "integer" } },
543
+ { "name": "offset", "in": "query", "schema": { "type": "integer", "default": 0 } }
544
+ ],
545
+ "responses": {
546
+ "200": {
547
+ "description": "Session messages",
548
+ "content": {
549
+ "application/json": {
550
+ "schema": {
551
+ "type": "object",
552
+ "properties": {
553
+ "sessionId": { "type": "string" },
554
+ "messages": { "type": "array", "items": { "$ref": "#/components/schemas/CliSessionMessage" } }
555
+ }
556
+ }
557
+ }
558
+ }
559
+ }
560
+ }
561
+ }
562
+ }
563
+ },
564
+ "components": {
565
+ "securitySchemes": {
566
+ "bearerAuth": {
567
+ "type": "http",
568
+ "scheme": "bearer",
569
+ "description": "Set via CLAUDE_SERVER_AUTH_TOKEN env var or --token flag"
570
+ }
571
+ },
572
+ "parameters": {
573
+ "SessionId": {
574
+ "name": "sessionId",
575
+ "in": "path",
576
+ "required": true,
577
+ "schema": { "type": "string" }
578
+ }
579
+ },
580
+ "schemas": {
581
+ "HealthResponse": {
582
+ "type": "object",
583
+ "properties": {
584
+ "status": { "type": "string", "example": "ok" }
585
+ },
586
+ "required": ["status"]
587
+ },
588
+ "InfoResponse": {
589
+ "type": "object",
590
+ "properties": {
591
+ "version": { "type": "string", "example": "0.1.0" },
592
+ "sdkVersion": { "type": "string", "example": "0.8.0" },
593
+ "activeSessions": { "type": "integer", "example": 3 }
594
+ },
595
+ "required": ["version", "sdkVersion", "activeSessions"]
596
+ },
597
+ "QueryRequest": {
598
+ "type": "object",
599
+ "properties": {
600
+ "prompt": { "type": "string", "description": "The prompt to send" },
601
+ "options": { "$ref": "#/components/schemas/SdkOptions" }
602
+ },
603
+ "required": ["prompt"]
604
+ },
605
+ "QueryResponse": {
606
+ "type": "object",
607
+ "properties": {
608
+ "messages": { "type": "array", "items": { "$ref": "#/components/schemas/Message" } }
609
+ },
610
+ "required": ["messages"]
611
+ },
612
+ "CreateSessionRequest": {
613
+ "type": "object",
614
+ "properties": {
615
+ "id": { "type": "string", "description": "Client-provided session ID (optional, UUID generated if omitted)" },
616
+ "prompt": { "type": "string", "description": "Initial prompt (optional)" },
617
+ "options": { "$ref": "#/components/schemas/SdkOptions" }
618
+ }
619
+ },
620
+ "SendMessageRequest": {
621
+ "type": "object",
622
+ "properties": {
623
+ "prompt": { "type": "string" }
624
+ },
625
+ "required": ["prompt"]
626
+ },
627
+ "SwitchModelRequest": {
628
+ "type": "object",
629
+ "properties": {
630
+ "model": { "type": "string", "example": "claude-sonnet-4-20250514" }
631
+ },
632
+ "required": ["model"]
633
+ },
634
+ "SessionInfo": {
635
+ "type": "object",
636
+ "properties": {
637
+ "id": { "type": "string" },
638
+ "status": { "type": "string", "enum": ["connected", "finished", "disconnected"] },
639
+ "createdAt": { "type": "string", "format": "date-time" },
640
+ "lastActivity": { "type": "string", "format": "date-time" },
641
+ "messageCount": { "type": "integer" }
642
+ },
643
+ "required": ["id", "status", "createdAt", "lastActivity", "messageCount"]
644
+ },
645
+ "EventsResponse": {
646
+ "type": "object",
647
+ "properties": {
648
+ "sessionId": { "type": "string" },
649
+ "events": { "type": "array", "items": { "$ref": "#/components/schemas/IndexedEvent" } },
650
+ "nextOffset": { "type": "integer", "description": "Use as offset for the next poll request" }
651
+ },
652
+ "required": ["sessionId", "events", "nextOffset"]
653
+ },
654
+ "IndexedEvent": {
655
+ "type": "object",
656
+ "properties": {
657
+ "index": { "type": "integer", "description": "Monotonically increasing event index" },
658
+ "timestamp": { "type": "string", "format": "date-time" },
659
+ "message": { "$ref": "#/components/schemas/Message" }
660
+ },
661
+ "required": ["index", "timestamp", "message"]
662
+ },
663
+ "Message": {
664
+ "type": "object",
665
+ "description": "A serialized SDK message. The 'type' field determines the shape.",
666
+ "properties": {
667
+ "type": { "type": "string", "enum": ["user", "assistant", "system", "result", "stream_event", "rate_limit_event", "unknown"] }
668
+ },
669
+ "required": ["type"]
670
+ },
671
+ "SdkOptions": {
672
+ "type": "object",
673
+ "description": "Options passed to ClaudeAgentSDK (camelCase keys)",
674
+ "properties": {
675
+ "model": { "type": "string" },
676
+ "maxTurns": { "type": "integer" },
677
+ "maxBudgetUsd": { "type": "number" },
678
+ "allowedTools": { "type": "array", "items": { "type": "string" } },
679
+ "disallowedTools": { "type": "array", "items": { "type": "string" } },
680
+ "systemPrompt": { "type": "string" },
681
+ "permissionMode": { "type": "string", "enum": ["default", "acceptEdits", "plan", "bypassPermissions"] },
682
+ "cwd": { "type": "string" },
683
+ "effort": { "type": "string" }
684
+ }
685
+ },
686
+ "ProblemDetails": {
687
+ "type": "object",
688
+ "description": "RFC 9457 Problem Details",
689
+ "properties": {
690
+ "type": { "type": "string", "format": "uri", "example": "urn:claude-agent-server:error:session_not_found" },
691
+ "title": { "type": "string", "example": "Session Not Found" },
692
+ "status": { "type": "integer", "example": 404 },
693
+ "detail": { "type": "string", "example": "Session 'abc-123' not found" }
694
+ },
695
+ "required": ["type", "title", "status"]
696
+ },
697
+ "CliSessionInfo": {
698
+ "type": "object",
699
+ "properties": {
700
+ "sessionId": { "type": "string" },
701
+ "summary": { "type": "string" },
702
+ "lastModified": { "type": "integer" },
703
+ "fileSize": { "type": "integer" },
704
+ "customTitle": { "type": "string" },
705
+ "firstPrompt": { "type": "string" },
706
+ "gitBranch": { "type": "string" },
707
+ "cwd": { "type": "string" }
708
+ },
709
+ "required": ["sessionId", "summary", "lastModified", "fileSize"]
710
+ },
711
+ "CliSessionMessage": {
712
+ "type": "object",
713
+ "properties": {
714
+ "type": { "type": "string" },
715
+ "uuid": { "type": "string" },
716
+ "sessionId": { "type": "string" },
717
+ "message": { "type": "object" },
718
+ "parentToolUseId": { "type": "string" }
719
+ },
720
+ "required": ["type", "uuid", "sessionId", "message"]
721
+ }
722
+ },
723
+ "responses": {
724
+ "InvalidRequest": {
725
+ "description": "Invalid request",
726
+ "content": {
727
+ "application/problem+json": {
728
+ "schema": { "$ref": "#/components/schemas/ProblemDetails" }
729
+ }
730
+ }
731
+ },
732
+ "SessionNotFound": {
733
+ "description": "Session not found",
734
+ "content": {
735
+ "application/problem+json": {
736
+ "schema": { "$ref": "#/components/schemas/ProblemDetails" }
737
+ }
738
+ }
739
+ },
740
+ "SessionAlreadyExists": {
741
+ "description": "Session already exists (duplicate client-provided ID)",
742
+ "content": {
743
+ "application/problem+json": {
744
+ "schema": { "$ref": "#/components/schemas/ProblemDetails" }
745
+ }
746
+ }
747
+ },
748
+ "SessionLimitReached": {
749
+ "description": "Maximum session limit reached",
750
+ "content": {
751
+ "application/problem+json": {
752
+ "schema": { "$ref": "#/components/schemas/ProblemDetails" }
753
+ }
754
+ }
755
+ },
756
+ "CLIError": {
757
+ "description": "Claude CLI error",
758
+ "content": {
759
+ "application/problem+json": {
760
+ "schema": { "$ref": "#/components/schemas/ProblemDetails" }
761
+ }
762
+ }
763
+ }
764
+ }
765
+ },
766
+ "tags": [
767
+ { "name": "Health", "description": "Server health and info" },
768
+ { "name": "Query", "description": "One-shot queries" },
769
+ { "name": "Sessions", "description": "Interactive session management" },
770
+ { "name": "Events", "description": "Event polling and streaming" },
771
+ { "name": "CLI Sessions", "description": "Browse past Claude CLI sessions (read-only)" }
772
+ ]
773
+ }