@agentorg/computer 0.0.23 → 0.0.24
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 +10 -2
- package/dist/agentcomputer.js +151 -56
- package/dist/types/generated/schema.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,14 +50,22 @@ This computer:
|
|
|
50
50
|
- `apps`: the running apps and their windows, and bringing one forward. Each window's `app_name`, `title`, `pid`, `window_id`, `z_index` (higher in front) and `bounds` are also given as fields. The bounds are in the screen's points, not the pixels `act` aims in: to aim at a window, see it and use its picture.
|
|
51
51
|
- On a machine the service only lends (`serve --lend`), the agent acts only in the background: `act` takes no `delivery_mode`, and `apps` takes no window to bring forward, which would take the person's front app and their typing. Where the driver's answer to `act` advises the foreground, the agent is told in plain words instead. What `see` and `apps` say of the screen is never rewritten.
|
|
52
52
|
- The driver's hints and suggested next calls, which can name its own tools, aren't passed on with any of the three.
|
|
53
|
-
- **The person installs Cua Driver once,** the signed app from cua.ai/download, and on macOS grants it Screen Recording and Accessibility once. AgentComputer never installs or ships it, nor its optional perception extension, which is AGPL. `info` says whether the screen is ready, at Cua Driver 0.49.7 or later, and if not, what to do; attaching with it is refused with 409 until then. `serve --screen-driver PATH` names the program; otherwise it is `cua-driver` on the path, in `~/.local/bin`, or inside `/Applications/CuaDriver.app`.
|
|
53
|
+
- **The person installs Cua Driver once,** the signed app from cua.ai/download, and on macOS grants it Screen Recording and Accessibility once. AgentComputer never installs or ships it, nor its optional perception extension, which is AGPL. `info` says whether the screen is ready, at Cua Driver 0.49.7 or later, and if not, what to do; attaching with it is refused with 409 until then. Once attached, a computer doesn't rest on its screen: brought back as the service starts, or started again, while the screen can't be used, because the person switched it off or it isn't ready, it runs with its terminal, files and browser. Its screen's tools stay listed and say why, in the switch's words or the screen's. While the screen isn't ready, its `screen` surface is `unavailable` with the same words, and reading it checks the screen again; the switch is for agents, and leaves the person's own live view alone. The next call after the screen can be used works, with no restart. Cua Driver is looked for again at each connection, so one installed meanwhile is reached. `serve --screen-driver PATH` names the program; otherwise it is `cua-driver` on the path, in `~/.local/bin`, or inside `/Applications/CuaDriver.app`.
|
|
54
54
|
- **An app can carry Cua Driver and host it,** as the driver's embedding guide describes, so that the grants are the app's.
|
|
55
55
|
- The app runs `cua-driver serve --embedded --socket PATH` itself. The service, started with `serve --screen-driver DRIVER --screen-socket PATH`, where DRIVER is the driver inside the app, reaches it there through `cua-driver mcp --embedded`.
|
|
56
56
|
- The grants are read from that driver, and listed under the outermost app the driver is inside.
|
|
57
57
|
- Asked for, they are asked for by the app: the service opens it through the system with `--args grant` and the grant to ask for, `screen-recording` or `accessibility`. The app's `grant` shows nothing of its own, no window and no Dock tile, since the switch opens it for Screen Recording's request, which shows nothing.
|
|
58
|
-
- Once a grant changes, the app restarts its driver, which reads grants once.
|
|
58
|
+
- Once a grant changes, the app restarts its driver, which reads grants once. A computer's connection to the driver ends with it, and its screen connects again at its next call: the computer runs on. The driver reads a point against the last picture its connection took, so after such a connection is made again, `act` aimed at a point is refused, saying so, until the screen is seen again.
|
|
59
59
|
- **What the service starts of Cua Driver sends no telemetry and checks for no updates,** so no update notice reaches a computer's log. The person's own Cua Driver app follows its own settings: `cua-driver telemetry disable` turns its telemetry off.
|
|
60
60
|
|
|
61
|
+
**Upgrading from 0.0.23:**
|
|
62
|
+
|
|
63
|
+
- **A computer with the screen no longer stops working because of its screen.**
|
|
64
|
+
- Brought back as the service starts while the screen can't be used (switched off, or not ready), it is `running`, where it was `failed`. `start` on a stopped one is answered `running`, where it was refused with 409 and the computer stayed `stopped`. Its terminal, files and browser work.
|
|
65
|
+
- Its screen's tools are listed and say why, in the switch's words or the screen's. While the screen isn't ready, its `screen` surface has `unavailable` with the same words; switched off, it hasn't, as before. The next call after the screen can be used works, with no restart.
|
|
66
|
+
- Cua Driver stopping while it runs, as when an app hosting it starts it again for a grant, no longer fails the computer: the next screen call connects again. The surface's "Cua Driver has stopped. Stop the computer and start it again." and the screen endpoint's 502 "Cua Driver has stopped." are gone. After such a connection, `act` aimed at a point is refused until the screen is seen again.
|
|
67
|
+
- A client that showed a failed computer for its screen reads the surface's `unavailable`, or the tools' refusals, instead. Attaching with the screen while it can't be used is still refused with 409.
|
|
68
|
+
|
|
61
69
|
**Upgrading from 0.0.22:**
|
|
62
70
|
|
|
63
71
|
- **Turning a part on shows nothing.** `PUT /v1/setup/{capability}` with `{ "on": true }` makes only the requests that show nothing: from macOS 26, Screen Recording's for an app hosting Cua Driver. Accessibility's alert, Cua Driver's own grant window and a browser's inspect page come from `POST /v1/setup/{capability}/ask` with that need, which a client calls from a button the person presses for it. Before macOS 26 Screen Recording waits for its button too; that is untested. `ask` with no need makes only what turning the part on makes.
|
package/dist/agentcomputer.js
CHANGED
|
@@ -98140,27 +98140,87 @@ var Driver = class {
|
|
|
98140
98140
|
return await this.#client.callTool({ name: tool, arguments: args });
|
|
98141
98141
|
}
|
|
98142
98142
|
};
|
|
98143
|
-
var Screen = class
|
|
98143
|
+
var Screen = class {
|
|
98144
|
+
/** Cua Driver as it is found at each connection. */
|
|
98145
|
+
#at;
|
|
98146
|
+
#log;
|
|
98144
98147
|
#noted;
|
|
98145
98148
|
#refused;
|
|
98149
|
+
/** The driver's connection, while there is one. */
|
|
98150
|
+
#driver;
|
|
98151
|
+
#stopped = false;
|
|
98152
|
+
/** How many connections it has made, and whether the screen was seen on the one there is. */
|
|
98153
|
+
#connections = 0;
|
|
98154
|
+
#seen = false;
|
|
98146
98155
|
/** On a lent machine: the agent acts only in the background, leaving the person's pointer. */
|
|
98147
98156
|
#onlyBackground;
|
|
98148
98157
|
/**
|
|
98149
98158
|
* `noted` gives the line to add to each answer: who else acted on the screen. `refused` says why
|
|
98150
|
-
* no call is answered now
|
|
98151
|
-
* agent acts only in the background, as on a lent machine.
|
|
98159
|
+
* no call is answered now: the person has it switched off, or it isn't ready. `onlyBackground`:
|
|
98160
|
+
* whether the agent acts only in the background, as on a lent machine.
|
|
98152
98161
|
*/
|
|
98153
|
-
constructor(driver, log,
|
|
98154
|
-
|
|
98162
|
+
constructor(driver, log, noted, refused2, onlyBackground) {
|
|
98163
|
+
this.#at = driver;
|
|
98164
|
+
this.#log = log;
|
|
98155
98165
|
this.#noted = noted;
|
|
98156
98166
|
this.#refused = refused2;
|
|
98157
98167
|
this.#onlyBackground = onlyBackground;
|
|
98158
98168
|
}
|
|
98169
|
+
/** The driver's connection: the one there is, or a new one, once it answers. */
|
|
98170
|
+
async #connected() {
|
|
98171
|
+
if (this.#stopped) throw new ApiError(409, "It has stopped.");
|
|
98172
|
+
if (!this.#driver) {
|
|
98173
|
+
const made = new Driver(this.#at(), this.#log, () => {
|
|
98174
|
+
if (this.#driver === made) this.#driver = void 0;
|
|
98175
|
+
});
|
|
98176
|
+
this.#driver = made;
|
|
98177
|
+
this.#connections += 1;
|
|
98178
|
+
this.#seen = false;
|
|
98179
|
+
}
|
|
98180
|
+
const driver = this.#driver;
|
|
98181
|
+
try {
|
|
98182
|
+
await driver.ready();
|
|
98183
|
+
} catch (error64) {
|
|
98184
|
+
if (this.#driver === driver) this.#driver = void 0;
|
|
98185
|
+
void driver.stop();
|
|
98186
|
+
throw error64;
|
|
98187
|
+
}
|
|
98188
|
+
return driver;
|
|
98189
|
+
}
|
|
98190
|
+
/** Connect now, and wait until the driver answers, or say why it didn't. */
|
|
98191
|
+
async ready() {
|
|
98192
|
+
await this.#connected();
|
|
98193
|
+
}
|
|
98194
|
+
async call(tool, args) {
|
|
98195
|
+
return (await this.#connected()).call(tool, args);
|
|
98196
|
+
}
|
|
98197
|
+
/**
|
|
98198
|
+
* Why a call aimed at a point is refused now: the driver reads a point against the last picture
|
|
98199
|
+
* its connection took, and a connection made again, as when the driver is started again for a
|
|
98200
|
+
* grant, has taken none. Seen again, it aims as it should.
|
|
98201
|
+
*/
|
|
98202
|
+
async #unseen(input3) {
|
|
98203
|
+
if (input3.element_token !== void 0 || input3.x === void 0) return void 0;
|
|
98204
|
+
await this.#connected();
|
|
98205
|
+
if (this.#connections === 1 || this.#seen) return void 0;
|
|
98206
|
+
return {
|
|
98207
|
+
content: [
|
|
98208
|
+
text3(
|
|
98209
|
+
"Cua Driver was started again since the screen was last seen, as when a grant changes: see it again, then aim at its point."
|
|
98210
|
+
)
|
|
98211
|
+
],
|
|
98212
|
+
isError: true
|
|
98213
|
+
};
|
|
98214
|
+
}
|
|
98215
|
+
async stop() {
|
|
98216
|
+
this.#stopped = true;
|
|
98217
|
+
await this.#driver?.stop();
|
|
98218
|
+
}
|
|
98159
98219
|
/** The agent's three tools, each answered with what the driver answers, and the line after it. */
|
|
98160
98220
|
#server() {
|
|
98161
98221
|
const server = new McpServer2({ name: "agentcomputer-screen", version: "1" });
|
|
98162
98222
|
const answered2 = async (work) => {
|
|
98163
|
-
const refusal = this.#refused();
|
|
98223
|
+
const refusal = await this.#refused();
|
|
98164
98224
|
if (refusal) return { content: [text3(refusal)], isError: true };
|
|
98165
98225
|
const line = this.#noted();
|
|
98166
98226
|
const answer = forAgent(await work().catch(failed));
|
|
@@ -98178,11 +98238,11 @@ var Screen = class extends Driver {
|
|
|
98178
98238
|
inputSchema: Seen
|
|
98179
98239
|
},
|
|
98180
98240
|
({ pid, window_id }) => answered2(async () => {
|
|
98181
|
-
if (pid === void 0
|
|
98182
|
-
return this.call("get_desktop_state", {});
|
|
98183
|
-
if (pid === void 0 || window_id === void 0)
|
|
98241
|
+
if (pid === void 0 !== (window_id === void 0))
|
|
98184
98242
|
throw new ApiError(400, "A window is its pid and its window_id, from apps: give both.");
|
|
98185
|
-
|
|
98243
|
+
const seen = await (pid === void 0 ? this.call("get_desktop_state", {}) : this.call("get_window_state", { pid, window_id }));
|
|
98244
|
+
if (!seen.isError) this.#seen = true;
|
|
98245
|
+
return seen;
|
|
98186
98246
|
})
|
|
98187
98247
|
);
|
|
98188
98248
|
server.registerTool(
|
|
@@ -98193,6 +98253,8 @@ var Screen = class extends Driver {
|
|
|
98193
98253
|
},
|
|
98194
98254
|
(input3) => answered2(async () => {
|
|
98195
98255
|
const [tool, args] = driverCall(input3);
|
|
98256
|
+
const unseen = await this.#unseen(input3);
|
|
98257
|
+
if (unseen) return unseen;
|
|
98196
98258
|
const answer = await this.call(tool, args).catch(failed);
|
|
98197
98259
|
const said2 = (answer.content ?? []).map((part) => part.text ?? "").join("\n");
|
|
98198
98260
|
if (this.#onlyBackground && /delivery_mode\W*foreground/i.test(said2))
|
|
@@ -98252,9 +98314,8 @@ var Screen = class extends Driver {
|
|
|
98252
98314
|
);
|
|
98253
98315
|
return server;
|
|
98254
98316
|
}
|
|
98255
|
-
/** Answer one MCP request, as the stateless transport does. */
|
|
98317
|
+
/** Answer one MCP request, as the stateless transport does. Its tools are listed with no driver. */
|
|
98256
98318
|
async handle(request2, response) {
|
|
98257
|
-
await this.ready();
|
|
98258
98319
|
const server = this.#server();
|
|
98259
98320
|
const transport = new NodeStreamableHTTPServerTransport2({ sessionIdGenerator: void 0 });
|
|
98260
98321
|
response.once("close", () => {
|
|
@@ -98313,6 +98374,7 @@ var said = (answer) => (answer.content ?? []).flatMap(
|
|
|
98313
98374
|
).join("\n") || "Cua Driver refused it.";
|
|
98314
98375
|
var ScreenLive = class {
|
|
98315
98376
|
/** Where Cua Driver is. */
|
|
98377
|
+
/** Cua Driver as it is found at each connection. */
|
|
98316
98378
|
#at;
|
|
98317
98379
|
#log;
|
|
98318
98380
|
/** Heard each time a person acts on the screen. */
|
|
@@ -98364,7 +98426,7 @@ var ScreenLive = class {
|
|
|
98364
98426
|
/** The driver, connected once for everyone watching, and the frames it is taken for. */
|
|
98365
98427
|
#begin() {
|
|
98366
98428
|
if (this.#started) return this.#started;
|
|
98367
|
-
const driver = new Driver(this.#at, this.#log, () => {
|
|
98429
|
+
const driver = new Driver(this.#at(), this.#log, () => {
|
|
98368
98430
|
if (this.#driver === driver) this.#leave(1011, "Cua Driver stopped.");
|
|
98369
98431
|
});
|
|
98370
98432
|
this.#driver = driver;
|
|
@@ -98591,6 +98653,35 @@ var ProcessRuntime = class {
|
|
|
98591
98653
|
const { at: _, ...ready } = this.#screen;
|
|
98592
98654
|
return ready;
|
|
98593
98655
|
}
|
|
98656
|
+
/**
|
|
98657
|
+
* Why an agent's screen call is refused now: the person switched it off, or the screen wasn't
|
|
98658
|
+
* ready at the last check. While it isn't, each call checks it afresh, so that a grant given is
|
|
98659
|
+
* used at the next call; while it is, calls aren't held up by checks.
|
|
98660
|
+
*/
|
|
98661
|
+
async #screenRefused() {
|
|
98662
|
+
const off = this.#switches?.refused("screen");
|
|
98663
|
+
if (off) return off;
|
|
98664
|
+
if (this.#screen.ready) return void 0;
|
|
98665
|
+
const { readiness: now } = await this.#checkScreen();
|
|
98666
|
+
return now.ready ? void 0 : now.reason ?? "The screen isn't ready.";
|
|
98667
|
+
}
|
|
98668
|
+
/**
|
|
98669
|
+
* Why the screen can't be opened live now: it isn't ready, as the last check says, which is
|
|
98670
|
+
* checked again meanwhile, for the next to read. The person's switch is for agents, and leaves
|
|
98671
|
+
* the person's own live view alone.
|
|
98672
|
+
*/
|
|
98673
|
+
#screenUnavailable() {
|
|
98674
|
+
if (this.#screen.ready) return void 0;
|
|
98675
|
+
void this.#checkScreen();
|
|
98676
|
+
return this.#screen.reason ?? "The screen isn't ready.";
|
|
98677
|
+
}
|
|
98678
|
+
/** Cua Driver as it is found now: where it was named or found, or where it was to be. */
|
|
98679
|
+
#driverNow() {
|
|
98680
|
+
return findDriver(this.#screenDriver) ?? {
|
|
98681
|
+
...this.#screenDriver,
|
|
98682
|
+
program: this.#screenDriver.program ?? "cua-driver"
|
|
98683
|
+
};
|
|
98684
|
+
}
|
|
98594
98685
|
/** Why the agent can't call this tool now: the person switched off what it reaches. */
|
|
98595
98686
|
#toolRefused(tool) {
|
|
98596
98687
|
const which = TOOL_SWITCH[tool];
|
|
@@ -98712,31 +98803,35 @@ var ProcessRuntime = class {
|
|
|
98712
98803
|
}
|
|
98713
98804
|
let screen;
|
|
98714
98805
|
let screenLive;
|
|
98715
|
-
let screenDown = false;
|
|
98716
98806
|
if (spec.screen) {
|
|
98717
98807
|
const { readiness: ready, driver } = await this.#checkScreen();
|
|
98718
|
-
const
|
|
98719
|
-
|
|
98720
|
-
|
|
98808
|
+
const why = this.#switches?.refused("screen") ?? (ready.ready && driver ? void 0 : ready.reason ?? "The screen isn't ready.");
|
|
98809
|
+
if (why && !spec.again) {
|
|
98810
|
+
await Promise.all([exec2?.close(), browser?.stop()]);
|
|
98811
|
+
throw new ApiError(409, why);
|
|
98812
|
+
}
|
|
98813
|
+
const at = () => this.#driverNow();
|
|
98814
|
+
screen = new Screen(
|
|
98815
|
+
at,
|
|
98721
98816
|
events.log,
|
|
98722
|
-
() => {
|
|
98723
|
-
screenDown = true;
|
|
98724
|
-
events.failed("Cua Driver stopped.");
|
|
98725
|
-
},
|
|
98726
98817
|
() => presence.agentCalled({ capability: "screen" }),
|
|
98727
|
-
() => this.#
|
|
98818
|
+
() => this.#screenRefused(),
|
|
98728
98819
|
// On a lent machine the agent acts only in the background.
|
|
98729
98820
|
this.#switches?.lends ?? false
|
|
98730
|
-
)
|
|
98731
|
-
|
|
98732
|
-
|
|
98733
|
-
|
|
98734
|
-
|
|
98735
|
-
|
|
98736
|
-
|
|
98737
|
-
|
|
98821
|
+
);
|
|
98822
|
+
if (why) events.log(`It started without its screen, which its tools say: ${why}`);
|
|
98823
|
+
else
|
|
98824
|
+
try {
|
|
98825
|
+
await screen.ready();
|
|
98826
|
+
} catch (error64) {
|
|
98827
|
+
if (!spec.again) {
|
|
98828
|
+
await Promise.all([exec2?.close(), browser?.stop(), screen.stop()]);
|
|
98829
|
+
throw error64;
|
|
98830
|
+
}
|
|
98831
|
+
events.log(`Its screen connects at its next call: ${error64.message}`);
|
|
98832
|
+
}
|
|
98738
98833
|
screenLive = new ScreenLive(
|
|
98739
|
-
|
|
98834
|
+
at,
|
|
98740
98835
|
(line) => events.log(`Live view: ${line}`),
|
|
98741
98836
|
() => presence.acted("person", { capability: "screen" })
|
|
98742
98837
|
);
|
|
@@ -98758,19 +98853,21 @@ var ProcessRuntime = class {
|
|
|
98758
98853
|
() => presence.acted("person", { capability: "files" })
|
|
98759
98854
|
);
|
|
98760
98855
|
const live = new Live(exec2, spec.access, load, presence, files, browserLive, screenLive);
|
|
98856
|
+
const unavailableNow = () => this.#screenUnavailable();
|
|
98761
98857
|
const surfaces = live.surfaces();
|
|
98762
98858
|
return {
|
|
98763
98859
|
browserTools: browser?.tools ?? [],
|
|
98764
|
-
/**
|
|
98860
|
+
/**
|
|
98861
|
+
* As they are now: a browser that has stopped can't be opened, and says so; nor can the
|
|
98862
|
+
* screen while it can't be used, as its tools say.
|
|
98863
|
+
*/
|
|
98765
98864
|
get surfaces() {
|
|
98865
|
+
const screenWhy = screen && unavailableNow();
|
|
98766
98866
|
return surfaces.map(
|
|
98767
98867
|
(one) => one.surface === "browser" && browserDown ? {
|
|
98768
98868
|
...one,
|
|
98769
98869
|
unavailable: "Its browser has stopped. Stop the computer and start it again."
|
|
98770
|
-
} : one.surface === "screen" &&
|
|
98771
|
-
...one,
|
|
98772
|
-
unavailable: "Cua Driver has stopped. Stop the computer and start it again."
|
|
98773
|
-
} : one
|
|
98870
|
+
} : one.surface === "screen" && screenWhy ? { ...one, unavailable: screenWhy } : one
|
|
98774
98871
|
);
|
|
98775
98872
|
},
|
|
98776
98873
|
acting: () => presence.acting(),
|
|
@@ -98788,10 +98885,7 @@ var ProcessRuntime = class {
|
|
|
98788
98885
|
if (refusal) return refuseCall(response, message.id, refusal);
|
|
98789
98886
|
return agentExec.handle(request2, response, message);
|
|
98790
98887
|
}
|
|
98791
|
-
if (endpoint === "screen")
|
|
98792
|
-
if (screenDown) throw new ApiError(502, "Cua Driver has stopped.");
|
|
98793
|
-
return screen.handle(request2, response);
|
|
98794
|
-
}
|
|
98888
|
+
if (endpoint === "screen") return screen.handle(request2, response);
|
|
98795
98889
|
if (browserDown) throw new ApiError(502, "Its browser has stopped.");
|
|
98796
98890
|
return browser.handle(request2, response);
|
|
98797
98891
|
},
|
|
@@ -98805,7 +98899,7 @@ var ProcessRuntime = class {
|
|
|
98805
98899
|
};
|
|
98806
98900
|
|
|
98807
98901
|
// src/handlers.ts
|
|
98808
|
-
var VERSION2 = "0.0.
|
|
98902
|
+
var VERSION2 = "0.0.24";
|
|
98809
98903
|
function createHandlers(computers, connections, setup) {
|
|
98810
98904
|
return {
|
|
98811
98905
|
getInfo: async () => ({ version: VERSION2, ...await computers.offers() }),
|
|
@@ -100264,7 +100358,7 @@ var Computers = class {
|
|
|
100264
100358
|
return;
|
|
100265
100359
|
}
|
|
100266
100360
|
const live = {};
|
|
100267
|
-
await this.#start(stored, live).catch((error64) => {
|
|
100361
|
+
await this.#start(stored, live, true).catch((error64) => {
|
|
100268
100362
|
const why = `It didn't start again: ${messageOf2(error64)}`;
|
|
100269
100363
|
this.#log(stored.id, why);
|
|
100270
100364
|
if (this.#live.get(stored.id) !== live) return;
|
|
@@ -100437,7 +100531,7 @@ var Computers = class {
|
|
|
100437
100531
|
stored.state = "running";
|
|
100438
100532
|
const live = {};
|
|
100439
100533
|
try {
|
|
100440
|
-
await this.#start(stored, live);
|
|
100534
|
+
await this.#start(stored, live, true);
|
|
100441
100535
|
} catch (error64) {
|
|
100442
100536
|
if (this.#live.get(id) === live) {
|
|
100443
100537
|
await this.#halt(id);
|
|
@@ -100597,7 +100691,7 @@ var Computers = class {
|
|
|
100597
100691
|
* Start it, as `live`. Stopped, killed or started again while it waits, it is refused, and what
|
|
100598
100692
|
* came up meanwhile is stopped: nothing is left that no call reaches.
|
|
100599
100693
|
*/
|
|
100600
|
-
async #start(stored, live) {
|
|
100694
|
+
async #start(stored, live, again = false) {
|
|
100601
100695
|
this.#live.set(stored.id, live);
|
|
100602
100696
|
const stopped = () => this.#live.get(stored.id) !== live;
|
|
100603
100697
|
const STOPPED = "It was stopped while it was starting.";
|
|
@@ -100617,6 +100711,7 @@ var Computers = class {
|
|
|
100617
100711
|
access: stored.access,
|
|
100618
100712
|
browser: stored.browser,
|
|
100619
100713
|
screen: stored.screen === true,
|
|
100714
|
+
again,
|
|
100620
100715
|
workspace: stored.workspace
|
|
100621
100716
|
},
|
|
100622
100717
|
this.#folder(stored.id),
|
|
@@ -100736,7 +100831,7 @@ var OPENAPI = {
|
|
|
100736
100831
|
"openapi": "3.1.0",
|
|
100737
100832
|
"info": {
|
|
100738
100833
|
"title": "AgentComputer",
|
|
100739
|
-
"version": "0.0.
|
|
100834
|
+
"version": "0.0.24",
|
|
100740
100835
|
"description": "Computers for agents. This file is the source of truth: the HTTP API, the MCP control tools and the SDK are all generated from it. An operation with `x-mcp-tool` is also an MCP tool of that name.",
|
|
100741
100836
|
"license": {
|
|
100742
100837
|
"name": "Apache-2.0",
|
|
@@ -101495,7 +101590,7 @@ var OPENAPI = {
|
|
|
101495
101590
|
"stopped",
|
|
101496
101591
|
"failed"
|
|
101497
101592
|
],
|
|
101498
|
-
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again."
|
|
101593
|
+
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again. The screen fails none: a computer with the screen, brought back or started again while the screen can't be used, is running. Its screen's tools say why, in the switch's words or the screen's, and while the screen isn't ready its `screen` surface is `unavailable` with the same words; the next call after the screen can be used works, with no restart. Cua Driver stopping, as when an app hosting it starts it again for a grant, ends only the connection, which the next call makes again."
|
|
101499
101594
|
},
|
|
101500
101595
|
"Progress": {
|
|
101501
101596
|
"type": "object",
|
|
@@ -101617,7 +101712,7 @@ var OPENAPI = {
|
|
|
101617
101712
|
"screen": {
|
|
101618
101713
|
"type": "boolean",
|
|
101619
101714
|
"default": false,
|
|
101620
|
-
"description": "Whether its agent has the machine's screen: to see it and act on it, through Cua Driver, which the person installs and grants Screen Recording and Accessibility once. It acts as the person, whatever `access` says. Refused with 409 where `info` says the screen isn't ready."
|
|
101715
|
+
"description": "Whether its agent has the machine's screen: to see it and act on it, through Cua Driver, which the person installs and grants Screen Recording and Accessibility once. It acts as the person, whatever `access` says. Refused with 409 where `info` says the screen isn't ready. Once attached, the computer doesn't rest on it: brought back or started again while the screen can't be used, it runs, and its screen's tools say why."
|
|
101621
101716
|
},
|
|
101622
101717
|
"workspace": {
|
|
101623
101718
|
"type": "string",
|
|
@@ -104285,7 +104380,7 @@ var OPERATIONS = [
|
|
|
104285
104380
|
"stopped",
|
|
104286
104381
|
"failed"
|
|
104287
104382
|
],
|
|
104288
|
-
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again."
|
|
104383
|
+
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again. The screen fails none: a computer with the screen, brought back or started again while the screen can't be used, is running. Its screen's tools say why, in the switch's words or the screen's, and while the screen isn't ready its `screen` surface is `unavailable` with the same words; the next call after the screen can be used works, with no restart. Cua Driver stopping, as when an app hosting it starts it again for a grant, ends only the connection, which the next call makes again."
|
|
104289
104384
|
}
|
|
104290
104385
|
},
|
|
104291
104386
|
"required": []
|
|
@@ -104327,7 +104422,7 @@ var OPERATIONS = [
|
|
|
104327
104422
|
"stopped",
|
|
104328
104423
|
"failed"
|
|
104329
104424
|
],
|
|
104330
|
-
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again."
|
|
104425
|
+
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again. The screen fails none: a computer with the screen, brought back or started again while the screen can't be used, is running. Its screen's tools say why, in the switch's words or the screen's, and while the screen isn't ready its `screen` surface is `unavailable` with the same words; the next call after the screen can be used works, with no restart. Cua Driver stopping, as when an app hosting it starts it again for a grant, ends only the connection, which the next call makes again."
|
|
104331
104426
|
},
|
|
104332
104427
|
"reason": {
|
|
104333
104428
|
"type": [
|
|
@@ -104594,7 +104689,7 @@ var OPERATIONS = [
|
|
|
104594
104689
|
"stopped",
|
|
104595
104690
|
"failed"
|
|
104596
104691
|
],
|
|
104597
|
-
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again."
|
|
104692
|
+
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again. The screen fails none: a computer with the screen, brought back or started again while the screen can't be used, is running. Its screen's tools say why, in the switch's words or the screen's, and while the screen isn't ready its `screen` surface is `unavailable` with the same words; the next call after the screen can be used works, with no restart. Cua Driver stopping, as when an app hosting it starts it again for a grant, ends only the connection, which the next call makes again."
|
|
104598
104693
|
},
|
|
104599
104694
|
"reason": {
|
|
104600
104695
|
"type": [
|
|
@@ -104811,7 +104906,7 @@ var OPERATIONS = [
|
|
|
104811
104906
|
"screen": {
|
|
104812
104907
|
"type": "boolean",
|
|
104813
104908
|
"default": false,
|
|
104814
|
-
"description": "Whether its agent has the machine's screen: to see it and act on it, through Cua Driver, which the person installs and grants Screen Recording and Accessibility once. It acts as the person, whatever `access` says. Refused with 409 where `info` says the screen isn't ready."
|
|
104909
|
+
"description": "Whether its agent has the machine's screen: to see it and act on it, through Cua Driver, which the person installs and grants Screen Recording and Accessibility once. It acts as the person, whatever `access` says. Refused with 409 where `info` says the screen isn't ready. Once attached, the computer doesn't rest on it: brought back or started again while the screen can't be used, it runs, and its screen's tools say why."
|
|
104815
104910
|
},
|
|
104816
104911
|
"workspace": {
|
|
104817
104912
|
"type": "string",
|
|
@@ -104875,7 +104970,7 @@ var OPERATIONS = [
|
|
|
104875
104970
|
"stopped",
|
|
104876
104971
|
"failed"
|
|
104877
104972
|
],
|
|
104878
|
-
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again."
|
|
104973
|
+
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again. The screen fails none: a computer with the screen, brought back or started again while the screen can't be used, is running. Its screen's tools say why, in the switch's words or the screen's, and while the screen isn't ready its `screen` surface is `unavailable` with the same words; the next call after the screen can be used works, with no restart. Cua Driver stopping, as when an app hosting it starts it again for a grant, ends only the connection, which the next call makes again."
|
|
104879
104974
|
},
|
|
104880
104975
|
"reason": {
|
|
104881
104976
|
"type": [
|
|
@@ -105110,7 +105205,7 @@ var OPERATIONS = [
|
|
|
105110
105205
|
"stopped",
|
|
105111
105206
|
"failed"
|
|
105112
105207
|
],
|
|
105113
|
-
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again."
|
|
105208
|
+
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again. The screen fails none: a computer with the screen, brought back or started again while the screen can't be used, is running. Its screen's tools say why, in the switch's words or the screen's, and while the screen isn't ready its `screen` surface is `unavailable` with the same words; the next call after the screen can be used works, with no restart. Cua Driver stopping, as when an app hosting it starts it again for a grant, ends only the connection, which the next call makes again."
|
|
105114
105209
|
},
|
|
105115
105210
|
"reason": {
|
|
105116
105211
|
"type": [
|
|
@@ -105445,7 +105540,7 @@ var OPERATIONS = [
|
|
|
105445
105540
|
"stopped",
|
|
105446
105541
|
"failed"
|
|
105447
105542
|
],
|
|
105448
|
-
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again."
|
|
105543
|
+
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again. The screen fails none: a computer with the screen, brought back or started again while the screen can't be used, is running. Its screen's tools say why, in the switch's words or the screen's, and while the screen isn't ready its `screen` surface is `unavailable` with the same words; the next call after the screen can be used works, with no restart. Cua Driver stopping, as when an app hosting it starts it again for a grant, ends only the connection, which the next call makes again."
|
|
105449
105544
|
},
|
|
105450
105545
|
"reason": {
|
|
105451
105546
|
"type": [
|
|
@@ -105664,7 +105759,7 @@ var OPERATIONS = [
|
|
|
105664
105759
|
"stopped",
|
|
105665
105760
|
"failed"
|
|
105666
105761
|
],
|
|
105667
|
-
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again."
|
|
105762
|
+
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again. The screen fails none: a computer with the screen, brought back or started again while the screen can't be used, is running. Its screen's tools say why, in the switch's words or the screen's, and while the screen isn't ready its `screen` surface is `unavailable` with the same words; the next call after the screen can be used works, with no restart. Cua Driver stopping, as when an app hosting it starts it again for a grant, ends only the connection, which the next call makes again."
|
|
105668
105763
|
},
|
|
105669
105764
|
"reason": {
|
|
105670
105765
|
"type": [
|
|
@@ -105888,7 +105983,7 @@ var OPERATIONS = [
|
|
|
105888
105983
|
"stopped",
|
|
105889
105984
|
"failed"
|
|
105890
105985
|
],
|
|
105891
|
-
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again."
|
|
105986
|
+
"description": "starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again. The screen fails none: a computer with the screen, brought back or started again while the screen can't be used, is running. Its screen's tools say why, in the switch's words or the screen's, and while the screen isn't ready its `screen` surface is `unavailable` with the same words; the next call after the screen can be used works, with no restart. Cua Driver stopping, as when an app hosting it starts it again for a grant, ends only the connection, which the next call makes again."
|
|
105892
105987
|
},
|
|
105893
105988
|
"reason": {
|
|
105894
105989
|
"type": [
|
|
@@ -315,7 +315,7 @@ export interface components {
|
|
|
315
315
|
*/
|
|
316
316
|
Access: "none" | "read" | "files" | "terminal";
|
|
317
317
|
/**
|
|
318
|
-
* @description starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again.
|
|
318
|
+
* @description starting: it is being made, started, or brought back as the service starts. Its `reason` says what it waits on, and its `progress` how far that has come, where it counts. Its endpoints and live sessions are refused with 409 and that `reason` until it is running. `create` and `start` answer once it is running, and it is listed meanwhile; `start` on one already starting answers at once. failed: it was to be running and isn't, because its browser or container ended by itself, or because it couldn't be brought back when the service started. Its `reason` says why, and its logs say more. Stop it and start it again. The screen fails none: a computer with the screen, brought back or started again while the screen can't be used, is running. Its screen's tools say why, in the switch's words or the screen's, and while the screen isn't ready its `screen` surface is `unavailable` with the same words; the next call after the screen can be used works, with no restart. Cua Driver stopping, as when an app hosting it starts it again for a grant, ends only the connection, which the next call makes again.
|
|
319
319
|
* @enum {string}
|
|
320
320
|
*/
|
|
321
321
|
ComputerState: "starting" | "running" | "stopped" | "failed";
|
|
@@ -365,7 +365,7 @@ export interface components {
|
|
|
365
365
|
*/
|
|
366
366
|
browser: boolean | "own";
|
|
367
367
|
/**
|
|
368
|
-
* @description Whether its agent has the machine's screen: to see it and act on it, through Cua Driver, which the person installs and grants Screen Recording and Accessibility once. It acts as the person, whatever `access` says. Refused with 409 where `info` says the screen isn't ready.
|
|
368
|
+
* @description Whether its agent has the machine's screen: to see it and act on it, through Cua Driver, which the person installs and grants Screen Recording and Accessibility once. It acts as the person, whatever `access` says. Refused with 409 where `info` says the screen isn't ready. Once attached, the computer doesn't rest on it: brought back or started again while the screen can't be used, it runs, and its screen's tools say why.
|
|
369
369
|
* @default false
|
|
370
370
|
*/
|
|
371
371
|
screen: boolean;
|