@vibe80/vibe80 0.1.1

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.
Files changed (123) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +52 -0
  3. package/bin/vibe80.js +176 -0
  4. package/client/dist/assets/DiffPanel-C_IGzKI5.js +1 -0
  5. package/client/dist/assets/ExplorerPanel-BtlyAT00.js +11 -0
  6. package/client/dist/assets/LogsPanel-BW79JWzR.js +1 -0
  7. package/client/dist/assets/SettingsPanel-b9B7ygP_.js +1 -0
  8. package/client/dist/assets/TerminalPanel-C3fc1HbK.js +1 -0
  9. package/client/dist/assets/browser-e3WgtMs-.js +8 -0
  10. package/client/dist/assets/index-CgqGyssr.css +32 -0
  11. package/client/dist/assets/index-DnwKjoj7.js +706 -0
  12. package/client/dist/assets/vibe80_dark-D7OVPKcU.svg +51 -0
  13. package/client/dist/assets/vibe80_light-BJK37ybI.svg +50 -0
  14. package/client/dist/favicon.ico +0 -0
  15. package/client/dist/favicon.png +0 -0
  16. package/client/dist/favicon.svg +35 -0
  17. package/client/dist/index.html +14 -0
  18. package/client/index.html +16 -0
  19. package/client/package.json +34 -0
  20. package/client/public/favicon.ico +0 -0
  21. package/client/public/favicon.png +0 -0
  22. package/client/public/favicon.svg +35 -0
  23. package/client/public/pwa-192x192.png +0 -0
  24. package/client/public/pwa-512x512.png +0 -0
  25. package/client/src/App.jsx +3131 -0
  26. package/client/src/assets/logo_small.png +0 -0
  27. package/client/src/assets/vibe80_dark.svg +51 -0
  28. package/client/src/assets/vibe80_light.svg +50 -0
  29. package/client/src/components/Chat/ChatComposer.jsx +228 -0
  30. package/client/src/components/Chat/ChatMessages.jsx +811 -0
  31. package/client/src/components/Chat/ChatToolbar.jsx +109 -0
  32. package/client/src/components/Chat/useChatComposer.js +462 -0
  33. package/client/src/components/Diff/DiffPanel.jsx +129 -0
  34. package/client/src/components/Explorer/ExplorerPanel.jsx +449 -0
  35. package/client/src/components/Logs/LogsPanel.jsx +80 -0
  36. package/client/src/components/SessionGate/SessionGate.jsx +874 -0
  37. package/client/src/components/Settings/SettingsPanel.jsx +212 -0
  38. package/client/src/components/Terminal/TerminalPanel.jsx +39 -0
  39. package/client/src/components/Topbar/Topbar.jsx +101 -0
  40. package/client/src/components/WorktreeTabs.css +419 -0
  41. package/client/src/components/WorktreeTabs.jsx +604 -0
  42. package/client/src/hooks/useAttachments.jsx +125 -0
  43. package/client/src/hooks/useBacklog.js +254 -0
  44. package/client/src/hooks/useChatClear.js +90 -0
  45. package/client/src/hooks/useChatCollapse.js +42 -0
  46. package/client/src/hooks/useChatCommands.js +294 -0
  47. package/client/src/hooks/useChatExport.js +144 -0
  48. package/client/src/hooks/useChatMessagesState.js +69 -0
  49. package/client/src/hooks/useChatSend.js +158 -0
  50. package/client/src/hooks/useChatSocket.js +1239 -0
  51. package/client/src/hooks/useDiffNavigation.js +19 -0
  52. package/client/src/hooks/useExplorerActions.js +1184 -0
  53. package/client/src/hooks/useGitIdentity.js +114 -0
  54. package/client/src/hooks/useLayoutMode.js +31 -0
  55. package/client/src/hooks/useLocalPreferences.js +131 -0
  56. package/client/src/hooks/useMessageSync.js +30 -0
  57. package/client/src/hooks/useNotifications.js +132 -0
  58. package/client/src/hooks/usePaneNavigation.js +67 -0
  59. package/client/src/hooks/usePanelState.js +13 -0
  60. package/client/src/hooks/useProviderSelection.js +70 -0
  61. package/client/src/hooks/useRepoBranchesModels.js +218 -0
  62. package/client/src/hooks/useRepoStatus.js +350 -0
  63. package/client/src/hooks/useRpcLogActions.js +19 -0
  64. package/client/src/hooks/useRpcLogView.js +58 -0
  65. package/client/src/hooks/useSessionHandoff.js +97 -0
  66. package/client/src/hooks/useSessionLifecycle.js +287 -0
  67. package/client/src/hooks/useSessionReset.js +63 -0
  68. package/client/src/hooks/useSessionResync.js +77 -0
  69. package/client/src/hooks/useTerminalSession.js +328 -0
  70. package/client/src/hooks/useToolbarExport.js +27 -0
  71. package/client/src/hooks/useTurnInterrupt.js +43 -0
  72. package/client/src/hooks/useVibe80Forms.js +128 -0
  73. package/client/src/hooks/useWorkspaceAuth.js +932 -0
  74. package/client/src/hooks/useWorktreeCloseConfirm.js +46 -0
  75. package/client/src/hooks/useWorktrees.js +396 -0
  76. package/client/src/i18n.jsx +87 -0
  77. package/client/src/index.css +5147 -0
  78. package/client/src/locales/en.json +37 -0
  79. package/client/src/locales/fr.json +321 -0
  80. package/client/src/main.jsx +16 -0
  81. package/client/vite.config.js +62 -0
  82. package/docs/api/asyncapi.json +1511 -0
  83. package/docs/api/openapi.json +3242 -0
  84. package/git_hooks/prepare-commit-msg +35 -0
  85. package/package.json +36 -0
  86. package/server/package.json +29 -0
  87. package/server/scripts/rotate-workspace-secret.js +101 -0
  88. package/server/src/claudeClient.js +454 -0
  89. package/server/src/clientEvents.js +594 -0
  90. package/server/src/clientFactory.js +164 -0
  91. package/server/src/codexClient.js +468 -0
  92. package/server/src/config.js +27 -0
  93. package/server/src/helpers.js +138 -0
  94. package/server/src/index.js +1641 -0
  95. package/server/src/middleware/auth.js +93 -0
  96. package/server/src/middleware/debug.js +89 -0
  97. package/server/src/middleware/errorTypes.js +60 -0
  98. package/server/src/providerLogger.js +60 -0
  99. package/server/src/routes/files.js +114 -0
  100. package/server/src/routes/git.js +183 -0
  101. package/server/src/routes/health.js +13 -0
  102. package/server/src/routes/sessions.js +407 -0
  103. package/server/src/routes/workspaces.js +296 -0
  104. package/server/src/routes/worktrees.js +993 -0
  105. package/server/src/runAs.js +458 -0
  106. package/server/src/runtimeStore.js +32 -0
  107. package/server/src/services/auth.js +157 -0
  108. package/server/src/services/claudeThreadDirectory.js +33 -0
  109. package/server/src/services/session.js +918 -0
  110. package/server/src/services/workspace.js +858 -0
  111. package/server/src/storage/index.js +17 -0
  112. package/server/src/storage/redis.js +412 -0
  113. package/server/src/storage/sqlite.js +649 -0
  114. package/server/src/worktreeManager.js +717 -0
  115. package/server/tests/README.md +13 -0
  116. package/server/tests/factories/workspaceFactory.js +13 -0
  117. package/server/tests/fixtures/workspaceCredentials.json +4 -0
  118. package/server/tests/integration/routes/workspaces-routes.test.js +626 -0
  119. package/server/tests/setup/env.js +9 -0
  120. package/server/tests/unit/helpers.test.js +95 -0
  121. package/server/tests/unit/services/auth.test.js +181 -0
  122. package/server/tests/unit/services/workspace.test.js +115 -0
  123. package/server/vitest.config.js +23 -0
@@ -0,0 +1,3242 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "vibe80 REST API",
5
+ "version": "1.1.0",
6
+ "description": "Spec (workspace auth, providers at workspace level)"
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "http://localhost:5179"
11
+ }
12
+ ],
13
+ "paths": {
14
+ "/api/v1/health": {
15
+ "get": {
16
+ "summary": "Health check",
17
+ "responses": {
18
+ "200": {
19
+ "description": "Health response",
20
+ "content": {
21
+ "application/json": {
22
+ "schema": {
23
+ "$ref": "#/components/schemas/HealthResponse"
24
+ }
25
+ }
26
+ }
27
+ }
28
+ },
29
+ "parameters": []
30
+ }
31
+ },
32
+ "/api/v1/sessions/{sessionId}/health": {
33
+ "get": {
34
+ "summary": "Health check for a session",
35
+ "parameters": [
36
+ {
37
+ "$ref": "#/components/parameters/SessionId"
38
+ }
39
+ ],
40
+ "responses": {
41
+ "200": {
42
+ "description": "Session health response",
43
+ "content": {
44
+ "application/json": {
45
+ "schema": {
46
+ "$ref": "#/components/schemas/HealthResponse"
47
+ }
48
+ }
49
+ }
50
+ },
51
+ "404": {
52
+ "$ref": "#/components/responses/NotFound"
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "/api/v1/sessions/{sessionId}": {
58
+ "get": {
59
+ "summary": "Get session",
60
+ "parameters": [
61
+ {
62
+ "$ref": "#/components/parameters/SessionId"
63
+ }
64
+ ],
65
+ "responses": {
66
+ "200": {
67
+ "description": "Session state",
68
+ "content": {
69
+ "application/json": {
70
+ "schema": {
71
+ "$ref": "#/components/schemas/SessionResponse"
72
+ }
73
+ }
74
+ }
75
+ },
76
+ "404": {
77
+ "$ref": "#/components/responses/NotFound"
78
+ }
79
+ }
80
+ }
81
+ },
82
+ "/api/v1/sessions/{sessionId}/diff": {
83
+ "get": {
84
+ "summary": "Get repo diff for session",
85
+ "parameters": [
86
+ {
87
+ "$ref": "#/components/parameters/SessionId"
88
+ }
89
+ ],
90
+ "responses": {
91
+ "200": {
92
+ "description": "Repo diff",
93
+ "content": {
94
+ "application/json": {
95
+ "schema": {
96
+ "$ref": "#/components/schemas/RepoDiff"
97
+ }
98
+ }
99
+ }
100
+ },
101
+ "404": {
102
+ "$ref": "#/components/responses/NotFound"
103
+ }
104
+ }
105
+ }
106
+ },
107
+ "/api/v1/sessions/{sessionId}/clear": {
108
+ "post": {
109
+ "summary": "Clear messages for provider or worktree",
110
+ "parameters": [
111
+ {
112
+ "$ref": "#/components/parameters/SessionId"
113
+ }
114
+ ],
115
+ "requestBody": {
116
+ "required": false,
117
+ "content": {
118
+ "application/json": {
119
+ "schema": {
120
+ "$ref": "#/components/schemas/SessionClearRequest"
121
+ }
122
+ }
123
+ }
124
+ },
125
+ "responses": {
126
+ "200": {
127
+ "description": "Cleared",
128
+ "content": {
129
+ "application/json": {
130
+ "schema": {
131
+ "$ref": "#/components/schemas/OkResponse"
132
+ }
133
+ }
134
+ }
135
+ },
136
+ "404": {
137
+ "$ref": "#/components/responses/NotFound"
138
+ }
139
+ }
140
+ }
141
+ },
142
+ "/api/v1/sessions": {
143
+ "post": {
144
+ "summary": "Create session",
145
+ "requestBody": {
146
+ "required": true,
147
+ "content": {
148
+ "application/json": {
149
+ "schema": {
150
+ "$ref": "#/components/schemas/CreateSessionRequest"
151
+ }
152
+ }
153
+ }
154
+ },
155
+ "responses": {
156
+ "201": {
157
+ "description": "Session created",
158
+ "content": {
159
+ "application/json": {
160
+ "schema": {
161
+ "$ref": "#/components/schemas/CreateSessionResponse"
162
+ }
163
+ }
164
+ }
165
+ },
166
+ "400": {
167
+ "$ref": "#/components/responses/BadRequest"
168
+ },
169
+ "500": {
170
+ "$ref": "#/components/responses/ServerError"
171
+ }
172
+ },
173
+ "parameters": []
174
+ },
175
+ "get": {
176
+ "summary": "List sessions",
177
+ "responses": {
178
+ "200": {
179
+ "description": "Session list",
180
+ "content": {
181
+ "application/json": {
182
+ "schema": {
183
+ "$ref": "#/components/schemas/SessionListResponse"
184
+ }
185
+ }
186
+ }
187
+ },
188
+ "500": {
189
+ "$ref": "#/components/responses/ServerError"
190
+ }
191
+ },
192
+ "parameters": []
193
+ }
194
+ },
195
+ "/api/v1/sessions/{sessionId}/branches": {
196
+ "get": {
197
+ "summary": "List branches",
198
+ "parameters": [
199
+ {
200
+ "$ref": "#/components/parameters/SessionId"
201
+ }
202
+ ],
203
+ "responses": {
204
+ "200": {
205
+ "description": "Branch info",
206
+ "content": {
207
+ "application/json": {
208
+ "schema": {
209
+ "$ref": "#/components/schemas/BranchInfo"
210
+ }
211
+ }
212
+ }
213
+ },
214
+ "400": {
215
+ "$ref": "#/components/responses/BadRequest"
216
+ }
217
+ }
218
+ }
219
+ },
220
+ "/api/v1/sessions/{sessionId}/models": {
221
+ "get": {
222
+ "summary": "List models",
223
+ "parameters": [
224
+ {
225
+ "$ref": "#/components/parameters/SessionId"
226
+ },
227
+ {
228
+ "$ref": "#/components/parameters/ProviderQuery"
229
+ }
230
+ ],
231
+ "responses": {
232
+ "200": {
233
+ "description": "Model list",
234
+ "content": {
235
+ "application/json": {
236
+ "schema": {
237
+ "$ref": "#/components/schemas/ModelListResponse"
238
+ }
239
+ }
240
+ }
241
+ },
242
+ "400": {
243
+ "$ref": "#/components/responses/BadRequest"
244
+ },
245
+ "403": {
246
+ "$ref": "#/components/responses/Forbidden"
247
+ },
248
+ "404": {
249
+ "$ref": "#/components/responses/NotFound"
250
+ }
251
+ }
252
+ }
253
+ },
254
+ "/api/v1/sessions/{sessionId}/worktrees": {
255
+ "get": {
256
+ "summary": "List worktrees",
257
+ "parameters": [
258
+ {
259
+ "$ref": "#/components/parameters/SessionId"
260
+ }
261
+ ],
262
+ "responses": {
263
+ "200": {
264
+ "description": "Worktree list",
265
+ "content": {
266
+ "application/json": {
267
+ "schema": {
268
+ "$ref": "#/components/schemas/WorktreeListResponse"
269
+ }
270
+ }
271
+ }
272
+ },
273
+ "400": {
274
+ "$ref": "#/components/responses/BadRequest"
275
+ }
276
+ }
277
+ },
278
+ "post": {
279
+ "summary": "Create worktree",
280
+ "requestBody": {
281
+ "required": true,
282
+ "content": {
283
+ "application/json": {
284
+ "schema": {
285
+ "$ref": "#/components/schemas/CreateWorktreeRequest"
286
+ }
287
+ }
288
+ }
289
+ },
290
+ "responses": {
291
+ "201": {
292
+ "description": "Worktree created",
293
+ "content": {
294
+ "application/json": {
295
+ "schema": {
296
+ "$ref": "#/components/schemas/CreateWorktreeResponse"
297
+ }
298
+ }
299
+ }
300
+ },
301
+ "400": {
302
+ "$ref": "#/components/responses/BadRequest"
303
+ },
304
+ "500": {
305
+ "$ref": "#/components/responses/ServerError"
306
+ }
307
+ },
308
+ "parameters": [
309
+ {
310
+ "$ref": "#/components/parameters/SessionId"
311
+ }
312
+ ]
313
+ }
314
+ },
315
+ "/api/v1/sessions/{sessionId}/worktrees/{worktreeId}": {
316
+ "get": {
317
+ "summary": "Get worktree",
318
+ "parameters": [
319
+ {
320
+ "$ref": "#/components/parameters/WorktreeId"
321
+ },
322
+ {
323
+ "$ref": "#/components/parameters/SessionId"
324
+ }
325
+ ],
326
+ "responses": {
327
+ "200": {
328
+ "description": "Worktree detail",
329
+ "content": {
330
+ "application/json": {
331
+ "schema": {
332
+ "$ref": "#/components/schemas/WorktreeDetail"
333
+ }
334
+ }
335
+ }
336
+ },
337
+ "400": {
338
+ "$ref": "#/components/responses/BadRequest"
339
+ },
340
+ "404": {
341
+ "$ref": "#/components/responses/NotFound"
342
+ }
343
+ }
344
+ },
345
+ "delete": {
346
+ "summary": "Delete worktree",
347
+ "parameters": [
348
+ {
349
+ "$ref": "#/components/parameters/WorktreeId"
350
+ },
351
+ {
352
+ "$ref": "#/components/parameters/SessionId"
353
+ }
354
+ ],
355
+ "responses": {
356
+ "200": {
357
+ "description": "Worktree removed",
358
+ "content": {
359
+ "application/json": {
360
+ "schema": {
361
+ "$ref": "#/components/schemas/OkResponse"
362
+ }
363
+ }
364
+ }
365
+ },
366
+ "400": {
367
+ "$ref": "#/components/responses/BadRequest"
368
+ },
369
+ "500": {
370
+ "$ref": "#/components/responses/ServerError"
371
+ }
372
+ }
373
+ },
374
+ "patch": {
375
+ "summary": "Rename worktree",
376
+ "parameters": [
377
+ {
378
+ "$ref": "#/components/parameters/WorktreeId"
379
+ },
380
+ {
381
+ "$ref": "#/components/parameters/SessionId"
382
+ }
383
+ ],
384
+ "requestBody": {
385
+ "required": true,
386
+ "content": {
387
+ "application/json": {
388
+ "schema": {
389
+ "$ref": "#/components/schemas/RenameWorktreeRequest"
390
+ }
391
+ }
392
+ }
393
+ },
394
+ "responses": {
395
+ "200": {
396
+ "description": "Worktree updated",
397
+ "content": {
398
+ "application/json": {
399
+ "schema": {
400
+ "$ref": "#/components/schemas/WorktreeRenameResponse"
401
+ }
402
+ }
403
+ }
404
+ },
405
+ "400": {
406
+ "$ref": "#/components/responses/BadRequest"
407
+ },
408
+ "404": {
409
+ "$ref": "#/components/responses/NotFound"
410
+ }
411
+ }
412
+ }
413
+ },
414
+ "/api/v1/sessions/{sessionId}/worktrees/{worktreeId}/file": {
415
+ "get": {
416
+ "summary": "Read file",
417
+ "parameters": [
418
+ {
419
+ "$ref": "#/components/parameters/WorktreeId"
420
+ },
421
+ {
422
+ "$ref": "#/components/parameters/FilePath"
423
+ },
424
+ {
425
+ "$ref": "#/components/parameters/SessionId"
426
+ }
427
+ ],
428
+ "responses": {
429
+ "200": {
430
+ "description": "File content",
431
+ "content": {
432
+ "application/json": {
433
+ "schema": {
434
+ "$ref": "#/components/schemas/FileReadResponse"
435
+ }
436
+ }
437
+ }
438
+ },
439
+ "400": {
440
+ "$ref": "#/components/responses/BadRequest"
441
+ },
442
+ "404": {
443
+ "$ref": "#/components/responses/NotFound"
444
+ }
445
+ }
446
+ },
447
+ "post": {
448
+ "summary": "Write file",
449
+ "parameters": [
450
+ {
451
+ "$ref": "#/components/parameters/WorktreeId"
452
+ },
453
+ {
454
+ "$ref": "#/components/parameters/SessionId"
455
+ }
456
+ ],
457
+ "requestBody": {
458
+ "required": true,
459
+ "content": {
460
+ "application/json": {
461
+ "schema": {
462
+ "$ref": "#/components/schemas/FileWriteRequest"
463
+ }
464
+ }
465
+ }
466
+ },
467
+ "responses": {
468
+ "200": {
469
+ "description": "Write ok",
470
+ "content": {
471
+ "application/json": {
472
+ "schema": {
473
+ "$ref": "#/components/schemas/FileWriteResponse"
474
+ }
475
+ }
476
+ }
477
+ },
478
+ "400": {
479
+ "$ref": "#/components/responses/BadRequest"
480
+ },
481
+ "404": {
482
+ "$ref": "#/components/responses/NotFound"
483
+ }
484
+ }
485
+ }
486
+ },
487
+ "/api/v1/sessions/{sessionId}/worktrees/{worktreeId}/status": {
488
+ "get": {
489
+ "summary": "Worktree git status",
490
+ "parameters": [
491
+ {
492
+ "$ref": "#/components/parameters/WorktreeId"
493
+ },
494
+ {
495
+ "$ref": "#/components/parameters/SessionId"
496
+ }
497
+ ],
498
+ "responses": {
499
+ "200": {
500
+ "description": "Status entries",
501
+ "content": {
502
+ "application/json": {
503
+ "schema": {
504
+ "$ref": "#/components/schemas/WorktreeStatusResponse"
505
+ }
506
+ }
507
+ }
508
+ },
509
+ "400": {
510
+ "$ref": "#/components/responses/BadRequest"
511
+ },
512
+ "404": {
513
+ "$ref": "#/components/responses/NotFound"
514
+ }
515
+ }
516
+ }
517
+ },
518
+ "/api/v1/sessions/{sessionId}/worktrees/{worktreeId}/diff": {
519
+ "get": {
520
+ "summary": "Worktree diff",
521
+ "parameters": [
522
+ {
523
+ "$ref": "#/components/parameters/WorktreeId"
524
+ },
525
+ {
526
+ "$ref": "#/components/parameters/SessionId"
527
+ }
528
+ ],
529
+ "responses": {
530
+ "200": {
531
+ "description": "Worktree diff",
532
+ "content": {
533
+ "application/json": {
534
+ "schema": {
535
+ "$ref": "#/components/schemas/RepoDiff"
536
+ }
537
+ }
538
+ }
539
+ },
540
+ "400": {
541
+ "$ref": "#/components/responses/BadRequest"
542
+ }
543
+ }
544
+ }
545
+ },
546
+ "/api/v1/sessions/{sessionId}/worktrees/{worktreeId}/commits": {
547
+ "get": {
548
+ "summary": "Worktree commits",
549
+ "parameters": [
550
+ {
551
+ "$ref": "#/components/parameters/WorktreeId"
552
+ },
553
+ {
554
+ "$ref": "#/components/parameters/CommitsLimit"
555
+ },
556
+ {
557
+ "$ref": "#/components/parameters/SessionId"
558
+ }
559
+ ],
560
+ "responses": {
561
+ "200": {
562
+ "description": "Commit list",
563
+ "content": {
564
+ "application/json": {
565
+ "schema": {
566
+ "$ref": "#/components/schemas/CommitListResponse"
567
+ }
568
+ }
569
+ }
570
+ },
571
+ "400": {
572
+ "$ref": "#/components/responses/BadRequest"
573
+ }
574
+ }
575
+ }
576
+ },
577
+ "/api/v1/workspaces": {
578
+ "post": {
579
+ "summary": "Create workspace",
580
+ "requestBody": {
581
+ "required": true,
582
+ "content": {
583
+ "application/json": {
584
+ "schema": {
585
+ "$ref": "#/components/schemas/WorkspaceCreateRequest"
586
+ }
587
+ }
588
+ }
589
+ },
590
+ "responses": {
591
+ "201": {
592
+ "description": "Workspace created",
593
+ "content": {
594
+ "application/json": {
595
+ "schema": {
596
+ "$ref": "#/components/schemas/WorkspaceCreateResponse"
597
+ }
598
+ }
599
+ }
600
+ },
601
+ "400": {
602
+ "$ref": "#/components/responses/BadRequest"
603
+ },
604
+ "500": {
605
+ "$ref": "#/components/responses/ServerError"
606
+ }
607
+ },
608
+ "security": [],
609
+ "parameters": []
610
+ }
611
+ },
612
+ "/api/v1/workspaces/login": {
613
+ "post": {
614
+ "summary": "Login workspace (exchange secret for token)",
615
+ "requestBody": {
616
+ "required": true,
617
+ "content": {
618
+ "application/json": {
619
+ "schema": {
620
+ "$ref": "#/components/schemas/WorkspaceLoginRequest"
621
+ }
622
+ }
623
+ }
624
+ },
625
+ "responses": {
626
+ "200": {
627
+ "description": "Workspace token",
628
+ "content": {
629
+ "application/json": {
630
+ "schema": {
631
+ "$ref": "#/components/schemas/WorkspaceLoginResponse"
632
+ }
633
+ }
634
+ }
635
+ },
636
+ "400": {
637
+ "$ref": "#/components/responses/BadRequest"
638
+ },
639
+ "403": {
640
+ "$ref": "#/components/responses/Forbidden"
641
+ }
642
+ },
643
+ "security": [],
644
+ "parameters": []
645
+ }
646
+ },
647
+ "/api/v1/workspaces/refresh": {
648
+ "post": {
649
+ "summary": "Refresh workspace token",
650
+ "requestBody": {
651
+ "required": true,
652
+ "content": {
653
+ "application/json": {
654
+ "schema": {
655
+ "$ref": "#/components/schemas/WorkspaceRefreshRequest"
656
+ }
657
+ }
658
+ }
659
+ },
660
+ "responses": {
661
+ "200": {
662
+ "description": "Workspace token refreshed",
663
+ "content": {
664
+ "application/json": {
665
+ "schema": {
666
+ "$ref": "#/components/schemas/WorkspaceRefreshResponse"
667
+ }
668
+ }
669
+ }
670
+ },
671
+ "400": {
672
+ "$ref": "#/components/responses/BadRequest"
673
+ },
674
+ "401": {
675
+ "$ref": "#/components/responses/Unauthorized"
676
+ },
677
+ "500": {
678
+ "$ref": "#/components/responses/ServerError"
679
+ }
680
+ },
681
+ "security": [],
682
+ "parameters": []
683
+ }
684
+ },
685
+ "/api/v1/workspaces/{workspaceId}": {
686
+ "delete": {
687
+ "summary": "Delete workspace (policy TBD)",
688
+ "parameters": [
689
+ {
690
+ "$ref": "#/components/parameters/WorkspaceId"
691
+ }
692
+ ],
693
+ "responses": {
694
+ "200": {
695
+ "description": "Workspace deleted",
696
+ "content": {
697
+ "application/json": {
698
+ "schema": {
699
+ "$ref": "#/components/schemas/OkResponse"
700
+ }
701
+ }
702
+ }
703
+ },
704
+ "400": {
705
+ "$ref": "#/components/responses/BadRequest"
706
+ },
707
+ "403": {
708
+ "$ref": "#/components/responses/Forbidden"
709
+ },
710
+ "500": {
711
+ "$ref": "#/components/responses/ServerError"
712
+ }
713
+ }
714
+ },
715
+ "patch": {
716
+ "summary": "Update workspace providers/auth",
717
+ "parameters": [
718
+ {
719
+ "$ref": "#/components/parameters/WorkspaceId"
720
+ }
721
+ ],
722
+ "requestBody": {
723
+ "required": true,
724
+ "content": {
725
+ "application/json": {
726
+ "schema": {
727
+ "$ref": "#/components/schemas/WorkspaceUpdateRequest"
728
+ }
729
+ }
730
+ }
731
+ },
732
+ "responses": {
733
+ "200": {
734
+ "description": "Workspace updated",
735
+ "content": {
736
+ "application/json": {
737
+ "schema": {
738
+ "$ref": "#/components/schemas/WorkspaceUpdateResponse"
739
+ }
740
+ }
741
+ }
742
+ },
743
+ "400": {
744
+ "$ref": "#/components/responses/BadRequest"
745
+ },
746
+ "403": {
747
+ "$ref": "#/components/responses/Forbidden"
748
+ },
749
+ "500": {
750
+ "$ref": "#/components/responses/ServerError"
751
+ }
752
+ }
753
+ }
754
+ },
755
+ "/api/v1/sessions/{sessionId}/last-commit": {
756
+ "get": {
757
+ "summary": "Get last commit for session",
758
+ "parameters": [
759
+ {
760
+ "$ref": "#/components/parameters/SessionId"
761
+ }
762
+ ],
763
+ "responses": {
764
+ "200": {
765
+ "description": "Last commit",
766
+ "content": {
767
+ "application/json": {
768
+ "schema": {
769
+ "$ref": "#/components/schemas/LastCommitResponse"
770
+ }
771
+ }
772
+ }
773
+ },
774
+ "404": {
775
+ "$ref": "#/components/responses/NotFound"
776
+ },
777
+ "500": {
778
+ "$ref": "#/components/responses/ServerError"
779
+ }
780
+ }
781
+ }
782
+ },
783
+ "/api/v1/sessions/{sessionId}/rpc-logs": {
784
+ "get": {
785
+ "summary": "Get RPC logs for session (debug only)",
786
+ "parameters": [
787
+ {
788
+ "$ref": "#/components/parameters/SessionId"
789
+ }
790
+ ],
791
+ "responses": {
792
+ "200": {
793
+ "description": "RPC logs",
794
+ "content": {
795
+ "application/json": {
796
+ "schema": {
797
+ "$ref": "#/components/schemas/RpcLogsResponse"
798
+ }
799
+ }
800
+ }
801
+ },
802
+ "403": {
803
+ "$ref": "#/components/responses/Forbidden"
804
+ },
805
+ "404": {
806
+ "$ref": "#/components/responses/NotFound"
807
+ }
808
+ }
809
+ }
810
+ },
811
+ "/api/v1/sessions/{sessionId}/git-identity": {
812
+ "get": {
813
+ "summary": "Get git identity for session",
814
+ "parameters": [
815
+ {
816
+ "$ref": "#/components/parameters/SessionId"
817
+ }
818
+ ],
819
+ "responses": {
820
+ "200": {
821
+ "description": "Git identity",
822
+ "content": {
823
+ "application/json": {
824
+ "schema": {
825
+ "$ref": "#/components/schemas/GitIdentityResponse"
826
+ }
827
+ }
828
+ }
829
+ },
830
+ "404": {
831
+ "$ref": "#/components/responses/NotFound"
832
+ },
833
+ "500": {
834
+ "$ref": "#/components/responses/ServerError"
835
+ }
836
+ }
837
+ },
838
+ "post": {
839
+ "summary": "Update git identity for session",
840
+ "parameters": [
841
+ {
842
+ "$ref": "#/components/parameters/SessionId"
843
+ }
844
+ ],
845
+ "requestBody": {
846
+ "required": true,
847
+ "content": {
848
+ "application/json": {
849
+ "schema": {
850
+ "$ref": "#/components/schemas/GitIdentityUpdateRequest"
851
+ }
852
+ }
853
+ }
854
+ },
855
+ "responses": {
856
+ "200": {
857
+ "description": "Git identity updated",
858
+ "content": {
859
+ "application/json": {
860
+ "schema": {
861
+ "$ref": "#/components/schemas/GitIdentityUpdateResponse"
862
+ }
863
+ }
864
+ }
865
+ },
866
+ "400": {
867
+ "$ref": "#/components/responses/BadRequest"
868
+ },
869
+ "404": {
870
+ "$ref": "#/components/responses/NotFound"
871
+ },
872
+ "500": {
873
+ "$ref": "#/components/responses/ServerError"
874
+ }
875
+ }
876
+ }
877
+ },
878
+ "/api/v1/sessions/{sessionId}/worktrees/{worktreeId}/browse": {
879
+ "get": {
880
+ "summary": "Browse worktree directory",
881
+ "parameters": [
882
+ {
883
+ "$ref": "#/components/parameters/WorktreeId"
884
+ },
885
+ {
886
+ "$ref": "#/components/parameters/BrowsePath"
887
+ },
888
+ {
889
+ "$ref": "#/components/parameters/SessionId"
890
+ }
891
+ ],
892
+ "responses": {
893
+ "200": {
894
+ "description": "Directory entries",
895
+ "content": {
896
+ "application/json": {
897
+ "schema": {
898
+ "$ref": "#/components/schemas/DirectoryBrowseResponse"
899
+ }
900
+ }
901
+ }
902
+ },
903
+ "400": {
904
+ "$ref": "#/components/responses/BadRequest"
905
+ },
906
+ "404": {
907
+ "$ref": "#/components/responses/NotFound"
908
+ }
909
+ }
910
+ }
911
+ },
912
+ "/api/v1/sessions/{sessionId}/worktrees/{worktreeId}/messages": {
913
+ "get": {
914
+ "summary": "Get worktree messages",
915
+ "parameters": [
916
+ {
917
+ "$ref": "#/components/parameters/WorktreeId"
918
+ },
919
+ {
920
+ "$ref": "#/components/parameters/MessagesLimit"
921
+ },
922
+ {
923
+ "$ref": "#/components/parameters/BeforeMessageId"
924
+ },
925
+ {
926
+ "$ref": "#/components/parameters/SessionId"
927
+ }
928
+ ],
929
+ "responses": {
930
+ "200": {
931
+ "description": "Worktree messages",
932
+ "content": {
933
+ "application/json": {
934
+ "schema": {
935
+ "$ref": "#/components/schemas/WorktreeMessagesResponse"
936
+ }
937
+ }
938
+ }
939
+ },
940
+ "400": {
941
+ "$ref": "#/components/responses/BadRequest"
942
+ },
943
+ "404": {
944
+ "$ref": "#/components/responses/NotFound"
945
+ }
946
+ }
947
+ },
948
+ "post": {
949
+ "summary": "Create worktree message",
950
+ "parameters": [
951
+ {
952
+ "$ref": "#/components/parameters/WorktreeId"
953
+ },
954
+ {
955
+ "$ref": "#/components/parameters/SessionId"
956
+ }
957
+ ],
958
+ "requestBody": {
959
+ "required": true,
960
+ "content": {
961
+ "application/json": {
962
+ "schema": {
963
+ "$ref": "#/components/schemas/WorktreeMessageCreateRequest"
964
+ }
965
+ }
966
+ }
967
+ },
968
+ "responses": {
969
+ "200": {
970
+ "description": "Worktree message created",
971
+ "content": {
972
+ "application/json": {
973
+ "schema": {
974
+ "$ref": "#/components/schemas/WorktreeMessageCreateResponse"
975
+ }
976
+ }
977
+ }
978
+ },
979
+ "400": {
980
+ "$ref": "#/components/responses/BadRequest"
981
+ },
982
+ "404": {
983
+ "$ref": "#/components/responses/NotFound"
984
+ },
985
+ "409": {
986
+ "$ref": "#/components/responses/Conflict"
987
+ },
988
+ "500": {
989
+ "$ref": "#/components/responses/InternalServerError"
990
+ }
991
+ }
992
+ }
993
+ },
994
+ "/api/v1/sessions/{sessionId}/backlog-items": {
995
+ "get": {
996
+ "summary": "Get session backlog",
997
+ "parameters": [
998
+ {
999
+ "$ref": "#/components/parameters/SessionId"
1000
+ }
1001
+ ],
1002
+ "responses": {
1003
+ "200": {
1004
+ "description": "Backlog items",
1005
+ "content": {
1006
+ "application/json": {
1007
+ "schema": {
1008
+ "$ref": "#/components/schemas/BacklogListResponse"
1009
+ }
1010
+ }
1011
+ }
1012
+ },
1013
+ "404": {
1014
+ "$ref": "#/components/responses/NotFound"
1015
+ }
1016
+ }
1017
+ },
1018
+ "post": {
1019
+ "summary": "Add backlog item",
1020
+ "parameters": [
1021
+ {
1022
+ "$ref": "#/components/parameters/SessionId"
1023
+ }
1024
+ ],
1025
+ "requestBody": {
1026
+ "required": true,
1027
+ "content": {
1028
+ "application/json": {
1029
+ "schema": {
1030
+ "$ref": "#/components/schemas/BacklogCreateRequest"
1031
+ }
1032
+ }
1033
+ }
1034
+ },
1035
+ "responses": {
1036
+ "200": {
1037
+ "description": "Backlog item created",
1038
+ "content": {
1039
+ "application/json": {
1040
+ "schema": {
1041
+ "$ref": "#/components/schemas/BacklogCreateResponse"
1042
+ }
1043
+ }
1044
+ }
1045
+ },
1046
+ "400": {
1047
+ "$ref": "#/components/responses/BadRequest"
1048
+ },
1049
+ "404": {
1050
+ "$ref": "#/components/responses/NotFound"
1051
+ }
1052
+ }
1053
+ }
1054
+ },
1055
+ "/api/v1/sessions/{sessionId}/backlog-items/{itemId}": {
1056
+ "patch": {
1057
+ "summary": "Update backlog item",
1058
+ "parameters": [
1059
+ {
1060
+ "$ref": "#/components/parameters/SessionId"
1061
+ },
1062
+ {
1063
+ "$ref": "#/components/parameters/BacklogItemId"
1064
+ }
1065
+ ],
1066
+ "requestBody": {
1067
+ "required": true,
1068
+ "content": {
1069
+ "application/json": {
1070
+ "schema": {
1071
+ "$ref": "#/components/schemas/BacklogUpdateRequest"
1072
+ }
1073
+ }
1074
+ }
1075
+ },
1076
+ "responses": {
1077
+ "200": {
1078
+ "description": "Backlog item updated",
1079
+ "content": {
1080
+ "application/json": {
1081
+ "schema": {
1082
+ "$ref": "#/components/schemas/BacklogUpdateResponse"
1083
+ }
1084
+ }
1085
+ }
1086
+ },
1087
+ "400": {
1088
+ "$ref": "#/components/responses/BadRequest"
1089
+ },
1090
+ "404": {
1091
+ "$ref": "#/components/responses/NotFound"
1092
+ }
1093
+ }
1094
+ }
1095
+ },
1096
+ "/api/v1/sessions/handoff": {
1097
+ "post": {
1098
+ "summary": "Create session handoff token",
1099
+ "requestBody": {
1100
+ "required": true,
1101
+ "content": {
1102
+ "application/json": {
1103
+ "schema": {
1104
+ "$ref": "#/components/schemas/HandoffRequest"
1105
+ }
1106
+ }
1107
+ }
1108
+ },
1109
+ "responses": {
1110
+ "200": {
1111
+ "description": "Handoff token created",
1112
+ "content": {
1113
+ "application/json": {
1114
+ "schema": {
1115
+ "$ref": "#/components/schemas/HandoffResponse"
1116
+ }
1117
+ }
1118
+ }
1119
+ },
1120
+ "400": {
1121
+ "$ref": "#/components/responses/BadRequest"
1122
+ },
1123
+ "404": {
1124
+ "$ref": "#/components/responses/NotFound"
1125
+ }
1126
+ },
1127
+ "parameters": []
1128
+ }
1129
+ },
1130
+ "/api/v1/sessions/handoff/consume": {
1131
+ "post": {
1132
+ "summary": "Consume session handoff token",
1133
+ "requestBody": {
1134
+ "required": true,
1135
+ "content": {
1136
+ "application/json": {
1137
+ "schema": {
1138
+ "$ref": "#/components/schemas/HandoffConsumeRequest"
1139
+ }
1140
+ }
1141
+ }
1142
+ },
1143
+ "responses": {
1144
+ "200": {
1145
+ "description": "Handoff token consumed",
1146
+ "content": {
1147
+ "application/json": {
1148
+ "schema": {
1149
+ "$ref": "#/components/schemas/HandoffConsumeResponse"
1150
+ }
1151
+ }
1152
+ }
1153
+ },
1154
+ "400": {
1155
+ "$ref": "#/components/responses/BadRequest"
1156
+ },
1157
+ "404": {
1158
+ "$ref": "#/components/responses/NotFound"
1159
+ }
1160
+ },
1161
+ "parameters": []
1162
+ }
1163
+ },
1164
+ "/api/v1/sessions/{sessionId}/worktrees/{worktreeId}/wakeup": {
1165
+ "post": {
1166
+ "summary": "Wake up a worktree provider",
1167
+ "parameters": [
1168
+ {
1169
+ "$ref": "#/components/parameters/WorktreeId"
1170
+ },
1171
+ {
1172
+ "$ref": "#/components/parameters/SessionId"
1173
+ }
1174
+ ],
1175
+ "requestBody": {
1176
+ "required": false,
1177
+ "content": {
1178
+ "application/json": {
1179
+ "schema": {
1180
+ "$ref": "#/components/schemas/WorktreeWakeupRequest"
1181
+ }
1182
+ }
1183
+ }
1184
+ },
1185
+ "responses": {
1186
+ "200": {
1187
+ "description": "Worktree is ready",
1188
+ "content": {
1189
+ "application/json": {
1190
+ "schema": {
1191
+ "$ref": "#/components/schemas/WorktreeWakeupResponse"
1192
+ }
1193
+ }
1194
+ }
1195
+ },
1196
+ "400": {
1197
+ "$ref": "#/components/responses/BadRequest"
1198
+ },
1199
+ "404": {
1200
+ "$ref": "#/components/responses/NotFound"
1201
+ },
1202
+ "409": {
1203
+ "$ref": "#/components/responses/Conflict"
1204
+ },
1205
+ "500": {
1206
+ "$ref": "#/components/responses/ServerError"
1207
+ },
1208
+ "504": {
1209
+ "$ref": "#/components/responses/GatewayTimeout"
1210
+ }
1211
+ }
1212
+ }
1213
+ },
1214
+ "/api/v1/sessions/{sessionId}/worktrees/{worktreeId}/folder": {
1215
+ "post": {
1216
+ "summary": "Create folder inside a worktree",
1217
+ "parameters": [
1218
+ {
1219
+ "$ref": "#/components/parameters/WorktreeId"
1220
+ },
1221
+ {
1222
+ "$ref": "#/components/parameters/SessionId"
1223
+ }
1224
+ ],
1225
+ "requestBody": {
1226
+ "required": true,
1227
+ "content": {
1228
+ "application/json": {
1229
+ "schema": {
1230
+ "$ref": "#/components/schemas/FolderCreateRequest"
1231
+ }
1232
+ }
1233
+ }
1234
+ },
1235
+ "responses": {
1236
+ "200": {
1237
+ "description": "Folder created",
1238
+ "content": {
1239
+ "application/json": {
1240
+ "schema": {
1241
+ "$ref": "#/components/schemas/FolderCreateResponse"
1242
+ }
1243
+ }
1244
+ }
1245
+ },
1246
+ "400": {
1247
+ "$ref": "#/components/responses/BadRequest"
1248
+ },
1249
+ "404": {
1250
+ "$ref": "#/components/responses/NotFound"
1251
+ },
1252
+ "500": {
1253
+ "$ref": "#/components/responses/ServerError"
1254
+ }
1255
+ }
1256
+ }
1257
+ },
1258
+ "/api/v1/sessions/{sessionId}/worktrees/{worktreeId}/file/rename": {
1259
+ "post": {
1260
+ "summary": "Rename or move a file or folder inside a worktree",
1261
+ "parameters": [
1262
+ {
1263
+ "$ref": "#/components/parameters/WorktreeId"
1264
+ },
1265
+ {
1266
+ "$ref": "#/components/parameters/SessionId"
1267
+ }
1268
+ ],
1269
+ "requestBody": {
1270
+ "required": true,
1271
+ "content": {
1272
+ "application/json": {
1273
+ "schema": {
1274
+ "$ref": "#/components/schemas/FileRenameRequest"
1275
+ }
1276
+ }
1277
+ }
1278
+ },
1279
+ "responses": {
1280
+ "200": {
1281
+ "description": "Path renamed",
1282
+ "content": {
1283
+ "application/json": {
1284
+ "schema": {
1285
+ "$ref": "#/components/schemas/FileRenameResponse"
1286
+ }
1287
+ }
1288
+ }
1289
+ },
1290
+ "400": {
1291
+ "$ref": "#/components/responses/BadRequest"
1292
+ },
1293
+ "404": {
1294
+ "$ref": "#/components/responses/NotFound"
1295
+ },
1296
+ "500": {
1297
+ "$ref": "#/components/responses/ServerError"
1298
+ }
1299
+ }
1300
+ }
1301
+ },
1302
+ "/api/v1/sessions/{sessionId}/worktrees/{worktreeId}/file/delete": {
1303
+ "post": {
1304
+ "summary": "Delete a file or folder inside a worktree",
1305
+ "parameters": [
1306
+ {
1307
+ "$ref": "#/components/parameters/WorktreeId"
1308
+ },
1309
+ {
1310
+ "$ref": "#/components/parameters/SessionId"
1311
+ }
1312
+ ],
1313
+ "requestBody": {
1314
+ "required": true,
1315
+ "content": {
1316
+ "application/json": {
1317
+ "schema": {
1318
+ "$ref": "#/components/schemas/FileDeleteRequest"
1319
+ }
1320
+ }
1321
+ }
1322
+ },
1323
+ "responses": {
1324
+ "200": {
1325
+ "description": "Path deleted",
1326
+ "content": {
1327
+ "application/json": {
1328
+ "schema": {
1329
+ "$ref": "#/components/schemas/FileDeleteResponse"
1330
+ }
1331
+ }
1332
+ }
1333
+ },
1334
+ "400": {
1335
+ "$ref": "#/components/responses/BadRequest"
1336
+ },
1337
+ "404": {
1338
+ "$ref": "#/components/responses/NotFound"
1339
+ },
1340
+ "500": {
1341
+ "$ref": "#/components/responses/ServerError"
1342
+ }
1343
+ }
1344
+ }
1345
+ },
1346
+ "/api/v1/sessions/{sessionId}/attachments": {
1347
+ "get": {
1348
+ "summary": "List attachments",
1349
+ "parameters": [
1350
+ {
1351
+ "$ref": "#/components/parameters/SessionId"
1352
+ }
1353
+ ],
1354
+ "responses": {
1355
+ "200": {
1356
+ "description": "Attachment list",
1357
+ "content": {
1358
+ "application/json": {
1359
+ "schema": {
1360
+ "$ref": "#/components/schemas/AttachmentListResponse"
1361
+ }
1362
+ }
1363
+ }
1364
+ },
1365
+ "400": {
1366
+ "$ref": "#/components/responses/BadRequest"
1367
+ }
1368
+ }
1369
+ }
1370
+ },
1371
+ "/api/v1/sessions/{sessionId}/attachments/file": {
1372
+ "get": {
1373
+ "summary": "Download attachment",
1374
+ "parameters": [
1375
+ {
1376
+ "$ref": "#/components/parameters/SessionId"
1377
+ },
1378
+ {
1379
+ "$ref": "#/components/parameters/AttachmentPath"
1380
+ },
1381
+ {
1382
+ "$ref": "#/components/parameters/AttachmentName"
1383
+ }
1384
+ ],
1385
+ "responses": {
1386
+ "200": {
1387
+ "description": "Attachment file"
1388
+ },
1389
+ "400": {
1390
+ "$ref": "#/components/responses/BadRequest"
1391
+ },
1392
+ "404": {
1393
+ "$ref": "#/components/responses/NotFound"
1394
+ }
1395
+ }
1396
+ }
1397
+ },
1398
+ "/api/v1/sessions/{sessionId}/attachments/upload": {
1399
+ "post": {
1400
+ "summary": "Upload attachments",
1401
+ "parameters": [
1402
+ {
1403
+ "$ref": "#/components/parameters/SessionId"
1404
+ }
1405
+ ],
1406
+ "requestBody": {
1407
+ "required": true,
1408
+ "content": {
1409
+ "multipart/form-data": {
1410
+ "schema": {
1411
+ "type": "object",
1412
+ "properties": {
1413
+ "files": {
1414
+ "type": "array",
1415
+ "items": {
1416
+ "type": "string",
1417
+ "format": "binary"
1418
+ }
1419
+ }
1420
+ },
1421
+ "required": [
1422
+ "files"
1423
+ ]
1424
+ }
1425
+ }
1426
+ }
1427
+ },
1428
+ "responses": {
1429
+ "200": {
1430
+ "description": "Uploaded",
1431
+ "content": {
1432
+ "application/json": {
1433
+ "schema": {
1434
+ "$ref": "#/components/schemas/AttachmentUploadResponse"
1435
+ }
1436
+ }
1437
+ }
1438
+ },
1439
+ "400": {
1440
+ "$ref": "#/components/responses/BadRequest"
1441
+ }
1442
+ }
1443
+ }
1444
+ }
1445
+ },
1446
+ "components": {
1447
+ "parameters": {
1448
+ "SessionQuery": {
1449
+ "name": "session",
1450
+ "in": "query",
1451
+ "required": false,
1452
+ "schema": {
1453
+ "type": "string"
1454
+ }
1455
+ },
1456
+ "SessionId": {
1457
+ "name": "sessionId",
1458
+ "in": "path",
1459
+ "required": true,
1460
+ "schema": {
1461
+ "type": "string",
1462
+ "pattern": "^s[0-9a-f]{24}$"
1463
+ }
1464
+ },
1465
+ "WorktreeId": {
1466
+ "name": "worktreeId",
1467
+ "in": "path",
1468
+ "required": true,
1469
+ "schema": {
1470
+ "type": "string"
1471
+ }
1472
+ },
1473
+ "BacklogItemId": {
1474
+ "name": "itemId",
1475
+ "in": "path",
1476
+ "required": true,
1477
+ "schema": {
1478
+ "type": "string"
1479
+ }
1480
+ },
1481
+ "ProviderQuery": {
1482
+ "name": "provider",
1483
+ "in": "query",
1484
+ "required": true,
1485
+ "schema": {
1486
+ "$ref": "#/components/schemas/Provider"
1487
+ }
1488
+ },
1489
+ "TreeDepth": {
1490
+ "name": "depth",
1491
+ "in": "query",
1492
+ "required": false,
1493
+ "schema": {
1494
+ "type": "integer",
1495
+ "minimum": 0
1496
+ }
1497
+ },
1498
+ "TreeLimit": {
1499
+ "name": "limit",
1500
+ "in": "query",
1501
+ "required": false,
1502
+ "schema": {
1503
+ "type": "integer",
1504
+ "minimum": 1
1505
+ }
1506
+ },
1507
+ "FilePath": {
1508
+ "name": "path",
1509
+ "in": "query",
1510
+ "required": true,
1511
+ "schema": {
1512
+ "type": "string"
1513
+ }
1514
+ },
1515
+ "CommitsLimit": {
1516
+ "name": "limit",
1517
+ "in": "query",
1518
+ "required": false,
1519
+ "schema": {
1520
+ "type": "integer",
1521
+ "minimum": 1
1522
+ }
1523
+ },
1524
+ "AttachmentPath": {
1525
+ "name": "path",
1526
+ "in": "query",
1527
+ "required": false,
1528
+ "schema": {
1529
+ "type": "string"
1530
+ }
1531
+ },
1532
+ "AttachmentName": {
1533
+ "name": "name",
1534
+ "in": "query",
1535
+ "required": false,
1536
+ "schema": {
1537
+ "type": "string"
1538
+ }
1539
+ },
1540
+ "WorkspaceId": {
1541
+ "name": "workspaceId",
1542
+ "in": "path",
1543
+ "required": true,
1544
+ "schema": {
1545
+ "type": "string",
1546
+ "pattern": "^w[0-9a-f]{24}$"
1547
+ }
1548
+ },
1549
+ "BrowsePath": {
1550
+ "name": "path",
1551
+ "in": "query",
1552
+ "description": "Relative path to browse (defaults to root).",
1553
+ "required": false,
1554
+ "schema": {
1555
+ "type": "string"
1556
+ }
1557
+ },
1558
+ "MessagesLimit": {
1559
+ "name": "limit",
1560
+ "in": "query",
1561
+ "description": "Max number of messages to return (default 50).",
1562
+ "required": false,
1563
+ "schema": {
1564
+ "type": "integer",
1565
+ "minimum": 1
1566
+ }
1567
+ },
1568
+ "BeforeMessageId": {
1569
+ "name": "beforeMessageId",
1570
+ "in": "query",
1571
+ "description": "Return messages before this message id (exclusive).",
1572
+ "required": false,
1573
+ "schema": {
1574
+ "type": "string"
1575
+ }
1576
+ }
1577
+ },
1578
+ "responses": {
1579
+ "BadRequest": {
1580
+ "description": "Bad request",
1581
+ "content": {
1582
+ "application/json": {
1583
+ "schema": {
1584
+ "$ref": "#/components/schemas/ErrorResponse"
1585
+ }
1586
+ }
1587
+ }
1588
+ },
1589
+ "NotFound": {
1590
+ "description": "Not found",
1591
+ "content": {
1592
+ "application/json": {
1593
+ "schema": {
1594
+ "$ref": "#/components/schemas/ErrorResponse"
1595
+ }
1596
+ }
1597
+ }
1598
+ },
1599
+ "Forbidden": {
1600
+ "description": "Forbidden",
1601
+ "content": {
1602
+ "application/json": {
1603
+ "schema": {
1604
+ "$ref": "#/components/schemas/ErrorResponse"
1605
+ }
1606
+ }
1607
+ }
1608
+ },
1609
+ "Conflict": {
1610
+ "description": "Conflict",
1611
+ "content": {
1612
+ "application/json": {
1613
+ "schema": {
1614
+ "$ref": "#/components/schemas/ErrorResponse"
1615
+ }
1616
+ }
1617
+ }
1618
+ },
1619
+ "ServerError": {
1620
+ "description": "Server error",
1621
+ "content": {
1622
+ "application/json": {
1623
+ "schema": {
1624
+ "$ref": "#/components/schemas/ErrorResponse"
1625
+ }
1626
+ }
1627
+ }
1628
+ },
1629
+ "GatewayTimeout": {
1630
+ "description": "Request timed out.",
1631
+ "content": {
1632
+ "application/json": {
1633
+ "schema": {
1634
+ "$ref": "#/components/schemas/ErrorResponse"
1635
+ }
1636
+ }
1637
+ }
1638
+ },
1639
+ "Unauthorized": {
1640
+ "description": "Unauthorized",
1641
+ "content": {
1642
+ "application/json": {
1643
+ "schema": {
1644
+ "$ref": "#/components/schemas/ErrorResponse"
1645
+ }
1646
+ }
1647
+ }
1648
+ },
1649
+ "InternalServerError": {
1650
+ "description": "Internal server error.",
1651
+ "content": {
1652
+ "application/json": {
1653
+ "schema": {
1654
+ "$ref": "#/components/schemas/ErrorResponse"
1655
+ }
1656
+ }
1657
+ }
1658
+ }
1659
+ },
1660
+ "schemas": {
1661
+ "Provider": {
1662
+ "type": "string",
1663
+ "enum": [
1664
+ "codex",
1665
+ "claude"
1666
+ ]
1667
+ },
1668
+ "OkResponse": {
1669
+ "type": "object",
1670
+ "properties": {
1671
+ "ok": {
1672
+ "type": "boolean"
1673
+ }
1674
+ },
1675
+ "required": [
1676
+ "ok"
1677
+ ],
1678
+ "additionalProperties": true
1679
+ },
1680
+ "ErrorResponse": {
1681
+ "type": "object",
1682
+ "properties": {
1683
+ "error": {
1684
+ "type": "string"
1685
+ }
1686
+ },
1687
+ "required": [
1688
+ "error"
1689
+ ],
1690
+ "additionalProperties": true
1691
+ },
1692
+ "HealthResponse": {
1693
+ "type": "object",
1694
+ "properties": {
1695
+ "ok": {
1696
+ "type": "boolean"
1697
+ },
1698
+ "ready": {
1699
+ "type": "boolean"
1700
+ },
1701
+ "deploymentMode": {
1702
+ "type": "string"
1703
+ }
1704
+ },
1705
+ "required": [
1706
+ "ok",
1707
+ "ready"
1708
+ ],
1709
+ "additionalProperties": true
1710
+ },
1711
+ "Message": {
1712
+ "type": "object",
1713
+ "properties": {
1714
+ "id": {
1715
+ "type": "string"
1716
+ },
1717
+ "role": {
1718
+ "type": "string"
1719
+ },
1720
+ "text": {
1721
+ "type": "string"
1722
+ },
1723
+ "attachments": {
1724
+ "type": "array",
1725
+ "items": {
1726
+ "$ref": "#/components/schemas/AttachmentRef"
1727
+ }
1728
+ },
1729
+ "provider": {
1730
+ "$ref": "#/components/schemas/Provider"
1731
+ },
1732
+ "toolResult": {
1733
+ "$ref": "#/components/schemas/ToolResult"
1734
+ }
1735
+ },
1736
+ "required": [
1737
+ "id",
1738
+ "role",
1739
+ "text"
1740
+ ],
1741
+ "additionalProperties": true
1742
+ },
1743
+ "ToolResult": {
1744
+ "type": "object",
1745
+ "properties": {
1746
+ "callId": {
1747
+ "type": "string"
1748
+ },
1749
+ "name": {
1750
+ "type": "string"
1751
+ },
1752
+ "output": {
1753
+ "type": "string"
1754
+ },
1755
+ "success": {
1756
+ "type": "boolean"
1757
+ }
1758
+ },
1759
+ "required": [
1760
+ "callId",
1761
+ "name",
1762
+ "output",
1763
+ "success"
1764
+ ],
1765
+ "additionalProperties": true
1766
+ },
1767
+ "AttachmentRef": {
1768
+ "type": "object",
1769
+ "properties": {
1770
+ "name": {
1771
+ "type": "string"
1772
+ },
1773
+ "path": {
1774
+ "type": "string"
1775
+ },
1776
+ "size": {
1777
+ "type": "integer"
1778
+ }
1779
+ },
1780
+ "additionalProperties": true
1781
+ },
1782
+ "RepoDiff": {
1783
+ "type": "object",
1784
+ "properties": {
1785
+ "status": {
1786
+ "type": "string"
1787
+ },
1788
+ "diff": {
1789
+ "type": "string"
1790
+ }
1791
+ },
1792
+ "required": [
1793
+ "status",
1794
+ "diff"
1795
+ ],
1796
+ "additionalProperties": false
1797
+ },
1798
+ "SessionResponse": {
1799
+ "type": "object",
1800
+ "properties": {
1801
+ "sessionId": {
1802
+ "type": "string"
1803
+ },
1804
+ "path": {
1805
+ "type": "string"
1806
+ },
1807
+ "repoUrl": {
1808
+ "type": "string"
1809
+ },
1810
+ "name": {
1811
+ "type": "string"
1812
+ },
1813
+ "providers": {
1814
+ "type": "array",
1815
+ "items": {
1816
+ "$ref": "#/components/schemas/Provider"
1817
+ }
1818
+ },
1819
+ "repoDiff": {
1820
+ "$ref": "#/components/schemas/RepoDiff"
1821
+ },
1822
+ "rpcLogs": {
1823
+ "type": "array",
1824
+ "items": {
1825
+ "type": "object"
1826
+ }
1827
+ },
1828
+ "terminalEnabled": {
1829
+ "type": "boolean"
1830
+ },
1831
+ "workspaceId": {
1832
+ "type": "string",
1833
+ "pattern": "^w[0-9a-f]{24}$"
1834
+ },
1835
+ "rpcLogsEnabled": {
1836
+ "type": "boolean"
1837
+ },
1838
+ "defaultInternetAccess": {
1839
+ "type": "boolean"
1840
+ },
1841
+ "defaultDenyGitCredentialsAccess": {
1842
+ "type": "boolean"
1843
+ },
1844
+ "defaultProvider": {
1845
+ "$ref": "#/components/schemas/Provider"
1846
+ }
1847
+ },
1848
+ "required": [
1849
+ "sessionId",
1850
+ "path",
1851
+ "repoUrl",
1852
+ "defaultProvider",
1853
+ "repoDiff",
1854
+ "workspaceId"
1855
+ ],
1856
+ "additionalProperties": true
1857
+ },
1858
+ "CreateSessionRequest": {
1859
+ "type": "object",
1860
+ "properties": {
1861
+ "repoUrl": {
1862
+ "type": "string"
1863
+ },
1864
+ "name": {
1865
+ "type": "string"
1866
+ },
1867
+ "auth": {
1868
+ "type": "object"
1869
+ },
1870
+ "defaultInternetAccess": {
1871
+ "type": "boolean"
1872
+ },
1873
+ "defaultDenyGitCredentialsAccess": {
1874
+ "type": "boolean"
1875
+ }
1876
+ },
1877
+ "required": [
1878
+ "repoUrl"
1879
+ ],
1880
+ "additionalProperties": true
1881
+ },
1882
+ "CreateSessionResponse": {
1883
+ "type": "object",
1884
+ "properties": {
1885
+ "sessionId": {
1886
+ "type": "string"
1887
+ },
1888
+ "path": {
1889
+ "type": "string"
1890
+ },
1891
+ "repoUrl": {
1892
+ "type": "string"
1893
+ },
1894
+ "name": {
1895
+ "type": "string"
1896
+ },
1897
+ "providers": {
1898
+ "type": "array",
1899
+ "items": {
1900
+ "$ref": "#/components/schemas/Provider"
1901
+ }
1902
+ },
1903
+ "terminalEnabled": {
1904
+ "type": "boolean"
1905
+ },
1906
+ "workspaceId": {
1907
+ "type": "string",
1908
+ "pattern": "^w[0-9a-f]{24}$"
1909
+ },
1910
+ "rpcLogsEnabled": {
1911
+ "type": "boolean"
1912
+ },
1913
+ "defaultInternetAccess": {
1914
+ "type": "boolean"
1915
+ },
1916
+ "defaultDenyGitCredentialsAccess": {
1917
+ "type": "boolean"
1918
+ },
1919
+ "defaultProvider": {
1920
+ "$ref": "#/components/schemas/Provider"
1921
+ }
1922
+ },
1923
+ "required": [
1924
+ "sessionId",
1925
+ "path",
1926
+ "repoUrl",
1927
+ "defaultProvider",
1928
+ "workspaceId"
1929
+ ],
1930
+ "additionalProperties": true
1931
+ },
1932
+ "SessionClearRequest": {
1933
+ "type": "object",
1934
+ "properties": {
1935
+ "worktreeId": {
1936
+ "type": "string"
1937
+ }
1938
+ },
1939
+ "additionalProperties": false
1940
+ },
1941
+ "BranchInfo": {
1942
+ "type": "object",
1943
+ "properties": {
1944
+ "current": {
1945
+ "type": "string"
1946
+ },
1947
+ "remote": {
1948
+ "type": "string"
1949
+ },
1950
+ "branches": {
1951
+ "type": "array",
1952
+ "items": {
1953
+ "type": "string"
1954
+ }
1955
+ }
1956
+ },
1957
+ "required": [
1958
+ "current",
1959
+ "remote",
1960
+ "branches"
1961
+ ],
1962
+ "additionalProperties": false
1963
+ },
1964
+ "ModelListResponse": {
1965
+ "type": "object",
1966
+ "properties": {
1967
+ "models": {
1968
+ "type": "array",
1969
+ "items": {
1970
+ "type": "object"
1971
+ }
1972
+ },
1973
+ "provider": {
1974
+ "$ref": "#/components/schemas/Provider"
1975
+ }
1976
+ },
1977
+ "required": [
1978
+ "models",
1979
+ "provider"
1980
+ ],
1981
+ "additionalProperties": true
1982
+ },
1983
+ "SwitchBranchRequest": {
1984
+ "type": "object",
1985
+ "properties": {
1986
+ "session": {
1987
+ "type": "string"
1988
+ },
1989
+ "branch": {
1990
+ "type": "string"
1991
+ }
1992
+ },
1993
+ "required": [
1994
+ "session",
1995
+ "branch"
1996
+ ],
1997
+ "additionalProperties": false
1998
+ },
1999
+ "WorktreeSummary": {
2000
+ "type": "object",
2001
+ "properties": {
2002
+ "id": {
2003
+ "type": "string"
2004
+ },
2005
+ "name": {
2006
+ "type": "string"
2007
+ },
2008
+ "branchName": {
2009
+ "type": "string"
2010
+ },
2011
+ "provider": {
2012
+ "$ref": "#/components/schemas/Provider"
2013
+ },
2014
+ "status": {
2015
+ "type": "string"
2016
+ },
2017
+ "messageCount": {
2018
+ "type": "integer"
2019
+ },
2020
+ "parentWorktreeId": {
2021
+ "type": [
2022
+ "string",
2023
+ "null"
2024
+ ]
2025
+ },
2026
+ "createdAt": {
2027
+ "type": [
2028
+ "string",
2029
+ "null"
2030
+ ],
2031
+ "format": "date-time"
2032
+ },
2033
+ "lastActivityAt": {
2034
+ "type": [
2035
+ "string",
2036
+ "null"
2037
+ ],
2038
+ "format": "date-time"
2039
+ },
2040
+ "color": {
2041
+ "type": "string"
2042
+ },
2043
+ "internetAccess": {
2044
+ "type": "boolean"
2045
+ },
2046
+ "denyGitCredentialsAccess": {
2047
+ "type": "boolean"
2048
+ },
2049
+ "model": {
2050
+ "type": [
2051
+ "string",
2052
+ "null"
2053
+ ]
2054
+ },
2055
+ "reasoningEffort": {
2056
+ "type": [
2057
+ "string",
2058
+ "null"
2059
+ ]
2060
+ }
2061
+ },
2062
+ "required": [
2063
+ "id",
2064
+ "name",
2065
+ "branchName",
2066
+ "provider",
2067
+ "status"
2068
+ ],
2069
+ "additionalProperties": true
2070
+ },
2071
+ "WorktreeListResponse": {
2072
+ "type": "object",
2073
+ "properties": {
2074
+ "worktrees": {
2075
+ "type": "array",
2076
+ "items": {
2077
+ "$ref": "#/components/schemas/WorktreeSummary"
2078
+ }
2079
+ }
2080
+ },
2081
+ "required": [
2082
+ "worktrees"
2083
+ ],
2084
+ "additionalProperties": false
2085
+ },
2086
+ "CreateWorktreeRequest": {
2087
+ "type": "object",
2088
+ "properties": {
2089
+ "provider": {
2090
+ "$ref": "#/components/schemas/Provider"
2091
+ },
2092
+ "name": {
2093
+ "type": [
2094
+ "string",
2095
+ "null"
2096
+ ]
2097
+ },
2098
+ "parentWorktreeId": {
2099
+ "type": [
2100
+ "string",
2101
+ "null"
2102
+ ]
2103
+ },
2104
+ "startingBranch": {
2105
+ "type": [
2106
+ "string",
2107
+ "null"
2108
+ ]
2109
+ },
2110
+ "model": {
2111
+ "type": [
2112
+ "string",
2113
+ "null"
2114
+ ]
2115
+ },
2116
+ "reasoningEffort": {
2117
+ "type": [
2118
+ "string",
2119
+ "null"
2120
+ ]
2121
+ },
2122
+ "internetAccess": {
2123
+ "type": "boolean"
2124
+ },
2125
+ "denyGitCredentialsAccess": {
2126
+ "type": "boolean"
2127
+ }
2128
+ },
2129
+ "required": [
2130
+ "provider"
2131
+ ],
2132
+ "additionalProperties": false
2133
+ },
2134
+ "CreateWorktreeResponse": {
2135
+ "type": "object",
2136
+ "properties": {
2137
+ "worktreeId": {
2138
+ "type": "string"
2139
+ },
2140
+ "name": {
2141
+ "type": "string"
2142
+ },
2143
+ "branchName": {
2144
+ "type": "string"
2145
+ },
2146
+ "provider": {
2147
+ "$ref": "#/components/schemas/Provider"
2148
+ },
2149
+ "status": {
2150
+ "type": "string"
2151
+ },
2152
+ "color": {
2153
+ "type": "string"
2154
+ },
2155
+ "internetAccess": {
2156
+ "type": "boolean"
2157
+ },
2158
+ "denyGitCredentialsAccess": {
2159
+ "type": "boolean"
2160
+ }
2161
+ },
2162
+ "required": [
2163
+ "worktreeId",
2164
+ "name",
2165
+ "branchName",
2166
+ "provider",
2167
+ "status"
2168
+ ],
2169
+ "additionalProperties": true
2170
+ },
2171
+ "WorktreeDetail": {
2172
+ "type": "object",
2173
+ "properties": {
2174
+ "id": {
2175
+ "type": "string"
2176
+ },
2177
+ "name": {
2178
+ "type": "string"
2179
+ },
2180
+ "branchName": {
2181
+ "type": "string"
2182
+ },
2183
+ "provider": {
2184
+ "$ref": "#/components/schemas/Provider"
2185
+ },
2186
+ "status": {
2187
+ "type": "string"
2188
+ },
2189
+ "color": {
2190
+ "type": "string"
2191
+ },
2192
+ "createdAt": {
2193
+ "type": [
2194
+ "string",
2195
+ "null"
2196
+ ],
2197
+ "format": "date-time"
2198
+ },
2199
+ "internetAccess": {
2200
+ "type": "boolean"
2201
+ },
2202
+ "denyGitCredentialsAccess": {
2203
+ "type": "boolean"
2204
+ },
2205
+ "model": {
2206
+ "type": [
2207
+ "string",
2208
+ "null"
2209
+ ]
2210
+ },
2211
+ "reasoningEffort": {
2212
+ "type": [
2213
+ "string",
2214
+ "null"
2215
+ ]
2216
+ }
2217
+ },
2218
+ "additionalProperties": true
2219
+ },
2220
+ "DirectoryTree": {
2221
+ "type": "object",
2222
+ "properties": {
2223
+ "tree": {
2224
+ "type": "array",
2225
+ "items": {
2226
+ "$ref": "#/components/schemas/DirectoryNode"
2227
+ }
2228
+ },
2229
+ "total": {
2230
+ "type": "integer"
2231
+ },
2232
+ "truncated": {
2233
+ "type": "boolean"
2234
+ }
2235
+ },
2236
+ "required": [
2237
+ "tree",
2238
+ "total",
2239
+ "truncated"
2240
+ ],
2241
+ "additionalProperties": false
2242
+ },
2243
+ "DirectoryNode": {
2244
+ "type": "object",
2245
+ "properties": {
2246
+ "name": {
2247
+ "type": "string"
2248
+ },
2249
+ "path": {
2250
+ "type": "string"
2251
+ },
2252
+ "type": {
2253
+ "type": "string",
2254
+ "enum": [
2255
+ "dir",
2256
+ "file"
2257
+ ]
2258
+ },
2259
+ "children": {
2260
+ "type": "array",
2261
+ "items": {
2262
+ "$ref": "#/components/schemas/DirectoryNode"
2263
+ }
2264
+ }
2265
+ },
2266
+ "required": [
2267
+ "name",
2268
+ "path",
2269
+ "type"
2270
+ ],
2271
+ "additionalProperties": true
2272
+ },
2273
+ "FileReadResponse": {
2274
+ "type": "object",
2275
+ "properties": {
2276
+ "path": {
2277
+ "type": "string"
2278
+ },
2279
+ "content": {
2280
+ "type": "string"
2281
+ },
2282
+ "truncated": {
2283
+ "type": "boolean"
2284
+ },
2285
+ "binary": {
2286
+ "type": "boolean"
2287
+ }
2288
+ },
2289
+ "required": [
2290
+ "path",
2291
+ "content",
2292
+ "truncated",
2293
+ "binary"
2294
+ ],
2295
+ "additionalProperties": false
2296
+ },
2297
+ "FileWriteRequest": {
2298
+ "type": "object",
2299
+ "properties": {
2300
+ "path": {
2301
+ "type": "string"
2302
+ },
2303
+ "content": {
2304
+ "type": "string"
2305
+ }
2306
+ },
2307
+ "required": [
2308
+ "path",
2309
+ "content"
2310
+ ],
2311
+ "additionalProperties": false
2312
+ },
2313
+ "FileWriteResponse": {
2314
+ "type": "object",
2315
+ "properties": {
2316
+ "ok": {
2317
+ "type": "boolean"
2318
+ },
2319
+ "path": {
2320
+ "type": "string"
2321
+ }
2322
+ },
2323
+ "required": [
2324
+ "ok",
2325
+ "path"
2326
+ ],
2327
+ "additionalProperties": false
2328
+ },
2329
+ "WorktreeStatusResponse": {
2330
+ "type": "object",
2331
+ "properties": {
2332
+ "entries": {
2333
+ "type": "array",
2334
+ "items": {
2335
+ "$ref": "#/components/schemas/WorktreeStatusEntry"
2336
+ }
2337
+ }
2338
+ },
2339
+ "required": [
2340
+ "entries"
2341
+ ],
2342
+ "additionalProperties": false
2343
+ },
2344
+ "WorktreeStatusEntry": {
2345
+ "type": "object",
2346
+ "properties": {
2347
+ "path": {
2348
+ "type": "string"
2349
+ },
2350
+ "type": {
2351
+ "type": "string",
2352
+ "enum": [
2353
+ "modified",
2354
+ "untracked"
2355
+ ]
2356
+ }
2357
+ },
2358
+ "required": [
2359
+ "path",
2360
+ "type"
2361
+ ],
2362
+ "additionalProperties": false
2363
+ },
2364
+ "RenameWorktreeRequest": {
2365
+ "type": "object",
2366
+ "properties": {
2367
+ "name": {
2368
+ "type": "string"
2369
+ }
2370
+ },
2371
+ "required": [
2372
+ "name"
2373
+ ],
2374
+ "additionalProperties": false
2375
+ },
2376
+ "WorktreeRenameResponse": {
2377
+ "type": "object",
2378
+ "properties": {
2379
+ "id": {
2380
+ "type": "string"
2381
+ },
2382
+ "name": {
2383
+ "type": "string"
2384
+ },
2385
+ "branchName": {
2386
+ "type": "string"
2387
+ },
2388
+ "status": {
2389
+ "type": "string"
2390
+ }
2391
+ },
2392
+ "required": [
2393
+ "id",
2394
+ "name",
2395
+ "branchName",
2396
+ "status"
2397
+ ],
2398
+ "additionalProperties": true
2399
+ },
2400
+ "Commit": {
2401
+ "type": "object",
2402
+ "properties": {
2403
+ "sha": {
2404
+ "type": "string"
2405
+ },
2406
+ "message": {
2407
+ "type": "string"
2408
+ },
2409
+ "date": {
2410
+ "type": "string",
2411
+ "format": "date-time"
2412
+ }
2413
+ },
2414
+ "required": [
2415
+ "sha",
2416
+ "message",
2417
+ "date"
2418
+ ],
2419
+ "additionalProperties": false
2420
+ },
2421
+ "CommitListResponse": {
2422
+ "type": "object",
2423
+ "properties": {
2424
+ "commits": {
2425
+ "type": "array",
2426
+ "items": {
2427
+ "$ref": "#/components/schemas/Commit"
2428
+ }
2429
+ }
2430
+ },
2431
+ "required": [
2432
+ "commits"
2433
+ ],
2434
+ "additionalProperties": false
2435
+ },
2436
+ "SessionOnlyRequest": {
2437
+ "type": "object",
2438
+ "properties": {
2439
+ "session": {
2440
+ "type": "string"
2441
+ }
2442
+ },
2443
+ "required": [
2444
+ "session"
2445
+ ],
2446
+ "additionalProperties": false
2447
+ },
2448
+ "AttachmentListResponse": {
2449
+ "type": "object",
2450
+ "properties": {
2451
+ "files": {
2452
+ "type": "array",
2453
+ "items": {
2454
+ "$ref": "#/components/schemas/AttachmentRef"
2455
+ }
2456
+ }
2457
+ },
2458
+ "required": [
2459
+ "files"
2460
+ ],
2461
+ "additionalProperties": false
2462
+ },
2463
+ "AttachmentUploadResponse": {
2464
+ "type": "object",
2465
+ "properties": {
2466
+ "files": {
2467
+ "type": "array",
2468
+ "items": {
2469
+ "$ref": "#/components/schemas/AttachmentRef"
2470
+ }
2471
+ }
2472
+ },
2473
+ "required": [
2474
+ "files"
2475
+ ],
2476
+ "additionalProperties": false
2477
+ },
2478
+ "WorkspaceProviderAuth": {
2479
+ "type": "object",
2480
+ "properties": {
2481
+ "type": {
2482
+ "type": "string",
2483
+ "enum": [
2484
+ "api_key",
2485
+ "auth_json_b64",
2486
+ "setup_token"
2487
+ ]
2488
+ },
2489
+ "value": {
2490
+ "type": "string"
2491
+ }
2492
+ },
2493
+ "required": [
2494
+ "type"
2495
+ ],
2496
+ "additionalProperties": false
2497
+ },
2498
+ "WorkspaceProviderConfig": {
2499
+ "type": "object",
2500
+ "properties": {
2501
+ "enabled": {
2502
+ "type": "boolean"
2503
+ },
2504
+ "auth": {
2505
+ "$ref": "#/components/schemas/WorkspaceProviderAuth"
2506
+ }
2507
+ },
2508
+ "additionalProperties": false
2509
+ },
2510
+ "WorkspaceCreateRequest": {
2511
+ "type": "object",
2512
+ "properties": {
2513
+ "providers": {
2514
+ "type": "object",
2515
+ "additionalProperties": {
2516
+ "$ref": "#/components/schemas/WorkspaceProviderConfig"
2517
+ }
2518
+ }
2519
+ },
2520
+ "required": [
2521
+ "providers"
2522
+ ],
2523
+ "additionalProperties": false
2524
+ },
2525
+ "WorkspaceCreateResponse": {
2526
+ "type": "object",
2527
+ "properties": {
2528
+ "workspaceId": {
2529
+ "type": "string"
2530
+ },
2531
+ "workspaceSecret": {
2532
+ "type": "string"
2533
+ }
2534
+ },
2535
+ "required": [
2536
+ "workspaceId",
2537
+ "workspaceSecret"
2538
+ ],
2539
+ "additionalProperties": false
2540
+ },
2541
+ "WorkspaceLoginRequest": {
2542
+ "type": "object",
2543
+ "properties": {
2544
+ "workspaceId": {
2545
+ "type": "string"
2546
+ },
2547
+ "workspaceSecret": {
2548
+ "type": "string"
2549
+ }
2550
+ },
2551
+ "required": [
2552
+ "workspaceId",
2553
+ "workspaceSecret"
2554
+ ],
2555
+ "additionalProperties": false
2556
+ },
2557
+ "WorkspaceLoginResponse": {
2558
+ "type": "object",
2559
+ "properties": {
2560
+ "workspaceToken": {
2561
+ "type": "string"
2562
+ },
2563
+ "refreshToken": {
2564
+ "type": "string"
2565
+ },
2566
+ "expiresIn": {
2567
+ "type": "integer",
2568
+ "description": "Seconds until expiration (1h)"
2569
+ },
2570
+ "refreshExpiresIn": {
2571
+ "type": "integer",
2572
+ "description": "Seconds until refresh expiration (30d)"
2573
+ }
2574
+ },
2575
+ "required": [
2576
+ "workspaceToken"
2577
+ ],
2578
+ "additionalProperties": true
2579
+ },
2580
+ "WorkspaceRefreshRequest": {
2581
+ "type": "object",
2582
+ "properties": {
2583
+ "refreshToken": {
2584
+ "type": "string"
2585
+ }
2586
+ },
2587
+ "required": [
2588
+ "refreshToken"
2589
+ ],
2590
+ "additionalProperties": false
2591
+ },
2592
+ "WorkspaceRefreshResponse": {
2593
+ "type": "object",
2594
+ "properties": {
2595
+ "workspaceToken": {
2596
+ "type": "string"
2597
+ },
2598
+ "refreshToken": {
2599
+ "type": "string"
2600
+ },
2601
+ "expiresIn": {
2602
+ "type": "integer",
2603
+ "description": "Seconds until expiration (1h)"
2604
+ },
2605
+ "refreshExpiresIn": {
2606
+ "type": "integer",
2607
+ "description": "Seconds until refresh expiration (30d)"
2608
+ }
2609
+ },
2610
+ "required": [
2611
+ "workspaceToken",
2612
+ "refreshToken"
2613
+ ],
2614
+ "additionalProperties": true
2615
+ },
2616
+ "WorkspaceUpdateRequest": {
2617
+ "type": "object",
2618
+ "properties": {
2619
+ "providers": {
2620
+ "type": "object",
2621
+ "additionalProperties": {
2622
+ "$ref": "#/components/schemas/WorkspaceProviderConfig"
2623
+ }
2624
+ }
2625
+ },
2626
+ "required": [
2627
+ "providers"
2628
+ ],
2629
+ "additionalProperties": false
2630
+ },
2631
+ "WorkspaceUpdateResponse": {
2632
+ "type": "object",
2633
+ "properties": {
2634
+ "workspaceId": {
2635
+ "type": "string"
2636
+ },
2637
+ "providers": {
2638
+ "type": "object",
2639
+ "additionalProperties": {
2640
+ "$ref": "#/components/schemas/WorkspaceProviderConfig"
2641
+ }
2642
+ }
2643
+ },
2644
+ "required": [
2645
+ "workspaceId",
2646
+ "providers"
2647
+ ],
2648
+ "additionalProperties": false
2649
+ },
2650
+ "SessionSummary": {
2651
+ "type": "object",
2652
+ "properties": {
2653
+ "sessionId": {
2654
+ "type": "string"
2655
+ },
2656
+ "repoUrl": {
2657
+ "type": "string"
2658
+ },
2659
+ "createdAt": {
2660
+ "type": [
2661
+ "string",
2662
+ "null"
2663
+ ],
2664
+ "format": "date-time"
2665
+ },
2666
+ "lastActivityAt": {
2667
+ "type": [
2668
+ "string",
2669
+ "null"
2670
+ ],
2671
+ "format": "date-time"
2672
+ },
2673
+ "activeProvider": {
2674
+ "anyOf": [
2675
+ {
2676
+ "$ref": "#/components/schemas/Provider"
2677
+ },
2678
+ {
2679
+ "type": "null"
2680
+ }
2681
+ ]
2682
+ },
2683
+ "name": {
2684
+ "type": "string"
2685
+ }
2686
+ },
2687
+ "required": [
2688
+ "sessionId",
2689
+ "repoUrl"
2690
+ ],
2691
+ "additionalProperties": true
2692
+ },
2693
+ "SessionListResponse": {
2694
+ "type": "object",
2695
+ "properties": {
2696
+ "sessions": {
2697
+ "type": "array",
2698
+ "items": {
2699
+ "$ref": "#/components/schemas/SessionSummary"
2700
+ }
2701
+ }
2702
+ },
2703
+ "required": [
2704
+ "sessions"
2705
+ ],
2706
+ "additionalProperties": false
2707
+ },
2708
+ "LastCommit": {
2709
+ "type": "object",
2710
+ "properties": {
2711
+ "sha": {
2712
+ "type": "string"
2713
+ },
2714
+ "message": {
2715
+ "type": "string"
2716
+ }
2717
+ },
2718
+ "required": [
2719
+ "sha",
2720
+ "message"
2721
+ ],
2722
+ "additionalProperties": false
2723
+ },
2724
+ "LastCommitResponse": {
2725
+ "type": "object",
2726
+ "properties": {
2727
+ "branch": {
2728
+ "type": "string"
2729
+ },
2730
+ "commit": {
2731
+ "$ref": "#/components/schemas/LastCommit"
2732
+ }
2733
+ },
2734
+ "required": [
2735
+ "branch",
2736
+ "commit"
2737
+ ],
2738
+ "additionalProperties": false
2739
+ },
2740
+ "RpcLogsResponse": {
2741
+ "type": "object",
2742
+ "properties": {
2743
+ "rpcLogs": {
2744
+ "type": "array",
2745
+ "items": {
2746
+ "type": "object"
2747
+ }
2748
+ }
2749
+ },
2750
+ "required": [
2751
+ "rpcLogs"
2752
+ ],
2753
+ "additionalProperties": false
2754
+ },
2755
+ "GitIdentity": {
2756
+ "type": "object",
2757
+ "properties": {
2758
+ "name": {
2759
+ "type": "string"
2760
+ },
2761
+ "email": {
2762
+ "type": "string"
2763
+ }
2764
+ },
2765
+ "required": [
2766
+ "name",
2767
+ "email"
2768
+ ],
2769
+ "additionalProperties": false
2770
+ },
2771
+ "GitIdentityResponse": {
2772
+ "type": "object",
2773
+ "properties": {
2774
+ "global": {
2775
+ "$ref": "#/components/schemas/GitIdentity"
2776
+ },
2777
+ "repo": {
2778
+ "$ref": "#/components/schemas/GitIdentity"
2779
+ },
2780
+ "effective": {
2781
+ "$ref": "#/components/schemas/GitIdentity"
2782
+ }
2783
+ },
2784
+ "required": [
2785
+ "global",
2786
+ "repo",
2787
+ "effective"
2788
+ ],
2789
+ "additionalProperties": false
2790
+ },
2791
+ "GitIdentityUpdateRequest": {
2792
+ "type": "object",
2793
+ "properties": {
2794
+ "name": {
2795
+ "type": "string"
2796
+ },
2797
+ "email": {
2798
+ "type": "string"
2799
+ }
2800
+ },
2801
+ "required": [
2802
+ "name",
2803
+ "email"
2804
+ ],
2805
+ "additionalProperties": false
2806
+ },
2807
+ "GitIdentityUpdateResponse": {
2808
+ "type": "object",
2809
+ "properties": {
2810
+ "ok": {
2811
+ "type": "boolean"
2812
+ },
2813
+ "repo": {
2814
+ "$ref": "#/components/schemas/GitIdentity"
2815
+ }
2816
+ },
2817
+ "required": [
2818
+ "ok",
2819
+ "repo"
2820
+ ],
2821
+ "additionalProperties": false
2822
+ },
2823
+ "DirectoryBrowseResponse": {
2824
+ "type": "object",
2825
+ "properties": {
2826
+ "entries": {
2827
+ "type": "array",
2828
+ "items": {
2829
+ "$ref": "#/components/schemas/DirectoryNode"
2830
+ }
2831
+ },
2832
+ "path": {
2833
+ "type": "string"
2834
+ }
2835
+ },
2836
+ "required": [
2837
+ "entries",
2838
+ "path"
2839
+ ],
2840
+ "additionalProperties": false
2841
+ },
2842
+ "WorktreeMessagesResponse": {
2843
+ "type": "object",
2844
+ "properties": {
2845
+ "worktreeId": {
2846
+ "type": "string"
2847
+ },
2848
+ "messages": {
2849
+ "type": "array",
2850
+ "items": {
2851
+ "$ref": "#/components/schemas/Message"
2852
+ }
2853
+ },
2854
+ "hasMore": {
2855
+ "type": "boolean"
2856
+ }
2857
+ },
2858
+ "required": [
2859
+ "worktreeId",
2860
+ "messages",
2861
+ "hasMore"
2862
+ ],
2863
+ "additionalProperties": false
2864
+ },
2865
+ "BacklogItem": {
2866
+ "type": "object",
2867
+ "properties": {
2868
+ "id": {
2869
+ "type": "string"
2870
+ },
2871
+ "text": {
2872
+ "type": "string"
2873
+ },
2874
+ "createdAt": {
2875
+ "type": "string",
2876
+ "format": "date-time"
2877
+ },
2878
+ "done": {
2879
+ "type": "boolean"
2880
+ },
2881
+ "doneAt": {
2882
+ "type": [
2883
+ "string",
2884
+ "null"
2885
+ ],
2886
+ "format": "date-time"
2887
+ }
2888
+ },
2889
+ "required": [
2890
+ "id",
2891
+ "text",
2892
+ "createdAt",
2893
+ "done"
2894
+ ],
2895
+ "additionalProperties": true
2896
+ },
2897
+ "BacklogListResponse": {
2898
+ "type": "object",
2899
+ "properties": {
2900
+ "items": {
2901
+ "type": "array",
2902
+ "items": {
2903
+ "$ref": "#/components/schemas/BacklogItem"
2904
+ }
2905
+ }
2906
+ },
2907
+ "required": [
2908
+ "items"
2909
+ ],
2910
+ "additionalProperties": false
2911
+ },
2912
+ "BacklogCreateRequest": {
2913
+ "type": "object",
2914
+ "properties": {
2915
+ "text": {
2916
+ "type": "string"
2917
+ }
2918
+ },
2919
+ "required": [
2920
+ "text"
2921
+ ],
2922
+ "additionalProperties": false
2923
+ },
2924
+ "BacklogCreateResponse": {
2925
+ "type": "object",
2926
+ "properties": {
2927
+ "ok": {
2928
+ "type": "boolean"
2929
+ },
2930
+ "item": {
2931
+ "$ref": "#/components/schemas/BacklogItem"
2932
+ }
2933
+ },
2934
+ "required": [
2935
+ "ok",
2936
+ "item"
2937
+ ],
2938
+ "additionalProperties": false
2939
+ },
2940
+ "BacklogUpdateRequest": {
2941
+ "type": "object",
2942
+ "properties": {
2943
+ "done": {
2944
+ "type": "boolean"
2945
+ }
2946
+ },
2947
+ "required": [
2948
+ "done"
2949
+ ],
2950
+ "additionalProperties": false
2951
+ },
2952
+ "BacklogUpdateResponse": {
2953
+ "type": "object",
2954
+ "properties": {
2955
+ "ok": {
2956
+ "type": "boolean"
2957
+ },
2958
+ "item": {
2959
+ "$ref": "#/components/schemas/BacklogItem"
2960
+ }
2961
+ },
2962
+ "required": [
2963
+ "ok",
2964
+ "item"
2965
+ ],
2966
+ "additionalProperties": false
2967
+ },
2968
+ "HandoffRequest": {
2969
+ "type": "object",
2970
+ "properties": {
2971
+ "sessionId": {
2972
+ "type": "string"
2973
+ }
2974
+ },
2975
+ "required": [
2976
+ "sessionId"
2977
+ ],
2978
+ "additionalProperties": false
2979
+ },
2980
+ "HandoffResponse": {
2981
+ "type": "object",
2982
+ "properties": {
2983
+ "handoffToken": {
2984
+ "type": "string"
2985
+ },
2986
+ "expiresAt": {
2987
+ "type": [
2988
+ "string",
2989
+ "null"
2990
+ ],
2991
+ "format": "date-time"
2992
+ }
2993
+ },
2994
+ "required": [
2995
+ "handoffToken"
2996
+ ],
2997
+ "additionalProperties": false
2998
+ },
2999
+ "HandoffConsumeRequest": {
3000
+ "type": "object",
3001
+ "properties": {
3002
+ "handoffToken": {
3003
+ "type": "string"
3004
+ }
3005
+ },
3006
+ "required": [
3007
+ "handoffToken"
3008
+ ],
3009
+ "additionalProperties": false
3010
+ },
3011
+ "HandoffConsumeResponse": {
3012
+ "type": "object",
3013
+ "properties": {
3014
+ "workspaceId": {
3015
+ "type": "string"
3016
+ },
3017
+ "workspaceToken": {
3018
+ "type": "string"
3019
+ },
3020
+ "refreshToken": {
3021
+ "type": "string"
3022
+ },
3023
+ "expiresIn": {
3024
+ "type": "integer"
3025
+ },
3026
+ "refreshExpiresIn": {
3027
+ "type": "integer"
3028
+ },
3029
+ "sessionId": {
3030
+ "type": "string"
3031
+ }
3032
+ },
3033
+ "required": [
3034
+ "workspaceId",
3035
+ "workspaceToken",
3036
+ "refreshToken",
3037
+ "sessionId"
3038
+ ],
3039
+ "additionalProperties": true
3040
+ },
3041
+ "WorktreeMessageCreateRequest": {
3042
+ "type": "object",
3043
+ "required": [
3044
+ "role",
3045
+ "text"
3046
+ ],
3047
+ "properties": {
3048
+ "role": {
3049
+ "type": "string",
3050
+ "enum": [
3051
+ "user"
3052
+ ]
3053
+ },
3054
+ "text": {
3055
+ "type": "string"
3056
+ },
3057
+ "attachments": {
3058
+ "type": "array",
3059
+ "items": {
3060
+ "$ref": "#/components/schemas/Attachment"
3061
+ }
3062
+ }
3063
+ }
3064
+ },
3065
+ "WorktreeMessageCreateResponse": {
3066
+ "type": "object",
3067
+ "required": [
3068
+ "messageId",
3069
+ "turnId",
3070
+ "threadId",
3071
+ "provider",
3072
+ "worktreeId"
3073
+ ],
3074
+ "properties": {
3075
+ "messageId": {
3076
+ "type": "string"
3077
+ },
3078
+ "turnId": {
3079
+ "type": "string"
3080
+ },
3081
+ "threadId": {
3082
+ "type": "string"
3083
+ },
3084
+ "provider": {
3085
+ "type": "string"
3086
+ },
3087
+ "worktreeId": {
3088
+ "type": "string"
3089
+ }
3090
+ }
3091
+ },
3092
+ "WorktreeWakeupRequest": {
3093
+ "type": "object",
3094
+ "properties": {
3095
+ "timeoutMs": {
3096
+ "type": "integer",
3097
+ "minimum": 1000,
3098
+ "maximum": 60000,
3099
+ "description": "Optional timeout in milliseconds (default 15000)."
3100
+ }
3101
+ },
3102
+ "additionalProperties": false
3103
+ },
3104
+ "WorktreeWakeupResponse": {
3105
+ "type": "object",
3106
+ "properties": {
3107
+ "worktreeId": {
3108
+ "type": "string"
3109
+ },
3110
+ "provider": {
3111
+ "$ref": "#/components/schemas/Provider"
3112
+ },
3113
+ "status": {
3114
+ "type": "string",
3115
+ "enum": [
3116
+ "ready"
3117
+ ]
3118
+ },
3119
+ "threadId": {
3120
+ "type": [
3121
+ "string",
3122
+ "null"
3123
+ ]
3124
+ }
3125
+ },
3126
+ "required": [
3127
+ "worktreeId",
3128
+ "provider",
3129
+ "status"
3130
+ ],
3131
+ "additionalProperties": false
3132
+ },
3133
+ "FolderCreateRequest": {
3134
+ "type": "object",
3135
+ "properties": {
3136
+ "path": {
3137
+ "type": "string"
3138
+ }
3139
+ },
3140
+ "required": [
3141
+ "path"
3142
+ ],
3143
+ "additionalProperties": false
3144
+ },
3145
+ "FolderCreateResponse": {
3146
+ "type": "object",
3147
+ "properties": {
3148
+ "ok": {
3149
+ "type": "boolean",
3150
+ "const": true
3151
+ },
3152
+ "path": {
3153
+ "type": "string"
3154
+ }
3155
+ },
3156
+ "required": [
3157
+ "ok",
3158
+ "path"
3159
+ ],
3160
+ "additionalProperties": false
3161
+ },
3162
+ "FileRenameRequest": {
3163
+ "type": "object",
3164
+ "properties": {
3165
+ "fromPath": {
3166
+ "type": "string"
3167
+ },
3168
+ "toPath": {
3169
+ "type": "string"
3170
+ }
3171
+ },
3172
+ "required": [
3173
+ "fromPath",
3174
+ "toPath"
3175
+ ],
3176
+ "additionalProperties": false
3177
+ },
3178
+ "FileRenameResponse": {
3179
+ "type": "object",
3180
+ "properties": {
3181
+ "ok": {
3182
+ "type": "boolean",
3183
+ "const": true
3184
+ },
3185
+ "fromPath": {
3186
+ "type": "string"
3187
+ },
3188
+ "toPath": {
3189
+ "type": "string"
3190
+ }
3191
+ },
3192
+ "required": [
3193
+ "ok",
3194
+ "fromPath",
3195
+ "toPath"
3196
+ ],
3197
+ "additionalProperties": false
3198
+ },
3199
+ "FileDeleteRequest": {
3200
+ "type": "object",
3201
+ "properties": {
3202
+ "path": {
3203
+ "type": "string"
3204
+ }
3205
+ },
3206
+ "required": [
3207
+ "path"
3208
+ ],
3209
+ "additionalProperties": false
3210
+ },
3211
+ "FileDeleteResponse": {
3212
+ "type": "object",
3213
+ "properties": {
3214
+ "ok": {
3215
+ "type": "boolean",
3216
+ "const": true
3217
+ },
3218
+ "path": {
3219
+ "type": "string"
3220
+ }
3221
+ },
3222
+ "required": [
3223
+ "ok",
3224
+ "path"
3225
+ ],
3226
+ "additionalProperties": false
3227
+ }
3228
+ },
3229
+ "securitySchemes": {
3230
+ "BearerAuth": {
3231
+ "type": "http",
3232
+ "scheme": "bearer",
3233
+ "bearerFormat": "JWT"
3234
+ }
3235
+ }
3236
+ },
3237
+ "security": [
3238
+ {
3239
+ "BearerAuth": []
3240
+ }
3241
+ ]
3242
+ }