@ycodium-ai/plugin-browser-workbench 0.2.2098

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 ADDED
@@ -0,0 +1,99 @@
1
+ # @ycodium-ai/plugin-browser-workbench
2
+
3
+ Install the official VS Code CLI on this Ycodium machine and open it in a system
4
+ browser. The CLI runs as `serve-web` on loopback; Ycodium registers that port so
5
+ the desktop app can forward it. You can also point the plugin at a code-server
6
+ you already run.
7
+
8
+ ## What it does
9
+
10
+ The first time you open the workbench, the plugin:
11
+
12
+ 1. Asks you to confirm the VS Code Server license terms.
13
+ 2. Downloads the official `code` CLI if it is not already in the plugin data
14
+ directory.
15
+ 3. Starts `code serve-web` on `127.0.0.1` with a random port.
16
+ 4. Waits until the VS Code server payload has finished downloading (the CLI
17
+ does that lazily on the first HTTP request).
18
+ 5. Registers the port with Ycodium.
19
+
20
+ After that, the process stays up until you stop it, disable the plugin, or
21
+ shut down the server. A later **Open** reuses the running instance. Progress
22
+ for install and start is a stream named `progress`.
23
+
24
+ If you already run code-server yourself, set its loopback port on the settings
25
+ card or call **attach**. The plugin does not start, stop, or authenticate that
26
+ process. Opening then returns the registered port without a VS Code connection
27
+ token.
28
+
29
+ ## Requirements
30
+
31
+ A Ycodium server with plugin API version 2, including `process.spawn` for
32
+ `data:bin/code` (at most two processes at once) and `ports.register`. The
33
+ machine needs outbound HTTPS to `update.code.visualstudio.com` (and the CDN it
34
+ redirects to) the first time the CLI is installed, unless you attach an
35
+ external code-server instead.
36
+
37
+ Supported CLI download platforms: Linux x64/arm64, macOS x64/arm64, Windows
38
+ x64. Other combinations fail with a download error rather than guessing.
39
+
40
+ ## Install
41
+
42
+ ```
43
+ ycodium plugin add @ycodium-ai/plugin-browser-workbench
44
+ ```
45
+
46
+ The plugin ships enabled with Ycodium as `core.browser-workbench`. Disabling it
47
+ stops the managed `serve-web` process and unregisters its port. The downloaded
48
+ CLI, server data, and license acceptance stay in the plugin data directory.
49
+ Uninstalling writes a removal onto the home patch so a restart or upgrade does
50
+ not bring the plugin back; it still does not delete that data directory.
51
+ Reinstalling the unversioned bundled package restores the same entry without
52
+ an npm fetch.
53
+
54
+ ## Read this before installing
55
+
56
+ `serve-web` is a full VS Code on this machine: terminal, extensions, and file
57
+ access run as the same OS user as the Ycodium server. Opening it from the
58
+ desktop is equivalent in power to using the machine's terminal.
59
+
60
+ The connection token lives in the plugin data directory with mode `0600`. Logs
61
+ and progress events do not include it. The desktop listens only on
62
+ `127.0.0.1`; other processes on the same computer can still connect to that
63
+ local port, the same way an SSH local forward would.
64
+
65
+ One machine has one managed instance. Two people using the same machine share
66
+ settings and extensions.
67
+
68
+ Disable and uninstall do **not** stop a code-server you attached. That process
69
+ is yours.
70
+
71
+ ## Upgrading
72
+
73
+ ```
74
+ ycodium plugin add @ycodium-ai/plugin-browser-workbench@<version>
75
+ ```
76
+
77
+ Installing a newer plugin version replaces the running one without restarting
78
+ the server. Updating the VS Code CLI is a separate **update** command and
79
+ requires the workbench to be stopped first.
80
+
81
+ ## Developing
82
+
83
+ ```
84
+ vp run --filter @ycodium-ai/plugin-browser-workbench build
85
+ vp run --filter @ycodium-ai/plugin-browser-workbench test
86
+ ```
87
+
88
+ The package builds its own code into `dist/index.js`. The host supplies the
89
+ shared `@ycodium-ai/plugin-api` at runtime. The plugin requires plugin API
90
+ version 2. Language catalogs live in `locales/`; only English is authored here.
91
+
92
+ Known limits: Windows uses `bin/code` (the spawn whitelist), not `code.exe`.
93
+ Server download progress is the size of `cli-data/serve-web/` because the CLI
94
+ does not report bytes. The host does not auto-start the workbench after a
95
+ server restart.
96
+
97
+ ## License
98
+
99
+ UNLICENSED.