chatup 0.2.22__tar.gz → 0.2.24__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.
- {chatup-0.2.22/src/chatup.egg-info → chatup-0.2.24}/PKG-INFO +7 -2
- {chatup-0.2.22 → chatup-0.2.24}/README.md +5 -1
- {chatup-0.2.22 → chatup-0.2.24}/pyproject.toml +1 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/__init__.py +1 -1
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/cli.py +2 -0
- chatup-0.2.24/src/chatup/commands/computer_use.py +29 -0
- chatup-0.2.24/src/chatup/computer_use.py +524 -0
- chatup-0.2.24/src/chatup/computer_use_entry.py +345 -0
- chatup-0.2.24/src/chatup/const.py +18 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/runtime/playwright.py +19 -14
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/claude.py +30 -6
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/codex.py +66 -27
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/cursor_agent.py +42 -2
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/elements.py +2 -2
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/frp.py +10 -9
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/hermes.py +43 -6
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/lark_cli.py +3 -1
- chatup-0.2.24/src/chatup/setup/nodejs.py +1009 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/remotion.py +34 -16
- {chatup-0.2.22 → chatup-0.2.24/src/chatup.egg-info}/PKG-INFO +7 -2
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup.egg-info/SOURCES.txt +8 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup.egg-info/requires.txt +1 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_codex_setup.py +106 -0
- chatup-0.2.24/tests/test_computer_use.py +769 -0
- chatup-0.2.24/tests/test_docs_preview_contract.py +117 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_version.py +1 -1
- chatup-0.2.24/tests/test_windows_adapter_review.py +52 -0
- chatup-0.2.24/tests/test_windows_checkpoint_review.py +75 -0
- chatup-0.2.24/tests/test_windows_compat.py +762 -0
- chatup-0.2.24/tests/test_windows_final_review.py +111 -0
- chatup-0.2.22/src/chatup/const.py +0 -35
- chatup-0.2.22/src/chatup/setup/nodejs.py +0 -466
- chatup-0.2.22/tests/test_windows_compat.py +0 -135
- {chatup-0.2.22 → chatup-0.2.24}/LICENSE +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/setup.cfg +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/chrome_for_testing.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/chromedriver.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/commands/__init__.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/commands/chrome_for_testing.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/commands/chromedriver.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/commands/desktop.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/commands/macos.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/commands/playwright.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/commands/remotion.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/config.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/interaction/__init__.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/interaction/command_schema.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/interaction/policy.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/interaction/warnings.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/playwright.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/runtime/__init__.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/runtime/_managed_artifact.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/runtime/chrome_for_testing.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/runtime/chromedriver.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/__init__.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/assets/hermes/install.sh +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/assets/nvm.sh +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/assets/remotion/.gitignore +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/assets/remotion/package-lock.json +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/assets/remotion/package.json +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/assets/remotion/src/index.jsx +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/cc_connect.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/chatgpt.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/cli.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/crs.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/desktop.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/discourse.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/docker.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/gitea.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/glance.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/mode_prompt.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/mysql.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/nginx.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/opencode.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/service_credentials.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/shell_rc.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/twikoo.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/uv.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace/__init__.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace/cli.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace/core.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace/options.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace/render.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace/templates/default/en/AGENTS.md +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace/templates/default/en/discussion/README.md +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace/templates/default/en/projects/README.md +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace/templates/default/zh/AGENTS.md +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace/templates/default/zh/discussion/README.md +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace/templates/default/zh/projects/README.md +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/workspace.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/zsh.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/setup/zulip.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/utils/__init__.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/utils/custom_logger.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/utils/pathing.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup/utils/platforming.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup.egg-info/dependency_links.txt +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup.egg-info/entry_points.txt +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/src/chatup.egg-info/top_level.txt +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_browser_backend_cli.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_chatgpt_setup.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_chrome_for_testing.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_chromedriver.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_cli_tree_docs.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_crs_setup.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_cursor_agent_setup.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_glance_bridge.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_glance_setup.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_hermes_model_defaults.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_playwright.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_playwright_cli.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_publish_workflow.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_pyproject_metadata.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_service_installers.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_setup_cli.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_twikoo_setup.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_uv_activation.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_workspace_setup.py +0 -0
- {chatup-0.2.22 → chatup-0.2.24}/tests/test_zsh_alias_names.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chatup
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.24
|
|
4
4
|
Summary: ChatArch setup CLI extracted from ChatTool
|
|
5
5
|
Author-email: rexwzh <1073853456@qq.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -18,6 +18,7 @@ Requires-Dist: chatstyle[tui]<0.3.0,>=0.2.0
|
|
|
18
18
|
Requires-Dist: chatenv<0.3.0,>=0.2.11
|
|
19
19
|
Requires-Dist: ChatGlance<0.4.0,>=0.3.0
|
|
20
20
|
Requires-Dist: python-dotenv<2.0,>=1.0
|
|
21
|
+
Requires-Dist: tomlkit<1.0,>=0.13
|
|
21
22
|
Requires-Dist: colorama
|
|
22
23
|
Provides-Extra: dev
|
|
23
24
|
Requires-Dist: build; extra == "dev"
|
|
@@ -46,6 +47,7 @@ ChatUp 是 ChatArch 的独立环境与工具安装 CLI。它承接原来 `chatto
|
|
|
46
47
|
| 阅读完整顶层 CLI 树和独立 CFT/ChromeDriver/Playwright contract | `docs/cli-tree.md` |
|
|
47
48
|
| 查看命令分组、参数边界和服务默认路径 | `docs/commands.md` |
|
|
48
49
|
| 校对哪些 ChatArch setup 流程已经有一等命令 | `docs/capability-map.md` |
|
|
50
|
+
| 预览或配置 Linux X11 Computer Use 执行端 | `docs/computer-use.md` |
|
|
49
51
|
| 理解 `chatup workspace` 创建的目录和项目记录约定 | `docs/workspace.md` |
|
|
50
52
|
| 安装 ChatTea-compatible Gitea、Discourse/Zulip 社区服务配置、ChatData-compatible MySQL、user-level NGINX 和 CRS | `docs/commands.md` |
|
|
51
53
|
|
|
@@ -65,6 +67,8 @@ chatup workspace ~/Playground
|
|
|
65
67
|
|
|
66
68
|
`chatup uv` 默认更新已有 `~/.bashrc`、`~/.zshrc` 的自动激活块;使用 `chatup uv --no-activate` 可保持启动配置不变。不会创建缺失的 rc 文件,Windows 跳过此项。
|
|
67
69
|
|
|
70
|
+
Linux Debian/Ubuntu x86_64 X11 执行端可运行 `chatup computer-use` 只读预览;明确使用 `chatup computer-use --sudo` 才应用。支持显式选择同用户桌面并复用普通 Chrome 默认 profile,生成独立 MCP/Chrome/terminal/status 入口。它不修改 Agent 配置,也不修复 Hermes 按话题 SSH 绑定的默认截图路由。详见 [Computer Use](docs/computer-use.md)。
|
|
71
|
+
|
|
68
72
|
常见安装命令:
|
|
69
73
|
|
|
70
74
|
```bash
|
|
@@ -133,11 +137,12 @@ chatup chatgpt --yes # Windows 首次安装时接受 Store 协议
|
|
|
133
137
|
| 基础运行环境 | `doctor`、`uv`、`nodejs`、`docker`、`zsh`、`chrome-for-testing`、`chromedriver`、`playwright`、`frp` |
|
|
134
138
|
| 工作区脚手架 | `workspace` |
|
|
135
139
|
| 桌面应用 | `macos`(Snipaste/iTerm2/Chrome/Blender 多选)、`chrome`、`snipaste`(macOS/Windows)、`iterm`(仅 macOS)、`chatgpt`(含 Codex) |
|
|
140
|
+
| Linux X11 Computer Use | `computer-use`(默认只读预览,`--sudo` 应用) |
|
|
136
141
|
| 视频项目 | `remotion` |
|
|
137
142
|
| 本地服务安装 | `gitea`、`glance`、`discourse`、`zulip`、`mysql`、`nginx`、`crs` |
|
|
143
|
+
| Agent 工具链 | `cc-connect`、`claude`、`codex`、`cursor-agent`、`opencode`、`hermes`、`lark-cli` |
|
|
138
144
|
|
|
139
145
|
`chatup glance` 裸命令安装 `ChatArch/glance` 最新稳定维护版到有效 ChatArch home 下的 `glance`。当前仅支持 Linux amd64;严格验证归档、`SHA256SUMS`、`BUILDINFO.txt`、source SHA 和原始二进制版本,复用 ChatGlance portable API 初始化 loopback 配置。它不启动服务、不建立公网入口、不写密码;重复运行保留配置和数据,版本变更请使用 `chatglance runtime update`。
|
|
140
|
-
| Agent 工具链 | `cc-connect`、`claude`、`codex`、`cursor-agent`、`opencode`、`hermes`、`lark-cli` |
|
|
141
146
|
|
|
142
147
|
桌面应用使用系统原生应用目录;ChatArch 自管安装项默认目录收敛到 `~/.chatarch/...`,例如 `~/.chatarch/chrome-for-testing`、`~/.chatarch/chromedriver`、`~/.chatarch/playwright`、`~/.chatarch/chattea`、`~/.chatarch/discourse`、`~/.chatarch/zulip`、`~/.chatarch/chatdata`、`~/.chatarch/nginx` 和 `~/.chatarch/crs/local`。`cursor-agent` 额外注册 ChatEnv `CursorAgent` profile,`discourse`/`zulip` 注册管理员凭据 profile,并支持 `-e/--env` 从 env 文件或 profile 快速配置;显式选择 profile 时不会混入进程环境中的其他账号凭据。CLI 树由 ChatStyle 的注册表渲染。更完整的能力边界见 `docs/capability-map.md`。
|
|
143
148
|
|
|
@@ -14,6 +14,7 @@ ChatUp 是 ChatArch 的独立环境与工具安装 CLI。它承接原来 `chatto
|
|
|
14
14
|
| 阅读完整顶层 CLI 树和独立 CFT/ChromeDriver/Playwright contract | `docs/cli-tree.md` |
|
|
15
15
|
| 查看命令分组、参数边界和服务默认路径 | `docs/commands.md` |
|
|
16
16
|
| 校对哪些 ChatArch setup 流程已经有一等命令 | `docs/capability-map.md` |
|
|
17
|
+
| 预览或配置 Linux X11 Computer Use 执行端 | `docs/computer-use.md` |
|
|
17
18
|
| 理解 `chatup workspace` 创建的目录和项目记录约定 | `docs/workspace.md` |
|
|
18
19
|
| 安装 ChatTea-compatible Gitea、Discourse/Zulip 社区服务配置、ChatData-compatible MySQL、user-level NGINX 和 CRS | `docs/commands.md` |
|
|
19
20
|
|
|
@@ -33,6 +34,8 @@ chatup workspace ~/Playground
|
|
|
33
34
|
|
|
34
35
|
`chatup uv` 默认更新已有 `~/.bashrc`、`~/.zshrc` 的自动激活块;使用 `chatup uv --no-activate` 可保持启动配置不变。不会创建缺失的 rc 文件,Windows 跳过此项。
|
|
35
36
|
|
|
37
|
+
Linux Debian/Ubuntu x86_64 X11 执行端可运行 `chatup computer-use` 只读预览;明确使用 `chatup computer-use --sudo` 才应用。支持显式选择同用户桌面并复用普通 Chrome 默认 profile,生成独立 MCP/Chrome/terminal/status 入口。它不修改 Agent 配置,也不修复 Hermes 按话题 SSH 绑定的默认截图路由。详见 [Computer Use](docs/computer-use.md)。
|
|
38
|
+
|
|
36
39
|
常见安装命令:
|
|
37
40
|
|
|
38
41
|
```bash
|
|
@@ -101,11 +104,12 @@ chatup chatgpt --yes # Windows 首次安装时接受 Store 协议
|
|
|
101
104
|
| 基础运行环境 | `doctor`、`uv`、`nodejs`、`docker`、`zsh`、`chrome-for-testing`、`chromedriver`、`playwright`、`frp` |
|
|
102
105
|
| 工作区脚手架 | `workspace` |
|
|
103
106
|
| 桌面应用 | `macos`(Snipaste/iTerm2/Chrome/Blender 多选)、`chrome`、`snipaste`(macOS/Windows)、`iterm`(仅 macOS)、`chatgpt`(含 Codex) |
|
|
107
|
+
| Linux X11 Computer Use | `computer-use`(默认只读预览,`--sudo` 应用) |
|
|
104
108
|
| 视频项目 | `remotion` |
|
|
105
109
|
| 本地服务安装 | `gitea`、`glance`、`discourse`、`zulip`、`mysql`、`nginx`、`crs` |
|
|
110
|
+
| Agent 工具链 | `cc-connect`、`claude`、`codex`、`cursor-agent`、`opencode`、`hermes`、`lark-cli` |
|
|
106
111
|
|
|
107
112
|
`chatup glance` 裸命令安装 `ChatArch/glance` 最新稳定维护版到有效 ChatArch home 下的 `glance`。当前仅支持 Linux amd64;严格验证归档、`SHA256SUMS`、`BUILDINFO.txt`、source SHA 和原始二进制版本,复用 ChatGlance portable API 初始化 loopback 配置。它不启动服务、不建立公网入口、不写密码;重复运行保留配置和数据,版本变更请使用 `chatglance runtime update`。
|
|
108
|
-
| Agent 工具链 | `cc-connect`、`claude`、`codex`、`cursor-agent`、`opencode`、`hermes`、`lark-cli` |
|
|
109
113
|
|
|
110
114
|
桌面应用使用系统原生应用目录;ChatArch 自管安装项默认目录收敛到 `~/.chatarch/...`,例如 `~/.chatarch/chrome-for-testing`、`~/.chatarch/chromedriver`、`~/.chatarch/playwright`、`~/.chatarch/chattea`、`~/.chatarch/discourse`、`~/.chatarch/zulip`、`~/.chatarch/chatdata`、`~/.chatarch/nginx` 和 `~/.chatarch/crs/local`。`cursor-agent` 额外注册 ChatEnv `CursorAgent` profile,`discourse`/`zulip` 注册管理员凭据 profile,并支持 `-e/--env` 从 env 文件或 profile 快速配置;显式选择 profile 时不会混入进程环境中的其他账号凭据。CLI 树由 ChatStyle 的注册表渲染。更完整的能力边界见 `docs/capability-map.md`。
|
|
111
115
|
|
|
@@ -6,6 +6,7 @@ from chatstyle import add_tree_option
|
|
|
6
6
|
from chatup import __version__
|
|
7
7
|
from chatup.commands.chrome_for_testing import cli as chrome_for_testing_cli
|
|
8
8
|
from chatup.commands.chromedriver import cli as chromedriver_cli
|
|
9
|
+
from chatup.commands.computer_use import cli as computer_use_cli
|
|
9
10
|
from chatup.commands.desktop import chrome_cli, iterm_cli, snipaste_cli
|
|
10
11
|
from chatup.commands.macos import macos_cli
|
|
11
12
|
from chatup.commands.playwright import cli as playwright_cli
|
|
@@ -33,6 +34,7 @@ def doctor() -> None:
|
|
|
33
34
|
|
|
34
35
|
register_setup_commands(main)
|
|
35
36
|
main.add_command(chrome_for_testing_cli)
|
|
37
|
+
main.add_command(computer_use_cli)
|
|
36
38
|
main.add_command(chromedriver_cli)
|
|
37
39
|
main.add_command(playwright_cli)
|
|
38
40
|
main.add_command(chrome_cli)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Top-level Linux Computer Use planner and opt-in installer."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
import subprocess
|
|
8
|
+
|
|
9
|
+
import click
|
|
10
|
+
|
|
11
|
+
from chatup.computer_use import apply_computer_use, plan_computer_use
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@click.command(name="computer-use")
|
|
15
|
+
@click.option("--sudo", is_flag=True, help="Apply the completed plan; sudo is used only for OS packages.")
|
|
16
|
+
@click.option("--dry-run", is_flag=True, help="Show the read-only plan, including when --sudo is present.")
|
|
17
|
+
@click.option("--display", help="Attach to an explicitly selected local X11 display, e.g. :20.")
|
|
18
|
+
@click.option("--xauthority", type=click.Path(path_type=Path), help="Same-user Xauthority for --display.")
|
|
19
|
+
@click.option("--state", type=click.Path(path_type=Path), help="Select existing same-user desktop metadata JSON.")
|
|
20
|
+
@click.option("--home", type=click.Path(path_type=Path), help="Override the effective ChatArch home for this runtime.")
|
|
21
|
+
def cli(sudo: bool, dry_run: bool, display: str | None, xauthority: Path | None,
|
|
22
|
+
state: Path | None, home: Path | None) -> None:
|
|
23
|
+
"""Plan Linux X11 Computer Use; apply only with --sudo."""
|
|
24
|
+
try:
|
|
25
|
+
plan = plan_computer_use(home=home, display=display, xauthority=xauthority, state=state)
|
|
26
|
+
result = apply_computer_use(plan) if sudo and not dry_run else plan.to_dict()
|
|
27
|
+
except (OSError, ValueError, RuntimeError, subprocess.SubprocessError) as exc:
|
|
28
|
+
raise click.ClickException(str(exc)) from exc
|
|
29
|
+
click.echo(json.dumps(result, ensure_ascii=False, indent=2, sort_keys=True))
|