@agentorg/computer 0.0.21 → 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 +10 -3
- package/dist/agentcomputer.js +288 -41
- package/dist/types/generated/schema.d.ts +62 -5
- package/package.json +1 -1
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.
|
|
@@ -58,6 +58,11 @@ This computer:
|
|
|
58
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.
|
|
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.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
|
+
|
|
61
66
|
**Upgrading from 0.0.20:**
|
|
62
67
|
|
|
63
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.
|
|
@@ -187,6 +192,7 @@ The data folder is `--data`, else `$AGENTCOMPUTER_DATA`, else `$XDG_DATA_HOME/ag
|
|
|
187
192
|
| `GET /v1/setup` | |
|
|
188
193
|
| `PUT /v1/setup/{capability}` | |
|
|
189
194
|
| `POST /v1/setup/{capability}/ask` | |
|
|
195
|
+
| `POST /v1/setup/{capability}/settings` | |
|
|
190
196
|
|
|
191
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:
|
|
192
198
|
|
|
@@ -211,10 +217,11 @@ These take the control token, kept in the data folder. A computer's own endpoint
|
|
|
211
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.
|
|
212
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.
|
|
213
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:
|
|
214
|
-
- `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
|
|
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`.
|
|
215
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.
|
|
216
222
|
- With none named: the screen's grant while either is missing; the first browser installed, Chrome before Edge, while none is on.
|
|
217
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.
|
|
218
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.
|
|
219
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.
|
|
220
227
|
|
|
@@ -312,7 +319,7 @@ Every running computer has two more, to watch only:
|
|
|
312
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.
|
|
313
320
|
- **The disk is the volume its workspace is on,** not the workspace's own size.
|
|
314
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.
|
|
315
|
-
- **`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.
|
|
316
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.`
|
|
317
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.
|
|
318
325
|
- **Nothing is refused by it,** for the person or the agent.
|
package/dist/agentcomputer.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
@@ -98505,6 +98529,7 @@ var TOOL_SWITCH = {
|
|
|
98505
98529
|
browser_run_code_unsafe: "terminal"
|
|
98506
98530
|
};
|
|
98507
98531
|
var MAX_CALL = 4 * 1024 * 1024;
|
|
98532
|
+
var SCREEN_WAIT_MS = 1e3;
|
|
98508
98533
|
var ProcessRuntime = class {
|
|
98509
98534
|
#config;
|
|
98510
98535
|
#contained;
|
|
@@ -98515,9 +98540,11 @@ var ProcessRuntime = class {
|
|
|
98515
98540
|
/** The person's switches for this machine; inside a container there are none. */
|
|
98516
98541
|
#switches;
|
|
98517
98542
|
/**
|
|
98518
|
-
* Whether the screen can be reached, as last checked.
|
|
98519
|
-
*
|
|
98520
|
-
*
|
|
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.
|
|
98521
98548
|
*/
|
|
98522
98549
|
#screen = {
|
|
98523
98550
|
ready: false,
|
|
@@ -98549,9 +98576,18 @@ var ProcessRuntime = class {
|
|
|
98549
98576
|
});
|
|
98550
98577
|
return this.#checking;
|
|
98551
98578
|
}
|
|
98552
|
-
/** The screen's readiness
|
|
98553
|
-
#screenNow() {
|
|
98554
|
-
if (Date.now() - this.#screen.at > 1e4)
|
|
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
|
+
}
|
|
98555
98591
|
const { at: _, ...ready } = this.#screen;
|
|
98556
98592
|
return ready;
|
|
98557
98593
|
}
|
|
@@ -98565,23 +98601,22 @@ var ProcessRuntime = class {
|
|
|
98565
98601
|
const reason3 = this.#switches?.refused(which);
|
|
98566
98602
|
return reason3 ? { ready: false, reason: reason3 } : ready;
|
|
98567
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
|
+
]);
|
|
98568
98608
|
return {
|
|
98569
98609
|
ready: true,
|
|
98570
98610
|
capabilities: [
|
|
98571
98611
|
{ capability: "about", ready: true },
|
|
98572
98612
|
{ capability: "terminal", ...unless("terminal", { ready: true }) },
|
|
98573
98613
|
{ capability: "files", ...unless("files", { ready: true }) },
|
|
98574
|
-
{ capability: "screen", ...unless("screen",
|
|
98614
|
+
{ capability: "screen", ...unless("screen", screen) }
|
|
98575
98615
|
],
|
|
98576
98616
|
browsers: [
|
|
98577
98617
|
{ kind: "headless", ...browserProgram(this.#config) },
|
|
98578
98618
|
// The person's own, which only this computer has.
|
|
98579
|
-
...
|
|
98580
|
-
{
|
|
98581
|
-
kind: "own",
|
|
98582
|
-
...unless("browser", readiness(await ownBrowser(this.#ownBrowserData)))
|
|
98583
|
-
}
|
|
98584
|
-
]
|
|
98619
|
+
...own3 === void 0 ? [] : [{ kind: "own", ...unless("browser", readiness(own3)) }]
|
|
98585
98620
|
]
|
|
98586
98621
|
};
|
|
98587
98622
|
}
|
|
@@ -98770,7 +98805,7 @@ var ProcessRuntime = class {
|
|
|
98770
98805
|
};
|
|
98771
98806
|
|
|
98772
98807
|
// src/handlers.ts
|
|
98773
|
-
var VERSION2 = "0.0.
|
|
98808
|
+
var VERSION2 = "0.0.22";
|
|
98774
98809
|
function createHandlers(computers, connections, setup) {
|
|
98775
98810
|
return {
|
|
98776
98811
|
getInfo: async () => ({ version: VERSION2, ...await computers.offers() }),
|
|
@@ -98778,6 +98813,7 @@ function createHandlers(computers, connections, setup) {
|
|
|
98778
98813
|
getSetup: () => setup.capabilities(),
|
|
98779
98814
|
setSetup: ({ capability, on }) => setup.set(capability, on),
|
|
98780
98815
|
askSetup: ({ capability, need }) => setup.ask(capability, need),
|
|
98816
|
+
openSetupSettings: ({ capability, need }) => setup.settings(capability, need),
|
|
98781
98817
|
getActing: async () => computers.acting(),
|
|
98782
98818
|
listComputers: async ({ state }) => computers.list(state),
|
|
98783
98819
|
createComputer: (input3) => computers.create(input3),
|
|
@@ -100201,14 +100237,16 @@ var Computers = class {
|
|
|
100201
100237
|
}
|
|
100202
100238
|
/** What it offers: this computer, and each kind it makes, with whether it can be now. */
|
|
100203
100239
|
async offers() {
|
|
100204
|
-
const offered = await
|
|
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
|
+
]);
|
|
100205
100249
|
const thisComputer = this.#notHere ? { ...offered, ready: false, reason: this.#notHere } : offered;
|
|
100206
|
-
const made = await Promise.all(
|
|
100207
|
-
Object.keys(this.#runtimes).filter((isolation) => isolation !== "none").map(async (isolation) => ({
|
|
100208
|
-
isolation,
|
|
100209
|
-
...await this.#runtime(isolation).offer()
|
|
100210
|
-
}))
|
|
100211
|
-
);
|
|
100212
100250
|
return { thisComputer, made };
|
|
100213
100251
|
}
|
|
100214
100252
|
/**
|
|
@@ -100698,7 +100736,7 @@ var OPENAPI = {
|
|
|
100698
100736
|
"openapi": "3.1.0",
|
|
100699
100737
|
"info": {
|
|
100700
100738
|
"title": "AgentComputer",
|
|
100701
|
-
"version": "0.0.
|
|
100739
|
+
"version": "0.0.22",
|
|
100702
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.",
|
|
100703
100741
|
"license": {
|
|
100704
100742
|
"name": "Apache-2.0",
|
|
@@ -100721,7 +100759,7 @@ var OPENAPI = {
|
|
|
100721
100759
|
"get": {
|
|
100722
100760
|
"operationId": "getInfo",
|
|
100723
100761
|
"x-mcp-tool": "service_info",
|
|
100724
|
-
"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.",
|
|
100725
100763
|
"responses": {
|
|
100726
100764
|
"200": {
|
|
100727
100765
|
"description": "The service.",
|
|
@@ -100854,7 +100892,7 @@ var OPENAPI = {
|
|
|
100854
100892
|
],
|
|
100855
100893
|
"post": {
|
|
100856
100894
|
"operationId": "askSetup",
|
|
100857
|
-
"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.
|
|
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.",
|
|
100858
100896
|
"requestBody": {
|
|
100859
100897
|
"content": {
|
|
100860
100898
|
"application/json": {
|
|
@@ -100897,6 +100935,66 @@ var OPENAPI = {
|
|
|
100897
100935
|
}
|
|
100898
100936
|
}
|
|
100899
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
|
+
},
|
|
100900
100998
|
"/v1/acting": {
|
|
100901
100999
|
"get": {
|
|
100902
101000
|
"operationId": "getActing",
|
|
@@ -102738,7 +102836,7 @@ var OPENAPI = {
|
|
|
102738
102836
|
}
|
|
102739
102837
|
},
|
|
102740
102838
|
"Acting": {
|
|
102741
|
-
"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
|
|
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.",
|
|
102742
102840
|
"type": "object",
|
|
102743
102841
|
"required": [
|
|
102744
102842
|
"who",
|
|
@@ -102774,12 +102872,12 @@ var OPENAPI = {
|
|
|
102774
102872
|
"at": {
|
|
102775
102873
|
"type": "string",
|
|
102776
102874
|
"format": "date-time",
|
|
102777
|
-
"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."
|
|
102778
102876
|
}
|
|
102779
102877
|
}
|
|
102780
102878
|
},
|
|
102781
102879
|
"PresenceEvent": {
|
|
102782
|
-
"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.",
|
|
102783
102881
|
"type": "object",
|
|
102784
102882
|
"required": [
|
|
102785
102883
|
"type",
|
|
@@ -103293,7 +103391,7 @@ var OPERATIONS = [
|
|
|
103293
103391
|
"method": "GET",
|
|
103294
103392
|
"path": "/v1/info",
|
|
103295
103393
|
"tool": "service_info",
|
|
103296
|
-
"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.",
|
|
103297
103395
|
"status": 200,
|
|
103298
103396
|
"hasBody": false,
|
|
103299
103397
|
"pathParameters": [],
|
|
@@ -103845,7 +103943,7 @@ var OPERATIONS = [
|
|
|
103845
103943
|
"operationId": "askSetup",
|
|
103846
103944
|
"method": "POST",
|
|
103847
103945
|
"path": "/v1/setup/{capability}/ask",
|
|
103848
|
-
"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.
|
|
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.",
|
|
103849
103947
|
"status": 200,
|
|
103850
103948
|
"hasBody": true,
|
|
103851
103949
|
"pathParameters": [
|
|
@@ -103971,6 +104069,137 @@ var OPERATIONS = [
|
|
|
103971
104069
|
},
|
|
103972
104070
|
"websocket": false
|
|
103973
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
|
+
},
|
|
103974
104203
|
{
|
|
103975
104204
|
"operationId": "getActing",
|
|
103976
104205
|
"method": "GET",
|
|
@@ -103989,7 +104218,7 @@ var OPERATIONS = [
|
|
|
103989
104218
|
"output": {
|
|
103990
104219
|
"type": "array",
|
|
103991
104220
|
"items": {
|
|
103992
|
-
"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
|
|
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.",
|
|
103993
104222
|
"type": "object",
|
|
103994
104223
|
"required": [
|
|
103995
104224
|
"who",
|
|
@@ -104025,7 +104254,7 @@ var OPERATIONS = [
|
|
|
104025
104254
|
"at": {
|
|
104026
104255
|
"type": "string",
|
|
104027
104256
|
"format": "date-time",
|
|
104028
|
-
"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."
|
|
104029
104258
|
}
|
|
104030
104259
|
}
|
|
104031
104260
|
}
|
|
@@ -106404,11 +106633,31 @@ var Setup = class {
|
|
|
106404
106633
|
}
|
|
106405
106634
|
return this.capabilities();
|
|
106406
106635
|
}
|
|
106407
|
-
/**
|
|
106408
|
-
|
|
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) {
|
|
106409
106653
|
const { needs } = (await this.#parts())[capability];
|
|
106410
106654
|
if (need && !needs.some((one) => one.need === need))
|
|
106411
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);
|
|
106412
106661
|
if (this.#machine.platform !== "darwin") return;
|
|
106413
106662
|
if (capability === "screen") {
|
|
106414
106663
|
const driver = findDriver(this.#driver);
|
|
@@ -106416,8 +106665,6 @@ var Setup = class {
|
|
|
106416
106665
|
const asked = needs.filter((one) => one.state !== "granted" && (!need || one.need === need)).map((one) => one.need);
|
|
106417
106666
|
if (asked.length > 0)
|
|
106418
106667
|
await (driver.socket ? this.#askHost(driver, asked) : this.#askScreen(driver));
|
|
106419
|
-
const pane = need && PANE[need];
|
|
106420
|
-
if (pane) await this.#machine.run("/usr/bin/open", [pane]);
|
|
106421
106668
|
}
|
|
106422
106669
|
if (capability === "browser" && (need || !needs.some((one) => one.state === "on")))
|
|
106423
106670
|
await this.#askBrowser(need);
|
|
@@ -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.
|
|
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
|
|
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;
|