@ycodium-ai/plugin-devices 0.2.3510 → 0.2.3576
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/README.md +112 -86
- package/assets/ui.js +16 -4
- package/dist/environment-helper.mjs +239 -0
- package/dist/helper.mjs +77 -128
- package/dist/index.js +1247 -556
- package/locales/en.json +64 -8
- package/locales/zh-CN.json +64 -8
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,103 +1,129 @@
|
|
|
1
1
|
# @ycodium-ai/plugin-devices
|
|
2
2
|
|
|
3
|
-
Lets agents
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for device support.
|
|
3
|
+
Lets agents list, open, screenshot and operate iOS Simulators and Android Emulators
|
|
4
|
+
on the connected Ycodium machine. The plugin is off by default. Turn it on under
|
|
5
|
+
Settings → Plugins, then open the Devices panel in a conversation.
|
|
7
6
|
|
|
8
7
|
## What it does
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
9
|
+
Device helpers are delivered with Ycodium at pinned versions, including their
|
|
10
|
+
dependencies. Listing or opening a device starts the helpers when needed; it does
|
|
11
|
+
not install npm packages or download a Node interpreter. The helpers run through
|
|
12
|
+
Ycodium's managed Node, rather than the `node` on the machine's PATH.
|
|
13
|
+
|
|
14
|
+
The device hub listens on loopback. Paired clients reach its declared routes through
|
|
15
|
+
Ycodium's plugin network proxy, including when the machine is remote. The device
|
|
16
|
+
panel is shared by web, desktop and the mobile plugin view.
|
|
17
|
+
|
|
18
|
+
Turning the plugin off stops its helper processes and any active component download
|
|
19
|
+
or Apple installation process. Prepared environments, downloaded archives and
|
|
20
|
+
virtual device data remain on disk. Simulators themselves belong to the user and
|
|
21
|
+
are not shut down as part of disabling the plugin.
|
|
22
|
+
|
|
23
|
+
On Windows, keeping an emulator running after its hub stops requires Ycodium's
|
|
24
|
+
shipped process launcher. The emulator breakaway shim depends on the device helper
|
|
25
|
+
finding `emulator.exe` through PATH. An absolute SDK executable path bypasses the
|
|
26
|
+
shim; the plugin logs unmatched launches because those emulators can stop with the
|
|
27
|
+
hub.
|
|
28
|
+
|
|
29
|
+
## Prepare a simulator
|
|
30
|
+
|
|
31
|
+
In the Devices panel, expand **Prepare simulator environment** and choose Android
|
|
32
|
+
or iOS. **Check prerequisites and storage** reads the machine's current setup,
|
|
33
|
+
download estimate, private storage location and free space. Enter an absolute
|
|
34
|
+
directory to use another disk on that machine. A remote machine's path is not a
|
|
35
|
+
path on the client computer.
|
|
36
|
+
|
|
37
|
+
For Android, the plugin detects and validates an existing SDK with runnable `adb`
|
|
38
|
+
and `emulator`. Existing virtual devices can be reused without installing
|
|
39
|
+
`avdmanager` or changing the SDK. Running an existing virtual device still writes
|
|
40
|
+
to that device's data. An incompatible running ADB server is reported without
|
|
41
|
+
stopping or restarting it.
|
|
42
|
+
|
|
43
|
+
If a private environment is needed, accept the Android SDK license and choose
|
|
44
|
+
**Download and prepare**. The plugin downloads fixed official Google archives for
|
|
45
|
+
Platform-Tools, Emulator and an Android 15 AOSP system image, checks their recorded
|
|
46
|
+
sizes and official checksums, and creates a private virtual device. SDK files,
|
|
47
|
+
Android preferences, emulator configuration, AVD data and controlled temporary files
|
|
48
|
+
use the selected private storage. Global environment variables and shell files are
|
|
49
|
+
not changed. The plugin does not install an application build toolchain or Java.
|
|
50
|
+
An explicitly configured SDK location in Settings takes precedence over the newly
|
|
51
|
+
prepared private environment.
|
|
52
|
+
|
|
53
|
+
Android preparation checks hardware virtualization before downloading. Windows
|
|
54
|
+
needs an enabled hypervisor, Linux needs accessible KVM, and macOS needs
|
|
55
|
+
Hypervisor.framework. Missing system support produces official setup guidance;
|
|
56
|
+
Ycodium does not elevate privileges, install drivers or enable Windows features.
|
|
57
|
+
The pinned emulator supports Windows x64, Linux x64 and macOS x64/arm64. Other
|
|
58
|
+
targets receive an unsupported-platform explanation.
|
|
59
|
+
|
|
60
|
+
The bundled iOS native helpers must load successfully on the machine. Missing or
|
|
61
|
+
incompatible helpers produce an explicit readiness error. For iOS, install and
|
|
62
|
+
initialize Xcode yourself using Apple's instructions. Ycodium
|
|
63
|
+
checks the selected full Xcode and first-launch status; it does not select,
|
|
64
|
+
initialize or upgrade Xcode. To add a simulator runtime, enter an exact iOS version
|
|
65
|
+
supported by that Xcode, read the storage estimate, accept the applicable agreement
|
|
66
|
+
and confirm installation into Apple's shared simulator environment. Ycodium uses
|
|
67
|
+
Apple's `xcodebuild -downloadPlatform` export and `-importPlatform` mechanism.
|
|
68
|
+
Download archives are private; installed runtimes are managed by Apple and shared
|
|
69
|
+
with other applications. Existing runtimes are retained. Apple determines the
|
|
70
|
+
actual download size and can require additional space or user action in Xcode.
|
|
71
|
+
|
|
72
|
+
Preparation continues if the panel closes. Open the panel again to read its current
|
|
73
|
+
progress. After completion, refresh the device list and open the simulator to check
|
|
74
|
+
its actual startup on the machine.
|
|
75
|
+
|
|
76
|
+
## Cleanup and retention
|
|
77
|
+
|
|
78
|
+
Disabling or removing the plugin preserves environments and data. The preparation
|
|
79
|
+
panel shows separate sizes and cleanup actions for private download cache and
|
|
80
|
+
Android virtual device data. Deleting a private virtual device requires a separate
|
|
81
|
+
confirmation because its installed apps and data are permanently removed. Power it
|
|
82
|
+
off first; cleanup refuses active device lock files. The SDK is retained so a
|
|
83
|
+
private device can be recreated without downloading the components again.
|
|
84
|
+
|
|
85
|
+
Cleanup never removes external SDKs, external virtual devices or Apple shared
|
|
86
|
+
simulator runtimes. Manage Apple's runtimes in Xcode. Each private directory has an
|
|
87
|
+
ownership record; the plugin refuses to claim a nonempty unrelated directory.
|
|
36
88
|
|
|
37
89
|
## Agent tools
|
|
38
90
|
|
|
39
|
-
|
|
91
|
+
`device_list`, `device_open`, `device_screenshot` and `device_close` are exposed
|
|
92
|
+
through the plugin toolkit. MCP prefixes them with `devices_`.
|
|
40
93
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- **device_screenshot** returns the current screen as a PNG image.
|
|
47
|
-
- **device_close** closes one device or every device in the conversation, and
|
|
48
|
-
can also power it off.
|
|
94
|
+
`device_open` returns a launcher path and `--config` / `--session` arguments pinned
|
|
95
|
+
to the chosen device and conversation. Use that command for tapping, typing,
|
|
96
|
+
installing existing APKs and reading logs. The launcher uses the same managed Node
|
|
97
|
+
and SDK environment as the hub. It rejects device operations without the returned
|
|
98
|
+
configuration and session arguments.
|
|
49
99
|
|
|
50
|
-
|
|
51
|
-
`agent-device` command line rather than more MCP tools. It carries its own
|
|
52
|
-
semantic snapshots and versions, and forwarding its dozens of tools would weigh
|
|
53
|
-
down every conversation's tool list.
|
|
100
|
+
## Settings and updates
|
|
54
101
|
|
|
55
|
-
|
|
102
|
+
**Android SDK location** overrides automatic detection. **Check tool versions**
|
|
103
|
+
reads the bundled and running helper versions. **Verify bundled tools** checks the
|
|
104
|
+
pinned components without downloading or starting anything. Missing or incomplete
|
|
105
|
+
helper artifacts require repairing or updating Ycodium on that machine.
|
|
56
106
|
|
|
57
|
-
|
|
58
|
-
Studio's default location.
|
|
59
|
-
- **Check tool versions** reads the installed and running versions without
|
|
60
|
-
installing or starting anything.
|
|
61
|
-
- **Install or update tools** installs the pinned versions. Running tools switch
|
|
62
|
-
over the next time they start.
|
|
107
|
+
## Requirements and verification limits
|
|
63
108
|
|
|
64
|
-
|
|
109
|
+
A Ycodium host supporting `host:node`, plugin network services and the plugin UI is
|
|
110
|
+
required. Preparing Android components needs outbound HTTPS to Google's official
|
|
111
|
+
download service. Preparing iOS runtimes requires macOS, initialized Xcode and
|
|
112
|
+
access to Apple's component service.
|
|
65
113
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
the failure with a Retry button, and the installed files stay as they were.
|
|
114
|
+
Private archive extraction, integrity failures, directory ownership, retention,
|
|
115
|
+
cleanup, ADB coexistence and Apple command selection have isolated automated
|
|
116
|
+
coverage. A successful component check does not prove a virtual device boots.
|
|
117
|
+
Actual Android startup, iOS installation/startup on macOS, screen streaming over
|
|
118
|
+
Relay and the mobile application require their respective machines and integration
|
|
119
|
+
checks.
|
|
73
120
|
|
|
74
|
-
|
|
75
|
-
version of each tool. **Check versions** only reads the install directory and
|
|
76
|
-
installs or starts nothing; **Update to …** appears when the required version is
|
|
77
|
-
missing and installs it without starting anything. After a tool starts, older
|
|
78
|
-
installs are removed, keeping the previous one and any install a running process
|
|
79
|
-
still uses.
|
|
121
|
+
## Developing
|
|
80
122
|
|
|
81
|
-
|
|
123
|
+
Run `vp run test`, `vp run typecheck` and `vp run build` from this package. Update the
|
|
124
|
+
runtime lock together with helper version pins and verify the hub route allowlist
|
|
125
|
+
when changing helper versions. Runtime artifacts retain dependency licenses and
|
|
126
|
+
include an inventory of delivered files.
|
|
82
127
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
service. The first install needs outbound HTTPS to `registry.npmjs.org`.
|
|
86
|
-
|
|
87
|
-
To move to another tool version, change `DEVICE_HUB_VERSION` or
|
|
88
|
-
`AGENT_DEVICE_VERSION` in `src/toolchain.ts` and check the `hub` route allowlist
|
|
89
|
-
in `package.json` against the new hub, since the allowlist and the screen
|
|
90
|
-
protocol are written for the pinned versions.
|
|
91
|
-
|
|
92
|
-
## Not yet verified on real hardware
|
|
93
|
-
|
|
94
|
-
The plugin is covered by unit tests with fake processes and a fake hub. The
|
|
95
|
-
following have not been run end to end yet: Android Emulators, iOS Simulators,
|
|
96
|
-
screen streaming over Relay, and the mobile app.
|
|
97
|
-
|
|
98
|
-
## Install
|
|
99
|
-
|
|
100
|
-
Bundled with Ycodium and off by default. Turn it on under Settings → Plugins.
|
|
101
|
-
|
|
102
|
-
Third-party license notices for `expo-device-hub` and `agent-device` are in the
|
|
103
|
-
repository's `THIRD_PARTY_NOTICES.md`.
|
|
128
|
+
Third-party notices are included in Ycodium's `THIRD_PARTY_NOTICES.md` and the
|
|
129
|
+
delivered dependency artifacts. This first-party package is `UNLICENSED`.
|