bingo-light 2.1.1 → 2.1.3
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.
- package/README.en.md +20 -7
- package/README.md +209 -126
- package/bingo-light +385 -11
- package/bingo_core/__init__.py +3 -1
- package/bingo_core/dep.py +1012 -0
- package/bingo_core/dep_fork.py +268 -0
- package/bingo_core/dep_npm.py +113 -0
- package/bingo_core/dep_pip.py +178 -0
- package/bingo_core/repo.py +795 -8
- package/bingo_core/setup.py +73 -17
- package/bingo_core/state.py +1 -1
- package/bingo_core/team.py +170 -0
- package/completions/bingo-light.bash +26 -3
- package/completions/bingo-light.fish +46 -1
- package/completions/bingo-light.zsh +38 -2
- package/mcp-server.py +346 -6
- package/package.json +1 -1
package/mcp-server.py
CHANGED
|
@@ -231,7 +231,7 @@ TOOLS = [
|
|
|
231
231
|
"name": "bingo_doctor",
|
|
232
232
|
"description": (
|
|
233
233
|
"Diagnose setup issues: checks git version, rerere, upstream remote, branch structure, "
|
|
234
|
-
"and tests whether patches apply cleanly on latest upstream."
|
|
234
|
+
"and tests whether patches apply cleanly on latest upstream. Use report=true for extended checks."
|
|
235
235
|
),
|
|
236
236
|
"inputSchema": {
|
|
237
237
|
"type": "object",
|
|
@@ -239,6 +239,10 @@ TOOLS = [
|
|
|
239
239
|
"cwd": {
|
|
240
240
|
"type": "string",
|
|
241
241
|
"description": "Path to the git repository"
|
|
242
|
+
},
|
|
243
|
+
"report": {
|
|
244
|
+
"type": "boolean",
|
|
245
|
+
"description": "Include extended checks (team locks, expiry, deps)"
|
|
242
246
|
}
|
|
243
247
|
},
|
|
244
248
|
"required": ["cwd"]
|
|
@@ -283,8 +287,10 @@ TOOLS = [
|
|
|
283
287
|
{
|
|
284
288
|
"name": "bingo_conflict_analyze",
|
|
285
289
|
"description": (
|
|
286
|
-
"Analyze current rebase conflicts. Returns structured info about each conflicted file
|
|
287
|
-
"
|
|
290
|
+
"Analyze current rebase conflicts. Returns structured info about each conflicted file "
|
|
291
|
+
"(ours/theirs, conflict count, hints) plus patch_intent (name, subject, full commit "
|
|
292
|
+
"message, original_sha, original_diff, meta, stack_position) and verify "
|
|
293
|
+
"(test_command + per-file syntax/parse commands). "
|
|
288
294
|
"Call this when bingo_sync reports a conflict to understand what needs fixing."
|
|
289
295
|
),
|
|
290
296
|
"inputSchema": {
|
|
@@ -302,7 +308,9 @@ TOOLS = [
|
|
|
302
308
|
"name": "bingo_conflict_resolve",
|
|
303
309
|
"description": (
|
|
304
310
|
"Resolve a conflict during rebase by writing the resolved content to a file, "
|
|
305
|
-
"staging it, and continuing the rebase. Use after bingo_conflict_analyze."
|
|
311
|
+
"staging it, and continuing the rebase. Use after bingo_conflict_analyze. "
|
|
312
|
+
"Set verify=true to run test.command after the final rebase --continue; "
|
|
313
|
+
"the result is attached as verify_result."
|
|
306
314
|
),
|
|
307
315
|
"inputSchema": {
|
|
308
316
|
"type": "object",
|
|
@@ -318,6 +326,10 @@ TOOLS = [
|
|
|
318
326
|
"content": {
|
|
319
327
|
"type": "string",
|
|
320
328
|
"description": "The fully resolved file content (no conflict markers)"
|
|
329
|
+
},
|
|
330
|
+
"verify": {
|
|
331
|
+
"type": "boolean",
|
|
332
|
+
"description": "If true, run test.command after the final rebase --continue. Default false."
|
|
321
333
|
}
|
|
322
334
|
},
|
|
323
335
|
"required": ["cwd", "file", "content"]
|
|
@@ -469,6 +481,256 @@ TOOLS = [
|
|
|
469
481
|
"required": ["cwd"]
|
|
470
482
|
}
|
|
471
483
|
},
|
|
484
|
+
# ── Dependency Patching Tools ─────────────────────────────────────────
|
|
485
|
+
{
|
|
486
|
+
"name": "bingo_dep_patch",
|
|
487
|
+
"description": (
|
|
488
|
+
"Create a patch for a modified npm/pip dependency. After modifying files in "
|
|
489
|
+
"node_modules/ or site-packages/, call this to generate a .patch file. "
|
|
490
|
+
"The patch survives npm install / pip install via `bingo_dep_apply`."
|
|
491
|
+
),
|
|
492
|
+
"inputSchema": {
|
|
493
|
+
"type": "object",
|
|
494
|
+
"properties": {
|
|
495
|
+
"cwd": {"type": "string", "description": "Project directory"},
|
|
496
|
+
"package": {"type": "string", "description": "Package name (e.g. 'lodash', 'requests')"},
|
|
497
|
+
"patch_name": {"type": "string", "description": "Optional patch name"},
|
|
498
|
+
"description": {"type": "string", "description": "What this patch fixes"}
|
|
499
|
+
},
|
|
500
|
+
"required": ["cwd", "package"]
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "bingo_dep_apply",
|
|
505
|
+
"description": (
|
|
506
|
+
"Re-apply all dependency patches after npm install / pip install. "
|
|
507
|
+
"Call this as a postinstall hook or after any package manager update."
|
|
508
|
+
),
|
|
509
|
+
"inputSchema": {
|
|
510
|
+
"type": "object",
|
|
511
|
+
"properties": {
|
|
512
|
+
"cwd": {"type": "string", "description": "Project directory"},
|
|
513
|
+
"package": {"type": "string", "description": "Optional: apply only this package's patches"}
|
|
514
|
+
},
|
|
515
|
+
"required": ["cwd"]
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"name": "bingo_dep_status",
|
|
520
|
+
"description": (
|
|
521
|
+
"Show health of all dependency patches. Reports version mismatches "
|
|
522
|
+
"(upstream updated but patches were generated against old version)."
|
|
523
|
+
),
|
|
524
|
+
"inputSchema": {
|
|
525
|
+
"type": "object",
|
|
526
|
+
"properties": {"cwd": {"type": "string", "description": "Project directory"}},
|
|
527
|
+
"required": ["cwd"]
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"name": "bingo_dep_sync",
|
|
532
|
+
"description": (
|
|
533
|
+
"After npm update / pip install --upgrade, re-apply patches and detect conflicts. "
|
|
534
|
+
"Returns ok if all patches apply cleanly, or conflict details if patches broke."
|
|
535
|
+
),
|
|
536
|
+
"inputSchema": {
|
|
537
|
+
"type": "object",
|
|
538
|
+
"properties": {"cwd": {"type": "string", "description": "Project directory"}},
|
|
539
|
+
"required": ["cwd"]
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"name": "bingo_dep_list",
|
|
544
|
+
"description": "List all dependency patches across all tracked packages.",
|
|
545
|
+
"inputSchema": {
|
|
546
|
+
"type": "object",
|
|
547
|
+
"properties": {"cwd": {"type": "string", "description": "Project directory"}},
|
|
548
|
+
"required": ["cwd"]
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
"name": "bingo_dep_drop",
|
|
553
|
+
"description": "Remove a dependency patch or all patches for a package.",
|
|
554
|
+
"inputSchema": {
|
|
555
|
+
"type": "object",
|
|
556
|
+
"properties": {
|
|
557
|
+
"cwd": {"type": "string", "description": "Project directory"},
|
|
558
|
+
"package": {"type": "string", "description": "Package name"},
|
|
559
|
+
"patch_name": {"type": "string", "description": "Specific patch to drop (omit for all)"}
|
|
560
|
+
},
|
|
561
|
+
"required": ["cwd", "package"]
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
# ── Team / Locking tools ────────────────────────────────────────────
|
|
565
|
+
{
|
|
566
|
+
"name": "bingo_patch_lock",
|
|
567
|
+
"description": "Lock a patch for exclusive editing. Prevents other team members from editing or dropping it.",
|
|
568
|
+
"inputSchema": {
|
|
569
|
+
"type": "object",
|
|
570
|
+
"properties": {
|
|
571
|
+
"cwd": {"type": "string", "description": "Path to the git repository"},
|
|
572
|
+
"name": {"type": "string", "description": "Patch name to lock"},
|
|
573
|
+
"reason": {"type": "string", "description": "Why you are locking this patch"}
|
|
574
|
+
},
|
|
575
|
+
"required": ["cwd", "name"]
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"name": "bingo_patch_unlock",
|
|
580
|
+
"description": "Unlock a patch, allowing other team members to edit or drop it.",
|
|
581
|
+
"inputSchema": {
|
|
582
|
+
"type": "object",
|
|
583
|
+
"properties": {
|
|
584
|
+
"cwd": {"type": "string", "description": "Path to the git repository"},
|
|
585
|
+
"name": {"type": "string", "description": "Patch name to unlock"},
|
|
586
|
+
"force": {"type": "boolean", "description": "Force unlock even if locked by someone else"}
|
|
587
|
+
},
|
|
588
|
+
"required": ["cwd", "name"]
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
# ── Smart Patch Management tools ────────────────────────────────────
|
|
592
|
+
{
|
|
593
|
+
"name": "bingo_patch_check",
|
|
594
|
+
"description": "Check if patches are still needed. Detects if upstream has merged equivalent changes, making a patch obsolete.",
|
|
595
|
+
"inputSchema": {
|
|
596
|
+
"type": "object",
|
|
597
|
+
"properties": {
|
|
598
|
+
"cwd": {"type": "string", "description": "Path to the git repository"},
|
|
599
|
+
"name": {"type": "string", "description": "Patch name to check (omit for all patches)"}
|
|
600
|
+
},
|
|
601
|
+
"required": ["cwd"]
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"name": "bingo_patch_upstream",
|
|
606
|
+
"description": "Export a patch as a clean PR-ready diff suitable for submitting to the upstream repository.",
|
|
607
|
+
"inputSchema": {
|
|
608
|
+
"type": "object",
|
|
609
|
+
"properties": {
|
|
610
|
+
"cwd": {"type": "string", "description": "Path to the git repository"},
|
|
611
|
+
"name": {"type": "string", "description": "Patch name to export"}
|
|
612
|
+
},
|
|
613
|
+
"required": ["cwd", "name"]
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"name": "bingo_patch_expire",
|
|
618
|
+
"description": "List patches that have passed their expiry date or are expiring soon (within 7 days).",
|
|
619
|
+
"inputSchema": {
|
|
620
|
+
"type": "object",
|
|
621
|
+
"properties": {
|
|
622
|
+
"cwd": {"type": "string", "description": "Path to the git repository"}
|
|
623
|
+
},
|
|
624
|
+
"required": ["cwd"]
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"name": "bingo_patch_stats",
|
|
629
|
+
"description": "Get health metrics for all patches: age, size, conflict frequency.",
|
|
630
|
+
"inputSchema": {
|
|
631
|
+
"type": "object",
|
|
632
|
+
"properties": {
|
|
633
|
+
"cwd": {"type": "string", "description": "Path to the git repository"}
|
|
634
|
+
},
|
|
635
|
+
"required": ["cwd"]
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
# ── Report tool ─────────────────────────────────────────────────────
|
|
639
|
+
{
|
|
640
|
+
"name": "bingo_report",
|
|
641
|
+
"description": "Generate a comprehensive markdown health report covering patches, sync status, team locks, expiry, and dependencies.",
|
|
642
|
+
"inputSchema": {
|
|
643
|
+
"type": "object",
|
|
644
|
+
"properties": {
|
|
645
|
+
"cwd": {"type": "string", "description": "Path to the git repository"}
|
|
646
|
+
},
|
|
647
|
+
"required": ["cwd"]
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
# ── npm Override Management tools ───────────────────────────────────
|
|
651
|
+
{
|
|
652
|
+
"name": "bingo_dep_override_list",
|
|
653
|
+
"description": "List all npm overrides/yarn resolutions with tracked reasons.",
|
|
654
|
+
"inputSchema": {
|
|
655
|
+
"type": "object",
|
|
656
|
+
"properties": {
|
|
657
|
+
"cwd": {"type": "string", "description": "Project directory"}
|
|
658
|
+
},
|
|
659
|
+
"required": ["cwd"]
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"name": "bingo_dep_override_check",
|
|
664
|
+
"description": "Check if npm overrides are still needed by comparing against package-lock.json resolved versions.",
|
|
665
|
+
"inputSchema": {
|
|
666
|
+
"type": "object",
|
|
667
|
+
"properties": {
|
|
668
|
+
"cwd": {"type": "string", "description": "Project directory"}
|
|
669
|
+
},
|
|
670
|
+
"required": ["cwd"]
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"name": "bingo_dep_override_add",
|
|
675
|
+
"description": "Add an npm override to package.json with reason tracking.",
|
|
676
|
+
"inputSchema": {
|
|
677
|
+
"type": "object",
|
|
678
|
+
"properties": {
|
|
679
|
+
"cwd": {"type": "string", "description": "Project directory"},
|
|
680
|
+
"package": {"type": "string", "description": "Package to override"},
|
|
681
|
+
"version": {"type": "string", "description": "Version to force"},
|
|
682
|
+
"reason": {"type": "string", "description": "Why this override exists"}
|
|
683
|
+
},
|
|
684
|
+
"required": ["cwd", "package", "version"]
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"name": "bingo_dep_override_drop",
|
|
689
|
+
"description": "Remove an npm override from package.json and tracking.",
|
|
690
|
+
"inputSchema": {
|
|
691
|
+
"type": "object",
|
|
692
|
+
"properties": {
|
|
693
|
+
"cwd": {"type": "string", "description": "Project directory"},
|
|
694
|
+
"package": {"type": "string", "description": "Package to remove override for"}
|
|
695
|
+
},
|
|
696
|
+
"required": ["cwd", "package"]
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
# ── Fork-as-Dependency Tracking tools ───────────────────────────────
|
|
700
|
+
{
|
|
701
|
+
"name": "bingo_dep_fork_list",
|
|
702
|
+
"description": "List all git-based dependencies in package.json (github:user/repo, git+https://, etc.).",
|
|
703
|
+
"inputSchema": {
|
|
704
|
+
"type": "object",
|
|
705
|
+
"properties": {
|
|
706
|
+
"cwd": {"type": "string", "description": "Project directory"}
|
|
707
|
+
},
|
|
708
|
+
"required": ["cwd"]
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"name": "bingo_dep_fork_check",
|
|
713
|
+
"description": "Check fork drift: compare git dependency refs against latest npm releases and GitHub commits.",
|
|
714
|
+
"inputSchema": {
|
|
715
|
+
"type": "object",
|
|
716
|
+
"properties": {
|
|
717
|
+
"cwd": {"type": "string", "description": "Project directory"}
|
|
718
|
+
},
|
|
719
|
+
"required": ["cwd"]
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"name": "bingo_dep_fork_sync",
|
|
724
|
+
"description": "Update a fork dependency ref in package.json to the latest GitHub commit.",
|
|
725
|
+
"inputSchema": {
|
|
726
|
+
"type": "object",
|
|
727
|
+
"properties": {
|
|
728
|
+
"cwd": {"type": "string", "description": "Project directory"},
|
|
729
|
+
"package": {"type": "string", "description": "Package to update"}
|
|
730
|
+
},
|
|
731
|
+
"required": ["cwd", "package"]
|
|
732
|
+
}
|
|
733
|
+
},
|
|
472
734
|
]
|
|
473
735
|
|
|
474
736
|
# ─── Command Mapping ──────────────────────────────────────────────────────────
|
|
@@ -520,7 +782,7 @@ def handle_tool_call(name: str, arguments: dict) -> dict:
|
|
|
520
782
|
return _result(repo.undo())
|
|
521
783
|
|
|
522
784
|
elif name == "bingo_doctor":
|
|
523
|
-
return _result(repo.doctor())
|
|
785
|
+
return _result(repo.doctor(report=arguments.get("report", False)))
|
|
524
786
|
|
|
525
787
|
elif name == "bingo_diff":
|
|
526
788
|
return _result(repo.diff())
|
|
@@ -535,6 +797,7 @@ def handle_tool_call(name: str, arguments: dict) -> dict:
|
|
|
535
797
|
return _result(repo.conflict_resolve(
|
|
536
798
|
arguments.get("file", ""),
|
|
537
799
|
arguments.get("content", ""),
|
|
800
|
+
verify=bool(arguments.get("verify", False)),
|
|
538
801
|
))
|
|
539
802
|
|
|
540
803
|
elif name == "bingo_log":
|
|
@@ -629,6 +892,83 @@ def handle_tool_call(name: str, arguments: dict) -> dict:
|
|
|
629
892
|
elif name == "bingo_workspace_status":
|
|
630
893
|
return _result(repo.workspace_status())
|
|
631
894
|
|
|
895
|
+
# ── Team / Locking tools ──────────────────────────────────────────
|
|
896
|
+
elif name == "bingo_patch_lock":
|
|
897
|
+
return _result(repo.patch_lock(
|
|
898
|
+
arguments["name"],
|
|
899
|
+
reason=arguments.get("reason", ""),
|
|
900
|
+
))
|
|
901
|
+
|
|
902
|
+
elif name == "bingo_patch_unlock":
|
|
903
|
+
return _result(repo.patch_unlock(
|
|
904
|
+
arguments["name"],
|
|
905
|
+
force=arguments.get("force", False),
|
|
906
|
+
))
|
|
907
|
+
|
|
908
|
+
# ── Smart Patch Management tools ──────────────────────────────────
|
|
909
|
+
elif name == "bingo_patch_check":
|
|
910
|
+
return _result(repo.patch_check(arguments.get("name", "")))
|
|
911
|
+
|
|
912
|
+
elif name == "bingo_patch_upstream":
|
|
913
|
+
return _result(repo.patch_upstream(arguments["name"]))
|
|
914
|
+
|
|
915
|
+
elif name == "bingo_patch_expire":
|
|
916
|
+
return _result(repo.patch_expire())
|
|
917
|
+
|
|
918
|
+
elif name == "bingo_patch_stats":
|
|
919
|
+
return _result(repo.patch_stats())
|
|
920
|
+
|
|
921
|
+
# ── Report tool ───────────────────────────────────────────────────
|
|
922
|
+
elif name == "bingo_report":
|
|
923
|
+
return _result(repo.report())
|
|
924
|
+
|
|
925
|
+
# ── Dependency patching tools ────────────────────────────────────
|
|
926
|
+
elif name.startswith("bingo_dep_"):
|
|
927
|
+
from bingo_core.dep import DepManager
|
|
928
|
+
dm = DepManager(cwd)
|
|
929
|
+
|
|
930
|
+
if name == "bingo_dep_patch":
|
|
931
|
+
return _result(dm.patch(
|
|
932
|
+
arguments["package"],
|
|
933
|
+
arguments.get("patch_name", ""),
|
|
934
|
+
arguments.get("description", ""),
|
|
935
|
+
))
|
|
936
|
+
elif name == "bingo_dep_apply":
|
|
937
|
+
return _result(dm.apply(arguments.get("package", "")))
|
|
938
|
+
elif name == "bingo_dep_status":
|
|
939
|
+
return _result(dm.status())
|
|
940
|
+
elif name == "bingo_dep_sync":
|
|
941
|
+
return _result(dm.sync())
|
|
942
|
+
elif name == "bingo_dep_list":
|
|
943
|
+
return _result(dm.list_patches())
|
|
944
|
+
elif name == "bingo_dep_drop":
|
|
945
|
+
return _result(dm.drop(
|
|
946
|
+
arguments["package"],
|
|
947
|
+
arguments.get("patch_name", ""),
|
|
948
|
+
))
|
|
949
|
+
# Override management
|
|
950
|
+
elif name == "bingo_dep_override_list":
|
|
951
|
+
return _result(dm.override_list())
|
|
952
|
+
elif name == "bingo_dep_override_check":
|
|
953
|
+
return _result(dm.override_check())
|
|
954
|
+
elif name == "bingo_dep_override_add":
|
|
955
|
+
return _result(dm.override_add(
|
|
956
|
+
arguments["package"], arguments["version"],
|
|
957
|
+
arguments.get("reason", ""),
|
|
958
|
+
))
|
|
959
|
+
elif name == "bingo_dep_override_drop":
|
|
960
|
+
return _result(dm.override_drop(arguments["package"]))
|
|
961
|
+
# Fork tracking
|
|
962
|
+
elif name.startswith("bingo_dep_fork_"):
|
|
963
|
+
from bingo_core.dep_fork import ForkTracker
|
|
964
|
+
ft = ForkTracker(cwd)
|
|
965
|
+
if name == "bingo_dep_fork_list":
|
|
966
|
+
return _result(ft.fork_list())
|
|
967
|
+
elif name == "bingo_dep_fork_check":
|
|
968
|
+
return _result(ft.fork_check())
|
|
969
|
+
elif name == "bingo_dep_fork_sync":
|
|
970
|
+
return _result(ft.fork_sync(arguments["package"]))
|
|
971
|
+
|
|
632
972
|
else:
|
|
633
973
|
return {
|
|
634
974
|
"content": [{"type": "text", "text": f"Unknown tool: {name}"}],
|
|
@@ -754,7 +1094,7 @@ def main():
|
|
|
754
1094
|
"capabilities": {"tools": {}},
|
|
755
1095
|
"serverInfo": {
|
|
756
1096
|
"name": "bingo-light",
|
|
757
|
-
"version": "2.1.
|
|
1097
|
+
"version": "2.1.3",
|
|
758
1098
|
},
|
|
759
1099
|
}))
|
|
760
1100
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bingo-light",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "AI-native fork maintenance — manage customizations as a clean patch stack on top of upstream",
|
|
5
5
|
"keywords": ["git", "fork", "patch", "mcp", "ai", "maintenance", "upstream", "rebase"],
|
|
6
6
|
"homepage": "https://github.com/DanOps-1/bingo-light",
|