@@ -416,6 +416,9 @@ fn sync_all_versions() {
416
416
// Sync MCP agent
417
417
sync_mcp_agent ( & workspace_version) ;
418
418
419
+ // Sync Browser Extension
420
+ sync_browser_extension ( & workspace_version) ;
421
+
419
422
// Update Cargo.lock
420
423
println ! ( "🔒 Updating Cargo.lock..." ) ;
421
424
if let Err ( e) = run_command ( "cargo" , & [ "check" , "--quiet" ] ) {
@@ -556,6 +559,42 @@ fn sync_mcp_agent(version: &str) {
556
559
println ! ( "✅ MCP agent synced" ) ;
557
560
}
558
561
562
+ fn sync_browser_extension ( version : & str ) {
563
+ println ! ( "📦 Syncing browser extension to version {version}..." ) ;
564
+
565
+ let ext_dir = Path :: new ( "terminator/browser-extension" ) ;
566
+ if !ext_dir. exists ( ) {
567
+ println ! ( "⚠️ Browser extension directory not found, skipping" ) ;
568
+ return ;
569
+ }
570
+
571
+ let manifest_path = ext_dir. join ( "manifest.json" ) ;
572
+ if manifest_path. exists ( ) {
573
+ if let Err ( e) = update_json_version ( & manifest_path. to_string_lossy ( ) , version) {
574
+ eprintln ! (
575
+ "⚠️ Warning: Failed to update {}: {}" ,
576
+ manifest_path. display( ) ,
577
+ e
578
+ ) ;
579
+ } else {
580
+ println ! ( "✅ Updated manifest.json to {version}" ) ;
581
+ }
582
+ }
583
+
584
+ let build_check_path = ext_dir. join ( "build_check.json" ) ;
585
+ if build_check_path. exists ( ) {
586
+ if let Err ( e) = update_json_version ( & build_check_path. to_string_lossy ( ) , version) {
587
+ eprintln ! (
588
+ "⚠️ Warning: Failed to update {}: {}" ,
589
+ build_check_path. display( ) ,
590
+ e
591
+ ) ;
592
+ } else {
593
+ println ! ( "✅ Updated build_check.json to {version}" ) ;
594
+ }
595
+ }
596
+ }
597
+
559
598
fn update_package_json ( path : & str , version : & str ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
560
599
let content = fs:: read_to_string ( path) ?;
561
600
let mut pkg: serde_json:: Value = serde_json:: from_str ( & content) ?;
@@ -582,6 +621,18 @@ fn update_package_json(path: &str, version: &str) -> Result<(), Box<dyn std::err
582
621
Ok ( ( ) )
583
622
}
584
623
624
+ fn update_json_version ( path : & str , version : & str ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
625
+ let content = fs:: read_to_string ( path) ?;
626
+ let mut json_value: serde_json:: Value = serde_json:: from_str ( & content) ?;
627
+
628
+ json_value[ "version" ] = serde_json:: Value :: String ( version. to_string ( ) ) ;
629
+
630
+ let formatted = serde_json:: to_string_pretty ( & json_value) ?;
631
+ fs:: write ( path, formatted + "\n " ) ?;
632
+
633
+ Ok ( ( ) )
634
+ }
635
+
585
636
fn show_status ( ) {
586
637
println ! ( "📊 Terminator Project Status" ) ;
587
638
println ! ( "============================" ) ;
@@ -592,11 +643,14 @@ fn show_status() {
592
643
// Show package versions
593
644
let nodejs_version = get_package_version ( "bindings/nodejs/package.json" ) ;
594
645
let mcp_version = get_package_version ( "terminator-mcp-agent/package.json" ) ;
646
+ let browser_extension_version =
647
+ get_package_version ( "terminator/browser-extension/manifest.json" ) ;
595
648
596
649
println ! ( ) ;
597
650
println ! ( "Package versions:" ) ;
598
651
println ! ( " Node.js bindings: {nodejs_version}" ) ;
599
652
println ! ( " MCP agent: {mcp_version}" ) ;
653
+ println ! ( " Browser extension:{browser_extension_version}" ) ;
600
654
601
655
// Git status
602
656
println ! ( ) ;
0 commit comments