@agentorg/cli 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +10 -7
  2. package/dist/node_modules/@agentorg/computer/LICENSE +201 -0
  3. package/dist/node_modules/@agentorg/computer/NOTICE +2 -0
  4. package/dist/node_modules/@agentorg/computer/dist/THIRD_PARTY_LICENSES.txt +1321 -0
  5. package/dist/node_modules/@agentorg/computer/dist/sdk.js +24909 -0
  6. package/dist/node_modules/@agentorg/computer/dist/types/generated/schema.d.ts +860 -0
  7. package/dist/node_modules/@agentorg/computer/dist/types/sdk.d.ts +242 -0
  8. package/dist/node_modules/@agentorg/computer/package.json +12 -0
  9. package/dist/node_modules/@agentorg/computer-connector/dist/src/index.d.ts +1 -0
  10. package/dist/node_modules/@agentorg/computer-connector/dist/src/index.js +1 -0
  11. package/dist/node_modules/@agentorg/computer-connector/dist/src/provider.d.ts +24 -0
  12. package/dist/node_modules/@agentorg/computer-connector/dist/src/provider.js +482 -0
  13. package/dist/node_modules/@agentorg/computer-connector/dist/src/unit.d.ts +19 -0
  14. package/dist/node_modules/@agentorg/computer-connector/dist/src/unit.js +149 -0
  15. package/dist/node_modules/@agentorg/computer-connector/package.json +33 -0
  16. package/dist/node_modules/@agentorg/computer-connector/skills/browser/SKILL.md +31 -0
  17. package/dist/node_modules/@agentorg/computer-connector/skills/computer/SKILL.md +30 -0
  18. package/dist/node_modules/@agentorg/computer-connector/skills/files/SKILL.md +28 -0
  19. package/dist/node_modules/@agentorg/computer-connector/skills/terminal/SKILL.md +39 -0
  20. package/dist/node_modules/@agentorg/computer-connector/skills/web-research/SKILL.md +29 -0
  21. package/dist/node_modules/@agentorg/hub/dist/src/router.d.ts +4 -2
  22. package/dist/node_modules/@agentorg/hub/dist/src/router.js +3 -1
  23. package/dist/node_modules/@agentorg/hub/dist/src/validate.js +16 -2
  24. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-provider.d.ts +34 -47
  25. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-provider.js +25 -34
  26. package/dist/node_modules/@agentorg/interfaces/dist/src/chat.d.ts +90 -50
  27. package/dist/node_modules/@agentorg/interfaces/dist/src/chat.js +69 -34
  28. package/dist/node_modules/@agentorg/interfaces/dist/src/connection.d.ts +36 -0
  29. package/dist/node_modules/@agentorg/interfaces/dist/src/connection.js +31 -0
  30. package/dist/node_modules/@agentorg/interfaces/dist/src/folders.d.ts +19 -0
  31. package/dist/node_modules/@agentorg/interfaces/dist/src/folders.js +25 -0
  32. package/dist/node_modules/@agentorg/interfaces/dist/src/index.d.ts +6 -4
  33. package/dist/node_modules/@agentorg/interfaces/dist/src/index.js +6 -4
  34. package/dist/node_modules/@agentorg/interfaces/dist/src/llm-session.d.ts +2 -0
  35. package/dist/node_modules/@agentorg/interfaces/dist/src/llm-session.js +2 -1
  36. package/dist/node_modules/@agentorg/interfaces/dist/src/manager.d.ts +381 -27
  37. package/dist/node_modules/@agentorg/interfaces/dist/src/manager.js +179 -15
  38. package/dist/node_modules/@agentorg/interfaces/dist/src/units.d.ts +460 -0
  39. package/dist/node_modules/@agentorg/interfaces/dist/src/units.js +204 -0
  40. package/dist/node_modules/@agentorg/looper/dist/src/index.d.ts +5 -0
  41. package/dist/node_modules/@agentorg/looper/dist/src/index.js +5 -0
  42. package/dist/node_modules/@agentorg/looper/dist/src/loop.d.ts +75 -0
  43. package/dist/node_modules/@agentorg/looper/dist/src/loop.js +332 -0
  44. package/dist/node_modules/@agentorg/looper/dist/src/looper.d.ts +71 -0
  45. package/dist/node_modules/@agentorg/looper/dist/src/looper.js +282 -0
  46. package/dist/node_modules/@agentorg/looper/dist/src/record.d.ts +99 -0
  47. package/dist/node_modules/{assistant/dist/src/history.js → @agentorg/looper/dist/src/record.js} +89 -46
  48. package/dist/node_modules/@agentorg/looper/dist/src/tools.d.ts +11 -0
  49. package/dist/node_modules/@agentorg/looper/dist/src/tools.js +42 -0
  50. package/dist/node_modules/@agentorg/looper/dist/src/types.d.ts +147 -0
  51. package/dist/node_modules/@agentorg/looper/dist/src/types.js +32 -0
  52. package/dist/node_modules/@agentorg/looper/package.json +24 -0
  53. package/dist/node_modules/@agentorg/manager/dist/src/activity.d.ts +18 -0
  54. package/dist/node_modules/@agentorg/manager/dist/src/activity.js +65 -0
  55. package/dist/node_modules/@agentorg/manager/dist/src/control.d.ts +134 -0
  56. package/dist/node_modules/@agentorg/manager/dist/src/control.js +1115 -0
  57. package/dist/node_modules/@agentorg/manager/dist/src/form.d.ts +40 -0
  58. package/dist/node_modules/@agentorg/manager/dist/src/form.js +191 -0
  59. package/dist/node_modules/@agentorg/manager/dist/src/manager.d.ts +4 -0
  60. package/dist/node_modules/@agentorg/manager/dist/src/manager.js +341 -189
  61. package/dist/node_modules/@agentorg/manager/dist/src/skills.d.ts +2 -0
  62. package/dist/node_modules/@agentorg/manager/dist/src/skills.js +7 -0
  63. package/dist/node_modules/@agentorg/manager/dist/src/stack.d.ts +454 -0
  64. package/dist/node_modules/@agentorg/manager/dist/src/stack.js +917 -0
  65. package/dist/node_modules/@agentorg/mcp/dist/src/connection.d.ts +2 -1
  66. package/dist/node_modules/@agentorg/mcp/dist/src/connection.js +8 -2
  67. package/dist/node_modules/@agentorg/mcp/dist/src/index.d.ts +3 -0
  68. package/dist/node_modules/@agentorg/mcp/dist/src/index.js +3 -0
  69. package/dist/node_modules/@agentorg/mcp/dist/src/kinds.d.ts +108 -0
  70. package/dist/node_modules/@agentorg/mcp/dist/src/kinds.js +95 -0
  71. package/dist/node_modules/@agentorg/mcp/dist/src/provider.d.ts +2 -2
  72. package/dist/node_modules/@agentorg/mcp/dist/src/provider.js +48 -18
  73. package/dist/node_modules/@agentorg/mcp/dist/src/public.d.ts +6 -0
  74. package/dist/node_modules/@agentorg/mcp/dist/src/public.js +72 -0
  75. package/dist/node_modules/@agentorg/sdk/dist/src/filled.d.ts +21 -0
  76. package/dist/node_modules/@agentorg/sdk/dist/src/filled.js +24 -0
  77. package/dist/node_modules/@agentorg/sdk/dist/src/index.d.ts +1 -0
  78. package/dist/node_modules/@agentorg/sdk/dist/src/index.js +1 -0
  79. package/dist/node_modules/@agentorg/shell/dist/app.css +1289 -100
  80. package/dist/node_modules/@agentorg/shell/dist/app.js +207 -166
  81. package/dist/node_modules/@agentorg/shell/package.json +6 -1
  82. package/dist/node_modules/assistant/dist/src/chats.d.ts +92 -0
  83. package/dist/node_modules/assistant/dist/src/chats.js +357 -0
  84. package/dist/node_modules/assistant/dist/src/engine.d.ts +26 -7
  85. package/dist/node_modules/assistant/dist/src/engine.js +107 -35
  86. package/dist/node_modules/assistant/dist/src/local-store.js +1 -1
  87. package/dist/node_modules/assistant/dist/src/provider.d.ts +1 -1
  88. package/dist/node_modules/assistant/dist/src/provider.js +47 -19
  89. package/dist/node_modules/assistant/dist/src/tools.d.ts +11 -28
  90. package/dist/node_modules/assistant/dist/src/tools.js +19 -40
  91. package/dist/node_modules/assistant/package.json +1 -0
  92. package/dist/src/api.js +4 -0
  93. package/dist/src/folders.d.ts +2 -0
  94. package/dist/src/folders.js +45 -0
  95. package/dist/src/gateway.d.ts +7 -1
  96. package/dist/src/gateway.js +81 -12
  97. package/dist/src/live.d.ts +17 -0
  98. package/dist/src/live.js +109 -0
  99. package/dist/src/programs.d.ts +7 -0
  100. package/dist/src/programs.js +29 -2
  101. package/dist/src/signin.d.ts +12 -3
  102. package/dist/src/signin.js +30 -6
  103. package/package.json +2 -1
  104. package/dist/node_modules/@agentorg/interfaces/dist/src/mcp-provider.d.ts +0 -88
  105. package/dist/node_modules/@agentorg/interfaces/dist/src/mcp-provider.js +0 -78
  106. package/dist/node_modules/assistant/dist/src/agent.d.ts +0 -62
  107. package/dist/node_modules/assistant/dist/src/agent.js +0 -226
  108. package/dist/node_modules/assistant/dist/src/history.d.ts +0 -97
@@ -0,0 +1,860 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/v1/info": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /** What this service is and how it isolates its computers. */
15
+ get: operations["getInfo"];
16
+ put?: never;
17
+ post?: never;
18
+ delete?: never;
19
+ options?: never;
20
+ head?: never;
21
+ patch?: never;
22
+ trace?: never;
23
+ };
24
+ "/v1/computers": {
25
+ parameters: {
26
+ query?: never;
27
+ header?: never;
28
+ path?: never;
29
+ cookie?: never;
30
+ };
31
+ /** List the computers. */
32
+ get: operations["listComputers"];
33
+ put?: never;
34
+ /** Create a computer. It answers once the computer is running. */
35
+ post: operations["createComputer"];
36
+ delete?: never;
37
+ options?: never;
38
+ head?: never;
39
+ patch?: never;
40
+ trace?: never;
41
+ };
42
+ "/v1/computers/{computerID}": {
43
+ parameters: {
44
+ query?: never;
45
+ header?: never;
46
+ path: {
47
+ computerID: components["parameters"]["computerID"];
48
+ };
49
+ cookie?: never;
50
+ };
51
+ /** One computer, with how long it has run and the tools it offers. */
52
+ get: operations["getComputer"];
53
+ put?: never;
54
+ post?: never;
55
+ /** Stop it for good and remove what the service made. A folder someone named stays. */
56
+ delete: operations["killComputer"];
57
+ options?: never;
58
+ head?: never;
59
+ patch?: never;
60
+ trace?: never;
61
+ };
62
+ "/v1/computers/{computerID}/timeout": {
63
+ parameters: {
64
+ query?: never;
65
+ header?: never;
66
+ path: {
67
+ computerID: components["parameters"]["computerID"];
68
+ };
69
+ cookie?: never;
70
+ };
71
+ get?: never;
72
+ put?: never;
73
+ /** It now stops this many seconds from now, replacing any earlier timeout. */
74
+ post: operations["setComputerTimeout"];
75
+ delete?: never;
76
+ options?: never;
77
+ head?: never;
78
+ patch?: never;
79
+ trace?: never;
80
+ };
81
+ "/v1/computers/{computerID}/stop": {
82
+ parameters: {
83
+ query?: never;
84
+ header?: never;
85
+ path: {
86
+ computerID: components["parameters"]["computerID"];
87
+ };
88
+ cookie?: never;
89
+ };
90
+ get?: never;
91
+ put?: never;
92
+ /** Stop what it is running. Its folder and its token stay, and it can start again. */
93
+ post: operations["stopComputer"];
94
+ delete?: never;
95
+ options?: never;
96
+ head?: never;
97
+ patch?: never;
98
+ trace?: never;
99
+ };
100
+ "/v1/computers/{computerID}/start": {
101
+ parameters: {
102
+ query?: never;
103
+ header?: never;
104
+ path: {
105
+ computerID: components["parameters"]["computerID"];
106
+ };
107
+ cookie?: never;
108
+ };
109
+ get?: never;
110
+ put?: never;
111
+ /** Start a stopped computer again, with the same token and folder. */
112
+ post: operations["startComputer"];
113
+ delete?: never;
114
+ options?: never;
115
+ head?: never;
116
+ patch?: never;
117
+ trace?: never;
118
+ };
119
+ "/v1/computers/{computerID}/logs": {
120
+ parameters: {
121
+ query?: never;
122
+ header?: never;
123
+ path: {
124
+ computerID: components["parameters"]["computerID"];
125
+ };
126
+ cookie?: never;
127
+ };
128
+ /** What its servers wrote, and each request it was sent. */
129
+ get: operations["getComputerLogs"];
130
+ put?: never;
131
+ post?: never;
132
+ delete?: never;
133
+ options?: never;
134
+ head?: never;
135
+ patch?: never;
136
+ trace?: never;
137
+ };
138
+ "/v1/computers/{computerID}/live": {
139
+ parameters: {
140
+ query?: never;
141
+ header?: never;
142
+ path: {
143
+ computerID: components["parameters"]["computerID"];
144
+ };
145
+ cookie?: never;
146
+ };
147
+ get?: never;
148
+ put?: never;
149
+ /** A one-time ticket to watch or operate one of its surfaces live: its terminals, its files, its browser, or its load. Open its url as a WebSocket within 60 seconds. */
150
+ post: operations["createLiveSession"];
151
+ delete?: never;
152
+ options?: never;
153
+ head?: never;
154
+ patch?: never;
155
+ trace?: never;
156
+ };
157
+ "/v1/live/{liveID}": {
158
+ parameters: {
159
+ query?: never;
160
+ header?: never;
161
+ path: {
162
+ liveID: string;
163
+ };
164
+ cookie?: never;
165
+ };
166
+ /** Open a live session as a WebSocket. The ticket in its path is its authority and works once, so it takes no token. A request with an Origin header is refused unless the service was told to allow that origin. */
167
+ get: operations["openLiveSession"];
168
+ put?: never;
169
+ post?: never;
170
+ delete?: never;
171
+ options?: never;
172
+ head?: never;
173
+ patch?: never;
174
+ trace?: never;
175
+ };
176
+ }
177
+ export type webhooks = Record<string, never>;
178
+ export interface components {
179
+ schemas: {
180
+ Error: {
181
+ code: number;
182
+ message: string;
183
+ };
184
+ /**
185
+ * @description How far it reaches into files and commands, each level containing the one before: `read` has read, list and search; `files` adds edit; `terminal` adds exec_command, write_stdin and list_sessions. Below terminal, the browser's code-running tool is hidden.
186
+ * @enum {string}
187
+ */
188
+ Access: "none" | "read" | "files" | "terminal";
189
+ /** @enum {string} */
190
+ ComputerState: "running" | "stopped" | "failed";
191
+ /** @description Seconds from now until the computer stops. */
192
+ Timeout: number;
193
+ /** @description Your own labels, kept and returned as given. */
194
+ Metadata: {
195
+ [key: string]: string;
196
+ };
197
+ NewComputer: {
198
+ name?: string;
199
+ access: components["schemas"]["Access"];
200
+ /**
201
+ * @description Whether it has a browser. With access none, it must.
202
+ * @default false
203
+ */
204
+ browser: boolean;
205
+ /** @description The full path of a folder that exists, on the service's machine. With none, the service makes a folder, which goes when the computer is killed. A folder named here never does. */
206
+ workspace?: string;
207
+ timeout?: components["schemas"]["Timeout"];
208
+ metadata?: components["schemas"]["Metadata"];
209
+ };
210
+ /** @description MCP over Streamable HTTP, each taking the computer's access token as a bearer. */
211
+ Endpoints: {
212
+ /** @description The terminal and files. */
213
+ computer: string | null;
214
+ /** @description The browser. */
215
+ browser: string | null;
216
+ };
217
+ Computer: {
218
+ computerID: string;
219
+ name: string;
220
+ state: components["schemas"]["ComputerState"];
221
+ access: components["schemas"]["Access"];
222
+ browser: boolean;
223
+ workspace: string | null;
224
+ /**
225
+ * Format: date-time
226
+ * @description When it last started.
227
+ */
228
+ startedAt: string;
229
+ /**
230
+ * Format: date-time
231
+ * @description When it will stop; null if it has no timeout.
232
+ */
233
+ endAt: string | null;
234
+ metadata: components["schemas"]["Metadata"];
235
+ endpoints: components["schemas"]["Endpoints"];
236
+ };
237
+ CreatedComputer: components["schemas"]["Computer"] & {
238
+ /** @description Good only for this computer's endpoints. Shown only now. */
239
+ accessToken: string;
240
+ };
241
+ ComputerDetail: components["schemas"]["Computer"] & {
242
+ uptimeSeconds: number;
243
+ /** @description What can be opened live while it runs. */
244
+ surfaces: components["schemas"]["SurfaceInfo"][];
245
+ tools: {
246
+ computer: string[];
247
+ browser: string[];
248
+ };
249
+ };
250
+ /**
251
+ * @description terminal: every terminal on it, the agent's commands and a person's shells alike, on one socket in terminal@1: text messages are TerminalEvent one way and TerminalInput the other. Watching reads them all; operating also opens a shell, types into any of them, the agent's included, sizes and stops them. files: its workspace's files, in files@1: text messages are FilesRequest one way and FilesAnswer the other, and a file's bytes travel as binary messages of at most 1,048,576 bytes. Watching lists and reads; operating also writes, which a computer with read access doesn't offer. browser: its browser, in screencast@1: binary messages are JPEG frames of the page shown, text messages are ScreencastEvent one way and ScreencastInput the other. Nobody waits for anybody: the agent's tools and a person's input act on the same browser at once. The page shown is each socket's own. A socket is shown each new tab as it opens, until it sends a tab input to show or open one; from then its page changes only when that page closes. load: how busy it is, in metrics@1, to watch only: a LoadReading every two seconds while a socket is open, the first two seconds after the first socket opens, and the last one at once to a socket that opens later. One that can't be taken is left out, and a socket that hasn't read the one before is not sent the next. Nothing is read while nobody watches.
252
+ * @enum {string}
253
+ */
254
+ Surface: "terminal" | "files" | "browser" | "load";
255
+ /**
256
+ * @description In watch you see and don't act: what you send is dropped, except that a files socket may still ask to list, to read and for what changed.
257
+ * @enum {string}
258
+ */
259
+ LiveMode: "watch" | "operate";
260
+ SurfaceInfo: {
261
+ surface: components["schemas"]["Surface"];
262
+ protocol: string;
263
+ /** @description Whether it can be operated */
264
+ operate: boolean;
265
+ /** @description Why it can't be opened now, if it can't. */
266
+ unavailable?: string;
267
+ };
268
+ NewLiveSession: {
269
+ surface: components["schemas"]["Surface"];
270
+ /** @default watch */
271
+ mode: components["schemas"]["LiveMode"];
272
+ };
273
+ LiveSession: {
274
+ /** @description The WebSocket to open */
275
+ url: string;
276
+ protocol: string;
277
+ surface: components["schemas"]["Surface"];
278
+ mode: components["schemas"]["LiveMode"];
279
+ /** Format: date-time */
280
+ expiresAt: string;
281
+ };
282
+ /** @description What the service sends on a screencast@1 socket, as JSON text. */
283
+ ScreencastEvent: {
284
+ /** @constant */
285
+ type: "tabs";
286
+ tabs: {
287
+ id: number;
288
+ url: string;
289
+ title: string;
290
+ }[];
291
+ shown: number | null;
292
+ } | {
293
+ /** @constant */
294
+ type: "viewport";
295
+ width: number;
296
+ height: number;
297
+ } | {
298
+ /** @constant */
299
+ type: "dialog";
300
+ open: boolean;
301
+ /** @enum {string} */
302
+ kind?: "alert" | "confirm" | "prompt" | "beforeunload";
303
+ message?: string;
304
+ defaultValue?: string;
305
+ } | {
306
+ /** @constant */
307
+ type: "file-chooser";
308
+ open: boolean;
309
+ multiple?: boolean;
310
+ } | {
311
+ /** @constant */
312
+ type: "choice";
313
+ multiple: boolean;
314
+ options: {
315
+ value: string;
316
+ label: string;
317
+ selected: boolean;
318
+ }[];
319
+ };
320
+ /** @description What an operate socket sends on screencast@1, as JSON text. A watch socket's is dropped. */
321
+ ScreencastInput: {
322
+ /** @constant */
323
+ type: "mouse";
324
+ /** @enum {string} */
325
+ action: "move" | "down" | "up" | "wheel";
326
+ x: number;
327
+ y: number;
328
+ /** @enum {string} */
329
+ button?: "left" | "right" | "middle";
330
+ deltaX?: number;
331
+ deltaY?: number;
332
+ } | {
333
+ /** @constant */
334
+ type: "key";
335
+ /** @enum {string} */
336
+ action: "down" | "up";
337
+ /** @description A key name */
338
+ key: string;
339
+ } | {
340
+ /** @constant */
341
+ type: "text";
342
+ text: string;
343
+ } | {
344
+ /** @constant */
345
+ type: "dialog";
346
+ accept: boolean;
347
+ text?: string;
348
+ } | {
349
+ /** @constant */
350
+ type: "files";
351
+ files: {
352
+ name: string;
353
+ mimeType?: string;
354
+ /** @description Base64. */
355
+ data: string;
356
+ }[];
357
+ } | {
358
+ /** @constant */
359
+ type: "choice";
360
+ values: string[];
361
+ } | {
362
+ /** @constant */
363
+ type: "tab";
364
+ /** @enum {string} */
365
+ action: "show" | "open" | "close";
366
+ id?: number;
367
+ url?: string;
368
+ } | {
369
+ /** @constant */
370
+ type: "navigate";
371
+ /** @description A URL, or back, forward or reload. */
372
+ to: string;
373
+ };
374
+ /** @description What the service sends on a terminal@1 socket, as JSON text, no message over 65,536 bytes. A terminal is a command the agent started or a shell a person opened; its id is the session id the agent's tools use. A new socket is first sent, for each terminal already there, the oldest first, its start, the end of what it wrote (its last 65,536 characters), and its exit if it has ended; then each event as it happens, with nothing to mark where the first ends. The last 64 that ended are among those already there, and one that leaves that list is not told. A character here is a UTF-16 unit. A socket with more than 4 MiB still to be sent to it is closed, with no close frame (1006): one that has stopped reading, or one that is reading while a terminal writes tens of megabytes at once. It isn't an error. Opened again, it is sent every terminal afresh, with the last 65,536 characters each wrote, in place of whatever it held. */
375
+ TerminalEvent: {
376
+ /** @constant */
377
+ type: "start";
378
+ id: string;
379
+ /**
380
+ * @description The way in it came: agent through a tool, person through this surface.
381
+ * @enum {string}
382
+ */
383
+ by: "agent" | "person";
384
+ /** @description Its command, the first 8,000 characters of it. */
385
+ cmd: string;
386
+ /** @description Its folder, the first 2,000 characters of it. */
387
+ workdir: string;
388
+ /** @description Whether it is on a terminal device, as a person's shell is. One that isn't, as the agent's commands aren't, echoes nothing typed into it and wants a line feed for Enter. Nothing tells the size of one that is. */
389
+ tty: boolean;
390
+ /** Format: date-time */
391
+ at: string;
392
+ } | {
393
+ /** @constant */
394
+ type: "output";
395
+ id: string;
396
+ /**
397
+ * @description Left out for one on a terminal device, which has one stream, and in what a new socket is first sent, where the two are one text.
398
+ * @enum {string}
399
+ */
400
+ stream?: "stdout" | "stderr";
401
+ text: string;
402
+ } | {
403
+ /** @constant */
404
+ type: "exit";
405
+ id: string;
406
+ exitCode: number;
407
+ /** Format: date-time */
408
+ at: string;
409
+ } | {
410
+ /** @constant */
411
+ type: "refused";
412
+ message: string;
413
+ };
414
+ /** @description What an operate socket sends on terminal@1, as JSON text. One that can't be done, or that is none of these, is answered with refused. What a watch socket sends is dropped. A message over 65,536 bytes closes the socket, so a long text goes as several inputs. */
415
+ TerminalInput: {
416
+ /** @constant */
417
+ type: "open";
418
+ columns: number;
419
+ rows: number;
420
+ } | {
421
+ /** @constant */
422
+ type: "input";
423
+ id: string;
424
+ text: string;
425
+ } | {
426
+ /** @constant */
427
+ type: "resize";
428
+ id: string;
429
+ columns: number;
430
+ rows: number;
431
+ } | {
432
+ /** @constant */
433
+ type: "stop";
434
+ id: string;
435
+ };
436
+ /** @description What the service sends on a metrics@1 socket, as JSON text. What a socket sends is dropped. */
437
+ LoadReading: {
438
+ /** @constant */
439
+ type: "reading";
440
+ /**
441
+ * @description Whose numbers these are. computer: this computer's own, which a container's are. machine: the whole machine's, which a computer with no isolation shares with whatever else runs there, so every computer of that service reads the same; and a container's where it can't read its own.
442
+ * @enum {string}
443
+ */
444
+ scope: "computer" | "machine";
445
+ /** @description Of all the machine's CPUs, since the reading before. One decimal. */
446
+ cpuUsedPct: number;
447
+ /** @description Bytes in use. */
448
+ memUsed: number;
449
+ /** @description Bytes the machine has: no computer has a limit. */
450
+ memTotal: number;
451
+ /** @description Bytes used on the volume its workspace is on, or its own folder where it has no workspace. The volume's, not the workspace's own size. */
452
+ diskUsed: number;
453
+ /** @description Bytes on that volume. */
454
+ diskTotal: number;
455
+ };
456
+ /** @description What a socket sends on files@1, as JSON text. Each has an id of its own choosing, which the answer repeats; answers come as they are ready, in any order, and ids aren't checked for repeats. A request still unanswered when the socket closes gets no answer. A path is from the workspace, with / between its parts, or absolute inside it, and nothing outside the workspace is reached. A binary message that follows no write closes the socket, and so does any message over 1,048,576 bytes. */
457
+ FilesRequest: {
458
+ /** @constant */
459
+ type: "list";
460
+ id: string;
461
+ /** @description The workspace itself, if left out. */
462
+ path?: string;
463
+ } | {
464
+ /** @constant */
465
+ type: "read";
466
+ id: string;
467
+ path: string;
468
+ offset: number;
469
+ length: number;
470
+ } | {
471
+ /** @constant */
472
+ type: "changed";
473
+ id: string;
474
+ /** Format: date-time */
475
+ since: string;
476
+ } | {
477
+ /** @constant */
478
+ type: "write";
479
+ id: string;
480
+ path: string;
481
+ offset: number;
482
+ length: number;
483
+ last: boolean;
484
+ };
485
+ /** @description What the service sends on files@1, as JSON text, each with the id it answers. Nothing comes between a data message and its bytes. */
486
+ FilesAnswer: {
487
+ /** @constant */
488
+ type: "entries";
489
+ id: string;
490
+ path: string;
491
+ entries: {
492
+ name: string;
493
+ /** @enum {string} */
494
+ kind: "file" | "folder" | "link";
495
+ size: number;
496
+ /** Format: date-time */
497
+ modifiedAt: string;
498
+ }[];
499
+ /** @description Whether the folder has more than these. */
500
+ more: boolean;
501
+ } | {
502
+ /** @constant */
503
+ type: "data";
504
+ id: string;
505
+ path: string;
506
+ offset: number;
507
+ /** @description How many bytes follow. */
508
+ length: number;
509
+ size: number;
510
+ /** Format: date-time */
511
+ modifiedAt: string;
512
+ } | {
513
+ /** @constant */
514
+ type: "changes";
515
+ id: string;
516
+ /** Format: date-time */
517
+ since: string;
518
+ changes: {
519
+ path: string;
520
+ size: number;
521
+ /** Format: date-time */
522
+ modifiedAt: string;
523
+ }[];
524
+ /** @description Whether more than these changed. */
525
+ more: boolean;
526
+ } | {
527
+ /** @constant */
528
+ type: "written";
529
+ id: string;
530
+ path: string;
531
+ size: number;
532
+ } | {
533
+ /** @constant */
534
+ type: "refused";
535
+ id: string;
536
+ message: string;
537
+ };
538
+ ComputerLogs: {
539
+ logs: {
540
+ /** Format: date-time */
541
+ timestamp: string;
542
+ line: string;
543
+ }[];
544
+ };
545
+ ServiceInfo: {
546
+ version: string;
547
+ /**
548
+ * @description How this service isolates its computers, chosen when it is started.
549
+ * @enum {string}
550
+ */
551
+ isolation: "none" | "container";
552
+ };
553
+ };
554
+ responses: {
555
+ /** @description It was refused. */
556
+ Error: {
557
+ headers: {
558
+ [name: string]: unknown;
559
+ };
560
+ content: {
561
+ "application/json": components["schemas"]["Error"];
562
+ };
563
+ };
564
+ /** @description No valid token. */
565
+ Unauthorized: {
566
+ headers: {
567
+ [name: string]: unknown;
568
+ };
569
+ content?: never;
570
+ };
571
+ };
572
+ parameters: {
573
+ computerID: string;
574
+ };
575
+ requestBodies: never;
576
+ headers: never;
577
+ pathItems: never;
578
+ }
579
+ export type $defs = Record<string, never>;
580
+ export interface operations {
581
+ getInfo: {
582
+ parameters: {
583
+ query?: never;
584
+ header?: never;
585
+ path?: never;
586
+ cookie?: never;
587
+ };
588
+ requestBody?: never;
589
+ responses: {
590
+ /** @description The service. */
591
+ 200: {
592
+ headers: {
593
+ [name: string]: unknown;
594
+ };
595
+ content: {
596
+ "application/json": components["schemas"]["ServiceInfo"];
597
+ };
598
+ };
599
+ 401: components["responses"]["Unauthorized"];
600
+ };
601
+ };
602
+ listComputers: {
603
+ parameters: {
604
+ query?: {
605
+ /** @description Only computers in this state. */
606
+ state?: components["schemas"]["ComputerState"];
607
+ };
608
+ header?: never;
609
+ path?: never;
610
+ cookie?: never;
611
+ };
612
+ requestBody?: never;
613
+ responses: {
614
+ /** @description The computers, newest first. */
615
+ 200: {
616
+ headers: {
617
+ [name: string]: unknown;
618
+ };
619
+ content: {
620
+ "application/json": components["schemas"]["Computer"][];
621
+ };
622
+ };
623
+ 401: components["responses"]["Unauthorized"];
624
+ };
625
+ };
626
+ createComputer: {
627
+ parameters: {
628
+ query?: never;
629
+ header?: never;
630
+ path?: never;
631
+ cookie?: never;
632
+ };
633
+ requestBody: {
634
+ content: {
635
+ "application/json": components["schemas"]["NewComputer"];
636
+ };
637
+ };
638
+ responses: {
639
+ /** @description The computer, with its access token, shown only now. */
640
+ 201: {
641
+ headers: {
642
+ [name: string]: unknown;
643
+ };
644
+ content: {
645
+ "application/json": components["schemas"]["CreatedComputer"];
646
+ };
647
+ };
648
+ 400: components["responses"]["Error"];
649
+ 401: components["responses"]["Unauthorized"];
650
+ };
651
+ };
652
+ getComputer: {
653
+ parameters: {
654
+ query?: never;
655
+ header?: never;
656
+ path: {
657
+ computerID: components["parameters"]["computerID"];
658
+ };
659
+ cookie?: never;
660
+ };
661
+ requestBody?: never;
662
+ responses: {
663
+ /** @description The computer. */
664
+ 200: {
665
+ headers: {
666
+ [name: string]: unknown;
667
+ };
668
+ content: {
669
+ "application/json": components["schemas"]["ComputerDetail"];
670
+ };
671
+ };
672
+ 401: components["responses"]["Unauthorized"];
673
+ 404: components["responses"]["Error"];
674
+ };
675
+ };
676
+ killComputer: {
677
+ parameters: {
678
+ query?: never;
679
+ header?: never;
680
+ path: {
681
+ computerID: components["parameters"]["computerID"];
682
+ };
683
+ cookie?: never;
684
+ };
685
+ requestBody?: never;
686
+ responses: {
687
+ /** @description Gone. */
688
+ 204: {
689
+ headers: {
690
+ [name: string]: unknown;
691
+ };
692
+ content?: never;
693
+ };
694
+ 401: components["responses"]["Unauthorized"];
695
+ 404: components["responses"]["Error"];
696
+ };
697
+ };
698
+ setComputerTimeout: {
699
+ parameters: {
700
+ query?: never;
701
+ header?: never;
702
+ path: {
703
+ computerID: components["parameters"]["computerID"];
704
+ };
705
+ cookie?: never;
706
+ };
707
+ requestBody: {
708
+ content: {
709
+ "application/json": {
710
+ timeout: components["schemas"]["Timeout"];
711
+ };
712
+ };
713
+ };
714
+ responses: {
715
+ /** @description The computer. */
716
+ 200: {
717
+ headers: {
718
+ [name: string]: unknown;
719
+ };
720
+ content: {
721
+ "application/json": components["schemas"]["Computer"];
722
+ };
723
+ };
724
+ 401: components["responses"]["Unauthorized"];
725
+ 404: components["responses"]["Error"];
726
+ 409: components["responses"]["Error"];
727
+ };
728
+ };
729
+ stopComputer: {
730
+ parameters: {
731
+ query?: never;
732
+ header?: never;
733
+ path: {
734
+ computerID: components["parameters"]["computerID"];
735
+ };
736
+ cookie?: never;
737
+ };
738
+ requestBody?: never;
739
+ responses: {
740
+ /** @description The computer. */
741
+ 200: {
742
+ headers: {
743
+ [name: string]: unknown;
744
+ };
745
+ content: {
746
+ "application/json": components["schemas"]["Computer"];
747
+ };
748
+ };
749
+ 401: components["responses"]["Unauthorized"];
750
+ 404: components["responses"]["Error"];
751
+ };
752
+ };
753
+ startComputer: {
754
+ parameters: {
755
+ query?: never;
756
+ header?: never;
757
+ path: {
758
+ computerID: components["parameters"]["computerID"];
759
+ };
760
+ cookie?: never;
761
+ };
762
+ requestBody?: {
763
+ content: {
764
+ "application/json": {
765
+ timeout?: components["schemas"]["Timeout"];
766
+ };
767
+ };
768
+ };
769
+ responses: {
770
+ /** @description The computer. */
771
+ 200: {
772
+ headers: {
773
+ [name: string]: unknown;
774
+ };
775
+ content: {
776
+ "application/json": components["schemas"]["Computer"];
777
+ };
778
+ };
779
+ 401: components["responses"]["Unauthorized"];
780
+ 404: components["responses"]["Error"];
781
+ };
782
+ };
783
+ getComputerLogs: {
784
+ parameters: {
785
+ query?: never;
786
+ header?: never;
787
+ path: {
788
+ computerID: components["parameters"]["computerID"];
789
+ };
790
+ cookie?: never;
791
+ };
792
+ requestBody?: never;
793
+ responses: {
794
+ /** @description The logs. */
795
+ 200: {
796
+ headers: {
797
+ [name: string]: unknown;
798
+ };
799
+ content: {
800
+ "application/json": components["schemas"]["ComputerLogs"];
801
+ };
802
+ };
803
+ 401: components["responses"]["Unauthorized"];
804
+ 404: components["responses"]["Error"];
805
+ };
806
+ };
807
+ createLiveSession: {
808
+ parameters: {
809
+ query?: never;
810
+ header?: never;
811
+ path: {
812
+ computerID: components["parameters"]["computerID"];
813
+ };
814
+ cookie?: never;
815
+ };
816
+ requestBody: {
817
+ content: {
818
+ "application/json": components["schemas"]["NewLiveSession"];
819
+ };
820
+ };
821
+ responses: {
822
+ /** @description The ticket. */
823
+ 201: {
824
+ headers: {
825
+ [name: string]: unknown;
826
+ };
827
+ content: {
828
+ "application/json": components["schemas"]["LiveSession"];
829
+ };
830
+ };
831
+ 400: components["responses"]["Error"];
832
+ 401: components["responses"]["Unauthorized"];
833
+ 404: components["responses"]["Error"];
834
+ 409: components["responses"]["Error"];
835
+ };
836
+ };
837
+ openLiveSession: {
838
+ parameters: {
839
+ query?: never;
840
+ header?: never;
841
+ path: {
842
+ liveID: string;
843
+ };
844
+ cookie?: never;
845
+ };
846
+ requestBody?: never;
847
+ responses: {
848
+ /** @description The socket */
849
+ 101: {
850
+ headers: {
851
+ [name: string]: unknown;
852
+ };
853
+ content?: never;
854
+ };
855
+ 403: components["responses"]["Error"];
856
+ 404: components["responses"]["Error"];
857
+ 426: components["responses"]["Error"];
858
+ };
859
+ };
860
+ }