@distilled.cloud/daytona 0.0.0-placeholder → 1.0.0-rc.13

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 (203) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +34 -0
  3. package/lib/credentials.d.ts +46 -0
  4. package/lib/credentials.d.ts.map +1 -0
  5. package/lib/credentials.js +67 -0
  6. package/lib/credentials.js.map +1 -0
  7. package/lib/endpoints.d.ts +15 -0
  8. package/lib/endpoints.d.ts.map +1 -0
  9. package/lib/endpoints.js +28 -0
  10. package/lib/endpoints.js.map +1 -0
  11. package/lib/errors.d.ts +53 -0
  12. package/lib/errors.d.ts.map +1 -0
  13. package/lib/errors.js +30 -0
  14. package/lib/errors.js.map +1 -0
  15. package/lib/index.d.ts +30 -0
  16. package/lib/index.d.ts.map +1 -0
  17. package/lib/index.js +30 -0
  18. package/lib/index.js.map +1 -0
  19. package/lib/pagination.d.ts +10 -0
  20. package/lib/pagination.d.ts.map +1 -0
  21. package/lib/pagination.js +10 -0
  22. package/lib/pagination.js.map +1 -0
  23. package/lib/protocol.d.ts +18 -0
  24. package/lib/protocol.d.ts.map +1 -0
  25. package/lib/protocol.js +75 -0
  26. package/lib/protocol.js.map +1 -0
  27. package/lib/response-validation.test.d.ts +4 -0
  28. package/lib/response-validation.test.d.ts.map +1 -0
  29. package/lib/response-validation.test.js +31 -0
  30. package/lib/response-validation.test.js.map +1 -0
  31. package/lib/retry.d.ts +50 -0
  32. package/lib/retry.d.ts.map +1 -0
  33. package/lib/retry.js +43 -0
  34. package/lib/retry.js.map +1 -0
  35. package/lib/services/api_keys.d.ts +120 -0
  36. package/lib/services/api_keys.d.ts.map +1 -0
  37. package/lib/services/api_keys.js +126 -0
  38. package/lib/services/api_keys.js.map +1 -0
  39. package/lib/services/audit.d.ts +159 -0
  40. package/lib/services/audit.d.ts.map +1 -0
  41. package/lib/services/audit.js +126 -0
  42. package/lib/services/audit.js.map +1 -0
  43. package/lib/services/computer_use.d.ts +484 -0
  44. package/lib/services/computer_use.d.ts.map +1 -0
  45. package/lib/services/computer_use.js +672 -0
  46. package/lib/services/computer_use.js.map +1 -0
  47. package/lib/services/config.d.ts +138 -0
  48. package/lib/services/config.d.ts.map +1 -0
  49. package/lib/services/config.js +88 -0
  50. package/lib/services/config.js.map +1 -0
  51. package/lib/services/docker_registry.d.ts +126 -0
  52. package/lib/services/docker_registry.d.ts.map +1 -0
  53. package/lib/services/docker_registry.js +135 -0
  54. package/lib/services/docker_registry.js.map +1 -0
  55. package/lib/services/file_system.d.ts +203 -0
  56. package/lib/services/file_system.d.ts.map +1 -0
  57. package/lib/services/file_system.js +255 -0
  58. package/lib/services/file_system.js.map +1 -0
  59. package/lib/services/git.d.ts +338 -0
  60. package/lib/services/git.d.ts.map +1 -0
  61. package/lib/services/git.js +417 -0
  62. package/lib/services/git.js.map +1 -0
  63. package/lib/services/health.d.ts +41 -0
  64. package/lib/services/health.d.ts.map +1 -0
  65. package/lib/services/health.js +49 -0
  66. package/lib/services/health.js.map +1 -0
  67. package/lib/services/index.d.ts +31 -0
  68. package/lib/services/index.d.ts.map +1 -0
  69. package/lib/services/index.js +32 -0
  70. package/lib/services/index.js.map +1 -0
  71. package/lib/services/info.d.ts +37 -0
  72. package/lib/services/info.d.ts.map +1 -0
  73. package/lib/services/info.js +55 -0
  74. package/lib/services/info.js.map +1 -0
  75. package/lib/services/interpreter.d.ts +56 -0
  76. package/lib/services/interpreter.d.ts.map +1 -0
  77. package/lib/services/interpreter.js +83 -0
  78. package/lib/services/interpreter.js.map +1 -0
  79. package/lib/services/jobs.d.ts +104 -0
  80. package/lib/services/jobs.d.ts.map +1 -0
  81. package/lib/services/jobs.js +94 -0
  82. package/lib/services/jobs.js.map +1 -0
  83. package/lib/services/lsp.d.ts +137 -0
  84. package/lib/services/lsp.d.ts.map +1 -0
  85. package/lib/services/lsp.js +160 -0
  86. package/lib/services/lsp.js.map +1 -0
  87. package/lib/services/object_storage.d.ts +31 -0
  88. package/lib/services/object_storage.d.ts.map +1 -0
  89. package/lib/services/object_storage.js +33 -0
  90. package/lib/services/object_storage.js.map +1 -0
  91. package/lib/services/organizations.d.ts +963 -0
  92. package/lib/services/organizations.d.ts.map +1 -0
  93. package/lib/services/organizations.js +1143 -0
  94. package/lib/services/organizations.js.map +1 -0
  95. package/lib/services/port.d.ts +29 -0
  96. package/lib/services/port.d.ts.map +1 -0
  97. package/lib/services/port.js +41 -0
  98. package/lib/services/port.js.map +1 -0
  99. package/lib/services/preview.d.ts +73 -0
  100. package/lib/services/preview.d.ts.map +1 -0
  101. package/lib/services/preview.js +125 -0
  102. package/lib/services/preview.js.map +1 -0
  103. package/lib/services/process.d.ts +329 -0
  104. package/lib/services/process.d.ts.map +1 -0
  105. package/lib/services/process.js +421 -0
  106. package/lib/services/process.js.map +1 -0
  107. package/lib/services/regions.d.ts +41 -0
  108. package/lib/services/regions.d.ts.map +1 -0
  109. package/lib/services/regions.js +36 -0
  110. package/lib/services/regions.js.map +1 -0
  111. package/lib/services/runners.d.ts +358 -0
  112. package/lib/services/runners.d.ts.map +1 -0
  113. package/lib/services/runners.js +316 -0
  114. package/lib/services/runners.js.map +1 -0
  115. package/lib/services/sandbox.d.ts +1276 -0
  116. package/lib/services/sandbox.d.ts.map +1 -0
  117. package/lib/services/sandbox.js +1218 -0
  118. package/lib/services/sandbox.js.map +1 -0
  119. package/lib/services/secret.d.ts +120 -0
  120. package/lib/services/secret.d.ts.map +1 -0
  121. package/lib/services/secret.js +113 -0
  122. package/lib/services/secret.js.map +1 -0
  123. package/lib/services/server.d.ts +44 -0
  124. package/lib/services/server.d.ts.map +1 -0
  125. package/lib/services/server.js +46 -0
  126. package/lib/services/server.js.map +1 -0
  127. package/lib/services/snapshots.d.ts +208 -0
  128. package/lib/services/snapshots.d.ts.map +1 -0
  129. package/lib/services/snapshots.js +189 -0
  130. package/lib/services/snapshots.js.map +1 -0
  131. package/lib/services/system.d.ts +24 -0
  132. package/lib/services/system.d.ts.map +1 -0
  133. package/lib/services/system.js +31 -0
  134. package/lib/services/system.js.map +1 -0
  135. package/lib/services/telemetry.d.ts +141 -0
  136. package/lib/services/telemetry.d.ts.map +1 -0
  137. package/lib/services/telemetry.js +165 -0
  138. package/lib/services/telemetry.js.map +1 -0
  139. package/lib/services/usage.d.ts +111 -0
  140. package/lib/services/usage.d.ts.map +1 -0
  141. package/lib/services/usage.js +146 -0
  142. package/lib/services/usage.js.map +1 -0
  143. package/lib/services/users.d.ts +125 -0
  144. package/lib/services/users.d.ts.map +1 -0
  145. package/lib/services/users.js +172 -0
  146. package/lib/services/users.js.map +1 -0
  147. package/lib/services/volumes.d.ts +83 -0
  148. package/lib/services/volumes.d.ts.map +1 -0
  149. package/lib/services/volumes.js +96 -0
  150. package/lib/services/volumes.js.map +1 -0
  151. package/lib/services/warm_pools.d.ts +79 -0
  152. package/lib/services/warm_pools.d.ts.map +1 -0
  153. package/lib/services/warm_pools.js +90 -0
  154. package/lib/services/warm_pools.js.map +1 -0
  155. package/lib/services/webhooks.d.ts +67 -0
  156. package/lib/services/webhooks.d.ts.map +1 -0
  157. package/lib/services/webhooks.js +103 -0
  158. package/lib/services/webhooks.js.map +1 -0
  159. package/lib/traits.d.ts +10 -0
  160. package/lib/traits.d.ts.map +1 -0
  161. package/lib/traits.js +11 -0
  162. package/lib/traits.js.map +1 -0
  163. package/package.json +78 -7
  164. package/src/credentials.ts +135 -0
  165. package/src/endpoints.ts +28 -0
  166. package/src/errors.ts +85 -0
  167. package/src/index.ts +33 -0
  168. package/src/pagination.ts +9 -0
  169. package/src/protocol.ts +108 -0
  170. package/src/response-validation.test.ts +45 -0
  171. package/src/retry.ts +74 -0
  172. package/src/services/api_keys.ts +378 -0
  173. package/src/services/audit.ts +416 -0
  174. package/src/services/computer_use.ts +1496 -0
  175. package/src/services/config.ts +256 -0
  176. package/src/services/docker_registry.ts +325 -0
  177. package/src/services/file_system.ts +575 -0
  178. package/src/services/git.ts +928 -0
  179. package/src/services/health.ts +116 -0
  180. package/src/services/index.ts +31 -0
  181. package/src/services/info.ts +116 -0
  182. package/src/services/interpreter.ts +182 -0
  183. package/src/services/jobs.ts +249 -0
  184. package/src/services/lsp.ts +367 -0
  185. package/src/services/object_storage.ts +75 -0
  186. package/src/services/organizations.ts +2712 -0
  187. package/src/services/port.ts +87 -0
  188. package/src/services/preview.ts +256 -0
  189. package/src/services/process.ts +948 -0
  190. package/src/services/regions.ts +90 -0
  191. package/src/services/runners.ts +811 -0
  192. package/src/services/sandbox.ts +3158 -0
  193. package/src/services/secret.ts +289 -0
  194. package/src/services/server.ts +111 -0
  195. package/src/services/snapshots.ts +508 -0
  196. package/src/services/system.ts +64 -0
  197. package/src/services/telemetry.ts +385 -0
  198. package/src/services/usage.ts +316 -0
  199. package/src/services/users.ts +380 -0
  200. package/src/services/volumes.ts +233 -0
  201. package/src/services/warm_pools.ts +209 -0
  202. package/src/services/webhooks.ts +214 -0
  203. package/src/traits.ts +44 -0
@@ -0,0 +1,811 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-daytona/specs/{openapi,toolbox-openapi,analytics-openapi}.json). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as Redacted from "effect/Redacted";
4
+ import * as API from "@distilled.cloud/core/api";
5
+ import * as T from "../traits.ts";
6
+ import {
7
+ DaytonaProtocol,
8
+ type DaytonaOpError,
9
+ type DaytonaOpContext,
10
+ } from "../protocol.ts";
11
+ import { UnknownDaytonaError } from "../errors.ts";
12
+ import * as Retry from "../retry.ts";
13
+
14
+ export type { DaytonaOpError, DaytonaOpContext };
15
+
16
+ /** Tags to associate with the runner */
17
+ export type CreateRunnerRequestTagsList = Array<string>;
18
+ export const CreateRunnerRequestTagsList = /*@__PURE__*/ S.Array(
19
+ S.String,
20
+ ) as any as S.Schema<CreateRunnerRequestTagsList>;
21
+
22
+ export interface CreateRunnerRequest {
23
+ /** Use with JWT to specify the organization ID */
24
+ xDaytonaOrganizationID?: string;
25
+ regionId: string;
26
+ name: string;
27
+ /** Tags to associate with the runner */
28
+ tags?: CreateRunnerRequestTagsList;
29
+ }
30
+ export const CreateRunnerRequest = /*@__PURE__*/ S.suspend(() =>
31
+ S.Struct({
32
+ xDaytonaOrganizationID: S.optional(
33
+ S.String.pipe(T.Header("X-Daytona-Organization-ID")),
34
+ ),
35
+ regionId: S.String,
36
+ name: S.String,
37
+ tags: S.optional(CreateRunnerRequestTagsList),
38
+ }).pipe(T.Http({ method: "POST", uri: "/runners", code: 200 })),
39
+ ).annotate({
40
+ identifier: "CreateRunnerRequest",
41
+ }) as any as S.Schema<CreateRunnerRequest>;
42
+
43
+ export interface CreateRunnerResponse {
44
+ /** The ID of the runner */
45
+ id: string;
46
+ /** The API key for the runner */
47
+ apiKey: string | Redacted.Redacted<string>;
48
+ }
49
+ export const CreateRunnerResponse = /*@__PURE__*/ S.suspend(() =>
50
+ S.Struct({
51
+ id: S.String,
52
+ apiKey: S.String.pipe(T.SensitiveValue({})),
53
+ }),
54
+ ).annotate({
55
+ identifier: "CreateRunnerResponse",
56
+ }) as any as S.Schema<CreateRunnerResponse>;
57
+
58
+ export interface DeleteRunnerRequest {
59
+ /** Runner ID */
60
+ id: string;
61
+ /** Delete the runner without waiting for sandboxes already marked for destruction. Requires the runner to have stopped reporting as ready. */
62
+ force?: boolean;
63
+ /** Use with JWT to specify the organization ID */
64
+ xDaytonaOrganizationID?: string;
65
+ }
66
+ export const DeleteRunnerRequest = /*@__PURE__*/ S.suspend(() =>
67
+ S.Struct({
68
+ id: S.String.pipe(T.Label()),
69
+ force: S.optional(S.Boolean.pipe(T.Query())),
70
+ xDaytonaOrganizationID: S.optional(
71
+ S.String.pipe(T.Header("X-Daytona-Organization-ID")),
72
+ ),
73
+ }).pipe(T.Http({ method: "DELETE", uri: "/runners/{id}", code: 200 })),
74
+ ).annotate({
75
+ identifier: "DeleteRunnerRequest",
76
+ }) as any as S.Schema<DeleteRunnerRequest>;
77
+
78
+ export interface DeleteRunnerResponse {}
79
+ export const DeleteRunnerResponse = /*@__PURE__*/ S.suspend(() =>
80
+ S.Struct({}),
81
+ ).annotate({
82
+ identifier: "DeleteRunnerResponse",
83
+ }) as any as S.Schema<DeleteRunnerResponse>;
84
+
85
+ export interface GetInfoForAuthenticatedRunnerRequest {}
86
+ export const GetInfoForAuthenticatedRunnerRequest = /*@__PURE__*/ S.suspend(
87
+ () =>
88
+ S.Struct({}).pipe(T.Http({ method: "GET", uri: "/runners/me", code: 200 })),
89
+ ).annotate({
90
+ identifier: "GetInfoForAuthenticatedRunnerRequest",
91
+ }) as any as S.Schema<GetInfoForAuthenticatedRunnerRequest>;
92
+
93
+ export type SandboxClass = "linux-vm" | "container" | "android" | "windows";
94
+ export const SandboxClass = S.String;
95
+
96
+ /** The state of the runner */
97
+ export type RunnerState =
98
+ | "initializing"
99
+ | "ready"
100
+ | "disabled"
101
+ | "decommissioned"
102
+ | "unresponsive";
103
+ export const RunnerState = S.String;
104
+
105
+ /** Tags associated with the runner */
106
+ export type RunnerFullTagsList = Array<string>;
107
+ export const RunnerFullTagsList = /*@__PURE__*/ S.Array(
108
+ S.String,
109
+ ) as any as S.Schema<RunnerFullTagsList>;
110
+
111
+ /** The class of the runner. Deprecated and always returns "container" for backward compatibility - use sandboxClass instead. */
112
+ export type RunnerClass = "container";
113
+ export const RunnerClass = S.String;
114
+
115
+ /** The type of the region */
116
+ export type RegionType = "shared" | "dedicated" | "custom";
117
+ export const RegionType = S.String;
118
+
119
+ export interface RunnerFull {
120
+ /** The ID of the runner */
121
+ id: string;
122
+ /** The domain of the runner */
123
+ domain?: string;
124
+ /** The API URL of the runner */
125
+ apiUrl?: string;
126
+ /** The proxy URL of the runner */
127
+ proxyUrl?: string;
128
+ /** The CPU capacity of the runner */
129
+ cpu: number;
130
+ /** The memory capacity of the runner in GiB */
131
+ memory: number;
132
+ /** The disk capacity of the runner in GiB */
133
+ disk: number;
134
+ /** The GPU capacity of the runner */
135
+ gpu?: number;
136
+ /** The type of GPU */
137
+ gpuType?: string;
138
+ /** The sandbox class supported by this runner */
139
+ sandboxClass?: SandboxClass;
140
+ /** Current CPU usage percentage */
141
+ currentCpuUsagePercentage?: number;
142
+ /** Current RAM usage percentage */
143
+ currentMemoryUsagePercentage?: number;
144
+ /** Current disk usage percentage */
145
+ currentDiskUsagePercentage?: number;
146
+ /** Current allocated CPU */
147
+ currentAllocatedCpu?: number;
148
+ /** Current allocated memory in GiB */
149
+ currentAllocatedMemoryGiB?: number;
150
+ /** Current allocated disk in GiB */
151
+ currentAllocatedDiskGiB?: number;
152
+ /** Current snapshot count */
153
+ currentSnapshotCount?: number;
154
+ /** Current number of started sandboxes */
155
+ currentStartedSandboxes?: number;
156
+ /** Runner availability score */
157
+ availabilityScore?: number;
158
+ /** The region of the runner */
159
+ region: string;
160
+ /** The name of the runner */
161
+ name: string;
162
+ /** The state of the runner */
163
+ state: RunnerState;
164
+ /** The last time the runner was checked */
165
+ lastChecked?: string;
166
+ /** Whether the runner is unschedulable */
167
+ unschedulable: boolean;
168
+ /** Tags associated with the runner */
169
+ tags: RunnerFullTagsList;
170
+ /** The creation timestamp of the runner */
171
+ createdAt: string;
172
+ /** The last update timestamp of the runner */
173
+ updatedAt: string;
174
+ /** The version of the runner (deprecated in favor of apiVersion) */
175
+ version: string;
176
+ /** The api version of the runner */
177
+ apiVersion: string;
178
+ /** The class of the runner. Deprecated and always returns "container" for backward compatibility - use sandboxClass instead. */
179
+ runnerClass: RunnerClass;
180
+ /** The app version of the runner */
181
+ appVersion?: string;
182
+ /** Deprecated runner class property */
183
+ class?: string;
184
+ /** The API key for the runner */
185
+ apiKey: string | Redacted.Redacted<string>;
186
+ /** The region type of the runner */
187
+ regionType?: RegionType;
188
+ }
189
+ export const RunnerFull = /*@__PURE__*/ S.suspend(() =>
190
+ S.Struct({
191
+ id: S.String,
192
+ domain: S.optional(S.String),
193
+ apiUrl: S.optional(S.String),
194
+ proxyUrl: S.optional(S.String),
195
+ cpu: S.Number,
196
+ memory: S.Number,
197
+ disk: S.Number,
198
+ gpu: S.optional(S.Number),
199
+ gpuType: S.optional(S.String),
200
+ sandboxClass: S.optional(SandboxClass),
201
+ currentCpuUsagePercentage: S.optional(S.Number),
202
+ currentMemoryUsagePercentage: S.optional(S.Number),
203
+ currentDiskUsagePercentage: S.optional(S.Number),
204
+ currentAllocatedCpu: S.optional(S.Number),
205
+ currentAllocatedMemoryGiB: S.optional(S.Number),
206
+ currentAllocatedDiskGiB: S.optional(S.Number),
207
+ currentSnapshotCount: S.optional(S.Number),
208
+ currentStartedSandboxes: S.optional(S.Number),
209
+ availabilityScore: S.optional(S.Number),
210
+ region: S.String,
211
+ name: S.String,
212
+ state: RunnerState,
213
+ lastChecked: S.optional(S.String),
214
+ unschedulable: S.Boolean,
215
+ tags: RunnerFullTagsList,
216
+ createdAt: S.String,
217
+ updatedAt: S.String,
218
+ version: S.String,
219
+ apiVersion: S.String,
220
+ runnerClass: RunnerClass,
221
+ appVersion: S.optional(S.String),
222
+ class: S.optional(S.String),
223
+ apiKey: S.String.pipe(T.SensitiveValue({})),
224
+ regionType: S.optional(RegionType),
225
+ }),
226
+ ).annotate({ identifier: "RunnerFull" }) as any as S.Schema<RunnerFull>;
227
+
228
+ export interface GetRunnerRequest {
229
+ /** Runner ID */
230
+ id: string;
231
+ /** Use with JWT to specify the organization ID */
232
+ xDaytonaOrganizationID?: string;
233
+ }
234
+ export const GetRunnerRequest = /*@__PURE__*/ S.suspend(() =>
235
+ S.Struct({
236
+ id: S.String.pipe(T.Label()),
237
+ xDaytonaOrganizationID: S.optional(
238
+ S.String.pipe(T.Header("X-Daytona-Organization-ID")),
239
+ ),
240
+ }).pipe(T.Http({ method: "GET", uri: "/runners/{id}", code: 200 })),
241
+ ).annotate({
242
+ identifier: "GetRunnerRequest",
243
+ }) as any as S.Schema<GetRunnerRequest>;
244
+
245
+ /** Tags associated with the runner */
246
+ export type RunnerTagsList = Array<string>;
247
+ export const RunnerTagsList = /*@__PURE__*/ S.Array(
248
+ S.String,
249
+ ) as any as S.Schema<RunnerTagsList>;
250
+
251
+ export interface Runner {
252
+ /** The ID of the runner */
253
+ id: string;
254
+ /** The domain of the runner */
255
+ domain?: string;
256
+ /** The API URL of the runner */
257
+ apiUrl?: string;
258
+ /** The proxy URL of the runner */
259
+ proxyUrl?: string;
260
+ /** The CPU capacity of the runner */
261
+ cpu: number;
262
+ /** The memory capacity of the runner in GiB */
263
+ memory: number;
264
+ /** The disk capacity of the runner in GiB */
265
+ disk: number;
266
+ /** The GPU capacity of the runner */
267
+ gpu?: number;
268
+ /** The type of GPU */
269
+ gpuType?: string;
270
+ /** The sandbox class supported by this runner */
271
+ sandboxClass?: SandboxClass;
272
+ /** Current CPU usage percentage */
273
+ currentCpuUsagePercentage?: number;
274
+ /** Current RAM usage percentage */
275
+ currentMemoryUsagePercentage?: number;
276
+ /** Current disk usage percentage */
277
+ currentDiskUsagePercentage?: number;
278
+ /** Current allocated CPU */
279
+ currentAllocatedCpu?: number;
280
+ /** Current allocated memory in GiB */
281
+ currentAllocatedMemoryGiB?: number;
282
+ /** Current allocated disk in GiB */
283
+ currentAllocatedDiskGiB?: number;
284
+ /** Current snapshot count */
285
+ currentSnapshotCount?: number;
286
+ /** Current number of started sandboxes */
287
+ currentStartedSandboxes?: number;
288
+ /** Runner availability score */
289
+ availabilityScore?: number;
290
+ /** The region of the runner */
291
+ region: string;
292
+ /** The name of the runner */
293
+ name: string;
294
+ /** The state of the runner */
295
+ state: RunnerState;
296
+ /** The last time the runner was checked */
297
+ lastChecked?: string;
298
+ /** Whether the runner is unschedulable */
299
+ unschedulable: boolean;
300
+ /** Tags associated with the runner */
301
+ tags: RunnerTagsList;
302
+ /** The creation timestamp of the runner */
303
+ createdAt: string;
304
+ /** The last update timestamp of the runner */
305
+ updatedAt: string;
306
+ /** The version of the runner (deprecated in favor of apiVersion) */
307
+ version: string;
308
+ /** The api version of the runner */
309
+ apiVersion: string;
310
+ /** The class of the runner. Deprecated and always returns "container" for backward compatibility - use sandboxClass instead. */
311
+ runnerClass: RunnerClass;
312
+ /** The app version of the runner */
313
+ appVersion?: string;
314
+ /** Deprecated runner class property */
315
+ class?: string;
316
+ }
317
+ export const Runner = /*@__PURE__*/ S.suspend(() =>
318
+ S.Struct({
319
+ id: S.String,
320
+ domain: S.optional(S.String),
321
+ apiUrl: S.optional(S.String),
322
+ proxyUrl: S.optional(S.String),
323
+ cpu: S.Number,
324
+ memory: S.Number,
325
+ disk: S.Number,
326
+ gpu: S.optional(S.Number),
327
+ gpuType: S.optional(S.String),
328
+ sandboxClass: S.optional(SandboxClass),
329
+ currentCpuUsagePercentage: S.optional(S.Number),
330
+ currentMemoryUsagePercentage: S.optional(S.Number),
331
+ currentDiskUsagePercentage: S.optional(S.Number),
332
+ currentAllocatedCpu: S.optional(S.Number),
333
+ currentAllocatedMemoryGiB: S.optional(S.Number),
334
+ currentAllocatedDiskGiB: S.optional(S.Number),
335
+ currentSnapshotCount: S.optional(S.Number),
336
+ currentStartedSandboxes: S.optional(S.Number),
337
+ availabilityScore: S.optional(S.Number),
338
+ region: S.String,
339
+ name: S.String,
340
+ state: RunnerState,
341
+ lastChecked: S.optional(S.String),
342
+ unschedulable: S.Boolean,
343
+ tags: RunnerTagsList,
344
+ createdAt: S.String,
345
+ updatedAt: S.String,
346
+ version: S.String,
347
+ apiVersion: S.String,
348
+ runnerClass: RunnerClass,
349
+ appVersion: S.optional(S.String),
350
+ class: S.optional(S.String),
351
+ }),
352
+ ).annotate({ identifier: "Runner" }) as any as S.Schema<Runner>;
353
+
354
+ export interface GetRunnerBySandboxIdRequest {
355
+ sandboxId: string;
356
+ }
357
+ export const GetRunnerBySandboxIdRequest = /*@__PURE__*/ S.suspend(() =>
358
+ S.Struct({
359
+ sandboxId: S.String.pipe(T.Label()),
360
+ }).pipe(
361
+ T.Http({
362
+ method: "GET",
363
+ uri: "/runners/by-sandbox/{sandboxId}",
364
+ code: 200,
365
+ }),
366
+ ),
367
+ ).annotate({
368
+ identifier: "GetRunnerBySandboxIdRequest",
369
+ }) as any as S.Schema<GetRunnerBySandboxIdRequest>;
370
+
371
+ export interface GetRunnerFullByIdRequest {
372
+ /** Runner ID */
373
+ id: string;
374
+ }
375
+ export const GetRunnerFullByIdRequest = /*@__PURE__*/ S.suspend(() =>
376
+ S.Struct({
377
+ id: S.String.pipe(T.Label()),
378
+ }).pipe(T.Http({ method: "GET", uri: "/runners/{id}/full", code: 200 })),
379
+ ).annotate({
380
+ identifier: "GetRunnerFullByIdRequest",
381
+ }) as any as S.Schema<GetRunnerFullByIdRequest>;
382
+
383
+ export interface GetRunnersBySnapshotRefRequest {
384
+ /** Snapshot ref */
385
+ ref: string;
386
+ }
387
+ export const GetRunnersBySnapshotRefRequest = /*@__PURE__*/ S.suspend(() =>
388
+ S.Struct({
389
+ ref: S.String.pipe(T.Query()),
390
+ }).pipe(
391
+ T.Http({ method: "GET", uri: "/runners/by-snapshot-ref", code: 200 }),
392
+ ),
393
+ ).annotate({
394
+ identifier: "GetRunnersBySnapshotRefRequest",
395
+ }) as any as S.Schema<GetRunnersBySnapshotRefRequest>;
396
+
397
+ export interface RunnerSnapshotDto {
398
+ /** Runner snapshot ID */
399
+ runnerSnapshotId: string;
400
+ /** Runner ID */
401
+ runnerId: string;
402
+ /** Runner domain */
403
+ runnerDomain?: string;
404
+ }
405
+ export const RunnerSnapshotDto = /*@__PURE__*/ S.suspend(() =>
406
+ S.Struct({
407
+ runnerSnapshotId: S.String,
408
+ runnerId: S.String,
409
+ runnerDomain: S.optional(S.String),
410
+ }),
411
+ ).annotate({
412
+ identifier: "RunnerSnapshotDto",
413
+ }) as any as S.Schema<RunnerSnapshotDto>;
414
+
415
+ export type GetRunnersBySnapshotRefResponseBodyList = Array<RunnerSnapshotDto>;
416
+ export const GetRunnersBySnapshotRefResponseBodyList = /*@__PURE__*/ S.Array(
417
+ RunnerSnapshotDto,
418
+ ) as any as S.Schema<GetRunnersBySnapshotRefResponseBodyList>;
419
+
420
+ export type GetRunnersBySnapshotRefResponse =
421
+ GetRunnersBySnapshotRefResponseBodyList;
422
+ export const GetRunnersBySnapshotRefResponse = /*@__PURE__*/ S.suspend(() =>
423
+ GetRunnersBySnapshotRefResponseBodyList.pipe(T.RawResponseRoot()),
424
+ ).annotate({
425
+ identifier: "GetRunnersBySnapshotRefResponse",
426
+ }) as any as S.Schema<GetRunnersBySnapshotRefResponse>;
427
+
428
+ export interface GetSnapshotRefsForAuthenticatedRunnerRequest {}
429
+ export const GetSnapshotRefsForAuthenticatedRunnerRequest =
430
+ /*@__PURE__*/ S.suspend(() =>
431
+ S.Struct({}).pipe(
432
+ T.Http({ method: "GET", uri: "/runners/me/snapshots", code: 200 }),
433
+ ),
434
+ ).annotate({
435
+ identifier: "GetSnapshotRefsForAuthenticatedRunnerRequest",
436
+ }) as any as S.Schema<GetSnapshotRefsForAuthenticatedRunnerRequest>;
437
+
438
+ export type GetSnapshotRefsForAuthenticatedRunnerResponseBodyList =
439
+ Array<string>;
440
+ export const GetSnapshotRefsForAuthenticatedRunnerResponseBodyList =
441
+ /*@__PURE__*/ S.Array(
442
+ S.String,
443
+ ) as any as S.Schema<GetSnapshotRefsForAuthenticatedRunnerResponseBodyList>;
444
+
445
+ export type GetSnapshotRefsForAuthenticatedRunnerResponse =
446
+ GetSnapshotRefsForAuthenticatedRunnerResponseBodyList;
447
+ export const GetSnapshotRefsForAuthenticatedRunnerResponse =
448
+ /*@__PURE__*/ S.suspend(() =>
449
+ GetSnapshotRefsForAuthenticatedRunnerResponseBodyList.pipe(
450
+ T.RawResponseRoot(),
451
+ ),
452
+ ).annotate({
453
+ identifier: "GetSnapshotRefsForAuthenticatedRunnerResponse",
454
+ }) as any as S.Schema<GetSnapshotRefsForAuthenticatedRunnerResponse>;
455
+
456
+ export interface ListRunnersRequest {
457
+ /** Filter runners by region ID */
458
+ regionId?: string;
459
+ /** Use with JWT to specify the organization ID */
460
+ xDaytonaOrganizationID?: string;
461
+ }
462
+ export const ListRunnersRequest = /*@__PURE__*/ S.suspend(() =>
463
+ S.Struct({
464
+ regionId: S.optional(S.String.pipe(T.Query())),
465
+ xDaytonaOrganizationID: S.optional(
466
+ S.String.pipe(T.Header("X-Daytona-Organization-ID")),
467
+ ),
468
+ }).pipe(T.Http({ method: "GET", uri: "/runners", code: 200 })),
469
+ ).annotate({
470
+ identifier: "ListRunnersRequest",
471
+ }) as any as S.Schema<ListRunnersRequest>;
472
+
473
+ export type ListRunnersResponseBodyList = Array<Runner>;
474
+ export const ListRunnersResponseBodyList = /*@__PURE__*/ S.Array(
475
+ Runner,
476
+ ) as any as S.Schema<ListRunnersResponseBodyList>;
477
+
478
+ export type ListRunnersResponse = ListRunnersResponseBodyList;
479
+ export const ListRunnersResponse = /*@__PURE__*/ S.suspend(() =>
480
+ ListRunnersResponseBodyList.pipe(T.RawResponseRoot()),
481
+ ).annotate({
482
+ identifier: "ListRunnersResponse",
483
+ }) as any as S.Schema<ListRunnersResponse>;
484
+
485
+ export interface RunnerHealthMetrics {
486
+ /** Current CPU load average */
487
+ currentCpuLoadAverage: number;
488
+ /** Current CPU usage percentage */
489
+ currentCpuUsagePercentage: number;
490
+ /** Current memory usage percentage */
491
+ currentMemoryUsagePercentage: number;
492
+ /** Current disk usage percentage */
493
+ currentDiskUsagePercentage: number;
494
+ /** Currently allocated CPU cores */
495
+ currentAllocatedCpu: number;
496
+ /** Currently allocated memory in GiB */
497
+ currentAllocatedMemoryGiB: number;
498
+ /** Currently allocated disk in GiB */
499
+ currentAllocatedDiskGiB: number;
500
+ /** Number of snapshots currently stored */
501
+ currentSnapshotCount: number;
502
+ /** Number of started sandboxes */
503
+ currentStartedSandboxes: number;
504
+ /** Total CPU cores on the runner */
505
+ cpu: number;
506
+ /** Total RAM in GiB on the runner */
507
+ memoryGiB: number;
508
+ /** Total disk space in GiB on the runner */
509
+ diskGiB: number;
510
+ /** Total number of GPUs on the runner */
511
+ gpu?: number;
512
+ /** GPU model name */
513
+ gpuType?: string;
514
+ }
515
+ export const RunnerHealthMetrics = /*@__PURE__*/ S.suspend(() =>
516
+ S.Struct({
517
+ currentCpuLoadAverage: S.Number,
518
+ currentCpuUsagePercentage: S.Number,
519
+ currentMemoryUsagePercentage: S.Number,
520
+ currentDiskUsagePercentage: S.Number,
521
+ currentAllocatedCpu: S.Number,
522
+ currentAllocatedMemoryGiB: S.Number,
523
+ currentAllocatedDiskGiB: S.Number,
524
+ currentSnapshotCount: S.Number,
525
+ currentStartedSandboxes: S.Number,
526
+ cpu: S.Number,
527
+ memoryGiB: S.Number,
528
+ diskGiB: S.Number,
529
+ gpu: S.optional(S.Number),
530
+ gpuType: S.optional(S.String),
531
+ }),
532
+ ).annotate({
533
+ identifier: "RunnerHealthMetrics",
534
+ }) as any as S.Schema<RunnerHealthMetrics>;
535
+
536
+ export interface RunnerServiceHealth {
537
+ /** Name of the service being checked */
538
+ serviceName: string;
539
+ /** Whether the service is healthy */
540
+ healthy: boolean;
541
+ /** Error reason if the service is unhealthy */
542
+ errorReason?: string;
543
+ }
544
+ export const RunnerServiceHealth = /*@__PURE__*/ S.suspend(() =>
545
+ S.Struct({
546
+ serviceName: S.String,
547
+ healthy: S.Boolean,
548
+ errorReason: S.optional(S.String),
549
+ }),
550
+ ).annotate({
551
+ identifier: "RunnerServiceHealth",
552
+ }) as any as S.Schema<RunnerServiceHealth>;
553
+
554
+ /** Health status of individual services on the runner */
555
+ export type RunnerHealthcheckRequestServiceHealthList =
556
+ Array<RunnerServiceHealth>;
557
+ export const RunnerHealthcheckRequestServiceHealthList = /*@__PURE__*/ S.Array(
558
+ RunnerServiceHealth,
559
+ ) as any as S.Schema<RunnerHealthcheckRequestServiceHealthList>;
560
+
561
+ export interface RunnerHealthcheckRequest {
562
+ /** Runner metrics */
563
+ metrics?: RunnerHealthMetrics;
564
+ /** Health status of individual services on the runner */
565
+ serviceHealth?: RunnerHealthcheckRequestServiceHealthList;
566
+ /** Runner domain */
567
+ domain?: string;
568
+ /** Runner proxy URL */
569
+ proxyUrl?: string;
570
+ /** Runner API URL */
571
+ apiUrl?: string;
572
+ /** Runner app version */
573
+ appVersion: string;
574
+ }
575
+ export const RunnerHealthcheckRequest = /*@__PURE__*/ S.suspend(() =>
576
+ S.Struct({
577
+ metrics: S.optional(RunnerHealthMetrics),
578
+ serviceHealth: S.optional(RunnerHealthcheckRequestServiceHealthList),
579
+ domain: S.optional(S.String),
580
+ proxyUrl: S.optional(S.String),
581
+ apiUrl: S.optional(S.String),
582
+ appVersion: S.String,
583
+ }).pipe(T.Http({ method: "POST", uri: "/runners/healthcheck", code: 200 })),
584
+ ).annotate({
585
+ identifier: "RunnerHealthcheckRequest",
586
+ }) as any as S.Schema<RunnerHealthcheckRequest>;
587
+
588
+ export interface RunnerHealthcheckResponse {}
589
+ export const RunnerHealthcheckResponse = /*@__PURE__*/ S.suspend(() =>
590
+ S.Struct({}),
591
+ ).annotate({
592
+ identifier: "RunnerHealthcheckResponse",
593
+ }) as any as S.Schema<RunnerHealthcheckResponse>;
594
+
595
+ export interface UpdateRunnerDrainingRequest {
596
+ /** Runner ID */
597
+ id: string;
598
+ /** Use with JWT to specify the organization ID */
599
+ xDaytonaOrganizationID?: string;
600
+ }
601
+ export const UpdateRunnerDrainingRequest = /*@__PURE__*/ S.suspend(() =>
602
+ S.Struct({
603
+ id: S.String.pipe(T.Label()),
604
+ xDaytonaOrganizationID: S.optional(
605
+ S.String.pipe(T.Header("X-Daytona-Organization-ID")),
606
+ ),
607
+ }).pipe(
608
+ T.Http({ method: "PATCH", uri: "/runners/{id}/draining", code: 200 }),
609
+ ),
610
+ ).annotate({
611
+ identifier: "UpdateRunnerDrainingRequest",
612
+ }) as any as S.Schema<UpdateRunnerDrainingRequest>;
613
+
614
+ export interface UpdateRunnerSchedulingRequest {
615
+ /** Runner ID */
616
+ id: string;
617
+ /** Use with JWT to specify the organization ID */
618
+ xDaytonaOrganizationID?: string;
619
+ }
620
+ export const UpdateRunnerSchedulingRequest = /*@__PURE__*/ S.suspend(() =>
621
+ S.Struct({
622
+ id: S.String.pipe(T.Label()),
623
+ xDaytonaOrganizationID: S.optional(
624
+ S.String.pipe(T.Header("X-Daytona-Organization-ID")),
625
+ ),
626
+ }).pipe(
627
+ T.Http({ method: "PATCH", uri: "/runners/{id}/scheduling", code: 200 }),
628
+ ),
629
+ ).annotate({
630
+ identifier: "UpdateRunnerSchedulingRequest",
631
+ }) as any as S.Schema<UpdateRunnerSchedulingRequest>;
632
+
633
+ export type CreateRunnerError = DaytonaOpError;
634
+ /** Create runner */
635
+ export const createRunner: API.OperationMethod<
636
+ CreateRunnerRequest,
637
+ CreateRunnerResponse,
638
+ CreateRunnerError,
639
+ DaytonaOpContext
640
+ > = /*@__PURE__*/ API.make(() => ({
641
+ input: CreateRunnerRequest,
642
+ output: CreateRunnerResponse,
643
+ errors: [UnknownDaytonaError],
644
+ protocol: DaytonaProtocol,
645
+ retry: Retry.Retry,
646
+ }));
647
+
648
+ export type DeleteRunnerError = DaytonaOpError;
649
+ /** Delete runner */
650
+ export const deleteRunner: API.OperationMethod<
651
+ DeleteRunnerRequest,
652
+ DeleteRunnerResponse,
653
+ DeleteRunnerError,
654
+ DaytonaOpContext
655
+ > = /*@__PURE__*/ API.make(() => ({
656
+ input: DeleteRunnerRequest,
657
+ output: DeleteRunnerResponse,
658
+ errors: [UnknownDaytonaError],
659
+ protocol: DaytonaProtocol,
660
+ retry: Retry.Retry,
661
+ }));
662
+
663
+ export type GetInfoForAuthenticatedRunnerError = DaytonaOpError;
664
+ /** Get info for authenticated runner */
665
+ export const getInfoForAuthenticatedRunner: API.OperationMethod<
666
+ GetInfoForAuthenticatedRunnerRequest,
667
+ RunnerFull,
668
+ GetInfoForAuthenticatedRunnerError,
669
+ DaytonaOpContext
670
+ > = /*@__PURE__*/ API.make(() => ({
671
+ input: GetInfoForAuthenticatedRunnerRequest,
672
+ output: RunnerFull,
673
+ errors: [UnknownDaytonaError],
674
+ protocol: DaytonaProtocol,
675
+ retry: Retry.Retry,
676
+ }));
677
+
678
+ export type GetRunnerError = DaytonaOpError;
679
+ /** Get runner by ID */
680
+ export const getRunner: API.OperationMethod<
681
+ GetRunnerRequest,
682
+ Runner,
683
+ GetRunnerError,
684
+ DaytonaOpContext
685
+ > = /*@__PURE__*/ API.make(() => ({
686
+ input: GetRunnerRequest,
687
+ output: Runner,
688
+ errors: [UnknownDaytonaError],
689
+ protocol: DaytonaProtocol,
690
+ retry: Retry.Retry,
691
+ }));
692
+
693
+ export type GetRunnerBySandboxIdError = DaytonaOpError;
694
+ /** Get runner by sandbox ID */
695
+ export const getRunnerBySandboxId: API.OperationMethod<
696
+ GetRunnerBySandboxIdRequest,
697
+ RunnerFull,
698
+ GetRunnerBySandboxIdError,
699
+ DaytonaOpContext
700
+ > = /*@__PURE__*/ API.make(() => ({
701
+ input: GetRunnerBySandboxIdRequest,
702
+ output: RunnerFull,
703
+ errors: [UnknownDaytonaError],
704
+ protocol: DaytonaProtocol,
705
+ retry: Retry.Retry,
706
+ }));
707
+
708
+ export type GetRunnerFullByIdError = DaytonaOpError;
709
+ /** Get runner by ID */
710
+ export const getRunnerFullById: API.OperationMethod<
711
+ GetRunnerFullByIdRequest,
712
+ RunnerFull,
713
+ GetRunnerFullByIdError,
714
+ DaytonaOpContext
715
+ > = /*@__PURE__*/ API.make(() => ({
716
+ input: GetRunnerFullByIdRequest,
717
+ output: RunnerFull,
718
+ errors: [UnknownDaytonaError],
719
+ protocol: DaytonaProtocol,
720
+ retry: Retry.Retry,
721
+ }));
722
+
723
+ export type GetRunnersBySnapshotRefError = DaytonaOpError;
724
+ /** Get runners by snapshot ref */
725
+ export const getRunnersBySnapshotRef: API.OperationMethod<
726
+ GetRunnersBySnapshotRefRequest,
727
+ GetRunnersBySnapshotRefResponse,
728
+ GetRunnersBySnapshotRefError,
729
+ DaytonaOpContext
730
+ > = /*@__PURE__*/ API.make(() => ({
731
+ input: GetRunnersBySnapshotRefRequest,
732
+ output: GetRunnersBySnapshotRefResponse,
733
+ errors: [UnknownDaytonaError],
734
+ protocol: DaytonaProtocol,
735
+ retry: Retry.Retry,
736
+ }));
737
+
738
+ export type GetSnapshotRefsForAuthenticatedRunnerError = DaytonaOpError;
739
+ /** Get snapshot refs for authenticated runner */
740
+ export const getSnapshotRefsForAuthenticatedRunner: API.OperationMethod<
741
+ GetSnapshotRefsForAuthenticatedRunnerRequest,
742
+ GetSnapshotRefsForAuthenticatedRunnerResponse,
743
+ GetSnapshotRefsForAuthenticatedRunnerError,
744
+ DaytonaOpContext
745
+ > = /*@__PURE__*/ API.make(() => ({
746
+ input: GetSnapshotRefsForAuthenticatedRunnerRequest,
747
+ output: GetSnapshotRefsForAuthenticatedRunnerResponse,
748
+ errors: [UnknownDaytonaError],
749
+ protocol: DaytonaProtocol,
750
+ retry: Retry.Retry,
751
+ }));
752
+
753
+ export type ListRunnersError = DaytonaOpError;
754
+ /** List all runners */
755
+ export const listRunners: API.OperationMethod<
756
+ ListRunnersRequest,
757
+ ListRunnersResponse,
758
+ ListRunnersError,
759
+ DaytonaOpContext
760
+ > = /*@__PURE__*/ API.make(() => ({
761
+ input: ListRunnersRequest,
762
+ output: ListRunnersResponse,
763
+ errors: [UnknownDaytonaError],
764
+ protocol: DaytonaProtocol,
765
+ retry: Retry.Retry,
766
+ }));
767
+
768
+ export type RunnerHealthcheckError = DaytonaOpError;
769
+ /** Runner healthcheck Endpoint for version 2 runners to send healthcheck and metrics. Updates lastChecked timestamp and runner metrics. */
770
+ export const runnerHealthcheck: API.OperationMethod<
771
+ RunnerHealthcheckRequest,
772
+ RunnerHealthcheckResponse,
773
+ RunnerHealthcheckError,
774
+ DaytonaOpContext
775
+ > = /*@__PURE__*/ API.make(() => ({
776
+ input: RunnerHealthcheckRequest,
777
+ output: RunnerHealthcheckResponse,
778
+ errors: [UnknownDaytonaError],
779
+ protocol: DaytonaProtocol,
780
+ retry: Retry.Retry,
781
+ }));
782
+
783
+ export type UpdateRunnerDrainingError = DaytonaOpError;
784
+ /** Update runner draining status */
785
+ export const updateRunnerDraining: API.OperationMethod<
786
+ UpdateRunnerDrainingRequest,
787
+ Runner,
788
+ UpdateRunnerDrainingError,
789
+ DaytonaOpContext
790
+ > = /*@__PURE__*/ API.make(() => ({
791
+ input: UpdateRunnerDrainingRequest,
792
+ output: Runner,
793
+ errors: [UnknownDaytonaError],
794
+ protocol: DaytonaProtocol,
795
+ retry: Retry.Retry,
796
+ }));
797
+
798
+ export type UpdateRunnerSchedulingError = DaytonaOpError;
799
+ /** Update runner scheduling status */
800
+ export const updateRunnerScheduling: API.OperationMethod<
801
+ UpdateRunnerSchedulingRequest,
802
+ Runner,
803
+ UpdateRunnerSchedulingError,
804
+ DaytonaOpContext
805
+ > = /*@__PURE__*/ API.make(() => ({
806
+ input: UpdateRunnerSchedulingRequest,
807
+ output: Runner,
808
+ errors: [UnknownDaytonaError],
809
+ protocol: DaytonaProtocol,
810
+ retry: Retry.Retry,
811
+ }));