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.

Files changed (188) hide show
  1. cmdbox/app/auth/__init__.py +0 -0
  2. cmdbox/app/auth/azure_signin.py +38 -0
  3. cmdbox/app/auth/azure_signin_saml.py +12 -0
  4. cmdbox/app/auth/github_signin.py +38 -0
  5. cmdbox/app/auth/google_signin.py +32 -0
  6. cmdbox/app/auth/signin.py +490 -287
  7. cmdbox/app/auth/signin_saml.py +61 -0
  8. cmdbox/app/common.py +48 -3
  9. cmdbox/app/edge.py +182 -213
  10. cmdbox/app/edge_tool.py +177 -0
  11. cmdbox/app/feature.py +10 -10
  12. cmdbox/app/features/cli/agent_base.py +477 -0
  13. cmdbox/app/features/cli/audit_base.py +1 -1
  14. cmdbox/app/features/cli/cmdbox_audit_search.py +24 -1
  15. cmdbox/app/features/cli/cmdbox_client_file_download.py +1 -1
  16. cmdbox/app/features/cli/cmdbox_cmd_list.py +105 -0
  17. cmdbox/app/features/cli/cmdbox_cmd_load.py +104 -0
  18. cmdbox/app/features/cli/cmdbox_edge_config.py +21 -7
  19. cmdbox/app/features/cli/cmdbox_edge_start.py +1 -1
  20. cmdbox/app/features/cli/cmdbox_gui_start.py +9 -132
  21. cmdbox/app/features/cli/cmdbox_gui_stop.py +4 -21
  22. cmdbox/app/features/cli/cmdbox_server_start.py +1 -1
  23. cmdbox/app/features/cli/cmdbox_web_apikey_add.py +1 -1
  24. cmdbox/app/features/cli/cmdbox_web_apikey_del.py +1 -1
  25. cmdbox/app/features/cli/cmdbox_web_genpass.py +0 -3
  26. cmdbox/app/features/cli/cmdbox_web_group_add.py +1 -1
  27. cmdbox/app/features/cli/cmdbox_web_group_del.py +1 -1
  28. cmdbox/app/features/cli/cmdbox_web_group_edit.py +1 -1
  29. cmdbox/app/features/cli/cmdbox_web_group_list.py +1 -1
  30. cmdbox/app/features/cli/cmdbox_web_start.py +119 -104
  31. cmdbox/app/features/cli/cmdbox_web_stop.py +1 -1
  32. cmdbox/app/features/cli/cmdbox_web_user_add.py +4 -4
  33. cmdbox/app/features/cli/cmdbox_web_user_del.py +1 -1
  34. cmdbox/app/features/cli/cmdbox_web_user_edit.py +4 -4
  35. cmdbox/app/features/cli/cmdbox_web_user_list.py +1 -1
  36. cmdbox/app/features/web/cmdbox_web_agent.py +250 -0
  37. cmdbox/app/features/web/cmdbox_web_do_signin.py +79 -103
  38. cmdbox/app/features/web/cmdbox_web_exec_cmd.py +8 -3
  39. cmdbox/app/features/web/cmdbox_web_signin.py +26 -4
  40. cmdbox/app/features/web/cmdbox_web_users.py +2 -0
  41. cmdbox/app/options.py +55 -2
  42. cmdbox/app/web.py +155 -27
  43. cmdbox/extensions/features.yml +18 -0
  44. cmdbox/extensions/sample_project/sample/app/features/cli/__init__.py +0 -0
  45. cmdbox/extensions/sample_project/sample/app/features/web/__init__.py +0 -0
  46. cmdbox/extensions/sample_project/sample/extensions/features.yml +23 -0
  47. cmdbox/extensions/sample_project/sample/extensions/user_list.yml +40 -6
  48. cmdbox/extensions/user_list.yml +37 -6
  49. cmdbox/licenses/{LICENSE.starlette.0.41.3(BSD License).txt → LICENSE.Authlib.1.5.2(BSD License).txt } +3 -1
  50. cmdbox/licenses/{LICENSE.pydantic_core.2.33.0(MIT License).txt → LICENSE.Deprecated.1.2.18(MIT License).txt } +2 -2
  51. cmdbox/licenses/{LICENSE.more-itertools.10.6.0(MIT License).txt → LICENSE.SQLAlchemy.2.0.40(MIT License).txt } +1 -1
  52. cmdbox/licenses/LICENSE.aiohttp.3.11.18(Apache Software License).txt +13 -0
  53. cmdbox/licenses/LICENSE.aiosignal.1.3.2(Apache Software License).txt +201 -0
  54. cmdbox/licenses/LICENSE.async-timeout.5.0.1(Apache Software License).txt +13 -0
  55. cmdbox/licenses/{LICENSE.watchfiles.1.0.0(MIT License).txt → LICENSE.attrs.25.3.0(UNKNOWN).txt} +1 -1
  56. cmdbox/licenses/{LICENSE.anyio.4.6.2.post1(MIT License).txt → LICENSE.cachetools.5.5.2(MIT License).txt } +1 -1
  57. cmdbox/licenses/LICENSE.distro.1.9.0(Apache Software License).txt +202 -0
  58. cmdbox/licenses/{LICENSE.pydantic_core.2.33.1(MIT License).txt → LICENSE.docstring_parser.0.16(MIT License).txt } +1 -1
  59. cmdbox/licenses/LICENSE.filelock.3.18.0(The Unlicense (Unlicense)).txt +24 -0
  60. cmdbox/licenses/LICENSE.frozenlist.1.6.0(Apache-2.0).txt +201 -0
  61. cmdbox/licenses/{LICENSE.starlette.0.46.1(BSD License).txt → LICENSE.fsspec.2025.3.2(BSD License).txt } +3 -1
  62. cmdbox/licenses/{LICENSE.argcomplete.3.6.1(Apache Software License).txt → LICENSE.google-adk.0.5.0(Apache Software License).txt } +25 -0
  63. cmdbox/licenses/LICENSE.google-api-python-client.2.169.0(Apache Software License).txt +201 -0
  64. cmdbox/licenses/LICENSE.google-auth-httplib2.0.2.0(Apache Software License).txt +201 -0
  65. cmdbox/licenses/LICENSE.google-auth.2.40.1(Apache Software License).txt +201 -0
  66. cmdbox/licenses/LICENSE.google-cloud-aiplatform.1.92.0(Apache 2.0).txt +202 -0
  67. cmdbox/licenses/LICENSE.google-cloud-bigquery.3.31.0(Apache Software License).txt +202 -0
  68. cmdbox/licenses/LICENSE.google-cloud-core.2.4.3(Apache Software License).txt +202 -0
  69. cmdbox/licenses/LICENSE.google-cloud-resource-manager.1.14.2(Apache Software License).txt +202 -0
  70. cmdbox/licenses/LICENSE.google-cloud-secret-manager.2.23.3(Apache Software License).txt +202 -0
  71. cmdbox/licenses/LICENSE.google-cloud-speech.2.32.0(Apache Software License).txt +202 -0
  72. cmdbox/licenses/LICENSE.google-cloud-storage.2.19.0(Apache Software License).txt +202 -0
  73. cmdbox/licenses/LICENSE.google-cloud-trace.1.16.1(Apache Software License).txt +202 -0
  74. cmdbox/licenses/LICENSE.google-crc32c.1.7.1(Apache 2.0).txt +202 -0
  75. cmdbox/licenses/LICENSE.google-genai.1.14.0(Apache Software License).txt +202 -0
  76. cmdbox/licenses/LICENSE.google-resumable-media.2.7.2(Apache Software License).txt +202 -0
  77. cmdbox/licenses/LICENSE.googleapis-common-protos.1.70.0(Apache Software License).txt +202 -0
  78. cmdbox/licenses/{LICENSE.fastapi.0.115.5(MIT License).txt → LICENSE.graphviz.0.20.3(MIT License).txt } +1 -1
  79. cmdbox/licenses/LICENSE.grpc-google-iam-v1.0.14.2(Apache Software License).txt +202 -0
  80. cmdbox/licenses/LICENSE.grpcio-status.1.71.0(Apache Software License).txt +610 -0
  81. cmdbox/licenses/LICENSE.grpcio.1.71.0(Apache Software License).txt +610 -0
  82. cmdbox/licenses/{LICENSE.uvicorn.0.34.0(BSD License).txt → LICENSE.httpcore.1.0.9(BSD License).txt } +1 -1
  83. cmdbox/licenses/LICENSE.httplib2.0.22.0(MIT License).txt +23 -0
  84. cmdbox/licenses/{LICENSE.tomli.2.1.0(MIT License).txt → LICENSE.httpx-sse.0.4.0(MIT).txt} +1 -1
  85. cmdbox/licenses/LICENSE.httpx.0.28.1(BSD License).txt +12 -0
  86. cmdbox/licenses/LICENSE.huggingface-hub.0.31.1(Apache Software License).txt +201 -0
  87. cmdbox/licenses/{LICENSE.charset-normalizer.3.4.0(MIT License).txt → LICENSE.jsonschema-specifications.2025.4.1(UNKNOWN).txt} +5 -7
  88. cmdbox/licenses/LICENSE.jsonschema.4.23.0(MIT License).txt +19 -0
  89. cmdbox/licenses/{LICENSE.pkginfo.1.10.0(MIT License).txt → LICENSE.litellm.1.69.0(MIT License).txt } +6 -1
  90. cmdbox/licenses/{LICENSE.redis.5.2.1(MIT License).txt → LICENSE.mcp.1.8.0(MIT License).txt } +1 -1
  91. cmdbox/licenses/LICENSE.multidict.6.4.3(Apache Software License).txt +13 -0
  92. cmdbox/licenses/{LICENSE.argcomplete.3.5.1(Apache Software License).txt → LICENSE.openai.1.75.0(Apache Software License).txt } +25 -1
  93. cmdbox/licenses/LICENSE.opentelemetry-api.1.33.0(Apache Software License).txt +201 -0
  94. cmdbox/licenses/LICENSE.opentelemetry-exporter-gcp-trace.1.9.0(Apache Software License).txt +201 -0
  95. cmdbox/licenses/LICENSE.opentelemetry-resourcedetector-gcp.1.9.0a0(Apache Software License).txt +201 -0
  96. cmdbox/licenses/LICENSE.opentelemetry-sdk.1.33.0(Apache Software License).txt +201 -0
  97. cmdbox/licenses/LICENSE.opentelemetry-semantic-conventions.0.54b0(Apache Software License).txt +201 -0
  98. cmdbox/licenses/LICENSE.propcache.0.3.1(Apache Software License).txt +202 -0
  99. cmdbox/licenses/LICENSE.proto-plus.1.26.1(Apache Software License).txt +202 -0
  100. cmdbox/licenses/{LICENSE.Pygments.2.18.0(BSD License).txt → LICENSE.protobuf.5.29.4(3-Clause BSD License).txt } +15 -8
  101. cmdbox/licenses/LICENSE.pyasn1.0.6.1(BSD License).txt +24 -0
  102. cmdbox/licenses/LICENSE.pyasn1_modules.0.4.2(BSD License).txt +24 -0
  103. cmdbox/licenses/LICENSE.pydantic-settings.2.9.1(MIT License).txt +21 -0
  104. cmdbox/licenses/{LICENSE.gevent.25.4.1(MIT).txt → LICENSE.pyparsing.3.2.3(MIT License).txt } +5 -12
  105. cmdbox/licenses/LICENSE.python-dateutil.2.9.0.post0(Apache Software License; BSD License).txt +54 -0
  106. cmdbox/licenses/LICENSE.referencing.0.36.2(UNKNOWN).txt +19 -0
  107. cmdbox/licenses/LICENSE.regex.2024.11.6(Apache Software License).txt +208 -0
  108. cmdbox/licenses/LICENSE.rpds-py.0.24.0(MIT).txt +19 -0
  109. cmdbox/licenses/{LICENSE.python-multipart.0.0.17(Apache Software License).txt → LICENSE.rsa.4.9.1(Apache Software License).txt } +1 -2
  110. cmdbox/licenses/{LICENSE.sphinx-intl.2.3.0(BSD License).txt → LICENSE.shapely.2.1.0(BSD License).txt } +6 -2
  111. cmdbox/licenses/LICENSE.sse-starlette.2.3.4(BSD License).txt +27 -0
  112. cmdbox/licenses/LICENSE.tiktoken.0.9.0(MIT License).txt +21 -0
  113. cmdbox/licenses/LICENSE.tokenizers.0.21.1(Apache Software License).txt +1 -0
  114. 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
  115. cmdbox/licenses/{LICENSE.rich.13.9.4(MIT License).txt → LICENSE.tzlocal.5.3.1(MIT License).txt } +3 -3
  116. cmdbox/licenses/LICENSE.uritemplate.4.1.1(Apache Software License; BSD License).txt +3 -0
  117. cmdbox/licenses/LICENSE.wrapt.1.17.2(BSD License).txt +24 -0
  118. cmdbox/licenses/LICENSE.yarl.1.20.0(Apache Software License).txt +202 -0
  119. cmdbox/licenses/files.txt +111 -17
  120. cmdbox/logconf_agent.yml +38 -0
  121. cmdbox/logconf_audit.yml +13 -5
  122. cmdbox/logconf_client.yml +13 -5
  123. cmdbox/logconf_cmdbox.yml +13 -5
  124. cmdbox/logconf_edge.yml +13 -5
  125. cmdbox/logconf_gui.yml +13 -5
  126. cmdbox/logconf_server.yml +13 -5
  127. cmdbox/logconf_web.yml +13 -5
  128. cmdbox/version.py +3 -2
  129. cmdbox/web/agent.html +263 -0
  130. cmdbox/web/assets/cmdbox/agent.js +335 -0
  131. cmdbox/web/assets/cmdbox/common.js +1111 -1020
  132. cmdbox/web/assets/cmdbox/signin.js +16 -3
  133. cmdbox/web/assets/cmdbox/users.js +1 -1
  134. cmdbox/web/assets/filer/filer.js +4 -2
  135. cmdbox/web/signin.html +10 -6
  136. {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/METADATA +132 -35
  137. {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/RECORD +161 -123
  138. cmdbox/app/features/web/cmdbox_web_load_pin.py +0 -43
  139. cmdbox/app/features/web/cmdbox_web_save_pin.py +0 -42
  140. cmdbox/licenses/LICENSE.Jinja2.3.1.4(BSD License).txt +0 -28
  141. cmdbox/licenses/LICENSE.Sphinx.8.1.3(BSD License).txt +0 -31
  142. cmdbox/licenses/LICENSE.babel.2.16.0(BSD License).txt +0 -27
  143. cmdbox/licenses/LICENSE.certifi.2025.1.31(Mozilla Public License 2.0 (MPL 2.0)).txt +0 -20
  144. cmdbox/licenses/LICENSE.click.8.1.8(BSD License).txt +0 -28
  145. cmdbox/licenses/LICENSE.cryptography.44.0.2(Apache Software License; BSD License).txt +0 -3
  146. cmdbox/licenses/LICENSE.greenlet.3.2.0(MIT AND Python-2.0).txt +0 -30
  147. cmdbox/licenses/LICENSE.keyring.25.5.0(MIT License).txt +0 -17
  148. cmdbox/licenses/LICENSE.numpy.2.2.4(BSD License).txt +0 -950
  149. cmdbox/licenses/LICENSE.pillow.11.0.0(CMU License (MIT-CMU)).txt +0 -1226
  150. cmdbox/licenses/LICENSE.pillow.11.1.0(CMU License (MIT-CMU)).txt +0 -1213
  151. cmdbox/licenses/LICENSE.prettytable.3.12.0(BSD License).txt +0 -30
  152. cmdbox/licenses/LICENSE.prompt_toolkit.3.0.50(BSD License).txt +0 -27
  153. cmdbox/licenses/LICENSE.psycopg.3.2.6(GNU Lesser General Public License v3 (LGPLv3)).txt +0 -165
  154. cmdbox/licenses/LICENSE.pydantic.2.11.1(MIT License).txt +0 -21
  155. cmdbox/licenses/LICENSE.pydantic.2.11.3(MIT License).txt +0 -21
  156. cmdbox/licenses/LICENSE.python-dotenv.1.0.1(BSD License).txt +0 -27
  157. cmdbox/licenses/LICENSE.twine.5.1.1(Apache Software License).txt +0 -174
  158. cmdbox/licenses/LICENSE.typing_extensions.4.13.0(UNKNOWN).txt +0 -279
  159. cmdbox/licenses/LICENSE.urllib3.2.2.3(MIT License).txt +0 -21
  160. cmdbox/licenses/LICENSE.urllib3.2.3.0(MIT License).txt +0 -21
  161. cmdbox/licenses/LICENSE.uvicorn.0.34.1(BSD License).txt +0 -27
  162. cmdbox/licenses/LICENSE.watchfiles.1.0.4(MIT License).txt +0 -21
  163. cmdbox/licenses/LICENSE.websockets.14.1(BSD License).txt +0 -24
  164. cmdbox/licenses/LICENSE.zope.interface.7.1.1(Zope Public License).txt +0 -44
  165. /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
  166. /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
  167. /cmdbox/licenses/{LICENSE.charset-normalizer.3.4.1(MIT License).txt → LICENSE.charset-normalizer.3.4.2(MIT License).txt} +0 -0
  168. /cmdbox/licenses/{LICENSE.click.8.1.7(BSD License).txt → LICENSE.click.8.2.0(UNKNOWN).txt} +0 -0
  169. /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
  170. /cmdbox/licenses/{LICENSE.gevent.24.11.1(MIT License).txt → LICENSE.gevent.25.4.2(MIT).txt} +0 -0
  171. /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
  172. /cmdbox/licenses/{LICENSE.greenlet.3.1.1(MIT License).txt → LICENSE.greenlet.3.2.2(MIT AND Python-2.0).txt} +0 -0
  173. /cmdbox/licenses/{LICENSE.h11.0.14.0(MIT License).txt → LICENSE.h11.0.16.0(MIT License).txt} +0 -0
  174. /cmdbox/licenses/{LICENSE.nh3.0.2.18(MIT).txt → LICENSE.jiter.0.9.0(MIT License).txt} +0 -0
  175. /cmdbox/licenses/{LICENSE.more-itertools.10.5.0(MIT License).txt → LICENSE.more-itertools.10.7.0(MIT License).txt} +0 -0
  176. /cmdbox/licenses/{LICENSE.numpy.2.1.3(BSD License).txt → LICENSE.numpy.2.2.5(BSD License).txt} +0 -0
  177. /cmdbox/licenses/{LICENSE.packaging.24.2(Apache Software License; BSD License).txt → LICENSE.packaging.25.0(Apache Software License; BSD License).txt} +0 -0
  178. /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
  179. /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
  180. /cmdbox/licenses/{LICENSE.pydantic.2.10.2(MIT License).txt → LICENSE.pydantic.2.11.4(MIT License).txt} +0 -0
  181. /cmdbox/licenses/{LICENSE.pydantic_core.2.27.1(MIT License).txt → LICENSE.pydantic_core.2.33.2(MIT License).txt} +0 -0
  182. /cmdbox/licenses/{LICENSE.redis.5.2.0(MIT License).txt → LICENSE.redis.6.0.0(MIT License).txt} +0 -0
  183. /cmdbox/licenses/{LICENSE.snowballstemmer.2.2.0(BSD License).txt → LICENSE.snowballstemmer.3.0.1(BSD License).txt} +0 -0
  184. /cmdbox/licenses/{LICENSE.uvicorn.0.32.1(BSD License).txt → LICENSE.uvicorn.0.34.2(BSD License).txt} +0 -0
  185. {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/LICENSE +0 -0
  186. {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/WHEEL +0 -0
  187. {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/entry_points.txt +0 -0
  188. {cmdbox-0.5.3.1.dist-info → cmdbox-0.6.0.dist-info}/top_level.txt +0 -0
cmdbox/logconf_gui.yml CHANGED
@@ -4,14 +4,21 @@ formatters:
4
4
  fmt:
5
5
  format: '%(levelname)s[%(asctime)s] - %(message)s'
6
6
  class: logging.Formatter
7
+ fmt_rich:
8
+ format: '%(message)s'
9
+ class: logging.Formatter
7
10
  handlers:
8
11
  std:
9
- class: cmdbox.app.commons.loghandler.ColorfulStreamHandler
12
+ class: rich.logging.RichHandler
10
13
  level: INFO
11
- formatter: fmt
12
- stream: ext://sys.stdout
14
+ formatter: fmt_rich
15
+ show_path: false
16
+ omit_repeated_times: false
17
+ tracebacks_word_wrap: false
18
+ log_time_format: '[%Y-%m-%d %H:%M]'
19
+ #stream: ext://sys.stdout
13
20
  gui:
14
- class: cmdbox.app.commons.loghandler.TimedRotatingFileHandler
21
+ class: logging.handlers.TimedRotatingFileHandler
15
22
  level: INFO
16
23
  formatter: fmt
17
24
  backupCount: 5
@@ -24,7 +31,8 @@ loggers:
24
31
  handlers: [gui, std]
25
32
  level: INFO
26
33
  qualname: gui
27
-
34
+ propagate: false
35
+
28
36
  #root:
29
37
  # handlers: [std]
30
38
  # level: NOTSET
cmdbox/logconf_server.yml CHANGED
@@ -4,14 +4,21 @@ formatters:
4
4
  fmt:
5
5
  format: '%(levelname)s[%(asctime)s] - %(message)s'
6
6
  class: logging.Formatter
7
+ fmt_rich:
8
+ format: '%(message)s'
9
+ class: logging.Formatter
7
10
  handlers:
8
11
  std:
9
- class: cmdbox.app.commons.loghandler.ColorfulStreamHandler
12
+ class: rich.logging.RichHandler
10
13
  level: INFO
11
- formatter: fmt
12
- stream: ext://sys.stdout
14
+ formatter: fmt_rich
15
+ show_path: false
16
+ omit_repeated_times: false
17
+ tracebacks_word_wrap: false
18
+ log_time_format: '[%Y-%m-%d %H:%M]'
19
+ #stream: ext://sys.stdout
13
20
  server:
14
- class: cmdbox.app.commons.loghandler.TimedRotatingFileHandler
21
+ class: logging.handlers.TimedRotatingFileHandler
15
22
  level: INFO
16
23
  formatter: fmt
17
24
  backupCount: 5
@@ -24,7 +31,8 @@ loggers:
24
31
  handlers: [server, std]
25
32
  level: INFO
26
33
  qualname: server
27
-
34
+ propagate: false
35
+
28
36
  #root:
29
37
  # handlers: [std]
30
38
  # level: NOTSET
cmdbox/logconf_web.yml CHANGED
@@ -4,14 +4,21 @@ formatters:
4
4
  fmt:
5
5
  format: '%(levelname)s[%(asctime)s] - %(message)s'
6
6
  class: logging.Formatter
7
+ fmt_rich:
8
+ format: '%(message)s'
9
+ class: logging.Formatter
7
10
  handlers:
8
11
  std:
9
- class: cmdbox.app.commons.loghandler.ColorfulStreamHandler
12
+ class: rich.logging.RichHandler
10
13
  level: INFO
11
- formatter: fmt
12
- stream: ext://sys.stdout
14
+ formatter: fmt_rich
15
+ show_path: false
16
+ omit_repeated_times: false
17
+ tracebacks_word_wrap: false
18
+ log_time_format: '[%Y-%m-%d %H:%M]'
19
+ #stream: ext://sys.stdout
13
20
  web:
14
- class: cmdbox.app.commons.loghandler.TimedRotatingFileHandler
21
+ class: logging.handlers.TimedRotatingFileHandler
15
22
  level: INFO
16
23
  formatter: fmt
17
24
  backupCount: 5
@@ -24,7 +31,8 @@ loggers:
24
31
  handlers: [web, std]
25
32
  level: INFO
26
33
  qualname: web
27
-
34
+ propagate: false
35
+
28
36
  #root:
29
37
  # handlers: [std]
30
38
  # level: NOTSET
cmdbox/version.py CHANGED
@@ -1,9 +1,9 @@
1
1
  import datetime
2
2
 
3
- dt_now = datetime.datetime(2025, 4, 18)
3
+ dt_now = datetime.datetime(2025, 5, 30)
4
4
  __appid__ = 'cmdbox'
5
5
  __title__ = 'cmdbox (Command Development Application)'
6
- __version__ = '0.5.3.1'
6
+ __version__ = '0.6.0'
7
7
  __copyright__ = f'Copyright © 2023-{dt_now.strftime("%Y")} hamacom2004jp'
8
8
  __pypiurl__ = 'https://pypi.org/project/cmdbox/'
9
9
  __srcurl__ = 'https://github.com/hamacom2004jp/cmdbox'
@@ -18,6 +18,7 @@ __logo__ = '''
18
18
  ╚═════╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝'''
19
19
  __description__ = f'{__title__} {__version__}\n\n' + \
20
20
  f'{__copyright__}\n' + \
21
+ f'build: {dt_now.strftime("%Y-%m-%d")}\n' + \
21
22
  f'Web Site: PyPi <{__pypiurl__}>\n' + \
22
23
  f'Web Site: SorceCode <{__srcurl__}>\n' + \
23
24
  f'Web Site: Document <{__docurl__}>\n' + \
cmdbox/web/agent.html ADDED
@@ -0,0 +1,263 @@
1
+ <html>
2
+ <head>
3
+ <meta charset="UTF-8">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+ <style type="text/css">
6
+ .card-hover:hover {
7
+ box-shadow: 0 0 8px gray;
8
+ }
9
+ .filer-pane-divider {
10
+ border: 1px solid var(--bs-border-color-translucent) !important;
11
+ /**background-color: #F0F0F0 !important;*/
12
+ border-radius: 1px;
13
+ /*left: 50%;*/
14
+ }
15
+ .chat-container {
16
+ overflow-y: auto;
17
+ background-color: var(--bs-body-bg);
18
+ }
19
+ .message {
20
+ padding: 10px;
21
+ /**border: 1px solid var(--bs-border-color-translucent);*/
22
+ margin-bottom: 10px;
23
+ border-radius: 5px;
24
+ clear: both;
25
+ }
26
+ .user-message {
27
+ background-color: var(--bs-tertiary-bg);
28
+ color: var(--bs-body-color);
29
+ /**float: right;*/
30
+ border-bottom-left-radius: 24px;
31
+ border-bottom-right-radius: 24px;
32
+ border-top-left-radius: 24px;
33
+ border-top-right-radius: 4px;
34
+ }
35
+ .bot-message {
36
+ background-color: var(--bs-body-bg);
37
+ color: var(--bs-body-color);
38
+ float: left;
39
+ }
40
+ .chat-input {
41
+ border-radius: 16px;
42
+ border: 1px solid var(--bs-border-color);
43
+ }
44
+ :root {
45
+ --cmdbox-width: 800px;
46
+ }
47
+ pre {
48
+ width: var(--cmdbox-width);
49
+ overflow-wrap: break-all;
50
+ }
51
+ .btn_hover {
52
+ border-radius: 24px !important;
53
+ }
54
+ .btn_hover:hover {
55
+ background-color: var(--bs-tertiary-bg) !important;
56
+ }
57
+ </style>
58
+ </head>
59
+ <body lang="ja" class="overflow-hidden p-2" style="background-color:rgb(33, 37, 41)">
60
+ <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
61
+ <symbol id="svg_signin_ico" viewBox="0 0 16 16">
62
+ <path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"></path>
63
+ <path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"></path>
64
+ </symbol>
65
+ <symbol id="svg_window_stack" viewBox="0 0 16 16">
66
+ <path d="M4.5 6a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1ZM6 6a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Zm2-.5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"/>
67
+ <path d="M12 1a2 2 0 0 1 2 2 2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2 2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h10ZM2 12V5a2 2 0 0 1 2-2h9a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1Zm1-4v5a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8H3Zm12-1V5a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v2h12Z"/>
68
+ </symbol>
69
+ <symbol id="svg_window" viewBox="0 0 16 16">
70
+ <path d="M2.5 4a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1zm2-.5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0zm1 .5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"/>
71
+ <path d="M2 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2zm13 2v2H1V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1zM2 14a1 1 0 0 1-1-1V6h14v7a1 1 0 0 1-1 1H2z"/>
72
+ </symbol>
73
+ <symbol id="btn_x" viewBox="0 0 16 16">
74
+ <path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/>
75
+ </symbol>
76
+ <symbol id="btn_chat_text" viewBox="0 0 16 16">
77
+ <path d="M2.678 11.894a1 1 0 0 1 .287.801 11 11 0 0 1-.398 2c1.395-.323 2.247-.697 2.634-.893a1 1 0 0 1 .71-.074A8 8 0 0 0 8 14c3.996 0 7-2.807 7-6s-3.004-6-7-6-7 2.808-7 6c0 1.468.617 2.83 1.678 3.894m-.493 3.905a22 22 0 0 1-.713.129c-.2.032-.352-.176-.273-.362a10 10 0 0 0 .244-.637l.003-.01c.248-.72.45-1.548.524-2.319C.743 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7-3.582 7-8 7a9 9 0 0 1-2.347-.306c-.52.263-1.639.742-3.468 1.105"/>
78
+ <path d="M4 5.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8m0 2.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5"/>
79
+ </symbol>
80
+ <symbol id="btn_plus" viewBox="0 0 16 16">
81
+ <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
82
+ </symbol>
83
+ <symbol id="btn_send" viewBox="0 0 16 16">
84
+ <path d="M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"/>
85
+ </symbol>
86
+ <symbol id="svg_justify_left" viewBox="0 0 16 16">
87
+ <path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/>
88
+ </symbol>
89
+ <symbol id="btn_three_dots_vertical" viewBox="0 0 16 16">
90
+ <path d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
91
+ </symbol>
92
+ </svg>
93
+ <!-- ナビゲーションバー -->
94
+ <nav class="navbar navbar-expand-sm fixed-top p-2">
95
+ <div class="container-fluid">
96
+ <a class="navbar-brand" href="#">cmdbox</a>
97
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
98
+ <span class="navbar-toggler-icon"></span>
99
+ </button>
100
+ <div class="collapse navbar-collapse" id="navbarNavDropdown">
101
+ <ul class="navbar-nav me-auto">
102
+ <li class="nav-item dropdown">
103
+ <a class="nav-link dropdown-toggle" href="#" id="viewMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
104
+ View
105
+ </a>
106
+ <ul class="dropdown-menu viewmenu">
107
+ <li class="nav-item dropdown">
108
+ <span class="dropdown-item">
109
+ Change Dark Mode
110
+ <select class="d-inline-block change_color_mode" onchange="cmdbox.change_color_mode($(this).val());">
111
+ <option value="dark" selected>Dark</option>
112
+ <option value="midnight">midnight</option>
113
+ <option value="deepsea">deepsea</option>
114
+ <option value="verdant">verdant</option>
115
+ <option value="bumblebee">bumblebee</option>
116
+ <option value="crimson">crimson</option>
117
+ <option value="light">light</option>
118
+ </select>
119
+ </span>
120
+ </li>
121
+ </ul>
122
+ </li>
123
+ <li class="nav-item dropdown">
124
+ <a class="nav-link dropdown-toggle" href="#" id="aboutMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
125
+ About
126
+ </a>
127
+ <ul class="dropdown-menu aboutmenu" aria-labelledby="aboutMenuLink">
128
+ <li><a class="dropdown-item" href="#" onclick="$(`#versions_modal`).modal(`show`);">Versions</a></li>
129
+ </ul>
130
+ </li>
131
+ </ul>
132
+ <div class="d-none dropdown user_info">
133
+ <a href="#" class="d-block link-body-emphasis text-decoration-none dropdown-toggle show" data-bs-toggle="dropdown" aria-expanded="true" style="fill:gray;">
134
+ <svg class="m-1" width="24" height="24" viewBox="0 0 16 16">
135
+ <use href="#svg_signin_ico"></use>
136
+ </svg>
137
+ <span class="username">UserName</span>
138
+ </a>
139
+ <ul class="dropdown-menu text-small shadow" style="position: absolute; inset: 0px 0px auto auto; margin: 0px; transform: translate(0px, 34px);" data-popper-placement="bottom-end">
140
+ <div class="user_info_note ps-3 pe-3"></div>
141
+ <li><hr class="dropdown-divider"></li>
142
+ </ul>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </nav>
147
+ <!-- メインコンテナ -->
148
+ <div id="main_container" class="container-fluid overflow-auto split-pane fixed-left" style="margin-top:66px;height:calc(100vh - 120px);">
149
+ <!-- 履歴側ペイン -->
150
+ <div id="left_container" class="split-pane-component filer-pane-left" style="width:15%;">
151
+ <div id="newchat_container" class="w-100 d-flex justify-content-center">
152
+ <button id="btn_newchat" class="btn_hover btn me-3 p-2" type="button" style="border:0px;">
153
+ <svg class="bi bi-plus" width="24" height="24" fill="currentColor"><use href="#btn_plus"></use></svg>
154
+ <span class="btn_text">New Chat&nbsp;</span>
155
+ </button>
156
+ </div>
157
+ <h6 style="float:left;">
158
+ Histories
159
+ </h6>
160
+ <div id="history_container" class="w-100 d-flex justify-content-center" style="height:calc(100% - 80px);overflow-y:auto;">
161
+ <div id="histories" class="w-100 p-2">
162
+ </div>
163
+ </div>
164
+ </div>
165
+ <!-- 左右のスプリッター -->
166
+ <div class="split-pane-divider filer-pane-divider" style="left:15%;"></div>
167
+ <!-- チャット側ペイン -->
168
+ <div id="right_container" class="split-pane-component chat-container " style="left:15%;">
169
+ <div id="message_container" class="w-100 d-flex justify-content-center" style="height:calc(100% - 80px);overflow-y:auto;">
170
+ <div id="messages" class="ps-2 pe-2" style="width:var(--cmdbox-width);">
171
+ </div>
172
+ </div>
173
+ <div class="w-100 d-flex justify-content-center">
174
+ <div class="chat-input mt-2" style="width:800px;">
175
+ <div class="chat-group w-100 p-2">
176
+ <textarea id="user_msg" class="form-control d-inline-block align-middle" rows="1" style="width:calc(100% - 60px);border:0px;box-shadow:none;resize:none;field-sizing:content;"></textarea>
177
+ <button id="btn_user_msg" class="btn btn_hover" type="button" style="border:0px;" disabled="disabled">
178
+ <svg class="bi bi-send" width="24" height="24" fill="currentColor"><use href="#btn_send"></use></svg>
179
+ </button>
180
+ </div>
181
+ </div>
182
+ </div>
183
+ </div>
184
+ <form id="filter_form" class="d-none filer_form">
185
+ <input name="filer_host" type="hidden" class="filer_host">
186
+ <input name="filer_port" type="hidden" class="filer_port">
187
+ <input name="filer_password" type="hidden" class="filer_password">
188
+ <input name="filer_svname" type="hidden" class="filer_svname">
189
+ <input name="filer_scope" type="hidden" class="filer_scope">
190
+ <input name="filer_client_data" type="hidden" class="filer_client_data">
191
+ </form>
192
+ </div>
193
+ <!-- versionsモーダル -->
194
+ <div id="versions_modal" class="modal" tabindex="-1">
195
+ <div class="modal-dialog modal-lg">
196
+ <form id="version_form" class="modal-content novalidate">
197
+ <div class="modal-header">
198
+ <h5 class="modal-title">
199
+ Versions
200
+ </h5>
201
+ <button type="button" class="btn btn_window_stack">
202
+ <svg width="16" height="16" fill="currentColor" class="bi bi-window-stack">
203
+ <use href="#svg_window_stack"></use>
204
+ </svg>
205
+ </button>
206
+ <button type="button" class="btn btn_window">
207
+ <svg width="16" height="16" fill="currentColor" class="bi bi-window">
208
+ <use href="#svg_window"></use>
209
+ </svg>
210
+ </button>
211
+ <button type="button" class="btn btn_close p-0 m-0" data-bs-dismiss="modal" aria-label="Close" style="margin-left: 0px;">
212
+ <svg class="bi bi-x" width="24" height="24" fill="currentColor"><use href="#btn_x"></use></svg>
213
+ </button>
214
+ </div>
215
+ <div class="modal-body">
216
+ <ul class="nav nav-tabs version-tabs" role="tablist"></ul>
217
+ <div class="tab-content version-content"></div>
218
+ </div>
219
+ <div class="modal-footer">
220
+ <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
221
+ </div>
222
+ </form>
223
+ </div>
224
+ </div>
225
+ <!-- ローディングマスク -->
226
+ <div id="loading" class="position-absolute top-0 start-0 w-100 h-100 d-none" style="background:rgba(0, 0, 0, 0.3);z-index:10000;">
227
+ <div class="text-center position-absolute top-50 start-50 w-100 translate-middle">
228
+ <div class="spinner-border text-light" role="status">
229
+ <span class="sr-only"></span>
230
+ </div>
231
+ <div>
232
+ <button type="button" class="btn btn-outline-danger mt-3 bbforce">Back by force</button>
233
+ </div>
234
+ </div>
235
+ </div>
236
+ <!-- フッター -->
237
+ <footer class="fixed-bottom text-center p-2 copyright"></footer>
238
+ </body>
239
+ <script type="text/javascript">
240
+ // jqueryの読込み完了までbodyの背景色を設定
241
+ document.querySelector(`body`).style.setProperty(`--bs-body-bg`, `#212529`);
242
+ document.querySelector(`body`).style.setProperty(`--bs-tertiary-bg`, `#2b3035`);
243
+ document.querySelector(`body`).style.setProperty(`--bs-tertiary-bg-rgb`, `43,48,53`);
244
+ document.querySelector(`body`).style.setProperty(`--bs-secondary-bg`, `#343a40`);
245
+ document.addEventListener('DOMContentLoaded', () => {
246
+ document.querySelector(`body`).style.setProperty(`--bs-body-bg`, null);
247
+ document.querySelector(`body`).style.setProperty(`--bs-tertiary-bg`, null);
248
+ document.querySelector(`body`).style.setProperty(`--bs-tertiary-bg-rgb`, null);
249
+ document.querySelector(`body`).style.setProperty(`--bs-secondary-bg`, null);
250
+ });
251
+ </script>
252
+ <link rel="stylesheet" href="assets/bootstrap/bootstrap.min.5.3.0.css">
253
+ <link rel="stylesheet" href="assets/cmdbox/color_mode.css">
254
+ <link rel="stylesheet" href="assets/split-pane/split-pane.css">
255
+ <script type="text/javascript" src="assets/bootstrap/bootstrap.bundle.min.5.3.0.js"></script>
256
+ <script type="text/javascript" src="assets/jquery/jquery.min.3.2.0.js"></script>
257
+ <script type="text/javascript" src="assets/jquery-ui/jquery-ui.min.js"></script>
258
+ <script type="text/javascript" src="assets/jquery-resizable/jquery-resizable.min.js"></script>
259
+ <script type="text/javascript" src="assets/split-pane/split-pane.js"></script>
260
+ <script type="text/javascript" src="assets/cmdbox/common.js"></script>
261
+ <script type="text/javascript" src="assets/cmdbox/view_result.js"></script>
262
+ <script type="text/javascript" src="assets/cmdbox/agent.js"></script>
263
+ </html>