cmdbox 0.6.1__py3-none-any.whl → 0.6.2__py3-none-any.whl
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.
Potentially problematic release.
This version of cmdbox might be problematic. Click here for more details.
- cmdbox/app/auth/azure_signin.py +5 -1
- cmdbox/app/auth/signin.py +7 -3
- cmdbox/app/edge.py +3 -3
- cmdbox/app/features/cli/agent_base.py +42 -42
- cmdbox/app/features/cli/audit_base.py +28 -28
- cmdbox/app/features/cli/cmdbox_audit_createdb.py +28 -28
- cmdbox/app/features/cli/cmdbox_audit_delete.py +26 -26
- cmdbox/app/features/cli/cmdbox_audit_search.py +42 -42
- cmdbox/app/features/cli/cmdbox_audit_write.py +22 -22
- cmdbox/app/features/cli/cmdbox_client_file_copy.py +36 -36
- cmdbox/app/features/cli/cmdbox_client_file_download.py +38 -38
- cmdbox/app/features/cli/cmdbox_client_file_list.py +34 -34
- cmdbox/app/features/cli/cmdbox_client_file_mkdir.py +32 -32
- cmdbox/app/features/cli/cmdbox_client_file_move.py +34 -34
- cmdbox/app/features/cli/cmdbox_client_file_remove.py +32 -32
- cmdbox/app/features/cli/cmdbox_client_file_rmdir.py +32 -32
- cmdbox/app/features/cli/cmdbox_client_file_upload.py +38 -38
- cmdbox/app/features/cli/cmdbox_client_server_info.py +26 -26
- cmdbox/app/features/cli/cmdbox_cmd_list.py +22 -21
- cmdbox/app/features/cli/cmdbox_cmd_load.py +24 -20
- cmdbox/app/features/cli/cmdbox_edge_config.py +40 -40
- cmdbox/app/features/cli/cmdbox_edge_start.py +4 -4
- cmdbox/app/features/cli/cmdbox_gui_start.py +2 -2
- cmdbox/app/features/cli/cmdbox_gui_stop.py +2 -2
- cmdbox/app/features/cli/cmdbox_mcp_proxy.py +17 -11
- cmdbox/app/features/cli/cmdbox_server_list.py +20 -20
- cmdbox/app/features/cli/cmdbox_server_start.py +26 -26
- cmdbox/app/features/cli/cmdbox_server_stop.py +26 -26
- cmdbox/app/features/cli/cmdbox_web_apikey_add.py +24 -24
- cmdbox/app/features/cli/cmdbox_web_apikey_del.py +24 -24
- cmdbox/app/features/cli/cmdbox_web_gencert.py +24 -24
- cmdbox/app/features/cli/cmdbox_web_genpass.py +20 -20
- cmdbox/app/features/cli/cmdbox_web_group_add.py +26 -26
- cmdbox/app/features/cli/cmdbox_web_group_del.py +22 -22
- cmdbox/app/features/cli/cmdbox_web_group_edit.py +26 -26
- cmdbox/app/features/cli/cmdbox_web_group_list.py +22 -22
- cmdbox/app/features/cli/cmdbox_web_start.py +66 -66
- cmdbox/app/features/cli/cmdbox_web_stop.py +10 -10
- cmdbox/app/features/cli/cmdbox_web_user_add.py +32 -32
- cmdbox/app/features/cli/cmdbox_web_user_del.py +22 -22
- cmdbox/app/features/cli/cmdbox_web_user_edit.py +32 -32
- cmdbox/app/features/cli/cmdbox_web_user_list.py +22 -22
- cmdbox/app/features/web/cmdbox_web_agent.py +0 -4
- cmdbox/app/mcp.py +316 -120
- cmdbox/app/options.py +21 -21
- cmdbox/app/web.py +1 -1
- cmdbox/extensions/sample_project/sample/app/features/cli/sample_client_time.py +4 -4
- cmdbox/extensions/sample_project/sample/app/features/cli/sample_server_time.py +18 -18
- cmdbox/extensions/sample_project/sample/extensions/user_list.yml +4 -0
- cmdbox/extensions/user_list.yml +4 -0
- cmdbox/licenses/LICENSE_dnspython_2_7_0_ISC_License-ISCL.txt +35 -0
- cmdbox/licenses/LICENSE_email_validator_2_2_0_The_Unlicense-Unlicense.txt +27 -0
- cmdbox/licenses/files.txt +4 -2
- cmdbox/version.py +2 -2
- cmdbox/web/agent.html +2 -2
- cmdbox/web/assets/cmdbox/audit.js +14 -14
- cmdbox/web/assets/cmdbox/common.js +21 -7
- cmdbox/web/assets/cmdbox/list_cmd.js +5 -5
- cmdbox/web/assets/cmdbox/signin.js +17 -7
- cmdbox/web/assets/cmdbox/svgicon.js +3 -3
- cmdbox/web/assets/cmdbox/users.js +14 -5
- cmdbox/web/audit.html +6 -6
- cmdbox/web/signin.html +33 -7
- cmdbox/web/users.html +4 -4
- {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/METADATA +27 -23
- {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/RECORD +72 -70
- /cmdbox/licenses/{LICENSE_fastmcp_2_9_2_Apache_Software_License.txt → LICENSE_fastmcp_2_10_1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE_mcp_1_9_4_MIT_License.txt → LICENSE_mcp_1_10_1_MIT_License.txt} +0 -0
- {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/LICENSE +0 -0
- {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/WHEEL +0 -0
- {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/entry_points.txt +0 -0
- {cmdbox-0.6.1.dist-info → cmdbox-0.6.2.dist-info}/top_level.txt +0 -0
|
@@ -36,36 +36,36 @@ class CmdList(feature.OneshotResultEdgeFeature):
|
|
|
36
36
|
"""
|
|
37
37
|
return dict(
|
|
38
38
|
use_redis=self.USE_REDIS_FALSE, nouse_webmode=False,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
description_ja="データフォルダ配下のコマンドリストを取得します。",
|
|
40
|
+
description_en="Obtains a list of commands under the data folder.",
|
|
41
41
|
choice=[
|
|
42
42
|
dict(opt="data", type=Options.T_FILE, default=self.default_data, required=True, multi=False, hide=False, choice=None,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
description_ja=f"省略した時は `$HONE/.{self.ver.__appid__}` を使用します。",
|
|
44
|
+
description_en=f"When omitted, `$HONE/.{self.ver.__appid__}` is used."),
|
|
45
45
|
dict(opt="kwd", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
description_ja=f"検索したいコマンド名を指定します。中間マッチで検索します。",
|
|
47
|
+
description_en=f"Specify the name of the command you want to search. Search with intermediate matches."),
|
|
48
48
|
dict(opt="signin_file", type=Options.T_FILE, default=f".{self.ver.__appid__}/user_list.yml", required=False, multi=False, hide=True, choice=None,
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
description_ja="サインイン可能なユーザーとパスワードを記載したファイルを指定します。",
|
|
50
|
+
description_en="Specify a file containing users and passwords with which they can signin."),
|
|
51
51
|
dict(opt="groups", type=Options.T_STR, default=None, required=False, multi=True, hide=True, choice=None,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
description_ja="`signin_file` を指定した場合に、このユーザーグループに許可されているコマンドリストを返すように指定します。",
|
|
53
|
+
description_en="Specifies that `signin_file`, if specified, should return the list of commands allowed for this user group."),
|
|
54
54
|
dict(opt="output_json", short="o", type=Options.T_FILE, default=None, required=False, multi=False, hide=True, choice=None, fileio="out",
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
description_ja="処理結果jsonの保存先ファイルを指定。",
|
|
56
|
+
description_en="Specify the destination file for saving the processing result json."),
|
|
57
57
|
dict(opt="output_json_append", short="a", type=Options.T_BOOL, default=False, required=False, multi=False, hide=True, choice=[True, False],
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
description_ja="処理結果jsonファイルを追記保存します。",
|
|
59
|
+
description_en="Save the processing result json file by appending."),
|
|
60
60
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力をConsole logに出力します。",
|
|
62
|
+
description_en="Available only in GUI mode. Outputs standard output during command execution to Console log."),
|
|
63
63
|
dict(opt="capture_stdout", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力をキャプチャーし、実行結果画面に表示します。",
|
|
65
|
+
description_en="Available only in GUI mode. Captures standard output during command execution and displays it on the execution result screen."),
|
|
66
66
|
dict(opt="capture_maxsize", type=Options.T_INT, default=self.DEFAULT_CAPTURE_MAXSIZE, required=False, multi=False, hide=True, choice=None,
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力の最大キャプチャーサイズを指定します。",
|
|
68
|
+
description_en="Available only in GUI mode. Specifies the maximum capture size of standard output when executing commands."),
|
|
69
69
|
]
|
|
70
70
|
)
|
|
71
71
|
|
|
@@ -94,7 +94,8 @@ class CmdList(feature.OneshotResultEdgeFeature):
|
|
|
94
94
|
paths = glob.glob(str(Path(args.data) / ".cmds" / f"cmd-{kwd}.json"))
|
|
95
95
|
ret = [common.loadopt(path, True) for path in paths]
|
|
96
96
|
ret = sorted(ret, key=lambda cmd: cmd["title"])
|
|
97
|
-
ret = [dict(title=r.get('title',''), mode=r.get('mode',''), cmd=r.get('cmd',''), tag=r.get('tag','')) for r in ret
|
|
97
|
+
ret = [dict(title=r.get('title',''), mode=r.get('mode',''), cmd=r.get('cmd',''), description=r.get('description',''), tag=r.get('tag','')) for r in ret \
|
|
98
|
+
if signin.Signin._check_cmd(self.signin_file_data, args.groups, r['mode'], r['cmd'], logger)]
|
|
98
99
|
ret = dict(success=ret)
|
|
99
100
|
|
|
100
101
|
common.print_format(ret, args.format, tm, args.output_json, args.output_json_append, pf=pf)
|
|
@@ -36,36 +36,36 @@ class CmdLoad(feature.OneshotResultEdgeFeature):
|
|
|
36
36
|
"""
|
|
37
37
|
return dict(
|
|
38
38
|
use_redis=self.USE_REDIS_FALSE, nouse_webmode=False,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
description_ja="データフォルダ配下のコマンドの内容を取得します。",
|
|
40
|
+
description_en="Obtains the contents of commands under the data folder.",
|
|
41
41
|
choice=[
|
|
42
42
|
dict(opt="data", type=Options.T_FILE, default=self.default_data, required=True, multi=False, hide=False, choice=None,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
description_ja=f"省略した時は `$HONE/.{self.ver.__appid__}` を使用します。",
|
|
44
|
+
description_en=f"When omitted, `$HONE/.{self.ver.__appid__}` is used."),
|
|
45
45
|
dict(opt="title", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
description_ja=f"読込みたいコマンド名を指定します。",
|
|
47
|
+
description_en=f"Specify the name of the command to be read."),
|
|
48
48
|
dict(opt="signin_file", type=Options.T_FILE, default=f".{self.ver.__appid__}/user_list.yml", required=False, multi=False, hide=True, choice=None,
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
description_ja="サインイン可能なユーザーとパスワードを記載したファイルを指定します。",
|
|
50
|
+
description_en="Specify a file containing users and passwords with which they can signin."),
|
|
51
51
|
dict(opt="groups", type=Options.T_STR, default=None, required=False, multi=True, hide=True, choice=None,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
description_ja="`signin_file` を指定した場合に、このユーザーグループに許可されているコマンドリストを返すように指定します。",
|
|
53
|
+
description_en="Specifies that `signin_file`, if specified, should return the list of commands allowed for this user group."),
|
|
54
54
|
dict(opt="output_json", short="o", type=Options.T_FILE, default=None, required=False, multi=False, hide=True, choice=None, fileio="out",
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
description_ja="処理結果jsonの保存先ファイルを指定。",
|
|
56
|
+
description_en="Specify the destination file for saving the processing result json."),
|
|
57
57
|
dict(opt="output_json_append", short="a", type=Options.T_BOOL, default=False, required=False, multi=False, hide=True, choice=[True, False],
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
description_ja="処理結果jsonファイルを追記保存します。",
|
|
59
|
+
description_en="Save the processing result json file by appending."),
|
|
60
60
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力をConsole logに出力します。",
|
|
62
|
+
description_en="Available only in GUI mode. Outputs standard output during command execution to Console log."),
|
|
63
63
|
dict(opt="capture_stdout", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力をキャプチャーし、実行結果画面に表示します。",
|
|
65
|
+
description_en="Available only in GUI mode. Captures standard output during command execution and displays it on the execution result screen."),
|
|
66
66
|
dict(opt="capture_maxsize", type=Options.T_INT, default=self.DEFAULT_CAPTURE_MAXSIZE, required=False, multi=False, hide=True, choice=None,
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力の最大キャプチャーサイズを指定します。",
|
|
68
|
+
description_en="Available only in GUI mode. Specifies the maximum capture size of standard output when executing commands."),
|
|
69
69
|
]
|
|
70
70
|
)
|
|
71
71
|
|
|
@@ -94,6 +94,10 @@ class CmdLoad(feature.OneshotResultEdgeFeature):
|
|
|
94
94
|
self.signin_file_data = signin.Signin.load_signin_file(args.signin_file, None, self=self)
|
|
95
95
|
opt_path = Path(args.data) / ".cmds" / f"cmd-{args.title}.json"
|
|
96
96
|
opt = common.loadopt(opt_path, True)
|
|
97
|
+
if not signin.Signin._check_cmd(self.signin_file_data, args.groups, opt['mode'], opt['cmd'], logger):
|
|
98
|
+
ret = dict(warn=f"You do not have permission to execute this command.")
|
|
99
|
+
common.print_format(ret, args.format, tm, args.output_json, args.output_json_append, pf=pf)
|
|
100
|
+
return 1, ret, None
|
|
97
101
|
ret = dict(success=opt)
|
|
98
102
|
|
|
99
103
|
common.print_format(ret, args.format, tm, args.output_json, args.output_json_append, pf=pf)
|
|
@@ -34,75 +34,75 @@ class EdgeConfig(feature.UnsupportEdgeFeature):
|
|
|
34
34
|
"""
|
|
35
35
|
return dict(
|
|
36
36
|
use_redis=self.USE_REDIS_FALSE, nouse_webmode=True,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
description_ja="端末モードの設定を行います。",
|
|
38
|
+
description_en="Set the edge mode.",
|
|
39
39
|
choice=[
|
|
40
40
|
dict(opt="endpoint", type=Options.T_STR, default="http://localhost:8081", required=False, multi=False, hide=False, choice=None,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
description_ja="エンドポイントのURLを指定します。",
|
|
42
|
+
description_en="Specify the URL of the endpoint."),
|
|
43
43
|
dict(opt="icon_path", type=Options.T_FILE, default=Path(self.ver.__file__).parent / 'web' / 'assets' / self.ver.__appid__ / 'favicon.ico',
|
|
44
44
|
required=False, multi=False, hide=False, choice=None,
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
description_ja="アイコン画像のパスを指定します。",
|
|
46
|
+
description_en="Specify the path to the icon image."),
|
|
47
47
|
dict(opt="auth_type", type=Options.T_STR, default="idpw", required=False, multi=False, hide=False, choice=["noauth", "idpw", "apikey", "oauth2", "saml"],
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
description_ja="エンドポイント接続じの認証方式を指定します。",
|
|
49
|
+
description_en="Specifies the authentication method for endpoint connections.",
|
|
50
50
|
choice_show=dict(idpw=["user","password"],
|
|
51
51
|
apikey=["apikey"],
|
|
52
52
|
oauth2=["oauth2", "oauth2_port", "oauth2_timeout"],
|
|
53
53
|
saml=["saml", "saml_port", "saml_timeout"]),),
|
|
54
54
|
dict(opt="user", type=Options.T_STR, default="user", required=False, multi=False, hide=False, choice=None,
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
description_ja="エンドポイントへの接続ユーザーを指定します。",
|
|
56
|
+
description_en="Specifies the user connecting to the endpoint."),
|
|
57
57
|
dict(opt="password", type=Options.T_STR, default="password", required=False, multi=False, hide=False, choice=None,
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
description_ja="エンドポイントへの接続パスワードを指定します。",
|
|
59
|
+
description_en="Specify the password for connecting to the endpoint."),
|
|
60
60
|
dict(opt="apikey", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
description_ja="エンドポイントへの接続するためのAPIKEYを指定します。",
|
|
62
|
+
description_en="Specify the APIKEY to connect to the endpoint."),
|
|
63
63
|
dict(opt="oauth2", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=["", "google", "github", "azure"],
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
description_ja="OAuth2認証を使用してエンドポイントに接続します。",
|
|
65
|
+
description_en="Connect to the endpoint using OAuth2 authentication.",
|
|
66
66
|
choice_show=dict(google=["oauth2_client_id", "oauth2_client_secret"],
|
|
67
67
|
github=["oauth2_client_id", "oauth2_client_secret"],
|
|
68
68
|
azure=["oauth2_tenant_id", "oauth2_client_id", "oauth2_client_secret"])),
|
|
69
69
|
dict(opt="oauth2_port", type=Options.T_INT, default="8091", required=False, multi=False, hide=False, choice=None,
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
description_ja="OAuth2認証を使用する場合のコールバックポートを指定します。省略した時は `8091` を使用します。",
|
|
71
|
+
description_en="Specifies the callback port when OAuth2 authentication is used. If omitted, `8091` is used."),
|
|
72
72
|
dict(opt="oauth2_tenant_id", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
description_ja="OAuth2認証を使用するときのテナントIDを指定します。",
|
|
74
|
+
description_en="Specifies the tenant ID when OAuth2 authentication is used."),
|
|
75
75
|
dict(opt="oauth2_client_id", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
description_ja="OAuth2認証を使用するときのクライアントIDを指定します。",
|
|
77
|
+
description_en="Specifies the client ID when OAuth2 authentication is used."),
|
|
78
78
|
dict(opt="oauth2_client_secret", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
description_ja="OAuth2認証を使用するときのクライアントシークレットを指定します。",
|
|
80
|
+
description_en="Specifies the client secret when OAuth2 authentication is used."),
|
|
81
81
|
dict(opt="oauth2_timeout", type=Options.T_INT, default="60", required=False, multi=False, hide=False, choice=None,
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
description_ja="OAuth2認証が完了するまでのタイムアウト時間を指定します。",
|
|
83
|
+
description_en="Specify the timeout period before OAuth2 authentication completes."),
|
|
84
84
|
dict(opt="saml", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=["", "azure"],
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
description_ja="SAML認証を使用してエンドポイントに接続します。",
|
|
86
|
+
description_en="Connect to the endpoint using SAML authentication.",
|
|
87
87
|
choice_show=dict(azure=["saml_tenant_id"])),
|
|
88
88
|
dict(opt="saml_port", type=Options.T_INT, default="8091", required=False, multi=False, hide=False, choice=None,
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
description_ja="SAML認証を使用する場合のコールバックポートを指定します。省略した時は `8091` を使用します。",
|
|
90
|
+
description_en="Specifies the callback port when SAML authentication is used. If omitted, `8091` is used."),
|
|
91
91
|
dict(opt="saml_tenant_id", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
description_ja="SAML認証を使用するときのテナントIDを指定します。",
|
|
93
|
+
description_en="Specifies the tenant ID when SAML authentication is used."),
|
|
94
94
|
dict(opt="saml_timeout", type=Options.T_INT, default="60", required=False, multi=False, hide=False, choice=None,
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
description_ja="SAML認証が完了するまでのタイムアウト時間を指定します。",
|
|
96
|
+
description_en="Specify the timeout period before SAML authentication completes."),
|
|
97
97
|
dict(opt="data", type=Options.T_FILE, default=self.default_data, required=False, multi=False, hide=True, choice=None,
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
description_ja=f"省略した時は f`$HONE/.{self.ver.__appid__}` を使用します。",
|
|
99
|
+
description_en=f"When omitted, f`$HONE/.{self.ver.__appid__}` is used."),
|
|
100
100
|
dict(opt="svcert_no_verify", type=Options.T_BOOL, default=False, required=False, multi=False, hide=True, choice=[False, True],
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
description_ja="HTTPSリクエストの時にサーバー証明書の検証を行いません。",
|
|
102
|
+
description_en="Do not verify server certificates during HTTPS requests."),
|
|
103
103
|
dict(opt="timeout", type=Options.T_INT, default="30", required=False, multi=False, hide=True, choice=None,
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
description_ja="リクエストが完了するまでのタイムアウト時間を指定します。",
|
|
105
|
+
description_en="Specifies the timeout period before the request completes."),
|
|
106
106
|
]
|
|
107
107
|
)
|
|
108
108
|
|
|
@@ -33,12 +33,12 @@ class EdgeStart(feature.UnsupportEdgeFeature):
|
|
|
33
33
|
"""
|
|
34
34
|
return dict(
|
|
35
35
|
use_redis=self.USE_REDIS_FALSE, nouse_webmode=True,
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
description_ja="端末モードを起動します。",
|
|
37
|
+
description_en="Start Edge mode.",
|
|
38
38
|
choice=[
|
|
39
39
|
dict(opt="data", type=Options.T_FILE, default=self.default_data, required=True, multi=False, hide=True, choice=None,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
description_ja=f"省略した時は f`$HONE/.{self.ver.__appid__}` を使用します。",
|
|
41
|
+
description_en=f"When omitted, f`$HONE/.{self.ver.__appid__}` is used."),
|
|
42
42
|
]
|
|
43
43
|
)
|
|
44
44
|
|
|
@@ -23,8 +23,8 @@ class GuiStart(cmdbox_web_start.WebStart):
|
|
|
23
23
|
"""
|
|
24
24
|
opt = super().get_option()
|
|
25
25
|
opt['use_agent'] = False
|
|
26
|
-
opt['
|
|
27
|
-
opt['
|
|
26
|
+
opt['description_ja'] = "GUIモードを起動します。"
|
|
27
|
+
opt['description_en'] = "Start GUI mode."
|
|
28
28
|
return opt
|
|
29
29
|
|
|
30
30
|
def apprun(self, logger:logging.Logger, args:argparse.Namespace, tm:float, pf:List[Dict[str, float]]=[]) -> Tuple[int, Dict[str, Any], Any]:
|
|
@@ -29,6 +29,6 @@ class GuiStop(cmdbox_web_stop.WebStop):
|
|
|
29
29
|
Dict[str, Any]: オプション
|
|
30
30
|
"""
|
|
31
31
|
opt = super().get_option()
|
|
32
|
-
opt['
|
|
33
|
-
opt['
|
|
32
|
+
opt['description_ja'] = "GUIモードを停止します。"
|
|
33
|
+
opt['description_en'] = "Stop GUI mode."
|
|
34
34
|
return opt
|
|
@@ -34,21 +34,21 @@ class McpStart(feature.UnsupportEdgeFeature):
|
|
|
34
34
|
"""
|
|
35
35
|
return dict(
|
|
36
36
|
use_redis=self.USE_REDIS_FALSE, nouse_webmode=False, use_agent=False,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
description_ja="標準入力を受け付け、リモートMCPサーバーにリクエストを行うProxyサーバーを起動します。",
|
|
38
|
+
description_en="-",
|
|
39
39
|
choice=[
|
|
40
40
|
dict(opt="mcpserver_name", type=Options.T_STR, default='mcpserver', required=True, multi=False, hide=False, choice=None,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
description_ja="リモートMCPサーバーの名前を指定します。省略した場合は`mcpserver`となります。",
|
|
42
|
+
description_en="Specify the name of the MCP server. If omitted, it will be `mcpserver`.",),
|
|
43
43
|
dict(opt="mcpserver_url", type=Options.T_STR, default='http://localhost:8081/mcpsv/mcp', required=True, multi=False, hide=False, choice=None,
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
description_ja="リモートMCPサーバーのURLを指定します。省略した場合は`http://localhost:8081/mcpsv/mcp`となります。",
|
|
45
|
+
description_en="Specifies the URL of the remote MCP server. If omitted, it will be `http://localhost:8081/mcpsv/mcp`.",),
|
|
46
|
+
dict(opt="mcpserver_apikey", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
47
|
+
description_ja="リモートMCPサーバーのAPI Keyを指定します。",
|
|
48
|
+
description_en="Specify the API Key of the remote MCP server.",),
|
|
46
49
|
dict(opt="mcpserver_transport", type=Options.T_STR, default='streamable-http', required=True, multi=False, hide=False, choice=['', 'streamable-http', 'sse', 'http'],
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
dict(opt="mcpserver_transport", type=Options.T_STR, default='streamable-http', required=True, multi=False, hide=False, choice=['', 'streamable-http', 'sse', 'http'],
|
|
50
|
-
discription_ja="リモートMCPサーバーのトランスポートを指定します。省略した場合は`streamable-http`となります。",
|
|
51
|
-
discription_en="Specifies the transport of the remote MCP server. If omitted, it is `streamable-http`.",),
|
|
50
|
+
description_ja="リモートMCPサーバーのトランスポートを指定します。省略した場合は`streamable-http`となります。",
|
|
51
|
+
description_en="Specifies the transport of the remote MCP server. If omitted, it is `streamable-http`.",),
|
|
52
52
|
])
|
|
53
53
|
|
|
54
54
|
def apprun(self, logger:logging.Logger, args:argparse.Namespace, tm:float, pf:List[Dict[str, float]]=[]) -> Tuple[int, Dict[str, Any], Any]:
|
|
@@ -70,6 +70,8 @@ class McpStart(feature.UnsupportEdgeFeature):
|
|
|
70
70
|
args.mcpserver_url = 'http://localhost:8081/mcpsv/mcp'
|
|
71
71
|
if not hasattr(args, 'mcpserver_transport'):
|
|
72
72
|
args.mcpserver_transport = 'streamable-http'
|
|
73
|
+
if not hasattr(args, 'mcpserver_apikey'):
|
|
74
|
+
args.mcpserver_apikey = None
|
|
73
75
|
|
|
74
76
|
from fastmcp import FastMCP
|
|
75
77
|
config = dict(
|
|
@@ -77,6 +79,7 @@ class McpStart(feature.UnsupportEdgeFeature):
|
|
|
77
79
|
default=dict(
|
|
78
80
|
url=args.mcpserver_url,
|
|
79
81
|
transport=args.mcpserver_transport,
|
|
82
|
+
auth=args.mcpserver_apikey
|
|
80
83
|
)
|
|
81
84
|
)
|
|
82
85
|
)
|
|
@@ -85,6 +88,9 @@ class McpStart(feature.UnsupportEdgeFeature):
|
|
|
85
88
|
proxy = FastMCP.as_proxy(config, name="Config-Based Proxy")
|
|
86
89
|
proxy.run()
|
|
87
90
|
except Exception as e:
|
|
91
|
+
logger.setLevel(logging.ERROR)
|
|
92
|
+
for h in logger.handlers:
|
|
93
|
+
h.setLevel(logging.ERROR)
|
|
88
94
|
logger.error(f"Failed to start MCP proxy: {e}", exc_info=True)
|
|
89
95
|
return self.RESP_ERROR, dict(warn=f"Failed to start MCP proxy: {e}"), None
|
|
90
96
|
return self.RESP_SCCESS, dict(info="MCP proxy successfully."), None
|
|
@@ -34,36 +34,36 @@ class ServerList(feature.OneshotResultEdgeFeature):
|
|
|
34
34
|
"""
|
|
35
35
|
return dict(
|
|
36
36
|
use_redis=self.USE_REDIS_TRUE, nouse_webmode=False,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
description_ja="起動中のサーバーの一覧を表示します。クライアント環境からの利用も可能です。",
|
|
38
|
+
description_en="Displays a list of running inference servers. Can also be used from the client environment.",
|
|
39
39
|
choice=[
|
|
40
40
|
dict(opt="host", type=Options.T_STR, default=self.default_host, required=True, multi=False, hide=True, choice=None, web="mask",
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
description_ja="Redisサーバーのサービスホストを指定します。",
|
|
42
|
+
description_en="Specify the service host of the Redis server."),
|
|
43
43
|
dict(opt="port", type=Options.T_INT, default=self.default_port, required=True, multi=False, hide=True, choice=None, web="mask",
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
description_ja="Redisサーバーのサービスポートを指定します。",
|
|
45
|
+
description_en="Specify the service port of the Redis server."),
|
|
46
46
|
dict(opt="password", type=Options.T_STR, default=self.default_pass, required=True, multi=False, hide=True, choice=None, web="mask",
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
description_ja="Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `password` を使用します。",
|
|
48
|
+
description_en="Specify the access password of the Redis server (optional). If omitted, `password` is used."),
|
|
49
49
|
dict(opt="timeout", type=Options.T_INT, default="15", required=False, multi=False, hide=True, choice=None,
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
description_ja="サーバーの応答が返ってくるまでの最大待ち時間を指定。",
|
|
51
|
+
description_en="Specify the maximum waiting time until the server responds."),
|
|
52
52
|
dict(opt="output_json", short="o", type=Options.T_FILE, default=None, required=False, multi=False, hide=True, choice=None, fileio="out",
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
description_ja="処理結果jsonの保存先ファイルを指定。",
|
|
54
|
+
description_en="Specify the destination file for saving the processing result json."),
|
|
55
55
|
dict(opt="output_json_append", short="a", type=Options.T_BOOL, default=False, required=False, multi=False, hide=True, choice=[True, False],
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
description_ja="処理結果jsonファイルを追記保存します。",
|
|
57
|
+
description_en="Save the processing result json file by appending."),
|
|
58
58
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力をConsole logに出力します。",
|
|
60
|
+
description_en="Available only in GUI mode. Outputs standard output during command execution to Console log."),
|
|
61
61
|
dict(opt="capture_stdout", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力をキャプチャーし、実行結果画面に表示します。",
|
|
63
|
+
description_en="Available only in GUI mode. Captures standard output during command execution and displays it on the execution result screen."),
|
|
64
64
|
dict(opt="capture_maxsize", type=Options.T_INT, default=self.DEFAULT_CAPTURE_MAXSIZE, required=False, multi=False, hide=True, choice=None,
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力の最大キャプチャーサイズを指定します。",
|
|
66
|
+
description_en="Available only in GUI mode. Specifies the maximum capture size of standard output when executing commands."),
|
|
67
67
|
]
|
|
68
68
|
)
|
|
69
69
|
|
|
@@ -34,45 +34,45 @@ class ServerStart(feature.OneshotNotifyEdgeFeature):
|
|
|
34
34
|
"""
|
|
35
35
|
return dict(
|
|
36
36
|
use_redis=self.USE_REDIS_TRUE, nouse_webmode=True,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
description_ja="サーバーを起動します。installモードで `cmdbox -m install -c server` を実行している場合は、 `docker-compose up -d` を使用してください。",
|
|
38
|
+
description_en="Start the inference server. If you are running `cmdbox -m install -c server` in install mode, use `docker-compose up -d`.",
|
|
39
39
|
choice=[
|
|
40
40
|
dict(opt="host", type=Options.T_STR, default=self.default_host, required=True, multi=False, hide=True, choice=None, web="mask",
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
description_ja="Redisサーバーのサービスホストを指定します。",
|
|
42
|
+
description_en="Specify the service host of the Redis server."),
|
|
43
43
|
dict(opt="port", type=Options.T_INT, default=self.default_port, required=True, multi=False, hide=True, choice=None, web="mask",
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
description_ja="Redisサーバーのサービスポートを指定します。",
|
|
45
|
+
description_en="Specify the service port of the Redis server."),
|
|
46
46
|
dict(opt="password", type=Options.T_STR, default=self.default_pass, required=True, multi=False, hide=True, choice=None, web="mask",
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
description_ja="Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `password` を使用します。",
|
|
48
|
+
description_en="Specify the access password of the Redis server (optional). If omitted, `password` is used."),
|
|
49
49
|
dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None, web="readonly",
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
description_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
|
|
51
|
+
description_en="Specify the service name of the inference server. If omitted, `server` is used."),
|
|
52
52
|
dict(opt="data", type=Options.T_FILE, default=self.default_data, required=False, multi=False, hide=False, choice=None,
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
description_ja=f"省略した時は `$HONE/.{self.ver.__appid__}` を使用します。",
|
|
54
|
+
description_en=f"When omitted, `$HONE/.{self.ver.__appid__}` is used."),
|
|
55
55
|
dict(opt="retry_count", type=Options.T_INT, default=20, required=False, multi=False, hide=True, choice=None,
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
description_ja="Redisサーバーへの再接続回数を指定します。0以下を指定すると永遠に再接続を行います。",
|
|
57
|
+
description_en="Specifies the number of reconnections to the Redis server.If less than 0 is specified, reconnection is forever."),
|
|
58
58
|
dict(opt="retry_interval", type=Options.T_INT, default=5, required=False, multi=False, hide=True, choice=None,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
description_ja="Redisサーバーに再接続までの秒数を指定します。",
|
|
60
|
+
description_en="Specifies the number of seconds before reconnecting to the Redis server."),
|
|
61
61
|
dict(opt="output_json", short="o", type=Options.T_FILE, default=None, required=False, multi=False, hide=True, choice=None, fileio="out",
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
description_ja="処理結果jsonの保存先ファイルを指定。",
|
|
63
|
+
description_en="Specify the destination file for saving the processing result json."),
|
|
64
64
|
dict(opt="output_json_append", short="a", type=Options.T_BOOL, default=False, required=False, multi=False, hide=True, choice=[True, False],
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
description_ja="処理結果jsonファイルを追記保存します。",
|
|
66
|
+
description_en="Save the processing result json file by appending."),
|
|
67
67
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力をConsole logに出力します。",
|
|
69
|
+
description_en="Available only in GUI mode. Outputs standard output during command execution to Console log."),
|
|
70
70
|
dict(opt="capture_stdout", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力をキャプチャーし、実行結果画面に表示します。",
|
|
72
|
+
description_en="Available only in GUI mode. Captures standard output during command execution and displays it on the execution result screen."),
|
|
73
73
|
dict(opt="capture_maxsize", type=Options.T_INT, default=self.DEFAULT_CAPTURE_MAXSIZE, required=False, multi=False, hide=True, choice=None,
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
description_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力の最大キャプチャーサイズを指定します。",
|
|
75
|
+
description_en="Available only in GUI mode. Specifies the maximum capture size of standard output when executing commands."),
|
|
76
76
|
]
|
|
77
77
|
)
|
|
78
78
|
|