@@ -12,6 +12,7 @@ import (
1212 "time"
1313
1414 "ccgo/internal/api/anthropic"
15+ bridgepkg "ccgo/internal/bridge"
1516 "ccgo/internal/commands"
1617 compactpkg "ccgo/internal/compact"
1718 "ccgo/internal/config"
@@ -579,10 +580,10 @@ func (r Runner) formatStatusSummary(raw string) string {
579580 switch args [0 ] {
580581 case "show" , "info" :
581582 if len (args ) < 2 || strings .TrimSpace (args [1 ]) == "" {
582- return "Usage: /status " + args [0 ] + " <session|model|auth|tools|mcp|plugins|telemetry>"
583+ return "Usage: /status " + args [0 ] + " <session|model|auth|tools|mcp|plugins|telemetry|bridge >"
583584 }
584585 return r .formatStatusShow (args [1 ])
585- case "session" , "model" , "auth" , "tools" , "mcp" , "plugins" , "telemetry" :
586+ case "session" , "model" , "auth" , "tools" , "mcp" , "plugins" , "telemetry" , "bridge" :
586587 return r .formatStatusShow (args [0 ])
587588 default :
588589 return "Status section is not implemented in the Go runtime yet: " + strings .Join (args , " " )
@@ -723,8 +724,10 @@ func (r Runner) formatStatusShow(raw string) string {
723724 return strings .Join (lines , "\n " )
724725 case "telemetry" :
725726 return r .formatStatusTelemetry ()
727+ case "bridge" :
728+ return r .formatStatusBridge ()
726729 default :
727- return "Unknown status section " + strings .TrimSpace (raw ) + ". Available sections: session, model, auth, tools, mcp, plugins, telemetry"
730+ return "Unknown status section " + strings .TrimSpace (raw ) + ". Available sections: session, model, auth, tools, mcp, plugins, telemetry, bridge "
728731 }
729732}
730733
@@ -747,11 +750,49 @@ func normalizeStatusSection(raw string) string {
747750 return "plugins"
748751 case "telemetry" , "telemetry-events" , "diagnostics" , "trace" , "tracing" :
749752 return "telemetry"
753+ case "bridge" , "repl-bridge" , "remote-control" , "control" :
754+ return "bridge"
750755 default :
751756 return compact
752757 }
753758}
754759
760+ func (r Runner ) formatStatusBridge () string {
761+ settings := r .mergedSettings ()
762+ enabled := settings .Advanced != nil && advancedBoolEnabled (settings .Advanced .Bridge )
763+ path := bridgepkg .SessionManifestPath (r .SessionPath , r .SessionID )
764+ lines := []string {
765+ "Status bridge" ,
766+ "Enabled: " + boolEnabledText (enabled ),
767+ }
768+ if path == "" {
769+ return strings .Join (append (lines , "Manifest path: (not configured)" , "Bridge-safe commands: 0" ), "\n " )
770+ }
771+ manifest , err := bridgepkg .LoadManifest (path )
772+ if err != nil {
773+ return strings .Join (append (lines , "Manifest path: " + path , "Bridge error: " + err .Error ()), "\n " )
774+ }
775+ lines = append (lines ,
776+ "Manifest path: " + path ,
777+ fmt .Sprintf ("Bridge-safe commands: %d" , len (manifest .Commands )),
778+ )
779+ if manifest .GeneratedAt != "" {
780+ lines = append (lines , "Generated at: " + manifest .GeneratedAt )
781+ }
782+ if len (manifest .Commands ) > 0 {
783+ names := make ([]string , 0 , len (manifest .Commands ))
784+ for _ , command := range manifest .Commands {
785+ names = append (names , command .Name )
786+ }
787+ sort .Strings (names )
788+ lines = append (lines , "Command names: " + strings .Join (firstStrings (names , 40 ), ", " ))
789+ if len (names ) > 40 {
790+ lines = append (lines , fmt .Sprintf ("Showing 40 of %d bridge-safe commands." , len (names )))
791+ }
792+ }
793+ return strings .Join (lines , "\n " )
794+ }
795+
755796func (r Runner ) formatStatusTelemetry () string {
756797 path := telemetrypkg .SessionPath (r .SessionPath , r .SessionID )
757798 lines := []string {
0 commit comments