@band-app/server 0.46.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 (74) hide show
  1. package/dist/client/_shell.html +0 -0
  2. package/dist/client/assets/{TerminalPanel-pkSSHqjB.js → TerminalPanel-CQGF9Qku.js} +1 -1
  3. package/dist/client/assets/{_basePickBy-30wa-B3K.js → _basePickBy-D64wD5rn.js} +1 -1
  4. package/dist/client/assets/{_baseUniq-DYFc8VYN.js → _baseUniq-pND9PMLH.js} +1 -1
  5. package/dist/client/assets/{arc-aFj-W69O.js → arc-Bilmh-jP.js} +1 -1
  6. package/dist/client/assets/{architectureDiagram-VXUJARFQ-CUH4fJYm.js → architectureDiagram-VXUJARFQ-KfIpeO-l.js} +1 -1
  7. package/dist/client/assets/{blockDiagram-VD42YOAC-CRkquXXQ.js → blockDiagram-VD42YOAC-DtuyRI-v.js} +1 -1
  8. package/dist/client/assets/{c4Diagram-YG6GDRKO-CD-EJ5GA.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-VhYl9M0k.js → chunk-4BX2VUAB-CWIj0g_M.js} +1 -1
  11. package/dist/client/assets/{chunk-55IACEB6-BQC_5pzd.js → chunk-55IACEB6-YWkCYv9O.js} +1 -1
  12. package/dist/client/assets/{chunk-B4BG7PRW-C1FqesKA.js → chunk-B4BG7PRW-muM18MGT.js} +1 -1
  13. package/dist/client/assets/{chunk-DI55MBZ5-DYC7fpTc.js → chunk-DI55MBZ5-DUKyYScZ.js} +1 -1
  14. package/dist/client/assets/{chunk-FMBD7UC4-DwHYZG2m.js → chunk-FMBD7UC4-YTfHsy8G.js} +1 -1
  15. package/dist/client/assets/{chunk-QN33PNHL-QrOgqJ2x.js → chunk-QN33PNHL-BdIATH5l.js} +1 -1
  16. package/dist/client/assets/{chunk-QZHKN3VN-BfeDvyyD.js → chunk-QZHKN3VN-DqRnJnIm.js} +1 -1
  17. package/dist/client/assets/{chunk-TZMSLE5B-DqbFla-p.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-Dtr68WKY.js → cose-bilkent-S5V4N54A-Cffv5KWs.js} +1 -1
  22. package/dist/client/assets/{dagre-6UL2VRFP-DeO-jAE4.js → dagre-6UL2VRFP-lIXclAkR.js} +1 -1
  23. package/dist/client/assets/{diagram-PSM6KHXK-DIoKKrik.js → diagram-PSM6KHXK-BBQxBoNY.js} +1 -1
  24. package/dist/client/assets/{diagram-QEK2KX5R-YSmrv8Ap.js → diagram-QEK2KX5R-BkC_Y-i9.js} +1 -1
  25. package/dist/client/assets/{diagram-S2PKOQOG-Bkn85uc6.js → diagram-S2PKOQOG-Culf_egi.js} +1 -1
  26. package/dist/client/assets/{erDiagram-Q2GNP2WA-BwNSRuDm.js → erDiagram-Q2GNP2WA-D8qVM8rI.js} +1 -1
  27. package/dist/client/assets/{flowDiagram-NV44I4VS-Bi4yldps.js → flowDiagram-NV44I4VS-D_CW6QJO.js} +1 -1
  28. package/dist/client/assets/{ganttDiagram-JELNMOA3-BArJltql.js → ganttDiagram-JELNMOA3-DeYroA3a.js} +1 -1
  29. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-DL2anp1a.js → gitGraphDiagram-V2S2FVAM-a_sS5cSL.js} +1 -1
  30. package/dist/client/assets/{graph-CA6szdeU.js → graph-BiyE3_7j.js} +1 -1
  31. package/dist/client/assets/{highlighted-body-B3W2YXNL-Ce8JER1R.js → highlighted-body-B3W2YXNL-HVIXx0Ob.js} +1 -1
  32. package/dist/client/assets/{index-Czi_pJOK.js → index-B1Qa5REm.js} +1 -1
  33. package/dist/client/assets/{index-DpxJvU7W.js → index-BKkkwDGt.js} +1 -1
  34. package/dist/client/assets/{index-BhEFhSvO.js → index-BuC5LY4k.js} +1 -1
  35. package/dist/client/assets/{index-8yx33Rgn.js → index-CMHYIEyK.js} +1 -1
  36. package/dist/client/assets/{index-4MpV9Rhm.js → index-CcH0k4fG.js} +1 -1
  37. package/dist/client/assets/{index-DDvAHSPZ.js → index-Cnvsv3TN.js} +1 -1
  38. package/dist/client/assets/{index-D757VVMZ.js → index-CqPtl_El.js} +1 -1
  39. package/dist/client/assets/{index-DeSewZzo.js → index-DOFpEx7l.js} +1 -1
  40. package/dist/client/assets/{index-D-zrg5eL.js → index-DyvxDAAr.js} +1 -1
  41. package/dist/client/assets/{index-C5m9KGZf.js → index-LKhS8iLe.js} +1 -1
  42. package/dist/client/assets/{index-BeG__tJz.js → index-NNpxvI8j.js} +1 -1
  43. package/dist/client/assets/{index-Cro4_Zyl.js → index-REiX7RF3.js} +1 -1
  44. package/dist/client/assets/{index-CSQuqpCk.js → index-WgCV2JjC.js} +1 -1
  45. package/dist/client/assets/{infoDiagram-HS3SLOUP-opriBuJD.js → infoDiagram-HS3SLOUP-BfzBdZLM.js} +1 -1
  46. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-t3TBG9zd.js → journeyDiagram-XKPGCS4Q-CUsUym-8.js} +1 -1
  47. package/dist/client/assets/{kanban-definition-3W4ZIXB7-D1KUbYAi.js → kanban-definition-3W4ZIXB7-b54i6dX1.js} +1 -1
  48. package/dist/client/assets/{layout-BaSYphI5.js → layout-ztlxnOA9.js} +1 -1
  49. package/dist/client/assets/{main-Bqsm7w7O.js → main-CCOutd_8.js} +252 -252
  50. package/dist/client/assets/main-D4-4L0eG.css +1 -0
  51. package/dist/client/assets/{mindmap-definition-VGOIOE7T-ChEtbA0z.js → mindmap-definition-VGOIOE7T-p7poZwfk.js} +1 -1
  52. package/dist/client/assets/{pieDiagram-ADFJNKIX-D-2g15uY.js → pieDiagram-ADFJNKIX-DNua1MUn.js} +1 -1
  53. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-3I1XUOAj.js → quadrantDiagram-AYHSOK5B-CminxoD5.js} +1 -1
  54. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-rSbxWkaA.js → requirementDiagram-UZGBJVZJ-D3aBt82J.js} +1 -1
  55. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-C4ZbxfZu.js → sankeyDiagram-TZEHDZUN-B65x-vl8.js} +1 -1
  56. package/dist/client/assets/{sequenceDiagram-WL72ISMW-Bjrx7GQ9.js → sequenceDiagram-WL72ISMW-DswVb1N3.js} +1 -1
  57. package/dist/client/assets/{stateDiagram-FKZM4ZOC-DmItUmdi.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-C0WtBwwx.js → timeline-definition-IT6M3QCI-C5AHVri5.js} +1 -1
  60. package/dist/client/assets/{treemap-GDKQZRPO-B_sR8-qR.js → treemap-GDKQZRPO-B4F1SV97.js} +1 -1
  61. package/dist/client/assets/{worktree._worktreeId-XB6R8O1k.js → worktree._worktreeId-DOkSR4Iv.js} +1 -1
  62. package/dist/client/assets/{worktree._worktreeId-Dx83Amei.js → worktree._worktreeId-Da_9lTBD.js} +1 -1
  63. package/dist/client/assets/{xychartDiagram-PRI3JC2R-BgnyoF2_.js → xychartDiagram-PRI3JC2R-dZFFrnv9.js} +1 -1
  64. package/dist/migrations/20261012171800_follow_the_work/migration.sql +3 -0
  65. package/dist/migrations/20261012171800_follow_the_work/snapshot.json +4409 -0
  66. package/dist/openapi.json +1323 -231
  67. package/dist/start-server.mjs +11519 -10536
  68. package/package.json +6 -6
  69. package/dist/client/assets/channel-i7vnUKiG.js +0 -1
  70. package/dist/client/assets/classDiagram-2ON5EDUG-QKheXL6H.js +0 -1
  71. package/dist/client/assets/classDiagram-v2-WZHVMYZB-QKheXL6H.js +0 -1
  72. package/dist/client/assets/clone-C6EEluIC.js +0 -1
  73. package/dist/client/assets/main-BXb3TLCw.css +0 -1
  74. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-CABlMyog.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",
@@ -2939,11 +2991,12 @@
2939
2991
  ]
2940
2992
  }
2941
2993
  },
2942
- "/runners.list": {
2994
+ "/follow.offer": {
2943
2995
  "get": {
2944
- "operationId": "runners.list",
2996
+ "operationId": "follow.offer",
2997
+ "description": "Who could take the work, what will not carry over, or why it cannot continue.",
2945
2998
  "tags": [
2946
- "runners"
2999
+ "follow"
2947
3000
  ],
2948
3001
  "responses": {
2949
3002
  "200": {
@@ -2957,33 +3010,7 @@
2957
3010
  "type": "object",
2958
3011
  "properties": {
2959
3012
  "data": {
2960
- "type": "object",
2961
- "properties": {
2962
- "runs": {
2963
- "type": "array",
2964
- "items": {
2965
- "$ref": "#/components/schemas/RunnerRun"
2966
- }
2967
- },
2968
- "runners": {
2969
- "type": "array",
2970
- "items": {
2971
- "$ref": "#/components/schemas/RunnerView"
2972
- }
2973
- },
2974
- "errors": {
2975
- "type": "array",
2976
- "items": {
2977
- "type": "string"
2978
- }
2979
- }
2980
- },
2981
- "required": [
2982
- "runs",
2983
- "runners",
2984
- "errors"
2985
- ],
2986
- "additionalProperties": false
3013
+ "$ref": "#/components/schemas/ContinueOffer"
2987
3014
  }
2988
3015
  },
2989
3016
  "required": [
@@ -3001,15 +3028,42 @@
3001
3028
  "default": {
3002
3029
  "$ref": "#/components/responses/Error"
3003
3030
  }
3004
- }
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
+ ]
3005
3059
  }
3006
3060
  },
3007
- "/runners.snapshots": {
3008
- "get": {
3009
- "operationId": "runners.snapshots",
3010
- "description": "The machine snapshots the hub holds, newest first (plan step 3.10).",
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.",
3011
3065
  "tags": [
3012
- "runners"
3066
+ "follow"
3013
3067
  ],
3014
3068
  "responses": {
3015
3069
  "200": {
@@ -3023,69 +3077,7 @@
3023
3077
  "type": "object",
3024
3078
  "properties": {
3025
3079
  "data": {
3026
- "type": "object",
3027
- "properties": {
3028
- "snapshots": {
3029
- "type": "array",
3030
- "items": {
3031
- "type": "object",
3032
- "properties": {
3033
- "id": {
3034
- "type": "string"
3035
- },
3036
- "runnerId": {
3037
- "type": "string"
3038
- },
3039
- "hostId": {
3040
- "type": "string"
3041
- },
3042
- "worktreeIds": {
3043
- "type": "array",
3044
- "items": {
3045
- "type": "string"
3046
- }
3047
- },
3048
- "snapshotId": {
3049
- "type": "string"
3050
- },
3051
- "sizeBytes": {
3052
- "type": [
3053
- "number",
3054
- "null"
3055
- ]
3056
- },
3057
- "restoredAt": {
3058
- "type": [
3059
- "number",
3060
- "null"
3061
- ]
3062
- },
3063
- "createdAt": {
3064
- "type": "number"
3065
- },
3066
- "expiresAt": {
3067
- "type": "number"
3068
- }
3069
- },
3070
- "required": [
3071
- "id",
3072
- "runnerId",
3073
- "hostId",
3074
- "worktreeIds",
3075
- "snapshotId",
3076
- "sizeBytes",
3077
- "restoredAt",
3078
- "createdAt",
3079
- "expiresAt"
3080
- ],
3081
- "additionalProperties": false
3082
- }
3083
- }
3084
- },
3085
- "required": [
3086
- "snapshots"
3087
- ],
3088
- "additionalProperties": false
3080
+ "$ref": "#/components/schemas/ContinueResult"
3089
3081
  }
3090
3082
  },
3091
3083
  "required": [
@@ -3103,15 +3095,40 @@
3103
3095
  "default": {
3104
3096
  "$ref": "#/components/responses/Error"
3105
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
+ }
3106
3123
  }
3107
3124
  }
3108
3125
  },
3109
- "/runners.log": {
3126
+ "/follow.divergence": {
3110
3127
  "get": {
3111
- "operationId": "runners.log",
3112
- "description": "The hook output of a host request, as the hub logged it (tokens removed).",
3128
+ "operationId": "follow.divergence",
3129
+ "description": "Compares the old copy with the checkpoint the continuation used.",
3113
3130
  "tags": [
3114
- "runners"
3131
+ "follow"
3115
3132
  ],
3116
3133
  "responses": {
3117
3134
  "200": {
@@ -3125,19 +3142,7 @@
3125
3142
  "type": "object",
3126
3143
  "properties": {
3127
3144
  "data": {
3128
- "type": "object",
3129
- "properties": {
3130
- "log": {
3131
- "type": [
3132
- "string",
3133
- "null"
3134
- ]
3135
- }
3136
- },
3137
- "required": [
3138
- "log"
3139
- ],
3140
- "additionalProperties": false
3145
+ "$ref": "#/components/schemas/DivergenceReport"
3141
3146
  }
3142
3147
  },
3143
3148
  "required": [
@@ -3167,12 +3172,12 @@
3167
3172
  "schema": {
3168
3173
  "type": "object",
3169
3174
  "properties": {
3170
- "requestId": {
3175
+ "worktreeId": {
3171
3176
  "type": "string"
3172
3177
  }
3173
3178
  },
3174
3179
  "required": [
3175
- "requestId"
3180
+ "worktreeId"
3176
3181
  ],
3177
3182
  "additionalProperties": false
3178
3183
  }
@@ -3182,12 +3187,12 @@
3182
3187
  ]
3183
3188
  }
3184
3189
  },
3185
- "/runners.machines": {
3190
+ "/follow.divergenceDiff": {
3186
3191
  "get": {
3187
- "operationId": "runners.machines",
3188
- "description": "The machines the runners started, newest first, with the state the reaper keeps them in.",
3192
+ "operationId": "follow.divergenceDiff",
3193
+ "description": "The diff of one file the old copy changed since the checkpoint.",
3189
3194
  "tags": [
3190
- "runners"
3195
+ "follow"
3191
3196
  ],
3192
3197
  "responses": {
3193
3198
  "200": {
@@ -3203,15 +3208,12 @@
3203
3208
  "data": {
3204
3209
  "type": "object",
3205
3210
  "properties": {
3206
- "machines": {
3207
- "type": "array",
3208
- "items": {
3209
- "$ref": "#/components/schemas/MachineView"
3210
- }
3211
+ "diff": {
3212
+ "type": "string"
3211
3213
  }
3212
3214
  },
3213
3215
  "required": [
3214
- "machines"
3216
+ "diff"
3215
3217
  ],
3216
3218
  "additionalProperties": false
3217
3219
  }
@@ -3231,25 +3233,483 @@
3231
3233
  "default": {
3232
3234
  "$ref": "#/components/responses/Error"
3233
3235
  }
3234
- }
3235
- }
3236
- },
3237
- "/runners.destroyMachine": {
3238
- "post": {
3239
- "operationId": "runners.destroyMachine",
3240
- "description": "Destroys a machine now. A machine holding worktrees that are not stored is refused unless\n`force` is set.",
3241
- "tags": [
3242
- "runners"
3243
- ],
3244
- "responses": {
3245
- "200": {
3246
- "description": "Successful response",
3236
+ },
3237
+ "parameters": [
3238
+ {
3239
+ "name": "input",
3240
+ "in": "query",
3241
+ "required": true,
3242
+ "style": "deepObject",
3247
3243
  "content": {
3248
3244
  "application/json": {
3249
3245
  "schema": {
3250
3246
  "type": "object",
3251
3247
  "properties": {
3252
- "result": {
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
+ }
3671
+ }
3672
+ },
3673
+ "required": [
3674
+ "machines"
3675
+ ],
3676
+ "additionalProperties": false
3677
+ }
3678
+ },
3679
+ "required": [
3680
+ "data"
3681
+ ]
3682
+ }
3683
+ },
3684
+ "required": [
3685
+ "result"
3686
+ ]
3687
+ }
3688
+ }
3689
+ }
3690
+ },
3691
+ "default": {
3692
+ "$ref": "#/components/responses/Error"
3693
+ }
3694
+ }
3695
+ }
3696
+ },
3697
+ "/runners.destroyMachine": {
3698
+ "post": {
3699
+ "operationId": "runners.destroyMachine",
3700
+ "description": "Destroys a machine now. A machine holding worktrees that are not stored is refused unless\n`force` is set.",
3701
+ "tags": [
3702
+ "runners"
3703
+ ],
3704
+ "responses": {
3705
+ "200": {
3706
+ "description": "Successful response",
3707
+ "content": {
3708
+ "application/json": {
3709
+ "schema": {
3710
+ "type": "object",
3711
+ "properties": {
3712
+ "result": {
3253
3713
  "type": "object",
3254
3714
  "properties": {
3255
3715
  "data": {
@@ -9373,6 +9833,9 @@
9373
9833
  "gui",
9374
9834
  "tui"
9375
9835
  ]
9836
+ },
9837
+ "crossHostWorktrees": {
9838
+ "type": "boolean"
9376
9839
  }
9377
9840
  },
9378
9841
  "additionalProperties": {}
@@ -9598,6 +10061,26 @@
9598
10061
  ],
9599
10062
  "description": "The host whose default-branch checkout is listed as a worktree, once one is known."
9600
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
+ },
9601
10084
  "checkpointsEnabled": {
9602
10085
  "type": "boolean",
9603
10086
  "description": "Whether the hub keeps checkpoints of this repo's worktrees (the stored choice, else the default)."
@@ -9609,6 +10092,10 @@
9609
10092
  ],
9610
10093
  "description": "The stored choice, or null when the repo follows the default."
9611
10094
  },
10095
+ "autoContinue": {
10096
+ "type": "boolean",
10097
+ "description": "Whether a worktree whose host is offline continues on another host without asking."
10098
+ },
9612
10099
  "avatar": {
9613
10100
  "oneOf": [
9614
10101
  {
@@ -9660,6 +10147,12 @@
9660
10147
  "type": "string",
9661
10148
  "description": "Set when this copy was restored on another host. The value is the replacement's worktree id."
9662
10149
  },
10150
+ "continuedFrom": {
10151
+ "$ref": "#/components/schemas/ContinuedFrom"
10152
+ },
10153
+ "divergence": {
10154
+ "$ref": "#/components/schemas/Divergence"
10155
+ },
9663
10156
  "lastCheckpointAt": {
9664
10157
  "type": [
9665
10158
  "number",
@@ -9725,8 +10218,10 @@
9725
10218
  "meta",
9726
10219
  "allowedHostIds",
9727
10220
  "primaryHostId",
10221
+ "mainMissing",
9728
10222
  "checkpointsEnabled",
9729
10223
  "checkpointsSetting",
10224
+ "autoContinue",
9730
10225
  "avatar",
9731
10226
  "worktrees"
9732
10227
  ],
@@ -9896,7 +10391,42 @@
9896
10391
  "type": "object",
9897
10392
  "properties": {
9898
10393
  "data": {
9899
- "$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."
9900
10430
  }
9901
10431
  },
9902
10432
  "required": [
@@ -10473,7 +11003,7 @@
10473
11003
  "/repos.update": {
10474
11004
  "post": {
10475
11005
  "operationId": "repos.update",
10476
- "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). Changing the host policy or the checkpoint setting 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.",
10477
11007
  "tags": [
10478
11008
  "repos"
10479
11009
  ],
@@ -10554,6 +11084,12 @@
10554
11084
  "boolean",
10555
11085
  "null"
10556
11086
  ]
11087
+ },
11088
+ "autoContinue": {
11089
+ "type": [
11090
+ "boolean",
11091
+ "null"
11092
+ ]
10557
11093
  }
10558
11094
  },
10559
11095
  "required": [
@@ -15799,7 +16335,50 @@
15799
16335
  "type": "object",
15800
16336
  "properties": {
15801
16337
  "data": {
15802
- "$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
+ ]
15803
16382
  }
15804
16383
  },
15805
16384
  "required": [
@@ -18272,16 +18851,75 @@
18272
18851
  "null"
18273
18852
  ]
18274
18853
  },
18275
- "fix": {
18276
- "type": "string"
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"
18881
+ },
18882
+ "os": {
18883
+ "type": [
18884
+ "string",
18885
+ "null"
18886
+ ]
18887
+ },
18888
+ "arch": {
18889
+ "type": [
18890
+ "string",
18891
+ "null"
18892
+ ]
18893
+ },
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
+ }
18277
18911
  }
18278
18912
  },
18279
18913
  "required": [
18280
- "tool",
18281
- "installed",
18282
- "version",
18283
- "loggedIn",
18284
- "fix"
18914
+ "id",
18915
+ "name",
18916
+ "status",
18917
+ "mode",
18918
+ "os",
18919
+ "arch",
18920
+ "agents",
18921
+ "capabilities",
18922
+ "labels"
18285
18923
  ],
18286
18924
  "additionalProperties": false
18287
18925
  },
@@ -18889,137 +19527,432 @@
18889
19527
  }
18890
19528
  },
18891
19529
  "required": [
18892
- "id",
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": {
19813
+ "type": "array",
19814
+ "items": {
19815
+ "type": "string"
19816
+ }
19817
+ }
19818
+ },
19819
+ "required": [
18893
19820
  "worktreeId",
18894
19821
  "hostId",
18895
- "branch",
18896
- "baseSha",
18897
- "snapshotSha",
18898
- "dirty",
18899
- "sizeBytes",
18900
- "trigger",
18901
- "createdAt",
18902
- "sessions"
19822
+ "hostName",
19823
+ "continuedFrom",
19824
+ "chatIds"
18903
19825
  ],
18904
19826
  "additionalProperties": false
18905
19827
  },
18906
- "ChangedFile": {
19828
+ "ContinuedFrom": {
18907
19829
  "type": "object",
18908
19830
  "properties": {
18909
- "path": {
18910
- "type": "string"
19831
+ "fromHostId": {
19832
+ "type": "string",
19833
+ "description": "The host the work came from, which was offline."
18911
19834
  },
18912
- "status": {
18913
- "type": "string"
19835
+ "fromWorktreeId": {
19836
+ "type": "string",
19837
+ "description": "The id of the copy that stays behind, superseded."
18914
19838
  },
18915
- "additions": {
18916
- "type": [
18917
- "number",
18918
- "null"
18919
- ]
19839
+ "toHostId": {
19840
+ "type": "string",
19841
+ "description": "The host the work continues on."
18920
19842
  },
18921
- "deletions": {
18922
- "type": [
18923
- "number",
18924
- "null"
18925
- ]
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."
18926
19862
  }
18927
19863
  },
18928
19864
  "required": [
18929
- "path",
18930
- "status",
18931
- "additions",
18932
- "deletions"
19865
+ "fromHostId",
19866
+ "fromWorktreeId",
19867
+ "toHostId",
19868
+ "checkpointId",
19869
+ "reason",
19870
+ "at",
19871
+ "checkpointAt"
18933
19872
  ],
18934
19873
  "additionalProperties": false
18935
19874
  },
18936
- "RestoreResult": {
19875
+ "DivergenceReport": {
18937
19876
  "type": "object",
18938
19877
  "properties": {
18939
19878
  "worktreeId": {
18940
- "type": "string",
18941
- "description": "The worktree on the target host."
18942
- },
18943
- "hostId": {
18944
19879
  "type": "string"
18945
19880
  },
18946
- "supersededId": {
19881
+ "replacementId": {
18947
19882
  "type": "string",
18948
- "description": "The worktree it replaced, marked superseded. Absent when a move removed it."
18949
- },
18950
- "sourceRemoved": {
18951
- "type": "boolean",
18952
- "description": "For a move: whether the source worktree was removed."
19883
+ "description": "The copy that replaced this one."
18953
19884
  },
18954
- "warning": {
19885
+ "state": {
18955
19886
  "type": "string",
18956
- "description": "For a move whose source could not be removed."
18957
- },
18958
- "checkpointId": {
18959
- "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."
18960
19893
  },
18961
- "chatIds": {
19894
+ "files": {
18962
19895
  "type": "array",
18963
19896
  "items": {
18964
- "type": "string"
18965
- },
18966
- "description": "The chats that now belong to the new worktree."
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
+ ]
18967
19909
  }
18968
19910
  },
18969
19911
  "required": [
18970
19912
  "worktreeId",
18971
- "hostId",
18972
- "checkpointId",
18973
- "chatIds"
19913
+ "replacementId",
19914
+ "state",
19915
+ "files",
19916
+ "hostOnline",
19917
+ "checkedAt"
18974
19918
  ],
18975
19919
  "additionalProperties": false
18976
19920
  },
18977
- "EvacuateResult": {
19921
+ "BringOverResult": {
18978
19922
  "type": "object",
18979
19923
  "properties": {
18980
- "fromHostId": {
18981
- "type": "string"
19924
+ "applied": {
19925
+ "type": "boolean"
18982
19926
  },
18983
- "toHostId": {
18984
- "type": "string"
19927
+ "files": {
19928
+ "type": "number",
19929
+ "description": "The files the patch changed on the new copy."
18985
19930
  },
18986
- "results": {
19931
+ "conflicts": {
18987
19932
  "type": "array",
18988
19933
  "items": {
18989
19934
  "type": "object",
18990
19935
  "properties": {
18991
- "worktreeId": {
18992
- "type": "string"
18993
- },
18994
- "ok": {
18995
- "type": "boolean"
18996
- },
18997
- "newWorktreeId": {
19936
+ "path": {
18998
19937
  "type": "string"
18999
19938
  },
19000
- "mode": {
19001
- "type": "string",
19002
- "enum": [
19003
- "restore",
19004
- "move"
19005
- ]
19006
- },
19007
- "error": {
19939
+ "message": {
19008
19940
  "type": "string"
19009
19941
  }
19010
19942
  },
19011
19943
  "required": [
19012
- "worktreeId",
19013
- "ok"
19944
+ "path",
19945
+ "message"
19014
19946
  ],
19015
19947
  "additionalProperties": false
19016
- }
19948
+ },
19949
+ "description": "Set when the patch does not apply cleanly. Nothing was changed."
19017
19950
  }
19018
19951
  },
19019
19952
  "required": [
19020
- "fromHostId",
19021
- "toHostId",
19022
- "results"
19953
+ "applied",
19954
+ "files",
19955
+ "conflicts"
19023
19956
  ],
19024
19957
  "additionalProperties": false
19025
19958
  },
@@ -20123,8 +21056,8 @@
20123
21056
  "enum": [
20124
21057
  "unknown",
20125
21058
  "dirty",
20126
- "draft",
20127
21059
  "clean",
21060
+ "draft",
20128
21061
  "unstable",
20129
21062
  "has_hooks",
20130
21063
  "blocked",
@@ -20390,6 +21323,10 @@
20390
21323
  "gui",
20391
21324
  "tui"
20392
21325
  ]
21326
+ },
21327
+ "crossHostWorktrees": {
21328
+ "type": "boolean",
21329
+ "description": "Agents on a worker may start worktrees on other hosts. On unless false."
20393
21330
  }
20394
21331
  },
20395
21332
  "additionalProperties": {},
@@ -20619,6 +21556,42 @@
20619
21556
  ],
20620
21557
  "additionalProperties": false
20621
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
+ },
20622
21595
  "WorktreeOriginInfo": {
20623
21596
  "type": "object",
20624
21597
  "properties": {
@@ -20709,6 +21682,10 @@
20709
21682
  "checkpointsEnabled": {
20710
21683
  "type": "boolean",
20711
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."
20712
21689
  }
20713
21690
  },
20714
21691
  "required": [
@@ -20755,6 +21732,12 @@
20755
21732
  "supersededBy": {
20756
21733
  "type": "string",
20757
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"
20758
21741
  }
20759
21742
  },
20760
21743
  "required": [
@@ -22454,6 +23437,30 @@
22454
23437
  "httpStatus"
22455
23438
  ],
22456
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
22457
23464
  }
22458
23465
  },
22459
23466
  "responses": {
@@ -22557,6 +23564,91 @@
22557
23564
  "code"
22558
23565
  ],
22559
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
22560
23652
  }
22561
23653
  ]
22562
23654
  }