zcode-app-cli 3.9.1-16 → 3.9.2-16
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.
- package/bin/zcode.js +17 -0
- package/config.example.json +14 -0
- package/package.json +1 -1
- package/vendor/extraction.json +4 -4
- package/vendor/node_modules/@zcode/tui/dist/index.js +17 -0
- package/vendor/packages/browser-use-plugin/.zcode-plugin/plugin.json +1 -1
- package/vendor/packages/browser-use-plugin/dist/mcp/server.js +232 -256
- package/vendor/packages/browser-use-plugin/docs/api.json +5 -0
- package/vendor/packages/browser-use-plugin/docs/overview.md +3 -0
- package/vendor/packages/browser-use-plugin/package.json +1 -1
- package/vendor/packages/browser-use-plugin/scripts/browser-client.mjs +63 -7
- package/vendor/packages/browser-use-plugin/skills/control-browser/SKILL.md +4 -1
- package/vendor/packages/document-skills-plugin/package.json +1 -1
- package/vendor/packages/document-skills-plugin/skills/pptx/SKILL.md +5 -3
- package/vendor/packages/zcode-cua-plugin/.zcode-plugin/plugin.json +2 -2
- package/vendor/packages/zcode-cua-plugin/dist/mcp/server.js +573 -1023
- package/vendor/packages/zcode-cua-plugin/package.json +1 -1
- package/vendor/packages/zcode-cua-plugin/skills/zcode-computer-use/SKILL.md +55 -12
- package/vendor/zcode.cjs +697 -698
- package/zcode-runtime.lock.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@zcode/zcode-cua-plugin",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.12",
|
|
5
5
|
"private": true,
|
|
6
6
|
"description": "ZCode CUA plugin wrapper; its version tracks the upstream zcode-cua MCP server version (enforced by check-version-coherence.mjs against the pnpm catalog pin)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -12,18 +12,35 @@ Main agent only. Never delegate Computer Use to a subagent.
|
|
|
12
12
|
Observe once, act once, then verify.
|
|
13
13
|
|
|
14
14
|
1. If readiness is unknown, call `request_access` once.
|
|
15
|
-
2.
|
|
15
|
+
2. `list_apps` shows running apps only. If the user names an app that is absent,
|
|
16
|
+
use `open_application` once with the original user-provided name: copy it character-for-character,
|
|
17
|
+
including its script, case, spaces, punctuation, and suffixes such as `app`.
|
|
18
|
+
For example, use `{"name":"网易云音乐app"}`, not `{"name":"网易云音乐"}`;
|
|
19
|
+
use `{"name":"日历"}`, not `{"name":"Calendar"}`.
|
|
20
|
+
Do not translate, localize, normalize, shorten, or remove a suffix. Do not retry names,
|
|
21
|
+
operate Finder/Spotlight, use shell commands to discover it, or substitute a different running app.
|
|
16
22
|
3. Call `get_app_state`. Start with the accessibility tree and no screenshot.
|
|
17
23
|
4. If the target has an accessibility element, use an element action. This is the primary path because it is semantic, precise, background-safe, and does not steal the user's focus.
|
|
18
24
|
5. Only when accessibility cannot locate or express the target, request a window
|
|
19
25
|
screenshot or full screenshot and use a frame-bound coordinate action.
|
|
20
|
-
6.
|
|
21
|
-
|
|
26
|
+
6. Let actions return the default receipt only. Use `return_state="compact"` or
|
|
27
|
+
call `get_app_state` only when the next step needs fresh UI state.
|
|
22
28
|
|
|
23
29
|
Do not run both the accessibility and visual workflows for the same action.
|
|
24
30
|
Do not activate or focus an app merely to make a semantic action work.
|
|
25
31
|
Honor tool capabilities and fail-closed results.
|
|
26
32
|
|
|
33
|
+
Tool failures are reported without a producer-side permission classifier. Read
|
|
34
|
+
the original message before choosing recovery. Call `request_access` once only
|
|
35
|
+
when the failure explicitly names Accessibility or Screen Recording; do not
|
|
36
|
+
infer macOS permission loss from a generic `permission_denied`, foreground,
|
|
37
|
+
focus-policy, UIPI, or capability failure. If delivery is `possibly_sent`,
|
|
38
|
+
observe the application state and never replay the same action automatically.
|
|
39
|
+
If `request_access` reports Accessibility as `denied`/`stale` or Screen Recording
|
|
40
|
+
as `denied`, tell the user that authorization is required and end the current
|
|
41
|
+
turn. Do not call another Computer Use action, retry `request_access`, or promise
|
|
42
|
+
that the interrupted action will continue automatically after authorization.
|
|
43
|
+
|
|
27
44
|
## Choose the target
|
|
28
45
|
|
|
29
46
|
There are two authoritative target forms:
|
|
@@ -74,8 +91,31 @@ occlusion, permission, or capability refusal.
|
|
|
74
91
|
A coordinate refusal may report that windows covering the point were skipped, or
|
|
75
92
|
name an owner other than the app you expected. Those windows are invisible
|
|
76
93
|
overlays belonging to the user's environment. Raise the window you meant to act on
|
|
77
|
-
with `open_application(activate=true
|
|
78
|
-
|
|
94
|
+
with `open_application(activate=true)`, observe again, and retry. Do not move,
|
|
95
|
+
resize, or close the reported windows.
|
|
96
|
+
|
|
97
|
+
### macOS file panels
|
|
98
|
+
|
|
99
|
+
For an `open_panel` / `save_panel` exact-path workflow, background app-scoped
|
|
100
|
+
keyboard receipts may be accepted without executing the AppKit command. Use this
|
|
101
|
+
single recovery sequence:
|
|
102
|
+
|
|
103
|
+
1. Observe the panel and keep its `pid`, `bundle_id`, and fresh `actual_window_id`.
|
|
104
|
+
2. Call `open_application` with those three fields and `activate=true`.
|
|
105
|
+
3. Observe the same panel again, then send Cmd+Shift+G with `strategy=event` and
|
|
106
|
+
that exact panel window id.
|
|
107
|
+
4. Observe by `pid` / `bundle_id` **without the old panel `window_id`**, so CUA
|
|
108
|
+
returns the newly focused `attached_dialog`. Pin its fresh `actual_window_id`
|
|
109
|
+
for the path `type(strategy=event)` and Enter.
|
|
110
|
+
|
|
111
|
+
`key` and `type` never activate implicitly. If they return `foreground_required`
|
|
112
|
+
with `action_sent=false`, repeat the confirmed activation and fresh observation;
|
|
113
|
+
do not retry the same key blindly. Ordinary windows and popovers do not receive
|
|
114
|
+
this activation exception.
|
|
115
|
+
|
|
116
|
+
For every ordinary launch or application activation, omit `window_id`. Never
|
|
117
|
+
invent a window id or use a placeholder such as `1`. If `bundle_id` or `pid` is
|
|
118
|
+
known, pass that canonical identity without a translated or guessed `name`.
|
|
79
119
|
|
|
80
120
|
## Text and keyboard
|
|
81
121
|
|
|
@@ -98,13 +138,16 @@ Platform app references:
|
|
|
98
138
|
## Outcome and retry safety
|
|
99
139
|
|
|
100
140
|
`action_sent=true` means the action may already have happened. Never blindly
|
|
101
|
-
replay it.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
`
|
|
106
|
-
|
|
107
|
-
|
|
141
|
+
replay it. When `action_sent=false`, re-observe with `get_app_state`, choose a
|
|
142
|
+
fresh target from the new state, and issue a new action only if it is still
|
|
143
|
+
needed. Never replay the same stale action call.
|
|
144
|
+
|
|
145
|
+
The default action result is an `action_receipt`, not a UI observation. Old
|
|
146
|
+
`state_id` values used by a sent element write are consumed after dispatch; call
|
|
147
|
+
`get_app_state` before another element write or whenever the next step depends
|
|
148
|
+
on current UI state. A changed tree is not by itself proof that this action
|
|
149
|
+
caused the change; verify with the app state or an external task oracle when it
|
|
150
|
+
matters.
|
|
108
151
|
|
|
109
152
|
Call `stop_computer_control` to stop the active control session. Do not continue
|
|
110
153
|
after the kill switch, denied access, or a non-retryable readiness result.
|