@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,1511 @@
1
+ {
2
+ "asyncapi": "2.6.0",
3
+ "info": {
4
+ "title": "vibe80 WebSocket API",
5
+ "version": "1.1.0",
6
+ "description": "Chat + worktree + terminal websockets. Connect with ?session=SESSION_ID and send an initial {type:'auth', token:'<workspace JWT>'} message within 5s."
7
+ },
8
+ "servers": {
9
+ "chat": {
10
+ "url": "ws://localhost:5179/ws",
11
+ "protocol": "ws",
12
+ "description": "Chat/worktree socket. Query: ?session=SESSION_ID. Authenticate with auth message."
13
+ },
14
+ "terminal": {
15
+ "url": "ws://localhost:5179/terminal",
16
+ "protocol": "ws",
17
+ "description": "Terminal socket. Query: ?session=SESSION_ID and optional &worktreeId=ID. Authenticate with auth message."
18
+ }
19
+ },
20
+ "channels": {
21
+ "/ws": {
22
+ "parameters": {
23
+ "session": {
24
+ "description": "Session ID",
25
+ "schema": {
26
+ "type": "string"
27
+ }
28
+ }
29
+ },
30
+ "publish": {
31
+ "summary": "Client -> Server",
32
+ "message": {
33
+ "oneOf": [
34
+ {
35
+ "$ref": "#/components/messages/Auth"
36
+ },
37
+ {
38
+ "$ref": "#/components/messages/Ping"
39
+ },
40
+ {
41
+ "$ref": "#/components/messages/ActionRequest"
42
+ },
43
+ {
44
+ "$ref": "#/components/messages/WakeUp"
45
+ },
46
+ {
47
+ "$ref": "#/components/messages/WorktreeSendMessage"
48
+ },
49
+ {
50
+ "$ref": "#/components/messages/WorktreeMessagesSyncRequest"
51
+ },
52
+ {
53
+ "$ref": "#/components/messages/TurnInterrupt"
54
+ },
55
+ {
56
+ "$ref": "#/components/messages/ModelListRequest"
57
+ },
58
+ {
59
+ "$ref": "#/components/messages/ModelSetRequest"
60
+ },
61
+ {
62
+ "$ref": "#/components/messages/AccountLoginStart"
63
+ },
64
+ {
65
+ "$ref": "#/components/messages/SwitchProvider"
66
+ }
67
+ ]
68
+ }
69
+ },
70
+ "subscribe": {
71
+ "summary": "Server -> Client",
72
+ "message": {
73
+ "oneOf": [
74
+ {
75
+ "$ref": "#/components/messages/Pong"
76
+ },
77
+ {
78
+ "$ref": "#/components/messages/AuthOk"
79
+ },
80
+ {
81
+ "$ref": "#/components/messages/Error"
82
+ },
83
+ {
84
+ "$ref": "#/components/messages/Status"
85
+ },
86
+ {
87
+ "$ref": "#/components/messages/Ready"
88
+ },
89
+ {
90
+ "$ref": "#/components/messages/ProviderStatus"
91
+ },
92
+ {
93
+ "$ref": "#/components/messages/WorktreeStatus"
94
+ },
95
+ {
96
+ "$ref": "#/components/messages/WorktreeReady"
97
+ },
98
+ {
99
+ "$ref": "#/components/messages/RepoDiff"
100
+ },
101
+ {
102
+ "$ref": "#/components/messages/WorktreeDiff"
103
+ },
104
+ {
105
+ "$ref": "#/components/messages/AgentReasoning"
106
+ },
107
+ {
108
+ "$ref": "#/components/messages/AssistantDelta"
109
+ },
110
+ {
111
+ "$ref": "#/components/messages/AssistantMessage"
112
+ },
113
+ {
114
+ "$ref": "#/components/messages/CommandExecutionDelta"
115
+ },
116
+ {
117
+ "$ref": "#/components/messages/CommandExecutionCompleted"
118
+ },
119
+ {
120
+ "$ref": "#/components/messages/ItemStarted"
121
+ },
122
+ {
123
+ "$ref": "#/components/messages/TurnStarted"
124
+ },
125
+ {
126
+ "$ref": "#/components/messages/TurnCompleted"
127
+ },
128
+ {
129
+ "$ref": "#/components/messages/TurnError"
130
+ },
131
+ {
132
+ "$ref": "#/components/messages/TurnInterruptSent"
133
+ },
134
+ {
135
+ "$ref": "#/components/messages/ActionRequestEcho"
136
+ },
137
+ {
138
+ "$ref": "#/components/messages/ActionResult"
139
+ },
140
+ {
141
+ "$ref": "#/components/messages/WorktreeMessagesSync"
142
+ },
143
+ {
144
+ "$ref": "#/components/messages/ProviderSwitched"
145
+ },
146
+ {
147
+ "$ref": "#/components/messages/ModelListResponse"
148
+ },
149
+ {
150
+ "$ref": "#/components/messages/ModelSetResponse"
151
+ },
152
+ {
153
+ "$ref": "#/components/messages/AccountLoginStarted"
154
+ },
155
+ {
156
+ "$ref": "#/components/messages/AccountLoginError"
157
+ },
158
+ {
159
+ "$ref": "#/components/messages/AccountLoginCompleted"
160
+ },
161
+ {
162
+ "$ref": "#/components/messages/RpcLog"
163
+ }
164
+ ]
165
+ }
166
+ }
167
+ },
168
+ "/terminal": {
169
+ "parameters": {
170
+ "session": {
171
+ "description": "Session ID",
172
+ "schema": {
173
+ "type": "string"
174
+ }
175
+ },
176
+ "worktreeId": {
177
+ "description": "Optional worktree id",
178
+ "schema": {
179
+ "type": "string"
180
+ }
181
+ }
182
+ },
183
+ "publish": {
184
+ "summary": "Client -> Server",
185
+ "message": {
186
+ "oneOf": [
187
+ {
188
+ "$ref": "#/components/messages/Auth"
189
+ },
190
+ {
191
+ "$ref": "#/components/messages/TerminalInit"
192
+ },
193
+ {
194
+ "$ref": "#/components/messages/TerminalResize"
195
+ },
196
+ {
197
+ "$ref": "#/components/messages/TerminalInput"
198
+ }
199
+ ]
200
+ }
201
+ },
202
+ "subscribe": {
203
+ "summary": "Server -> Client",
204
+ "message": {
205
+ "oneOf": [
206
+ {
207
+ "$ref": "#/components/messages/AuthOk"
208
+ },
209
+ {
210
+ "$ref": "#/components/messages/Error"
211
+ },
212
+ {
213
+ "$ref": "#/components/messages/TerminalOutput"
214
+ },
215
+ {
216
+ "$ref": "#/components/messages/TerminalExit"
217
+ }
218
+ ]
219
+ }
220
+ }
221
+ }
222
+ },
223
+ "components": {
224
+ "schemas": {
225
+ "Provider": {
226
+ "type": "string",
227
+ "enum": [
228
+ "codex",
229
+ "claude"
230
+ ]
231
+ },
232
+ "AttachmentRef": {
233
+ "type": "object",
234
+ "properties": {
235
+ "name": {
236
+ "type": "string"
237
+ },
238
+ "path": {
239
+ "type": "string"
240
+ },
241
+ "size": {
242
+ "type": "integer"
243
+ }
244
+ },
245
+ "additionalProperties": true
246
+ },
247
+ "Message": {
248
+ "type": "object",
249
+ "properties": {
250
+ "id": {
251
+ "type": "string"
252
+ },
253
+ "role": {
254
+ "type": "string"
255
+ },
256
+ "text": {
257
+ "type": "string"
258
+ },
259
+ "attachments": {
260
+ "type": "array",
261
+ "items": {
262
+ "$ref": "#/components/schemas/AttachmentRef"
263
+ }
264
+ },
265
+ "provider": {
266
+ "$ref": "#/components/schemas/Provider"
267
+ },
268
+ "toolResult": {
269
+ "type": "object"
270
+ }
271
+ },
272
+ "additionalProperties": true
273
+ },
274
+ "RepoDiff": {
275
+ "type": "object",
276
+ "properties": {
277
+ "status": {
278
+ "type": "string"
279
+ },
280
+ "diff": {
281
+ "type": "string"
282
+ }
283
+ },
284
+ "additionalProperties": false
285
+ },
286
+ "RpcLogEntry": {
287
+ "type": "object",
288
+ "properties": {
289
+ "direction": {
290
+ "type": "string",
291
+ "enum": [
292
+ "stdin",
293
+ "stdout"
294
+ ]
295
+ },
296
+ "timestamp": {
297
+ "type": "number"
298
+ },
299
+ "payload": {
300
+ "type": "object"
301
+ },
302
+ "provider": {
303
+ "$ref": "#/components/schemas/Provider"
304
+ },
305
+ "worktreeId": {
306
+ "type": "string"
307
+ }
308
+ },
309
+ "additionalProperties": true
310
+ },
311
+ "WorktreeStatusPayload": {
312
+ "type": "object",
313
+ "properties": {
314
+ "type": {
315
+ "const": "worktree_status"
316
+ },
317
+ "worktreeId": {
318
+ "type": "string"
319
+ },
320
+ "status": {
321
+ "type": "string",
322
+ "enum": [
323
+ "ready",
324
+ "processing",
325
+ "stopped",
326
+ "error"
327
+ ]
328
+ },
329
+ "error": {
330
+ "type": [
331
+ "string",
332
+ "null"
333
+ ]
334
+ }
335
+ },
336
+ "required": [
337
+ "type",
338
+ "worktreeId",
339
+ "status"
340
+ ],
341
+ "additionalProperties": true
342
+ },
343
+ "WorktreeDiffPayload": {
344
+ "type": "object",
345
+ "properties": {
346
+ "type": {
347
+ "const": "worktree_diff"
348
+ },
349
+ "worktreeId": {
350
+ "type": "string"
351
+ },
352
+ "status": {
353
+ "type": "string"
354
+ },
355
+ "diff": {
356
+ "type": "string"
357
+ }
358
+ },
359
+ "required": [
360
+ "type",
361
+ "worktreeId"
362
+ ],
363
+ "additionalProperties": true
364
+ }
365
+ },
366
+ "messages": {
367
+ "Auth": {
368
+ "name": "auth",
369
+ "payload": {
370
+ "type": "object",
371
+ "properties": {
372
+ "type": {
373
+ "const": "auth"
374
+ },
375
+ "token": {
376
+ "type": "string"
377
+ }
378
+ },
379
+ "required": [
380
+ "type",
381
+ "token"
382
+ ],
383
+ "additionalProperties": false
384
+ }
385
+ },
386
+ "AuthOk": {
387
+ "name": "auth_ok",
388
+ "payload": {
389
+ "type": "object",
390
+ "properties": {
391
+ "type": {
392
+ "const": "auth_ok"
393
+ }
394
+ },
395
+ "required": [
396
+ "type"
397
+ ],
398
+ "additionalProperties": true
399
+ }
400
+ },
401
+ "Ping": {
402
+ "name": "ping",
403
+ "payload": {
404
+ "type": "object",
405
+ "properties": {
406
+ "type": {
407
+ "const": "ping"
408
+ }
409
+ },
410
+ "required": [
411
+ "type"
412
+ ],
413
+ "additionalProperties": false
414
+ }
415
+ },
416
+ "Pong": {
417
+ "name": "pong",
418
+ "payload": {
419
+ "type": "object",
420
+ "properties": {
421
+ "type": {
422
+ "const": "pong"
423
+ }
424
+ },
425
+ "required": [
426
+ "type"
427
+ ],
428
+ "additionalProperties": false
429
+ }
430
+ },
431
+ "Error": {
432
+ "name": "error",
433
+ "payload": {
434
+ "type": "object",
435
+ "properties": {
436
+ "type": {
437
+ "const": "error"
438
+ },
439
+ "message": {
440
+ "type": "string"
441
+ },
442
+ "worktreeId": {
443
+ "type": "string"
444
+ },
445
+ "error_code": {
446
+ "type": "string"
447
+ },
448
+ "recoverable": {
449
+ "type": [
450
+ "boolean",
451
+ "null"
452
+ ]
453
+ }
454
+ },
455
+ "required": [
456
+ "type",
457
+ "message"
458
+ ],
459
+ "additionalProperties": true
460
+ }
461
+ },
462
+ "Status": {
463
+ "name": "status",
464
+ "payload": {
465
+ "type": "object",
466
+ "properties": {
467
+ "type": {
468
+ "const": "status"
469
+ },
470
+ "message": {
471
+ "type": "string"
472
+ },
473
+ "provider": {
474
+ "$ref": "#/components/schemas/Provider"
475
+ }
476
+ },
477
+ "required": [
478
+ "type",
479
+ "message"
480
+ ],
481
+ "additionalProperties": true
482
+ }
483
+ },
484
+ "Ready": {
485
+ "name": "ready",
486
+ "payload": {
487
+ "type": "object",
488
+ "properties": {
489
+ "type": {
490
+ "const": "ready"
491
+ },
492
+ "threadId": {
493
+ "type": "string"
494
+ },
495
+ "provider": {
496
+ "$ref": "#/components/schemas/Provider"
497
+ }
498
+ },
499
+ "required": [
500
+ "type"
501
+ ],
502
+ "additionalProperties": true
503
+ }
504
+ },
505
+ "ProviderStatus": {
506
+ "name": "provider_status",
507
+ "payload": {
508
+ "type": "object",
509
+ "properties": {
510
+ "type": {
511
+ "const": "provider_status"
512
+ },
513
+ "status": {
514
+ "type": "string"
515
+ },
516
+ "provider": {
517
+ "$ref": "#/components/schemas/Provider"
518
+ }
519
+ },
520
+ "required": [
521
+ "type",
522
+ "status"
523
+ ],
524
+ "additionalProperties": true
525
+ }
526
+ },
527
+ "WorktreeStatus": {
528
+ "name": "worktree_status",
529
+ "payload": {
530
+ "$ref": "#/components/schemas/WorktreeStatusPayload"
531
+ }
532
+ },
533
+ "WorktreeReady": {
534
+ "name": "worktree_ready",
535
+ "payload": {
536
+ "type": "object",
537
+ "properties": {
538
+ "type": {
539
+ "const": "worktree_ready"
540
+ },
541
+ "worktreeId": {
542
+ "type": "string"
543
+ },
544
+ "threadId": {
545
+ "type": [
546
+ "string",
547
+ "null"
548
+ ]
549
+ },
550
+ "provider": {
551
+ "$ref": "#/components/schemas/Provider"
552
+ }
553
+ },
554
+ "required": [
555
+ "type",
556
+ "worktreeId"
557
+ ],
558
+ "additionalProperties": true
559
+ }
560
+ },
561
+ "RepoDiff": {
562
+ "name": "repo_diff",
563
+ "payload": {
564
+ "type": "object",
565
+ "properties": {
566
+ "type": {
567
+ "const": "repo_diff"
568
+ },
569
+ "status": {
570
+ "type": "string"
571
+ },
572
+ "diff": {
573
+ "type": "string"
574
+ }
575
+ },
576
+ "required": [
577
+ "type"
578
+ ],
579
+ "additionalProperties": true
580
+ }
581
+ },
582
+ "WorktreeDiff": {
583
+ "name": "worktree_diff",
584
+ "payload": {
585
+ "$ref": "#/components/schemas/WorktreeDiffPayload"
586
+ }
587
+ },
588
+ "AgentReasoning": {
589
+ "name": "agent_reasoning",
590
+ "payload": {
591
+ "type": "object",
592
+ "properties": {
593
+ "type": {
594
+ "const": "agent_reasoning"
595
+ },
596
+ "text": {
597
+ "type": "string"
598
+ },
599
+ "provider": {
600
+ "$ref": "#/components/schemas/Provider"
601
+ },
602
+ "worktreeId": {
603
+ "type": "string"
604
+ }
605
+ },
606
+ "required": [
607
+ "type",
608
+ "text"
609
+ ],
610
+ "additionalProperties": true
611
+ }
612
+ },
613
+ "AssistantDelta": {
614
+ "name": "assistant_delta",
615
+ "payload": {
616
+ "type": "object",
617
+ "properties": {
618
+ "type": {
619
+ "const": "assistant_delta"
620
+ },
621
+ "delta": {
622
+ "type": "string"
623
+ },
624
+ "itemId": {
625
+ "type": "string"
626
+ },
627
+ "turnId": {
628
+ "type": "string"
629
+ },
630
+ "provider": {
631
+ "$ref": "#/components/schemas/Provider"
632
+ },
633
+ "worktreeId": {
634
+ "type": "string"
635
+ }
636
+ },
637
+ "required": [
638
+ "type",
639
+ "delta"
640
+ ],
641
+ "additionalProperties": true
642
+ }
643
+ },
644
+ "AssistantMessage": {
645
+ "name": "assistant_message",
646
+ "payload": {
647
+ "type": "object",
648
+ "properties": {
649
+ "type": {
650
+ "const": "assistant_message"
651
+ },
652
+ "text": {
653
+ "type": "string"
654
+ },
655
+ "itemId": {
656
+ "type": "string"
657
+ },
658
+ "turnId": {
659
+ "type": "string"
660
+ },
661
+ "provider": {
662
+ "$ref": "#/components/schemas/Provider"
663
+ },
664
+ "worktreeId": {
665
+ "type": "string"
666
+ }
667
+ },
668
+ "required": [
669
+ "type",
670
+ "text"
671
+ ],
672
+ "additionalProperties": true
673
+ }
674
+ },
675
+ "CommandExecutionDelta": {
676
+ "name": "command_execution_delta",
677
+ "payload": {
678
+ "type": "object",
679
+ "properties": {
680
+ "type": {
681
+ "const": "command_execution_delta"
682
+ },
683
+ "delta": {
684
+ "type": "string"
685
+ },
686
+ "itemId": {
687
+ "type": "string"
688
+ },
689
+ "turnId": {
690
+ "type": "string"
691
+ },
692
+ "threadId": {
693
+ "type": "string"
694
+ },
695
+ "provider": {
696
+ "$ref": "#/components/schemas/Provider"
697
+ },
698
+ "worktreeId": {
699
+ "type": "string"
700
+ }
701
+ },
702
+ "required": [
703
+ "type",
704
+ "delta"
705
+ ],
706
+ "additionalProperties": true
707
+ }
708
+ },
709
+ "CommandExecutionCompleted": {
710
+ "name": "command_execution_completed",
711
+ "payload": {
712
+ "type": "object",
713
+ "properties": {
714
+ "type": {
715
+ "const": "command_execution_completed"
716
+ },
717
+ "item": {
718
+ "type": "object"
719
+ },
720
+ "itemId": {
721
+ "type": "string"
722
+ },
723
+ "turnId": {
724
+ "type": "string"
725
+ },
726
+ "provider": {
727
+ "$ref": "#/components/schemas/Provider"
728
+ },
729
+ "worktreeId": {
730
+ "type": "string"
731
+ }
732
+ },
733
+ "required": [
734
+ "type",
735
+ "item"
736
+ ],
737
+ "additionalProperties": true
738
+ }
739
+ },
740
+ "ItemStarted": {
741
+ "name": "item_started",
742
+ "payload": {
743
+ "type": "object",
744
+ "properties": {
745
+ "type": {
746
+ "const": "item_started"
747
+ },
748
+ "item": {
749
+ "type": "object"
750
+ },
751
+ "turnId": {
752
+ "type": "string"
753
+ },
754
+ "threadId": {
755
+ "type": "string"
756
+ },
757
+ "provider": {
758
+ "$ref": "#/components/schemas/Provider"
759
+ },
760
+ "worktreeId": {
761
+ "type": "string"
762
+ }
763
+ },
764
+ "required": [
765
+ "type",
766
+ "item"
767
+ ],
768
+ "additionalProperties": true
769
+ }
770
+ },
771
+ "TurnStarted": {
772
+ "name": "turn_started",
773
+ "payload": {
774
+ "type": "object",
775
+ "properties": {
776
+ "type": {
777
+ "const": "turn_started"
778
+ },
779
+ "turnId": {
780
+ "type": "string"
781
+ },
782
+ "threadId": {
783
+ "type": "string"
784
+ },
785
+ "status": {
786
+ "type": "string"
787
+ },
788
+ "provider": {
789
+ "$ref": "#/components/schemas/Provider"
790
+ },
791
+ "worktreeId": {
792
+ "type": "string"
793
+ }
794
+ },
795
+ "required": [
796
+ "type",
797
+ "turnId"
798
+ ],
799
+ "additionalProperties": true
800
+ }
801
+ },
802
+ "TurnCompleted": {
803
+ "name": "turn_completed",
804
+ "payload": {
805
+ "type": "object",
806
+ "properties": {
807
+ "type": {
808
+ "const": "turn_completed"
809
+ },
810
+ "turnId": {
811
+ "type": "string"
812
+ },
813
+ "threadId": {
814
+ "type": "string"
815
+ },
816
+ "status": {
817
+ "type": "string"
818
+ },
819
+ "error": {
820
+ "type": [
821
+ "string",
822
+ "null"
823
+ ]
824
+ },
825
+ "provider": {
826
+ "$ref": "#/components/schemas/Provider"
827
+ },
828
+ "worktreeId": {
829
+ "type": "string"
830
+ }
831
+ },
832
+ "required": [
833
+ "type",
834
+ "turnId"
835
+ ],
836
+ "additionalProperties": true
837
+ }
838
+ },
839
+ "TurnError": {
840
+ "name": "turn_error",
841
+ "payload": {
842
+ "type": "object",
843
+ "properties": {
844
+ "type": {
845
+ "const": "turn_error"
846
+ },
847
+ "turnId": {
848
+ "type": [
849
+ "string",
850
+ "null"
851
+ ]
852
+ },
853
+ "threadId": {
854
+ "type": [
855
+ "string",
856
+ "null"
857
+ ]
858
+ },
859
+ "message": {
860
+ "type": "string"
861
+ },
862
+ "willRetry": {
863
+ "type": [
864
+ "boolean",
865
+ "null"
866
+ ]
867
+ },
868
+ "provider": {
869
+ "$ref": "#/components/schemas/Provider"
870
+ },
871
+ "worktreeId": {
872
+ "type": "string"
873
+ }
874
+ },
875
+ "required": [
876
+ "type",
877
+ "message"
878
+ ],
879
+ "additionalProperties": true
880
+ }
881
+ },
882
+ "TurnInterruptSent": {
883
+ "name": "turn_interrupt_sent",
884
+ "payload": {
885
+ "type": "object",
886
+ "properties": {
887
+ "type": {
888
+ "const": "turn_interrupt_sent"
889
+ }
890
+ },
891
+ "required": [
892
+ "type"
893
+ ],
894
+ "additionalProperties": true
895
+ }
896
+ },
897
+ "ActionRequest": {
898
+ "name": "action_request",
899
+ "payload": {
900
+ "type": "object",
901
+ "properties": {
902
+ "type": {
903
+ "const": "action_request"
904
+ },
905
+ "request": {
906
+ "type": "string",
907
+ "enum": [
908
+ "run",
909
+ "git"
910
+ ]
911
+ },
912
+ "arg": {
913
+ "type": "string"
914
+ },
915
+ "worktreeId": {
916
+ "type": "string"
917
+ }
918
+ },
919
+ "required": [
920
+ "type",
921
+ "request",
922
+ "arg"
923
+ ],
924
+ "additionalProperties": true
925
+ }
926
+ },
927
+ "ActionRequestEcho": {
928
+ "name": "action_request_echo",
929
+ "summary": "Broadcast of a /run or /git request",
930
+ "payload": {
931
+ "type": "object",
932
+ "properties": {
933
+ "type": {
934
+ "const": "action_request"
935
+ },
936
+ "id": {
937
+ "type": "string"
938
+ },
939
+ "request": {
940
+ "type": "string"
941
+ },
942
+ "arg": {
943
+ "type": "string"
944
+ },
945
+ "text": {
946
+ "type": "string"
947
+ },
948
+ "worktreeId": {
949
+ "type": "string"
950
+ }
951
+ },
952
+ "required": [
953
+ "type",
954
+ "request",
955
+ "arg"
956
+ ],
957
+ "additionalProperties": true
958
+ }
959
+ },
960
+ "ActionResult": {
961
+ "name": "action_result",
962
+ "payload": {
963
+ "type": "object",
964
+ "properties": {
965
+ "type": {
966
+ "const": "action_result"
967
+ },
968
+ "id": {
969
+ "type": "string"
970
+ },
971
+ "request": {
972
+ "type": "string"
973
+ },
974
+ "arg": {
975
+ "type": "string"
976
+ },
977
+ "status": {
978
+ "type": "string",
979
+ "enum": [
980
+ "success",
981
+ "error"
982
+ ]
983
+ },
984
+ "output": {
985
+ "type": "string"
986
+ },
987
+ "text": {
988
+ "type": "string"
989
+ },
990
+ "requestMessageId": {
991
+ "type": "string"
992
+ },
993
+ "worktreeId": {
994
+ "type": "string"
995
+ }
996
+ },
997
+ "required": [
998
+ "type",
999
+ "status"
1000
+ ],
1001
+ "additionalProperties": true
1002
+ }
1003
+ },
1004
+ "WorktreeSendMessage": {
1005
+ "name": "worktree_send_message",
1006
+ "payload": {
1007
+ "type": "object",
1008
+ "properties": {
1009
+ "type": {
1010
+ "const": "worktree_send_message"
1011
+ },
1012
+ "worktreeId": {
1013
+ "type": "string"
1014
+ },
1015
+ "text": {
1016
+ "type": "string"
1017
+ },
1018
+ "displayText": {
1019
+ "type": "string"
1020
+ },
1021
+ "attachments": {
1022
+ "type": "array",
1023
+ "items": {
1024
+ "$ref": "#/components/schemas/AttachmentRef"
1025
+ }
1026
+ }
1027
+ },
1028
+ "required": [
1029
+ "type",
1030
+ "worktreeId",
1031
+ "text"
1032
+ ],
1033
+ "additionalProperties": true
1034
+ }
1035
+ },
1036
+ "WorktreeMessagesSyncRequest": {
1037
+ "name": "worktree_messages_sync",
1038
+ "payload": {
1039
+ "type": "object",
1040
+ "properties": {
1041
+ "type": {
1042
+ "const": "worktree_messages_sync"
1043
+ },
1044
+ "worktreeId": {
1045
+ "type": "string"
1046
+ },
1047
+ "limit": {
1048
+ "type": "integer"
1049
+ },
1050
+ "lastSeenMessageId": {
1051
+ "type": "string"
1052
+ }
1053
+ },
1054
+ "required": [
1055
+ "type",
1056
+ "worktreeId"
1057
+ ],
1058
+ "additionalProperties": true
1059
+ }
1060
+ },
1061
+ "WorktreeMessagesSync": {
1062
+ "name": "worktree_messages_sync_response",
1063
+ "payload": {
1064
+ "type": "object",
1065
+ "properties": {
1066
+ "type": {
1067
+ "const": "worktree_messages_sync"
1068
+ },
1069
+ "worktreeId": {
1070
+ "type": "string"
1071
+ },
1072
+ "messages": {
1073
+ "type": "array",
1074
+ "items": {
1075
+ "$ref": "#/components/schemas/Message"
1076
+ }
1077
+ },
1078
+ "status": {
1079
+ "type": "string"
1080
+ }
1081
+ },
1082
+ "required": [
1083
+ "type",
1084
+ "worktreeId",
1085
+ "messages"
1086
+ ],
1087
+ "additionalProperties": true
1088
+ }
1089
+ },
1090
+ "WakeUp": {
1091
+ "name": "wake_up",
1092
+ "payload": {
1093
+ "type": "object",
1094
+ "properties": {
1095
+ "type": {
1096
+ "const": "wake_up"
1097
+ },
1098
+ "worktreeId": {
1099
+ "type": "string"
1100
+ }
1101
+ },
1102
+ "required": [
1103
+ "type"
1104
+ ],
1105
+ "additionalProperties": true
1106
+ }
1107
+ },
1108
+ "TurnInterrupt": {
1109
+ "name": "turn_interrupt",
1110
+ "payload": {
1111
+ "type": "object",
1112
+ "properties": {
1113
+ "type": {
1114
+ "const": "turn_interrupt"
1115
+ },
1116
+ "turnId": {
1117
+ "type": [
1118
+ "string",
1119
+ "null"
1120
+ ]
1121
+ },
1122
+ "worktreeId": {
1123
+ "type": [
1124
+ "string",
1125
+ "null"
1126
+ ]
1127
+ }
1128
+ },
1129
+ "required": [
1130
+ "type"
1131
+ ],
1132
+ "additionalProperties": true
1133
+ }
1134
+ },
1135
+ "ModelListRequest": {
1136
+ "name": "model_list",
1137
+ "payload": {
1138
+ "type": "object",
1139
+ "properties": {
1140
+ "type": {
1141
+ "const": "model_list"
1142
+ },
1143
+ "worktreeId": {
1144
+ "type": "string"
1145
+ }
1146
+ },
1147
+ "required": [
1148
+ "type"
1149
+ ],
1150
+ "additionalProperties": true
1151
+ }
1152
+ },
1153
+ "ModelListResponse": {
1154
+ "name": "model_list_response",
1155
+ "payload": {
1156
+ "type": "object",
1157
+ "properties": {
1158
+ "type": {
1159
+ "const": "model_list"
1160
+ },
1161
+ "worktreeId": {
1162
+ "type": "string"
1163
+ },
1164
+ "models": {
1165
+ "type": "array",
1166
+ "items": {
1167
+ "type": "object"
1168
+ }
1169
+ },
1170
+ "provider": {
1171
+ "$ref": "#/components/schemas/Provider"
1172
+ }
1173
+ },
1174
+ "required": [
1175
+ "type",
1176
+ "models"
1177
+ ],
1178
+ "additionalProperties": true
1179
+ }
1180
+ },
1181
+ "ModelSetRequest": {
1182
+ "name": "model_set",
1183
+ "payload": {
1184
+ "type": "object",
1185
+ "properties": {
1186
+ "type": {
1187
+ "const": "model_set"
1188
+ },
1189
+ "worktreeId": {
1190
+ "type": "string"
1191
+ },
1192
+ "model": {
1193
+ "type": [
1194
+ "string",
1195
+ "null"
1196
+ ]
1197
+ },
1198
+ "reasoningEffort": {
1199
+ "type": [
1200
+ "string",
1201
+ "null"
1202
+ ]
1203
+ }
1204
+ },
1205
+ "required": [
1206
+ "type"
1207
+ ],
1208
+ "additionalProperties": true
1209
+ }
1210
+ },
1211
+ "ModelSetResponse": {
1212
+ "name": "model_set_response",
1213
+ "payload": {
1214
+ "type": "object",
1215
+ "properties": {
1216
+ "type": {
1217
+ "const": "model_set"
1218
+ },
1219
+ "worktreeId": {
1220
+ "type": "string"
1221
+ },
1222
+ "model": {
1223
+ "type": [
1224
+ "string",
1225
+ "null"
1226
+ ]
1227
+ },
1228
+ "reasoningEffort": {
1229
+ "type": [
1230
+ "string",
1231
+ "null"
1232
+ ]
1233
+ },
1234
+ "provider": {
1235
+ "$ref": "#/components/schemas/Provider"
1236
+ }
1237
+ },
1238
+ "required": [
1239
+ "type"
1240
+ ],
1241
+ "additionalProperties": true
1242
+ }
1243
+ },
1244
+ "AccountLoginStart": {
1245
+ "name": "account_login_start",
1246
+ "payload": {
1247
+ "type": "object",
1248
+ "properties": {
1249
+ "type": {
1250
+ "const": "account_login_start"
1251
+ },
1252
+ "provider": {
1253
+ "type": "string"
1254
+ },
1255
+ "params": {
1256
+ "type": "object"
1257
+ }
1258
+ },
1259
+ "required": [
1260
+ "type"
1261
+ ],
1262
+ "additionalProperties": true
1263
+ }
1264
+ },
1265
+ "AccountLoginStarted": {
1266
+ "name": "account_login_started",
1267
+ "payload": {
1268
+ "type": "object",
1269
+ "properties": {
1270
+ "type": {
1271
+ "const": "account_login_started"
1272
+ },
1273
+ "result": {
1274
+ "type": "object"
1275
+ },
1276
+ "provider": {
1277
+ "$ref": "#/components/schemas/Provider"
1278
+ }
1279
+ },
1280
+ "required": [
1281
+ "type"
1282
+ ],
1283
+ "additionalProperties": true
1284
+ }
1285
+ },
1286
+ "AccountLoginError": {
1287
+ "name": "account_login_error",
1288
+ "payload": {
1289
+ "type": "object",
1290
+ "properties": {
1291
+ "type": {
1292
+ "const": "account_login_error"
1293
+ },
1294
+ "message": {
1295
+ "type": "string"
1296
+ }
1297
+ },
1298
+ "required": [
1299
+ "type",
1300
+ "message"
1301
+ ],
1302
+ "additionalProperties": true
1303
+ }
1304
+ },
1305
+ "AccountLoginCompleted": {
1306
+ "name": "account_login_completed",
1307
+ "payload": {
1308
+ "type": "object",
1309
+ "properties": {
1310
+ "type": {
1311
+ "const": "account_login_completed"
1312
+ },
1313
+ "success": {
1314
+ "type": "boolean"
1315
+ },
1316
+ "error": {
1317
+ "type": [
1318
+ "string",
1319
+ "null"
1320
+ ]
1321
+ },
1322
+ "loginId": {
1323
+ "type": [
1324
+ "string",
1325
+ "null"
1326
+ ]
1327
+ },
1328
+ "provider": {
1329
+ "$ref": "#/components/schemas/Provider"
1330
+ }
1331
+ },
1332
+ "required": [
1333
+ "type",
1334
+ "success"
1335
+ ],
1336
+ "additionalProperties": true
1337
+ }
1338
+ },
1339
+ "ProviderSwitched": {
1340
+ "name": "provider_switched",
1341
+ "payload": {
1342
+ "type": "object",
1343
+ "properties": {
1344
+ "type": {
1345
+ "const": "provider_switched"
1346
+ },
1347
+ "provider": {
1348
+ "$ref": "#/components/schemas/Provider"
1349
+ },
1350
+ "models": {
1351
+ "type": "array",
1352
+ "items": {
1353
+ "type": "object"
1354
+ }
1355
+ },
1356
+ "threadId": {
1357
+ "type": [
1358
+ "string",
1359
+ "null"
1360
+ ]
1361
+ }
1362
+ },
1363
+ "required": [
1364
+ "type",
1365
+ "provider"
1366
+ ],
1367
+ "additionalProperties": true
1368
+ }
1369
+ },
1370
+ "RpcLog": {
1371
+ "name": "rpc_log",
1372
+ "payload": {
1373
+ "type": "object",
1374
+ "properties": {
1375
+ "type": {
1376
+ "const": "rpc_log"
1377
+ },
1378
+ "entry": {
1379
+ "$ref": "#/components/schemas/RpcLogEntry"
1380
+ }
1381
+ },
1382
+ "required": [
1383
+ "type",
1384
+ "entry"
1385
+ ],
1386
+ "additionalProperties": true
1387
+ }
1388
+ },
1389
+ "SwitchProvider": {
1390
+ "name": "switch_provider",
1391
+ "payload": {
1392
+ "type": "object",
1393
+ "properties": {
1394
+ "type": {
1395
+ "const": "switch_provider"
1396
+ },
1397
+ "provider": {
1398
+ "$ref": "#/components/schemas/Provider"
1399
+ }
1400
+ },
1401
+ "required": [
1402
+ "type",
1403
+ "provider"
1404
+ ],
1405
+ "additionalProperties": true
1406
+ }
1407
+ },
1408
+ "TerminalInit": {
1409
+ "name": "terminal_init",
1410
+ "payload": {
1411
+ "type": "object",
1412
+ "properties": {
1413
+ "type": {
1414
+ "const": "init"
1415
+ },
1416
+ "cols": {
1417
+ "type": "integer"
1418
+ },
1419
+ "rows": {
1420
+ "type": "integer"
1421
+ }
1422
+ },
1423
+ "required": [
1424
+ "type"
1425
+ ],
1426
+ "additionalProperties": true
1427
+ }
1428
+ },
1429
+ "TerminalResize": {
1430
+ "name": "terminal_resize",
1431
+ "payload": {
1432
+ "type": "object",
1433
+ "properties": {
1434
+ "type": {
1435
+ "const": "resize"
1436
+ },
1437
+ "cols": {
1438
+ "type": "integer"
1439
+ },
1440
+ "rows": {
1441
+ "type": "integer"
1442
+ }
1443
+ },
1444
+ "required": [
1445
+ "type"
1446
+ ],
1447
+ "additionalProperties": true
1448
+ }
1449
+ },
1450
+ "TerminalInput": {
1451
+ "name": "terminal_input",
1452
+ "payload": {
1453
+ "type": "object",
1454
+ "properties": {
1455
+ "type": {
1456
+ "const": "input"
1457
+ },
1458
+ "data": {
1459
+ "type": "string"
1460
+ }
1461
+ },
1462
+ "required": [
1463
+ "type",
1464
+ "data"
1465
+ ],
1466
+ "additionalProperties": true
1467
+ }
1468
+ },
1469
+ "TerminalOutput": {
1470
+ "name": "terminal_output",
1471
+ "payload": {
1472
+ "type": "object",
1473
+ "properties": {
1474
+ "type": {
1475
+ "const": "output"
1476
+ },
1477
+ "data": {
1478
+ "type": "string"
1479
+ }
1480
+ },
1481
+ "required": [
1482
+ "type",
1483
+ "data"
1484
+ ],
1485
+ "additionalProperties": true
1486
+ }
1487
+ },
1488
+ "TerminalExit": {
1489
+ "name": "terminal_exit",
1490
+ "payload": {
1491
+ "type": "object",
1492
+ "properties": {
1493
+ "type": {
1494
+ "const": "exit"
1495
+ },
1496
+ "code": {
1497
+ "type": [
1498
+ "integer",
1499
+ "null"
1500
+ ]
1501
+ }
1502
+ },
1503
+ "required": [
1504
+ "type"
1505
+ ],
1506
+ "additionalProperties": true
1507
+ }
1508
+ }
1509
+ }
1510
+ }
1511
+ }