chatup 0.2.1__tar.gz → 0.2.3__tar.gz

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.
Files changed (80) hide show
  1. chatup-0.2.3/PKG-INFO +90 -0
  2. chatup-0.2.3/README.md +64 -0
  3. {chatup-0.2.1 → chatup-0.2.3}/pyproject.toml +16 -1
  4. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/__init__.py +1 -1
  5. chatup-0.2.3/src/chatup/chrome_for_testing.py +126 -0
  6. chatup-0.2.3/src/chatup/chromedriver.py +147 -0
  7. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/cli.py +4 -0
  8. chatup-0.2.3/src/chatup/commands/__init__.py +1 -0
  9. chatup-0.2.3/src/chatup/commands/chrome_for_testing.py +442 -0
  10. chatup-0.2.3/src/chatup/commands/chromedriver.py +475 -0
  11. chatup-0.2.3/src/chatup/runtime/__init__.py +5 -0
  12. chatup-0.2.3/src/chatup/runtime/_managed_artifact.py +178 -0
  13. chatup-0.2.3/src/chatup/runtime/chrome_for_testing.py +635 -0
  14. chatup-0.2.3/src/chatup/runtime/chromedriver.py +747 -0
  15. chatup-0.2.3/src/chatup/setup/crs.py +334 -0
  16. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/elements.py +521 -23
  17. chatup-0.2.3/src/chatup/setup/gitea.py +494 -0
  18. chatup-0.2.3/src/chatup/setup/mysql.py +539 -0
  19. chatup-0.2.3/src/chatup/setup/nginx.py +620 -0
  20. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/workspace/cli.py +6 -0
  21. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/workspace/core.py +2 -0
  22. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/workspace/options.py +10 -1
  23. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/workspace/render.py +19 -6
  24. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/workspace/templates/default/en/AGENTS.md +21 -14
  25. chatup-0.2.3/src/chatup/setup/workspace/templates/default/en/discussion/README.md +38 -0
  26. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/workspace/templates/default/en/projects/README.md +14 -9
  27. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/workspace/templates/default/zh/AGENTS.md +21 -14
  28. chatup-0.2.3/src/chatup/setup/workspace/templates/default/zh/discussion/README.md +38 -0
  29. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/workspace/templates/default/zh/projects/README.md +14 -9
  30. chatup-0.2.3/src/chatup.egg-info/PKG-INFO +90 -0
  31. {chatup-0.2.1 → chatup-0.2.3}/src/chatup.egg-info/SOURCES.txt +21 -1
  32. chatup-0.2.3/src/chatup.egg-info/requires.txt +10 -0
  33. chatup-0.2.3/tests/test_browser_backend_cli.py +47 -0
  34. chatup-0.2.3/tests/test_chrome_for_testing.py +570 -0
  35. chatup-0.2.3/tests/test_chromedriver.py +602 -0
  36. chatup-0.2.3/tests/test_cli_tree_docs.py +71 -0
  37. chatup-0.2.3/tests/test_crs_setup.py +126 -0
  38. chatup-0.2.3/tests/test_publish_workflow.py +21 -0
  39. {chatup-0.2.1 → chatup-0.2.3}/tests/test_pyproject_metadata.py +11 -1
  40. chatup-0.2.3/tests/test_setup_cli.py +582 -0
  41. {chatup-0.2.1 → chatup-0.2.3}/tests/test_version.py +2 -2
  42. {chatup-0.2.1 → chatup-0.2.3}/tests/test_workspace_setup.py +38 -0
  43. chatup-0.2.1/PKG-INFO +0 -51
  44. chatup-0.2.1/README.md +0 -33
  45. chatup-0.2.1/src/chatup/setup/chrome.py +0 -188
  46. chatup-0.2.1/src/chatup.egg-info/PKG-INFO +0 -51
  47. chatup-0.2.1/src/chatup.egg-info/requires.txt +0 -4
  48. chatup-0.2.1/tests/test_setup_cli.py +0 -218
  49. {chatup-0.2.1 → chatup-0.2.3}/LICENSE +0 -0
  50. {chatup-0.2.1 → chatup-0.2.3}/setup.cfg +0 -0
  51. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/const.py +0 -0
  52. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/interaction/__init__.py +0 -0
  53. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/interaction/command_schema.py +0 -0
  54. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/interaction/policy.py +0 -0
  55. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/interaction/warnings.py +0 -0
  56. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/__init__.py +0 -0
  57. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/assets/hermes/install.sh +0 -0
  58. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/assets/nvm.sh +0 -0
  59. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/cc_connect.py +0 -0
  60. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/claude.py +0 -0
  61. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/cli.py +0 -0
  62. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/codex.py +0 -0
  63. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/docker.py +0 -0
  64. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/frp.py +0 -0
  65. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/hermes.py +0 -0
  66. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/lark_cli.py +0 -0
  67. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/mode_prompt.py +0 -0
  68. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/nodejs.py +0 -0
  69. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/opencode.py +0 -0
  70. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/shell_rc.py +0 -0
  71. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/uv.py +0 -0
  72. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/workspace/__init__.py +0 -0
  73. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/workspace.py +0 -0
  74. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/setup/zsh.py +0 -0
  75. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/utils/__init__.py +0 -0
  76. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/utils/custom_logger.py +0 -0
  77. {chatup-0.2.1 → chatup-0.2.3}/src/chatup/utils/pathing.py +0 -0
  78. {chatup-0.2.1 → chatup-0.2.3}/src/chatup.egg-info/dependency_links.txt +0 -0
  79. {chatup-0.2.1 → chatup-0.2.3}/src/chatup.egg-info/entry_points.txt +0 -0
  80. {chatup-0.2.1 → chatup-0.2.3}/src/chatup.egg-info/top_level.txt +0 -0
chatup-0.2.3/PKG-INFO ADDED
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.4
2
+ Name: chatup
3
+ Version: 0.2.3
4
+ Summary: ChatArch setup CLI extracted from ChatTool
5
+ Author-email: rexwzh <1073853456@qq.com>
6
+ License-Expression: MIT
7
+ Project-URL: Documentation, https://arch.gh.wzhecnu.cn/ChatUp/
8
+ Project-URL: Source, https://github.com/ChatArch/ChatUp
9
+ Project-URL: Issues, https://github.com/ChatArch/ChatUp/issues
10
+ Keywords: chatup,chatarch,setup,cli
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: click>=8.0
17
+ Requires-Dist: chatstyle<0.2.0,>=0.1.1
18
+ Requires-Dist: chatenv<0.3.0,>=0.2.0
19
+ Requires-Dist: colorama
20
+ Provides-Extra: docs
21
+ Requires-Dist: mkdocs<2.0,>=1.6; extra == "docs"
22
+ Requires-Dist: mkdocs-material<10.0,>=9.5; extra == "docs"
23
+ Requires-Dist: mkdocs-static-i18n<2.0,>=1.3; extra == "docs"
24
+ Requires-Dist: mike<3.0,>=2.1; extra == "docs"
25
+ Dynamic: license-file
26
+
27
+ # ChatUp
28
+
29
+ ChatUp 是 ChatArch 的独立环境与工具安装 CLI。它承接原来 `chattool setup` 的职责,把常用开发环境、Agent CLI、工作区脚手架和本地服务安装整理成一级命令,例如 `chattool setup workspace` 对应 `chatup workspace`。
30
+
31
+ - 文档站:<https://arch.gh.wzhecnu.cn/ChatUp/>
32
+ - English README: [README.en.md](README.en.md)
33
+ - Source: <https://github.com/ChatArch/ChatUp>
34
+
35
+ 按场景选择文档:
36
+
37
+ | 场景 | 文档 |
38
+ | --- | --- |
39
+ | 从空机器验证 ChatUp、Python runtime 和 workspace | `docs/quickstart.md` |
40
+ | 查看完整一级 CLI 树与 CFT/ChromeDriver 独立 contract | `docs/cli-tree.md` |
41
+ | 查看命令分组、参数边界和服务默认路径 | `docs/commands.md` |
42
+ | 校对哪些 ChatArch setup 流程已经有一等命令 | `docs/capability-map.md` |
43
+ | 理解 `chatup workspace` 创建的目录和项目记录约定 | `docs/workspace.md` |
44
+ | 安装 ChatTea-compatible Gitea、ChatData-compatible MySQL、user-level NGINX 和 CRS | `docs/commands.md` |
45
+
46
+ ## 快速开始
47
+
48
+ ```bash
49
+ chatup --help
50
+ chatup doctor
51
+ chatup uv
52
+ chatup chrome-for-testing install --channel stable -I
53
+ chatup workspace default ~/Playground
54
+ ```
55
+
56
+ 常见安装命令:
57
+
58
+ ```bash
59
+ chatup gitea --force
60
+ chatup mysql
61
+ chatup nginx
62
+ chatup nginx proxy-pass ./gitea-local.conf --set SERVER_NAME=gitea.local.example.invalid --set PROXY_PASS=http://127.0.0.1:3000
63
+ chatup crs --install-dir ~/.chatarch/crs/local --port 12392 --redis-port 6379
64
+ ```
65
+
66
+ ## 当前能力
67
+
68
+ | 能力组 | 命令 |
69
+ | --- | --- |
70
+ | 基础运行环境 | `doctor`、`uv`、`nodejs`、`docker`、`zsh`、`chrome-for-testing`、`chromedriver`、`frp` |
71
+ | 工作区脚手架 | `workspace` |
72
+ | 本地服务安装 | `gitea`、`mysql`、`nginx`、`crs` |
73
+ | Agent 工具链 | `cc-connect`、`claude`、`codex`、`opencode`、`hermes`、`lark-cli` |
74
+
75
+ 所有新增安装项默认目录都收敛到 `~/.chatarch/...`,例如 `~/.chatarch/chrome-for-testing`、`~/.chatarch/chromedriver`、`~/.chatarch/chattea`、`~/.chatarch/chatdata`、`~/.chatarch/nginx` 和 `~/.chatarch/crs/local`。更完整的能力边界见 `docs/capability-map.md`。
76
+
77
+ ## 开发
78
+
79
+ ```bash
80
+ python -m pytest -q
81
+ python -m build
82
+ python -m twine check dist/*
83
+ mkdocs build --strict
84
+ ```
85
+
86
+ 更多使用说明见文档站的 [快速开始](https://arch.gh.wzhecnu.cn/ChatUp/quickstart/)、[命令参考](https://arch.gh.wzhecnu.cn/ChatUp/commands/) 和 [CLI 能力地图](https://arch.gh.wzhecnu.cn/ChatUp/capability-map/)。
87
+
88
+ ## 发布
89
+
90
+ 发布由 tag 驱动。`vX.Y.Z` tag 必须与 `src/chatup/__init__.py::__version__` 一致;发布 workflow 会通过 PyPI Trusted Publishing/OIDC 构建并发布到 PyPI。
chatup-0.2.3/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # ChatUp
2
+
3
+ ChatUp 是 ChatArch 的独立环境与工具安装 CLI。它承接原来 `chattool setup` 的职责,把常用开发环境、Agent CLI、工作区脚手架和本地服务安装整理成一级命令,例如 `chattool setup workspace` 对应 `chatup workspace`。
4
+
5
+ - 文档站:<https://arch.gh.wzhecnu.cn/ChatUp/>
6
+ - English README: [README.en.md](README.en.md)
7
+ - Source: <https://github.com/ChatArch/ChatUp>
8
+
9
+ 按场景选择文档:
10
+
11
+ | 场景 | 文档 |
12
+ | --- | --- |
13
+ | 从空机器验证 ChatUp、Python runtime 和 workspace | `docs/quickstart.md` |
14
+ | 查看完整一级 CLI 树与 CFT/ChromeDriver 独立 contract | `docs/cli-tree.md` |
15
+ | 查看命令分组、参数边界和服务默认路径 | `docs/commands.md` |
16
+ | 校对哪些 ChatArch setup 流程已经有一等命令 | `docs/capability-map.md` |
17
+ | 理解 `chatup workspace` 创建的目录和项目记录约定 | `docs/workspace.md` |
18
+ | 安装 ChatTea-compatible Gitea、ChatData-compatible MySQL、user-level NGINX 和 CRS | `docs/commands.md` |
19
+
20
+ ## 快速开始
21
+
22
+ ```bash
23
+ chatup --help
24
+ chatup doctor
25
+ chatup uv
26
+ chatup chrome-for-testing install --channel stable -I
27
+ chatup workspace default ~/Playground
28
+ ```
29
+
30
+ 常见安装命令:
31
+
32
+ ```bash
33
+ chatup gitea --force
34
+ chatup mysql
35
+ chatup nginx
36
+ chatup nginx proxy-pass ./gitea-local.conf --set SERVER_NAME=gitea.local.example.invalid --set PROXY_PASS=http://127.0.0.1:3000
37
+ chatup crs --install-dir ~/.chatarch/crs/local --port 12392 --redis-port 6379
38
+ ```
39
+
40
+ ## 当前能力
41
+
42
+ | 能力组 | 命令 |
43
+ | --- | --- |
44
+ | 基础运行环境 | `doctor`、`uv`、`nodejs`、`docker`、`zsh`、`chrome-for-testing`、`chromedriver`、`frp` |
45
+ | 工作区脚手架 | `workspace` |
46
+ | 本地服务安装 | `gitea`、`mysql`、`nginx`、`crs` |
47
+ | Agent 工具链 | `cc-connect`、`claude`、`codex`、`opencode`、`hermes`、`lark-cli` |
48
+
49
+ 所有新增安装项默认目录都收敛到 `~/.chatarch/...`,例如 `~/.chatarch/chrome-for-testing`、`~/.chatarch/chromedriver`、`~/.chatarch/chattea`、`~/.chatarch/chatdata`、`~/.chatarch/nginx` 和 `~/.chatarch/crs/local`。更完整的能力边界见 `docs/capability-map.md`。
50
+
51
+ ## 开发
52
+
53
+ ```bash
54
+ python -m pytest -q
55
+ python -m build
56
+ python -m twine check dist/*
57
+ mkdocs build --strict
58
+ ```
59
+
60
+ 更多使用说明见文档站的 [快速开始](https://arch.gh.wzhecnu.cn/ChatUp/quickstart/)、[命令参考](https://arch.gh.wzhecnu.cn/ChatUp/commands/) 和 [CLI 能力地图](https://arch.gh.wzhecnu.cn/ChatUp/capability-map/)。
61
+
62
+ ## 发布
63
+
64
+ 发布由 tag 驱动。`vX.Y.Z` tag 必须与 `src/chatup/__init__.py::__version__` 一致;发布 workflow 会通过 PyPI Trusted Publishing/OIDC 构建并发布到 PyPI。
@@ -11,7 +11,7 @@ requires-python = ">=3.10"
11
11
  license = "MIT"
12
12
  dependencies = [
13
13
  "click>=8.0",
14
- "chatstyle>=0.1.0,<0.2.0",
14
+ "chatstyle>=0.1.1,<0.2.0",
15
15
  "chatenv>=0.2.0,<0.3.0",
16
16
  "colorama",
17
17
  ]
@@ -22,6 +22,19 @@ classifiers = [
22
22
  "Operating System :: OS Independent",
23
23
  ]
24
24
 
25
+ [project.urls]
26
+ Documentation = "https://arch.gh.wzhecnu.cn/ChatUp/"
27
+ Source = "https://github.com/ChatArch/ChatUp"
28
+ Issues = "https://github.com/ChatArch/ChatUp/issues"
29
+
30
+ [project.optional-dependencies]
31
+ docs = [
32
+ "mkdocs>=1.6,<2.0",
33
+ "mkdocs-material>=9.5,<10.0",
34
+ "mkdocs-static-i18n>=1.3,<2.0",
35
+ "mike>=2.1,<3.0",
36
+ ]
37
+
25
38
  [project.scripts]
26
39
  chatup = "chatup.cli:main"
27
40
 
@@ -40,6 +53,8 @@ include-package-data = true
40
53
  "assets/hermes/*.sh",
41
54
  "workspace/templates/default/zh/*.md",
42
55
  "workspace/templates/default/zh/projects/*.md",
56
+ "workspace/templates/default/zh/discussion/*.md",
43
57
  "workspace/templates/default/en/*.md",
44
58
  "workspace/templates/default/en/projects/*.md",
59
+ "workspace/templates/default/en/discussion/*.md",
45
60
  ]
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.2.1"
5
+ __version__ = "0.2.3"
@@ -0,0 +1,126 @@
1
+ """Public API for ChatArch-managed Google Chrome for Testing."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pathlib import Path
6
+ from typing import Any
7
+
8
+ from chatup.runtime.chrome_for_testing import (
9
+ DEFAULT_CHROME_FOR_TESTING_HOME,
10
+ SUPPORTED_CFT_PLATFORMS,
11
+ ChromeForTestingError,
12
+ ChromeForTestingInstallation,
13
+ doctor_chrome_for_testing,
14
+ ensure_chrome_for_testing,
15
+ garbage_collect_chrome_for_testing,
16
+ install_chrome_for_testing,
17
+ list_chrome_for_testing,
18
+ remove_chrome_for_testing,
19
+ resolve_chrome_for_testing,
20
+ )
21
+
22
+ DEFAULT_HOME = DEFAULT_CHROME_FOR_TESTING_HOME
23
+ SUPPORTED_PLATFORMS = SUPPORTED_CFT_PLATFORMS
24
+
25
+
26
+ def install(
27
+ version: str = "stable",
28
+ *,
29
+ home: Path | str | None = None,
30
+ platform: str | None = None,
31
+ expected_sha256: str | None = None,
32
+ force: bool = False,
33
+ ) -> ChromeForTestingInstallation:
34
+ return install_chrome_for_testing(
35
+ version,
36
+ home=home,
37
+ cft_platform=platform,
38
+ expected_sha256=expected_sha256,
39
+ force=force,
40
+ )
41
+
42
+
43
+ def ensure(
44
+ version: str,
45
+ *,
46
+ home: Path | str | None = None,
47
+ platform: str | None = None,
48
+ expected_sha256: str | None = None,
49
+ ) -> ChromeForTestingInstallation:
50
+ return ensure_chrome_for_testing(
51
+ version,
52
+ home=home,
53
+ cft_platform=platform,
54
+ expected_sha256=expected_sha256,
55
+ )
56
+
57
+
58
+ def resolve(
59
+ version: str,
60
+ *,
61
+ home: Path | str | None = None,
62
+ platform: str | None = None,
63
+ ) -> ChromeForTestingInstallation:
64
+ return resolve_chrome_for_testing(
65
+ version,
66
+ home=home,
67
+ cft_platform=platform,
68
+ )
69
+
70
+
71
+ def list_installations(
72
+ *,
73
+ home: Path | str | None = None,
74
+ ) -> list[ChromeForTestingInstallation]:
75
+ return list_chrome_for_testing(home=home)
76
+
77
+
78
+ def doctor(
79
+ installation: ChromeForTestingInstallation,
80
+ *,
81
+ execute: bool = True,
82
+ ) -> dict[str, Any]:
83
+ return doctor_chrome_for_testing(installation, execute=execute)
84
+
85
+
86
+ def remove(
87
+ version: str,
88
+ *,
89
+ home: Path | str | None = None,
90
+ platform: str | None = None,
91
+ ) -> ChromeForTestingInstallation:
92
+ return remove_chrome_for_testing(
93
+ version,
94
+ home=home,
95
+ cft_platform=platform,
96
+ )
97
+
98
+
99
+ def gc(
100
+ *,
101
+ home: Path | str | None = None,
102
+ dry_run: bool = True,
103
+ yes: bool = False,
104
+ minimum_age_seconds: int = 24 * 60 * 60,
105
+ ) -> dict[str, Any]:
106
+ return garbage_collect_chrome_for_testing(
107
+ home=home,
108
+ dry_run=dry_run,
109
+ yes=yes,
110
+ minimum_age_seconds=minimum_age_seconds,
111
+ )
112
+
113
+
114
+ __all__ = [
115
+ "DEFAULT_HOME",
116
+ "SUPPORTED_PLATFORMS",
117
+ "ChromeForTestingError",
118
+ "ChromeForTestingInstallation",
119
+ "doctor",
120
+ "ensure",
121
+ "gc",
122
+ "install",
123
+ "list_installations",
124
+ "remove",
125
+ "resolve",
126
+ ]
@@ -0,0 +1,147 @@
1
+ """Public API for ChatArch-managed ChromeDriver installations."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pathlib import Path
6
+ from typing import Any
7
+
8
+ from chatup.runtime.chromedriver import (
9
+ DEFAULT_CHROMEDRIVER_HOME,
10
+ SUPPORTED_CHROMEDRIVER_PLATFORMS,
11
+ ChromeDriverError,
12
+ ChromeDriverInstallation,
13
+ doctor_chromedriver,
14
+ ensure_chromedriver,
15
+ garbage_collect_chromedriver,
16
+ install_chromedriver,
17
+ list_chromedrivers,
18
+ read_browser_version,
19
+ remove_chromedriver,
20
+ resolve_chromedriver,
21
+ resolve_chromedriver_for_browser_version,
22
+ )
23
+
24
+ DEFAULT_HOME = DEFAULT_CHROMEDRIVER_HOME
25
+ SUPPORTED_PLATFORMS = SUPPORTED_CHROMEDRIVER_PLATFORMS
26
+
27
+
28
+ def install(
29
+ version: str | None = None,
30
+ *,
31
+ match_browser: Path | str | None = None,
32
+ match_cft_version: str | None = None,
33
+ home: Path | str | None = None,
34
+ platform: str | None = None,
35
+ expected_sha256: str | None = None,
36
+ force: bool = False,
37
+ ) -> ChromeDriverInstallation:
38
+ return install_chromedriver(
39
+ version,
40
+ match_browser=match_browser,
41
+ match_cft_version=match_cft_version,
42
+ home=home,
43
+ driver_platform=platform,
44
+ expected_sha256=expected_sha256,
45
+ force=force,
46
+ )
47
+
48
+
49
+ def ensure(
50
+ version: str,
51
+ *,
52
+ home: Path | str | None = None,
53
+ platform: str | None = None,
54
+ expected_sha256: str | None = None,
55
+ ) -> ChromeDriverInstallation:
56
+ return ensure_chromedriver(
57
+ version,
58
+ home=home,
59
+ driver_platform=platform,
60
+ expected_sha256=expected_sha256,
61
+ )
62
+
63
+
64
+ def resolve(
65
+ version: str,
66
+ *,
67
+ home: Path | str | None = None,
68
+ platform: str | None = None,
69
+ ) -> ChromeDriverInstallation:
70
+ return resolve_chromedriver(
71
+ version,
72
+ home=home,
73
+ driver_platform=platform,
74
+ )
75
+
76
+
77
+ def resolve_for_browser_version(
78
+ browser_version: str,
79
+ *,
80
+ platform: str | None = None,
81
+ ) -> tuple[str, str, str]:
82
+ """Resolve the official compatible ChromeDriver artifact for a browser."""
83
+
84
+ return resolve_chromedriver_for_browser_version(
85
+ browser_version,
86
+ driver_platform=platform,
87
+ )
88
+
89
+
90
+ def list_installations(
91
+ *,
92
+ home: Path | str | None = None,
93
+ ) -> list[ChromeDriverInstallation]:
94
+ return list_chromedrivers(home=home)
95
+
96
+
97
+ def doctor(
98
+ installation: ChromeDriverInstallation,
99
+ *,
100
+ execute: bool = True,
101
+ ) -> dict[str, Any]:
102
+ return doctor_chromedriver(installation, execute=execute)
103
+
104
+
105
+ def remove(
106
+ version: str,
107
+ *,
108
+ home: Path | str | None = None,
109
+ platform: str | None = None,
110
+ ) -> ChromeDriverInstallation:
111
+ return remove_chromedriver(
112
+ version,
113
+ home=home,
114
+ driver_platform=platform,
115
+ )
116
+
117
+
118
+ def gc(
119
+ *,
120
+ home: Path | str | None = None,
121
+ dry_run: bool = True,
122
+ yes: bool = False,
123
+ minimum_age_seconds: int = 24 * 60 * 60,
124
+ ) -> dict[str, Any]:
125
+ return garbage_collect_chromedriver(
126
+ home=home,
127
+ dry_run=dry_run,
128
+ yes=yes,
129
+ minimum_age_seconds=minimum_age_seconds,
130
+ )
131
+
132
+
133
+ __all__ = [
134
+ "DEFAULT_HOME",
135
+ "SUPPORTED_PLATFORMS",
136
+ "ChromeDriverError",
137
+ "ChromeDriverInstallation",
138
+ "doctor",
139
+ "ensure",
140
+ "gc",
141
+ "install",
142
+ "list_installations",
143
+ "read_browser_version",
144
+ "remove",
145
+ "resolve",
146
+ "resolve_for_browser_version",
147
+ ]
@@ -3,6 +3,8 @@ from __future__ import annotations
3
3
  import click
4
4
 
5
5
  from chatup import __version__
6
+ from chatup.commands.chrome_for_testing import cli as chrome_for_testing_cli
7
+ from chatup.commands.chromedriver import cli as chromedriver_cli
6
8
  from chatup.setup.cli import register_setup_commands
7
9
 
8
10
 
@@ -19,6 +21,8 @@ def doctor() -> None:
19
21
 
20
22
 
21
23
  register_setup_commands(main)
24
+ main.add_command(chrome_for_testing_cli)
25
+ main.add_command(chromedriver_cli)
22
26
 
23
27
 
24
28
  if __name__ == "__main__":
@@ -0,0 +1 @@
1
+ """Click command groups for ChatUp backends."""