@agentorg/computer 0.0.3 → 0.0.4
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 +11 -0
- package/dist/THIRD_PARTY_LICENSES.txt +26 -1
- package/dist/agentcomputer.js +4586 -114
- package/dist/sdk.js +74 -2
- package/dist/types/generated/schema.d.ts +125 -0
- package/dist/types/sdk.d.ts +61 -1
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -130,6 +130,17 @@ docker run -d --name agentcomputer --network host \
|
|
|
130
130
|
- `--network host` is how it reaches each computer's port on the machine's loopback, so this needs Linux.
|
|
131
131
|
- The socket gives it full control of that machine's Docker. Whoever holds the control token can make computers, but not reach the socket.
|
|
132
132
|
|
|
133
|
+
## Live sessions
|
|
134
|
+
|
|
135
|
+
A computer at `--access terminal` has two surfaces you can open live, as a WebSocket:
|
|
136
|
+
|
|
137
|
+
- **`commands`** (protocol `commands@1`): each of the agent's commands as it runs, read-only. Each message is one JSON event: `start` (with `cmd` and `workdir`), `output` (with `stream` and `text`) or `exit` (with `exitCode`). Each carries the command's `id`, which is the `session_id` the agent sees. Those already heard come first.
|
|
138
|
+
- **`terminal`** (protocol `pty@1`): a shell of your own in its workspace, as its user, beside the agent's commands rather than in them. Every socket on it shares one shell, and a new one is sent what it wrote before. Each binary message is one byte of type, then its payload: `0` is output from the shell, or input to it; `1` is a resize, `{"columns":100,"rows":30}`. In `watch` mode what you send is dropped.
|
|
139
|
+
|
|
140
|
+
`POST /v1/computers/{computerID}/live` with `{ "surface": "terminal", "mode": "operate" }` gives a ticket: a `url` to open once within a minute, which needs no token. A request with an `Origin` header is refused unless `serve --allow-origin` names that origin, so a page can't open one. The SDK does the same with `computer.pty.connect({ onData })` and `computer.commands.watch(onEvent)`, and the CLI with `agentcomputer live <id> --surface terminal --mode operate`.
|
|
141
|
+
|
|
142
|
+
The terminal needs [node-pty](https://github.com/microsoft/node-pty), an optional dependency installed beside the program. It comes prebuilt for macOS. On Linux it's compiled at install, which npm only does when told: `npm install -g @agentorg/computer --allow-scripts=node-pty`, with a C++ toolchain. Without it, the computer's `surfaces` say why the terminal isn't there. The computer image has it.
|
|
143
|
+
|
|
133
144
|
## Known limits
|
|
134
145
|
|
|
135
146
|
- With no isolation, each browser's Playwright MCP listens on a loopback port with no token of its own, so another user on the same machine could reach it directly. Don't run that on a machine you share.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@agentorg/exec 0.0.
|
|
1
|
+
@agentorg/exec 0.0.3 (Apache-2.0)
|
|
2
2
|
|
|
3
3
|
Apache License
|
|
4
4
|
Version 2.0, January 2004
|
|
@@ -1271,6 +1271,31 @@ SOFTWARE.
|
|
|
1271
1271
|
|
|
1272
1272
|
========================================================================
|
|
1273
1273
|
|
|
1274
|
+
ws 8.22.2 (MIT)
|
|
1275
|
+
|
|
1276
|
+
Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
|
|
1277
|
+
Copyright (c) 2013 Arnout Kazemier and contributors
|
|
1278
|
+
Copyright (c) 2016 Luigi Pinca and contributors
|
|
1279
|
+
|
|
1280
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
1281
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
1282
|
+
the Software without restriction, including without limitation the rights to
|
|
1283
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
1284
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
1285
|
+
subject to the following conditions:
|
|
1286
|
+
|
|
1287
|
+
The above copyright notice and this permission notice shall be included in all
|
|
1288
|
+
copies or substantial portions of the Software.
|
|
1289
|
+
|
|
1290
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1291
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
1292
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
1293
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
1294
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
1295
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1296
|
+
|
|
1297
|
+
========================================================================
|
|
1298
|
+
|
|
1274
1299
|
zod 4.6.7 (MIT)
|
|
1275
1300
|
|
|
1276
1301
|
MIT License
|