fauna-api 0.0.0-stage → 1.0.679

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 (171) hide show
  1. package/dist/brands.d.ts +2 -0
  2. package/dist/brands.js +2 -0
  3. package/dist/index.d.ts +64 -0
  4. package/dist/index.js +121 -0
  5. package/dist/src/ant/chat.d.ts +130 -0
  6. package/dist/src/ant/chat.js +467 -0
  7. package/dist/src/ant/format.d.ts +40 -0
  8. package/dist/src/ant/format.js +143 -0
  9. package/dist/src/ant/graph.d.ts +130 -0
  10. package/dist/src/ant/graph.js +449 -0
  11. package/dist/src/ant/index.d.ts +16 -0
  12. package/dist/src/ant/index.js +61 -0
  13. package/dist/src/ant/persona.d.ts +151 -0
  14. package/dist/src/ant/persona.js +136 -0
  15. package/dist/src/ant/timeline.d.ts +283 -0
  16. package/dist/src/ant/timeline.js +1025 -0
  17. package/dist/src/authentification.d.ts +45 -0
  18. package/dist/src/authentification.js +194 -0
  19. package/dist/src/billing.d.ts +135 -0
  20. package/dist/src/billing.js +128 -0
  21. package/dist/src/calendar.d.ts +83 -0
  22. package/dist/src/calendar.js +133 -0
  23. package/dist/src/chats.d.ts +113 -0
  24. package/dist/src/chats.js +100 -0
  25. package/dist/src/cicada/contacts.d.ts +31 -0
  26. package/dist/src/cicada/contacts.js +28 -0
  27. package/dist/src/cicada/conversations.d.ts +73 -0
  28. package/dist/src/cicada/conversations.js +236 -0
  29. package/dist/src/cicada/inboxes.d.ts +48 -0
  30. package/dist/src/cicada/inboxes.js +82 -0
  31. package/dist/src/cicada/index.d.ts +16 -0
  32. package/dist/src/cicada/index.js +61 -0
  33. package/dist/src/cicada/phone.d.ts +48 -0
  34. package/dist/src/cicada/phone.js +306 -0
  35. package/dist/src/drive.d.ts +80 -0
  36. package/dist/src/drive.js +472 -0
  37. package/dist/src/extensions/index.d.ts +4 -0
  38. package/dist/src/extensions/index.js +5 -0
  39. package/dist/src/extensions/web/index.d.ts +6 -0
  40. package/dist/src/extensions/web/index.js +7 -0
  41. package/dist/src/extensions/web/session.d.ts +108 -0
  42. package/dist/src/extensions/web/session.js +470 -0
  43. package/dist/src/extensions/web/tools.d.ts +13 -0
  44. package/dist/src/extensions/web/tools.js +72 -0
  45. package/dist/src/friends.d.ts +39 -0
  46. package/dist/src/friends.js +119 -0
  47. package/dist/src/groups.d.ts +82 -0
  48. package/dist/src/groups.js +269 -0
  49. package/dist/src/inbox.d.ts +11 -0
  50. package/dist/src/inbox.js +35 -0
  51. package/dist/src/integrations.d.ts +52 -0
  52. package/dist/src/integrations.js +205 -0
  53. package/dist/src/magpie/explorer.d.ts +14 -0
  54. package/dist/src/magpie/explorer.js +36 -0
  55. package/dist/src/magpie/index.d.ts +16 -0
  56. package/dist/src/magpie/index.js +61 -0
  57. package/dist/src/magpie/portfolio.d.ts +52 -0
  58. package/dist/src/magpie/portfolio.js +179 -0
  59. package/dist/src/magpie/quotes.d.ts +35 -0
  60. package/dist/src/magpie/quotes.js +47 -0
  61. package/dist/src/magpie/room.d.ts +61 -0
  62. package/dist/src/magpie/room.js +238 -0
  63. package/dist/src/maps.d.ts +159 -0
  64. package/dist/src/maps.js +171 -0
  65. package/dist/src/marmot/browser.d.ts +139 -0
  66. package/dist/src/marmot/browser.js +389 -0
  67. package/dist/src/marmot/index.d.ts +20 -0
  68. package/dist/src/marmot/index.js +65 -0
  69. package/dist/src/marmot/media.d.ts +56 -0
  70. package/dist/src/marmot/media.js +265 -0
  71. package/dist/src/marmot/research.d.ts +337 -0
  72. package/dist/src/marmot/research.js +1138 -0
  73. package/dist/src/marmot/scraper.d.ts +59 -0
  74. package/dist/src/marmot/scraper.js +94 -0
  75. package/dist/src/marmot/web.d.ts +402 -0
  76. package/dist/src/marmot/web.js +2586 -0
  77. package/dist/src/marmot/workspace.d.ts +81 -0
  78. package/dist/src/marmot/workspace.js +263 -0
  79. package/dist/src/parrot/agent.d.ts +53 -0
  80. package/dist/src/parrot/agent.js +93 -0
  81. package/dist/src/parrot/chat.d.ts +84 -0
  82. package/dist/src/parrot/chat.js +237 -0
  83. package/dist/src/parrot/format.d.ts +128 -0
  84. package/dist/src/parrot/format.js +639 -0
  85. package/dist/src/parrot/generative.d.ts +261 -0
  86. package/dist/src/parrot/generative.js +185 -0
  87. package/dist/src/parrot/index.d.ts +22 -0
  88. package/dist/src/parrot/index.js +67 -0
  89. package/dist/src/parrot/room.d.ts +225 -0
  90. package/dist/src/parrot/room.js +466 -0
  91. package/dist/src/parrot/routing.d.ts +90 -0
  92. package/dist/src/parrot/routing.js +78 -0
  93. package/dist/src/parrot/share.d.ts +126 -0
  94. package/dist/src/parrot/share.js +261 -0
  95. package/dist/src/parrot/socket.d.ts +41 -0
  96. package/dist/src/parrot/socket.js +478 -0
  97. package/dist/src/payments.d.ts +73 -0
  98. package/dist/src/payments.js +107 -0
  99. package/dist/src/private/cards.css +75 -0
  100. package/dist/src/rooms.d.ts +76 -0
  101. package/dist/src/rooms.js +168 -0
  102. package/dist/src/shared/schema.d.ts +24 -0
  103. package/dist/src/shared/schema.js +1 -0
  104. package/dist/src/shared/server.d.ts +65 -0
  105. package/dist/src/shared/server.js +302 -0
  106. package/dist/src/termite/environment.d.ts +110 -0
  107. package/dist/src/termite/environment.js +263 -0
  108. package/dist/src/termite/index.d.ts +14 -0
  109. package/dist/src/termite/index.js +59 -0
  110. package/dist/src/termite/os.d.ts +326 -0
  111. package/dist/src/termite/os.js +572 -0
  112. package/dist/src/termite/versioning.d.ts +94 -0
  113. package/dist/src/termite/versioning.js +217 -0
  114. package/dist/src/tickets.d.ts +43 -0
  115. package/dist/src/tickets.js +138 -0
  116. package/dist/src/travel.d.ts +85 -0
  117. package/dist/src/travel.js +44 -0
  118. package/dist/src/ui/authentification.d.ts +24 -0
  119. package/dist/src/ui/authentification.js +177 -0
  120. package/dist/src/ui/brands.css +11 -0
  121. package/dist/src/ui/brands.d.ts +7 -0
  122. package/dist/src/ui/brands.js +14 -0
  123. package/dist/src/ui/browser.d.ts +74 -0
  124. package/dist/src/ui/browser.js +470 -0
  125. package/dist/src/ui/chat.d.ts +183 -0
  126. package/dist/src/ui/chat.js +2379 -0
  127. package/dist/src/ui/chatPanel.d.ts +109 -0
  128. package/dist/src/ui/chatPanel.js +768 -0
  129. package/dist/src/ui/chatSequence.d.ts +36 -0
  130. package/dist/src/ui/chatSequence.js +42 -0
  131. package/dist/src/ui/crown.d.ts +19 -0
  132. package/dist/src/ui/crown.js +199 -0
  133. package/dist/src/ui/cursor.d.ts +73 -0
  134. package/dist/src/ui/cursor.js +175 -0
  135. package/dist/src/ui/device.d.ts +33 -0
  136. package/dist/src/ui/device.js +49 -0
  137. package/dist/src/ui/drive.d.ts +69 -0
  138. package/dist/src/ui/drive.js +1243 -0
  139. package/dist/src/ui/generative.d.ts +39 -0
  140. package/dist/src/ui/generative.js +313 -0
  141. package/dist/src/ui/hover.d.ts +6 -0
  142. package/dist/src/ui/hover.js +210 -0
  143. package/dist/src/ui/index.d.ts +42 -0
  144. package/dist/src/ui/index.js +87 -0
  145. package/dist/src/ui/integrations.d.ts +13 -0
  146. package/dist/src/ui/integrations.js +175 -0
  147. package/dist/src/ui/maps.d.ts +87 -0
  148. package/dist/src/ui/maps.js +547 -0
  149. package/dist/src/ui/roster.d.ts +32 -0
  150. package/dist/src/ui/roster.js +163 -0
  151. package/dist/src/ui/talk.d.ts +12 -0
  152. package/dist/src/ui/talk.js +560 -0
  153. package/dist/src/ui/tickets.d.ts +13 -0
  154. package/dist/src/ui/tickets.js +966 -0
  155. package/dist/src/ui/toast.d.ts +7 -0
  156. package/dist/src/ui/toast.js +258 -0
  157. package/dist/src/ui/tokenText.d.ts +18 -0
  158. package/dist/src/ui/tokenText.js +96 -0
  159. package/dist/src/ui/tokenized.d.ts +42 -0
  160. package/dist/src/ui/tokenized.js +622 -0
  161. package/dist/src/ui/ui.css +4763 -0
  162. package/dist/src/ui/view.d.ts +23 -0
  163. package/dist/src/ui/view.js +584 -0
  164. package/dist/src/view.d.ts +113 -0
  165. package/dist/src/view.js +386 -0
  166. package/dist/src/webhooks.d.ts +66 -0
  167. package/dist/src/webhooks.js +78 -0
  168. package/dist/ui.d.ts +1 -0
  169. package/dist/ui.js +1 -0
  170. package/package.json +87 -4
  171. package/README.md +0 -3
@@ -0,0 +1,59 @@
1
+ import * as EnvironmentAPI from "./environment.js";
2
+ import * as OSAPI from "./os.js";
3
+ import * as VersioningAPI from "./versioning.js";
4
+ export var Termite;
5
+ (function (Termite) {
6
+ var PREFIX = 'https://';
7
+ var IP = 'api.faunakit.com';
8
+ var PORT = 443;
9
+ function setRoute(route) {
10
+ const parts_0 = route.split('//');
11
+ if (parts_0.length > 1) {
12
+ PREFIX = parts_0[0] + '//';
13
+ const parts_1 = parts_0[1].split(':');
14
+ if (parts_1.length > 1) {
15
+ IP = parts_1[0];
16
+ PORT = Number(parts_1[1]);
17
+ }
18
+ else {
19
+ IP = parts_1[0];
20
+ }
21
+ }
22
+ else {
23
+ const parts_1 = parts_0[0].split(':');
24
+ if (parts_1.length > 1) {
25
+ IP = parts_1[0];
26
+ PORT = Number(parts_1[1]);
27
+ }
28
+ else {
29
+ IP = parts_1[0];
30
+ }
31
+ }
32
+ }
33
+ Termite.setRoute = setRoute;
34
+ function getIP() {
35
+ return IP;
36
+ }
37
+ Termite.getIP = getIP;
38
+ function getPort() {
39
+ return PORT;
40
+ }
41
+ Termite.getPort = getPort;
42
+ function getRoute() {
43
+ return IP + ':' + PORT;
44
+ }
45
+ Termite.getRoute = getRoute;
46
+ function getURL() {
47
+ return PREFIX + IP + ':' + PORT;
48
+ }
49
+ Termite.getURL = getURL;
50
+ async function ping() {
51
+ const start = Date.now();
52
+ await fetch(`${getURL()}/`);
53
+ return Date.now() - start;
54
+ }
55
+ Termite.ping = ping;
56
+ Termite.Environment = EnvironmentAPI;
57
+ Termite.OS = OSAPI;
58
+ Termite.Versioning = VersioningAPI;
59
+ })(Termite || (Termite = {}));
@@ -0,0 +1,326 @@
1
+ /**
2
+ * A live machine: one running boot of a Repository. It's a PageRoom whose
3
+ * page is the machine's desktop, one HTML page that is the whole OS, so it
4
+ * streams like any browser room. Window tools, file tools, exec, and stop ride
5
+ * the same socket as `machine-call`.
6
+ */
7
+ import { ApiKey, Credentials } from "../authentification.js";
8
+ import { Group } from "../groups.js";
9
+ import { PageRoom, type BrowserRoomHooks, type BrowserTool } from "../marmot/browser.js";
10
+ import type { Function, Tool } from "../parrot/generative.js";
11
+ import { Authorization, Presence } from "../shared/server.js";
12
+ import { Termite } from "./index.js";
13
+ import type { Repository } from "./versioning.js";
14
+ export type WindowTool = {
15
+ kind: 'windows';
16
+ } | {
17
+ kind: 'focus';
18
+ window: number;
19
+ } | {
20
+ kind: 'place';
21
+ window: number;
22
+ x: number;
23
+ y: number;
24
+ } | {
25
+ kind: 'resize';
26
+ window: number;
27
+ width: number;
28
+ height: number;
29
+ } | {
30
+ kind: 'close';
31
+ window: number;
32
+ }
33
+ /** Load a Web window's page again, after its files change. Previews follow their file on their own. */
34
+ | {
35
+ kind: 'reload';
36
+ window: number;
37
+ }
38
+ /** A web window at `url`; a files window at `path` (a folder of /repository); a preview of the
39
+ * file at `path`, which follows the file as it changes; or a terminal, running `command` in
40
+ * view and staying open at a prompt when it ends. */
41
+ | {
42
+ kind: 'open';
43
+ app: 'web' | 'files' | 'file' | 'terminal';
44
+ url?: string;
45
+ path?: string;
46
+ command?: string;
47
+ }
48
+ /** A chord like ['ctrl', 's']. Focuses `window` first when given. */
49
+ | {
50
+ kind: 'key';
51
+ keys: string[];
52
+ window?: number;
53
+ };
54
+ /** Paths are relative to /repository, and `/` is the repository root. */
55
+ export type FileTool = {
56
+ kind: 'list';
57
+ path?: string;
58
+ pattern?: string;
59
+ } | {
60
+ kind: 'grep';
61
+ pattern: string;
62
+ path?: string;
63
+ glob?: string;
64
+ ignoreCase?: boolean;
65
+ context?: number;
66
+ output?: 'files' | 'lines' | 'count';
67
+ max?: number;
68
+ } | {
69
+ kind: 'read';
70
+ path: string;
71
+ line?: number;
72
+ before?: number;
73
+ after?: number;
74
+ } | {
75
+ kind: 'write';
76
+ path: string;
77
+ text: string;
78
+ } | {
79
+ kind: 'replace';
80
+ path: string;
81
+ old: string;
82
+ new: string;
83
+ all?: boolean;
84
+ } | {
85
+ kind: 'insert';
86
+ path: string;
87
+ after: number;
88
+ text: string;
89
+ } | {
90
+ kind: 'remove';
91
+ path: string;
92
+ start: number;
93
+ end: number;
94
+ };
95
+ /** The guest's processes. `kill` stops only the agent user's own, never the machine's or the desktop's. */
96
+ export type ProcessTool = {
97
+ kind: 'processes';
98
+ sort?: 'cpu' | 'memory';
99
+ limit?: number;
100
+ filter?: string;
101
+ } | {
102
+ kind: 'kill';
103
+ pid: number;
104
+ signal?: 'TERM' | 'KILL';
105
+ };
106
+ /** Pointer and keyboard input on the desktop. No executeJavascript, which would run on the
107
+ * desktop page itself, and no search or exit, which belong to a web page's agent. */
108
+ export type DesktopTool = Exclude<BrowserTool, {
109
+ kind: 'executeJavascript' | 'search' | 'exit';
110
+ }>;
111
+ export type MachineTool = DesktopTool | WindowTool | FileTool | ProcessTool;
112
+ /** Metadata for one desktop window. Its pixels live in the desktop HTML. */
113
+ export type Window = {
114
+ /** Same id as the element's data-window and the window tools. */
115
+ id: number;
116
+ kind: 'app' | 'web' | 'files' | 'preview';
117
+ /** WM_CLASS for apps ('xterm'), 'web', 'files', or 'preview'. */
118
+ app: string;
119
+ title: string;
120
+ x: number;
121
+ y: number;
122
+ width: number;
123
+ height: number;
124
+ focused: boolean;
125
+ };
126
+ export declare const Window: {
127
+ fromJSON(json: any): Window;
128
+ };
129
+ /** The folder and view a Files window is on. The controller sets it; every seat follows. */
130
+ export type FilesState = {
131
+ path: string;
132
+ view: 'list' | 'cozy';
133
+ };
134
+ export declare const FilesState: {
135
+ fromJSON(json: any): FilesState;
136
+ };
137
+ export type MachineStatus = 'BOOTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'FAILED';
138
+ export type Viewport = {
139
+ width: number;
140
+ height: number;
141
+ };
142
+ /** The smallest and largest desktop a machine draws. The largest is the guest's X screen. */
143
+ export declare const VIEWPORT: {
144
+ min: Viewport;
145
+ max: Viewport;
146
+ };
147
+ /** A desktop size inside `VIEWPORT`, in whole pixels. */
148
+ export declare function clampViewport(size: Viewport): Viewport;
149
+ export type MachineRoomHooks = BrowserRoomHooks<DesktopTool> & Partial<{
150
+ /** A window opened, moved, resized, retitled, or changed focus. */
151
+ onWindow(room: MachineRoom, window: Window): void;
152
+ onWindowClosed(room: MachineRoom, id: number): void;
153
+ /** A Files window's folder or view changed. */
154
+ onFiles(room: MachineRoom, window: number, files: FilesState): void;
155
+ onStatus(room: MachineRoom): void;
156
+ /** Private turned on or off, or couldn't stay on (`privateReason` says why). */
157
+ onPrivate(room: MachineRoom): void;
158
+ /** An agent holding the machine took a step. */
159
+ onAgentStep(room: MachineRoom, step: AgentStep): void;
160
+ }>;
161
+ /** One tool call of an agent working the machine: the tool, with what, and what came back. A turn
162
+ * with several calls arrives as several steps. Args and result are capped at about 2 KB; larger
163
+ * args arrive as `{ truncated }`. */
164
+ export type AgentStep = {
165
+ /** The agent's id, as in the room's control state. */
166
+ agent: string;
167
+ /** The turn, counting from 1. */
168
+ step: number;
169
+ /** The call's place in its turn, from 0. */
170
+ call: number;
171
+ tool: string;
172
+ args: Record<string, unknown>;
173
+ result: string;
174
+ /** The turn's model time and usage ride on its first call, so totals add up. */
175
+ modelMs: number;
176
+ toolMs: number;
177
+ usage: {
178
+ promptTokens: number;
179
+ completionTokens: number;
180
+ };
181
+ };
182
+ /**
183
+ * Every machine tool for a model: desktop input, windows, files, and exec.
184
+ * `invoke` runs a tool; `exec` runs a shell command and returns its result as text.
185
+ */
186
+ export declare function parrotTools(invoke: (tool: MachineTool) => Promise<string>, exec: (command: string, timeoutMs?: number) => Promise<string>): Tool[];
187
+ /** `use_desktop`'s result when the person chose not to make a repository for it. */
188
+ export declare const DESKTOP_DECLINED = "They chose not to use a computer for this. Do it without one if you can.";
189
+ /**
190
+ * The `use_desktop` tool for a Parrot chat: a desktop agent does a job on the
191
+ * repository's machine. Without a repository it also takes `name`, what to call
192
+ * the repository the person is asked to make for it.
193
+ */
194
+ export declare function desktopTool(repository?: Repository | null): Function;
195
+ /** What Termite charges, in dollars. */
196
+ export type Pricing = {
197
+ /** A running machine, per hour. */
198
+ machinePerHour: number;
199
+ /** A repository's stored files, per GB a month. */
200
+ storagePerGbMonth: number;
201
+ };
202
+ /** Termite's current prices. Anyone can read them, signed in or not. */
203
+ export declare function pricing(): Promise<Pricing>;
204
+ /**
205
+ * One time a repository woke its machine agent: its code ran wake.sh (`called`),
206
+ * entry.sh crashed (`crashed`), or the hourly limit left it out (`skipped`).
207
+ */
208
+ export type Wake = {
209
+ id: string;
210
+ reason: 'called' | 'crashed' | 'skipped';
211
+ /** What the agent was told: wake.sh's prompt, or how entry.sh ended. */
212
+ prompt: string;
213
+ started: Date;
214
+ /** When the woken run ended, or null while it works. */
215
+ finished: Date | null;
216
+ ok: boolean;
217
+ /** What the agent said when it finished, or why it stopped. */
218
+ answer: string;
219
+ };
220
+ export declare const Wake: {
221
+ fromJSON(json: any): Wake;
222
+ };
223
+ /** The times a repository woke its agent, newest first. */
224
+ export declare function wakes(authorization: Credentials | ApiKey, repository: number, query: {
225
+ cursor: number;
226
+ max: number;
227
+ }, opts?: {
228
+ group?: Group;
229
+ }): Promise<Wake[]>;
230
+ export declare class MachineRoom extends PageRoom<DesktopTool> {
231
+ /** The machine id, the number `connect` takes. */
232
+ readonly machine: number;
233
+ readonly repository: number;
234
+ readonly windows: Map<number, Window>;
235
+ /** Each Files window's folder and view, by window id. */
236
+ readonly files: Map<number, FilesState>;
237
+ status: MachineStatus;
238
+ /** Why the machine failed, when it did. */
239
+ error: string;
240
+ /** The repository's name, so a guest who joined by code knows what it is. */
241
+ name: string;
242
+ /** Its connections go out from a residential address, billed per GB to whoever pays for the machine. */
243
+ private: boolean;
244
+ /** Why private is off when it couldn't turn on or stay on, like a payer out of balance. */
245
+ privateReason: string;
246
+ private machineHooks;
247
+ private calls;
248
+ constructor(ws: WebSocket, authorization: Authorization, id: string, hooks: MachineRoomHooks, state?: any);
249
+ /** Apply a connection snapshot `{ machine, bootstrap, cursor, windows }`. */
250
+ hydrate(state: any): void;
251
+ watch(hooks: MachineRoomHooks): void;
252
+ invokeTool(tool: MachineTool): Promise<string>;
253
+ /** Run a shell command as `agent` in /repository with DISPLAY=:0, so GUI apps open as desktop windows. */
254
+ exec(command: string, opts?: {
255
+ timeoutMs?: number;
256
+ }): Promise<{
257
+ code: number;
258
+ stdout: string;
259
+ stderr: string;
260
+ }>;
261
+ /** Size the machine's desktop to this seat's screen, clamped to `VIEWPORT`. Only the controller can. */
262
+ setViewport(width: number, height: number): Promise<void>;
263
+ /** Open a file in an app on the machine, for everyone to see: text in nano inside an
264
+ * xterm, anything else with an installed opener. Only the controller can. */
265
+ open(path: string): Promise<void>;
266
+ /** Put a Files window on a folder and view for every seat. Only the controller can. */
267
+ setFiles(window: number, files: FilesState): Promise<void>;
268
+ /** Save a new revision and shut down. The room closes afterwards. */
269
+ stop(): Promise<void>;
270
+ private call;
271
+ parrotTools(): Tool[];
272
+ handleEvent(packet: any): boolean;
273
+ /**
274
+ * Boot the repository's machine, or return the one already live, and connect to it.
275
+ * `private` sends its connections out from a residential address, billed per GB to
276
+ * whoever pays for the machine; on a live machine it switches it.
277
+ */
278
+ static start(authorization: Credentials | ApiKey, target: {
279
+ repository: number;
280
+ }, opts?: {
281
+ group?: Group;
282
+ hooks?: MachineRoomHooks;
283
+ private?: boolean;
284
+ }): Promise<{
285
+ room: MachineRoom;
286
+ self: Presence;
287
+ }>;
288
+ /** Save and shut down a repository's machine without joining its room. For its owner or group members. */
289
+ static shutdown(authorization: Credentials | ApiKey, target: {
290
+ repository: number;
291
+ }, opts?: {
292
+ group?: Group;
293
+ }): Promise<void>;
294
+ /** Turn private on or off for a repository's live machine, for its owner or group members.
295
+ * Resolves to the machine's private state and, when it couldn't turn on, why. */
296
+ static setPrivate(authorization: Credentials | ApiKey, target: {
297
+ repository: number;
298
+ }, on: boolean, opts?: {
299
+ group?: Group;
300
+ }): Promise<{
301
+ on: boolean;
302
+ reason: string;
303
+ }>;
304
+ /** Connect to a live machine by id, or by its `termite:machine:{id}` reference. */
305
+ static connect(authorization: Credentials | ApiKey, target: {
306
+ id: number;
307
+ } | {
308
+ reference: string;
309
+ }, opts?: {
310
+ group?: Group;
311
+ hooks?: MachineRoomHooks;
312
+ }): Promise<{
313
+ room: MachineRoom;
314
+ self: Presence;
315
+ }>;
316
+ /** Join a machine someone shared with an access code. */
317
+ static join(authorization: Credentials | ApiKey, target: {
318
+ accessCode: string;
319
+ }, opts?: {
320
+ hooks?: MachineRoomHooks;
321
+ }): Promise<{
322
+ room: MachineRoom;
323
+ self: Presence;
324
+ }>;
325
+ private static open;
326
+ }