cmdbox 0.5.3.1__py3-none-any.whl → 0.6.0__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/__init__.py +0 -0
- cmdbox/app/auth/azure_signin.py +38 -0
- cmdbox/app/auth/azure_signin_saml.py +12 -0
- cmdbox/app/auth/github_signin.py +38 -0
- cmdbox/app/auth/google_signin.py +32 -0
- cmdbox/app/auth/signin.py +490 -287
- cmdbox/app/auth/signin_saml.py +61 -0
- cmdbox/app/common.py +48 -3
- cmdbox/app/edge.py +182 -213
- cmdbox/app/edge_tool.py +177 -0
- cmdbox/app/feature.py +10 -10
- cmdbox/app/features/cli/agent_base.py +477 -0
- cmdbox/app/features/cli/audit_base.py +1 -1
- cmdbox/app/features/cli/cmdbox_audit_search.py +24 -1
- cmdbox/app/features/cli/cmdbox_client_file_download.py +1 -1
- cmdbox/app/features/cli/cmdbox_cmd_list.py +105 -0
- cmdbox/app/features/cli/cmdbox_cmd_load.py +104 -0
- cmdbox/app/features/cli/cmdbox_edge_config.py +21 -7
- cmdbox/app/features/cli/cmdbox_edge_start.py +1 -1
- cmdbox/app/features/cli/cmdbox_gui_start.py +9 -132
- cmdbox/app/features/cli/cmdbox_gui_stop.py +4 -21
- cmdbox/app/features/cli/cmdbox_server_start.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_apikey_add.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_apikey_del.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_genpass.py +0 -3
- cmdbox/app/features/cli/cmdbox_web_group_add.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_group_del.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_group_edit.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_group_list.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_start.py +119 -104
- cmdbox/app/features/cli/cmdbox_web_stop.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_user_add.py +4 -4
- cmdbox/app/features/cli/cmdbox_web_user_del.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_user_edit.py +4 -4
- cmdbox/app/features/cli/cmdbox_web_user_list.py +1 -1
- cmdbox/app/features/web/cmdbox_web_agent.py +250 -0
- cmdbox/app/features/web/cmdbox_web_do_signin.py +79 -103
- cmdbox/app/features/web/cmdbox_web_exec_cmd.py +8 -3
- cmdbox/app/features/web/cmdbox_web_signin.py +26 -4
- cmdbox/app/features/web/cmdbox_web_users.py +2 -0
- cmdbox/app/options.py +55 -2
- cmdbox/app/web.py +155 -27
- cmdbox/extensions/features.yml +18 -0
- cmdbox/extensions/sample_project/sample/app/features/cli/__init__.py +0 -0
- cmdbox/extensions/sample_project/sample/app/features/web/__init__.py +0 -0
- cmdbox/extensions/sample_project/sample/extensions/features.yml +23 -0
- cmdbox/extensions/sample_project/sample/extensions/user_list.yml +40 -6
- cmdbox/extensions/user_list.yml +37 -6
- cmdbox/licenses/{LICENSE.starlette.0.41.3(BSD License).txt → LICENSE.Authlib.1.5.2(BSD License).txt } +3 -1
- cmdbox/licenses/{LICENSE.pydantic_core.2.33.0(MIT License).txt → LICENSE.Deprecated.1.2.18(MIT License).txt } +2 -2
- cmdbox/licenses/{LICENSE.more-itertools.10.6.0(MIT License).txt → LICENSE.SQLAlchemy.2.0.40(MIT License).txt } +1 -1
- cmdbox/licenses/LICENSE.aiohttp.3.11.18(Apache Software License).txt +13 -0
- cmdbox/licenses/LICENSE.aiosignal.1.3.2(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.async-timeout.5.0.1(Apache Software License).txt +13 -0
- cmdbox/licenses/{LICENSE.watchfiles.1.0.0(MIT License).txt → LICENSE.attrs.25.3.0(UNKNOWN).txt} +1 -1
- cmdbox/licenses/{LICENSE.anyio.4.6.2.post1(MIT License).txt → LICENSE.cachetools.5.5.2(MIT License).txt } +1 -1
- cmdbox/licenses/LICENSE.distro.1.9.0(Apache Software License).txt +202 -0
- cmdbox/licenses/{LICENSE.pydantic_core.2.33.1(MIT License).txt → LICENSE.docstring_parser.0.16(MIT License).txt } +1 -1
- cmdbox/licenses/LICENSE.filelock.3.18.0(The Unlicense (Unlicense)).txt +24 -0
- cmdbox/licenses/LICENSE.frozenlist.1.6.0(Apache-2.0).txt +201 -0
- cmdbox/licenses/{LICENSE.starlette.0.46.1(BSD License).txt → LICENSE.fsspec.2025.3.2(BSD License).txt } +3 -1
- cmdbox/licenses/{LICENSE.argcomplete.3.6.1(Apache Software License).txt → LICENSE.google-adk.0.5.0(Apache Software License).txt } +25 -0
- cmdbox/licenses/LICENSE.google-api-python-client.2.169.0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.google-auth-httplib2.0.2.0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.google-auth.2.40.1(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.google-cloud-aiplatform.1.92.0(Apache 2.0).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-bigquery.3.31.0(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-core.2.4.3(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-resource-manager.1.14.2(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-secret-manager.2.23.3(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-speech.2.32.0(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-storage.2.19.0(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-cloud-trace.1.16.1(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-crc32c.1.7.1(Apache 2.0).txt +202 -0
- cmdbox/licenses/LICENSE.google-genai.1.14.0(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.google-resumable-media.2.7.2(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.googleapis-common-protos.1.70.0(Apache Software License).txt +202 -0
- cmdbox/licenses/{LICENSE.fastapi.0.115.5(MIT License).txt → LICENSE.graphviz.0.20.3(MIT License).txt } +1 -1
- cmdbox/licenses/LICENSE.grpc-google-iam-v1.0.14.2(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.grpcio-status.1.71.0(Apache Software License).txt +610 -0
- cmdbox/licenses/LICENSE.grpcio.1.71.0(Apache Software License).txt +610 -0
- cmdbox/licenses/{LICENSE.uvicorn.0.34.0(BSD License).txt → LICENSE.httpcore.1.0.9(BSD License).txt } +1 -1
- cmdbox/licenses/LICENSE.httplib2.0.22.0(MIT License).txt +23 -0
- cmdbox/licenses/{LICENSE.tomli.2.1.0(MIT License).txt → LICENSE.httpx-sse.0.4.0(MIT).txt} +1 -1
- cmdbox/licenses/LICENSE.httpx.0.28.1(BSD License).txt +12 -0
- cmdbox/licenses/LICENSE.huggingface-hub.0.31.1(Apache Software License).txt +201 -0
- cmdbox/licenses/{LICENSE.charset-normalizer.3.4.0(MIT License).txt → LICENSE.jsonschema-specifications.2025.4.1(UNKNOWN).txt} +5 -7
- cmdbox/licenses/LICENSE.jsonschema.4.23.0(MIT License).txt +19 -0
- cmdbox/licenses/{LICENSE.pkginfo.1.10.0(MIT License).txt → LICENSE.litellm.1.69.0(MIT License).txt } +6 -1
- cmdbox/licenses/{LICENSE.redis.5.2.1(MIT License).txt → LICENSE.mcp.1.8.0(MIT License).txt } +1 -1
- cmdbox/licenses/LICENSE.multidict.6.4.3(Apache Software License).txt +13 -0
- cmdbox/licenses/{LICENSE.argcomplete.3.5.1(Apache Software License).txt → LICENSE.openai.1.75.0(Apache Software License).txt } +25 -1
- cmdbox/licenses/LICENSE.opentelemetry-api.1.33.0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.opentelemetry-exporter-gcp-trace.1.9.0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.opentelemetry-resourcedetector-gcp.1.9.0a0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.opentelemetry-sdk.1.33.0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.opentelemetry-semantic-conventions.0.54b0(Apache Software License).txt +201 -0
- cmdbox/licenses/LICENSE.propcache.0.3.1(Apache Software License).txt +202 -0
- cmdbox/licenses/LICENSE.proto-plus.1.26.1(Apache Software License).txt +202 -0
- cmdbox/licenses/{LICENSE.Pygments.2.18.0(BSD License).txt → LICENSE.protobuf.5.29.4(3-Clause BSD License).txt } +15 -8
- cmdbox/licenses/LICENSE.pyasn1.0.6.1(BSD License).txt +24 -0
- cmdbox/licenses/LICENSE.pyasn1_modules.0.4.2(BSD License).txt +24 -0
- cmdbox/licenses/LICENSE.pydantic-settings.2.9.1(MIT License).txt +21 -0
- cmdbox/licenses/{LICENSE.gevent.25.4.1(MIT).txt → LICENSE.pyparsing.3.2.3(MIT License).txt } +5 -12
- cmdbox/licenses/LICENSE.python-dateutil.2.9.0.post0(Apache Software License; BSD License).txt +54 -0
- cmdbox/licenses/LICENSE.referencing.0.36.2(UNKNOWN).txt +19 -0
- cmdbox/licenses/LICENSE.regex.2024.11.6(Apache Software License).txt +208 -0
- cmdbox/licenses/LICENSE.rpds-py.0.24.0(MIT).txt +19 -0
- cmdbox/licenses/{LICENSE.python-multipart.0.0.17(Apache Software License).txt → LICENSE.rsa.4.9.1(Apache Software License).txt } +1 -2
- cmdbox/licenses/{LICENSE.sphinx-intl.2.3.0(BSD License).txt → LICENSE.shapely.2.1.0(BSD License).txt } +6 -2
- cmdbox/licenses/LICENSE.sse-starlette.2.3.4(BSD License).txt +27 -0
- cmdbox/licenses/LICENSE.tiktoken.0.9.0(MIT License).txt +21 -0
- cmdbox/licenses/LICENSE.tokenizers.0.21.1(Apache Software License).txt +1 -0
- cmdbox/licenses/{LICENSE.six.1.16.0(MIT License).txt → LICENSE.tqdm.4.67.1(MIT License; Mozilla Public License 2.0 (MPL 2.0)).txt } +32 -1
- cmdbox/licenses/{LICENSE.rich.13.9.4(MIT License).txt → LICENSE.tzlocal.5.3.1(MIT License).txt } +3 -3
- cmdbox/licenses/LICENSE.uritemplate.4.1.1(Apache Software License; BSD License).txt +3 -0
- cmdbox/licenses/LICENSE.wrapt.1.17.2(BSD License).txt +24 -0
- cmdbox/licenses/LICENSE.yarl.1.20.0(Apache Software License).txt +202 -0
- cmdbox/licenses/files.txt +111 -17
- cmdbox/logconf_agent.yml +38 -0
- cmdbox/logconf_audit.yml +13 -5
- cmdbox/logconf_client.yml +13 -5
- cmdbox/logconf_cmdbox.yml +13 -5
- cmdbox/logconf_edge.yml +13 -5
- cmdbox/logconf_gui.yml +13 -5
- cmdbox/logconf_server.yml +13 -5
- cmdbox/logconf_web.yml +13 -5
- cmdbox/version.py +3 -2
- cmdbox/web/agent.html +263 -0
- cmdbox/web/assets/cmdbox/agent.js +335 -0
- cmdbox/web/assets/cmdbox/common.js +1111 -1020
- cmdbox/web/assets/cmdbox/signin.js +16 -3
- cmdbox/web/assets/cmdbox/users.js +1 -1
- cmdbox/web/assets/filer/filer.js +4 -2
- cmdbox/web/signin.html +10 -6
- {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/METADATA +132 -35
- {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/RECORD +161 -123
- cmdbox/app/features/web/cmdbox_web_load_pin.py +0 -43
- cmdbox/app/features/web/cmdbox_web_save_pin.py +0 -42
- cmdbox/licenses/LICENSE.Jinja2.3.1.4(BSD License).txt +0 -28
- cmdbox/licenses/LICENSE.Sphinx.8.1.3(BSD License).txt +0 -31
- cmdbox/licenses/LICENSE.babel.2.16.0(BSD License).txt +0 -27
- cmdbox/licenses/LICENSE.certifi.2025.1.31(Mozilla Public License 2.0 (MPL 2.0)).txt +0 -20
- cmdbox/licenses/LICENSE.click.8.1.8(BSD License).txt +0 -28
- cmdbox/licenses/LICENSE.cryptography.44.0.2(Apache Software License; BSD License).txt +0 -3
- cmdbox/licenses/LICENSE.greenlet.3.2.0(MIT AND Python-2.0).txt +0 -30
- cmdbox/licenses/LICENSE.keyring.25.5.0(MIT License).txt +0 -17
- cmdbox/licenses/LICENSE.numpy.2.2.4(BSD License).txt +0 -950
- cmdbox/licenses/LICENSE.pillow.11.0.0(CMU License (MIT-CMU)).txt +0 -1226
- cmdbox/licenses/LICENSE.pillow.11.1.0(CMU License (MIT-CMU)).txt +0 -1213
- cmdbox/licenses/LICENSE.prettytable.3.12.0(BSD License).txt +0 -30
- cmdbox/licenses/LICENSE.prompt_toolkit.3.0.50(BSD License).txt +0 -27
- cmdbox/licenses/LICENSE.psycopg.3.2.6(GNU Lesser General Public License v3 (LGPLv3)).txt +0 -165
- cmdbox/licenses/LICENSE.pydantic.2.11.1(MIT License).txt +0 -21
- cmdbox/licenses/LICENSE.pydantic.2.11.3(MIT License).txt +0 -21
- cmdbox/licenses/LICENSE.python-dotenv.1.0.1(BSD License).txt +0 -27
- cmdbox/licenses/LICENSE.twine.5.1.1(Apache Software License).txt +0 -174
- cmdbox/licenses/LICENSE.typing_extensions.4.13.0(UNKNOWN).txt +0 -279
- cmdbox/licenses/LICENSE.urllib3.2.2.3(MIT License).txt +0 -21
- cmdbox/licenses/LICENSE.urllib3.2.3.0(MIT License).txt +0 -21
- cmdbox/licenses/LICENSE.uvicorn.0.34.1(BSD License).txt +0 -27
- cmdbox/licenses/LICENSE.watchfiles.1.0.4(MIT License).txt +0 -21
- cmdbox/licenses/LICENSE.websockets.14.1(BSD License).txt +0 -24
- cmdbox/licenses/LICENSE.zope.interface.7.1.1(Zope Public License).txt +0 -44
- /cmdbox/licenses/{LICENSE.typing_extensions.4.12.2(Python Software Foundation License).txt → LICENSE.aiohappyeyeballs.2.6.1(Python Software Foundation License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.certifi.2024.8.30(Mozilla Public License 2.0 (MPL 2.0)).txt → LICENSE.certifi.2025.4.26(Mozilla Public License 2.0 (MPL 2.0)).txt} +0 -0
- /cmdbox/licenses/{LICENSE.charset-normalizer.3.4.1(MIT License).txt → LICENSE.charset-normalizer.3.4.2(MIT License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.click.8.1.7(BSD License).txt → LICENSE.click.8.2.0(UNKNOWN).txt} +0 -0
- /cmdbox/licenses/{LICENSE.cryptography.43.0.3(Apache Software License; BSD License).txt → LICENSE.cryptography.44.0.3(Apache Software License; BSD License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.gevent.24.11.1(MIT License).txt → LICENSE.gevent.25.4.2(MIT).txt} +0 -0
- /cmdbox/licenses/{LICENSE.importlib_metadata.8.5.0(Apache Software License).txt → LICENSE.google-api-core.2.24.2(Apache Software License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.greenlet.3.1.1(MIT License).txt → LICENSE.greenlet.3.2.2(MIT AND Python-2.0).txt} +0 -0
- /cmdbox/licenses/{LICENSE.h11.0.14.0(MIT License).txt → LICENSE.h11.0.16.0(MIT License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.nh3.0.2.18(MIT).txt → LICENSE.jiter.0.9.0(MIT License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.more-itertools.10.5.0(MIT License).txt → LICENSE.more-itertools.10.7.0(MIT License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.numpy.2.1.3(BSD License).txt → LICENSE.numpy.2.2.5(BSD License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.packaging.24.2(Apache Software License; BSD License).txt → LICENSE.packaging.25.0(Apache Software License; BSD License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.psycopg-binary.3.2.6(GNU Lesser General Public License v3 (LGPLv3)).txt → LICENSE.psycopg-binary.3.2.7(GNU Lesser General Public License v3 (LGPLv3)).txt} +0 -0
- /cmdbox/licenses/{LICENSE.psycopg-pool.3.2.6(GNU Lesser General Public License v3 (LGPLv3)).txt → LICENSE.psycopg.3.2.7(GNU Lesser General Public License v3 (LGPLv3)).txt} +0 -0
- /cmdbox/licenses/{LICENSE.pydantic.2.10.2(MIT License).txt → LICENSE.pydantic.2.11.4(MIT License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.pydantic_core.2.27.1(MIT License).txt → LICENSE.pydantic_core.2.33.2(MIT License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.redis.5.2.0(MIT License).txt → LICENSE.redis.6.0.0(MIT License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.snowballstemmer.2.2.0(BSD License).txt → LICENSE.snowballstemmer.3.0.1(BSD License).txt} +0 -0
- /cmdbox/licenses/{LICENSE.uvicorn.0.32.1(BSD License).txt → LICENSE.uvicorn.0.34.2(BSD License).txt} +0 -0
- {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/LICENSE +0 -0
- {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/WHEEL +0 -0
- {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/entry_points.txt +0 -0
- {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/top_level.txt +0 -0
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
from cmdbox.app import common, feature, web
|
|
2
2
|
from cmdbox.app.options import Options
|
|
3
|
+
from cmdbox.app.features.cli import agent_base
|
|
3
4
|
from pathlib import Path
|
|
4
5
|
from typing import Dict, Any, Tuple, List, Union
|
|
6
|
+
from urllib.request import pathname2url
|
|
5
7
|
import argparse
|
|
6
8
|
import logging
|
|
7
9
|
import multiprocessing
|
|
8
10
|
|
|
9
11
|
|
|
10
|
-
class WebStart(feature.UnsupportEdgeFeature):
|
|
12
|
+
class WebStart(feature.UnsupportEdgeFeature, agent_base.AgentBase):
|
|
11
13
|
def get_mode(self) -> Union[str, List[str]]:
|
|
12
14
|
"""
|
|
13
15
|
この機能のモードを返します
|
|
@@ -25,7 +27,7 @@ class WebStart(feature.UnsupportEdgeFeature):
|
|
|
25
27
|
str: コマンド
|
|
26
28
|
"""
|
|
27
29
|
return 'start'
|
|
28
|
-
|
|
30
|
+
|
|
29
31
|
def get_option(self):
|
|
30
32
|
"""
|
|
31
33
|
この機能のオプションを返します
|
|
@@ -33,106 +35,107 @@ class WebStart(feature.UnsupportEdgeFeature):
|
|
|
33
35
|
Returns:
|
|
34
36
|
Dict[str, Any]: オプション
|
|
35
37
|
"""
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
38
|
+
opt = super().get_option()
|
|
39
|
+
opt['use_redis'] = self.USE_REDIS_MEIGHT
|
|
40
|
+
opt['nouse_webmode'] = True
|
|
41
|
+
opt['discription_ja'] = "Webモードを起動します。"
|
|
42
|
+
opt['discription_en'] = "Start Web mode."
|
|
43
|
+
opt['choice'] += [
|
|
44
|
+
dict(opt="host", type=Options.T_STR, default=self.default_host, required=True, multi=False, hide=True, choice=None, web="mask",
|
|
45
|
+
discription_ja="Redisサーバーのサービスホストを指定します。",
|
|
46
|
+
discription_en="Specify the service host of the Redis server."),
|
|
47
|
+
dict(opt="port", type=Options.T_INT, default=self.default_port, required=True, multi=False, hide=True, choice=None, web="mask",
|
|
48
|
+
discription_ja="Redisサーバーのサービスポートを指定します。",
|
|
49
|
+
discription_en="Specify the service port of the Redis server."),
|
|
50
|
+
dict(opt="password", type=Options.T_STR, default=self.default_pass, required=True, multi=False, hide=True, choice=None, web="mask",
|
|
51
|
+
discription_ja="Redisサーバーのアクセスパスワード(任意)を指定します。省略時は `password` を使用します。",
|
|
52
|
+
discription_en="Specify the access password of the Redis server (optional). If omitted, `password` is used."),
|
|
53
|
+
dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None, web="readonly",
|
|
54
|
+
discription_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
|
|
55
|
+
discription_en="Specify the service name of the inference server. If omitted, `server` is used."),
|
|
56
|
+
dict(opt="data", type=Options.T_FILE, default=self.default_data, required=False, multi=False, hide=False, choice=None,
|
|
57
|
+
discription_ja=f"省略した時は `$HONE/.{self.ver.__appid__}` を使用します。",
|
|
58
|
+
discription_en=f"When omitted, `$HONE/.{self.ver.__appid__}` is used."),
|
|
59
|
+
dict(opt="allow_host", type=Options.T_STR, default="0.0.0.0", required=False, multi=False, hide=False, choice=None,
|
|
60
|
+
discription_ja="省略した時は `0.0.0.0` を使用します。",
|
|
61
|
+
discription_en="If omitted, `0.0.0.0` is used."),
|
|
62
|
+
dict(opt="listen_port", type=Options.T_INT, default="8081", required=False, multi=False, hide=False, choice=None,
|
|
63
|
+
discription_ja="省略した時は `8081` を使用します。",
|
|
64
|
+
discription_en="If omitted, `8081` is used."),
|
|
65
|
+
dict(opt="ssl_listen_port", type=Options.T_INT, default="8443", required=False, multi=False, hide=False, choice=None,
|
|
66
|
+
discription_ja="省略した時は `8443` を使用します。",
|
|
67
|
+
discription_en="If omitted, `8443` is used."),
|
|
68
|
+
dict(opt="ssl_cert", type=Options.T_FILE, default=None, required=False, multi=False, hide=True, choice=None,
|
|
69
|
+
discription_ja="SSLサーバー証明書ファイルを指定します。",
|
|
70
|
+
discription_en="Specify the SSL server certificate file."),
|
|
71
|
+
dict(opt="ssl_key", type=Options.T_FILE, default=None, required=False, multi=False, hide=True, choice=None,
|
|
72
|
+
discription_ja="SSLサーバー秘密鍵ファイルを指定します。",
|
|
73
|
+
discription_en="Specify the SSL server private key file."),
|
|
74
|
+
dict(opt="ssl_keypass", type=Options.T_STR, default=None, required=False, multi=False, hide=True, choice=None,
|
|
75
|
+
discription_ja="SSLサーバー秘密鍵ファイルの複合化パスワードを指定します。",
|
|
76
|
+
discription_en="Specify the composite password for the SSL server private key file."),
|
|
77
|
+
dict(opt="ssl_ca_certs", type=Options.T_FILE, default=None, required=False, multi=False, hide=True, choice=None,
|
|
78
|
+
discription_ja="SSLサーバーCA証明書ファイルを指定します。",
|
|
79
|
+
discription_en="Specify the SSL server CA certificate file."),
|
|
80
|
+
dict(opt="signin_file", type=Options.T_FILE, default=None, required=False, multi=False, hide=True, choice=None,
|
|
81
|
+
discription_ja="サインイン可能なユーザーとパスワードを記載したファイルを指定します。省略した時は認証を要求しません。",
|
|
82
|
+
discription_en="Specify a file containing users and passwords with which they can signin. If omitted, no authentication is required."),
|
|
83
|
+
dict(opt="session_domain", type=Options.T_STR, default=None, required=False, multi=False, hide=True, choice=None,
|
|
84
|
+
discription_ja="サインインしたユーザーのセッションが有効なドメインを指定します。",
|
|
85
|
+
discription_en="Specify the domain for which the signed-in user's session is valid."),
|
|
86
|
+
dict(opt="session_path", type=Options.T_STR, default="/", required=False, multi=False, hide=True, choice=None,
|
|
87
|
+
discription_ja="サインインしたユーザーのセッションが有効なパスを指定します。",
|
|
88
|
+
discription_en="Specify the session timeout in seconds for signed-in users."),
|
|
89
|
+
dict(opt="session_secure", type=Options.T_BOOL, default=False, required=False, multi=False, hide=True, choice=[True, False],
|
|
90
|
+
discription_ja="サインインしたユーザーのセッションにSecureフラグを設定します。",
|
|
91
|
+
discription_en="Set the Secure flag for the signed-in user's session."),
|
|
92
|
+
dict(opt="session_timeout", type=Options.T_INT, default="900", required=False, multi=False, hide=True, choice=None,
|
|
93
|
+
discription_ja="サインインしたユーザーのセッションタイムアウトの時間を秒で指定します。",
|
|
94
|
+
discription_en="Specify the session timeout in seconds for signed-in users."),
|
|
95
|
+
dict(opt="guvicorn_workers", type=Options.T_INT, default=multiprocessing.cpu_count()*2, required=False, multi=False, hide=True, choice=None,
|
|
96
|
+
discription_ja="guvicornワーカー数を指定します。Linux環境でのみ有効です。-1又は未指定の場合はCPU数の2倍を使用します。",
|
|
97
|
+
discription_en="Specifies the number of guvicorn workers, valid only in Linux environment. If -1 or unspecified, twice the number of CPUs is used."),
|
|
98
|
+
dict(opt="guvicorn_timeout", type=Options.T_INT, default=30, required=False, multi=False, hide=True, choice=None,
|
|
99
|
+
discription_ja="guvicornワーカーのタイムアウトの時間を秒で指定します。",
|
|
100
|
+
discription_en="Specify the timeout duration of the guvicorn worker in seconds."),
|
|
101
|
+
dict(opt="client_only", type=Options.T_BOOL, default=False, required=False, multi=False, hide=True, choice=[True, False],
|
|
102
|
+
discription_ja="サーバーへの接続を行わないようにします。",
|
|
103
|
+
discription_en="Do not make connections to the server."),
|
|
104
|
+
dict(opt="outputs_key", type=Options.T_STR, default=None, required=False, multi=True, hide=False, choice=None,
|
|
105
|
+
discription_ja="showimg及びwebcap画面で表示する項目を指定します。省略した場合は全ての項目を表示します。",
|
|
106
|
+
discription_en="Specify items to be displayed on the showimg and webcap screens. If omitted, all items are displayed."),
|
|
107
|
+
dict(opt="doc_root", type=Options.T_DIR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
108
|
+
discription_ja="カスタムファイルのドキュメントルート. フォルダ指定のカスタムファイルのパスから、doc_rootのパスを除去したパスでURLマッピングします。",
|
|
109
|
+
discription_en="Document root for custom files. URL mapping from the path of a folder-specified custom file with the path of doc_root removed."),
|
|
110
|
+
dict(opt="gui_html", type=Options.T_FILE, default=None, required=False, multi=False, hide=False, choice=None,
|
|
111
|
+
discription_ja="`gui.html` を指定します。省略時はcmdbox内蔵のHTMLファイルを使用します。",
|
|
112
|
+
discription_en="Specify `gui.html`. If omitted, the cmdbox built-in HTML file is used."),
|
|
113
|
+
dict(opt="filer_html", type=Options.T_FILE, default=None, required=False, multi=False, hide=False, choice=None,
|
|
114
|
+
discription_ja="`filer.html` を指定します。省略時はcmdbox内蔵のHTMLファイルを使用します。",
|
|
115
|
+
discription_en="Specify `filer.html`. If omitted, the cmdbox built-in HTML file is used."),
|
|
116
|
+
dict(opt="result_html", type=Options.T_FILE, default=None, required=False, multi=False, hide=False, choice=None,
|
|
117
|
+
discription_ja="`result.html` を指定します。省略時はcmdbox内蔵のHTMLファイルを使用します。",
|
|
118
|
+
discription_en="Specify `result.html`. If omitted, the cmdbox built-in HTML file is used."),
|
|
119
|
+
dict(opt="users_html", type=Options.T_FILE, default=None, required=False, multi=False, hide=False, choice=None,
|
|
120
|
+
discription_ja="`users.html` を指定します。省略時はcmdbox内蔵のHTMLファイルを使用します。",
|
|
121
|
+
discription_en="Specify `users.html`. If omitted, the cmdbox built-in HTML file is used."),
|
|
122
|
+
dict(opt="assets", type=Options.T_FILE, default=None, required=False, multi=True, hide=False, choice=None,
|
|
123
|
+
discription_ja="htmlファイルを使用する場合に必要なアセットファイルを指定します。",
|
|
124
|
+
discription_en="Specify the asset file required when using html files."),
|
|
125
|
+
dict(opt="signin_html", type=Options.T_FILE, default=None, required=False, multi=False, hide=False, choice=None,
|
|
126
|
+
discription_ja="`signin.html` を指定します。省略時はcmdbox内蔵のHTMLファイルを使用します。",
|
|
127
|
+
discription_en="Specify `signin.html`. If omitted, the cmdbox built-in HTML file is used."),
|
|
128
|
+
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
129
|
+
discription_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力をConsole logに出力します。",
|
|
130
|
+
discription_en="Available only in GUI mode. Outputs standard output during command execution to Console log."),
|
|
131
|
+
dict(opt="capture_stdout", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
132
|
+
discription_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力をキャプチャーし、実行結果画面に表示します。",
|
|
133
|
+
discription_en="Available only in GUI mode. Captures standard output during command execution and displays it on the execution result screen."),
|
|
134
|
+
dict(opt="capture_maxsize", type=Options.T_INT, default=self.DEFAULT_CAPTURE_MAXSIZE, required=False, multi=False, hide=True, choice=None,
|
|
135
|
+
discription_ja="GUIモードでのみ使用可能です。コマンド実行時の標準出力の最大キャプチャーサイズを指定します。",
|
|
136
|
+
discription_en="Available only in GUI mode. Specifies the maximum capture size of standard output when executing commands."),
|
|
134
137
|
]
|
|
135
|
-
|
|
138
|
+
return opt
|
|
136
139
|
|
|
137
140
|
def apprun(self, logger:logging.Logger, args:argparse.Namespace, tm:float, pf:List[Dict[str, float]]=[]) -> Tuple[int, Dict[str, Any], Any]:
|
|
138
141
|
"""
|
|
@@ -153,6 +156,7 @@ class WebStart(feature.UnsupportEdgeFeature):
|
|
|
153
156
|
return 1, msg, None
|
|
154
157
|
w = None
|
|
155
158
|
try:
|
|
159
|
+
args.gui_mode = False if not hasattr(args, 'gui_mode') or not args.gui_mode else args.gui_mode
|
|
156
160
|
ssl_cert = None if args.ssl_cert is None else Path(args.ssl_cert)
|
|
157
161
|
ssl_key = None if args.ssl_key is None else Path(args.ssl_key)
|
|
158
162
|
ssl_ca_certs = None if args.ssl_ca_certs is None else Path(args.ssl_ca_certs)
|
|
@@ -160,12 +164,23 @@ class WebStart(feature.UnsupportEdgeFeature):
|
|
|
160
164
|
redis_host=args.host, redis_port=args.port, redis_password=args.password, svname=args.svname,
|
|
161
165
|
client_only=args.client_only, doc_root=args.doc_root, gui_html=args.gui_html, filer_html=args.filer_html,
|
|
162
166
|
result_html=args.result_html, users_html=args.users_html,
|
|
163
|
-
assets=args.assets, signin_html=args.signin_html, signin_file=args.signin_file)
|
|
164
|
-
|
|
167
|
+
assets=args.assets, signin_html=args.signin_html, signin_file=args.signin_file, gui_mode=args.gui_mode)
|
|
168
|
+
agent_runner = None
|
|
169
|
+
mcp = None
|
|
170
|
+
if args.agent=='use':
|
|
171
|
+
if args.agent_session_store == 'sqlite':
|
|
172
|
+
args.agent_session_dburl = "sqlite:" + pathname2url(str(w.agent_path / 'session.db'))
|
|
173
|
+
elif args.agent_session_store == 'postgresql':
|
|
174
|
+
args.agent_session_dburl = f"postgresql+psycopg://{args.pg_user}:{args.pg_password}@{args.pg_host}:{args.pg_port}/{args.pg_dbname}"
|
|
175
|
+
else:
|
|
176
|
+
args.agent_session_dburl = None
|
|
177
|
+
agent_runner, mcp = self.init_agent_runner(logger, args)
|
|
178
|
+
w.start(allow_host=args.allow_host, listen_port=args.listen_port, ssl_listen_port=args.ssl_listen_port,
|
|
165
179
|
ssl_cert=ssl_cert, ssl_key=ssl_key, ssl_keypass=args.ssl_keypass, ssl_ca_certs=ssl_ca_certs,
|
|
166
180
|
session_domain=args.session_domain, session_path=args.session_path,
|
|
167
181
|
session_secure=args.session_secure, session_timeout=args.session_timeout,
|
|
168
|
-
outputs_key=args.outputs_key, guvicorn_workers=args.guvicorn_workers, guvicorn_timeout=args.guvicorn_timeout
|
|
182
|
+
outputs_key=args.outputs_key, guvicorn_workers=args.guvicorn_workers, guvicorn_timeout=args.guvicorn_timeout,
|
|
183
|
+
agent_runner=agent_runner, mcp=mcp, mcp_listen_port=args.mcp_listen_port, mcp_ssl_listen_port=args.mcp_ssl_listen_port)
|
|
169
184
|
|
|
170
185
|
msg = dict(success="web complate.")
|
|
171
186
|
common.print_format(msg, args.format, tm, args.output_json, args.output_json_append, pf=pf)
|
|
@@ -37,7 +37,7 @@ class WebStop(feature.UnsupportEdgeFeature):
|
|
|
37
37
|
discription_ja="Webモードを停止します。",
|
|
38
38
|
discription_en="Stop Web mode.",
|
|
39
39
|
choice=[
|
|
40
|
-
dict(opt="data", type=Options.T_FILE, default=
|
|
40
|
+
dict(opt="data", type=Options.T_FILE, default=self.default_data, required=False, multi=False, hide=False, choice=None,
|
|
41
41
|
discription_ja=f"省略した時は `$HONE/.{self.ver.__appid__}` を使用します。",
|
|
42
42
|
discription_en=f"When omitted, `$HONE/.{self.ver.__appid__}` is used."),
|
|
43
43
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
@@ -49,7 +49,7 @@ class WebUserAdd(feature.UnsupportEdgeFeature):
|
|
|
49
49
|
dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None, web="readonly",
|
|
50
50
|
discription_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
|
|
51
51
|
discription_en="Specify the service name of the inference server. If omitted, `server` is used."),
|
|
52
|
-
dict(opt="data", type=Options.T_FILE, default=
|
|
52
|
+
dict(opt="data", type=Options.T_FILE, default=self.default_data, required=False, multi=False, hide=False, choice=None,
|
|
53
53
|
discription_ja=f"省略した時は `$HONE/.{self.ver.__appid__}` を使用します。",
|
|
54
54
|
discription_en=f"When omitted, `$HONE/.{self.ver.__appid__}` is used."),
|
|
55
55
|
dict(opt="user_id", type=Options.T_INT, default=None, required=True, multi=False, hide=False, choice=None,
|
|
@@ -61,12 +61,12 @@ class WebUserAdd(feature.UnsupportEdgeFeature):
|
|
|
61
61
|
dict(opt="user_pass", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
62
62
|
discription_ja="ユーザーパスワードを指定します。",
|
|
63
63
|
discription_en="Specify the user password."),
|
|
64
|
-
dict(opt="user_pass_hash", type=Options.T_STR, default='sha1', required=False, multi=False, hide=False, choice=['oauth2', 'plain', 'md5', 'sha1', 'sha256'],
|
|
64
|
+
dict(opt="user_pass_hash", type=Options.T_STR, default='sha1', required=False, multi=False, hide=False, choice=['oauth2', 'saml', 'plain', 'md5', 'sha1', 'sha256'],
|
|
65
65
|
discription_ja="ユーザーパスワードのハッシュアルゴリズムを指定します。",
|
|
66
66
|
discription_en="Specifies the hash algorithm for user passwords."),
|
|
67
67
|
dict(opt="user_email", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
68
|
-
discription_ja="ユーザーメールアドレスを指定します。 `user_pass_hash` が `oauth2` の時は必須です。",
|
|
69
|
-
discription_en="Specify the user email. Required when `user_pass_hash` is `oauth2`."),
|
|
68
|
+
discription_ja="ユーザーメールアドレスを指定します。 `user_pass_hash` が `oauth2` 又は `saml` の時は必須です。",
|
|
69
|
+
discription_en="Specify the user email. Required when `user_pass_hash` is `oauth2` or `saml`."),
|
|
70
70
|
dict(opt="user_group", type=Options.T_STR, default=None, required=True, multi=True, hide=False, choice=None,
|
|
71
71
|
discription_ja="ユーザーが所属するグループを指定します。",
|
|
72
72
|
discription_en="Specifies the groups to which the user belongs."),
|
|
@@ -49,7 +49,7 @@ class WebUserDel(feature.UnsupportEdgeFeature):
|
|
|
49
49
|
dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None, web="readonly",
|
|
50
50
|
discription_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
|
|
51
51
|
discription_en="Specify the service name of the inference server. If omitted, `server` is used."),
|
|
52
|
-
dict(opt="data", type=Options.T_FILE, default=
|
|
52
|
+
dict(opt="data", type=Options.T_FILE, default=self.default_data, required=False, multi=False, hide=False, choice=None,
|
|
53
53
|
discription_ja=f"省略した時は `$HONE/.{self.ver.__appid__}` を使用します。",
|
|
54
54
|
discription_en=f"When omitted, `$HONE/.{self.ver.__appid__}` is used."),
|
|
55
55
|
dict(opt="user_id", type=Options.T_INT, default=None, required=True, multi=False, hide=False, choice=None,
|
|
@@ -49,7 +49,7 @@ class WebUserEdit(feature.UnsupportEdgeFeature):
|
|
|
49
49
|
dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None, web="readonly",
|
|
50
50
|
discription_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
|
|
51
51
|
discription_en="Specify the service name of the inference server. If omitted, `server` is used."),
|
|
52
|
-
dict(opt="data", type=Options.T_FILE, default=
|
|
52
|
+
dict(opt="data", type=Options.T_FILE, default=self.default_data, required=False, multi=False, hide=False, choice=None,
|
|
53
53
|
discription_ja=f"省略した時は `$HONE/.{self.ver.__appid__}` を使用します。",
|
|
54
54
|
discription_en=f"When omitted, `$HONE/.{self.ver.__appid__}` is used."),
|
|
55
55
|
dict(opt="user_id", type=Options.T_INT, default=None, required=True, multi=False, hide=False, choice=None,
|
|
@@ -61,12 +61,12 @@ class WebUserEdit(feature.UnsupportEdgeFeature):
|
|
|
61
61
|
dict(opt="user_pass", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
62
62
|
discription_ja="ユーザーパスワードを指定します。",
|
|
63
63
|
discription_en="Specify the user password."),
|
|
64
|
-
dict(opt="user_pass_hash", type=Options.T_STR, default='sha1', required=False, multi=False, hide=False, choice=['oauth2', 'plain', 'md5', 'sha1', 'sha256'],
|
|
64
|
+
dict(opt="user_pass_hash", type=Options.T_STR, default='sha1', required=False, multi=False, hide=False, choice=['oauth2', 'saml', 'plain', 'md5', 'sha1', 'sha256'],
|
|
65
65
|
discription_ja="ユーザーパスワードのハッシュアルゴリズムを指定します。",
|
|
66
66
|
discription_en="Specifies the hash algorithm for user passwords."),
|
|
67
67
|
dict(opt="user_email", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
68
|
-
discription_ja="ユーザーメールアドレスを指定します。 `user_pass_hash` が `oauth2` の時は必須です。",
|
|
69
|
-
discription_en="Specify the user email. Required when `user_pass_hash` is `oauth2`."),
|
|
68
|
+
discription_ja="ユーザーメールアドレスを指定します。 `user_pass_hash` が `oauth2` 又は `saml` の時は必須です。",
|
|
69
|
+
discription_en="Specify the user email. Required when `user_pass_hash` is `oauth2` or `saml`."),
|
|
70
70
|
dict(opt="user_group", type=Options.T_STR, default=None, required=True, multi=True, hide=False, choice=None,
|
|
71
71
|
discription_ja="ユーザーが所属するグループを指定します。",
|
|
72
72
|
discription_en="Specifies the groups to which the user belongs."),
|
|
@@ -49,7 +49,7 @@ class WebUserList(feature.OneshotResultEdgeFeature):
|
|
|
49
49
|
dict(opt="svname", type=Options.T_STR, default=self.default_svname, required=True, multi=False, hide=True, choice=None, web="readonly",
|
|
50
50
|
discription_ja="サーバーのサービス名を指定します。省略時は `server` を使用します。",
|
|
51
51
|
discription_en="Specify the service name of the inference server. If omitted, `server` is used."),
|
|
52
|
-
dict(opt="data", type=Options.T_FILE, default=
|
|
52
|
+
dict(opt="data", type=Options.T_FILE, default=self.default_data, required=False, multi=False, hide=False, choice=None,
|
|
53
53
|
discription_ja=f"省略した時は `$HONE/.{self.ver.__appid__}` を使用します。",
|
|
54
54
|
discription_en=f"When omitted, `$HONE/.{self.ver.__appid__}` is used."),
|
|
55
55
|
dict(opt="user_name", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|