cmdbox 0.6.0.3__py3-none-any.whl → 0.6.1__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/app.py +2 -2
- cmdbox/app/auth/signin.py +144 -28
- cmdbox/app/common.py +44 -5
- cmdbox/app/edge.py +1 -1
- cmdbox/app/edge_tool.py +1 -1
- cmdbox/app/features/cli/agent_base.py +2 -394
- cmdbox/app/features/cli/cmdbox_audit_search.py +0 -2
- cmdbox/app/features/cli/cmdbox_audit_write.py +9 -0
- cmdbox/app/features/cli/cmdbox_cmd_list.py +2 -2
- cmdbox/app/features/cli/cmdbox_cmd_load.py +2 -2
- cmdbox/app/features/cli/cmdbox_mcp_proxy.py +90 -0
- 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_gencert.py +25 -2
- 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 +68 -26
- cmdbox/app/features/cli/cmdbox_web_user_add.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_user_del.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_user_edit.py +1 -1
- cmdbox/app/features/cli/cmdbox_web_user_list.py +1 -1
- cmdbox/app/features/web/cmdbox_web_agent.py +10 -4
- cmdbox/app/features/web/cmdbox_web_signin.py +1 -1
- cmdbox/app/mcp.py +375 -0
- cmdbox/app/options.py +10 -0
- cmdbox/app/web.py +60 -53
- cmdbox/autoload.py +10 -0
- cmdbox/extensions/user_list.yml +25 -1
- cmdbox/licenses/{LICENSE.Deprecated.1.2.18(MIT License).txt → LICENSE_PyJWT_2_10_1_MIT_License.txt} +2 -2
- cmdbox/licenses/LICENSE_exceptiongroup_1_3_0_MIT_License.txt +73 -0
- cmdbox/licenses/LICENSE_fastmcp_2_9_2_Apache_Software_License.txt +201 -0
- cmdbox/licenses/{LICENSE.graphviz.0.20.3(MIT License).txt → LICENSE_graphviz_0_21_UNKNOWN.txt} +1 -1
- cmdbox/licenses/LICENSE_jaraco_functools_4_2_1_UNKNOWN.txt +18 -0
- cmdbox/licenses/{LICENSE.numpy.2.2.5(BSD License).txt → LICENSE_numpy_2_3_1_BSD_License.txt} +8 -8
- cmdbox/licenses/LICENSE_openapi-pydantic_0_5_1_MIT_License.txt +40 -0
- cmdbox/licenses/LICENSE_propcache_0_3_2_Apache_Software_License.txt +202 -0
- cmdbox/licenses/LICENSE_proto-plus_1_26_1_Apache_Software_License.txt +202 -0
- cmdbox/licenses/LICENSE_shellingham_1_5_4_ISC_License-ISCL.txt +13 -0
- cmdbox/licenses/LICENSE_sphinx-last-updated-by-git_0_3_8_BSD_License.txt +22 -0
- cmdbox/licenses/LICENSE_tenacity_8_5_0_Apache_Software_License.txt +202 -0
- cmdbox/licenses/LICENSE_tokenizers_0_21_2_Apache_Software_License.txt +1 -0
- cmdbox/licenses/LICENSE_typer_0_16_0_MIT_License.txt +21 -0
- cmdbox/licenses/LICENSE_typing-inspection_0_4_1_UNKNOWN.txt +21 -0
- cmdbox/licenses/LICENSE_yarl_1_20_1_Apache_Software_License.txt +202 -0
- cmdbox/licenses/LICENSE_zipp_3_23_0_UNKNOWN.txt +18 -0
- cmdbox/licenses/files.txt +176 -166
- cmdbox/logconf_mcp.yml +43 -0
- cmdbox/version.py +2 -2
- cmdbox/web/agent.html +1 -33
- cmdbox/web/assets/cmdbox/agent.js +2 -3
- cmdbox/web/assets/cmdbox/audit.js +1 -1
- cmdbox/web/assets/cmdbox/common.js +73 -8
- cmdbox/web/assets/cmdbox/main.js +1 -2
- cmdbox/web/assets/cmdbox/svgicon.js +122 -0
- cmdbox/web/assets/cmdbox/users.js +4 -3
- cmdbox/web/audit.html +1 -35
- cmdbox/web/filer.html +1 -13
- cmdbox/web/gui.html +2 -50
- cmdbox/web/result.html +2 -46
- cmdbox/web/signin.html +1 -26
- cmdbox/web/users.html +1 -41
- {cmdbox-0.6.0.3.dist-info → cmdbox-0.6.1.dist-info}/METADATA +32 -7
- cmdbox-0.6.1.dist-info/RECORD +383 -0
- cmdbox/licenses/LICENSE.keyring.25.6.0(MIT License).txt +0 -17
- cmdbox/licenses/LICENSE.typing-inspection.0.4.0(MIT License).txt +0 -21
- cmdbox/licenses/LICENSE.wrapt.1.17.2(BSD License).txt +0 -24
- cmdbox/licenses/LICENSE.zipp.3.21.0(MIT License).txt +0 -17
- cmdbox-0.6.0.3.dist-info/RECORD +0 -368
- /cmdbox/licenses/{LICENSE.Authlib.1.5.2(BSD License).txt → LICENSE_Authlib_1_6_0_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.Jinja2.3.1.6(BSD License).txt → LICENSE_Jinja2_3_1_6_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.MarkupSafe.3.0.2(BSD License).txt → LICENSE_MarkupSafe_3_0_2_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.PyYAML.6.0.2(MIT License).txt → LICENSE_PyYAML_6_0_2_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.Pygments.2.19.1(BSD License).txt → LICENSE_Pygments_2_19_2_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.SQLAlchemy.2.0.40(MIT License).txt → LICENSE_SQLAlchemy_2_0_41_MIT.txt} +0 -0
- /cmdbox/licenses/{LICENSE.Sphinx.8.2.3(UNKNOWN).txt → LICENSE_Sphinx_8_2_3_UNKNOWN.txt} +0 -0
- /cmdbox/licenses/{LICENSE.aiohappyeyeballs.2.6.1(Python Software Foundation License).txt → LICENSE_aiohappyeyeballs_2_6_1_Python_Software_Foundation_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.aiohttp.3.11.18(Apache Software License).txt → LICENSE_aiohttp_3_12_13_Apache-2_0.txt} +0 -0
- /cmdbox/licenses/{LICENSE.aiosignal.1.3.2(Apache Software License).txt → LICENSE_aiosignal_1_3_2_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.alabaster.1.0.0(BSD License).txt → LICENSE_alabaster_1_0_0_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.annotated-types.0.7.0(MIT License).txt → LICENSE_annotated-types_0_7_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.anyio.4.9.0(MIT License).txt → LICENSE_anyio_4_9_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.argcomplete.3.6.2(Apache Software License).txt → LICENSE_argcomplete_3_6_2_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.async-timeout.5.0.1(Apache Software License).txt → LICENSE_async-timeout_5_0_1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.attrs.25.3.0(UNKNOWN).txt → LICENSE_attrs_25_3_0_UNKNOWN.txt} +0 -0
- /cmdbox/licenses/{LICENSE.babel.2.17.0(BSD License).txt → LICENSE_babel_2_17_0_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.backports.tarfile.1.2.0(MIT License).txt → LICENSE_backports_tarfile_1_2_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.cachetools.5.5.2(MIT License).txt → LICENSE_cachetools_5_5_2_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.certifi.2025.4.26(Mozilla Public License 2.0 (MPL 2.0)).txt → LICENSE_certifi_2025_6_15_Mozilla_Public_License_2_0-MPL_2_0.txt} +0 -0
- /cmdbox/licenses/{LICENSE.cffi.1.17.1(MIT License).txt → LICENSE_cffi_1_17_1_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.charset-normalizer.3.4.2(MIT License).txt → LICENSE_charset-normalizer_3_4_2_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.click.8.2.0(UNKNOWN).txt → LICENSE_click_8_2_1_UNKNOWN.txt} +0 -0
- /cmdbox/licenses/{LICENSE.jiter.0.9.0(MIT License).txt → LICENSE_cloudpickle_3_1_1_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.colorama.0.4.6(BSD License).txt → LICENSE_colorama_0_4_6_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.cryptography.44.0.3(Apache Software License; BSD License).txt → LICENSE_cryptography_45_0_4_Apache-2_0_OR_BSD-3-Clause.txt} +0 -0
- /cmdbox/licenses/{LICENSE.distro.1.9.0(Apache Software License).txt → LICENSE_distro_1_9_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.docstring_parser.0.16(MIT License).txt → LICENSE_docstring_parser_0_16_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.docutils.0.21.2(BSD License; GNU General Public License (GPL); Public Domain; Python Software Foundation License).txt → LICENSE_docutils_0_21_2_BSD_License-GNU_General_Public_License-GPL-Public_Domain-Python_Software_Foundation_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.fastapi.0.115.12(MIT License).txt → LICENSE_fastapi_0_115_14_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.filelock.3.18.0(The Unlicense (Unlicense)).txt → LICENSE_filelock_3_18_0_The_Unlicense-Unlicense.txt} +0 -0
- /cmdbox/licenses/{LICENSE.frozenlist.1.6.0(Apache-2.0).txt → LICENSE_frozenlist_1_7_0_Apache-2_0.txt} +0 -0
- /cmdbox/licenses/{LICENSE.fsspec.2025.3.2(BSD License).txt → LICENSE_fsspec_2025_5_1_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.gevent.25.4.2(MIT).txt → LICENSE_gevent_25_5_1_MIT.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-adk.0.5.0(Apache Software License).txt → LICENSE_google-adk_1_5_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-api-core.2.24.2(Apache Software License).txt → LICENSE_google-api-core_2_25_1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-api-python-client.2.169.0(Apache Software License).txt → LICENSE_google-api-python-client_2_174_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-auth-httplib2.0.2.0(Apache Software License).txt → LICENSE_google-auth-httplib2_0_2_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-auth.2.40.1(Apache Software License).txt → LICENSE_google-auth_2_40_3_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-cloud-aiplatform.1.92.0(Apache 2.0).txt → LICENSE_google-cloud-aiplatform_1_100_0_Apache_2_0.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-cloud-bigquery.3.31.0(Apache Software License).txt → LICENSE_google-cloud-appengine-logging_1_6_2_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-cloud-core.2.4.3(Apache Software License).txt → LICENSE_google-cloud-audit-log_0_3_2_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-cloud-resource-manager.1.14.2(Apache Software License).txt → LICENSE_google-cloud-bigquery_3_34_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-cloud-secret-manager.2.23.3(Apache Software License).txt → LICENSE_google-cloud-core_2_4_3_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-cloud-speech.2.32.0(Apache Software License).txt → LICENSE_google-cloud-logging_3_12_1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-cloud-storage.2.19.0(Apache Software License).txt → LICENSE_google-cloud-resource-manager_1_14_2_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-cloud-trace.1.16.1(Apache Software License).txt → LICENSE_google-cloud-secret-manager_2_24_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-crc32c.1.7.1(Apache 2.0).txt → LICENSE_google-cloud-speech_2_33_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-genai.1.14.0(Apache Software License).txt → LICENSE_google-cloud-storage_2_19_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.google-resumable-media.2.7.2(Apache Software License).txt → LICENSE_google-cloud-trace_1_16_2_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.googleapis-common-protos.1.70.0(Apache Software License).txt → LICENSE_google-crc32c_1_7_1_Apache_2_0.txt} +0 -0
- /cmdbox/licenses/{LICENSE.grpc-google-iam-v1.0.14.2(Apache Software License).txt → LICENSE_google-genai_1_23_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.id.1.5.0(Apache Software License).txt → LICENSE_google-resumable-media_2_7_2_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.importlib_metadata.8.6.1(Apache Software License).txt → LICENSE_googleapis-common-protos_1_70_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.greenlet.3.2.2(MIT AND Python-2.0).txt → LICENSE_greenlet_3_2_3_MIT_AND_Python-2_0.txt} +0 -0
- /cmdbox/licenses/{LICENSE.propcache.0.3.1(Apache Software License).txt → LICENSE_grpc-google-iam-v1_0_14_2_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.grpcio-status.1.71.0(Apache Software License).txt → LICENSE_grpcio-status_1_73_1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.grpcio.1.71.0(Apache Software License).txt → LICENSE_grpcio_1_73_1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.gunicorn.23.0.0(MIT License).txt → LICENSE_gunicorn_23_0_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.h11.0.16.0(MIT License).txt → LICENSE_h11_0_16_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.httpcore.1.0.9(BSD License).txt → LICENSE_httpcore_1_0_9_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.httplib2.0.22.0(MIT License).txt → LICENSE_httplib2_0_22_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.httptools.0.6.4(MIT License).txt → LICENSE_httptools_0_6_4_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.httpx-sse.0.4.0(MIT).txt → LICENSE_httpx-sse_0_4_1_MIT.txt} +0 -0
- /cmdbox/licenses/{LICENSE.httpx.0.28.1(BSD License).txt → LICENSE_httpx_0_28_1_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.huggingface-hub.0.31.1(Apache Software License).txt → LICENSE_huggingface-hub_0_33_1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.proto-plus.1.26.1(Apache Software License).txt → LICENSE_id_1_5_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.idna.3.10(BSD License).txt → LICENSE_idna_3_10_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.imagesize.1.4.1(MIT License).txt → LICENSE_imagesize_1_4_1_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.yarl.1.20.0(Apache Software License).txt → LICENSE_importlib_metadata_8_7_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.itsdangerous.2.2.0(BSD License).txt → LICENSE_itsdangerous_2_2_0_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.jaraco.classes.3.4.0(MIT License).txt → LICENSE_jaraco_classes_3_4_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.jaraco.context.6.0.1(MIT License).txt → LICENSE_jaraco_context_6_0_1_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sphinxcontrib-applehelp.2.0.0(BSD License).txt → LICENSE_jiter_0_10_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.jsonschema-specifications.2025.4.1(UNKNOWN).txt → LICENSE_jsonschema-specifications_2025_4_1_UNKNOWN.txt} +0 -0
- /cmdbox/licenses/{LICENSE.jsonschema.4.23.0(MIT License).txt → LICENSE_jsonschema_4_24_0_UNKNOWN.txt} +0 -0
- /cmdbox/licenses/{LICENSE.jaraco.functools.4.1.0(MIT License).txt → LICENSE_keyring_25_6_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.litellm.1.69.0(MIT License).txt → LICENSE_litellm_1_73_6_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.markdown-it-py.3.0.0(MIT License).txt → LICENSE_markdown-it-py_3_0_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.mcp.1.8.0(MIT License).txt → LICENSE_mcp_1_9_4_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.mdurl.0.1.2(MIT License).txt → LICENSE_mdurl_0_1_2_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.more-itertools.10.7.0(MIT License).txt → LICENSE_more-itertools_10_7_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.multidict.6.4.3(Apache Software License).txt → LICENSE_multidict_6_6_2_Apache_License_2_0.txt} +0 -0
- /cmdbox/licenses/{LICENSE.nh3.0.2.21(MIT).txt → LICENSE_nh3_0_2_21_MIT.txt} +0 -0
- /cmdbox/licenses/{LICENSE.openai.1.75.0(Apache Software License).txt → LICENSE_openai_1_93_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.opentelemetry-api.1.33.0(Apache Software License).txt → LICENSE_opentelemetry-api_1_34_1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.opentelemetry-exporter-gcp-trace.1.9.0(Apache Software License).txt → LICENSE_opentelemetry-exporter-gcp-trace_1_9_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.opentelemetry-resourcedetector-gcp.1.9.0a0(Apache Software License).txt → LICENSE_opentelemetry-resourcedetector-gcp_1_9_0a0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.opentelemetry-sdk.1.33.0(Apache Software License).txt → LICENSE_opentelemetry-sdk_1_34_1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.opentelemetry-semantic-conventions.0.54b0(Apache Software License).txt → LICENSE_opentelemetry-semantic-conventions_0_55b1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.packaging.25.0(Apache Software License; BSD License).txt → LICENSE_packaging_25_0_Apache_Software_License-BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pillow.11.2.1(UNKNOWN).txt → LICENSE_pillow_11_2_1_UNKNOWN.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pip.24.0(MIT License).txt → LICENSE_pip_24_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.plyer.2.1.0(MIT License).txt → LICENSE_plyer_2_1_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.prettytable.3.16.0(UNKNOWN).txt → LICENSE_prettytable_3_16_0_UNKNOWN.txt} +0 -0
- /cmdbox/licenses/{LICENSE.prompt_toolkit.3.0.51(BSD License).txt → LICENSE_prompt_toolkit_3_0_51_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.protobuf.5.29.4(3-Clause BSD License).txt → LICENSE_protobuf_6_31_1_3-Clause_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.psycopg-binary.3.2.7(GNU Lesser General Public License v3 (LGPLv3)).txt → LICENSE_psycopg-binary_3_2_9_GNU_Lesser_General_Public_License_v3-LGPLv3.txt} +0 -0
- /cmdbox/licenses/{LICENSE.psycopg.3.2.7(GNU Lesser General Public License v3 (LGPLv3)).txt → LICENSE_psycopg_3_2_9_GNU_Lesser_General_Public_License_v3-LGPLv3.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pyasn1.0.6.1(BSD License).txt → LICENSE_pyasn1_0_6_1_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pyasn1_modules.0.4.2(BSD License).txt → LICENSE_pyasn1_modules_0_4_2_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pycparser.2.22(BSD License).txt → LICENSE_pycparser_2_22_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pycryptodome.3.22.0(BSD License; Public Domain).txt → LICENSE_pycryptodome_3_23_0_BSD_License-Public_Domain.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pydantic-settings.2.9.1(MIT License).txt → LICENSE_pydantic-settings_2_10_1_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pydantic.2.11.4(MIT License).txt → LICENSE_pydantic_2_11_7_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pydantic_core.2.33.2(MIT License).txt → LICENSE_pydantic_core_2_33_2_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pyparsing.3.2.3(MIT License).txt → LICENSE_pyparsing_3_2_3_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pystray.0.19.5(GNU Lesser General Public License v3 (LGPLv3)).txt → LICENSE_pystray_0_19_5_GNU_Lesser_General_Public_License_v3-LGPLv3.txt} +0 -0
- /cmdbox/licenses/{LICENSE.python-dateutil.2.9.0.post0(Apache Software License; BSD License).txt → LICENSE_python-dateutil_2_9_0_post0_Apache_Software_License-BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.python-dotenv.1.1.0(BSD License).txt → LICENSE_python-dotenv_1_1_1_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.python-multipart.0.0.20(Apache Software License).txt → LICENSE_python-multipart_0_0_20_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.pywin32-ctypes.0.2.3(BSD-3-Clause).txt → LICENSE_pywin32-ctypes_0_2_3_BSD-3-Clause.txt} +0 -0
- /cmdbox/licenses/{LICENSE.questionary.2.1.0(MIT License).txt → LICENSE_questionary_2_1_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.readme_renderer.44.0(Apache Software License).txt → LICENSE_readme_renderer_44_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.redis.6.0.0(MIT License).txt → LICENSE_redis_6_2_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.referencing.0.36.2(UNKNOWN).txt → LICENSE_referencing_0_36_2_UNKNOWN.txt} +0 -0
- /cmdbox/licenses/{LICENSE.regex.2024.11.6(Apache Software License).txt → LICENSE_regex_2024_11_6_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.requests-toolbelt.1.0.0(Apache Software License).txt → LICENSE_requests-toolbelt_1_0_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.requests.2.32.3(Apache Software License).txt → LICENSE_requests_2_32_4_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.rfc3986.2.0.0(Apache Software License).txt → LICENSE_rfc3986_2_0_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.rich.14.0.0(MIT License).txt → LICENSE_rich_14_0_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.roman-numerals-py.3.1.0(CC0 1.0 Universal (CC0 1.0) Public Domain Dedication; Zero-Clause BSD (0BSD)).txt → LICENSE_roman-numerals-py_3_1_0_CC0_1_0_Universal-CC0_1_0-Public_Domain_Dedication-Zero-Clause_BSD-0BSD.txt} +0 -0
- /cmdbox/licenses/{LICENSE.rpds-py.0.24.0(MIT).txt → LICENSE_rpds-py_0_25_1_MIT.txt} +0 -0
- /cmdbox/licenses/{LICENSE.rsa.4.9.1(Apache Software License).txt → LICENSE_rsa_4_9_1_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.setuptools.65.5.0(MIT License).txt → LICENSE_setuptools_65_5_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.shapely.2.1.0(BSD License).txt → LICENSE_shapely_2_1_1_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.six.1.17.0(MIT License).txt → LICENSE_six_1_17_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sniffio.1.3.1(Apache Software License; MIT License).txt → LICENSE_sniffio_1_3_1_Apache_Software_License-MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.snowballstemmer.3.0.1(BSD License).txt → LICENSE_snowballstemmer_3_0_1_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sphinx-intl.2.3.1(BSD License).txt → LICENSE_sphinx-intl_2_3_1_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sphinx-rtd-theme.3.0.2(MIT License).txt → LICENSE_sphinx-rtd-theme_3_0_2_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sphinx-sitemap.2.6.0(MIT License).txt → LICENSE_sphinx-sitemap_2_7_2_UNKNOWN.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sphinx_fontawesome.0.0.6(GNU General Public License v2 (GPLv2)).txt → LICENSE_sphinx_fontawesome_0_0_6_GNU_General_Public_License_v2-GPLv2.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sphinxcontrib-devhelp.2.0.0(BSD License).txt → LICENSE_sphinxcontrib-applehelp_2_0_0_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sphinxcontrib-htmlhelp.2.1.0(BSD License).txt → LICENSE_sphinxcontrib-devhelp_2_0_0_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sphinxcontrib-jquery.4.1(BSD License).txt → LICENSE_sphinxcontrib-htmlhelp_2_1_0_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sphinxcontrib-qthelp.2.0.0(BSD License).txt → LICENSE_sphinxcontrib-jquery_4_1_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sphinxcontrib-jsmath.1.0.1(BSD License).txt → LICENSE_sphinxcontrib-jsmath_1_0_1_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sphinxcontrib-serializinghtml.2.0.0(BSD License).txt → LICENSE_sphinxcontrib-qthelp_2_0_0_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.tokenizers.0.21.1(Apache Software License).txt → LICENSE_sphinxcontrib-serializinghtml_2_0_0_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.sse-starlette.2.3.4(BSD License).txt → LICENSE_sse-starlette_2_3_6_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.starlette.0.46.2(BSD License).txt → LICENSE_starlette_0_46_2_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.tabulate.0.9.0(MIT License).txt → LICENSE_tabulate_0_9_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.tiktoken.0.9.0(MIT License).txt → LICENSE_tiktoken_0_9_0_MIT_License-Copyright-c-2022_OpenAI-Shantanu_Jain-Permission_is_hereby_granted-free_of_charge-to_any_pers.txt} +0 -0
- /cmdbox/licenses/{LICENSE.tomli.2.2.1(MIT License).txt → LICENSE_tomli_2_2_1_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.tqdm.4.67.1(MIT License; Mozilla Public License 2.0 (MPL 2.0)).txt → LICENSE_tqdm_4_67_1_MIT_License-Mozilla_Public_License_2_0-MPL_2_0.txt} +0 -0
- /cmdbox/licenses/{LICENSE.twine.6.1.0(Apache Software License).txt → LICENSE_twine_6_1_0_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.typing_extensions.4.13.2(UNKNOWN).txt → LICENSE_typing_extensions_4_14_0_UNKNOWN.txt} +0 -0
- /cmdbox/licenses/{LICENSE.tzdata.2025.2(Apache Software License).txt → LICENSE_tzdata_2025_2_Apache_Software_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.tzlocal.5.3.1(MIT License).txt → LICENSE_tzlocal_5_3_1_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.uritemplate.4.1.1(Apache Software License; BSD License).txt → LICENSE_uritemplate_4_2_0_BSD_3-Clause_OR_Apache-2_0.txt} +0 -0
- /cmdbox/licenses/{LICENSE.urllib3.2.4.0(UNKNOWN).txt → LICENSE_urllib3_2_5_0_UNKNOWN.txt} +0 -0
- /cmdbox/licenses/{LICENSE.uvicorn.0.34.2(BSD License).txt → LICENSE_uvicorn_0_35_0_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.watchfiles.1.0.5(MIT License).txt → LICENSE_watchfiles_1_1_0_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.wcwidth.0.2.13(MIT License).txt → LICENSE_wcwidth_0_2_13_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.websockets.15.0.1(BSD License).txt → LICENSE_websockets_15_0_1_BSD_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.wheel.0.45.1(MIT License).txt → LICENSE_wheel_0_45_1_MIT_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.zope.event.5.0(Zope Public License).txt → LICENSE_zope_event_5_1_Zope_Public_License.txt} +0 -0
- /cmdbox/licenses/{LICENSE.zope.interface.7.2(Zope Public License).txt → LICENSE_zope_interface_7_2_Zope_Public_License.txt} +0 -0
- {cmdbox-0.6.0.3.dist-info → cmdbox-0.6.1.dist-info}/LICENSE +0 -0
- {cmdbox-0.6.0.3.dist-info → cmdbox-0.6.1.dist-info}/WHEEL +0 -0
- {cmdbox-0.6.0.3.dist-info → cmdbox-0.6.1.dist-info}/entry_points.txt +0 -0
- {cmdbox-0.6.0.3.dist-info → cmdbox-0.6.1.dist-info}/top_level.txt +0 -0
|
@@ -51,6 +51,12 @@ class WebGencert(feature.UnsupportEdgeFeature):
|
|
|
51
51
|
dict(opt="output_cert_format", type=Options.T_STR, default="PEM", required=False, multi=False, hide=False, choice=["DER", "PEM"],
|
|
52
52
|
discription_ja="出力する自己署名証明書のファイルフォーマットを指定します。",
|
|
53
53
|
discription_en="Specifies the file format of the self-signed certificate to be output."),
|
|
54
|
+
dict(opt="output_pkey", type=Options.T_FILE, default=None, required=False, multi=False, hide=False, choice=None,
|
|
55
|
+
discription_ja="出力する自己署名証明書の公開鍵のファイルを指定します。省略した場合は `webhostオプションに指定したホスト名` .pkey に出力されます。",
|
|
56
|
+
discription_en="Specifies the public key file of the self-signed certificate to output. If omitted, the output will be in the `hostname specified in the `webhost option` .pkey."),
|
|
57
|
+
dict(opt="output_pkey_format", type=Options.T_STR, default="PEM", required=False, multi=False, hide=False, choice=["DER", "PEM"],
|
|
58
|
+
discription_ja="出力する自己署名証明書の公開鍵のファイルフォーマットを指定します。",
|
|
59
|
+
discription_en="Specifies the file format of the public key of the self-signed certificate to be output."),
|
|
54
60
|
dict(opt="output_key", type=Options.T_FILE, default=None, required=False, multi=False, hide=False, choice=None,
|
|
55
61
|
discription_ja="出力する自己署名証明書の秘密鍵ファイルを指定します。省略した場合は `webhostオプションに指定したホスト名` .key に出力されます。",
|
|
56
62
|
discription_en="Specifies the private key file of the self-signed certificate to be output.If omitted, the hostname specified in the `webhost option` .key will be output."),
|
|
@@ -91,22 +97,32 @@ class WebGencert(feature.UnsupportEdgeFeature):
|
|
|
91
97
|
return 1, msg, None
|
|
92
98
|
if args.output_cert is None:
|
|
93
99
|
args.output_cert = f"{args.webhost}.crt"
|
|
100
|
+
if args.output_pkey is None:
|
|
101
|
+
args.output_pkey = f"{args.webhost}.pkey"
|
|
94
102
|
if args.output_key is None:
|
|
95
103
|
args.output_key = f"{args.webhost}.key"
|
|
96
104
|
output_cert = Path(args.output_cert)
|
|
105
|
+
output_pkey = Path(args.output_pkey)
|
|
97
106
|
output_key = Path(args.output_key)
|
|
98
107
|
if not args.overwrite and output_cert.exists():
|
|
99
108
|
msg = dict(warn=f"File already exists. {output_cert}")
|
|
100
109
|
common.print_format(msg, args.format, tm, args.output_json, args.output_json_append, pf=pf)
|
|
101
110
|
return 1, msg, None
|
|
111
|
+
if not args.overwrite and output_pkey.exists():
|
|
112
|
+
msg = dict(warn=f"File already exists. {output_pkey}")
|
|
113
|
+
common.print_format(msg, args.format, tm, args.output_json, args.output_json_append, pf=pf)
|
|
114
|
+
return 1, msg, None
|
|
102
115
|
if not args.overwrite and output_key.exists():
|
|
103
116
|
msg = dict(warn=f"File already exists. {output_key}")
|
|
104
117
|
common.print_format(msg, args.format, tm, args.output_json, args.output_json_append, pf=pf)
|
|
105
118
|
return 1, msg, None
|
|
106
119
|
|
|
107
120
|
try:
|
|
108
|
-
self.gen_cert(logger, args.webhost,
|
|
109
|
-
|
|
121
|
+
self.gen_cert(logger, args.webhost,
|
|
122
|
+
output_cert, args.output_cert_format,
|
|
123
|
+
output_pkey, args.output_pkey_format,
|
|
124
|
+
output_key, args.output_key_format)
|
|
125
|
+
ret = dict(success=f"Generate certificate. {output_cert}, {output_pkey}, {output_key}")
|
|
110
126
|
except Exception as e:
|
|
111
127
|
msg = dict(error=f"Failed to generate certificate. {e}")
|
|
112
128
|
common.print_format(msg, args.format, tm, args.output_json, args.output_json_append, pf=pf)
|
|
@@ -115,6 +131,7 @@ class WebGencert(feature.UnsupportEdgeFeature):
|
|
|
115
131
|
|
|
116
132
|
def gen_cert(self, logger:logging.Logger, webhost:str,
|
|
117
133
|
output_cert:Path, output_cert_format:str,
|
|
134
|
+
output_pkey:Path, output_pkey_format:str,
|
|
118
135
|
output_key:Path, output_key_format:str) -> None:
|
|
119
136
|
# 秘密鍵の作成
|
|
120
137
|
private_key = rsa.generate_private_key(public_exponent=65537, key_size=2048)
|
|
@@ -151,6 +168,12 @@ class WebGencert(feature.UnsupportEdgeFeature):
|
|
|
151
168
|
critical=False,
|
|
152
169
|
).sign(private_key, hashes.SHA256())
|
|
153
170
|
|
|
171
|
+
# 自己署名証明書の公開鍵の保存
|
|
172
|
+
with open(output_pkey, "wb") as f:
|
|
173
|
+
f.write(self_cert.public_key().public_bytes(serialization.Encoding.DER if output_pkey_format == "DER" else serialization.Encoding.PEM,
|
|
174
|
+
format=serialization.PublicFormat.SubjectPublicKeyInfo))
|
|
175
|
+
logger.info(f"Save self-signed public key. {output_pkey}")
|
|
176
|
+
|
|
154
177
|
# 自己署名証明書の保存
|
|
155
178
|
with open(output_cert, "wb") as f:
|
|
156
179
|
f.write(self_cert.public_bytes(serialization.Encoding.DER if output_cert_format == "DER" else serialization.Encoding.PEM))
|
|
@@ -61,7 +61,7 @@ class WebGroupAdd(feature.UnsupportEdgeFeature):
|
|
|
61
61
|
dict(opt="group_parent", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
62
62
|
discription_ja="親グループ名を指定します。",
|
|
63
63
|
discription_en="Specifies the parent group name."),
|
|
64
|
-
dict(opt="signin_file", type=Options.T_FILE, default=
|
|
64
|
+
dict(opt="signin_file", type=Options.T_FILE, default=f".{self.ver.__appid__}/user_list.yml", required=True, multi=False, hide=False, choice=None,
|
|
65
65
|
discription_ja="サインイン可能なユーザーとパスワードを記載したファイルを指定します。省略した時は認証を要求しません。",
|
|
66
66
|
discription_en="Specify a file containing users and passwords with which they can signin. If omitted, no authentication is required."),
|
|
67
67
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
@@ -55,7 +55,7 @@ class WebGroupDel(feature.UnsupportEdgeFeature):
|
|
|
55
55
|
dict(opt="group_id", type=Options.T_INT, default=None, required=True, multi=False, hide=False, choice=None,
|
|
56
56
|
discription_ja="グループIDを指定します。",
|
|
57
57
|
discription_en="Specify the group ID. Do not duplicate other groups."),
|
|
58
|
-
dict(opt="signin_file", type=Options.T_FILE, default=
|
|
58
|
+
dict(opt="signin_file", type=Options.T_FILE, default=f".{self.ver.__appid__}/user_list.yml", required=True, multi=False, hide=False, choice=None,
|
|
59
59
|
discription_ja="サインイン可能なユーザーとパスワードを記載したファイルを指定します。省略した時は認証を要求しません。",
|
|
60
60
|
discription_en="Specify a file containing users and passwords with which they can signin. If omitted, no authentication is required."),
|
|
61
61
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
@@ -61,7 +61,7 @@ class WebGroupEdit(feature.UnsupportEdgeFeature):
|
|
|
61
61
|
dict(opt="group_parent", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
62
62
|
discription_ja="親グループ名を指定します。",
|
|
63
63
|
discription_en="Specifies the parent group name."),
|
|
64
|
-
dict(opt="signin_file", type=Options.T_FILE, default=
|
|
64
|
+
dict(opt="signin_file", type=Options.T_FILE, default=f".{self.ver.__appid__}/user_list.yml", required=True, multi=False, hide=False, choice=None,
|
|
65
65
|
discription_ja="サインイン可能なユーザーとパスワードを記載したファイルを指定します。省略した時は認証を要求しません。",
|
|
66
66
|
discription_en="Specify a file containing users and passwords with which they can signin. If omitted, no authentication is required."),
|
|
67
67
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
@@ -55,7 +55,7 @@ class WebGroupList(feature.OneshotResultEdgeFeature):
|
|
|
55
55
|
dict(opt="group_name", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
56
56
|
discription_ja="グループ名を指定して取得します。省略した時は全てのグループを取得します。",
|
|
57
57
|
discription_en="Retrieved by specifying a group name. If omitted, all groups are retrieved."),
|
|
58
|
-
dict(opt="signin_file", type=Options.T_FILE, default=
|
|
58
|
+
dict(opt="signin_file", type=Options.T_FILE, default=f".{self.ver.__appid__}/user_list.yml", required=True, multi=False, hide=False, choice=None,
|
|
59
59
|
discription_ja="サインイン可能なユーザーとパスワードを記載したファイルを指定します。省略した時は認証を要求しません。",
|
|
60
60
|
discription_en="Specify a file containing users and passwords with which they can signin. If omitted, no authentication is required."),
|
|
61
61
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
@@ -157,32 +157,12 @@ class WebStart(feature.UnsupportEdgeFeature, agent_base.AgentBase):
|
|
|
157
157
|
w = None
|
|
158
158
|
try:
|
|
159
159
|
args.gui_mode = False if not hasattr(args, 'gui_mode') or not args.gui_mode else args.gui_mode
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
result_html=args.result_html, users_html=args.users_html,
|
|
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
|
-
logger.info(f"Agent={args.agent}")
|
|
171
|
-
if args.agent=='use':
|
|
172
|
-
if args.agent_session_store == 'sqlite':
|
|
173
|
-
args.agent_session_dburl = "sqlite://" + pathname2url(str(w.agent_path / 'session.db'))
|
|
174
|
-
elif args.agent_session_store == 'postgresql':
|
|
175
|
-
args.agent_session_dburl = f"postgresql+psycopg://{args.agent_pg_user}:{args.agent_pg_password}@{args.agent_pg_host}:{args.agent_pg_port}/{args.agent_pg_dbname}"
|
|
176
|
-
else:
|
|
177
|
-
args.agent_session_dburl = None
|
|
178
|
-
agent_runner, mcp = self.init_agent_runner(logger, args)
|
|
179
|
-
w.start(allow_host=args.allow_host, listen_port=args.listen_port, ssl_listen_port=args.ssl_listen_port,
|
|
180
|
-
ssl_cert=ssl_cert, ssl_key=ssl_key, ssl_keypass=args.ssl_keypass, ssl_ca_certs=ssl_ca_certs,
|
|
181
|
-
session_domain=args.session_domain, session_path=args.session_path,
|
|
182
|
-
session_secure=args.session_secure, session_timeout=args.session_timeout,
|
|
183
|
-
outputs_key=args.outputs_key, guvicorn_workers=args.guvicorn_workers, guvicorn_timeout=args.guvicorn_timeout,
|
|
184
|
-
agent_runner=agent_runner, mcp=mcp, mcp_listen_port=args.mcp_listen_port, mcp_ssl_listen_port=args.mcp_ssl_listen_port)
|
|
185
|
-
|
|
160
|
+
w = self.createWeb(logger, args)
|
|
161
|
+
agent_runner, mcp = self._init_agent_runner(w, logger, args)
|
|
162
|
+
args.ssl_cert = None if args.ssl_cert is None else Path(args.ssl_cert)
|
|
163
|
+
args.ssl_key = None if args.ssl_key is None else Path(args.ssl_key)
|
|
164
|
+
args.ssl_ca_certs = None if args.ssl_ca_certs is None else Path(args.ssl_ca_certs)
|
|
165
|
+
self.start(w, agent_runner, mcp, logger, args)
|
|
186
166
|
msg = dict(success="web complate.")
|
|
187
167
|
common.print_format(msg, args.format, tm, args.output_json, args.output_json_append, pf=pf)
|
|
188
168
|
return 0, msg, w
|
|
@@ -191,3 +171,65 @@ class WebStart(feature.UnsupportEdgeFeature, agent_base.AgentBase):
|
|
|
191
171
|
msg = dict(warn=f"Web server start error. {e}")
|
|
192
172
|
common.print_format(msg, args.format, tm, args.output_json, args.output_json_append, pf=pf)
|
|
193
173
|
return 1, msg, w
|
|
174
|
+
|
|
175
|
+
def createWeb(self, logger:logging.Logger, args:argparse.Namespace) -> web.Web:
|
|
176
|
+
"""
|
|
177
|
+
Webオブジェクトを作成します
|
|
178
|
+
|
|
179
|
+
Args:
|
|
180
|
+
logger (logging.Logger): ロガー
|
|
181
|
+
args (argparse.Namespace): 引数
|
|
182
|
+
|
|
183
|
+
Returns:
|
|
184
|
+
web.Web: Webオブジェクト
|
|
185
|
+
"""
|
|
186
|
+
w = web.Web(logger, Path(args.data), appcls=self.appcls, ver=self.ver,
|
|
187
|
+
redis_host=args.host, redis_port=args.port, redis_password=args.password, svname=args.svname,
|
|
188
|
+
client_only=args.client_only, doc_root=args.doc_root, gui_html=args.gui_html, filer_html=args.filer_html,
|
|
189
|
+
result_html=args.result_html, users_html=args.users_html,
|
|
190
|
+
assets=args.assets, signin_html=args.signin_html, signin_file=args.signin_file, gui_mode=args.gui_mode)
|
|
191
|
+
return w
|
|
192
|
+
|
|
193
|
+
def _init_agent_runner(self, w:web.Web, logger:logging.Logger, args:argparse.Namespace) -> Tuple[Any, Any]:
|
|
194
|
+
"""
|
|
195
|
+
エージェントをセットアップします
|
|
196
|
+
|
|
197
|
+
Args:
|
|
198
|
+
w (web.Web): Webオブジェクト
|
|
199
|
+
logger (logging.Logger): ロガー
|
|
200
|
+
args (argparse.Namespace): 引数
|
|
201
|
+
|
|
202
|
+
Returns:
|
|
203
|
+
Tuple[agent_base.AgentBase, Any]: エージェントオブジェクト, MCPオブジェクト
|
|
204
|
+
"""
|
|
205
|
+
logger.info(f"Agent={args.agent}")
|
|
206
|
+
if args.agent=='use':
|
|
207
|
+
if not hasattr(self, 'mcp'):
|
|
208
|
+
from cmdbox.app import mcp
|
|
209
|
+
self.mcp = mcp.Mcp(logger, args.data, w.signin, self.appcls, self.ver)
|
|
210
|
+
if args.agent_session_store == 'sqlite':
|
|
211
|
+
args.agent_session_dburl = "sqlite://" + pathname2url(str(w.agent_path / 'session.db'))
|
|
212
|
+
elif args.agent_session_store == 'postgresql':
|
|
213
|
+
args.agent_session_dburl = f"postgresql+psycopg://{args.agent_pg_user}:{args.agent_pg_password}@{args.agent_pg_host}:{args.agent_pg_port}/{args.agent_pg_dbname}"
|
|
214
|
+
else:
|
|
215
|
+
args.agent_session_dburl = None
|
|
216
|
+
return self.mcp.init_agent_runner(logger, args)
|
|
217
|
+
return None, None
|
|
218
|
+
|
|
219
|
+
def start(self, w:web.Web, agent_runner, mcp, logger:logging.Logger, args:argparse.Namespace) -> None:
|
|
220
|
+
"""
|
|
221
|
+
Webモードを起動します
|
|
222
|
+
|
|
223
|
+
Args:
|
|
224
|
+
w (web.Web): Webオブジェクト
|
|
225
|
+
agent_runner: エージェントランナー
|
|
226
|
+
mcp: MCPオブジェクト
|
|
227
|
+
logger (logging.Logger): ロガー
|
|
228
|
+
args (argparse.Namespace): 引数
|
|
229
|
+
"""
|
|
230
|
+
w.start(allow_host=args.allow_host, listen_port=args.listen_port, ssl_listen_port=args.ssl_listen_port,
|
|
231
|
+
ssl_cert=args.ssl_cert, ssl_key=args.ssl_key, ssl_keypass=args.ssl_keypass, ssl_ca_certs=args.ssl_ca_certs,
|
|
232
|
+
session_domain=args.session_domain, session_path=args.session_path,
|
|
233
|
+
session_secure=args.session_secure, session_timeout=args.session_timeout,
|
|
234
|
+
outputs_key=args.outputs_key, guvicorn_workers=args.guvicorn_workers, guvicorn_timeout=args.guvicorn_timeout,
|
|
235
|
+
agent_runner=agent_runner, mcp=mcp,)
|
|
@@ -70,7 +70,7 @@ class WebUserAdd(feature.UnsupportEdgeFeature):
|
|
|
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."),
|
|
73
|
-
dict(opt="signin_file", type=Options.T_FILE, default=
|
|
73
|
+
dict(opt="signin_file", type=Options.T_FILE, default=f".{self.ver.__appid__}/user_list.yml", required=True, multi=False, hide=False, choice=None,
|
|
74
74
|
discription_ja="サインイン可能なユーザーとパスワードを記載したファイルを指定します。省略した時は認証を要求しません。",
|
|
75
75
|
discription_en="Specify a file containing users and passwords with which they can signin. If omitted, no authentication is required."),
|
|
76
76
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
@@ -55,7 +55,7 @@ class WebUserDel(feature.UnsupportEdgeFeature):
|
|
|
55
55
|
dict(opt="user_id", type=Options.T_INT, default=None, required=True, multi=False, hide=False, choice=None,
|
|
56
56
|
discription_ja="ユーザーIDを指定します。",
|
|
57
57
|
discription_en="Specify the user ID."),
|
|
58
|
-
dict(opt="signin_file", type=Options.T_FILE, default=
|
|
58
|
+
dict(opt="signin_file", type=Options.T_FILE, default=f".{self.ver.__appid__}/user_list.yml", required=True, multi=False, hide=False, choice=None,
|
|
59
59
|
discription_ja="サインイン可能なユーザーとパスワードを記載したファイルを指定します。省略した時は認証を要求しません。",
|
|
60
60
|
discription_en="Specify a file containing users and passwords with which they can signin. If omitted, no authentication is required."),
|
|
61
61
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
@@ -70,7 +70,7 @@ class WebUserEdit(feature.UnsupportEdgeFeature):
|
|
|
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."),
|
|
73
|
-
dict(opt="signin_file", type=Options.T_FILE, default=
|
|
73
|
+
dict(opt="signin_file", type=Options.T_FILE, default=f".{self.ver.__appid__}/user_list.yml", required=True, multi=False, hide=False, choice=None,
|
|
74
74
|
discription_ja="サインイン可能なユーザーとパスワードを記載したファイルを指定します。省略した時は認証を要求しません。",
|
|
75
75
|
discription_en="Specify a file containing users and passwords with which they can signin. If omitted, no authentication is required."),
|
|
76
76
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
@@ -55,7 +55,7 @@ class WebUserList(feature.OneshotResultEdgeFeature):
|
|
|
55
55
|
dict(opt="user_name", type=Options.T_STR, default=None, required=False, multi=False, hide=False, choice=None,
|
|
56
56
|
discription_ja="ユーザー名を指定して取得します。省略した時は全てのユーザーを取得します。",
|
|
57
57
|
discription_en="Retrieved by specifying a user name. If omitted, all users are retrieved."),
|
|
58
|
-
dict(opt="signin_file", type=Options.T_FILE, default=
|
|
58
|
+
dict(opt="signin_file", type=Options.T_FILE, default=f".{self.ver.__appid__}/user_list.yml", required=True, multi=False, hide=False, choice=None,
|
|
59
59
|
discription_ja="サインイン可能なユーザーとパスワードを記載したファイルを指定します。省略した時は認証を要求しません。",
|
|
60
60
|
discription_en="Specify a file containing users and passwords with which they can signin. If omitted, no authentication is required."),
|
|
61
61
|
dict(opt="stdout_log", type=Options.T_BOOL, default=True, required=False, multi=False, hide=True, choice=[True, False],
|
|
@@ -60,7 +60,7 @@ class Agent(feature.WebFeature):
|
|
|
60
60
|
session_id = form.get('session_id', None)
|
|
61
61
|
sessions = await web.list_agent_sessions(web.agent_runner.session_service, user_id, session_id=session_id)
|
|
62
62
|
data = [dict(id=s.id, app_name=s.app_name, user_id=s.user_id, last_update_time=s.last_update_time,
|
|
63
|
-
events=[dict(author=ev.author,text=ev.content.parts[0].text) for ev in s.events if ev.content and ev.content.parts]) for s in sessions]
|
|
63
|
+
events=[dict(author=ev.author,text=ev.content.parts[0].text) for ev in s.events if ev.content and ev.content.parts]) for s in sessions if s]
|
|
64
64
|
data.reverse() # 最新のセッションを先頭にする
|
|
65
65
|
return dict(success=data)
|
|
66
66
|
|
|
@@ -204,14 +204,20 @@ class Agent(feature.WebFeature):
|
|
|
204
204
|
outputs = dict()
|
|
205
205
|
if event.turn_complete:
|
|
206
206
|
outputs['turn_complete'] = True
|
|
207
|
-
yield
|
|
207
|
+
yield common.to_str(outputs)
|
|
208
208
|
if event.interrupted:
|
|
209
209
|
outputs['interrupted'] = True
|
|
210
|
-
yield
|
|
210
|
+
yield common.to_str(outputs)
|
|
211
211
|
#if event.is_final_response():
|
|
212
212
|
msg = None
|
|
213
213
|
if event.content and event.content.parts:
|
|
214
214
|
msg = "\n".join([p.text for p in event.content.parts if p and p.text])
|
|
215
|
+
calls = event.get_function_calls()
|
|
216
|
+
if calls:
|
|
217
|
+
msg += '\n```json{"function_calls":'+common.to_str([dict(fn=c.name,args=c.args) for c in calls])+'}```'
|
|
218
|
+
responses = event.get_function_responses()
|
|
219
|
+
if responses:
|
|
220
|
+
msg += '\n```json{"function_responses":'+common.to_str([dict(fn=r.name, res=r.response) for r in responses])+'}```'
|
|
215
221
|
elif event.actions and event.actions.escalate:
|
|
216
222
|
msg = f"Agent escalated: {event.error_message or 'No specific message.'}"
|
|
217
223
|
if msg:
|
|
@@ -219,7 +225,7 @@ class Agent(feature.WebFeature):
|
|
|
219
225
|
|
|
220
226
|
outputs['message'] = msg
|
|
221
227
|
web.options.audit_exec(sock, web, body=dict(agent_session=agent_session.id, result=msg))
|
|
222
|
-
yield
|
|
228
|
+
yield common.to_str(outputs)
|
|
223
229
|
if event.is_final_response():
|
|
224
230
|
break
|
|
225
231
|
except WebSocketDisconnect:
|
|
@@ -16,7 +16,7 @@ class Signin(feature.WebFeature):
|
|
|
16
16
|
web (Web): Webオブジェクト
|
|
17
17
|
app (FastAPI): FastAPIオブジェクト
|
|
18
18
|
"""
|
|
19
|
-
web.signin.signin_file_data = web.signin.load_signin_file(web.signin_file, web.signin.get_data())
|
|
19
|
+
web.signin.signin_file_data = web.signin.load_signin_file(web.signin_file, web.signin.get_data(), self=self)
|
|
20
20
|
if web.signin_html is not None:
|
|
21
21
|
if not web.signin_html.is_file():
|
|
22
22
|
raise HTTPException(status_code=500, detail=f'signin_html is not found. ({web.signin_html})')
|