@@ -84,6 +84,8 @@ class Settings(TypedDict):
8484 rfc_port_http : int
8585 rfc_port_ssh : int
8686
87+ shell_interface : Literal ['local' ,'ssh' ]
88+
8789 stt_model_size : str
8890 stt_language : str
8991 stt_silence_threshold : float
@@ -793,6 +795,17 @@ def convert_out(settings: Settings) -> SettingsOutput:
793795
794796 dev_fields : list [SettingsField ] = []
795797
798+ dev_fields .append (
799+ {
800+ "id" : "shell_interface" ,
801+ "title" : "Shell Interface" ,
802+ "description" : "Terminal interface used for Code Execution Tool. Local Python TTY works locally in both dockerized and development environments. SSH always connects to dockerized environment (automatically at localhost or RFC host address)." ,
803+ "type" : "select" ,
804+ "value" : settings ["shell_interface" ],
805+ "options" : [{"value" : "local" , "label" : "Local Python TTY" }, {"value" : "ssh" , "label" : "SSH" }],
806+ }
807+ )
808+
796809 if runtime .is_development ():
797810 # dev_fields.append(
798811 # {
@@ -1378,6 +1391,7 @@ def get_default_settings() -> Settings:
13781391 rfc_password = "" ,
13791392 rfc_port_http = 55080 ,
13801393 rfc_port_ssh = 55022 ,
1394+ shell_interface = "local" if runtime .is_dockerized () else "ssh" ,
13811395 stt_model_size = "base" ,
13821396 stt_language = "en" ,
13831397 stt_silence_threshold = 0.3 ,
@@ -1539,7 +1553,7 @@ def set_root_password(password: str):
15391553def get_runtime_config (set : Settings ):
15401554 if runtime .is_dockerized ():
15411555 return {
1542- "code_exec_ssh_enabled" : False ,
1556+ "code_exec_ssh_enabled" : set [ "shell_interface" ] == "ssh" ,
15431557 "code_exec_ssh_addr" : "localhost" ,
15441558 "code_exec_ssh_port" : 22 ,
15451559 "code_exec_ssh_user" : "root" ,
@@ -1553,7 +1567,7 @@ def get_runtime_config(set: Settings):
15531567 if host .endswith ("/" ):
15541568 host = host [:- 1 ]
15551569 return {
1556- "code_exec_ssh_enabled" : True ,
1570+ "code_exec_ssh_enabled" : set [ "shell_interface" ] == "ssh" ,
15571571 "code_exec_ssh_addr" : host ,
15581572 "code_exec_ssh_port" : set ["rfc_port_ssh" ],
15591573 "code_exec_ssh_user" : "root" ,
0 commit comments