@band-app/server 0.45.0 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/client/_shell.html +0 -0
  2. package/dist/client/assets/{TerminalPanel-BSgLxcBa.js → TerminalPanel-CQGF9Qku.js} +1 -1
  3. package/dist/client/assets/{_basePickBy-B2D0UP39.js → _basePickBy-D64wD5rn.js} +1 -1
  4. package/dist/client/assets/{_baseUniq-DI8ZgEoy.js → _baseUniq-pND9PMLH.js} +1 -1
  5. package/dist/client/assets/{arc-CusSSOnB.js → arc-Bilmh-jP.js} +1 -1
  6. package/dist/client/assets/{architectureDiagram-VXUJARFQ--yeCQZBi.js → architectureDiagram-VXUJARFQ-KfIpeO-l.js} +1 -1
  7. package/dist/client/assets/{blockDiagram-VD42YOAC-CFm1Wl9h.js → blockDiagram-VD42YOAC-DtuyRI-v.js} +1 -1
  8. package/dist/client/assets/{c4Diagram-YG6GDRKO-D_etQru9.js → c4Diagram-YG6GDRKO-CBuSt_Sq.js} +1 -1
  9. package/dist/client/assets/channel-CmV-Qsz8.js +1 -0
  10. package/dist/client/assets/{chunk-4BX2VUAB-DKxCZlmV.js → chunk-4BX2VUAB-CWIj0g_M.js} +1 -1
  11. package/dist/client/assets/{chunk-55IACEB6-D_2NrIuc.js → chunk-55IACEB6-YWkCYv9O.js} +1 -1
  12. package/dist/client/assets/{chunk-B4BG7PRW-MyWT4c02.js → chunk-B4BG7PRW-muM18MGT.js} +1 -1
  13. package/dist/client/assets/{chunk-DI55MBZ5-CCGrM_BO.js → chunk-DI55MBZ5-DUKyYScZ.js} +1 -1
  14. package/dist/client/assets/{chunk-FMBD7UC4-DW8XMS2B.js → chunk-FMBD7UC4-YTfHsy8G.js} +1 -1
  15. package/dist/client/assets/{chunk-QN33PNHL-DE6Flnfx.js → chunk-QN33PNHL-BdIATH5l.js} +1 -1
  16. package/dist/client/assets/{chunk-QZHKN3VN-DT-AC-2s.js → chunk-QZHKN3VN-DqRnJnIm.js} +1 -1
  17. package/dist/client/assets/{chunk-TZMSLE5B-1CRV9zhr.js → chunk-TZMSLE5B-DOL-jYtj.js} +1 -1
  18. package/dist/client/assets/classDiagram-2ON5EDUG-frHxX5yV.js +1 -0
  19. package/dist/client/assets/classDiagram-v2-WZHVMYZB-frHxX5yV.js +1 -0
  20. package/dist/client/assets/clone-6GXe8GJt.js +1 -0
  21. package/dist/client/assets/{cose-bilkent-S5V4N54A-CylrPDlJ.js → cose-bilkent-S5V4N54A-Cffv5KWs.js} +1 -1
  22. package/dist/client/assets/{dagre-6UL2VRFP-DIiGfSPE.js → dagre-6UL2VRFP-lIXclAkR.js} +1 -1
  23. package/dist/client/assets/{diagram-PSM6KHXK-Dhg2Anht.js → diagram-PSM6KHXK-BBQxBoNY.js} +1 -1
  24. package/dist/client/assets/{diagram-QEK2KX5R-CHtAFtYr.js → diagram-QEK2KX5R-BkC_Y-i9.js} +1 -1
  25. package/dist/client/assets/{diagram-S2PKOQOG-BhV5j-TR.js → diagram-S2PKOQOG-Culf_egi.js} +1 -1
  26. package/dist/client/assets/{erDiagram-Q2GNP2WA-BRnWDRFF.js → erDiagram-Q2GNP2WA-D8qVM8rI.js} +1 -1
  27. package/dist/client/assets/{flowDiagram-NV44I4VS-C3t3xUts.js → flowDiagram-NV44I4VS-D_CW6QJO.js} +1 -1
  28. package/dist/client/assets/{ganttDiagram-JELNMOA3-Dhi4RuL2.js → ganttDiagram-JELNMOA3-DeYroA3a.js} +1 -1
  29. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-DoapAKa4.js → gitGraphDiagram-V2S2FVAM-a_sS5cSL.js} +1 -1
  30. package/dist/client/assets/{graph-zHrJcjIn.js → graph-BiyE3_7j.js} +1 -1
  31. package/dist/client/assets/{highlighted-body-B3W2YXNL-C0nDS5Bw.js → highlighted-body-B3W2YXNL-HVIXx0Ob.js} +1 -1
  32. package/dist/client/assets/{index-AovJALw-.js → index-B1Qa5REm.js} +1 -1
  33. package/dist/client/assets/{index-CmSk8DaX.js → index-BKkkwDGt.js} +1 -1
  34. package/dist/client/assets/{index-Dvedoadn.js → index-BuC5LY4k.js} +1 -1
  35. package/dist/client/assets/{index-DFQ-JoWY.js → index-CMHYIEyK.js} +1 -1
  36. package/dist/client/assets/{index-CXJmiMyB.js → index-CcH0k4fG.js} +1 -1
  37. package/dist/client/assets/{index-DZVQFIvA.js → index-Cnvsv3TN.js} +1 -1
  38. package/dist/client/assets/{index-CIUDRPfZ.js → index-CqPtl_El.js} +1 -1
  39. package/dist/client/assets/{index-DEjeNKIN.js → index-DOFpEx7l.js} +1 -1
  40. package/dist/client/assets/{index-j32sI8jH.js → index-DyvxDAAr.js} +1 -1
  41. package/dist/client/assets/{index-J7dKORCr.js → index-LKhS8iLe.js} +1 -1
  42. package/dist/client/assets/{index-BSzLU2AZ.js → index-NNpxvI8j.js} +1 -1
  43. package/dist/client/assets/{index-CQNzNkU1.js → index-REiX7RF3.js} +1 -1
  44. package/dist/client/assets/{index-BvocwYRD.js → index-WgCV2JjC.js} +1 -1
  45. package/dist/client/assets/{infoDiagram-HS3SLOUP-BQcGr7vK.js → infoDiagram-HS3SLOUP-BfzBdZLM.js} +1 -1
  46. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-BZoNgguo.js → journeyDiagram-XKPGCS4Q-CUsUym-8.js} +1 -1
  47. package/dist/client/assets/{kanban-definition-3W4ZIXB7-BAd3onZI.js → kanban-definition-3W4ZIXB7-b54i6dX1.js} +1 -1
  48. package/dist/client/assets/{layout-xQCnjWzr.js → layout-ztlxnOA9.js} +1 -1
  49. package/dist/client/assets/{main-P6rS56AX.js → main-CCOutd_8.js} +268 -268
  50. package/dist/client/assets/main-D4-4L0eG.css +1 -0
  51. package/dist/client/assets/{mindmap-definition-VGOIOE7T-CKfAWxeg.js → mindmap-definition-VGOIOE7T-p7poZwfk.js} +1 -1
  52. package/dist/client/assets/{pieDiagram-ADFJNKIX-DnpXzjrU.js → pieDiagram-ADFJNKIX-DNua1MUn.js} +1 -1
  53. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-CHa47eqO.js → quadrantDiagram-AYHSOK5B-CminxoD5.js} +1 -1
  54. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-ClcGO6HD.js → requirementDiagram-UZGBJVZJ-D3aBt82J.js} +1 -1
  55. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-C9r89KBR.js → sankeyDiagram-TZEHDZUN-B65x-vl8.js} +1 -1
  56. package/dist/client/assets/{sequenceDiagram-WL72ISMW-DXTeMOQe.js → sequenceDiagram-WL72ISMW-DswVb1N3.js} +1 -1
  57. package/dist/client/assets/{stateDiagram-FKZM4ZOC-BWenJpMn.js → stateDiagram-FKZM4ZOC-BScRlCMH.js} +1 -1
  58. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-B5QaGcyC.js +1 -0
  59. package/dist/client/assets/{timeline-definition-IT6M3QCI-mAlOxnDq.js → timeline-definition-IT6M3QCI-C5AHVri5.js} +1 -1
  60. package/dist/client/assets/{treemap-GDKQZRPO-D9zuivHV.js → treemap-GDKQZRPO-B4F1SV97.js} +1 -1
  61. package/dist/client/assets/{worktree._worktreeId-CrfhluSv.js → worktree._worktreeId-DOkSR4Iv.js} +1 -1
  62. package/dist/client/assets/{worktree._worktreeId-CRJzjLWS.js → worktree._worktreeId-Da_9lTBD.js} +1 -1
  63. package/dist/client/assets/{xychartDiagram-PRI3JC2R-B_ixi0uG.js → xychartDiagram-PRI3JC2R-dZFFrnv9.js} +1 -1
  64. package/dist/migrations/20261011133526_worktree_checkpoints/migration.sql +21 -0
  65. package/dist/migrations/20261011133526_worktree_checkpoints/snapshot.json +4379 -0
  66. package/dist/migrations/20261012171800_follow_the_work/migration.sql +3 -0
  67. package/dist/migrations/20261012171800_follow_the_work/snapshot.json +4409 -0
  68. package/dist/openapi.json +2273 -128
  69. package/dist/start-server.mjs +5916 -3661
  70. package/package.json +5 -5
  71. package/dist/client/assets/channel-cIJkhe3e.js +0 -1
  72. package/dist/client/assets/classDiagram-2ON5EDUG-HY3lvxou.js +0 -1
  73. package/dist/client/assets/classDiagram-v2-WZHVMYZB-HY3lvxou.js +0 -1
  74. package/dist/client/assets/clone-Ce-j_cG_.js +0 -1
  75. package/dist/client/assets/main-D0zhYKVY.css +0 -1
  76. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-DKVIf8UV.js +0 -1
package/dist/openapi.json CHANGED
@@ -673,6 +673,58 @@
673
673
  ]
674
674
  }
675
675
  },
676
+ "/hosts.forAgents": {
677
+ "get": {
678
+ "operationId": "hosts.forAgents",
679
+ "description": "The host list as an agent may see it: id, name, status, OS and architecture, agents,\ncapabilities and labels. No roots, home, tool versions, tokens or runner settings. The MCP\nendpoint lists this one and not `hosts.list`.",
680
+ "tags": [
681
+ "hosts"
682
+ ],
683
+ "responses": {
684
+ "200": {
685
+ "description": "Successful response",
686
+ "content": {
687
+ "application/json": {
688
+ "schema": {
689
+ "type": "object",
690
+ "properties": {
691
+ "result": {
692
+ "type": "object",
693
+ "properties": {
694
+ "data": {
695
+ "type": "object",
696
+ "properties": {
697
+ "hosts": {
698
+ "type": "array",
699
+ "items": {
700
+ "$ref": "#/components/schemas/AgentHostView"
701
+ }
702
+ }
703
+ },
704
+ "required": [
705
+ "hosts"
706
+ ],
707
+ "additionalProperties": false
708
+ }
709
+ },
710
+ "required": [
711
+ "data"
712
+ ]
713
+ }
714
+ },
715
+ "required": [
716
+ "result"
717
+ ]
718
+ }
719
+ }
720
+ }
721
+ },
722
+ "default": {
723
+ "$ref": "#/components/responses/Error"
724
+ }
725
+ }
726
+ }
727
+ },
676
728
  "/hosts.browse": {
677
729
  "get": {
678
730
  "operationId": "hosts.browse",
@@ -2105,11 +2157,11 @@
2105
2157
  }
2106
2158
  }
2107
2159
  },
2108
- "/runners.list": {
2160
+ "/checkpoints.list": {
2109
2161
  "get": {
2110
- "operationId": "runners.list",
2162
+ "operationId": "checkpoints.list",
2111
2163
  "tags": [
2112
- "runners"
2164
+ "checkpoints"
2113
2165
  ],
2114
2166
  "responses": {
2115
2167
  "200": {
@@ -2125,29 +2177,22 @@
2125
2177
  "data": {
2126
2178
  "type": "object",
2127
2179
  "properties": {
2128
- "runs": {
2129
- "type": "array",
2130
- "items": {
2131
- "$ref": "#/components/schemas/RunnerRun"
2132
- }
2133
- },
2134
- "runners": {
2180
+ "checkpoints": {
2135
2181
  "type": "array",
2136
2182
  "items": {
2137
- "$ref": "#/components/schemas/RunnerView"
2183
+ "$ref": "#/components/schemas/CheckpointView"
2138
2184
  }
2139
2185
  },
2140
- "errors": {
2141
- "type": "array",
2142
- "items": {
2143
- "type": "string"
2144
- }
2186
+ "warning": {
2187
+ "type": [
2188
+ "string",
2189
+ "null"
2190
+ ]
2145
2191
  }
2146
2192
  },
2147
2193
  "required": [
2148
- "runs",
2149
- "runners",
2150
- "errors"
2194
+ "checkpoints",
2195
+ "warning"
2151
2196
  ],
2152
2197
  "additionalProperties": false
2153
2198
  }
@@ -2167,15 +2212,39 @@
2167
2212
  "default": {
2168
2213
  "$ref": "#/components/responses/Error"
2169
2214
  }
2170
- }
2215
+ },
2216
+ "parameters": [
2217
+ {
2218
+ "name": "input",
2219
+ "in": "query",
2220
+ "required": true,
2221
+ "style": "deepObject",
2222
+ "content": {
2223
+ "application/json": {
2224
+ "schema": {
2225
+ "type": "object",
2226
+ "properties": {
2227
+ "worktreeId": {
2228
+ "type": "string"
2229
+ }
2230
+ },
2231
+ "required": [
2232
+ "worktreeId"
2233
+ ],
2234
+ "additionalProperties": false
2235
+ }
2236
+ }
2237
+ }
2238
+ }
2239
+ ]
2171
2240
  }
2172
2241
  },
2173
- "/runners.snapshots": {
2174
- "get": {
2175
- "operationId": "runners.snapshots",
2176
- "description": "The machine snapshots the hub holds, newest first (plan step 3.10).",
2242
+ "/checkpoints.take": {
2243
+ "post": {
2244
+ "operationId": "checkpoints.take",
2245
+ "description": "Takes a checkpoint now. Answers `unchanged` when nothing differs from the newest one.",
2177
2246
  "tags": [
2178
- "runners"
2247
+ "checkpoints"
2179
2248
  ],
2180
2249
  "responses": {
2181
2250
  "200": {
@@ -2189,69 +2258,62 @@
2189
2258
  "type": "object",
2190
2259
  "properties": {
2191
2260
  "data": {
2192
- "type": "object",
2193
- "properties": {
2194
- "snapshots": {
2195
- "type": "array",
2196
- "items": {
2197
- "type": "object",
2198
- "properties": {
2199
- "id": {
2200
- "type": "string"
2201
- },
2202
- "runnerId": {
2203
- "type": "string"
2204
- },
2205
- "hostId": {
2206
- "type": "string"
2207
- },
2208
- "worktreeIds": {
2209
- "type": "array",
2210
- "items": {
2211
- "type": "string"
2212
- }
2213
- },
2214
- "snapshotId": {
2215
- "type": "string"
2216
- },
2217
- "sizeBytes": {
2218
- "type": [
2219
- "number",
2220
- "null"
2221
- ]
2222
- },
2223
- "restoredAt": {
2224
- "type": [
2225
- "number",
2226
- "null"
2227
- ]
2228
- },
2229
- "createdAt": {
2230
- "type": "number"
2231
- },
2232
- "expiresAt": {
2233
- "type": "number"
2234
- }
2261
+ "oneOf": [
2262
+ {
2263
+ "type": "object",
2264
+ "properties": {
2265
+ "status": {
2266
+ "type": "string",
2267
+ "const": "created"
2235
2268
  },
2236
- "required": [
2237
- "id",
2238
- "runnerId",
2239
- "hostId",
2240
- "worktreeIds",
2241
- "snapshotId",
2242
- "sizeBytes",
2243
- "restoredAt",
2244
- "createdAt",
2245
- "expiresAt"
2246
- ],
2247
- "additionalProperties": false
2248
- }
2269
+ "checkpoint": {
2270
+ "$ref": "#/components/schemas/CheckpointView"
2271
+ }
2272
+ },
2273
+ "required": [
2274
+ "status",
2275
+ "checkpoint"
2276
+ ],
2277
+ "additionalProperties": false
2278
+ },
2279
+ {
2280
+ "type": "object",
2281
+ "properties": {
2282
+ "status": {
2283
+ "type": "string",
2284
+ "const": "unchanged"
2285
+ },
2286
+ "checkpoint": {
2287
+ "$ref": "#/components/schemas/CheckpointView"
2288
+ }
2289
+ },
2290
+ "required": [
2291
+ "status",
2292
+ "checkpoint"
2293
+ ],
2294
+ "additionalProperties": false
2295
+ },
2296
+ {
2297
+ "type": "object",
2298
+ "properties": {
2299
+ "status": {
2300
+ "type": "string",
2301
+ "const": "skipped"
2302
+ },
2303
+ "reason": {
2304
+ "type": "string"
2305
+ }
2306
+ },
2307
+ "required": [
2308
+ "status",
2309
+ "reason"
2310
+ ],
2311
+ "additionalProperties": false
2249
2312
  }
2250
- },
2251
- "required": [
2252
- "snapshots"
2253
2313
  ],
2254
- "additionalProperties": false
2314
+ "discriminator": {
2315
+ "propertyName": "status"
2316
+ }
2255
2317
  }
2256
2318
  },
2257
2319
  "required": [
@@ -2269,15 +2331,33 @@
2269
2331
  "default": {
2270
2332
  "$ref": "#/components/responses/Error"
2271
2333
  }
2334
+ },
2335
+ "requestBody": {
2336
+ "required": true,
2337
+ "content": {
2338
+ "application/json": {
2339
+ "schema": {
2340
+ "type": "object",
2341
+ "properties": {
2342
+ "worktreeId": {
2343
+ "type": "string"
2344
+ }
2345
+ },
2346
+ "required": [
2347
+ "worktreeId"
2348
+ ],
2349
+ "additionalProperties": false
2350
+ }
2351
+ }
2352
+ }
2272
2353
  }
2273
2354
  }
2274
2355
  },
2275
- "/runners.log": {
2356
+ "/checkpoints.changes": {
2276
2357
  "get": {
2277
- "operationId": "runners.log",
2278
- "description": "The hook output of a host request, as the hub logged it (tokens removed).",
2358
+ "operationId": "checkpoints.changes",
2279
2359
  "tags": [
2280
- "runners"
2360
+ "checkpoints"
2281
2361
  ],
2282
2362
  "responses": {
2283
2363
  "200": {
@@ -2293,15 +2373,19 @@
2293
2373
  "data": {
2294
2374
  "type": "object",
2295
2375
  "properties": {
2296
- "log": {
2297
- "type": [
2298
- "string",
2299
- "null"
2300
- ]
2376
+ "checkpoint": {
2377
+ "$ref": "#/components/schemas/CheckpointView"
2378
+ },
2379
+ "files": {
2380
+ "type": "array",
2381
+ "items": {
2382
+ "$ref": "#/components/schemas/ChangedFile"
2383
+ }
2301
2384
  }
2302
2385
  },
2303
2386
  "required": [
2304
- "log"
2387
+ "checkpoint",
2388
+ "files"
2305
2389
  ],
2306
2390
  "additionalProperties": false
2307
2391
  }
@@ -2333,12 +2417,15 @@
2333
2417
  "schema": {
2334
2418
  "type": "object",
2335
2419
  "properties": {
2336
- "requestId": {
2420
+ "worktreeId": {
2421
+ "type": "string"
2422
+ },
2423
+ "checkpointId": {
2337
2424
  "type": "string"
2338
2425
  }
2339
2426
  },
2340
2427
  "required": [
2341
- "requestId"
2428
+ "worktreeId"
2342
2429
  ],
2343
2430
  "additionalProperties": false
2344
2431
  }
@@ -2348,12 +2435,11 @@
2348
2435
  ]
2349
2436
  }
2350
2437
  },
2351
- "/runners.machines": {
2438
+ "/checkpoints.diff": {
2352
2439
  "get": {
2353
- "operationId": "runners.machines",
2354
- "description": "The machines the runners started, newest first, with the state the reaper keeps them in.",
2440
+ "operationId": "checkpoints.diff",
2355
2441
  "tags": [
2356
- "runners"
2442
+ "checkpoints"
2357
2443
  ],
2358
2444
  "responses": {
2359
2445
  "200": {
@@ -2369,11 +2455,1219 @@
2369
2455
  "data": {
2370
2456
  "type": "object",
2371
2457
  "properties": {
2372
- "machines": {
2373
- "type": "array",
2374
- "items": {
2375
- "$ref": "#/components/schemas/MachineView"
2376
- }
2458
+ "diff": {
2459
+ "type": "string"
2460
+ }
2461
+ },
2462
+ "required": [
2463
+ "diff"
2464
+ ],
2465
+ "additionalProperties": false
2466
+ }
2467
+ },
2468
+ "required": [
2469
+ "data"
2470
+ ]
2471
+ }
2472
+ },
2473
+ "required": [
2474
+ "result"
2475
+ ]
2476
+ }
2477
+ }
2478
+ }
2479
+ },
2480
+ "default": {
2481
+ "$ref": "#/components/responses/Error"
2482
+ }
2483
+ },
2484
+ "parameters": [
2485
+ {
2486
+ "name": "input",
2487
+ "in": "query",
2488
+ "required": true,
2489
+ "style": "deepObject",
2490
+ "content": {
2491
+ "application/json": {
2492
+ "schema": {
2493
+ "type": "object",
2494
+ "properties": {
2495
+ "path": {
2496
+ "type": "string"
2497
+ },
2498
+ "worktreeId": {
2499
+ "type": "string"
2500
+ },
2501
+ "checkpointId": {
2502
+ "type": "string"
2503
+ }
2504
+ },
2505
+ "required": [
2506
+ "path",
2507
+ "worktreeId"
2508
+ ],
2509
+ "additionalProperties": false
2510
+ }
2511
+ }
2512
+ }
2513
+ }
2514
+ ]
2515
+ }
2516
+ },
2517
+ "/checkpoints.files": {
2518
+ "get": {
2519
+ "operationId": "checkpoints.files",
2520
+ "tags": [
2521
+ "checkpoints"
2522
+ ],
2523
+ "responses": {
2524
+ "200": {
2525
+ "description": "Successful response",
2526
+ "content": {
2527
+ "application/json": {
2528
+ "schema": {
2529
+ "type": "object",
2530
+ "properties": {
2531
+ "result": {
2532
+ "type": "object",
2533
+ "properties": {
2534
+ "data": {
2535
+ "type": "object",
2536
+ "properties": {
2537
+ "checkpoint": {
2538
+ "$ref": "#/components/schemas/CheckpointView"
2539
+ },
2540
+ "paths": {
2541
+ "type": "array",
2542
+ "items": {
2543
+ "type": "string"
2544
+ }
2545
+ }
2546
+ },
2547
+ "required": [
2548
+ "checkpoint",
2549
+ "paths"
2550
+ ],
2551
+ "additionalProperties": false
2552
+ }
2553
+ },
2554
+ "required": [
2555
+ "data"
2556
+ ]
2557
+ }
2558
+ },
2559
+ "required": [
2560
+ "result"
2561
+ ]
2562
+ }
2563
+ }
2564
+ }
2565
+ },
2566
+ "default": {
2567
+ "$ref": "#/components/responses/Error"
2568
+ }
2569
+ },
2570
+ "parameters": [
2571
+ {
2572
+ "name": "input",
2573
+ "in": "query",
2574
+ "required": true,
2575
+ "style": "deepObject",
2576
+ "content": {
2577
+ "application/json": {
2578
+ "schema": {
2579
+ "type": "object",
2580
+ "properties": {
2581
+ "worktreeId": {
2582
+ "type": "string"
2583
+ },
2584
+ "checkpointId": {
2585
+ "type": "string"
2586
+ }
2587
+ },
2588
+ "required": [
2589
+ "worktreeId"
2590
+ ],
2591
+ "additionalProperties": false
2592
+ }
2593
+ }
2594
+ }
2595
+ }
2596
+ ]
2597
+ }
2598
+ },
2599
+ "/checkpoints.file": {
2600
+ "get": {
2601
+ "operationId": "checkpoints.file",
2602
+ "tags": [
2603
+ "checkpoints"
2604
+ ],
2605
+ "responses": {
2606
+ "200": {
2607
+ "description": "Successful response",
2608
+ "content": {
2609
+ "application/json": {
2610
+ "schema": {
2611
+ "type": "object",
2612
+ "properties": {
2613
+ "result": {
2614
+ "type": "object",
2615
+ "properties": {
2616
+ "data": {
2617
+ "type": "object",
2618
+ "properties": {
2619
+ "path": {
2620
+ "type": "string"
2621
+ },
2622
+ "size": {
2623
+ "type": "number"
2624
+ },
2625
+ "binary": {
2626
+ "type": "boolean"
2627
+ },
2628
+ "truncated": {
2629
+ "type": "boolean"
2630
+ },
2631
+ "content": {
2632
+ "type": "string"
2633
+ }
2634
+ },
2635
+ "required": [
2636
+ "path",
2637
+ "size",
2638
+ "binary",
2639
+ "truncated",
2640
+ "content"
2641
+ ],
2642
+ "additionalProperties": false
2643
+ }
2644
+ },
2645
+ "required": [
2646
+ "data"
2647
+ ]
2648
+ }
2649
+ },
2650
+ "required": [
2651
+ "result"
2652
+ ]
2653
+ }
2654
+ }
2655
+ }
2656
+ },
2657
+ "default": {
2658
+ "$ref": "#/components/responses/Error"
2659
+ }
2660
+ },
2661
+ "parameters": [
2662
+ {
2663
+ "name": "input",
2664
+ "in": "query",
2665
+ "required": true,
2666
+ "style": "deepObject",
2667
+ "content": {
2668
+ "application/json": {
2669
+ "schema": {
2670
+ "type": "object",
2671
+ "properties": {
2672
+ "path": {
2673
+ "type": "string"
2674
+ },
2675
+ "worktreeId": {
2676
+ "type": "string"
2677
+ },
2678
+ "checkpointId": {
2679
+ "type": "string"
2680
+ }
2681
+ },
2682
+ "required": [
2683
+ "path",
2684
+ "worktreeId"
2685
+ ],
2686
+ "additionalProperties": false
2687
+ }
2688
+ }
2689
+ }
2690
+ }
2691
+ ]
2692
+ }
2693
+ },
2694
+ "/checkpoints.restore": {
2695
+ "post": {
2696
+ "operationId": "checkpoints.restore",
2697
+ "description": "Restores a worktree on another host from a checkpoint. The old copy is left alone, superseded.",
2698
+ "tags": [
2699
+ "checkpoints"
2700
+ ],
2701
+ "responses": {
2702
+ "200": {
2703
+ "description": "Successful response",
2704
+ "content": {
2705
+ "application/json": {
2706
+ "schema": {
2707
+ "type": "object",
2708
+ "properties": {
2709
+ "result": {
2710
+ "type": "object",
2711
+ "properties": {
2712
+ "data": {
2713
+ "$ref": "#/components/schemas/RestoreResult"
2714
+ }
2715
+ },
2716
+ "required": [
2717
+ "data"
2718
+ ]
2719
+ }
2720
+ },
2721
+ "required": [
2722
+ "result"
2723
+ ]
2724
+ }
2725
+ }
2726
+ }
2727
+ },
2728
+ "default": {
2729
+ "$ref": "#/components/responses/Error"
2730
+ }
2731
+ },
2732
+ "requestBody": {
2733
+ "required": true,
2734
+ "content": {
2735
+ "application/json": {
2736
+ "schema": {
2737
+ "type": "object",
2738
+ "properties": {
2739
+ "worktreeId": {
2740
+ "type": "string"
2741
+ },
2742
+ "toHostId": {
2743
+ "type": "string"
2744
+ },
2745
+ "hostRepoPath": {
2746
+ "type": "string"
2747
+ },
2748
+ "checkpointId": {
2749
+ "type": "string"
2750
+ },
2751
+ "addHost": {
2752
+ "type": "boolean"
2753
+ }
2754
+ },
2755
+ "required": [
2756
+ "worktreeId",
2757
+ "toHostId"
2758
+ ],
2759
+ "additionalProperties": false
2760
+ }
2761
+ }
2762
+ }
2763
+ }
2764
+ }
2765
+ },
2766
+ "/checkpoints.move": {
2767
+ "post": {
2768
+ "operationId": "checkpoints.move",
2769
+ "description": "Moves a worktree whose host is online, and removes the source once the target has it.",
2770
+ "tags": [
2771
+ "checkpoints"
2772
+ ],
2773
+ "responses": {
2774
+ "200": {
2775
+ "description": "Successful response",
2776
+ "content": {
2777
+ "application/json": {
2778
+ "schema": {
2779
+ "type": "object",
2780
+ "properties": {
2781
+ "result": {
2782
+ "type": "object",
2783
+ "properties": {
2784
+ "data": {
2785
+ "$ref": "#/components/schemas/RestoreResult"
2786
+ }
2787
+ },
2788
+ "required": [
2789
+ "data"
2790
+ ]
2791
+ }
2792
+ },
2793
+ "required": [
2794
+ "result"
2795
+ ]
2796
+ }
2797
+ }
2798
+ }
2799
+ },
2800
+ "default": {
2801
+ "$ref": "#/components/responses/Error"
2802
+ }
2803
+ },
2804
+ "requestBody": {
2805
+ "required": true,
2806
+ "content": {
2807
+ "application/json": {
2808
+ "schema": {
2809
+ "type": "object",
2810
+ "properties": {
2811
+ "worktreeId": {
2812
+ "type": "string"
2813
+ },
2814
+ "toHostId": {
2815
+ "type": "string"
2816
+ },
2817
+ "hostRepoPath": {
2818
+ "type": "string"
2819
+ },
2820
+ "addHost": {
2821
+ "type": "boolean"
2822
+ }
2823
+ },
2824
+ "required": [
2825
+ "worktreeId",
2826
+ "toHostId"
2827
+ ],
2828
+ "additionalProperties": false
2829
+ }
2830
+ }
2831
+ }
2832
+ }
2833
+ }
2834
+ },
2835
+ "/checkpoints.evacuate": {
2836
+ "post": {
2837
+ "operationId": "checkpoints.evacuate",
2838
+ "description": "Moves every worktree on a host to another, one after the other.",
2839
+ "tags": [
2840
+ "checkpoints"
2841
+ ],
2842
+ "responses": {
2843
+ "200": {
2844
+ "description": "Successful response",
2845
+ "content": {
2846
+ "application/json": {
2847
+ "schema": {
2848
+ "type": "object",
2849
+ "properties": {
2850
+ "result": {
2851
+ "type": "object",
2852
+ "properties": {
2853
+ "data": {
2854
+ "$ref": "#/components/schemas/EvacuateResult"
2855
+ }
2856
+ },
2857
+ "required": [
2858
+ "data"
2859
+ ]
2860
+ }
2861
+ },
2862
+ "required": [
2863
+ "result"
2864
+ ]
2865
+ }
2866
+ }
2867
+ }
2868
+ },
2869
+ "default": {
2870
+ "$ref": "#/components/responses/Error"
2871
+ }
2872
+ },
2873
+ "requestBody": {
2874
+ "required": true,
2875
+ "content": {
2876
+ "application/json": {
2877
+ "schema": {
2878
+ "type": "object",
2879
+ "properties": {
2880
+ "toHostId": {
2881
+ "type": "string"
2882
+ },
2883
+ "fromHostId": {
2884
+ "type": "string"
2885
+ },
2886
+ "addHost": {
2887
+ "type": "boolean"
2888
+ }
2889
+ },
2890
+ "required": [
2891
+ "toHostId",
2892
+ "fromHostId"
2893
+ ],
2894
+ "additionalProperties": false
2895
+ }
2896
+ }
2897
+ }
2898
+ }
2899
+ }
2900
+ },
2901
+ "/checkpoints.evacuable": {
2902
+ "get": {
2903
+ "operationId": "checkpoints.evacuable",
2904
+ "description": "The worktrees on a host that an evacuation would take.",
2905
+ "tags": [
2906
+ "checkpoints"
2907
+ ],
2908
+ "responses": {
2909
+ "200": {
2910
+ "description": "Successful response",
2911
+ "content": {
2912
+ "application/json": {
2913
+ "schema": {
2914
+ "type": "object",
2915
+ "properties": {
2916
+ "result": {
2917
+ "type": "object",
2918
+ "properties": {
2919
+ "data": {
2920
+ "type": "object",
2921
+ "properties": {
2922
+ "worktrees": {
2923
+ "type": "array",
2924
+ "items": {
2925
+ "type": "object",
2926
+ "properties": {
2927
+ "repo": {
2928
+ "type": "string"
2929
+ },
2930
+ "name": {
2931
+ "type": "string"
2932
+ },
2933
+ "worktreeId": {
2934
+ "type": "string"
2935
+ }
2936
+ },
2937
+ "required": [
2938
+ "repo",
2939
+ "name",
2940
+ "worktreeId"
2941
+ ],
2942
+ "additionalProperties": false
2943
+ }
2944
+ }
2945
+ },
2946
+ "required": [
2947
+ "worktrees"
2948
+ ],
2949
+ "additionalProperties": false
2950
+ }
2951
+ },
2952
+ "required": [
2953
+ "data"
2954
+ ]
2955
+ }
2956
+ },
2957
+ "required": [
2958
+ "result"
2959
+ ]
2960
+ }
2961
+ }
2962
+ }
2963
+ },
2964
+ "default": {
2965
+ "$ref": "#/components/responses/Error"
2966
+ }
2967
+ },
2968
+ "parameters": [
2969
+ {
2970
+ "name": "input",
2971
+ "in": "query",
2972
+ "required": true,
2973
+ "style": "deepObject",
2974
+ "content": {
2975
+ "application/json": {
2976
+ "schema": {
2977
+ "type": "object",
2978
+ "properties": {
2979
+ "hostId": {
2980
+ "type": "string"
2981
+ }
2982
+ },
2983
+ "required": [
2984
+ "hostId"
2985
+ ],
2986
+ "additionalProperties": false
2987
+ }
2988
+ }
2989
+ }
2990
+ }
2991
+ ]
2992
+ }
2993
+ },
2994
+ "/follow.offer": {
2995
+ "get": {
2996
+ "operationId": "follow.offer",
2997
+ "description": "Who could take the work, what will not carry over, or why it cannot continue.",
2998
+ "tags": [
2999
+ "follow"
3000
+ ],
3001
+ "responses": {
3002
+ "200": {
3003
+ "description": "Successful response",
3004
+ "content": {
3005
+ "application/json": {
3006
+ "schema": {
3007
+ "type": "object",
3008
+ "properties": {
3009
+ "result": {
3010
+ "type": "object",
3011
+ "properties": {
3012
+ "data": {
3013
+ "$ref": "#/components/schemas/ContinueOffer"
3014
+ }
3015
+ },
3016
+ "required": [
3017
+ "data"
3018
+ ]
3019
+ }
3020
+ },
3021
+ "required": [
3022
+ "result"
3023
+ ]
3024
+ }
3025
+ }
3026
+ }
3027
+ },
3028
+ "default": {
3029
+ "$ref": "#/components/responses/Error"
3030
+ }
3031
+ },
3032
+ "parameters": [
3033
+ {
3034
+ "name": "input",
3035
+ "in": "query",
3036
+ "required": true,
3037
+ "style": "deepObject",
3038
+ "content": {
3039
+ "application/json": {
3040
+ "schema": {
3041
+ "type": "object",
3042
+ "properties": {
3043
+ "worktreeId": {
3044
+ "type": "string"
3045
+ },
3046
+ "chatId": {
3047
+ "type": "string"
3048
+ }
3049
+ },
3050
+ "required": [
3051
+ "worktreeId"
3052
+ ],
3053
+ "additionalProperties": false
3054
+ }
3055
+ }
3056
+ }
3057
+ }
3058
+ ]
3059
+ }
3060
+ },
3061
+ "/follow.continue": {
3062
+ "post": {
3063
+ "operationId": "follow.continue",
3064
+ "description": "Continues the worktree on `toHostId` (the recommended host when left out) from its latest checkpoint.",
3065
+ "tags": [
3066
+ "follow"
3067
+ ],
3068
+ "responses": {
3069
+ "200": {
3070
+ "description": "Successful response",
3071
+ "content": {
3072
+ "application/json": {
3073
+ "schema": {
3074
+ "type": "object",
3075
+ "properties": {
3076
+ "result": {
3077
+ "type": "object",
3078
+ "properties": {
3079
+ "data": {
3080
+ "$ref": "#/components/schemas/ContinueResult"
3081
+ }
3082
+ },
3083
+ "required": [
3084
+ "data"
3085
+ ]
3086
+ }
3087
+ },
3088
+ "required": [
3089
+ "result"
3090
+ ]
3091
+ }
3092
+ }
3093
+ }
3094
+ },
3095
+ "default": {
3096
+ "$ref": "#/components/responses/Error"
3097
+ }
3098
+ },
3099
+ "requestBody": {
3100
+ "required": true,
3101
+ "content": {
3102
+ "application/json": {
3103
+ "schema": {
3104
+ "type": "object",
3105
+ "properties": {
3106
+ "worktreeId": {
3107
+ "type": "string"
3108
+ },
3109
+ "chatId": {
3110
+ "type": "string"
3111
+ },
3112
+ "toHostId": {
3113
+ "type": "string"
3114
+ }
3115
+ },
3116
+ "required": [
3117
+ "worktreeId"
3118
+ ],
3119
+ "additionalProperties": false
3120
+ }
3121
+ }
3122
+ }
3123
+ }
3124
+ }
3125
+ },
3126
+ "/follow.divergence": {
3127
+ "get": {
3128
+ "operationId": "follow.divergence",
3129
+ "description": "Compares the old copy with the checkpoint the continuation used.",
3130
+ "tags": [
3131
+ "follow"
3132
+ ],
3133
+ "responses": {
3134
+ "200": {
3135
+ "description": "Successful response",
3136
+ "content": {
3137
+ "application/json": {
3138
+ "schema": {
3139
+ "type": "object",
3140
+ "properties": {
3141
+ "result": {
3142
+ "type": "object",
3143
+ "properties": {
3144
+ "data": {
3145
+ "$ref": "#/components/schemas/DivergenceReport"
3146
+ }
3147
+ },
3148
+ "required": [
3149
+ "data"
3150
+ ]
3151
+ }
3152
+ },
3153
+ "required": [
3154
+ "result"
3155
+ ]
3156
+ }
3157
+ }
3158
+ }
3159
+ },
3160
+ "default": {
3161
+ "$ref": "#/components/responses/Error"
3162
+ }
3163
+ },
3164
+ "parameters": [
3165
+ {
3166
+ "name": "input",
3167
+ "in": "query",
3168
+ "required": true,
3169
+ "style": "deepObject",
3170
+ "content": {
3171
+ "application/json": {
3172
+ "schema": {
3173
+ "type": "object",
3174
+ "properties": {
3175
+ "worktreeId": {
3176
+ "type": "string"
3177
+ }
3178
+ },
3179
+ "required": [
3180
+ "worktreeId"
3181
+ ],
3182
+ "additionalProperties": false
3183
+ }
3184
+ }
3185
+ }
3186
+ }
3187
+ ]
3188
+ }
3189
+ },
3190
+ "/follow.divergenceDiff": {
3191
+ "get": {
3192
+ "operationId": "follow.divergenceDiff",
3193
+ "description": "The diff of one file the old copy changed since the checkpoint.",
3194
+ "tags": [
3195
+ "follow"
3196
+ ],
3197
+ "responses": {
3198
+ "200": {
3199
+ "description": "Successful response",
3200
+ "content": {
3201
+ "application/json": {
3202
+ "schema": {
3203
+ "type": "object",
3204
+ "properties": {
3205
+ "result": {
3206
+ "type": "object",
3207
+ "properties": {
3208
+ "data": {
3209
+ "type": "object",
3210
+ "properties": {
3211
+ "diff": {
3212
+ "type": "string"
3213
+ }
3214
+ },
3215
+ "required": [
3216
+ "diff"
3217
+ ],
3218
+ "additionalProperties": false
3219
+ }
3220
+ },
3221
+ "required": [
3222
+ "data"
3223
+ ]
3224
+ }
3225
+ },
3226
+ "required": [
3227
+ "result"
3228
+ ]
3229
+ }
3230
+ }
3231
+ }
3232
+ },
3233
+ "default": {
3234
+ "$ref": "#/components/responses/Error"
3235
+ }
3236
+ },
3237
+ "parameters": [
3238
+ {
3239
+ "name": "input",
3240
+ "in": "query",
3241
+ "required": true,
3242
+ "style": "deepObject",
3243
+ "content": {
3244
+ "application/json": {
3245
+ "schema": {
3246
+ "type": "object",
3247
+ "properties": {
3248
+ "path": {
3249
+ "type": "string"
3250
+ },
3251
+ "worktreeId": {
3252
+ "type": "string"
3253
+ }
3254
+ },
3255
+ "required": [
3256
+ "path",
3257
+ "worktreeId"
3258
+ ],
3259
+ "additionalProperties": false
3260
+ }
3261
+ }
3262
+ }
3263
+ }
3264
+ ]
3265
+ }
3266
+ },
3267
+ "/follow.bringOver": {
3268
+ "post": {
3269
+ "operationId": "follow.bringOver",
3270
+ "description": "Applies the old copy's newer changes to the new copy as a patch. Conflicts change nothing.",
3271
+ "tags": [
3272
+ "follow"
3273
+ ],
3274
+ "responses": {
3275
+ "200": {
3276
+ "description": "Successful response",
3277
+ "content": {
3278
+ "application/json": {
3279
+ "schema": {
3280
+ "type": "object",
3281
+ "properties": {
3282
+ "result": {
3283
+ "type": "object",
3284
+ "properties": {
3285
+ "data": {
3286
+ "$ref": "#/components/schemas/BringOverResult"
3287
+ }
3288
+ },
3289
+ "required": [
3290
+ "data"
3291
+ ]
3292
+ }
3293
+ },
3294
+ "required": [
3295
+ "result"
3296
+ ]
3297
+ }
3298
+ }
3299
+ }
3300
+ },
3301
+ "default": {
3302
+ "$ref": "#/components/responses/Error"
3303
+ }
3304
+ },
3305
+ "requestBody": {
3306
+ "required": true,
3307
+ "content": {
3308
+ "application/json": {
3309
+ "schema": {
3310
+ "type": "object",
3311
+ "properties": {
3312
+ "worktreeId": {
3313
+ "type": "string"
3314
+ }
3315
+ },
3316
+ "required": [
3317
+ "worktreeId"
3318
+ ],
3319
+ "additionalProperties": false
3320
+ }
3321
+ }
3322
+ }
3323
+ }
3324
+ }
3325
+ },
3326
+ "/follow.discardOld": {
3327
+ "post": {
3328
+ "operationId": "follow.discardOld",
3329
+ "description": "Removes the old copy and its files. Refused unless `confirm` is true, and for a diverged copy unless `discardChanges` is true too.",
3330
+ "tags": [
3331
+ "follow"
3332
+ ],
3333
+ "responses": {
3334
+ "200": {
3335
+ "description": "Successful response",
3336
+ "content": {
3337
+ "application/json": {
3338
+ "schema": {
3339
+ "type": "object",
3340
+ "properties": {
3341
+ "result": {
3342
+ "type": "object",
3343
+ "properties": {
3344
+ "data": {
3345
+ "type": "object",
3346
+ "properties": {
3347
+ "ok": {
3348
+ "type": "boolean",
3349
+ "const": true
3350
+ }
3351
+ },
3352
+ "required": [
3353
+ "ok"
3354
+ ],
3355
+ "additionalProperties": false
3356
+ }
3357
+ },
3358
+ "required": [
3359
+ "data"
3360
+ ]
3361
+ }
3362
+ },
3363
+ "required": [
3364
+ "result"
3365
+ ]
3366
+ }
3367
+ }
3368
+ }
3369
+ },
3370
+ "default": {
3371
+ "$ref": "#/components/responses/Error"
3372
+ }
3373
+ },
3374
+ "requestBody": {
3375
+ "required": true,
3376
+ "content": {
3377
+ "application/json": {
3378
+ "schema": {
3379
+ "type": "object",
3380
+ "properties": {
3381
+ "worktreeId": {
3382
+ "type": "string"
3383
+ },
3384
+ "confirm": {
3385
+ "type": "boolean"
3386
+ },
3387
+ "discardChanges": {
3388
+ "type": "boolean"
3389
+ }
3390
+ },
3391
+ "required": [
3392
+ "worktreeId",
3393
+ "confirm"
3394
+ ],
3395
+ "additionalProperties": false
3396
+ }
3397
+ }
3398
+ }
3399
+ }
3400
+ }
3401
+ },
3402
+ "/runners.list": {
3403
+ "get": {
3404
+ "operationId": "runners.list",
3405
+ "tags": [
3406
+ "runners"
3407
+ ],
3408
+ "responses": {
3409
+ "200": {
3410
+ "description": "Successful response",
3411
+ "content": {
3412
+ "application/json": {
3413
+ "schema": {
3414
+ "type": "object",
3415
+ "properties": {
3416
+ "result": {
3417
+ "type": "object",
3418
+ "properties": {
3419
+ "data": {
3420
+ "type": "object",
3421
+ "properties": {
3422
+ "runs": {
3423
+ "type": "array",
3424
+ "items": {
3425
+ "$ref": "#/components/schemas/RunnerRun"
3426
+ }
3427
+ },
3428
+ "runners": {
3429
+ "type": "array",
3430
+ "items": {
3431
+ "$ref": "#/components/schemas/RunnerView"
3432
+ }
3433
+ },
3434
+ "errors": {
3435
+ "type": "array",
3436
+ "items": {
3437
+ "type": "string"
3438
+ }
3439
+ }
3440
+ },
3441
+ "required": [
3442
+ "runs",
3443
+ "runners",
3444
+ "errors"
3445
+ ],
3446
+ "additionalProperties": false
3447
+ }
3448
+ },
3449
+ "required": [
3450
+ "data"
3451
+ ]
3452
+ }
3453
+ },
3454
+ "required": [
3455
+ "result"
3456
+ ]
3457
+ }
3458
+ }
3459
+ }
3460
+ },
3461
+ "default": {
3462
+ "$ref": "#/components/responses/Error"
3463
+ }
3464
+ }
3465
+ }
3466
+ },
3467
+ "/runners.snapshots": {
3468
+ "get": {
3469
+ "operationId": "runners.snapshots",
3470
+ "description": "The machine snapshots the hub holds, newest first (plan step 3.10).",
3471
+ "tags": [
3472
+ "runners"
3473
+ ],
3474
+ "responses": {
3475
+ "200": {
3476
+ "description": "Successful response",
3477
+ "content": {
3478
+ "application/json": {
3479
+ "schema": {
3480
+ "type": "object",
3481
+ "properties": {
3482
+ "result": {
3483
+ "type": "object",
3484
+ "properties": {
3485
+ "data": {
3486
+ "type": "object",
3487
+ "properties": {
3488
+ "snapshots": {
3489
+ "type": "array",
3490
+ "items": {
3491
+ "type": "object",
3492
+ "properties": {
3493
+ "id": {
3494
+ "type": "string"
3495
+ },
3496
+ "runnerId": {
3497
+ "type": "string"
3498
+ },
3499
+ "hostId": {
3500
+ "type": "string"
3501
+ },
3502
+ "worktreeIds": {
3503
+ "type": "array",
3504
+ "items": {
3505
+ "type": "string"
3506
+ }
3507
+ },
3508
+ "snapshotId": {
3509
+ "type": "string"
3510
+ },
3511
+ "sizeBytes": {
3512
+ "type": [
3513
+ "number",
3514
+ "null"
3515
+ ]
3516
+ },
3517
+ "restoredAt": {
3518
+ "type": [
3519
+ "number",
3520
+ "null"
3521
+ ]
3522
+ },
3523
+ "createdAt": {
3524
+ "type": "number"
3525
+ },
3526
+ "expiresAt": {
3527
+ "type": "number"
3528
+ }
3529
+ },
3530
+ "required": [
3531
+ "id",
3532
+ "runnerId",
3533
+ "hostId",
3534
+ "worktreeIds",
3535
+ "snapshotId",
3536
+ "sizeBytes",
3537
+ "restoredAt",
3538
+ "createdAt",
3539
+ "expiresAt"
3540
+ ],
3541
+ "additionalProperties": false
3542
+ }
3543
+ }
3544
+ },
3545
+ "required": [
3546
+ "snapshots"
3547
+ ],
3548
+ "additionalProperties": false
3549
+ }
3550
+ },
3551
+ "required": [
3552
+ "data"
3553
+ ]
3554
+ }
3555
+ },
3556
+ "required": [
3557
+ "result"
3558
+ ]
3559
+ }
3560
+ }
3561
+ }
3562
+ },
3563
+ "default": {
3564
+ "$ref": "#/components/responses/Error"
3565
+ }
3566
+ }
3567
+ }
3568
+ },
3569
+ "/runners.log": {
3570
+ "get": {
3571
+ "operationId": "runners.log",
3572
+ "description": "The hook output of a host request, as the hub logged it (tokens removed).",
3573
+ "tags": [
3574
+ "runners"
3575
+ ],
3576
+ "responses": {
3577
+ "200": {
3578
+ "description": "Successful response",
3579
+ "content": {
3580
+ "application/json": {
3581
+ "schema": {
3582
+ "type": "object",
3583
+ "properties": {
3584
+ "result": {
3585
+ "type": "object",
3586
+ "properties": {
3587
+ "data": {
3588
+ "type": "object",
3589
+ "properties": {
3590
+ "log": {
3591
+ "type": [
3592
+ "string",
3593
+ "null"
3594
+ ]
3595
+ }
3596
+ },
3597
+ "required": [
3598
+ "log"
3599
+ ],
3600
+ "additionalProperties": false
3601
+ }
3602
+ },
3603
+ "required": [
3604
+ "data"
3605
+ ]
3606
+ }
3607
+ },
3608
+ "required": [
3609
+ "result"
3610
+ ]
3611
+ }
3612
+ }
3613
+ }
3614
+ },
3615
+ "default": {
3616
+ "$ref": "#/components/responses/Error"
3617
+ }
3618
+ },
3619
+ "parameters": [
3620
+ {
3621
+ "name": "input",
3622
+ "in": "query",
3623
+ "required": true,
3624
+ "style": "deepObject",
3625
+ "content": {
3626
+ "application/json": {
3627
+ "schema": {
3628
+ "type": "object",
3629
+ "properties": {
3630
+ "requestId": {
3631
+ "type": "string"
3632
+ }
3633
+ },
3634
+ "required": [
3635
+ "requestId"
3636
+ ],
3637
+ "additionalProperties": false
3638
+ }
3639
+ }
3640
+ }
3641
+ }
3642
+ ]
3643
+ }
3644
+ },
3645
+ "/runners.machines": {
3646
+ "get": {
3647
+ "operationId": "runners.machines",
3648
+ "description": "The machines the runners started, newest first, with the state the reaper keeps them in.",
3649
+ "tags": [
3650
+ "runners"
3651
+ ],
3652
+ "responses": {
3653
+ "200": {
3654
+ "description": "Successful response",
3655
+ "content": {
3656
+ "application/json": {
3657
+ "schema": {
3658
+ "type": "object",
3659
+ "properties": {
3660
+ "result": {
3661
+ "type": "object",
3662
+ "properties": {
3663
+ "data": {
3664
+ "type": "object",
3665
+ "properties": {
3666
+ "machines": {
3667
+ "type": "array",
3668
+ "items": {
3669
+ "$ref": "#/components/schemas/MachineView"
3670
+ }
2377
3671
  }
2378
3672
  },
2379
3673
  "required": [
@@ -8539,6 +9833,9 @@
8539
9833
  "gui",
8540
9834
  "tui"
8541
9835
  ]
9836
+ },
9837
+ "crossHostWorktrees": {
9838
+ "type": "boolean"
8542
9839
  }
8543
9840
  },
8544
9841
  "additionalProperties": {}
@@ -8764,6 +10061,41 @@
8764
10061
  ],
8765
10062
  "description": "The host whose default-branch checkout is listed as a worktree, once one is known."
8766
10063
  },
10064
+ "mainMissing": {
10065
+ "oneOf": [
10066
+ {
10067
+ "type": "object",
10068
+ "properties": {
10069
+ "hostId": {
10070
+ "type": "string"
10071
+ }
10072
+ },
10073
+ "required": [
10074
+ "hostId"
10075
+ ],
10076
+ "additionalProperties": false
10077
+ },
10078
+ {
10079
+ "type": "null"
10080
+ }
10081
+ ],
10082
+ "description": "Set when no host lists a default-branch checkout: the primary host, whose clone is not on it."
10083
+ },
10084
+ "checkpointsEnabled": {
10085
+ "type": "boolean",
10086
+ "description": "Whether the hub keeps checkpoints of this repo's worktrees (the stored choice, else the default)."
10087
+ },
10088
+ "checkpointsSetting": {
10089
+ "type": [
10090
+ "boolean",
10091
+ "null"
10092
+ ],
10093
+ "description": "The stored choice, or null when the repo follows the default."
10094
+ },
10095
+ "autoContinue": {
10096
+ "type": "boolean",
10097
+ "description": "Whether a worktree whose host is offline continues on another host without asking."
10098
+ },
8767
10099
  "avatar": {
8768
10100
  "oneOf": [
8769
10101
  {
@@ -8811,6 +10143,23 @@
8811
10143
  ],
8812
10144
  "description": "Set while the worktree's ephemeral worker has exited (`sleeping`) or is coming back (`waking`)."
8813
10145
  },
10146
+ "supersededBy": {
10147
+ "type": "string",
10148
+ "description": "Set when this copy was restored on another host. The value is the replacement's worktree id."
10149
+ },
10150
+ "continuedFrom": {
10151
+ "$ref": "#/components/schemas/ContinuedFrom"
10152
+ },
10153
+ "divergence": {
10154
+ "$ref": "#/components/schemas/Divergence"
10155
+ },
10156
+ "lastCheckpointAt": {
10157
+ "type": [
10158
+ "number",
10159
+ "null"
10160
+ ],
10161
+ "description": "When the hub took the newest checkpoint of this worktree, or null when it has none."
10162
+ },
8814
10163
  "worktreeId": {
8815
10164
  "type": "string"
8816
10165
  },
@@ -8848,6 +10197,7 @@
8848
10197
  "branch",
8849
10198
  "path",
8850
10199
  "pinned",
10200
+ "lastCheckpointAt",
8851
10201
  "worktreeId",
8852
10202
  "agent",
8853
10203
  "origin",
@@ -8868,6 +10218,10 @@
8868
10218
  "meta",
8869
10219
  "allowedHostIds",
8870
10220
  "primaryHostId",
10221
+ "mainMissing",
10222
+ "checkpointsEnabled",
10223
+ "checkpointsSetting",
10224
+ "autoContinue",
8871
10225
  "avatar",
8872
10226
  "worktrees"
8873
10227
  ],
@@ -9037,7 +10391,42 @@
9037
10391
  "type": "object",
9038
10392
  "properties": {
9039
10393
  "data": {
9040
- "$ref": "#/components/schemas/RepoState"
10394
+ "allOf": [
10395
+ {
10396
+ "$ref": "#/components/schemas/RepoState"
10397
+ },
10398
+ {
10399
+ "type": "object",
10400
+ "properties": {
10401
+ "existed": {
10402
+ "type": "boolean",
10403
+ "const": true
10404
+ },
10405
+ "clone": {
10406
+ "type": "object",
10407
+ "properties": {
10408
+ "hostId": {
10409
+ "type": "string"
10410
+ },
10411
+ "hostName": {
10412
+ "type": "string"
10413
+ },
10414
+ "path": {
10415
+ "type": "string"
10416
+ }
10417
+ },
10418
+ "required": [
10419
+ "hostId",
10420
+ "hostName",
10421
+ "path"
10422
+ ],
10423
+ "additionalProperties": false
10424
+ }
10425
+ },
10426
+ "additionalProperties": false
10427
+ }
10428
+ ],
10429
+ "description": "What `addFromWorker` answers: the repo, plus the clone it registered when the repo already existed."
9041
10430
  }
9042
10431
  },
9043
10432
  "required": [
@@ -9614,7 +11003,7 @@
9614
11003
  "/repos.update": {
9615
11004
  "post": {
9616
11005
  "operationId": "repos.update",
9617
- "description": "Changes a repo's settings: `meta` (whether it is a meta repo), `allowedHostIds` (the hosts it\nmay run on, `null` for all) and `primaryHostId` (the host that lists its default branch,\n`null` to let the hub pick). Changing the host policy is an admin call.",
11006
+ "description": "Changes a repo's settings: `meta` (whether it is a meta repo), `allowedHostIds` (the hosts it\nmay run on, `null` for all) and `primaryHostId` (the host that lists its default branch,\n`null` to let the hub pick) and `checkpointsEnabled` (whether the hub keeps checkpoints, `null` for the default) and `autoContinue` (whether a worktree on an offline host continues elsewhere without asking, `null` for off). Changing the host policy, the checkpoint setting or auto-continue is an admin call.",
9618
11007
  "tags": [
9619
11008
  "repos"
9620
11009
  ],
@@ -9689,6 +11078,18 @@
9689
11078
  "string",
9690
11079
  "null"
9691
11080
  ]
11081
+ },
11082
+ "checkpointsEnabled": {
11083
+ "type": [
11084
+ "boolean",
11085
+ "null"
11086
+ ]
11087
+ },
11088
+ "autoContinue": {
11089
+ "type": [
11090
+ "boolean",
11091
+ "null"
11092
+ ]
9692
11093
  }
9693
11094
  },
9694
11095
  "required": [
@@ -14934,7 +16335,50 @@
14934
16335
  "type": "object",
14935
16336
  "properties": {
14936
16337
  "data": {
14937
- "$ref": "#/components/schemas/result"
16338
+ "oneOf": [
16339
+ {
16340
+ "$ref": "#/components/schemas/result"
16341
+ },
16342
+ {
16343
+ "type": "object",
16344
+ "properties": {
16345
+ "worktreeId": {
16346
+ "type": "string"
16347
+ },
16348
+ "continued": {
16349
+ "$ref": "#/components/schemas/ContinuedFrom"
16350
+ },
16351
+ "agentSession": {
16352
+ "$ref": "#/components/schemas/AgentSessionRecord"
16353
+ },
16354
+ "mode": {
16355
+ "type": "string",
16356
+ "enum": [
16357
+ "gui",
16358
+ "tui"
16359
+ ],
16360
+ "description": "Agent session types shared by the server and the dashboard (issue #682).\n\nAn agent session is one run of a coding agent. Its `mode` says how it is\ndisplayed: `gui` in a chat pane, `tui` as the agent's CLI in a terminal.\nThe mode is fixed for the life of the session."
16361
+ },
16362
+ "chatId": {
16363
+ "type": "string"
16364
+ },
16365
+ "terminalId": {
16366
+ "type": "string"
16367
+ },
16368
+ "notice": {
16369
+ "type": "string",
16370
+ "description": "Why the requested mode wasn't used, e.g. an agent without a TUI invocation."
16371
+ }
16372
+ },
16373
+ "required": [
16374
+ "worktreeId",
16375
+ "continued",
16376
+ "agentSession",
16377
+ "mode"
16378
+ ],
16379
+ "additionalProperties": false
16380
+ }
16381
+ ]
14938
16382
  }
14939
16383
  },
14940
16384
  "required": [
@@ -17392,31 +18836,90 @@
17392
18836
  "tool": {
17393
18837
  "type": "string"
17394
18838
  },
17395
- "installed": {
17396
- "type": "boolean"
18839
+ "installed": {
18840
+ "type": "boolean"
18841
+ },
18842
+ "version": {
18843
+ "type": [
18844
+ "string",
18845
+ "null"
18846
+ ]
18847
+ },
18848
+ "loggedIn": {
18849
+ "type": [
18850
+ "boolean",
18851
+ "null"
18852
+ ]
18853
+ },
18854
+ "fix": {
18855
+ "type": "string"
18856
+ }
18857
+ },
18858
+ "required": [
18859
+ "tool",
18860
+ "installed",
18861
+ "version",
18862
+ "loggedIn",
18863
+ "fix"
18864
+ ],
18865
+ "additionalProperties": false
18866
+ },
18867
+ "AgentHostView": {
18868
+ "type": "object",
18869
+ "properties": {
18870
+ "id": {
18871
+ "type": "string"
18872
+ },
18873
+ "name": {
18874
+ "type": "string"
18875
+ },
18876
+ "status": {
18877
+ "type": "string"
18878
+ },
18879
+ "mode": {
18880
+ "type": "string"
17397
18881
  },
17398
- "version": {
18882
+ "os": {
17399
18883
  "type": [
17400
18884
  "string",
17401
18885
  "null"
17402
18886
  ]
17403
18887
  },
17404
- "loggedIn": {
18888
+ "arch": {
17405
18889
  "type": [
17406
- "boolean",
18890
+ "string",
17407
18891
  "null"
17408
18892
  ]
17409
18893
  },
17410
- "fix": {
17411
- "type": "string"
18894
+ "agents": {
18895
+ "type": "array",
18896
+ "items": {
18897
+ "type": "string"
18898
+ }
18899
+ },
18900
+ "capabilities": {
18901
+ "type": "array",
18902
+ "items": {
18903
+ "type": "string"
18904
+ }
18905
+ },
18906
+ "labels": {
18907
+ "type": "array",
18908
+ "items": {
18909
+ "type": "string"
18910
+ }
17412
18911
  }
17413
18912
  },
17414
18913
  "required": [
17415
- "tool",
17416
- "installed",
17417
- "version",
17418
- "loggedIn",
17419
- "fix"
18914
+ "id",
18915
+ "name",
18916
+ "status",
18917
+ "mode",
18918
+ "os",
18919
+ "arch",
18920
+ "agents",
18921
+ "capabilities",
18922
+ "labels"
17420
18923
  ],
17421
18924
  "additionalProperties": false
17422
18925
  },
@@ -17964,17 +19467,492 @@
17964
19467
  }
17965
19468
  ]
17966
19469
  },
17967
- "issues": {
19470
+ "issues": {
19471
+ "type": "array",
19472
+ "items": {
19473
+ "$ref": "#/components/schemas/EnvironmentIssue"
19474
+ }
19475
+ }
19476
+ },
19477
+ "required": [
19478
+ "source",
19479
+ "environment",
19480
+ "issues"
19481
+ ],
19482
+ "additionalProperties": false
19483
+ },
19484
+ "CheckpointView": {
19485
+ "type": "object",
19486
+ "properties": {
19487
+ "id": {
19488
+ "type": "string"
19489
+ },
19490
+ "worktreeId": {
19491
+ "type": "string"
19492
+ },
19493
+ "hostId": {
19494
+ "type": "string"
19495
+ },
19496
+ "branch": {
19497
+ "type": "string"
19498
+ },
19499
+ "baseSha": {
19500
+ "type": "string"
19501
+ },
19502
+ "snapshotSha": {
19503
+ "type": "string"
19504
+ },
19505
+ "dirty": {
19506
+ "type": "boolean",
19507
+ "description": "Whether the working tree differed from the branch head."
19508
+ },
19509
+ "sizeBytes": {
19510
+ "type": "number"
19511
+ },
19512
+ "trigger": {
19513
+ "type": "string",
19514
+ "enum": [
19515
+ "move",
19516
+ "turn",
19517
+ "quiet",
19518
+ "shutdown",
19519
+ "manual"
19520
+ ]
19521
+ },
19522
+ "createdAt": {
19523
+ "type": "number"
19524
+ },
19525
+ "sessions": {
19526
+ "type": "number"
19527
+ }
19528
+ },
19529
+ "required": [
19530
+ "id",
19531
+ "worktreeId",
19532
+ "hostId",
19533
+ "branch",
19534
+ "baseSha",
19535
+ "snapshotSha",
19536
+ "dirty",
19537
+ "sizeBytes",
19538
+ "trigger",
19539
+ "createdAt",
19540
+ "sessions"
19541
+ ],
19542
+ "additionalProperties": false
19543
+ },
19544
+ "ChangedFile": {
19545
+ "type": "object",
19546
+ "properties": {
19547
+ "path": {
19548
+ "type": "string"
19549
+ },
19550
+ "status": {
19551
+ "type": "string"
19552
+ },
19553
+ "additions": {
19554
+ "type": [
19555
+ "number",
19556
+ "null"
19557
+ ]
19558
+ },
19559
+ "deletions": {
19560
+ "type": [
19561
+ "number",
19562
+ "null"
19563
+ ]
19564
+ }
19565
+ },
19566
+ "required": [
19567
+ "path",
19568
+ "status",
19569
+ "additions",
19570
+ "deletions"
19571
+ ],
19572
+ "additionalProperties": false
19573
+ },
19574
+ "RestoreResult": {
19575
+ "type": "object",
19576
+ "properties": {
19577
+ "worktreeId": {
19578
+ "type": "string",
19579
+ "description": "The worktree on the target host."
19580
+ },
19581
+ "hostId": {
19582
+ "type": "string"
19583
+ },
19584
+ "supersededId": {
19585
+ "type": "string",
19586
+ "description": "The worktree it replaced, marked superseded. Absent when a move removed it."
19587
+ },
19588
+ "sourceRemoved": {
19589
+ "type": "boolean",
19590
+ "description": "For a move: whether the source worktree was removed."
19591
+ },
19592
+ "warning": {
19593
+ "type": "string",
19594
+ "description": "For a move whose source could not be removed."
19595
+ },
19596
+ "checkpointId": {
19597
+ "type": "string"
19598
+ },
19599
+ "chatIds": {
19600
+ "type": "array",
19601
+ "items": {
19602
+ "type": "string"
19603
+ },
19604
+ "description": "The chats that now belong to the new worktree."
19605
+ }
19606
+ },
19607
+ "required": [
19608
+ "worktreeId",
19609
+ "hostId",
19610
+ "checkpointId",
19611
+ "chatIds"
19612
+ ],
19613
+ "additionalProperties": false
19614
+ },
19615
+ "EvacuateResult": {
19616
+ "type": "object",
19617
+ "properties": {
19618
+ "fromHostId": {
19619
+ "type": "string"
19620
+ },
19621
+ "toHostId": {
19622
+ "type": "string"
19623
+ },
19624
+ "results": {
19625
+ "type": "array",
19626
+ "items": {
19627
+ "type": "object",
19628
+ "properties": {
19629
+ "worktreeId": {
19630
+ "type": "string"
19631
+ },
19632
+ "ok": {
19633
+ "type": "boolean"
19634
+ },
19635
+ "newWorktreeId": {
19636
+ "type": "string"
19637
+ },
19638
+ "mode": {
19639
+ "type": "string",
19640
+ "enum": [
19641
+ "restore",
19642
+ "move"
19643
+ ]
19644
+ },
19645
+ "error": {
19646
+ "type": "string"
19647
+ }
19648
+ },
19649
+ "required": [
19650
+ "worktreeId",
19651
+ "ok"
19652
+ ],
19653
+ "additionalProperties": false
19654
+ }
19655
+ }
19656
+ },
19657
+ "required": [
19658
+ "fromHostId",
19659
+ "toHostId",
19660
+ "results"
19661
+ ],
19662
+ "additionalProperties": false
19663
+ },
19664
+ "ContinueOffer": {
19665
+ "type": "object",
19666
+ "properties": {
19667
+ "worktreeId": {
19668
+ "type": "string"
19669
+ },
19670
+ "repo": {
19671
+ "type": "string"
19672
+ },
19673
+ "fromHostId": {
19674
+ "type": "string"
19675
+ },
19676
+ "fromHostName": {
19677
+ "type": "string"
19678
+ },
19679
+ "blocked": {
19680
+ "type": "object",
19681
+ "properties": {
19682
+ "reason": {
19683
+ "type": "string",
19684
+ "enum": [
19685
+ "restricted-to-offline-host",
19686
+ "checkpoints-off",
19687
+ "no-checkpoint",
19688
+ "no-online-host",
19689
+ "agent-unavailable",
19690
+ "already-continued",
19691
+ "not-offline"
19692
+ ]
19693
+ },
19694
+ "message": {
19695
+ "type": "string"
19696
+ }
19697
+ },
19698
+ "required": [
19699
+ "reason",
19700
+ "message"
19701
+ ],
19702
+ "additionalProperties": false,
19703
+ "description": "Set when the work cannot continue, with a message that says why and what to do."
19704
+ },
19705
+ "checkpointId": {
19706
+ "type": "string"
19707
+ },
19708
+ "checkpointAt": {
19709
+ "type": "number"
19710
+ },
19711
+ "checkpointAgeMs": {
19712
+ "type": "number",
19713
+ "description": "Age of the checkpoint in ms, at the time of the offer."
19714
+ },
19715
+ "targets": {
19716
+ "type": "array",
19717
+ "items": {
19718
+ "$ref": "#/components/schemas/ContinueTarget"
19719
+ }
19720
+ },
19721
+ "question": {
19722
+ "type": "string",
19723
+ "description": "The message the prompt shows."
19724
+ },
19725
+ "limits": {
19726
+ "type": "array",
19727
+ "items": {
19728
+ "type": "string"
19729
+ },
19730
+ "description": "What will not carry over."
19731
+ },
19732
+ "willRun": {
19733
+ "type": "array",
19734
+ "items": {
19735
+ "type": "string"
19736
+ },
19737
+ "description": "What runs on the new copy, such as the repo's setup."
19738
+ },
19739
+ "fresh": {
19740
+ "type": "boolean",
19741
+ "description": "The checkpoint is young enough that the repo would continue without asking, were it set to."
19742
+ }
19743
+ },
19744
+ "required": [
19745
+ "worktreeId",
19746
+ "repo",
19747
+ "fromHostId",
19748
+ "fromHostName",
19749
+ "targets",
19750
+ "question",
19751
+ "limits",
19752
+ "willRun",
19753
+ "fresh"
19754
+ ],
19755
+ "additionalProperties": false
19756
+ },
19757
+ "ContinueTarget": {
19758
+ "type": "object",
19759
+ "properties": {
19760
+ "hostId": {
19761
+ "type": "string"
19762
+ },
19763
+ "hostName": {
19764
+ "type": "string"
19765
+ },
19766
+ "hasClone": {
19767
+ "type": "boolean",
19768
+ "description": "The repo already has a clone on this host."
19769
+ },
19770
+ "agentReady": {
19771
+ "type": "boolean",
19772
+ "description": "The worktree's agent can start on this host."
19773
+ },
19774
+ "agentProblem": {
19775
+ "type": "string",
19776
+ "description": "Why the agent cannot start, when it cannot."
19777
+ },
19778
+ "load": {
19779
+ "type": "number",
19780
+ "description": "Worktrees already on the host, the \"least busy\" measure."
19781
+ },
19782
+ "recommended": {
19783
+ "type": "boolean",
19784
+ "description": "The host the hub would choose."
19785
+ }
19786
+ },
19787
+ "required": [
19788
+ "hostId",
19789
+ "hostName",
19790
+ "hasClone",
19791
+ "agentReady",
19792
+ "load",
19793
+ "recommended"
19794
+ ],
19795
+ "additionalProperties": false
19796
+ },
19797
+ "ContinueResult": {
19798
+ "type": "object",
19799
+ "properties": {
19800
+ "worktreeId": {
19801
+ "type": "string"
19802
+ },
19803
+ "hostId": {
19804
+ "type": "string"
19805
+ },
19806
+ "hostName": {
19807
+ "type": "string"
19808
+ },
19809
+ "continuedFrom": {
19810
+ "$ref": "#/components/schemas/ContinuedFrom"
19811
+ },
19812
+ "chatIds": {
17968
19813
  "type": "array",
17969
19814
  "items": {
17970
- "$ref": "#/components/schemas/EnvironmentIssue"
19815
+ "type": "string"
17971
19816
  }
17972
19817
  }
17973
19818
  },
17974
19819
  "required": [
17975
- "source",
17976
- "environment",
17977
- "issues"
19820
+ "worktreeId",
19821
+ "hostId",
19822
+ "hostName",
19823
+ "continuedFrom",
19824
+ "chatIds"
19825
+ ],
19826
+ "additionalProperties": false
19827
+ },
19828
+ "ContinuedFrom": {
19829
+ "type": "object",
19830
+ "properties": {
19831
+ "fromHostId": {
19832
+ "type": "string",
19833
+ "description": "The host the work came from, which was offline."
19834
+ },
19835
+ "fromWorktreeId": {
19836
+ "type": "string",
19837
+ "description": "The id of the copy that stays behind, superseded."
19838
+ },
19839
+ "toHostId": {
19840
+ "type": "string",
19841
+ "description": "The host the work continues on."
19842
+ },
19843
+ "checkpointId": {
19844
+ "type": "string",
19845
+ "description": "The checkpoint the new copy was restored from."
19846
+ },
19847
+ "reason": {
19848
+ "type": "string",
19849
+ "enum": [
19850
+ "manual",
19851
+ "auto"
19852
+ ],
19853
+ "description": "Why a worktree was continued: a person accepted the offer, or the repo continues by itself."
19854
+ },
19855
+ "at": {
19856
+ "type": "number",
19857
+ "description": "Epoch ms of the continuation."
19858
+ },
19859
+ "checkpointAt": {
19860
+ "type": "number",
19861
+ "description": "Epoch ms of the checkpoint, so the UI can say how old the work was."
19862
+ }
19863
+ },
19864
+ "required": [
19865
+ "fromHostId",
19866
+ "fromWorktreeId",
19867
+ "toHostId",
19868
+ "checkpointId",
19869
+ "reason",
19870
+ "at",
19871
+ "checkpointAt"
19872
+ ],
19873
+ "additionalProperties": false
19874
+ },
19875
+ "DivergenceReport": {
19876
+ "type": "object",
19877
+ "properties": {
19878
+ "worktreeId": {
19879
+ "type": "string"
19880
+ },
19881
+ "replacementId": {
19882
+ "type": "string",
19883
+ "description": "The copy that replaced this one."
19884
+ },
19885
+ "state": {
19886
+ "type": "string",
19887
+ "enum": [
19888
+ "clean",
19889
+ "diverged",
19890
+ "resolved"
19891
+ ],
19892
+ "description": "What the old host's copy holds once the host is back. `clean` means its files are the ones the\ncheckpoint holds. `diverged` means it has changes the continuation did not carry. `resolved`\nmeans a person brought them over."
19893
+ },
19894
+ "files": {
19895
+ "type": "array",
19896
+ "items": {
19897
+ "$ref": "#/components/schemas/ChangedFile"
19898
+ }
19899
+ },
19900
+ "hostOnline": {
19901
+ "type": "boolean",
19902
+ "description": "False when the old copy's host is offline, so nothing could be compared."
19903
+ },
19904
+ "checkedAt": {
19905
+ "type": [
19906
+ "number",
19907
+ "null"
19908
+ ]
19909
+ }
19910
+ },
19911
+ "required": [
19912
+ "worktreeId",
19913
+ "replacementId",
19914
+ "state",
19915
+ "files",
19916
+ "hostOnline",
19917
+ "checkedAt"
19918
+ ],
19919
+ "additionalProperties": false
19920
+ },
19921
+ "BringOverResult": {
19922
+ "type": "object",
19923
+ "properties": {
19924
+ "applied": {
19925
+ "type": "boolean"
19926
+ },
19927
+ "files": {
19928
+ "type": "number",
19929
+ "description": "The files the patch changed on the new copy."
19930
+ },
19931
+ "conflicts": {
19932
+ "type": "array",
19933
+ "items": {
19934
+ "type": "object",
19935
+ "properties": {
19936
+ "path": {
19937
+ "type": "string"
19938
+ },
19939
+ "message": {
19940
+ "type": "string"
19941
+ }
19942
+ },
19943
+ "required": [
19944
+ "path",
19945
+ "message"
19946
+ ],
19947
+ "additionalProperties": false
19948
+ },
19949
+ "description": "Set when the patch does not apply cleanly. Nothing was changed."
19950
+ }
19951
+ },
19952
+ "required": [
19953
+ "applied",
19954
+ "files",
19955
+ "conflicts"
17978
19956
  ],
17979
19957
  "additionalProperties": false
17980
19958
  },
@@ -19078,8 +21056,8 @@
19078
21056
  "enum": [
19079
21057
  "unknown",
19080
21058
  "dirty",
19081
- "draft",
19082
21059
  "clean",
21060
+ "draft",
19083
21061
  "unstable",
19084
21062
  "has_hooks",
19085
21063
  "blocked",
@@ -19162,9 +21140,9 @@
19162
21140
  "running",
19163
21141
  "cancelled",
19164
21142
  "pending",
21143
+ "skipped",
19165
21144
  "success",
19166
21145
  "failure",
19167
- "skipped",
19168
21146
  "neutral"
19169
21147
  ],
19170
21148
  "description": "The state of one check or CI job."
@@ -19345,6 +21323,10 @@
19345
21323
  "gui",
19346
21324
  "tui"
19347
21325
  ]
21326
+ },
21327
+ "crossHostWorktrees": {
21328
+ "type": "boolean",
21329
+ "description": "Agents on a worker may start worktrees on other hosts. On unless false."
19348
21330
  }
19349
21331
  },
19350
21332
  "additionalProperties": {},
@@ -19574,6 +21556,42 @@
19574
21556
  ],
19575
21557
  "additionalProperties": false
19576
21558
  },
21559
+ "Divergence": {
21560
+ "type": "object",
21561
+ "properties": {
21562
+ "state": {
21563
+ "type": "string",
21564
+ "enum": [
21565
+ "clean",
21566
+ "diverged",
21567
+ "resolved"
21568
+ ],
21569
+ "description": "What the old host's copy holds once the host is back. `clean` means its files are the ones the\ncheckpoint holds. `diverged` means it has changes the continuation did not carry. `resolved`\nmeans a person brought them over."
21570
+ },
21571
+ "checkedAt": {
21572
+ "type": "number",
21573
+ "description": "Epoch ms of the last comparison."
21574
+ },
21575
+ "checkpointId": {
21576
+ "type": "string",
21577
+ "description": "The checkpoint the comparison used."
21578
+ },
21579
+ "files": {
21580
+ "type": "number",
21581
+ "description": "How many files differ. Absent when unknown."
21582
+ },
21583
+ "treeSha": {
21584
+ "type": "string",
21585
+ "description": "The tree of the old copy when it was compared, so a `resolved` verdict holds until the copy changes again."
21586
+ }
21587
+ },
21588
+ "required": [
21589
+ "state",
21590
+ "checkedAt",
21591
+ "checkpointId"
21592
+ ],
21593
+ "additionalProperties": false
21594
+ },
19577
21595
  "WorktreeOriginInfo": {
19578
21596
  "type": "object",
19579
21597
  "properties": {
@@ -19660,6 +21678,14 @@
19660
21678
  "primaryHostId": {
19661
21679
  "type": "string",
19662
21680
  "description": "The host whose default-branch checkout is listed as a worktree. Read-only here: `setHostPolicy` writes it."
21681
+ },
21682
+ "checkpointsEnabled": {
21683
+ "type": "boolean",
21684
+ "description": "Whether the hub keeps checkpoints of the repo's worktrees; absent means the default. Read-only here: `setCheckpointsEnabled` writes it."
21685
+ },
21686
+ "autoContinue": {
21687
+ "type": "boolean",
21688
+ "description": "Whether an offline host's worktrees continue elsewhere without asking. Read-only here: `setAutoContinue` writes it."
19663
21689
  }
19664
21690
  },
19665
21691
  "required": [
@@ -19702,6 +21728,16 @@
19702
21728
  },
19703
21729
  "origin": {
19704
21730
  "$ref": "#/components/schemas/WorktreeOrigin"
21731
+ },
21732
+ "supersededBy": {
21733
+ "type": "string",
21734
+ "description": "The id of the worktree that replaced this one when it was restored on another host. The copy\nstays on its host untouched. Read-only here: `saveAll` keeps what the database holds, and\n`RepoQueries.setSupersededBy` writes it."
21735
+ },
21736
+ "continuedFrom": {
21737
+ "$ref": "#/components/schemas/ContinuedFrom"
21738
+ },
21739
+ "divergence": {
21740
+ "$ref": "#/components/schemas/Divergence"
19705
21741
  }
19706
21742
  },
19707
21743
  "required": [
@@ -21401,6 +23437,30 @@
21401
23437
  "httpStatus"
21402
23438
  ],
21403
23439
  "additionalProperties": false
23440
+ },
23441
+ "HostOfflineAnswer": {
23442
+ "type": "object",
23443
+ "properties": {
23444
+ "code": {
23445
+ "type": "string",
23446
+ "enum": [
23447
+ "HOST_OFFLINE",
23448
+ "CONTINUE_NOT_POSSIBLE"
23449
+ ]
23450
+ },
23451
+ "error": {
23452
+ "type": "string"
23453
+ },
23454
+ "offer": {
23455
+ "$ref": "#/components/schemas/ContinueOffer"
23456
+ }
23457
+ },
23458
+ "required": [
23459
+ "code",
23460
+ "error",
23461
+ "offer"
23462
+ ],
23463
+ "additionalProperties": false
21404
23464
  }
21405
23465
  },
21406
23466
  "responses": {
@@ -21504,6 +23564,91 @@
21504
23564
  "code"
21505
23565
  ],
21506
23566
  "additionalProperties": false
23567
+ },
23568
+ {
23569
+ "type": "object",
23570
+ "properties": {
23571
+ "data": {
23572
+ "type": "object",
23573
+ "properties": {
23574
+ "hostOffline": {
23575
+ "$ref": "#/components/schemas/HostOfflineAnswer"
23576
+ },
23577
+ "code": {
23578
+ "type": "string",
23579
+ "enum": [
23580
+ "PARSE_ERROR",
23581
+ "BAD_REQUEST",
23582
+ "INTERNAL_SERVER_ERROR",
23583
+ "NOT_IMPLEMENTED",
23584
+ "BAD_GATEWAY",
23585
+ "SERVICE_UNAVAILABLE",
23586
+ "GATEWAY_TIMEOUT",
23587
+ "UNAUTHORIZED",
23588
+ "PAYMENT_REQUIRED",
23589
+ "FORBIDDEN",
23590
+ "NOT_FOUND",
23591
+ "METHOD_NOT_SUPPORTED",
23592
+ "TIMEOUT",
23593
+ "CONFLICT",
23594
+ "PRECONDITION_FAILED",
23595
+ "PAYLOAD_TOO_LARGE",
23596
+ "UNSUPPORTED_MEDIA_TYPE",
23597
+ "UNPROCESSABLE_CONTENT",
23598
+ "PRECONDITION_REQUIRED",
23599
+ "TOO_MANY_REQUESTS",
23600
+ "CLIENT_CLOSED_REQUEST"
23601
+ ]
23602
+ },
23603
+ "httpStatus": {
23604
+ "type": "number"
23605
+ },
23606
+ "path": {
23607
+ "type": "string"
23608
+ },
23609
+ "stack": {
23610
+ "type": "string"
23611
+ }
23612
+ },
23613
+ "required": [
23614
+ "hostOffline",
23615
+ "code",
23616
+ "httpStatus"
23617
+ ],
23618
+ "additionalProperties": false
23619
+ },
23620
+ "message": {
23621
+ "type": "string"
23622
+ },
23623
+ "code": {
23624
+ "type": "number",
23625
+ "enum": [
23626
+ -32700,
23627
+ -32600,
23628
+ -32603,
23629
+ -32001,
23630
+ -32002,
23631
+ -32003,
23632
+ -32004,
23633
+ -32005,
23634
+ -32008,
23635
+ -32009,
23636
+ -32012,
23637
+ -32013,
23638
+ -32015,
23639
+ -32022,
23640
+ -32028,
23641
+ -32029,
23642
+ -32099
23643
+ ]
23644
+ }
23645
+ },
23646
+ "required": [
23647
+ "data",
23648
+ "message",
23649
+ "code"
23650
+ ],
23651
+ "additionalProperties": false
21507
23652
  }
21508
23653
  ]
21509
23654
  }