@melra/computer-runtime 0.3.0-alpha.3 → 0.3.0-alpha.5

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 (2) hide show
  1. package/README.md +40 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # @melra/computer-runtime
2
+
3
+ Screen and input control for [MELRA](https://github.com/XAGI-Lab/melra):
4
+ capabilities, screenshot, click, move, type, key, and scroll, driven through the
5
+ host's own automation tooling.
6
+
7
+ ```bash
8
+ npm install @melra/computer-runtime
9
+ ```
10
+
11
+ ```ts
12
+ import { ComputerOperationSchema } from "@melra/protocol";
13
+ import { ComputerRuntime } from "@melra/computer-runtime";
14
+
15
+ const computer = new ComputerRuntime({ artifactDirectory });
16
+ const report = await computer.execute(
17
+ ComputerOperationSchema.parse({ kind: "computer", action: "capabilities" }),
18
+ );
19
+ ```
20
+
21
+ Ask `capabilities` first. Desktop control depends on platform tooling and on
22
+ permissions the OS grants to the process — on macOS that means Accessibility and
23
+ Screen Recording — so the honest answer on many machines is that some actions are
24
+ unavailable. `capabilities` reports what this host can actually do instead of
25
+ letting a call fail halfway through a sequence; every other action is refused
26
+ with `computer_use_unavailable` when the host cannot support it.
27
+
28
+ Coordinates are validated against the reported screen bounds before an event is
29
+ synthesised, and typed text is escaped for the underlying tool rather than
30
+ concatenated into a script — `escapeSendKeys` is exported for that reason.
31
+
32
+ This is the widest-blast-radius capability in MELRA: it drives the same input
33
+ devices the human is using, and it is not confined to a workspace the way files
34
+ and terminals are. Screenshots capture whatever is on screen, including windows
35
+ belonging to other applications, so treat the artifacts as sensitive.
36
+
37
+ Requires Node.js 22 or newer. Full documentation:
38
+ [github.com/XAGI-Lab/melra](https://github.com/XAGI-Lab/melra)
39
+
40
+ Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melra/computer-runtime",
3
- "version": "0.3.0-alpha.3",
3
+ "version": "0.3.0-alpha.5",
4
4
  "description": "Policy-governed local computer-use runtime for MELRA.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "dist"
22
22
  ],
23
23
  "dependencies": {
24
- "@melra/protocol": "0.3.0-alpha.3"
24
+ "@melra/protocol": "0.3.0-alpha.5"
25
25
  },
26
26
  "scripts": {
27
27
  "build": "tsc -p tsconfig.json",