gitflash 0.6.0 → 0.7.0.beta1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +26 -2
- data/command_descriptions.yml +76 -0
- data/lib/gitflash/branch.rb +7 -2
- data/lib/gitflash/cherry_pick.rb +128 -0
- data/lib/gitflash/cleanup.rb +70 -0
- data/lib/gitflash/cli.rb +37 -0
- data/lib/gitflash/commands/base.rb +9 -3
- data/lib/gitflash/commands/branches.rb +1 -0
- data/lib/gitflash/commands/clean.rb +51 -0
- data/lib/gitflash/commands/clean_criteria.rb +29 -0
- data/lib/gitflash/commands/delete.rb +17 -5
- data/lib/gitflash/commands/hook_install.rb +17 -9
- data/lib/gitflash/commands/hook_status.rb +24 -6
- data/lib/gitflash/commands/mark.rb +85 -0
- data/lib/gitflash/commands/pick.rb +131 -0
- data/lib/gitflash/commands/pick_control.rb +67 -0
- data/lib/gitflash/commands/pick_outcome.rb +52 -0
- data/lib/gitflash/commands/removal_report.rb +65 -0
- data/lib/gitflash/commands/undo.rb +38 -6
- data/lib/gitflash/commands/worktree_add.rb +98 -0
- data/lib/gitflash/commands/worktree_clean.rb +49 -0
- data/lib/gitflash/commands/worktree_command.rb +28 -0
- data/lib/gitflash/commands/worktree_list.rb +48 -0
- data/lib/gitflash/commands/worktree_lock.rb +54 -0
- data/lib/gitflash/commands/worktree_move.rb +47 -0
- data/lib/gitflash/commands/worktree_prune.rb +41 -0
- data/lib/gitflash/commands/worktree_remove.rb +119 -0
- data/lib/gitflash/commands/worktree_unlock.rb +12 -0
- data/lib/gitflash/config.rb +95 -0
- data/lib/gitflash/config_keys.rb +19 -0
- data/lib/gitflash/git/in_directory.rb +29 -0
- data/lib/gitflash/hook/branch_marker.rb +52 -0
- data/lib/gitflash/hook/claude.rb +23 -3
- data/lib/gitflash/hook/command_parser.rb +29 -9
- data/lib/gitflash/hook/creations.rb +85 -0
- data/lib/gitflash/hook/settings.rb +18 -5
- data/lib/gitflash/hook_cli.rb +12 -4
- data/lib/gitflash/ownership.rb +59 -0
- data/lib/gitflash/protection.rb +19 -0
- data/lib/gitflash/repo.rb +2 -3
- data/lib/gitflash/restore.rb +8 -7
- data/lib/gitflash/state_capture.rb +2 -2
- data/lib/gitflash/version.rb +1 -1
- data/lib/gitflash/worktree.rb +32 -0
- data/lib/gitflash/worktree_cli.rb +115 -0
- data/lib/gitflash/worktree_revival.rb +55 -0
- data/lib/gitflash/worktrees.rb +147 -0
- data/schema/v1.json +1050 -2
- metadata +30 -1
data/schema/v1.json
CHANGED
|
@@ -26,7 +26,18 @@
|
|
|
26
26
|
"snapshot",
|
|
27
27
|
"gc",
|
|
28
28
|
"hook install",
|
|
29
|
-
"hook status"
|
|
29
|
+
"hook status",
|
|
30
|
+
"worktree list",
|
|
31
|
+
"worktree add",
|
|
32
|
+
"worktree remove",
|
|
33
|
+
"worktree prune",
|
|
34
|
+
"worktree lock",
|
|
35
|
+
"worktree unlock",
|
|
36
|
+
"worktree move",
|
|
37
|
+
"clean",
|
|
38
|
+
"worktree clean",
|
|
39
|
+
"pick",
|
|
40
|
+
"mark"
|
|
30
41
|
]
|
|
31
42
|
},
|
|
32
43
|
"ok": {
|
|
@@ -303,6 +314,222 @@
|
|
|
303
314
|
}
|
|
304
315
|
}
|
|
305
316
|
}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"if": {
|
|
320
|
+
"properties": {
|
|
321
|
+
"command": {
|
|
322
|
+
"const": "worktree list"
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"then": {
|
|
327
|
+
"properties": {
|
|
328
|
+
"result": {
|
|
329
|
+
"$ref": "#/$defs/worktree_list_result"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"if": {
|
|
336
|
+
"properties": {
|
|
337
|
+
"command": {
|
|
338
|
+
"const": "worktree add"
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"then": {
|
|
343
|
+
"properties": {
|
|
344
|
+
"plan": {
|
|
345
|
+
"$ref": "#/$defs/worktree_add_plan"
|
|
346
|
+
},
|
|
347
|
+
"result": {
|
|
348
|
+
"$ref": "#/$defs/worktree_add_result"
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"if": {
|
|
355
|
+
"properties": {
|
|
356
|
+
"command": {
|
|
357
|
+
"const": "worktree remove"
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"then": {
|
|
362
|
+
"properties": {
|
|
363
|
+
"plan": {
|
|
364
|
+
"$ref": "#/$defs/worktree_remove_plan"
|
|
365
|
+
},
|
|
366
|
+
"result": {
|
|
367
|
+
"$ref": "#/$defs/worktree_remove_result"
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"if": {
|
|
374
|
+
"properties": {
|
|
375
|
+
"command": {
|
|
376
|
+
"const": "worktree prune"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
"then": {
|
|
381
|
+
"properties": {
|
|
382
|
+
"plan": {
|
|
383
|
+
"$ref": "#/$defs/worktree_prune_plan"
|
|
384
|
+
},
|
|
385
|
+
"result": {
|
|
386
|
+
"$ref": "#/$defs/worktree_prune_result"
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"if": {
|
|
393
|
+
"properties": {
|
|
394
|
+
"command": {
|
|
395
|
+
"const": "worktree lock"
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"then": {
|
|
400
|
+
"properties": {
|
|
401
|
+
"plan": {
|
|
402
|
+
"$ref": "#/$defs/worktree_lock_plan"
|
|
403
|
+
},
|
|
404
|
+
"result": {
|
|
405
|
+
"$ref": "#/$defs/worktree_lock_result"
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"if": {
|
|
412
|
+
"properties": {
|
|
413
|
+
"command": {
|
|
414
|
+
"const": "worktree unlock"
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
"then": {
|
|
419
|
+
"properties": {
|
|
420
|
+
"plan": {
|
|
421
|
+
"$ref": "#/$defs/worktree_unlock_plan"
|
|
422
|
+
},
|
|
423
|
+
"result": {
|
|
424
|
+
"$ref": "#/$defs/worktree_unlock_result"
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"if": {
|
|
431
|
+
"properties": {
|
|
432
|
+
"command": {
|
|
433
|
+
"const": "worktree move"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
"then": {
|
|
438
|
+
"properties": {
|
|
439
|
+
"plan": {
|
|
440
|
+
"$ref": "#/$defs/worktree_move_plan"
|
|
441
|
+
},
|
|
442
|
+
"result": {
|
|
443
|
+
"$ref": "#/$defs/worktree_move_result"
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"if": {
|
|
450
|
+
"properties": {
|
|
451
|
+
"command": {
|
|
452
|
+
"const": "clean"
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
"then": {
|
|
457
|
+
"properties": {
|
|
458
|
+
"plan": {
|
|
459
|
+
"$ref": "#/$defs/clean_plan"
|
|
460
|
+
},
|
|
461
|
+
"result": {
|
|
462
|
+
"$ref": "#/$defs/delete_result"
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"if": {
|
|
469
|
+
"properties": {
|
|
470
|
+
"command": {
|
|
471
|
+
"const": "worktree clean"
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"then": {
|
|
476
|
+
"properties": {
|
|
477
|
+
"plan": {
|
|
478
|
+
"$ref": "#/$defs/worktree_clean_plan"
|
|
479
|
+
},
|
|
480
|
+
"result": {
|
|
481
|
+
"$ref": "#/$defs/worktree_remove_result"
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"if": {
|
|
488
|
+
"properties": {
|
|
489
|
+
"command": {
|
|
490
|
+
"const": "pick"
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"then": {
|
|
495
|
+
"properties": {
|
|
496
|
+
"plan": {
|
|
497
|
+
"$ref": "#/$defs/pick_plan"
|
|
498
|
+
},
|
|
499
|
+
"result": {
|
|
500
|
+
"if": {
|
|
501
|
+
"required": [
|
|
502
|
+
"commits"
|
|
503
|
+
]
|
|
504
|
+
},
|
|
505
|
+
"then": {
|
|
506
|
+
"$ref": "#/$defs/pick_list_result"
|
|
507
|
+
},
|
|
508
|
+
"else": {
|
|
509
|
+
"$ref": "#/$defs/pick_result"
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"if": {
|
|
517
|
+
"properties": {
|
|
518
|
+
"command": {
|
|
519
|
+
"const": "mark"
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
"then": {
|
|
524
|
+
"properties": {
|
|
525
|
+
"plan": {
|
|
526
|
+
"$ref": "#/$defs/mark_plan"
|
|
527
|
+
},
|
|
528
|
+
"result": {
|
|
529
|
+
"$ref": "#/$defs/mark_result"
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
306
533
|
}
|
|
307
534
|
],
|
|
308
535
|
"$defs": {
|
|
@@ -333,7 +560,11 @@
|
|
|
333
560
|
"failed",
|
|
334
561
|
"unknown_snapshot",
|
|
335
562
|
"wrong_worktree",
|
|
336
|
-
"invalid_settings"
|
|
563
|
+
"invalid_settings",
|
|
564
|
+
"invalid_config",
|
|
565
|
+
"unknown_worktree",
|
|
566
|
+
"protected_worktree",
|
|
567
|
+
"conflict"
|
|
337
568
|
]
|
|
338
569
|
},
|
|
339
570
|
"message": {
|
|
@@ -411,6 +642,14 @@
|
|
|
411
642
|
},
|
|
412
643
|
"last_commit_subject": {
|
|
413
644
|
"type": "string"
|
|
645
|
+
},
|
|
646
|
+
"owner": {
|
|
647
|
+
"enum": [
|
|
648
|
+
"agent",
|
|
649
|
+
"human",
|
|
650
|
+
null
|
|
651
|
+
],
|
|
652
|
+
"description": "Who created the branch; null when unmarked (treated as human)."
|
|
414
653
|
}
|
|
415
654
|
}
|
|
416
655
|
},
|
|
@@ -744,6 +983,13 @@
|
|
|
744
983
|
"items": {
|
|
745
984
|
"$ref": "#/$defs/sha"
|
|
746
985
|
}
|
|
986
|
+
},
|
|
987
|
+
"recreate_worktree": {
|
|
988
|
+
"type": [
|
|
989
|
+
"string",
|
|
990
|
+
"null"
|
|
991
|
+
],
|
|
992
|
+
"description": "Directory of a removed worktree that undo adds again before restoring it."
|
|
747
993
|
}
|
|
748
994
|
}
|
|
749
995
|
},
|
|
@@ -843,6 +1089,10 @@
|
|
|
843
1089
|
"applies_to": {
|
|
844
1090
|
"type": "string",
|
|
845
1091
|
"description": "Which Claude Code sessions read this file. Running sessions reload it."
|
|
1092
|
+
},
|
|
1093
|
+
"marking_command": {
|
|
1094
|
+
"type": "string",
|
|
1095
|
+
"description": "The PostToolUse command that marks branches an agent creates as agent work."
|
|
846
1096
|
}
|
|
847
1097
|
}
|
|
848
1098
|
},
|
|
@@ -897,6 +1147,804 @@
|
|
|
897
1147
|
},
|
|
898
1148
|
"applies_to": {
|
|
899
1149
|
"type": "string"
|
|
1150
|
+
},
|
|
1151
|
+
"marking": {
|
|
1152
|
+
"type": "boolean",
|
|
1153
|
+
"description": "This file has the PostToolUse hook."
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
},
|
|
1158
|
+
"marking": {
|
|
1159
|
+
"type": "boolean",
|
|
1160
|
+
"description": "A settings file that applies here also has the PostToolUse hook that marks agent branches."
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
"worktree": {
|
|
1165
|
+
"type": "object",
|
|
1166
|
+
"required": [
|
|
1167
|
+
"path",
|
|
1168
|
+
"head",
|
|
1169
|
+
"branch",
|
|
1170
|
+
"main",
|
|
1171
|
+
"bare",
|
|
1172
|
+
"locked",
|
|
1173
|
+
"lock_reason",
|
|
1174
|
+
"missing",
|
|
1175
|
+
"dirty",
|
|
1176
|
+
"ahead",
|
|
1177
|
+
"behind",
|
|
1178
|
+
"merged"
|
|
1179
|
+
],
|
|
1180
|
+
"properties": {
|
|
1181
|
+
"path": {
|
|
1182
|
+
"type": "string",
|
|
1183
|
+
"description": "Absolute path of the worktree directory."
|
|
1184
|
+
},
|
|
1185
|
+
"head": {
|
|
1186
|
+
"type": [
|
|
1187
|
+
"string",
|
|
1188
|
+
"null"
|
|
1189
|
+
]
|
|
1190
|
+
},
|
|
1191
|
+
"branch": {
|
|
1192
|
+
"type": [
|
|
1193
|
+
"string",
|
|
1194
|
+
"null"
|
|
1195
|
+
],
|
|
1196
|
+
"description": "null for a detached HEAD."
|
|
1197
|
+
},
|
|
1198
|
+
"main": {
|
|
1199
|
+
"type": "boolean"
|
|
1200
|
+
},
|
|
1201
|
+
"bare": {
|
|
1202
|
+
"type": "boolean"
|
|
1203
|
+
},
|
|
1204
|
+
"locked": {
|
|
1205
|
+
"type": "boolean"
|
|
1206
|
+
},
|
|
1207
|
+
"lock_reason": {
|
|
1208
|
+
"type": [
|
|
1209
|
+
"string",
|
|
1210
|
+
"null"
|
|
1211
|
+
]
|
|
1212
|
+
},
|
|
1213
|
+
"missing": {
|
|
1214
|
+
"type": "boolean",
|
|
1215
|
+
"description": "The directory no longer exists."
|
|
1216
|
+
},
|
|
1217
|
+
"dirty": {
|
|
1218
|
+
"type": [
|
|
1219
|
+
"boolean",
|
|
1220
|
+
"null"
|
|
1221
|
+
],
|
|
1222
|
+
"description": "Uncommitted or untracked files; null when unknown."
|
|
1223
|
+
},
|
|
1224
|
+
"ahead": {
|
|
1225
|
+
"type": [
|
|
1226
|
+
"integer",
|
|
1227
|
+
"null"
|
|
1228
|
+
],
|
|
1229
|
+
"minimum": 0
|
|
1230
|
+
},
|
|
1231
|
+
"behind": {
|
|
1232
|
+
"type": [
|
|
1233
|
+
"integer",
|
|
1234
|
+
"null"
|
|
1235
|
+
],
|
|
1236
|
+
"minimum": 0
|
|
1237
|
+
},
|
|
1238
|
+
"merged": {
|
|
1239
|
+
"type": [
|
|
1240
|
+
"boolean",
|
|
1241
|
+
"null"
|
|
1242
|
+
],
|
|
1243
|
+
"description": "Branch merged into the default branch; null without a branch."
|
|
1244
|
+
},
|
|
1245
|
+
"owner": {
|
|
1246
|
+
"enum": [
|
|
1247
|
+
"agent",
|
|
1248
|
+
"human",
|
|
1249
|
+
null
|
|
1250
|
+
],
|
|
1251
|
+
"description": "Who created the branch; null when unmarked (treated as human)."
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
"worktree_list_result": {
|
|
1256
|
+
"type": "object",
|
|
1257
|
+
"required": [
|
|
1258
|
+
"worktrees"
|
|
1259
|
+
],
|
|
1260
|
+
"properties": {
|
|
1261
|
+
"worktrees": {
|
|
1262
|
+
"type": "array",
|
|
1263
|
+
"items": {
|
|
1264
|
+
"$ref": "#/$defs/worktree"
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
},
|
|
1269
|
+
"worktree_add_plan": {
|
|
1270
|
+
"type": "object",
|
|
1271
|
+
"required": [
|
|
1272
|
+
"branch",
|
|
1273
|
+
"path",
|
|
1274
|
+
"source",
|
|
1275
|
+
"from",
|
|
1276
|
+
"owner"
|
|
1277
|
+
],
|
|
1278
|
+
"properties": {
|
|
1279
|
+
"branch": {
|
|
1280
|
+
"type": "string"
|
|
1281
|
+
},
|
|
1282
|
+
"path": {
|
|
1283
|
+
"type": "string"
|
|
1284
|
+
},
|
|
1285
|
+
"source": {
|
|
1286
|
+
"enum": [
|
|
1287
|
+
"existing",
|
|
1288
|
+
"remote",
|
|
1289
|
+
"new"
|
|
1290
|
+
]
|
|
1291
|
+
},
|
|
1292
|
+
"from": {
|
|
1293
|
+
"type": [
|
|
1294
|
+
"string",
|
|
1295
|
+
"null"
|
|
1296
|
+
]
|
|
1297
|
+
},
|
|
1298
|
+
"owner": {
|
|
1299
|
+
"enum": [
|
|
1300
|
+
"agent",
|
|
1301
|
+
"human",
|
|
1302
|
+
null
|
|
1303
|
+
],
|
|
1304
|
+
"description": "Mark given to a branch created here; null for an existing branch."
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
"worktree_add_result": {
|
|
1309
|
+
"type": "object",
|
|
1310
|
+
"required": [
|
|
1311
|
+
"branch",
|
|
1312
|
+
"path",
|
|
1313
|
+
"source",
|
|
1314
|
+
"owner",
|
|
1315
|
+
"head"
|
|
1316
|
+
],
|
|
1317
|
+
"properties": {
|
|
1318
|
+
"branch": {
|
|
1319
|
+
"type": "string"
|
|
1320
|
+
},
|
|
1321
|
+
"path": {
|
|
1322
|
+
"type": "string"
|
|
1323
|
+
},
|
|
1324
|
+
"source": {
|
|
1325
|
+
"enum": [
|
|
1326
|
+
"existing",
|
|
1327
|
+
"remote",
|
|
1328
|
+
"new"
|
|
1329
|
+
]
|
|
1330
|
+
},
|
|
1331
|
+
"owner": {
|
|
1332
|
+
"enum": [
|
|
1333
|
+
"agent",
|
|
1334
|
+
"human",
|
|
1335
|
+
null
|
|
1336
|
+
]
|
|
1337
|
+
},
|
|
1338
|
+
"head": {
|
|
1339
|
+
"$ref": "#/$defs/sha"
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
},
|
|
1343
|
+
"worktree_remove_plan": {
|
|
1344
|
+
"type": "object",
|
|
1345
|
+
"required": [
|
|
1346
|
+
"worktrees",
|
|
1347
|
+
"force"
|
|
1348
|
+
],
|
|
1349
|
+
"properties": {
|
|
1350
|
+
"worktrees": {
|
|
1351
|
+
"type": "array",
|
|
1352
|
+
"items": {
|
|
1353
|
+
"type": "object",
|
|
1354
|
+
"required": [
|
|
1355
|
+
"path",
|
|
1356
|
+
"branch",
|
|
1357
|
+
"dirty",
|
|
1358
|
+
"locked"
|
|
1359
|
+
],
|
|
1360
|
+
"properties": {
|
|
1361
|
+
"path": {
|
|
1362
|
+
"type": "string"
|
|
1363
|
+
},
|
|
1364
|
+
"branch": {
|
|
1365
|
+
"type": [
|
|
1366
|
+
"string",
|
|
1367
|
+
"null"
|
|
1368
|
+
]
|
|
1369
|
+
},
|
|
1370
|
+
"dirty": {
|
|
1371
|
+
"type": [
|
|
1372
|
+
"boolean",
|
|
1373
|
+
"null"
|
|
1374
|
+
]
|
|
1375
|
+
},
|
|
1376
|
+
"locked": {
|
|
1377
|
+
"type": "boolean"
|
|
1378
|
+
},
|
|
1379
|
+
"ignored_count": {
|
|
1380
|
+
"type": "integer",
|
|
1381
|
+
"minimum": 0,
|
|
1382
|
+
"description": "Ignored files and directories that snapshots do not save and removal deletes for good."
|
|
1383
|
+
},
|
|
1384
|
+
"ignored": {
|
|
1385
|
+
"type": "array",
|
|
1386
|
+
"items": {
|
|
1387
|
+
"type": "string"
|
|
1388
|
+
},
|
|
1389
|
+
"description": "The first few of them."
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
},
|
|
1394
|
+
"force": {
|
|
1395
|
+
"type": "boolean"
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
},
|
|
1399
|
+
"worktree_remove_result": {
|
|
1400
|
+
"type": "object",
|
|
1401
|
+
"required": [
|
|
1402
|
+
"removed",
|
|
1403
|
+
"failed"
|
|
1404
|
+
],
|
|
1405
|
+
"properties": {
|
|
1406
|
+
"removed": {
|
|
1407
|
+
"type": "array",
|
|
1408
|
+
"description": "Bring one back with the undo command in its row.",
|
|
1409
|
+
"items": {
|
|
1410
|
+
"type": "object",
|
|
1411
|
+
"required": [
|
|
1412
|
+
"path",
|
|
1413
|
+
"branch",
|
|
1414
|
+
"head",
|
|
1415
|
+
"snapshot",
|
|
1416
|
+
"undo"
|
|
1417
|
+
],
|
|
1418
|
+
"properties": {
|
|
1419
|
+
"path": {
|
|
1420
|
+
"type": "string"
|
|
1421
|
+
},
|
|
1422
|
+
"branch": {
|
|
1423
|
+
"type": [
|
|
1424
|
+
"string",
|
|
1425
|
+
"null"
|
|
1426
|
+
]
|
|
1427
|
+
},
|
|
1428
|
+
"head": {
|
|
1429
|
+
"type": [
|
|
1430
|
+
"string",
|
|
1431
|
+
"null"
|
|
1432
|
+
]
|
|
1433
|
+
},
|
|
1434
|
+
"snapshot": {
|
|
1435
|
+
"type": "string"
|
|
1436
|
+
},
|
|
1437
|
+
"undo": {
|
|
1438
|
+
"type": "string"
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
"failed": {
|
|
1444
|
+
"type": "array",
|
|
1445
|
+
"items": {
|
|
1446
|
+
"type": "object",
|
|
1447
|
+
"required": [
|
|
1448
|
+
"path",
|
|
1449
|
+
"error"
|
|
1450
|
+
],
|
|
1451
|
+
"properties": {
|
|
1452
|
+
"path": {
|
|
1453
|
+
"type": "string"
|
|
1454
|
+
},
|
|
1455
|
+
"error": {
|
|
1456
|
+
"type": "string"
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
"worktree_prune_plan": {
|
|
1464
|
+
"type": "object",
|
|
1465
|
+
"required": [
|
|
1466
|
+
"worktrees"
|
|
1467
|
+
],
|
|
1468
|
+
"properties": {
|
|
1469
|
+
"worktrees": {
|
|
1470
|
+
"type": "array",
|
|
1471
|
+
"items": {
|
|
1472
|
+
"type": "string"
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
},
|
|
1477
|
+
"worktree_prune_result": {
|
|
1478
|
+
"type": "object",
|
|
1479
|
+
"required": [
|
|
1480
|
+
"pruned"
|
|
1481
|
+
],
|
|
1482
|
+
"properties": {
|
|
1483
|
+
"pruned": {
|
|
1484
|
+
"type": "array",
|
|
1485
|
+
"items": {
|
|
1486
|
+
"type": "string"
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"worktree_lock_plan": {
|
|
1492
|
+
"type": "object",
|
|
1493
|
+
"required": [
|
|
1494
|
+
"path"
|
|
1495
|
+
],
|
|
1496
|
+
"properties": {
|
|
1497
|
+
"path": {
|
|
1498
|
+
"type": "string"
|
|
1499
|
+
},
|
|
1500
|
+
"reason": {
|
|
1501
|
+
"type": "string"
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
},
|
|
1505
|
+
"worktree_unlock_plan": {
|
|
1506
|
+
"type": "object",
|
|
1507
|
+
"required": [
|
|
1508
|
+
"path"
|
|
1509
|
+
],
|
|
1510
|
+
"properties": {
|
|
1511
|
+
"path": {
|
|
1512
|
+
"type": "string"
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
},
|
|
1516
|
+
"worktree_lock_result": {
|
|
1517
|
+
"type": "object",
|
|
1518
|
+
"required": [
|
|
1519
|
+
"path",
|
|
1520
|
+
"locked"
|
|
1521
|
+
],
|
|
1522
|
+
"properties": {
|
|
1523
|
+
"path": {
|
|
1524
|
+
"type": "string"
|
|
1525
|
+
},
|
|
1526
|
+
"reason": {
|
|
1527
|
+
"type": "string"
|
|
1528
|
+
},
|
|
1529
|
+
"locked": {
|
|
1530
|
+
"type": "boolean"
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
"worktree_unlock_result": {
|
|
1535
|
+
"type": "object",
|
|
1536
|
+
"required": [
|
|
1537
|
+
"path",
|
|
1538
|
+
"locked"
|
|
1539
|
+
],
|
|
1540
|
+
"properties": {
|
|
1541
|
+
"path": {
|
|
1542
|
+
"type": "string"
|
|
1543
|
+
},
|
|
1544
|
+
"reason": {
|
|
1545
|
+
"type": "string"
|
|
1546
|
+
},
|
|
1547
|
+
"locked": {
|
|
1548
|
+
"type": "boolean"
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
},
|
|
1552
|
+
"worktree_move_plan": {
|
|
1553
|
+
"type": "object",
|
|
1554
|
+
"required": [
|
|
1555
|
+
"from",
|
|
1556
|
+
"to",
|
|
1557
|
+
"force"
|
|
1558
|
+
],
|
|
1559
|
+
"properties": {
|
|
1560
|
+
"from": {
|
|
1561
|
+
"type": "string"
|
|
1562
|
+
},
|
|
1563
|
+
"to": {
|
|
1564
|
+
"type": "string"
|
|
1565
|
+
},
|
|
1566
|
+
"force": {
|
|
1567
|
+
"type": "boolean"
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
},
|
|
1571
|
+
"worktree_move_result": {
|
|
1572
|
+
"type": "object",
|
|
1573
|
+
"required": [
|
|
1574
|
+
"from",
|
|
1575
|
+
"to"
|
|
1576
|
+
],
|
|
1577
|
+
"properties": {
|
|
1578
|
+
"from": {
|
|
1579
|
+
"type": "string"
|
|
1580
|
+
},
|
|
1581
|
+
"to": {
|
|
1582
|
+
"type": "string"
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
},
|
|
1586
|
+
"clean_plan": {
|
|
1587
|
+
"type": "object",
|
|
1588
|
+
"required": [
|
|
1589
|
+
"branches",
|
|
1590
|
+
"force",
|
|
1591
|
+
"reasons",
|
|
1592
|
+
"skipped"
|
|
1593
|
+
],
|
|
1594
|
+
"properties": {
|
|
1595
|
+
"branches": {
|
|
1596
|
+
"type": "array",
|
|
1597
|
+
"items": {
|
|
1598
|
+
"type": "string"
|
|
1599
|
+
}
|
|
1600
|
+
},
|
|
1601
|
+
"force": {
|
|
1602
|
+
"type": "boolean"
|
|
1603
|
+
},
|
|
1604
|
+
"reasons": {
|
|
1605
|
+
"type": "object",
|
|
1606
|
+
"description": "Why each branch was chosen, by branch name.",
|
|
1607
|
+
"additionalProperties": {
|
|
1608
|
+
"type": "array",
|
|
1609
|
+
"items": {
|
|
1610
|
+
"type": "string"
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
},
|
|
1614
|
+
"skipped": {
|
|
1615
|
+
"type": "array",
|
|
1616
|
+
"description": "Matching branches that were kept.",
|
|
1617
|
+
"items": {
|
|
1618
|
+
"type": "object",
|
|
1619
|
+
"required": [
|
|
1620
|
+
"branch",
|
|
1621
|
+
"reason"
|
|
1622
|
+
],
|
|
1623
|
+
"properties": {
|
|
1624
|
+
"branch": {
|
|
1625
|
+
"type": "string"
|
|
1626
|
+
},
|
|
1627
|
+
"reason": {
|
|
1628
|
+
"type": "string"
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
},
|
|
1635
|
+
"worktree_clean_plan": {
|
|
1636
|
+
"type": "object",
|
|
1637
|
+
"required": [
|
|
1638
|
+
"worktrees",
|
|
1639
|
+
"force",
|
|
1640
|
+
"skipped"
|
|
1641
|
+
],
|
|
1642
|
+
"properties": {
|
|
1643
|
+
"worktrees": {
|
|
1644
|
+
"type": "array",
|
|
1645
|
+
"items": {
|
|
1646
|
+
"type": "object",
|
|
1647
|
+
"required": [
|
|
1648
|
+
"path",
|
|
1649
|
+
"branch",
|
|
1650
|
+
"dirty",
|
|
1651
|
+
"locked"
|
|
1652
|
+
],
|
|
1653
|
+
"properties": {
|
|
1654
|
+
"path": {
|
|
1655
|
+
"type": "string"
|
|
1656
|
+
},
|
|
1657
|
+
"branch": {
|
|
1658
|
+
"type": [
|
|
1659
|
+
"string",
|
|
1660
|
+
"null"
|
|
1661
|
+
]
|
|
1662
|
+
},
|
|
1663
|
+
"dirty": {
|
|
1664
|
+
"type": [
|
|
1665
|
+
"boolean",
|
|
1666
|
+
"null"
|
|
1667
|
+
]
|
|
1668
|
+
},
|
|
1669
|
+
"locked": {
|
|
1670
|
+
"type": "boolean"
|
|
1671
|
+
},
|
|
1672
|
+
"reasons": {
|
|
1673
|
+
"type": "array",
|
|
1674
|
+
"items": {
|
|
1675
|
+
"type": "string"
|
|
1676
|
+
}
|
|
1677
|
+
},
|
|
1678
|
+
"ignored_count": {
|
|
1679
|
+
"type": "integer",
|
|
1680
|
+
"minimum": 0
|
|
1681
|
+
},
|
|
1682
|
+
"ignored": {
|
|
1683
|
+
"type": "array",
|
|
1684
|
+
"items": {
|
|
1685
|
+
"type": "string"
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
},
|
|
1691
|
+
"force": {
|
|
1692
|
+
"type": "boolean"
|
|
1693
|
+
},
|
|
1694
|
+
"skipped": {
|
|
1695
|
+
"type": "array",
|
|
1696
|
+
"description": "Matching worktrees that were kept, with the reason.",
|
|
1697
|
+
"items": {
|
|
1698
|
+
"type": "object",
|
|
1699
|
+
"required": [
|
|
1700
|
+
"path",
|
|
1701
|
+
"branch",
|
|
1702
|
+
"reason"
|
|
1703
|
+
],
|
|
1704
|
+
"properties": {
|
|
1705
|
+
"path": {
|
|
1706
|
+
"type": "string"
|
|
1707
|
+
},
|
|
1708
|
+
"branch": {
|
|
1709
|
+
"type": [
|
|
1710
|
+
"string",
|
|
1711
|
+
"null"
|
|
1712
|
+
]
|
|
1713
|
+
},
|
|
1714
|
+
"reason": {
|
|
1715
|
+
"type": "string"
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
},
|
|
1722
|
+
"pick_candidate": {
|
|
1723
|
+
"type": "object",
|
|
1724
|
+
"required": [
|
|
1725
|
+
"sha",
|
|
1726
|
+
"short_sha",
|
|
1727
|
+
"subject",
|
|
1728
|
+
"author",
|
|
1729
|
+
"date",
|
|
1730
|
+
"status",
|
|
1731
|
+
"files",
|
|
1732
|
+
"insertions",
|
|
1733
|
+
"deletions"
|
|
1734
|
+
],
|
|
1735
|
+
"properties": {
|
|
1736
|
+
"sha": {
|
|
1737
|
+
"$ref": "#/$defs/sha"
|
|
1738
|
+
},
|
|
1739
|
+
"short_sha": {
|
|
1740
|
+
"type": "string"
|
|
1741
|
+
},
|
|
1742
|
+
"subject": {
|
|
1743
|
+
"type": "string"
|
|
1744
|
+
},
|
|
1745
|
+
"author": {
|
|
1746
|
+
"type": "string"
|
|
1747
|
+
},
|
|
1748
|
+
"date": {
|
|
1749
|
+
"type": "string",
|
|
1750
|
+
"format": "date-time"
|
|
1751
|
+
},
|
|
1752
|
+
"status": {
|
|
1753
|
+
"enum": [
|
|
1754
|
+
"new",
|
|
1755
|
+
"applied"
|
|
1756
|
+
],
|
|
1757
|
+
"description": "applied: an equivalent change is already on the current branch."
|
|
1758
|
+
},
|
|
1759
|
+
"files": {
|
|
1760
|
+
"type": "integer",
|
|
1761
|
+
"minimum": 0
|
|
1762
|
+
},
|
|
1763
|
+
"insertions": {
|
|
1764
|
+
"type": "integer",
|
|
1765
|
+
"minimum": 0
|
|
1766
|
+
},
|
|
1767
|
+
"deletions": {
|
|
1768
|
+
"type": "integer",
|
|
1769
|
+
"minimum": 0
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
"pick_list_result": {
|
|
1774
|
+
"type": "object",
|
|
1775
|
+
"required": [
|
|
1776
|
+
"source",
|
|
1777
|
+
"commits"
|
|
1778
|
+
],
|
|
1779
|
+
"properties": {
|
|
1780
|
+
"source": {
|
|
1781
|
+
"type": "string"
|
|
1782
|
+
},
|
|
1783
|
+
"commits": {
|
|
1784
|
+
"type": "array",
|
|
1785
|
+
"description": "Oldest first.",
|
|
1786
|
+
"items": {
|
|
1787
|
+
"$ref": "#/$defs/pick_candidate"
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
},
|
|
1792
|
+
"pick_plan": {
|
|
1793
|
+
"type": "object",
|
|
1794
|
+
"description": "A new pick, or --continue / --skip / --abort of one in progress.",
|
|
1795
|
+
"properties": {
|
|
1796
|
+
"source": {
|
|
1797
|
+
"type": "string"
|
|
1798
|
+
},
|
|
1799
|
+
"commits": {
|
|
1800
|
+
"type": "array",
|
|
1801
|
+
"items": {
|
|
1802
|
+
"$ref": "#/$defs/sha"
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
"skipped": {
|
|
1806
|
+
"type": "array",
|
|
1807
|
+
"items": {
|
|
1808
|
+
"type": "object",
|
|
1809
|
+
"required": [
|
|
1810
|
+
"sha",
|
|
1811
|
+
"reason"
|
|
1812
|
+
],
|
|
1813
|
+
"properties": {
|
|
1814
|
+
"sha": {
|
|
1815
|
+
"$ref": "#/$defs/sha"
|
|
1816
|
+
},
|
|
1817
|
+
"reason": {
|
|
1818
|
+
"type": "string"
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
},
|
|
1823
|
+
"commit": {
|
|
1824
|
+
"type": "boolean"
|
|
1825
|
+
},
|
|
1826
|
+
"action": {
|
|
1827
|
+
"enum": [
|
|
1828
|
+
"continue",
|
|
1829
|
+
"skip",
|
|
1830
|
+
"abort"
|
|
1831
|
+
]
|
|
1832
|
+
},
|
|
1833
|
+
"current": {
|
|
1834
|
+
"type": [
|
|
1835
|
+
"string",
|
|
1836
|
+
"null"
|
|
1837
|
+
]
|
|
1838
|
+
},
|
|
1839
|
+
"conflicted": {
|
|
1840
|
+
"type": "array",
|
|
1841
|
+
"items": {
|
|
1842
|
+
"type": "string"
|
|
1843
|
+
}
|
|
1844
|
+
},
|
|
1845
|
+
"remaining": {
|
|
1846
|
+
"type": "array",
|
|
1847
|
+
"items": {
|
|
1848
|
+
"$ref": "#/$defs/sha"
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
},
|
|
1853
|
+
"pick_result": {
|
|
1854
|
+
"type": "object",
|
|
1855
|
+
"description": "done or noop: applied and head (or action and head); failed on conflicts: applied, current, conflicted, remaining.",
|
|
1856
|
+
"properties": {
|
|
1857
|
+
"applied": {
|
|
1858
|
+
"type": "array",
|
|
1859
|
+
"items": {
|
|
1860
|
+
"$ref": "#/$defs/sha"
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
"head": {
|
|
1864
|
+
"$ref": "#/$defs/sha"
|
|
1865
|
+
},
|
|
1866
|
+
"action": {
|
|
1867
|
+
"enum": [
|
|
1868
|
+
"continue",
|
|
1869
|
+
"skip",
|
|
1870
|
+
"abort"
|
|
1871
|
+
]
|
|
1872
|
+
},
|
|
1873
|
+
"current": {
|
|
1874
|
+
"type": [
|
|
1875
|
+
"string",
|
|
1876
|
+
"null"
|
|
1877
|
+
]
|
|
1878
|
+
},
|
|
1879
|
+
"conflicted": {
|
|
1880
|
+
"type": "array",
|
|
1881
|
+
"items": {
|
|
1882
|
+
"type": "string"
|
|
1883
|
+
}
|
|
1884
|
+
},
|
|
1885
|
+
"remaining": {
|
|
1886
|
+
"type": "array",
|
|
1887
|
+
"items": {
|
|
1888
|
+
"$ref": "#/$defs/sha"
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
},
|
|
1893
|
+
"mark_plan": {
|
|
1894
|
+
"type": "object",
|
|
1895
|
+
"required": [
|
|
1896
|
+
"branches",
|
|
1897
|
+
"owner"
|
|
1898
|
+
],
|
|
1899
|
+
"properties": {
|
|
1900
|
+
"branches": {
|
|
1901
|
+
"type": "array",
|
|
1902
|
+
"items": {
|
|
1903
|
+
"type": "string"
|
|
1904
|
+
}
|
|
1905
|
+
},
|
|
1906
|
+
"owner": {
|
|
1907
|
+
"enum": [
|
|
1908
|
+
"agent",
|
|
1909
|
+
"human",
|
|
1910
|
+
null
|
|
1911
|
+
],
|
|
1912
|
+
"description": "The owner to set; null clears the mark."
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
},
|
|
1916
|
+
"mark_result": {
|
|
1917
|
+
"type": "object",
|
|
1918
|
+
"required": [
|
|
1919
|
+
"branches"
|
|
1920
|
+
],
|
|
1921
|
+
"properties": {
|
|
1922
|
+
"branches": {
|
|
1923
|
+
"type": "array",
|
|
1924
|
+
"items": {
|
|
1925
|
+
"type": "object",
|
|
1926
|
+
"required": [
|
|
1927
|
+
"branch",
|
|
1928
|
+
"owner",
|
|
1929
|
+
"previous"
|
|
1930
|
+
],
|
|
1931
|
+
"properties": {
|
|
1932
|
+
"branch": {
|
|
1933
|
+
"type": "string"
|
|
1934
|
+
},
|
|
1935
|
+
"owner": {
|
|
1936
|
+
"enum": [
|
|
1937
|
+
"agent",
|
|
1938
|
+
"human",
|
|
1939
|
+
null
|
|
1940
|
+
]
|
|
1941
|
+
},
|
|
1942
|
+
"previous": {
|
|
1943
|
+
"enum": [
|
|
1944
|
+
"agent",
|
|
1945
|
+
"human",
|
|
1946
|
+
null
|
|
1947
|
+
]
|
|
900
1948
|
}
|
|
901
1949
|
}
|
|
902
1950
|
}
|