@agentorg/computer 0.0.20 → 0.0.22

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 CHANGED
@@ -26,7 +26,7 @@ That gives an agent this computer instead: the machine the service runs on, whol
26
26
  Each computer is this computer, attached with `attach`, or one made in a container of its own with `create`. A service started with `serve --lend` only lends this computer: it makes nothing, `info.made` is empty, and `create` is refused with 409. It listens only on loopback, as this computer is offered only there, and a container it finds in its data folder from before can't be started or removed until a service without `--lend` has the folder. A container needs Docker on the service's machine. The service follows your `DOCKER_HOST` or current context and never changes them, and comes up without Docker.
27
27
 
28
28
  - **`info` says what the service offers**, each part ready or not and why, in a line a person reads:
29
- - `thisComputer`: its capabilities (`about`, `terminal`, `files` and `screen`) and the browsers that can go with it. The screen is ready where Cua Driver is installed and granted.
29
+ - `thisComputer`: its capabilities (`about`, `terminal`, `files` and `screen`) and the browsers that can go with it. The screen is ready where Cua Driver is installed and granted. A reading more than 10 seconds old is checked again before `info` answers, waited for up to a second, while the rest is read; a check that takes longer is answered the next time. One the person switched off isn't checked.
30
30
  - `made`, each kind it makes: today a container, ready while Docker answers, with its capabilities and browsers.
31
31
  - **A container is refused with 409 where Docker doesn't answer:** `A container needs Docker, which isn't answering on this machine.` One already made isn't started there, and isn't killed there either, since its container couldn't be removed: both are refused with the same words, and it is kept.
32
32
  - **A computer with no isolation is no longer made.** `create --isolation none` is refused with 400, and `attach` is what does that now.
@@ -36,6 +36,7 @@ This computer:
36
36
 
37
37
  - **It is offered only by a service that no other machine reaches:** one that listens on loopback, with no `--tls-proxy` and no `--public-url`. A service that other machines can reach is a server, and doesn't offer its own machine. There `info` says why, attaching is refused with 409 in the same words, and a computer attached before is refused at start.
38
38
  - **`--workspace`, which `attach` needs, is its work folder.** Commands and relative paths start there, and `about` names it. But its files reach the whole machine, as whoever started the service, and so do its commands at `--access terminal`.
39
+ - **Its commands, and a shell a person opens, get the environment the service was started with,** less every `AGENTCOMPUTER_` variable. That is no wall either: commands run in a login shell, so what the person's profile exports comes back, and with the terminal on an agent can read any of the person's processes' environment, the service's among them, with `ps -E`. So start the service from a shell holding nothing an agent shouldn't read.
39
40
  - **`kill` detaches it.** What the service kept for it goes, and nothing of the machine's.
40
41
  - **Its browser,** with `--browser`, is a headless one with a profile of its own. It runs the Chrome installed on the machine, or what `serve --browser-name` or `--browser-path` names. `info` says whether that program is there.
41
42
  - **Or the person's own browser,** with `--own-browser` (`browser: "own"`): their Chrome or Edge, whichever has remote debugging on, Chrome where both do, as they use it, signed in. Its agent works in it with the same tools, and the person watches it in the same live view.
@@ -55,7 +56,16 @@ This computer:
55
56
  - The grants are read from that driver, and listed under the outermost app the driver is inside.
56
57
  - Asked for, they are asked for by the app: the service opens it through the system with `--args grant` and each grant to ask for, `screen-recording` or `accessibility`, which it asks for in turn.
57
58
  - Once a grant changes, the app restarts its driver, which reads grants once. That ends the connections of computers using the screen, which then say Cua Driver has stopped.
58
- - **What the service starts of Cua Driver sends no telemetry.** The person's own Cua Driver app follows its own setting, which `cua-driver telemetry disable` turns off.
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
+
61
+ **Upgrading from 0.0.21:**
62
+
63
+ - **An agent's command keeps it acting on its terminal until the command ends,** and 10 seconds after, in `presence` and `GET /v1/acting`, where it was counted for 10 seconds from the command's start. One left running keeps it there, and its `at` can be older than 10 seconds: take the list as it is sent, and drop no one by their `at`.
64
+ - **Asking for a screen grant opens no pane of System Settings.** `POST /v1/setup/screen/ask` makes the request alone. A client that relied on the pane opening calls `POST /v1/setup/screen/settings` with the grant, on the person's own choice, such as a button they press.
65
+
66
+ **Upgrading from 0.0.20:**
67
+
68
+ - **Commands on this computer no longer get the service's own `AGENTCOMPUTER_` variables,** such as `AGENTCOMPUTER_API_KEY` where the shell that started the service held it. A command that read one should be given what it needs another way.
59
69
 
60
70
  **Upgrading from 0.0.19:**
61
71
 
@@ -182,6 +192,7 @@ The data folder is `--data`, else `$AGENTCOMPUTER_DATA`, else `$XDG_DATA_HOME/ag
182
192
  | `GET /v1/setup` | |
183
193
  | `PUT /v1/setup/{capability}` | |
184
194
  | `POST /v1/setup/{capability}/ask` | |
195
+ | `POST /v1/setup/{capability}/settings` | |
185
196
 
186
197
  These take the control token, kept in the data folder. A computer's own endpoints take its `accessToken`, and neither token works for the other:
187
198
 
@@ -196,6 +207,7 @@ These take the control token, kept in the data folder. A computer's own endpoint
196
207
  - **The person's switches.** Each part of this computer an agent can use (`terminal`, `files`, `screen`, and `browser`, the person's own) has the person's own switch.
197
208
  - Off, agents' new calls to that part refuse with "The person turned off the screen for agents on this Mac" (or "this machine" off macOS), `info` says the same, and attaching with the screen or the person's browser is refused with 409. What an agent already started, such as a command, runs on.
198
209
  - The terminal and the screen each reach the whole machine: with the terminal on, commands read and change any file, whatever the files' switch; with the screen on, the agent acts in any app.
210
+ - So the switches tell an agent what it may use; they don't stop it. With the terminal, the files or the screen on, an agent acts as the person and can read the service's control token in its data folder, like any file of theirs; with the terminal or the screen, it can use it to set the other switches.
199
211
  - Any browser's calls that reach the machine answer to its switches too: `browser_run_code_unsafe` to the terminal's, and a call that names files, by `paths` or `filename`, to the files'.
200
212
  - The computer's own endpoint on this machine reads each call whole and checks it as it arrives, so it takes one JSON-RPC request in each POST, as the browser's does, and refuses a batch.
201
213
  - A service started with `--lend` starts with every switch off, for the person to turn on. Any other starts with every one on. They are kept in the data folder, so they last across a restart. A switches file that can't be read leaves every one off.
@@ -205,10 +217,11 @@ These take the control token, kept in the data folder. A computer's own endpoint
205
217
  - The screen needs Cua Driver, and on macOS its `screen-recording` and `accessibility` grants, each `granted`, `not-granted` or `unknown`; it is ready once both are granted. While Cua Driver isn't installed, the one item is `{ "need": "install", "state": "missing" }`. `holder` names whom System Settings lists the grants under: the outermost app Cua Driver is inside, CuaDriver for its own app, or an app that carries the driver.
206
218
  - The browser lists Chrome, then Edge, each `on` (open, with remote debugging on), `off`, or `missing` (not installed); a service given one browser's folder, with `--own-browser-data`, lists just that one as `named`. It is ready with one on. With both on, the agent's is Chrome.
207
219
  - **`POST /v1/setup/{capability}/ask`**, with `{ "need": "..." }` or no body, asks the person, on the service's machine, macOS only, for one thing the part needs, or for everything it is missing. It answers once the steps have started, with each part then:
208
- - `screen-recording` or `accessibility`, while it is missing: Cua Driver's own grant, its app started first, through the system, so the Mac names that app. Cua Driver asks in its own order, Accessibility first. For a driver an app hosts, the app asks, for that grant alone. Then, missing or not, that grant's own pane in System Settings opens.
220
+ - `screen-recording` or `accessibility`, while it is missing: Cua Driver's own grant, its app started first, through the system, so the Mac names that app. Cua Driver asks in its own order, Accessibility first. For a driver an app hosts, the app asks, for that grant alone, in its own way. The service opens no pane of System Settings. macOS shows each request once: once it has been answered, asking again shows nothing and answers the same, so a client offers `settings` while a grant stays `not-granted`.
209
221
  - `chrome` or `edge`: that browser opens at its inspect page, where remote debugging is switched on. One the service was given only the folder of, the person opens themselves.
210
222
  - With none named: the screen's grant while either is missing; the first browser installed, Chrome before Edge, while none is on.
211
223
  - What the part doesn't need, a browser that isn't installed, or steps that couldn't be started answer 409, saying why.
224
+ - **`POST /v1/setup/{capability}/settings`**, with `{ "need": "screen-recording" }` or `{ "need": "accessibility" }`, opens that grant's pane of System Settings, under Privacy & Security, on the service's machine, macOS only, whether the grant is missing or not, for the person to switch it there. macOS lists an app there once it has asked, so this follows `ask`. It is for the person's own choice, such as a button they press: the service opens a pane nowhere else. Where an app hosts the driver, it is that app that sees the change and starts its driver again. It answers once the pane is asked to open, with each part then. A need the part doesn't have, one with no pane, a pane that couldn't be opened, or a machine other than a Mac answers 409, saying why.
212
225
  - **`PUT /v1/setup/{capability}`** with `{ "on": true }` or `{ "on": false }` sets a switch. Turning it on, or on again, also asks for everything the part is missing, as asking with no need does. Where that couldn't be started, it answers 409, saying why, and the switch stays on.
213
226
  - **`GET /v1/acting`** is who is acting now on every computer attached to this machine, in one list, as each one's `presence` surface has it. A computer in a container isn't included: its own `presence` surface has it.
214
227
 
@@ -306,7 +319,7 @@ Every running computer has two more, to watch only:
306
319
  - **`scope` says whose numbers they are.** A computer in a container reads its own (`computer`), against the machine's totals, since a container has no limit of its own. This computer has no edge to measure at, so it reads the whole machine's (`machine`); so does a container that can't read its own.
307
320
  - **The disk is the volume its workspace is on,** not the workspace's own size.
308
321
  - **Nothing depends on it.** Nothing is read while nobody watches or asks, a reading that can't be taken is left out, and a socket that hasn't read the one before is not sent the next.
309
- - **`presence`** (protocol `presence@1`): who is acting on it now, and on what: a terminal, the files, the browser or the screen. It sends the whole list, `{"type":"presence","acting":[…]}`, when it opens and each time someone starts or stops acting on something. Someone stops 10 seconds after they last acted there. `openapi.yaml` has each field, as `PresenceEvent` and `Acting`, with what counts as acting.
322
+ - **`presence`** (protocol `presence@1`): who is acting on it now, and on what: a terminal, the files, the browser or the screen. It sends the whole list, `{"type":"presence","acting":[…]}`, when it opens and each time someone starts or stops acting on something. Someone stops 10 seconds after they last acted there. A command the agent started is acting on its terminal until it ends, and 10 seconds after: one left running, such as a server, keeps the agent shown there, as the terminal shows it running. The person's shell, and what runs in it, counts for 10 seconds after their last input there. `openapi.yaml` has each field, as `PresenceEvent` and `Acting`, with what counts as acting.
310
323
  - **The agent is told too.** `about` names who else is acting. The answer to the agent's call on something someone else acted on since its last call there ends with a line naming each of them: `The person used this terminal 3 s ago.`, `The person wrote a file here 2 s ago.`, `The person used the browser 4 s ago.` or `The person used the screen 1 s ago.`
311
324
  - **Computers attached to the same machine share its files and its screen.** Each is shown the person and the other computers' agents acting on them, by name, and its agent's line names each one since its last call: `The person wrote a file here 1 s ago. Helper used the files here 2 s ago.` A computer's terminals and browser stay its own; the person's own browser is shared by the computers attached with it, and each shows only its own agent acting there.
312
325
  - **Nothing is refused by it,** for the person or the agent.
@@ -81358,8 +81358,8 @@ var Live = class {
81358
81358
  if (exec2 && access === "terminal") {
81359
81359
  this.#terminals = exec2.terminals;
81360
81360
  exec2.onCommand((event) => {
81361
- if (event.type === "start" && event.by === "agent")
81362
- presence.acted("agent", { capability: "terminal", terminal: event.id });
81361
+ if (event.type === "start" && event.by === "agent") presence.agentCommandStarted(event.id);
81362
+ if (event.type === "exit") presence.commandEnded(event.id);
81363
81363
  for (const message of messages(event)) for (const ws of this.#viewers) deliver(ws, message);
81364
81364
  });
81365
81365
  }
@@ -81724,16 +81724,32 @@ var did = (actor, where) => `${label(actor)} ${actor.who === "person" ? DID[wher
81724
81724
  var Board = class {
81725
81725
  #entries = /* @__PURE__ */ new Map();
81726
81726
  #listeners = /* @__PURE__ */ new Set();
81727
+ /** An act there: held still where a command runs, and otherwise its 10 s count starts again. */
81727
81728
  acted(actor, where) {
81728
- const key = `${actorKey(actor)} ${named(where)}`;
81729
+ this.#set(actor, where, this.#entries.get(this.#key(actor, where))?.held ?? false);
81730
+ }
81731
+ /** A command started there: acting until it ends, whatever is done there meanwhile. */
81732
+ hold(actor, where) {
81733
+ this.#set(actor, where, true);
81734
+ }
81735
+ /** The command ended: its end is the last act there, and its 10 s count starts now. */
81736
+ release(actor, where) {
81737
+ if (this.#entries.get(this.#key(actor, where))?.held) this.#set(actor, where, false);
81738
+ }
81739
+ #key(actor, where) {
81740
+ return `${actorKey(actor)} ${named(where)}`;
81741
+ }
81742
+ /** Acting now, held or counting down 10 s. */
81743
+ #set(actor, where, held) {
81744
+ const key = this.#key(actor, where);
81729
81745
  const before = this.#entries.get(key);
81730
81746
  clearTimeout(before?.timer);
81731
- const timer = setTimeout(() => {
81747
+ const timer = held ? void 0 : setTimeout(() => {
81732
81748
  this.#entries.delete(key);
81733
81749
  this.#changed();
81734
81750
  }, ACTING_MS);
81735
- timer.unref();
81736
- this.#entries.set(key, { actor, where, at: Date.now(), timer });
81751
+ timer?.unref();
81752
+ this.#entries.set(key, { actor, where, at: Date.now(), timer, held });
81737
81753
  if (!before) this.#changed();
81738
81754
  }
81739
81755
  list() {
@@ -81777,6 +81793,14 @@ var Presence = class {
81777
81793
  acted(who, where) {
81778
81794
  this.#board(where).acted(who === "person" ? { who } : this.#agent, where);
81779
81795
  }
81796
+ /** The agent started a command on a terminal: it acts there until the command ends. */
81797
+ agentCommandStarted(terminal) {
81798
+ this.#own.hold(this.#agent, { capability: "terminal", terminal });
81799
+ }
81800
+ /** A command ended: where the agent started it, its 10 s count starts now. */
81801
+ commandEnded(terminal) {
81802
+ this.#own.release(this.#agent, { capability: "terminal", terminal });
81803
+ }
81780
81804
  /**
81781
81805
  * The agent called on `where`, acting there unless `acts` is false, as when it only waits on a
81782
81806
  * command: the line to add to its answer, where anyone else acted there since its last call on
@@ -97884,7 +97908,8 @@ var DRIVER_TOOLS = [
97884
97908
  "bring_to_front"
97885
97909
  ];
97886
97910
  var INSTALL = "Install the signed app from cua.ai/download";
97887
- var quiet = () => ({ ...process.env, DO_NOT_TRACK: "1" });
97911
+ var QUIET = { DO_NOT_TRACK: "1", CUA_DRIVER_RS_UPDATE_CHECK: "false" };
97912
+ var quiet = () => ({ ...process.env, ...QUIET });
97888
97913
  var program = (path) => {
97889
97914
  try {
97890
97915
  const found = statSync2(path);
@@ -98504,6 +98529,7 @@ var TOOL_SWITCH = {
98504
98529
  browser_run_code_unsafe: "terminal"
98505
98530
  };
98506
98531
  var MAX_CALL = 4 * 1024 * 1024;
98532
+ var SCREEN_WAIT_MS = 1e3;
98507
98533
  var ProcessRuntime = class {
98508
98534
  #config;
98509
98535
  #contained;
@@ -98514,9 +98540,11 @@ var ProcessRuntime = class {
98514
98540
  /** The person's switches for this machine; inside a container there are none. */
98515
98541
  #switches;
98516
98542
  /**
98517
- * Whether the screen can be reached, as last checked. Asking the driver can take seconds, which
98518
- * `info` doesn't wait for: it is checked when the service starts, again when it is more than 10 s
98519
- * old and someone asks, and afresh at every start of a computer with the screen.
98543
+ * Whether the screen can be reached, as last checked. It is checked when the service starts,
98544
+ * again when it is more than 10 s old and someone asks, and afresh at every start of a computer
98545
+ * with the screen. Asking the driver can take seconds: `info` waits up to `SCREEN_WAIT_MS` for
98546
+ * the new check, so that a reading more than 10 s old isn't answered as it was, and otherwise
98547
+ * answers the last one.
98520
98548
  */
98521
98549
  #screen = {
98522
98550
  ready: false,
@@ -98548,9 +98576,18 @@ var ProcessRuntime = class {
98548
98576
  });
98549
98577
  return this.#checking;
98550
98578
  }
98551
- /** The screen's readiness as last checked, starting another check where that is old. */
98552
- #screenNow() {
98553
- if (Date.now() - this.#screen.at > 1e4) void this.#checkScreen();
98579
+ /** The screen's readiness: checked again where the last is old, waiting a little for that. */
98580
+ async #screenNow() {
98581
+ if (Date.now() - this.#screen.at > 1e4) {
98582
+ let timer;
98583
+ await Promise.race([
98584
+ this.#checkScreen(),
98585
+ new Promise((done) => {
98586
+ timer = setTimeout(done, SCREEN_WAIT_MS);
98587
+ })
98588
+ ]);
98589
+ clearTimeout(timer);
98590
+ }
98554
98591
  const { at: _, ...ready } = this.#screen;
98555
98592
  return ready;
98556
98593
  }
@@ -98564,23 +98601,22 @@ var ProcessRuntime = class {
98564
98601
  const reason3 = this.#switches?.refused(which);
98565
98602
  return reason3 ? { ready: false, reason: reason3 } : ready;
98566
98603
  };
98604
+ const [screen, own3] = await Promise.all([
98605
+ this.#switches?.refused("screen") ? { ready: false } : this.#screenNow(),
98606
+ this.#contained ? void 0 : ownBrowser(this.#ownBrowserData)
98607
+ ]);
98567
98608
  return {
98568
98609
  ready: true,
98569
98610
  capabilities: [
98570
98611
  { capability: "about", ready: true },
98571
98612
  { capability: "terminal", ...unless("terminal", { ready: true }) },
98572
98613
  { capability: "files", ...unless("files", { ready: true }) },
98573
- { capability: "screen", ...unless("screen", this.#screenNow()) }
98614
+ { capability: "screen", ...unless("screen", screen) }
98574
98615
  ],
98575
98616
  browsers: [
98576
98617
  { kind: "headless", ...browserProgram(this.#config) },
98577
98618
  // The person's own, which only this computer has.
98578
- ...this.#contained ? [] : [
98579
- {
98580
- kind: "own",
98581
- ...unless("browser", readiness(await ownBrowser(this.#ownBrowserData)))
98582
- }
98583
- ]
98619
+ ...own3 === void 0 ? [] : [{ kind: "own", ...unless("browser", readiness(own3)) }]
98584
98620
  ]
98585
98621
  };
98586
98622
  }
@@ -98769,7 +98805,7 @@ var ProcessRuntime = class {
98769
98805
  };
98770
98806
 
98771
98807
  // src/handlers.ts
98772
- var VERSION2 = "0.0.20";
98808
+ var VERSION2 = "0.0.22";
98773
98809
  function createHandlers(computers, connections, setup) {
98774
98810
  return {
98775
98811
  getInfo: async () => ({ version: VERSION2, ...await computers.offers() }),
@@ -98777,6 +98813,7 @@ function createHandlers(computers, connections, setup) {
98777
98813
  getSetup: () => setup.capabilities(),
98778
98814
  setSetup: ({ capability, on }) => setup.set(capability, on),
98779
98815
  askSetup: ({ capability, need }) => setup.ask(capability, need),
98816
+ openSetupSettings: ({ capability, need }) => setup.settings(capability, need),
98780
98817
  getActing: async () => computers.acting(),
98781
98818
  listComputers: async ({ state }) => computers.list(state),
98782
98819
  createComputer: (input3) => computers.create(input3),
@@ -100200,14 +100237,16 @@ var Computers = class {
100200
100237
  }
100201
100238
  /** What it offers: this computer, and each kind it makes, with whether it can be now. */
100202
100239
  async offers() {
100203
- const offered = await this.#runtimes.none.offer();
100240
+ const [offered, made] = await Promise.all([
100241
+ this.#runtimes.none.offer(),
100242
+ Promise.all(
100243
+ Object.keys(this.#runtimes).filter((isolation) => isolation !== "none").map(async (isolation) => ({
100244
+ isolation,
100245
+ ...await this.#runtime(isolation).offer()
100246
+ }))
100247
+ )
100248
+ ]);
100204
100249
  const thisComputer = this.#notHere ? { ...offered, ready: false, reason: this.#notHere } : offered;
100205
- const made = await Promise.all(
100206
- Object.keys(this.#runtimes).filter((isolation) => isolation !== "none").map(async (isolation) => ({
100207
- isolation,
100208
- ...await this.#runtime(isolation).offer()
100209
- }))
100210
- );
100211
100250
  return { thisComputer, made };
100212
100251
  }
100213
100252
  /**
@@ -100697,7 +100736,7 @@ var OPENAPI = {
100697
100736
  "openapi": "3.1.0",
100698
100737
  "info": {
100699
100738
  "title": "AgentComputer",
100700
- "version": "0.0.20",
100739
+ "version": "0.0.22",
100701
100740
  "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.",
100702
100741
  "license": {
100703
100742
  "name": "Apache-2.0",
@@ -100720,7 +100759,7 @@ var OPENAPI = {
100720
100759
  "get": {
100721
100760
  "operationId": "getInfo",
100722
100761
  "x-mcp-tool": "service_info",
100723
- "summary": "What this service offers: this computer, the kinds of computer it can make, and the browsers that can go with each, every one ready or not and why.",
100762
+ "summary": "What this service offers: this computer, the kinds of computer it can make, and the browsers that can go with each, every one ready or not and why. The screen's readiness is read afresh where the last reading is more than 10 seconds old, waited for up to a second; a reading that takes longer is answered the next time.",
100724
100763
  "responses": {
100725
100764
  "200": {
100726
100765
  "description": "The service.",
@@ -100853,7 +100892,7 @@ var OPENAPI = {
100853
100892
  ],
100854
100893
  "post": {
100855
100894
  "operationId": "askSetup",
100856
- "summary": "Ask the person, on the service's machine, macOS only, for one thing a part needs, or, with none named, for everything it is missing. screen-recording or accessibility, while it is missing: Cua Driver's own grant, its app started first, which makes the system's requests in its own order, Accessibility first. For a driver an app hosts, the app asks, for that grant alone. Then that grant's own pane in System Settings opens. chrome or edge: that browser opens at its inspect page, where remote debugging is switched on. With none named, the screen's grant while either is missing, and the first browser installed, Chrome before Edge, while none is on. It answers once the steps have started, with each part then; what the person does next is read afresh later. A browser the service was given only the folder of, the person opens. Elsewhere it asks for nothing.",
100895
+ "summary": "Ask the person, on the service's machine, macOS only, for one thing a part needs, or, with none named, for everything it is missing. screen-recording or accessibility, while it is missing: Cua Driver's own grant, its app started first, which makes the system's requests in its own order, Accessibility first. For a driver an app hosts, the app asks, for that grant alone, in its own way. The service opens no pane of System Settings: the person opens one with settings. macOS shows each request once: once it has been answered, asking again shows nothing and answers the same, so a client offers settings while a grant stays not-granted. chrome or edge: that browser opens at its inspect page, where remote debugging is switched on. With none named, the screen's grant while either is missing, and the first browser installed, Chrome before Edge, while none is on. It answers once the steps have started, with each part then; what the person does next is read afresh later. A browser the service was given only the folder of, the person opens. Elsewhere it asks for nothing.",
100857
100896
  "requestBody": {
100858
100897
  "content": {
100859
100898
  "application/json": {
@@ -100896,6 +100935,66 @@ var OPENAPI = {
100896
100935
  }
100897
100936
  }
100898
100937
  },
100938
+ "/v1/setup/{capability}/settings": {
100939
+ "parameters": [
100940
+ {
100941
+ "name": "capability",
100942
+ "in": "path",
100943
+ "required": true,
100944
+ "schema": {
100945
+ "$ref": "#/components/schemas/Switch"
100946
+ }
100947
+ }
100948
+ ],
100949
+ "post": {
100950
+ "operationId": "openSetupSettings",
100951
+ "summary": "Open the pane of System Settings for one thing a part needs, on the service's machine, macOS only, for the person to switch it there: screen-recording or accessibility, that grant's pane under Privacy & Security, whether it is missing or not. macOS lists an app there once it has asked, so this follows ask. It is for the person's own choice, such as a button they press: the service opens a pane nowhere else. Where an app hosts the driver, it is that app that sees the change and starts its driver again. It answers once the pane is asked to open, with each part then. Elsewhere it answers 409.",
100952
+ "requestBody": {
100953
+ "required": true,
100954
+ "content": {
100955
+ "application/json": {
100956
+ "schema": {
100957
+ "type": "object",
100958
+ "additionalProperties": false,
100959
+ "required": [
100960
+ "need"
100961
+ ],
100962
+ "properties": {
100963
+ "need": {
100964
+ "$ref": "#/components/schemas/NeedName"
100965
+ }
100966
+ }
100967
+ }
100968
+ }
100969
+ }
100970
+ },
100971
+ "responses": {
100972
+ "200": {
100973
+ "description": "Its pane asked to open.",
100974
+ "content": {
100975
+ "application/json": {
100976
+ "schema": {
100977
+ "$ref": "#/components/schemas/Setup"
100978
+ }
100979
+ }
100980
+ }
100981
+ },
100982
+ "401": {
100983
+ "$ref": "#/components/responses/Unauthorized"
100984
+ },
100985
+ "409": {
100986
+ "description": "The part doesn't need that here, it has no pane of System Settings, or the pane couldn't be opened.",
100987
+ "content": {
100988
+ "application/json": {
100989
+ "schema": {
100990
+ "$ref": "#/components/schemas/Error"
100991
+ }
100992
+ }
100993
+ }
100994
+ }
100995
+ }
100996
+ }
100997
+ },
100899
100998
  "/v1/acting": {
100900
100999
  "get": {
100901
101000
  "operationId": "getActing",
@@ -102737,7 +102836,7 @@ var OPENAPI = {
102737
102836
  }
102738
102837
  },
102739
102838
  "Acting": {
102740
- "description": "Someone who acted on a computer in the last 10 seconds. The person acts in a live view at operate: opening a shell, typing into or stopping a terminal, writing a file, any input to the browser but moving the pointer, or any input to the screen that Cua Driver did. Watching is not acting, and the person's own use of the screen, outside a live view, can't be seen. The agent acts by calling its endpoints: starting a command or typing into one (waiting on its output is not acting), any file tool, reads among them, any browser tool that is answered, and any screen tool. Computers attached to the same machine share its files and its screen: each is shown the person and the other computers' agents acting on them, by name.",
102839
+ "description": "Someone who acted on a computer in the last 10 seconds, or the agent while a command it started there still runs. The person acts in a live view at operate: opening a shell, typing into or stopping a terminal, writing a file, any input to the browser but moving the pointer, or any input to the screen that Cua Driver did. Watching is not acting, and the person's own use of the screen, outside a live view, can't be seen. The person's shell, and what runs in it, counts for 10 seconds after their last input there. The agent acts by calling its endpoints: starting a command, which is acting on its terminal until the command ends, even one left running, such as a server, as the terminal shows it running; typing into one (waiting on its output adds nothing); any file tool, reads among them; any browser tool that is answered; and any screen tool. Computers attached to the same machine share its files and its screen: each is shown the person and the other computers' agents acting on them, by name.",
102741
102840
  "type": "object",
102742
102841
  "required": [
102743
102842
  "who",
@@ -102773,12 +102872,12 @@ var OPENAPI = {
102773
102872
  "at": {
102774
102873
  "type": "string",
102775
102874
  "format": "date-time",
102776
- "description": "When it last acted there, as of this message: one who goes on acting is sent again only when someone starts or stops."
102875
+ "description": "When it last acted there, as of this message: one who goes on acting is sent again only when someone starts or stops. For the agent's command still running, when the agent started it or last typed into it, which can be more than 10 seconds ago; its end is its last act."
102777
102876
  }
102778
102877
  }
102779
102878
  },
102780
102879
  "PresenceEvent": {
102781
- "description": "What the service sends on a presence@1 socket, as JSON text: the whole list of everyone acting now, the most recent first, empty where nobody is. It is sent when the socket opens and each time someone starts acting on something, or stops: 10 seconds after they last acted there. Nothing is refused by it. What a socket sends is dropped.",
102880
+ "description": "What the service sends on a presence@1 socket, as JSON text: the whole list of everyone acting now, the most recent first, empty where nobody is. It is sent when the socket opens and each time someone starts acting on something, or stops: 10 seconds after they last acted there, or, for the agent's command, 10 seconds after it ended. Nothing is refused by it. What a socket sends is dropped.",
102782
102881
  "type": "object",
102783
102882
  "required": [
102784
102883
  "type",
@@ -103292,7 +103391,7 @@ var OPERATIONS = [
103292
103391
  "method": "GET",
103293
103392
  "path": "/v1/info",
103294
103393
  "tool": "service_info",
103295
- "summary": "What this service offers: this computer, the kinds of computer it can make, and the browsers that can go with each, every one ready or not and why.",
103394
+ "summary": "What this service offers: this computer, the kinds of computer it can make, and the browsers that can go with each, every one ready or not and why. The screen's readiness is read afresh where the last reading is more than 10 seconds old, waited for up to a second; a reading that takes longer is answered the next time.",
103296
103395
  "status": 200,
103297
103396
  "hasBody": false,
103298
103397
  "pathParameters": [],
@@ -103844,7 +103943,7 @@ var OPERATIONS = [
103844
103943
  "operationId": "askSetup",
103845
103944
  "method": "POST",
103846
103945
  "path": "/v1/setup/{capability}/ask",
103847
- "summary": "Ask the person, on the service's machine, macOS only, for one thing a part needs, or, with none named, for everything it is missing. screen-recording or accessibility, while it is missing: Cua Driver's own grant, its app started first, which makes the system's requests in its own order, Accessibility first. For a driver an app hosts, the app asks, for that grant alone. Then that grant's own pane in System Settings opens. chrome or edge: that browser opens at its inspect page, where remote debugging is switched on. With none named, the screen's grant while either is missing, and the first browser installed, Chrome before Edge, while none is on. It answers once the steps have started, with each part then; what the person does next is read afresh later. A browser the service was given only the folder of, the person opens. Elsewhere it asks for nothing.",
103946
+ "summary": "Ask the person, on the service's machine, macOS only, for one thing a part needs, or, with none named, for everything it is missing. screen-recording or accessibility, while it is missing: Cua Driver's own grant, its app started first, which makes the system's requests in its own order, Accessibility first. For a driver an app hosts, the app asks, for that grant alone, in its own way. The service opens no pane of System Settings: the person opens one with settings. macOS shows each request once: once it has been answered, asking again shows nothing and answers the same, so a client offers settings while a grant stays not-granted. chrome or edge: that browser opens at its inspect page, where remote debugging is switched on. With none named, the screen's grant while either is missing, and the first browser installed, Chrome before Edge, while none is on. It answers once the steps have started, with each part then; what the person does next is read afresh later. A browser the service was given only the folder of, the person opens. Elsewhere it asks for nothing.",
103848
103947
  "status": 200,
103849
103948
  "hasBody": true,
103850
103949
  "pathParameters": [
@@ -103970,6 +104069,137 @@ var OPERATIONS = [
103970
104069
  },
103971
104070
  "websocket": false
103972
104071
  },
104072
+ {
104073
+ "operationId": "openSetupSettings",
104074
+ "method": "POST",
104075
+ "path": "/v1/setup/{capability}/settings",
104076
+ "summary": "Open the pane of System Settings for one thing a part needs, on the service's machine, macOS only, for the person to switch it there: screen-recording or accessibility, that grant's pane under Privacy & Security, whether it is missing or not. macOS lists an app there once it has asked, so this follows ask. It is for the person's own choice, such as a button they press: the service opens a pane nowhere else. Where an app hosts the driver, it is that app that sees the change and starts its driver again. It answers once the pane is asked to open, with each part then. Elsewhere it answers 409.",
104077
+ "status": 200,
104078
+ "hasBody": true,
104079
+ "pathParameters": [
104080
+ "capability"
104081
+ ],
104082
+ "queryParameters": [],
104083
+ "input": {
104084
+ "type": "object",
104085
+ "additionalProperties": false,
104086
+ "properties": {
104087
+ "capability": {
104088
+ "type": "string",
104089
+ "enum": [
104090
+ "terminal",
104091
+ "files",
104092
+ "screen",
104093
+ "browser"
104094
+ ],
104095
+ "description": "A part of the service's machine an agent can use: its terminal, its files, its screen, and the person's own browser."
104096
+ },
104097
+ "need": {
104098
+ "type": "string",
104099
+ "enum": [
104100
+ "install",
104101
+ "screen-recording",
104102
+ "accessibility",
104103
+ "chrome",
104104
+ "edge",
104105
+ "named"
104106
+ ],
104107
+ "description": "install: Cua Driver, which the screen works through. screen-recording and accessibility: Cua Driver's two grants. chrome and edge: each browser, with remote debugging on or off; named: the one browser a service was given the folder of."
104108
+ }
104109
+ },
104110
+ "required": [
104111
+ "capability",
104112
+ "need"
104113
+ ]
104114
+ },
104115
+ "output": {
104116
+ "type": "object",
104117
+ "required": [
104118
+ "capabilities"
104119
+ ],
104120
+ "properties": {
104121
+ "capabilities": {
104122
+ "type": "array",
104123
+ "description": "terminal, files, screen and browser, in that order.",
104124
+ "items": {
104125
+ "type": "object",
104126
+ "required": [
104127
+ "capability",
104128
+ "on",
104129
+ "ready",
104130
+ "needs"
104131
+ ],
104132
+ "properties": {
104133
+ "capability": {
104134
+ "type": "string",
104135
+ "enum": [
104136
+ "terminal",
104137
+ "files",
104138
+ "screen",
104139
+ "browser"
104140
+ ],
104141
+ "description": "A part of the service's machine an agent can use: its terminal, its files, its screen, and the person's own browser."
104142
+ },
104143
+ "on": {
104144
+ "type": "boolean",
104145
+ "description": "The person's switch. Off, agents' new calls to the part refuse, saying the person turned it off, and `info` says so; what an agent already started runs on. The terminal and the screen each reach the whole machine: commands read any file, and the screen acts in any app. The browser's switch is for the person's own; any browser's code-running tool answers to the terminal's switch, and a browser call that names files, by `paths` or `filename`, to the files'. A service started with `--lend` starts with every one off; any other, with every one on."
104146
+ },
104147
+ "ready": {
104148
+ "type": "boolean",
104149
+ "description": "Whether the part has all it needs, apart from its switch: the screen, each item granted; the browser, one browser on. The terminal and files always do."
104150
+ },
104151
+ "needs": {
104152
+ "type": "array",
104153
+ "description": "Each thing the part needs, always, with its state. The terminal and files need nothing. The screen needs Cua Driver, which while it isn't installed is the one item, and on macOS its two grants. The browser lists Chrome then Edge, each on, off or missing, or the one browser named; with both on, the agent's is Chrome.",
104154
+ "items": {
104155
+ "type": "object",
104156
+ "required": [
104157
+ "need",
104158
+ "state"
104159
+ ],
104160
+ "properties": {
104161
+ "need": {
104162
+ "type": "string",
104163
+ "enum": [
104164
+ "install",
104165
+ "screen-recording",
104166
+ "accessibility",
104167
+ "chrome",
104168
+ "edge",
104169
+ "named"
104170
+ ],
104171
+ "description": "install: Cua Driver, which the screen works through. screen-recording and accessibility: Cua Driver's two grants. chrome and edge: each browser, with remote debugging on or off; named: the one browser a service was given the folder of."
104172
+ },
104173
+ "name": {
104174
+ "type": "string",
104175
+ "description": "A browser's name: Chrome, Edge, or the browser."
104176
+ },
104177
+ "holder": {
104178
+ "type": "string",
104179
+ "description": "For a grant, whose it is, as System Settings lists it: the outermost app Cua Driver is inside, CuaDriver for its own app, or an app that carries the driver. None where Cua Driver is in no app."
104180
+ },
104181
+ "state": {
104182
+ "type": "string",
104183
+ "enum": [
104184
+ "missing",
104185
+ "granted",
104186
+ "not-granted",
104187
+ "unknown",
104188
+ "on",
104189
+ "off"
104190
+ ],
104191
+ "description": "missing: not installed. unknown: it can't be read now. A browser is on while it is open with its remote debugging switched on."
104192
+ }
104193
+ }
104194
+ }
104195
+ }
104196
+ }
104197
+ }
104198
+ }
104199
+ }
104200
+ },
104201
+ "websocket": false
104202
+ },
103973
104203
  {
103974
104204
  "operationId": "getActing",
103975
104205
  "method": "GET",
@@ -103988,7 +104218,7 @@ var OPERATIONS = [
103988
104218
  "output": {
103989
104219
  "type": "array",
103990
104220
  "items": {
103991
- "description": "Someone who acted on a computer in the last 10 seconds. The person acts in a live view at operate: opening a shell, typing into or stopping a terminal, writing a file, any input to the browser but moving the pointer, or any input to the screen that Cua Driver did. Watching is not acting, and the person's own use of the screen, outside a live view, can't be seen. The agent acts by calling its endpoints: starting a command or typing into one (waiting on its output is not acting), any file tool, reads among them, any browser tool that is answered, and any screen tool. Computers attached to the same machine share its files and its screen: each is shown the person and the other computers' agents acting on them, by name.",
104221
+ "description": "Someone who acted on a computer in the last 10 seconds, or the agent while a command it started there still runs. The person acts in a live view at operate: opening a shell, typing into or stopping a terminal, writing a file, any input to the browser but moving the pointer, or any input to the screen that Cua Driver did. Watching is not acting, and the person's own use of the screen, outside a live view, can't be seen. The person's shell, and what runs in it, counts for 10 seconds after their last input there. The agent acts by calling its endpoints: starting a command, which is acting on its terminal until the command ends, even one left running, such as a server, as the terminal shows it running; typing into one (waiting on its output adds nothing); any file tool, reads among them; any browser tool that is answered; and any screen tool. Computers attached to the same machine share its files and its screen: each is shown the person and the other computers' agents acting on them, by name.",
103992
104222
  "type": "object",
103993
104223
  "required": [
103994
104224
  "who",
@@ -104024,7 +104254,7 @@ var OPERATIONS = [
104024
104254
  "at": {
104025
104255
  "type": "string",
104026
104256
  "format": "date-time",
104027
- "description": "When it last acted there, as of this message: one who goes on acting is sent again only when someone starts or stops."
104257
+ "description": "When it last acted there, as of this message: one who goes on acting is sent again only when someone starts or stops. For the agent's command still running, when the agent started it or last typed into it, which can be more than 10 seconds ago; its end is its last act."
104028
104258
  }
104029
104259
  }
104030
104260
  }
@@ -106403,11 +106633,31 @@ var Setup = class {
106403
106633
  }
106404
106634
  return this.capabilities();
106405
106635
  }
106406
- /** Only macOS asks: elsewhere there is nothing to ask the person for. */
106407
- async #ask(capability, need) {
106636
+ /**
106637
+ * Open the pane of System Settings for one thing a part needs, whether it is missing or not: for
106638
+ * the person's own choice, as nothing else opens one.
106639
+ */
106640
+ async settings(capability, need) {
106641
+ try {
106642
+ await this.#needs(capability, need);
106643
+ const pane = PANE[need];
106644
+ if (!pane) throw new Error(`"${need}" has no pane of System Settings.`);
106645
+ await this.#machine.run("/usr/bin/open", [pane]);
106646
+ } catch (error64) {
106647
+ throw new ApiError(409, error64.message);
106648
+ }
106649
+ return this.capabilities();
106650
+ }
106651
+ /** What a part needs, where it needs the one named. */
106652
+ async #needs(capability, need) {
106408
106653
  const { needs } = (await this.#parts())[capability];
106409
106654
  if (need && !needs.some((one) => one.need === need))
106410
106655
  throw new Error(`There's no "${need}" for ${capability} here.`);
106656
+ return needs;
106657
+ }
106658
+ /** Only macOS asks: elsewhere there is nothing to ask the person for. No pane opens. */
106659
+ async #ask(capability, need) {
106660
+ const needs = await this.#needs(capability, need);
106411
106661
  if (this.#machine.platform !== "darwin") return;
106412
106662
  if (capability === "screen") {
106413
106663
  const driver = findDriver(this.#driver);
@@ -106415,8 +106665,6 @@ var Setup = class {
106415
106665
  const asked = needs.filter((one) => one.state !== "granted" && (!need || one.need === need)).map((one) => one.need);
106416
106666
  if (asked.length > 0)
106417
106667
  await (driver.socket ? this.#askHost(driver, asked) : this.#askScreen(driver));
106418
- const pane = need && PANE[need];
106419
- if (pane) await this.#machine.run("/usr/bin/open", [pane]);
106420
106668
  }
106421
106669
  if (capability === "browser" && (need || !needs.some((one) => one.state === "on")))
106422
106670
  await this.#askBrowser(need);
@@ -106424,7 +106672,7 @@ var Setup = class {
106424
106672
  /**
106425
106673
  * Cua Driver's own grant, with its app running first, started through the system so that the
106426
106674
  * Mac names CuaDriver in what it asks, not whatever started the service. It asks in its own
106427
- * order, Accessibility first. Neither sends telemetry.
106675
+ * order, Accessibility first. Neither sends telemetry nor checks for updates.
106428
106676
  */
106429
106677
  async #askScreen(driver) {
106430
106678
  const answers = async () => (await driverGrants(driver)).accessibility !== void 0;
@@ -106434,8 +106682,7 @@ var Setup = class {
106434
106682
  "-g",
106435
106683
  "-a",
106436
106684
  app.app,
106437
- "--env",
106438
- "DO_NOT_TRACK=1",
106685
+ ...Object.entries(QUIET).flatMap(([name, value]) => ["--env", `${name}=${value}`]),
106439
106686
  "--args",
106440
106687
  "serve"
106441
106688
  ]);
@@ -106624,6 +106871,8 @@ async function main() {
106624
106871
  if (values["own-browser"] && values.browser)
106625
106872
  throw new UsageError("Take --browser or --own-browser: a computer has one browser.");
106626
106873
  if (command === "serve") {
106874
+ for (const name of Object.keys(process.env))
106875
+ if (name.startsWith("AGENTCOMPUTER_")) delete process.env[name];
106627
106876
  const switches = new Switches(data, values.lend === true);
106628
106877
  const { "tls-cert": cert, "tls-key": key } = values;
106629
106878
  if (Boolean(cert) !== Boolean(key))
@@ -11,7 +11,7 @@ export interface paths {
11
11
  path?: never;
12
12
  cookie?: never;
13
13
  };
14
- /** What this service offers: this computer, the kinds of computer it can make, and the browsers that can go with each, every one ready or not and why. */
14
+ /** What this service offers: this computer, the kinds of computer it can make, and the browsers that can go with each, every one ready or not and why. The screen's readiness is read afresh where the last reading is more than 10 seconds old, waited for up to a second; a reading that takes longer is answered the next time. */
15
15
  get: operations["getInfo"];
16
16
  put?: never;
17
17
  post?: never;
@@ -85,7 +85,7 @@ export interface paths {
85
85
  };
86
86
  get?: never;
87
87
  put?: never;
88
- /** Ask the person, on the service's machine, macOS only, for one thing a part needs, or, with none named, for everything it is missing. screen-recording or accessibility, while it is missing: Cua Driver's own grant, its app started first, which makes the system's requests in its own order, Accessibility first. For a driver an app hosts, the app asks, for that grant alone. Then that grant's own pane in System Settings opens. chrome or edge: that browser opens at its inspect page, where remote debugging is switched on. With none named, the screen's grant while either is missing, and the first browser installed, Chrome before Edge, while none is on. It answers once the steps have started, with each part then; what the person does next is read afresh later. A browser the service was given only the folder of, the person opens. Elsewhere it asks for nothing. */
88
+ /** Ask the person, on the service's machine, macOS only, for one thing a part needs, or, with none named, for everything it is missing. screen-recording or accessibility, while it is missing: Cua Driver's own grant, its app started first, which makes the system's requests in its own order, Accessibility first. For a driver an app hosts, the app asks, for that grant alone, in its own way. The service opens no pane of System Settings: the person opens one with settings. macOS shows each request once: once it has been answered, asking again shows nothing and answers the same, so a client offers settings while a grant stays not-granted. chrome or edge: that browser opens at its inspect page, where remote debugging is switched on. With none named, the screen's grant while either is missing, and the first browser installed, Chrome before Edge, while none is on. It answers once the steps have started, with each part then; what the person does next is read afresh later. A browser the service was given only the folder of, the person opens. Elsewhere it asks for nothing. */
89
89
  post: operations["askSetup"];
90
90
  delete?: never;
91
91
  options?: never;
@@ -93,6 +93,25 @@ export interface paths {
93
93
  patch?: never;
94
94
  trace?: never;
95
95
  };
96
+ "/v1/setup/{capability}/settings": {
97
+ parameters: {
98
+ query?: never;
99
+ header?: never;
100
+ path: {
101
+ capability: components["schemas"]["Switch"];
102
+ };
103
+ cookie?: never;
104
+ };
105
+ get?: never;
106
+ put?: never;
107
+ /** Open the pane of System Settings for one thing a part needs, on the service's machine, macOS only, for the person to switch it there: screen-recording or accessibility, that grant's pane under Privacy & Security, whether it is missing or not. macOS lists an app there once it has asked, so this follows ask. It is for the person's own choice, such as a button they press: the service opens a pane nowhere else. Where an app hosts the driver, it is that app that sees the change and starts its driver again. It answers once the pane is asked to open, with each part then. Elsewhere it answers 409. */
108
+ post: operations["openSetupSettings"];
109
+ delete?: never;
110
+ options?: never;
111
+ head?: never;
112
+ patch?: never;
113
+ trace?: never;
114
+ };
96
115
  "/v1/acting": {
97
116
  parameters: {
98
117
  query?: never;
@@ -702,7 +721,7 @@ export interface components {
702
721
  local: boolean;
703
722
  }[];
704
723
  };
705
- /** @description Someone who acted on a computer in the last 10 seconds. The person acts in a live view at operate: opening a shell, typing into or stopping a terminal, writing a file, any input to the browser but moving the pointer, or any input to the screen that Cua Driver did. Watching is not acting, and the person's own use of the screen, outside a live view, can't be seen. The agent acts by calling its endpoints: starting a command or typing into one (waiting on its output is not acting), any file tool, reads among them, any browser tool that is answered, and any screen tool. Computers attached to the same machine share its files and its screen: each is shown the person and the other computers' agents acting on them, by name. */
724
+ /** @description Someone who acted on a computer in the last 10 seconds, or the agent while a command it started there still runs. The person acts in a live view at operate: opening a shell, typing into or stopping a terminal, writing a file, any input to the browser but moving the pointer, or any input to the screen that Cua Driver did. Watching is not acting, and the person's own use of the screen, outside a live view, can't be seen. The person's shell, and what runs in it, counts for 10 seconds after their last input there. The agent acts by calling its endpoints: starting a command, which is acting on its terminal until the command ends, even one left running, such as a server, as the terminal shows it running; typing into one (waiting on its output adds nothing); any file tool, reads among them; any browser tool that is answered; and any screen tool. Computers attached to the same machine share its files and its screen: each is shown the person and the other computers' agents acting on them, by name. */
706
725
  Acting: {
707
726
  /** @enum {string} */
708
727
  who: "person" | "agent";
@@ -714,11 +733,11 @@ export interface components {
714
733
  terminal?: string;
715
734
  /**
716
735
  * Format: date-time
717
- * @description When it last acted there, as of this message: one who goes on acting is sent again only when someone starts or stops.
736
+ * @description When it last acted there, as of this message: one who goes on acting is sent again only when someone starts or stops. For the agent's command still running, when the agent started it or last typed into it, which can be more than 10 seconds ago; its end is its last act.
718
737
  */
719
738
  at: string;
720
739
  };
721
- /** @description What the service sends on a presence@1 socket, as JSON text: the whole list of everyone acting now, the most recent first, empty where nobody is. It is sent when the socket opens and each time someone starts acting on something, or stops: 10 seconds after they last acted there. Nothing is refused by it. What a socket sends is dropped. */
740
+ /** @description What the service sends on a presence@1 socket, as JSON text: the whole list of everyone acting now, the most recent first, empty where nobody is. It is sent when the socket opens and each time someone starts acting on something, or stops: 10 seconds after they last acted there, or, for the agent's command, 10 seconds after it ended. Nothing is refused by it. What a socket sends is dropped. */
722
741
  PresenceEvent: {
723
742
  /** @constant */
724
743
  type: "presence";
@@ -1020,6 +1039,44 @@ export interface operations {
1020
1039
  };
1021
1040
  };
1022
1041
  };
1042
+ openSetupSettings: {
1043
+ parameters: {
1044
+ query?: never;
1045
+ header?: never;
1046
+ path: {
1047
+ capability: components["schemas"]["Switch"];
1048
+ };
1049
+ cookie?: never;
1050
+ };
1051
+ requestBody: {
1052
+ content: {
1053
+ "application/json": {
1054
+ need: components["schemas"]["NeedName"];
1055
+ };
1056
+ };
1057
+ };
1058
+ responses: {
1059
+ /** @description Its pane asked to open. */
1060
+ 200: {
1061
+ headers: {
1062
+ [name: string]: unknown;
1063
+ };
1064
+ content: {
1065
+ "application/json": components["schemas"]["Setup"];
1066
+ };
1067
+ };
1068
+ 401: components["responses"]["Unauthorized"];
1069
+ /** @description The part doesn't need that here, it has no pane of System Settings, or the pane couldn't be opened. */
1070
+ 409: {
1071
+ headers: {
1072
+ [name: string]: unknown;
1073
+ };
1074
+ content: {
1075
+ "application/json": components["schemas"]["Error"];
1076
+ };
1077
+ };
1078
+ };
1079
+ };
1023
1080
  getActing: {
1024
1081
  parameters: {
1025
1082
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentorg/computer",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "Computers for agents, as a service: a terminal, files and a browser over MCP",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {