macos-computer-use-kit 0.2.0__tar.gz → 0.2.2__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 (46) hide show
  1. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/CHANGELOG.md +22 -0
  2. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/PKG-INFO +63 -42
  3. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/PUBLISHING.md +36 -8
  4. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/README.md +59 -19
  5. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/dsh/README.md +2 -1
  6. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/dsh/package.json +6 -3
  7. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/dsh/src/index.ts +39 -0
  8. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/dsh/src/macosCu.ts +6 -2
  9. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/pi/package.json +5 -2
  10. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/pyproject.toml +8 -2
  11. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/src/macos_computer_use/__init__.py +1 -1
  12. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/.github/workflows/ci.yml +0 -0
  13. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/.gitignore +0 -0
  14. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/CONTRIBUTING.md +0 -0
  15. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/LICENSE +0 -0
  16. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/install.sh +0 -0
  17. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/dsh/LICENSE +0 -0
  18. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/dsh/cordis.patch.yml +0 -0
  19. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/dsh/package-lock.json +0 -0
  20. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/dsh/tsconfig.json +0 -0
  21. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/pi/LICENSE +0 -0
  22. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/pi/README.md +0 -0
  23. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/pi/extensions/macos-computer-use.ts +0 -0
  24. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/pi/package-lock.json +0 -0
  25. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/pi/skills/macos-computer-use/SKILL.md +0 -0
  26. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/pi/skills/macos-computer-use/reference/jev-best-practices.md +0 -0
  27. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/packages/pi/tsconfig.json +0 -0
  28. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/skill/SKILL.md +0 -0
  29. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/skill/reference/jev-best-practices.md +0 -0
  30. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/src/macos_computer_use/__main__.py +0 -0
  31. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/src/macos_computer_use/ax.py +0 -0
  32. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/src/macos_computer_use/cli.py +0 -0
  33. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/src/macos_computer_use/darwin.py +0 -0
  34. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/src/macos_computer_use/input_events.py +0 -0
  35. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/src/macos_computer_use/jev.py +0 -0
  36. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/src/macos_computer_use/overlay.py +0 -0
  37. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/src/macos_computer_use/paste.py +0 -0
  38. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/src/macos_computer_use/shot.py +0 -0
  39. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/tests/test_policy.py +0 -0
  40. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/tools/assist.py +0 -0
  41. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/tools/ax_tool.py +0 -0
  42. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/tools/guard.py +0 -0
  43. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/tools/jev_select.py +0 -0
  44. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/tools/overlay.py +0 -0
  45. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/tools/shot.py +0 -0
  46. {macos_computer_use_kit-0.2.0 → macos_computer_use_kit-0.2.2}/tools/smart_paste.py +0 -0
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project. The CLI, the pi package, and the dsh bundle
4
4
  share a version number.
5
5
 
6
+ ## 0.2.2
7
+
8
+ Discoverability and parity for the optional Jev (TypeSafe System One) guards.
9
+
10
+ - **The dsh bundle now exposes `macos_jev_guard`** — the same optional semantic
11
+ guard the pi package already had — so both integrations carry the capability
12
+ they advertise (6 tools instead of 5). The bridge gained stdin support, which
13
+ is how `macos-cu jev` receives its JSON request.
14
+ - npm keywords gain `jev`, `typesafe-ai`, `system-one-models`; PyPI keywords gain
15
+ `jev`, `typesafe-ai`, `system-one`, `llm-guardrails`. Keywords are immutable
16
+ per version, which is why this needed a release rather than an edit.
17
+ - Declare the `Programming Language :: Python :: 3.14` classifier. The wheel has
18
+ installed and run on 3.14 since 0.2.0; only the metadata was behind.
19
+
20
+ No behaviour changes outside the new tool.
21
+
22
+ ## 0.2.1
23
+
24
+ - Publish the Python package metadata with an SPDX license expression
25
+ (`license = "MIT"` + `license-files`, PEP 639) instead of embedding the full
26
+ MIT text in the metadata `License` field. No code or behaviour changes.
27
+
6
28
  ## 0.2.0
7
29
 
8
30
  First release meant for use outside the machine it was built on.
@@ -1,33 +1,13 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: macos-computer-use-kit
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: AX-first computer-use toolkit for AI agents on macOS: accessibility-tree targeting, process-scoped input, clipboard-safe paste, action read-back verification, visual feedback, and optional Jev semantic guards.
5
5
  Project-URL: Homepage, https://github.com/Sur-Cai/macos-computer-use-kit
6
6
  Project-URL: Repository, https://github.com/Sur-Cai/macos-computer-use-kit
7
7
  Project-URL: Issues, https://github.com/Sur-Cai/macos-computer-use-kit/issues
8
- License: MIT License
9
-
10
- Copyright (c) 2026 Sur-Cai
11
-
12
- Permission is hereby granted, free of charge, to any person obtaining a copy
13
- of this software and associated documentation files (the "Software"), to deal
14
- in the Software without restriction, including without limitation the rights
15
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- copies of the Software, and to permit persons to whom the Software is
17
- furnished to do so, subject to the following conditions:
18
-
19
- The above copyright notice and this permission notice shall be included in all
20
- copies or substantial portions of the Software.
21
-
22
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- SOFTWARE.
8
+ License-Expression: MIT
29
9
  License-File: LICENSE
30
- Keywords: accessibility,agent-tools,ai-agent,automation,computer-use,dsh-plugin,macos,opencode,pi-package
10
+ Keywords: accessibility,agent-tools,ai-agent,automation,computer-use,dsh-plugin,jev,llm-guardrails,macos,opencode,pi-package,system-one,typesafe-ai
31
11
  Classifier: Development Status :: 4 - Beta
32
12
  Classifier: Environment :: MacOS X :: Cocoa
33
13
  Classifier: Intended Audience :: Developers
@@ -38,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.10
38
18
  Classifier: Programming Language :: Python :: 3.11
39
19
  Classifier: Programming Language :: Python :: 3.12
40
20
  Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
41
22
  Classifier: Topic :: Software Development :: User Interfaces
42
23
  Requires-Python: >=3.10
43
24
  Requires-Dist: pillow>=10.0
@@ -50,6 +31,13 @@ Description-Content-Type: text/markdown
50
31
 
51
32
  # macos-computer-use-kit
52
33
 
34
+ [![PyPI](https://img.shields.io/pypi/v/macos-computer-use-kit)](https://pypi.org/project/macos-computer-use-kit/)
35
+ [![Python versions](https://img.shields.io/pypi/pyversions/macos-computer-use-kit)](https://pypi.org/project/macos-computer-use-kit/)
36
+ [![pi package](https://img.shields.io/npm/v/pi-macos-computer-use)](https://www.npmjs.com/package/pi-macos-computer-use)
37
+ [![dsh plugin](https://img.shields.io/npm/v/dsh-macos-computer-use)](https://www.npmjs.com/package/dsh-macos-computer-use)
38
+ [![CI](https://github.com/Sur-Cai/macos-computer-use-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/Sur-Cai/macos-computer-use-kit/actions/workflows/ci.yml)
39
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
40
+
53
41
  **AX-first computer use for AI agents on macOS.** Instead of screenshot → eyeball
54
42
  coordinates → click and hope, read the accessibility tree, get each element's
55
43
  semantics and exact geometry, act on it, then verify the action actually changed
@@ -60,6 +48,14 @@ window-scoped input, clipboard-safe pasting, action read-back verification,
60
48
  blank-frame detection, visual feedback, and optional Jev (TypeSafe System One)
61
49
  semantic guards.
62
50
 
51
+ **Jev is the semantic guard layer.** A small model — no reasoning tokens, no
52
+ prose — returns calibrated judgments right before an irreversible action: *is
53
+ this still the intended recipient? does the field hold the intended text? what,
54
+ if anything, blocks the action?* The code, not the model, decides whether to
55
+ proceed, and the model may only ever suggest the two recoveries that cannot send
56
+ or submit anything. Probabilities in, decisions out. See
57
+ [Jev semantic guards](#jev-semantic-guards-optional).
58
+
63
59
  Works with any agent that can run a shell command, and ships first-class
64
60
  packages for [pi](#pi) and [DeepSeek Harness](#deepseek-harness-dsh).
65
61
 
@@ -79,10 +75,19 @@ invented from scratch:
79
75
  macOS 12+, Python 3.10+.
80
76
 
81
77
  ```bash
82
- pip install macos-computer-use-kit # or: pipx install macos-computer-use-kit
83
- macos-cu doctor # check permissions, displays, dependencies
78
+ # 1) the CLI every integration below drives this, and it works on its own
79
+ pip install macos-computer-use-kit # or: pipx install macos-computer-use-kit
80
+ macos-cu doctor # permissions, displays, dependencies
81
+
82
+ # 2) your agent integration (optional — pick one)
83
+ pi install npm:pi-macos-computer-use # pi
84
+ dsh plugin --profile <name> add dsh-macos-computer-use # DeepSeek Harness
85
+ ```
84
86
 
85
- # from a checkout (editable install + agent skill)
87
+ From a checkout — this is also the opencode integration (editable CLI, the
88
+ `macos-computer-use` skill, a `macos-cu` launcher, and the optional Jev key):
89
+
90
+ ```bash
86
91
  git clone https://github.com/Sur-Cai/macos-computer-use-kit && cd macos-computer-use-kit
87
92
  ./install.sh
88
93
  ```
@@ -152,23 +157,30 @@ coordinates. That is normal. `macos-cu doctor` prints the layout.
152
157
 
153
158
  | Harness | What you get | Install |
154
159
  | --- | --- | --- |
155
- | any agent with a shell | the full CLI | `pip install macos-computer-use-kit` |
160
+ | any agent with a shell | the full CLI ([PyPI](https://pypi.org/project/macos-computer-use-kit/)) | `pip install macos-computer-use-kit` |
156
161
  | [opencode](https://opencode.ai) | skill `macos-computer-use` (auto-discovered) | `./install.sh` |
157
- | [pi](https://pi.dev) | skill + 9 native tools | `pi install npm:pi-macos-computer-use` |
158
- | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) | plugin bundle, 5 tools | `dsh plugin --profile <name> add dsh-macos-computer-use` |
162
+ | [pi](https://pi.dev) | skill + 9 native tools ([npm](https://www.npmjs.com/package/pi-macos-computer-use), [catalog](https://pi.dev/packages/pi-macos-computer-use)) | `pi install npm:pi-macos-computer-use` |
163
+ | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) | plugin bundle, 6 tools ([npm](https://www.npmjs.com/package/dsh-macos-computer-use)) | `dsh plugin --profile <name> add dsh-macos-computer-use` |
164
+
165
+ Every integration is a thin bridge over the same CLI, so install the CLI first
166
+ (`pip install macos-computer-use-kit`). The three published artifacts — the PyPI
167
+ CLI, the pi package, and the dsh bundle — are versioned and released together;
168
+ the badges at the top of this file show the current release.
159
169
 
160
170
  <a name="pi"></a>
161
171
  ### pi package
162
172
 
163
- `packages/pi` — `pi-macos-computer-use` (npm, `pi-package` keyword). Registers
173
+ [`pi-macos-computer-use`](https://www.npmjs.com/package/pi-macos-computer-use) on
174
+ npm (`pi-package` keyword), sources in `packages/pi`. Registers
164
175
  `macos_cu_doctor`, `macos_ax_find`, `macos_ax_press`, `macos_input_windows`,
165
176
  `macos_input_click`, `macos_input_key`, `macos_paste`, `macos_shot`,
166
177
  `macos_jev_guard`. Every tool shells out with an argv array (`shell: false`), so
167
178
  model-supplied text can never reach a shell.
168
179
 
169
180
  ```bash
170
- pi install npm:pi-macos-computer-use
171
- pi -e ./packages/pi # try it for one run without installing
181
+ pip install macos-computer-use-kit # the CLI the tools call
182
+ pi install npm:pi-macos-computer-use # the integration
183
+ pi -e ./packages/pi # or try a checkout for one run, without installing
172
184
  ```
173
185
 
174
186
  App launchers do not inherit your interactive shell's `PATH`. If the CLI is
@@ -178,13 +190,16 @@ restart pi (the dsh plugin honours the same variable).
178
190
  <a name="deepseek-harness-dsh"></a>
179
191
  ### DeepSeek Harness plugin
180
192
 
181
- `packages/dsh` — `dsh-macos-computer-use`, a Cordis bundle
193
+ [`dsh-macos-computer-use`](https://www.npmjs.com/package/dsh-macos-computer-use)
194
+ on npm, sources in `packages/dsh` — a Cordis bundle
182
195
  (`dsh.bundle.patch` → `cordis.patch.yml`). Registers `macos_cu_doctor`,
183
- `macos_ax_find`, `macos_ax_press`, `macos_input_click`, `macos_shot`.
196
+ `macos_ax_find`, `macos_ax_press`, `macos_input_click`, `macos_shot`,
197
+ `macos_jev_guard` (the same optional Jev guard the pi package exposes).
184
198
 
185
199
  ```bash
186
- dsh plugin --profile demo add dsh-macos-computer-use
187
- dsh --profile demo --dump-config # verify the layer before booting
200
+ pip install macos-computer-use-kit # the CLI the tools call
201
+ dsh plugin --profile demo add dsh-macos-computer-use # the plugin
202
+ dsh --profile demo --dump-config # verify the layer before booting
188
203
  ```
189
204
 
190
205
  It deliberately does **not** claim the exclusive `ctx.computerUse` provider slot:
@@ -195,7 +210,7 @@ in-box Cua Driver provider. See `packages/dsh/README.md`.
195
210
 
196
211
  `./install.sh` installs `skill/SKILL.md` to
197
212
  `~/.config/opencode/skills/macos-computer-use/`, where opencode discovers it
198
- automatically.
213
+ automatically, and puts a `macos-cu` launcher on your `PATH`.
199
214
 
200
215
  ## The four capabilities that matter
201
216
 
@@ -295,13 +310,19 @@ Release steps and catalog-listing criteria live in
295
310
  可视反馈,以及可选的 Jev 语义护栏。
296
311
 
297
312
  ```bash
298
- pip install macos-computer-use-kit
299
- macos-cu doctor # 检查辅助功能 / 屏幕录制权限、显示器、依赖、Jev
313
+ # 1) 命令行本体(所有集成都调它,也可单独使用)
314
+ pip install macos-computer-use-kit # pipx install macos-computer-use-kit
315
+ macos-cu doctor # 检查辅助功能 / 屏幕录制权限、显示器、依赖、Jev
316
+
317
+ # 2) 选一个 agent 集成
318
+ pi install npm:pi-macos-computer-use # pi
319
+ dsh plugin --profile <名> add dsh-macos-computer-use # DeepSeek Harness
300
320
  ```
301
321
 
302
- Agent 集成:`./install.sh`(opencode skill)、`pi install npm:pi-macos-computer-use`(pi)、
303
- `dsh plugin --profile <名> add dsh-macos-computer-use`(DeepSeek Harness)。
304
- 完整流程与避坑见 [`skill/SKILL.md`](skill/SKILL.md)
322
+ opencode 的集成走 checkout:`git clone` 后执行 `./install.sh`,它会装 skill、放一个
323
+ `macos-cu` 启动器,并可写入可选的 Jev key。完整流程与避坑见
324
+ [`skill/SKILL.md`](skill/SKILL.md),发布与收录流程见
325
+ [`PUBLISHING.md`](PUBLISHING.md)。
305
326
 
306
327
  ## License
307
328
 
@@ -1,7 +1,12 @@
1
1
  # Publishing this toolkit
2
2
 
3
+ > Maintainer document, public on purpose: a fork should be able to release under
4
+ > its own npm/PyPI names without reverse-engineering this layout. Nothing here is
5
+ > secret — no credentials, no private infrastructure, no deploy internals.
6
+
3
7
  Three artifacts can be published from this repository, all versioned in lockstep
4
- with the CLI (`0.2.0` today):
8
+ with the CLI (bump `pyproject.toml`, `packages/pi/package.json`, and
9
+ `packages/dsh/package.json` together):
5
10
 
6
11
  | Artifact | Registry | Command |
7
12
  | --- | --- | --- |
@@ -76,7 +81,7 @@ Users install with:
76
81
 
77
82
  ```bash
78
83
  dsh plugin --profile <name> add dsh-macos-computer-use # from npm (recommended)
79
- dsh plugin --profile <name> add ./dsh-macos-computer-use-0.2.0.tgz # from a packed tarball
84
+ dsh plugin --profile <name> add ./dsh-macos-computer-use-<version>.tgz # from a packed tarball
80
85
  ```
81
86
 
82
87
  The npm and tarball forms ship the prebuilt `lib/`, so no build permission is
@@ -88,12 +93,22 @@ that root-mounts the package. Prefer npm or the tarball for distribution.
88
93
  ## Catalog listings
89
94
 
90
95
  - **pi**: publishing to npm is enough — the gallery at <https://pi.dev/packages>
91
- lists packages tagged `pi-package`. Optionally add a `pi.image` or
92
- `pi.video` preview to `packages/pi/package.json` for a richer card.
96
+ lists packages tagged `pi-package`. This is confirmed working: the page for
97
+ `pi-macos-computer-use` appeared shortly after the npm publish. Optionally add
98
+ a `pi.image` or `pi.video` preview to `packages/pi/package.json` for a richer
99
+ card.
93
100
  - **dsh**: add the `dsh-plugin` GitHub topic, then open a PR against
94
- [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
95
- (their bar: installs with `dsh plugin add`, does what its one-line description
96
- says, right category, maintained). There is also
101
+ [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin).
102
+ Submissions are **one YAML file per plugin** under `data/plugins/` never edit
103
+ the generated READMEs. For this monorepo the file is
104
+ `data/plugins/Sur-Cai__macos-computer-use-kit--packages-dsh.yml`, with `url`
105
+ pointing at `.../tree/main/packages/dsh` and `name` written as
106
+ `Sur-Cai/macos-computer-use-kit#packages/dsh`.
107
+
108
+ Their CI enforces a **1-day minimum repository age** (ours was created
109
+ 2026-09-22T10:22Z, so the earliest valid submission is the next day at the same
110
+ time) and at most 3 entries per PR. Descriptions are checked against the code,
111
+ so keep numbers and tool names exact. There is also
97
112
  [dsh-market](https://github.com/dsh-market/dsh-market) for in-app discovery.
98
113
 
99
114
  ## Release checklist
@@ -105,5 +120,18 @@ macos-cu doctor # permissions still granted after reinstalling
105
120
  (cd packages/dsh && npm run typecheck && npm run build)
106
121
  ```
107
122
 
108
- Then tag (`git tag v0.2.0 && git push --tags`) and publish the artifacts you
123
+ Then tag (`git tag v<version> && git push --tags`) and publish the artifacts you
109
124
  intend to ship.
125
+
126
+ ## Current release state
127
+
128
+ | Artifact | Published | Notes |
129
+ | --- | --- | --- |
130
+ | `macos-computer-use-kit` | PyPI `0.2.1` | `pip install macos-computer-use-kit` |
131
+ | `pi-macos-computer-use` | npm `0.2.1` | listed on pi.dev/packages |
132
+ | `dsh-macos-computer-use` | npm `0.2.1` | awesome-dsh-plugin PR pending |
133
+
134
+ Known follow-ups: the PyPI `Programming Language :: Python :: 3.14` classifier is
135
+ not set (the wheel installs and runs on 3.14 — verified — but the badge stops at
136
+ 3.13 until the next release adds it), and the dsh catalog PR is gated on the
137
+ 1-day repository-age rule.
@@ -1,5 +1,12 @@
1
1
  # macos-computer-use-kit
2
2
 
3
+ [![PyPI](https://img.shields.io/pypi/v/macos-computer-use-kit)](https://pypi.org/project/macos-computer-use-kit/)
4
+ [![Python versions](https://img.shields.io/pypi/pyversions/macos-computer-use-kit)](https://pypi.org/project/macos-computer-use-kit/)
5
+ [![pi package](https://img.shields.io/npm/v/pi-macos-computer-use)](https://www.npmjs.com/package/pi-macos-computer-use)
6
+ [![dsh plugin](https://img.shields.io/npm/v/dsh-macos-computer-use)](https://www.npmjs.com/package/dsh-macos-computer-use)
7
+ [![CI](https://github.com/Sur-Cai/macos-computer-use-kit/actions/workflows/ci.yml/badge.svg)](https://github.com/Sur-Cai/macos-computer-use-kit/actions/workflows/ci.yml)
8
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
9
+
3
10
  **AX-first computer use for AI agents on macOS.** Instead of screenshot → eyeball
4
11
  coordinates → click and hope, read the accessibility tree, get each element's
5
12
  semantics and exact geometry, act on it, then verify the action actually changed
@@ -10,6 +17,14 @@ window-scoped input, clipboard-safe pasting, action read-back verification,
10
17
  blank-frame detection, visual feedback, and optional Jev (TypeSafe System One)
11
18
  semantic guards.
12
19
 
20
+ **Jev is the semantic guard layer.** A small model — no reasoning tokens, no
21
+ prose — returns calibrated judgments right before an irreversible action: *is
22
+ this still the intended recipient? does the field hold the intended text? what,
23
+ if anything, blocks the action?* The code, not the model, decides whether to
24
+ proceed, and the model may only ever suggest the two recoveries that cannot send
25
+ or submit anything. Probabilities in, decisions out. See
26
+ [Jev semantic guards](#jev-semantic-guards-optional).
27
+
13
28
  Works with any agent that can run a shell command, and ships first-class
14
29
  packages for [pi](#pi) and [DeepSeek Harness](#deepseek-harness-dsh).
15
30
 
@@ -29,10 +44,19 @@ invented from scratch:
29
44
  macOS 12+, Python 3.10+.
30
45
 
31
46
  ```bash
32
- pip install macos-computer-use-kit # or: pipx install macos-computer-use-kit
33
- macos-cu doctor # check permissions, displays, dependencies
47
+ # 1) the CLI every integration below drives this, and it works on its own
48
+ pip install macos-computer-use-kit # or: pipx install macos-computer-use-kit
49
+ macos-cu doctor # permissions, displays, dependencies
50
+
51
+ # 2) your agent integration (optional — pick one)
52
+ pi install npm:pi-macos-computer-use # pi
53
+ dsh plugin --profile <name> add dsh-macos-computer-use # DeepSeek Harness
54
+ ```
34
55
 
35
- # from a checkout (editable install + agent skill)
56
+ From a checkout — this is also the opencode integration (editable CLI, the
57
+ `macos-computer-use` skill, a `macos-cu` launcher, and the optional Jev key):
58
+
59
+ ```bash
36
60
  git clone https://github.com/Sur-Cai/macos-computer-use-kit && cd macos-computer-use-kit
37
61
  ./install.sh
38
62
  ```
@@ -102,23 +126,30 @@ coordinates. That is normal. `macos-cu doctor` prints the layout.
102
126
 
103
127
  | Harness | What you get | Install |
104
128
  | --- | --- | --- |
105
- | any agent with a shell | the full CLI | `pip install macos-computer-use-kit` |
129
+ | any agent with a shell | the full CLI ([PyPI](https://pypi.org/project/macos-computer-use-kit/)) | `pip install macos-computer-use-kit` |
106
130
  | [opencode](https://opencode.ai) | skill `macos-computer-use` (auto-discovered) | `./install.sh` |
107
- | [pi](https://pi.dev) | skill + 9 native tools | `pi install npm:pi-macos-computer-use` |
108
- | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) | plugin bundle, 5 tools | `dsh plugin --profile <name> add dsh-macos-computer-use` |
131
+ | [pi](https://pi.dev) | skill + 9 native tools ([npm](https://www.npmjs.com/package/pi-macos-computer-use), [catalog](https://pi.dev/packages/pi-macos-computer-use)) | `pi install npm:pi-macos-computer-use` |
132
+ | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) | plugin bundle, 6 tools ([npm](https://www.npmjs.com/package/dsh-macos-computer-use)) | `dsh plugin --profile <name> add dsh-macos-computer-use` |
133
+
134
+ Every integration is a thin bridge over the same CLI, so install the CLI first
135
+ (`pip install macos-computer-use-kit`). The three published artifacts — the PyPI
136
+ CLI, the pi package, and the dsh bundle — are versioned and released together;
137
+ the badges at the top of this file show the current release.
109
138
 
110
139
  <a name="pi"></a>
111
140
  ### pi package
112
141
 
113
- `packages/pi` — `pi-macos-computer-use` (npm, `pi-package` keyword). Registers
142
+ [`pi-macos-computer-use`](https://www.npmjs.com/package/pi-macos-computer-use) on
143
+ npm (`pi-package` keyword), sources in `packages/pi`. Registers
114
144
  `macos_cu_doctor`, `macos_ax_find`, `macos_ax_press`, `macos_input_windows`,
115
145
  `macos_input_click`, `macos_input_key`, `macos_paste`, `macos_shot`,
116
146
  `macos_jev_guard`. Every tool shells out with an argv array (`shell: false`), so
117
147
  model-supplied text can never reach a shell.
118
148
 
119
149
  ```bash
120
- pi install npm:pi-macos-computer-use
121
- pi -e ./packages/pi # try it for one run without installing
150
+ pip install macos-computer-use-kit # the CLI the tools call
151
+ pi install npm:pi-macos-computer-use # the integration
152
+ pi -e ./packages/pi # or try a checkout for one run, without installing
122
153
  ```
123
154
 
124
155
  App launchers do not inherit your interactive shell's `PATH`. If the CLI is
@@ -128,13 +159,16 @@ restart pi (the dsh plugin honours the same variable).
128
159
  <a name="deepseek-harness-dsh"></a>
129
160
  ### DeepSeek Harness plugin
130
161
 
131
- `packages/dsh` — `dsh-macos-computer-use`, a Cordis bundle
162
+ [`dsh-macos-computer-use`](https://www.npmjs.com/package/dsh-macos-computer-use)
163
+ on npm, sources in `packages/dsh` — a Cordis bundle
132
164
  (`dsh.bundle.patch` → `cordis.patch.yml`). Registers `macos_cu_doctor`,
133
- `macos_ax_find`, `macos_ax_press`, `macos_input_click`, `macos_shot`.
165
+ `macos_ax_find`, `macos_ax_press`, `macos_input_click`, `macos_shot`,
166
+ `macos_jev_guard` (the same optional Jev guard the pi package exposes).
134
167
 
135
168
  ```bash
136
- dsh plugin --profile demo add dsh-macos-computer-use
137
- dsh --profile demo --dump-config # verify the layer before booting
169
+ pip install macos-computer-use-kit # the CLI the tools call
170
+ dsh plugin --profile demo add dsh-macos-computer-use # the plugin
171
+ dsh --profile demo --dump-config # verify the layer before booting
138
172
  ```
139
173
 
140
174
  It deliberately does **not** claim the exclusive `ctx.computerUse` provider slot:
@@ -145,7 +179,7 @@ in-box Cua Driver provider. See `packages/dsh/README.md`.
145
179
 
146
180
  `./install.sh` installs `skill/SKILL.md` to
147
181
  `~/.config/opencode/skills/macos-computer-use/`, where opencode discovers it
148
- automatically.
182
+ automatically, and puts a `macos-cu` launcher on your `PATH`.
149
183
 
150
184
  ## The four capabilities that matter
151
185
 
@@ -245,13 +279,19 @@ Release steps and catalog-listing criteria live in
245
279
  可视反馈,以及可选的 Jev 语义护栏。
246
280
 
247
281
  ```bash
248
- pip install macos-computer-use-kit
249
- macos-cu doctor # 检查辅助功能 / 屏幕录制权限、显示器、依赖、Jev
282
+ # 1) 命令行本体(所有集成都调它,也可单独使用)
283
+ pip install macos-computer-use-kit # pipx install macos-computer-use-kit
284
+ macos-cu doctor # 检查辅助功能 / 屏幕录制权限、显示器、依赖、Jev
285
+
286
+ # 2) 选一个 agent 集成
287
+ pi install npm:pi-macos-computer-use # pi
288
+ dsh plugin --profile <名> add dsh-macos-computer-use # DeepSeek Harness
250
289
  ```
251
290
 
252
- Agent 集成:`./install.sh`(opencode skill)、`pi install npm:pi-macos-computer-use`(pi)、
253
- `dsh plugin --profile <名> add dsh-macos-computer-use`(DeepSeek Harness)。
254
- 完整流程与避坑见 [`skill/SKILL.md`](skill/SKILL.md)
291
+ opencode 的集成走 checkout:`git clone` 后执行 `./install.sh`,它会装 skill、放一个
292
+ `macos-cu` 启动器,并可写入可选的 Jev key。完整流程与避坑见
293
+ [`skill/SKILL.md`](skill/SKILL.md),发布与收录流程见
294
+ [`PUBLISHING.md`](PUBLISHING.md)。
255
295
 
256
296
  ## License
257
297
 
@@ -4,7 +4,7 @@ DeepSeek Harness (dsh) bundle bridging dsh agents to the
4
4
  [macos-computer-use-kit](https://github.com/Sur-Cai/macos-computer-use-kit)
5
5
  `macos-cu` CLI: AX-first computer use on macOS.
6
6
 
7
- The plugin registers five focused tools that shell out to `macos-cu` with an
7
+ The plugin registers six focused tools that shell out to `macos-cu` with an
8
8
  argument array (never shell-string concatenation) and return the CLI's JSON
9
9
  output:
10
10
 
@@ -15,6 +15,7 @@ output:
15
15
  | `macos_ax_press` | `macos-cu ax press\|setvalue` | Native AX action with read-back verification |
16
16
  | `macos_input_click` | `macos-cu input click` | Window-scoped click that never moves the user's cursor |
17
17
  | `macos_shot` | `macos-cu shot capture\|check\|windows` | Blank-frame-checked screenshots for verification only |
18
+ | `macos_jev_guard` | `macos-cu jev guard\|select` | Optional Jev semantic guard before an irreversible action (needs `TYPESAFE_API_KEY`) |
18
19
 
19
20
  The AX-first intent is baked into every tool description: locate elements via
20
21
  `macos_ax_find` and use the returned geometry — use instead of guessing
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-macos-computer-use",
3
- "version": "0.2.0",
4
- "description": "AX-first computer use on macOS for DeepSeek Harness: accessibility-tree targeting instead of screenshot coordinate guessing, window-scoped input, action read-back verification, and blank-frame-checked screenshots, bridged to the macos-cu CLI.",
3
+ "version": "0.2.2",
4
+ "description": "AX-first computer use on macOS for DeepSeek Harness: accessibility-tree targeting instead of screenshot coordinate guessing, window-scoped input, action read-back verification, blank-frame-checked screenshots, and optional Jev (TypeSafe System One) semantic guards before irreversible actions \u2014 bridged to the macos-cu CLI.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -31,7 +31,10 @@
31
31
  "accessibility-tree",
32
32
  "automation",
33
33
  "gui-automation",
34
- "agent-tools"
34
+ "agent-tools",
35
+ "jev",
36
+ "typesafe-ai",
37
+ "system-one-models"
35
38
  ],
36
39
  "homepage": "https://github.com/Sur-Cai/macos-computer-use-kit#readme",
37
40
  "repository": {
@@ -148,6 +148,44 @@ const shot = defineTool({
148
148
  },
149
149
  })
150
150
 
151
+ const jevGuard = defineTool({
152
+ name: 'macos_jev_guard',
153
+ description: `Optional Jev (TypeSafe System One) semantic guard for the moment before an irreversible action. \`macos-cu jev guard\` fans one request out into calibrated judgments about expected versus observed state (right_target, input_ok, blocker, next_action) plus a decision, and \`macos-cu jev select\` picks one candidate element id with a confidence gate and a 'none' escape hatch. Use it only for semantic identity/state/effect questions that ordinary code cannot decide — never for blank-frame detection or signature comparison. Requires TYPESAFE_API_KEY or ~/.config/typesafe/api_key; the rest of this plugin works without it. The JSON request is sent on stdin.`,
154
+ parameters: {
155
+ command: {
156
+ type: 'string',
157
+ required: true,
158
+ enum: ['guard', 'select'],
159
+ description: 'guard = pre-action judgment; select = pick an element id from candidates.',
160
+ },
161
+ payload: {
162
+ type: 'string',
163
+ required: true,
164
+ description:
165
+ 'JSON request for the CLI stdin. guard: {"task":...,"expected":{...},"observed":{...}}. select: {"goal":...,"candidates":[{"id":...,"text":...}]}.',
166
+ },
167
+ },
168
+ output: OUTPUT,
169
+ async execute(args, exec) {
170
+ let parsed: unknown
171
+ try {
172
+ parsed = JSON.parse(args.payload)
173
+ } catch (error) {
174
+ throw new Error(`macos_jev_guard 'payload' is not valid JSON: ${(error as Error).message}`)
175
+ }
176
+ if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
177
+ throw new Error("macos_jev_guard 'payload' must be a JSON object.")
178
+ }
179
+ if (args.command === 'guard' && !(parsed as { task?: unknown }).task) {
180
+ throw new Error("macos_jev_guard command='guard' needs a 'task' field in the payload.")
181
+ }
182
+ if (args.command === 'select' && !Array.isArray((parsed as { candidates?: unknown }).candidates)) {
183
+ throw new Error("macos_jev_guard command='select' needs a 'candidates' array in the payload.")
184
+ }
185
+ return runMacosCu(['jev', args.command], exec.signal, JSON.stringify(parsed))
186
+ },
187
+ })
188
+
151
189
  /** Register the macos-cu bridge tools. Tool registrations auto-dispose on unload. */
152
190
  export function apply(ctx: Context): void {
153
191
  ctx.tools.register(doctor)
@@ -155,4 +193,5 @@ export function apply(ctx: Context): void {
155
193
  ctx.tools.register(axPress)
156
194
  ctx.tools.register(inputClick)
157
195
  ctx.tools.register(shot)
196
+ ctx.tools.register(jevGuard)
158
197
  }
@@ -35,13 +35,16 @@ export function binary(): string {
35
35
  * Run the CLI with an argument array (never a shell string) and return the
36
36
  * outcome. Missing-binary (ENOENT) resolves to an actionable install message
37
37
  * instead of throwing, so the model sees what to do next.
38
+ *
39
+ * `stdin` is written and the stream closed immediately: the `jev` subcommand
40
+ * reads a JSON payload from stdin and would otherwise wait forever.
38
41
  */
39
- export async function runMacosCu(argv: string[], signal: AbortSignal): Promise<string> {
42
+ export async function runMacosCu(argv: string[], signal: AbortSignal, stdin?: string): Promise<string> {
40
43
  if (signal.aborted) throw new Error('macos-cu call aborted before spawn')
41
44
  const bin = binary()
42
45
  const outcome = await new Promise<{ code: number; stdout: string; stderr: string; spawnError?: NodeJS.ErrnoException }>(
43
46
  (resolve) => {
44
- execFile(
47
+ const child = execFile(
45
48
  bin,
46
49
  argv,
47
50
  { timeout: 55_000, signal, maxBuffer: 8 * 1024 * 1024, windowsHide: true },
@@ -57,6 +60,7 @@ export async function runMacosCu(argv: string[], signal: AbortSignal): Promise<s
57
60
  resolve({ code, stdout: String(stdout), stderr: String(stderr) })
58
61
  },
59
62
  )
63
+ child.stdin?.end(stdin ?? '')
60
64
  },
61
65
  )
62
66
  if (outcome.spawnError !== undefined) return MISSING_BINARY_MESSAGE
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-macos-computer-use",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "AX-first computer use on macOS for pi: accessibility-tree targeting instead of screenshot coordinate guessing, window-scoped input that never moves the user's cursor, clipboard-safe pasting, action read-back verification, blank-frame detection, and optional Jev semantic guards.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -14,7 +14,10 @@
14
14
  "accessibility-tree",
15
15
  "automation",
16
16
  "gui-automation",
17
- "agent-tools"
17
+ "agent-tools",
18
+ "jev",
19
+ "typesafe-ai",
20
+ "system-one-models"
18
21
  ],
19
22
  "homepage": "https://github.com/Sur-Cai/macos-computer-use-kit#readme",
20
23
  "repository": {
@@ -4,10 +4,11 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "macos-computer-use-kit"
7
- version = "0.2.0"
7
+ version = "0.2.2"
8
8
  description = "AX-first computer-use toolkit for AI agents on macOS: accessibility-tree targeting, process-scoped input, clipboard-safe paste, action read-back verification, visual feedback, and optional Jev semantic guards."
9
+ license = "MIT"
10
+ license-files = ["LICENSE"]
9
11
  readme = "README.md"
10
- license = { file = "LICENSE" }
11
12
  requires-python = ">=3.10"
12
13
  keywords = [
13
14
  "computer-use",
@@ -19,6 +20,10 @@ keywords = [
19
20
  "opencode",
20
21
  "pi-package",
21
22
  "dsh-plugin",
23
+ "jev",
24
+ "typesafe-ai",
25
+ "system-one",
26
+ "llm-guardrails",
22
27
  ]
23
28
  classifiers = [
24
29
  "Development Status :: 4 - Beta",
@@ -31,6 +36,7 @@ classifiers = [
31
36
  "Programming Language :: Python :: 3.11",
32
37
  "Programming Language :: Python :: 3.12",
33
38
  "Programming Language :: Python :: 3.13",
39
+ "Programming Language :: Python :: 3.14",
34
40
  "Topic :: Software Development :: User Interfaces",
35
41
  ]
36
42
  dependencies = [
@@ -4,6 +4,6 @@ The public surface is the ``macos-cu`` command line; every subcommand prints a
4
4
  single JSON object (or JSON lines) so an agent can consume the result directly.
5
5
  """
6
6
 
7
- __version__ = "0.2.0"
7
+ __version__ = "0.2.2"
8
8
 
9
9
  __all__ = ["__version__"]