sandcovery 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +96 -0
- package/dist/Schema-DiSfJzMf.mjs +11549 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.mjs +1710 -0
- package/dist/handlers-rkx0CsMY.mjs +2459 -0
- package/dist/index.d.mts +84 -1
- package/dist/index.mjs +1 -5
- package/dist/origin-CIA-1Jia.mjs +413 -0
- package/dist/posthog-project-BpOd2VxW.mjs +1 -0
- package/dist/posthog-project-CdWw_ofg.mjs +22 -0
- package/dist/spec-DfgmzDj-.mjs +2057 -0
- package/dist/src-YrynO3hz.mjs +799 -0
- package/dist/telemetry-BYnuVdoZ.mjs +43 -0
- package/dist/telemetry-delivery-zinKRHRc.mjs +8712 -0
- package/dist/types-DMB8KnA3.d.mts +545 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +67 -0
- package/package.json +46 -4
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
declare const ACTIVITY_ACTIONS: readonly ["sandbox.create", "sandbox.create_attempt", "sandbox.destroy", "sandbox.expire", "sandbox.pause", "sandbox.resume", "sandbox.snapshot"];
|
|
2
|
+
type ActivityAction = (typeof ACTIVITY_ACTIONS)[number] | (string & Record<never, never>);
|
|
3
|
+
interface ActivityEvent {
|
|
4
|
+
readonly action: ActivityAction;
|
|
5
|
+
readonly api_key_id: string | null;
|
|
6
|
+
readonly at: string;
|
|
7
|
+
readonly error: string | null;
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly outcome: "failed" | "succeeded";
|
|
10
|
+
readonly provider: Provider | null;
|
|
11
|
+
readonly sandbox_id: string | null;
|
|
12
|
+
}
|
|
13
|
+
interface ActivityList {
|
|
14
|
+
readonly data: readonly ActivityEvent[];
|
|
15
|
+
readonly next_cursor: string | null;
|
|
16
|
+
}
|
|
17
|
+
interface Billing {
|
|
18
|
+
readonly credit_balance_micro_usd: number;
|
|
19
|
+
readonly plan: Plan;
|
|
20
|
+
readonly pro_price: ProPrice | null;
|
|
21
|
+
}
|
|
22
|
+
interface CatalogBenchmarkTerms {
|
|
23
|
+
readonly detail: string | null;
|
|
24
|
+
readonly source_url: string | null;
|
|
25
|
+
readonly value: "barred" | "conditional" | "no_bar_found";
|
|
26
|
+
}
|
|
27
|
+
interface CatalogFlag {
|
|
28
|
+
readonly detail: string | null;
|
|
29
|
+
readonly source_url: string | null;
|
|
30
|
+
readonly value: boolean;
|
|
31
|
+
}
|
|
32
|
+
interface CatalogGpus {
|
|
33
|
+
readonly detail: string | null;
|
|
34
|
+
readonly source_url: string | null;
|
|
35
|
+
readonly value: readonly {
|
|
36
|
+
readonly hourly_micro_usd: number | null;
|
|
37
|
+
readonly name: string;
|
|
38
|
+
}[];
|
|
39
|
+
}
|
|
40
|
+
interface CatalogLimit {
|
|
41
|
+
readonly detail: string | null;
|
|
42
|
+
readonly source_url: string | null;
|
|
43
|
+
readonly value: number | null;
|
|
44
|
+
}
|
|
45
|
+
interface CatalogList {
|
|
46
|
+
readonly detail: string | null;
|
|
47
|
+
readonly source_url: string | null;
|
|
48
|
+
readonly value: readonly string[];
|
|
49
|
+
}
|
|
50
|
+
type CatalogMeasurement = "measured" | "not_measured" | "not_published";
|
|
51
|
+
interface CatalogText {
|
|
52
|
+
readonly detail: string | null;
|
|
53
|
+
readonly source_url: string | null;
|
|
54
|
+
readonly value: string;
|
|
55
|
+
}
|
|
56
|
+
interface ConcurrencyLimitReachedError {
|
|
57
|
+
readonly concurrency_cap: number;
|
|
58
|
+
readonly error: "concurrency_limit_reached";
|
|
59
|
+
readonly message: string;
|
|
60
|
+
}
|
|
61
|
+
interface ConflictError {
|
|
62
|
+
readonly error: "conflict";
|
|
63
|
+
readonly message: string;
|
|
64
|
+
}
|
|
65
|
+
interface CreateAttempt {
|
|
66
|
+
readonly duration_ms: number;
|
|
67
|
+
readonly failure: {
|
|
68
|
+
readonly message: string;
|
|
69
|
+
readonly reason: CreateFailureReason;
|
|
70
|
+
} | null;
|
|
71
|
+
readonly provider: Provider;
|
|
72
|
+
readonly started_at: string;
|
|
73
|
+
}
|
|
74
|
+
interface CreatedKey {
|
|
75
|
+
readonly key: Key;
|
|
76
|
+
readonly secret: string;
|
|
77
|
+
}
|
|
78
|
+
type CreateFailureReason = "capacity" | "quota" | "rejected" | "server_error" | "timeout";
|
|
79
|
+
interface CreateKeyRequest {
|
|
80
|
+
readonly allowed_providers?: readonly Provider[] | null;
|
|
81
|
+
readonly expires_at?: string | null;
|
|
82
|
+
readonly kind?: KeyKind_1;
|
|
83
|
+
readonly max_concurrent_sandboxes?: number | null;
|
|
84
|
+
readonly max_ttl_seconds?: number | null;
|
|
85
|
+
readonly name: string;
|
|
86
|
+
readonly spend_limit?: SpendLimit | null;
|
|
87
|
+
}
|
|
88
|
+
interface CreateSandboxRequest {
|
|
89
|
+
readonly disk_mib?: number;
|
|
90
|
+
readonly egress?: EgressPolicy;
|
|
91
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
92
|
+
readonly gpu?: Gpu;
|
|
93
|
+
readonly idle_timeout_seconds?: number;
|
|
94
|
+
readonly image?: string;
|
|
95
|
+
readonly memory_mib?: number;
|
|
96
|
+
readonly ports?: readonly number[];
|
|
97
|
+
readonly region?: Region;
|
|
98
|
+
readonly size?: SizeName;
|
|
99
|
+
readonly ttl_seconds?: number;
|
|
100
|
+
readonly vcpu?: number;
|
|
101
|
+
readonly provider?: ProviderPreferences;
|
|
102
|
+
readonly snapshot_id?: string;
|
|
103
|
+
}
|
|
104
|
+
interface CredentialField {
|
|
105
|
+
readonly label: string;
|
|
106
|
+
readonly name: string;
|
|
107
|
+
readonly secret: boolean;
|
|
108
|
+
}
|
|
109
|
+
type CredentialFields = Readonly<Record<string, string>>;
|
|
110
|
+
interface CreditCheckout {
|
|
111
|
+
readonly url: string;
|
|
112
|
+
}
|
|
113
|
+
interface CreditPurchaseRequest {
|
|
114
|
+
readonly amount_micro_usd: number;
|
|
115
|
+
}
|
|
116
|
+
interface DetachedExec {
|
|
117
|
+
readonly started_at: string;
|
|
118
|
+
}
|
|
119
|
+
interface DetachedExecRequest {
|
|
120
|
+
readonly command: string;
|
|
121
|
+
readonly cwd?: string;
|
|
122
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
123
|
+
}
|
|
124
|
+
declare const EGRESS_MODES: readonly ["allow_all", "allowlist", "deny_all"];
|
|
125
|
+
type EgressMode = (typeof EGRESS_MODES)[number] | (string & Record<never, never>);
|
|
126
|
+
type EgressPolicy = {
|
|
127
|
+
readonly mode: "allow_all";
|
|
128
|
+
} | {
|
|
129
|
+
readonly mode: "deny_all";
|
|
130
|
+
} | {
|
|
131
|
+
readonly destinations: readonly string[];
|
|
132
|
+
readonly mode: "allowlist";
|
|
133
|
+
};
|
|
134
|
+
interface Estimate {
|
|
135
|
+
readonly hourly_micro_usd: number;
|
|
136
|
+
readonly provider: Provider;
|
|
137
|
+
readonly rate_card_version: string;
|
|
138
|
+
readonly ttl_micro_usd: number;
|
|
139
|
+
}
|
|
140
|
+
interface EstimateList {
|
|
141
|
+
readonly data: readonly Estimate[];
|
|
142
|
+
}
|
|
143
|
+
interface EstimateRequest {
|
|
144
|
+
readonly disk_mib?: number;
|
|
145
|
+
readonly egress?: EgressPolicy;
|
|
146
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
147
|
+
readonly gpu?: Gpu;
|
|
148
|
+
readonly idle_timeout_seconds?: number;
|
|
149
|
+
readonly image?: string;
|
|
150
|
+
readonly memory_mib?: number;
|
|
151
|
+
readonly ports?: readonly number[];
|
|
152
|
+
readonly region?: Region;
|
|
153
|
+
readonly size?: SizeName;
|
|
154
|
+
readonly ttl_seconds?: number;
|
|
155
|
+
readonly vcpu?: number;
|
|
156
|
+
readonly provider?: ProviderPreferences;
|
|
157
|
+
}
|
|
158
|
+
type ExecEvent = {
|
|
159
|
+
readonly data: string;
|
|
160
|
+
readonly type: "stdout";
|
|
161
|
+
} | {
|
|
162
|
+
readonly data: string;
|
|
163
|
+
readonly type: "stderr";
|
|
164
|
+
} | {
|
|
165
|
+
readonly duration_ms: number;
|
|
166
|
+
readonly exit_code: number;
|
|
167
|
+
readonly type: "exit";
|
|
168
|
+
} | {
|
|
169
|
+
readonly message: string;
|
|
170
|
+
readonly provider: Provider;
|
|
171
|
+
readonly type: "error";
|
|
172
|
+
};
|
|
173
|
+
interface ExecRequest {
|
|
174
|
+
readonly command: string;
|
|
175
|
+
readonly cwd?: string;
|
|
176
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
177
|
+
readonly timeout_seconds?: number;
|
|
178
|
+
}
|
|
179
|
+
interface ExecResult {
|
|
180
|
+
readonly duration_ms: number;
|
|
181
|
+
readonly exit_code: number;
|
|
182
|
+
readonly stderr: string;
|
|
183
|
+
readonly stdout: string;
|
|
184
|
+
}
|
|
185
|
+
interface FileEntry {
|
|
186
|
+
readonly modified_at: string | null;
|
|
187
|
+
readonly name: string;
|
|
188
|
+
readonly path: string;
|
|
189
|
+
readonly size_bytes: number | null;
|
|
190
|
+
readonly type: FileEntryType;
|
|
191
|
+
}
|
|
192
|
+
type FileEntryType = "directory" | "file" | "other" | "symlink";
|
|
193
|
+
interface FileList {
|
|
194
|
+
readonly entries: readonly FileEntry[];
|
|
195
|
+
readonly path: string;
|
|
196
|
+
}
|
|
197
|
+
interface ForbiddenError {
|
|
198
|
+
readonly error: "forbidden";
|
|
199
|
+
readonly message: string;
|
|
200
|
+
}
|
|
201
|
+
interface Gpu {
|
|
202
|
+
readonly count: number;
|
|
203
|
+
readonly type: GpuType;
|
|
204
|
+
}
|
|
205
|
+
declare const GPU_TYPES: readonly ["b200", "b300", "h100", "h200", "mi355x", "rtx-4090", "rtx-5090", "rtx-pro-6000"];
|
|
206
|
+
type GpuType = (typeof GPU_TYPES)[number] | (string & Record<never, never>);
|
|
207
|
+
interface Health {
|
|
208
|
+
readonly ok: true;
|
|
209
|
+
}
|
|
210
|
+
type IncidentImpact = "none" | "minor" | "major" | "critical" | "maintenance";
|
|
211
|
+
interface InvalidRequestError {
|
|
212
|
+
readonly error: "invalid_request";
|
|
213
|
+
readonly message: string;
|
|
214
|
+
}
|
|
215
|
+
interface Key {
|
|
216
|
+
readonly allowed_providers: readonly Provider[] | null;
|
|
217
|
+
readonly max_concurrent_sandboxes: number | null;
|
|
218
|
+
readonly max_ttl_seconds: number | null;
|
|
219
|
+
readonly spend_limit: SpendLimit | null;
|
|
220
|
+
readonly created_at: string;
|
|
221
|
+
readonly expires_at: string | null;
|
|
222
|
+
readonly id: string;
|
|
223
|
+
readonly kind: KeyKind;
|
|
224
|
+
readonly last_used_at: string | null;
|
|
225
|
+
readonly name: string;
|
|
226
|
+
readonly revoked_at: string | null;
|
|
227
|
+
readonly spend: {
|
|
228
|
+
readonly resets_at: string | null;
|
|
229
|
+
readonly spent_micro_usd: number;
|
|
230
|
+
};
|
|
231
|
+
readonly start: string;
|
|
232
|
+
}
|
|
233
|
+
type KeyKind = "api" | "management";
|
|
234
|
+
type KeyKind_1 = "api" | "management";
|
|
235
|
+
interface KeyList {
|
|
236
|
+
readonly data: readonly Key[];
|
|
237
|
+
}
|
|
238
|
+
interface NoProviderAvailableError {
|
|
239
|
+
readonly attempts: readonly CreateAttempt[];
|
|
240
|
+
readonly error: "no_provider_available";
|
|
241
|
+
readonly message: string;
|
|
242
|
+
}
|
|
243
|
+
interface NotFoundError {
|
|
244
|
+
readonly error: "not_found";
|
|
245
|
+
readonly message: string;
|
|
246
|
+
}
|
|
247
|
+
interface Offer {
|
|
248
|
+
readonly cap_vcpu_seconds: number;
|
|
249
|
+
readonly keys_counted: number;
|
|
250
|
+
readonly keys_needed: number;
|
|
251
|
+
readonly month_used_up: boolean;
|
|
252
|
+
readonly provider: Provider_1;
|
|
253
|
+
readonly remaining_vcpu_seconds: number;
|
|
254
|
+
readonly used_vcpu_seconds: number;
|
|
255
|
+
readonly vcpu_seconds_per_key: number;
|
|
256
|
+
}
|
|
257
|
+
type Plan = "free" | "pro";
|
|
258
|
+
interface PortPreview {
|
|
259
|
+
readonly expires_at: string | null;
|
|
260
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
261
|
+
readonly port: number;
|
|
262
|
+
readonly url: string;
|
|
263
|
+
}
|
|
264
|
+
type ProInterval = "day" | "month" | "week" | "year";
|
|
265
|
+
interface ProPrice {
|
|
266
|
+
readonly interval: ProInterval;
|
|
267
|
+
readonly micro_usd: number;
|
|
268
|
+
}
|
|
269
|
+
declare const PROVIDERS: readonly ["daytona", "depot", "e2b", "upstash"];
|
|
270
|
+
type Provider = (typeof PROVIDERS)[number] | (string & Record<never, never>);
|
|
271
|
+
declare const PROVIDER_1S: readonly ["daytona", "depot", "e2b", "upstash"];
|
|
272
|
+
type Provider_1 = (typeof PROVIDER_1S)[number] | (string & Record<never, never>);
|
|
273
|
+
interface ProviderBoard {
|
|
274
|
+
readonly data: readonly ProviderBoardEntry[];
|
|
275
|
+
}
|
|
276
|
+
interface ProviderBoardEntry {
|
|
277
|
+
readonly create_latency_ms: {
|
|
278
|
+
readonly p50: number | null;
|
|
279
|
+
readonly p95: number | null;
|
|
280
|
+
};
|
|
281
|
+
readonly credential_fields: readonly CredentialField[];
|
|
282
|
+
readonly docs_only_adapter: boolean;
|
|
283
|
+
readonly features: ProviderFeatures;
|
|
284
|
+
readonly gpu_prices: readonly {
|
|
285
|
+
readonly hourly_micro_usd: number;
|
|
286
|
+
readonly type: GpuType;
|
|
287
|
+
}[];
|
|
288
|
+
readonly health_published: boolean;
|
|
289
|
+
readonly home_url: string;
|
|
290
|
+
readonly incidents: VendorIncidentRead | null;
|
|
291
|
+
readonly name: string;
|
|
292
|
+
readonly prices: readonly {
|
|
293
|
+
readonly hourly_micro_usd: number;
|
|
294
|
+
readonly size: StandardSize;
|
|
295
|
+
}[];
|
|
296
|
+
readonly provider: Provider;
|
|
297
|
+
readonly rate_card_source_url: string;
|
|
298
|
+
readonly rate_card_version: string;
|
|
299
|
+
readonly security: ProviderSecurity;
|
|
300
|
+
readonly status: ProviderStatus;
|
|
301
|
+
readonly status_url: string | null;
|
|
302
|
+
readonly updated_at: string;
|
|
303
|
+
readonly uptime: {
|
|
304
|
+
readonly last_15_minutes: number | null;
|
|
305
|
+
readonly last_24_hours: number | null;
|
|
306
|
+
readonly last_7_days: number | null;
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
interface ProviderCatalog {
|
|
310
|
+
readonly data: readonly ProviderCatalogEntry[];
|
|
311
|
+
}
|
|
312
|
+
interface ProviderCatalogEntry {
|
|
313
|
+
readonly adapter_source_urls: readonly string[];
|
|
314
|
+
readonly billing: CatalogText | null;
|
|
315
|
+
readonly capabilities: {
|
|
316
|
+
readonly custom_image: CatalogFlag | null;
|
|
317
|
+
readonly environment: CatalogFlag | null;
|
|
318
|
+
readonly files: CatalogFlag | null;
|
|
319
|
+
readonly idle_timeout: CatalogFlag | null;
|
|
320
|
+
readonly pause: CatalogFlag | null;
|
|
321
|
+
readonly ports: CatalogFlag | null;
|
|
322
|
+
readonly snapshot: CatalogFlag | null;
|
|
323
|
+
readonly streamed_exec: CatalogFlag | null;
|
|
324
|
+
};
|
|
325
|
+
readonly create_latency_ms: {
|
|
326
|
+
readonly p50: number | null;
|
|
327
|
+
readonly p95: number | null;
|
|
328
|
+
};
|
|
329
|
+
readonly credential_fields: readonly CredentialField[];
|
|
330
|
+
readonly docs_only_adapter: boolean;
|
|
331
|
+
readonly egress_modes: CatalogList | null;
|
|
332
|
+
readonly gpus: CatalogGpus | null;
|
|
333
|
+
readonly incidents: VendorIncidentRead | null;
|
|
334
|
+
readonly limits: {
|
|
335
|
+
readonly max_disk_mib: CatalogLimit | null;
|
|
336
|
+
readonly max_memory_mib: CatalogLimit | null;
|
|
337
|
+
readonly max_ttl_seconds: CatalogLimit | null;
|
|
338
|
+
readonly max_vcpu: CatalogLimit | null;
|
|
339
|
+
};
|
|
340
|
+
readonly links: {
|
|
341
|
+
readonly docs_url: string;
|
|
342
|
+
readonly home_url: string;
|
|
343
|
+
readonly pricing_url: string;
|
|
344
|
+
readonly security_url: string | null;
|
|
345
|
+
readonly status_url: string | null;
|
|
346
|
+
readonly terms_url: string;
|
|
347
|
+
};
|
|
348
|
+
readonly measured_at: string | null;
|
|
349
|
+
readonly measurement: CatalogMeasurement;
|
|
350
|
+
readonly name: string;
|
|
351
|
+
readonly policy: {
|
|
352
|
+
readonly benchmark_terms: CatalogBenchmarkTerms;
|
|
353
|
+
readonly compliance: SecurityList | null;
|
|
354
|
+
readonly data_location: SecurityText | null;
|
|
355
|
+
readonly free_allowance: CatalogText | null;
|
|
356
|
+
readonly isolation: SecurityText | null;
|
|
357
|
+
readonly payment_required: CatalogFlag | null;
|
|
358
|
+
readonly plan_required: CatalogFlag | null;
|
|
359
|
+
readonly read_at: string;
|
|
360
|
+
readonly sla: CatalogText | null;
|
|
361
|
+
};
|
|
362
|
+
readonly prices: readonly {
|
|
363
|
+
readonly hourly_micro_usd: number | null;
|
|
364
|
+
readonly offered: boolean | null;
|
|
365
|
+
readonly size: StandardSize;
|
|
366
|
+
}[];
|
|
367
|
+
readonly provider: Provider;
|
|
368
|
+
readonly rates: {
|
|
369
|
+
readonly as_of: string;
|
|
370
|
+
readonly detail: string | null;
|
|
371
|
+
readonly memory_gib_hour_micro_usd: number;
|
|
372
|
+
readonly source_url: string;
|
|
373
|
+
readonly vcpu_hour_micro_usd: number;
|
|
374
|
+
} | null;
|
|
375
|
+
readonly regions: CatalogList | null;
|
|
376
|
+
readonly routed: boolean;
|
|
377
|
+
readonly sizes: CatalogText | null;
|
|
378
|
+
readonly status: ProviderStatus;
|
|
379
|
+
readonly uptime: {
|
|
380
|
+
readonly last_15_minutes: number | null;
|
|
381
|
+
readonly last_24_hours: number | null;
|
|
382
|
+
readonly last_7_days: number | null;
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
interface ProviderCredential {
|
|
386
|
+
readonly created_at: string;
|
|
387
|
+
readonly hint: string;
|
|
388
|
+
readonly provider: Provider;
|
|
389
|
+
readonly updated_at: string;
|
|
390
|
+
}
|
|
391
|
+
interface ProviderCredentialList {
|
|
392
|
+
readonly data: readonly ProviderCredential[];
|
|
393
|
+
}
|
|
394
|
+
interface ProviderError {
|
|
395
|
+
readonly error: "provider_error";
|
|
396
|
+
readonly message: string;
|
|
397
|
+
readonly provider: Provider;
|
|
398
|
+
}
|
|
399
|
+
interface ProviderFeatures {
|
|
400
|
+
readonly custom_image: boolean;
|
|
401
|
+
readonly egress_modes: readonly EgressMode[];
|
|
402
|
+
readonly gpu_types: readonly GpuType[];
|
|
403
|
+
readonly idle_timeout: boolean;
|
|
404
|
+
readonly max_disk_mib: number | null;
|
|
405
|
+
readonly max_memory_mib: number;
|
|
406
|
+
readonly max_ttl_seconds: number;
|
|
407
|
+
readonly max_vcpu: number;
|
|
408
|
+
readonly pause: boolean;
|
|
409
|
+
readonly ports: boolean;
|
|
410
|
+
readonly regions: readonly Region[];
|
|
411
|
+
readonly snapshot: boolean;
|
|
412
|
+
readonly streamed_exec: boolean;
|
|
413
|
+
}
|
|
414
|
+
interface ProviderPreferences {
|
|
415
|
+
readonly allow_fallbacks?: boolean;
|
|
416
|
+
readonly ignore?: readonly Provider[];
|
|
417
|
+
readonly only?: readonly Provider[];
|
|
418
|
+
readonly order?: readonly Provider[];
|
|
419
|
+
readonly sort?: ProviderSort;
|
|
420
|
+
}
|
|
421
|
+
interface ProviderSecurity {
|
|
422
|
+
readonly compliance: SecurityList | null;
|
|
423
|
+
readonly data_location: SecurityText | null;
|
|
424
|
+
readonly isolation: SecurityText | null;
|
|
425
|
+
}
|
|
426
|
+
type ProviderSort = "latency" | "price" | "uptime";
|
|
427
|
+
type ProviderStatus = "degraded" | "down" | "operational" | "unknown";
|
|
428
|
+
declare const REGIONS: readonly ["asia", "eu", "us"];
|
|
429
|
+
type Region = (typeof REGIONS)[number] | (string & Record<never, never>);
|
|
430
|
+
interface Sandbox {
|
|
431
|
+
readonly api_key_id: string;
|
|
432
|
+
readonly attempts: readonly CreateAttempt[];
|
|
433
|
+
readonly cost: SandboxCost;
|
|
434
|
+
readonly created_at: string;
|
|
435
|
+
readonly disk_mib: number | null;
|
|
436
|
+
readonly egress: EgressPolicy;
|
|
437
|
+
readonly end_reason: SandboxEndReason | null;
|
|
438
|
+
readonly ended_at: string | null;
|
|
439
|
+
readonly expires_at: string;
|
|
440
|
+
readonly gpu: Gpu | null;
|
|
441
|
+
readonly id: string;
|
|
442
|
+
readonly idle_timeout_seconds: number | null;
|
|
443
|
+
readonly image: string | null;
|
|
444
|
+
readonly memory_mib: number;
|
|
445
|
+
readonly ports: readonly number[];
|
|
446
|
+
readonly provider: Provider | null;
|
|
447
|
+
readonly provider_sandbox_id: string | null;
|
|
448
|
+
readonly region: Region | null;
|
|
449
|
+
readonly size: SizeName | null;
|
|
450
|
+
readonly started_at: string | null;
|
|
451
|
+
readonly status: SandboxStatus;
|
|
452
|
+
readonly ttl_seconds: number;
|
|
453
|
+
readonly vcpu: number;
|
|
454
|
+
}
|
|
455
|
+
interface SandboxCost {
|
|
456
|
+
readonly estimated_micro_usd: number;
|
|
457
|
+
readonly hourly_micro_usd: number;
|
|
458
|
+
readonly rate_card_version: string;
|
|
459
|
+
}
|
|
460
|
+
type SandboxEndReason = "create_failed" | "destroyed" | "expired" | "gone";
|
|
461
|
+
interface SandboxList {
|
|
462
|
+
readonly data: readonly Sandbox[];
|
|
463
|
+
readonly next_cursor: string | null;
|
|
464
|
+
}
|
|
465
|
+
type SandboxStatus = "creating" | "destroyed" | "destroying" | "failed" | "paused" | "running";
|
|
466
|
+
interface SecurityList {
|
|
467
|
+
readonly detail: string | null;
|
|
468
|
+
readonly read_at: string;
|
|
469
|
+
readonly source_changed_at: string | null;
|
|
470
|
+
readonly source_url: string;
|
|
471
|
+
readonly value: readonly string[];
|
|
472
|
+
}
|
|
473
|
+
interface SecurityText {
|
|
474
|
+
readonly detail: string | null;
|
|
475
|
+
readonly read_at: string;
|
|
476
|
+
readonly source_changed_at: string | null;
|
|
477
|
+
readonly source_url: string;
|
|
478
|
+
readonly value: string;
|
|
479
|
+
}
|
|
480
|
+
declare const SIZE_NAMES: readonly ["1x2", "1x2:cheapest", "1x2:fastest", "1x2:most-reliable", "2x4", "2x4:cheapest", "2x4:fastest", "2x4:most-reliable", "4x8", "4x8:cheapest", "4x8:fastest", "4x8:most-reliable", "8x16", "8x16:cheapest", "8x16:fastest", "8x16:most-reliable"];
|
|
481
|
+
type SizeName = (typeof SIZE_NAMES)[number] | (string & Record<never, never>);
|
|
482
|
+
interface Snapshot {
|
|
483
|
+
readonly created_at: string;
|
|
484
|
+
readonly id: string;
|
|
485
|
+
readonly provider: Provider;
|
|
486
|
+
readonly sandbox_id: string;
|
|
487
|
+
}
|
|
488
|
+
interface SpendLimit {
|
|
489
|
+
readonly limit_micro_usd: number;
|
|
490
|
+
readonly period: SpendLimitPeriod;
|
|
491
|
+
}
|
|
492
|
+
type SpendLimitPeriod = "day" | "month" | "total" | "week";
|
|
493
|
+
interface SpendLimitReachedError {
|
|
494
|
+
readonly error: "spend_limit_reached";
|
|
495
|
+
readonly limit_micro_usd: number;
|
|
496
|
+
readonly message: string;
|
|
497
|
+
readonly resets_at: string | null;
|
|
498
|
+
readonly spent_micro_usd: number;
|
|
499
|
+
}
|
|
500
|
+
declare const STANDARD_SIZES: readonly ["1x2", "2x4", "4x8", "8x16"];
|
|
501
|
+
type StandardSize = (typeof STANDARD_SIZES)[number] | (string & Record<never, never>);
|
|
502
|
+
interface UnauthorizedError {
|
|
503
|
+
readonly error: "unauthorized";
|
|
504
|
+
readonly message: string;
|
|
505
|
+
}
|
|
506
|
+
interface UnsupportedError {
|
|
507
|
+
readonly error: "unsupported";
|
|
508
|
+
readonly message: string;
|
|
509
|
+
readonly options: readonly string[];
|
|
510
|
+
readonly provider: Provider | null;
|
|
511
|
+
}
|
|
512
|
+
interface UpdateKeyRequest {
|
|
513
|
+
readonly allowed_providers?: readonly Provider[] | null;
|
|
514
|
+
readonly expires_at?: string | null;
|
|
515
|
+
readonly max_concurrent_sandboxes?: number | null;
|
|
516
|
+
readonly max_ttl_seconds?: number | null;
|
|
517
|
+
readonly name?: string;
|
|
518
|
+
readonly spend_limit?: SpendLimit | null;
|
|
519
|
+
}
|
|
520
|
+
interface Usage {
|
|
521
|
+
readonly data: readonly UsageDay[];
|
|
522
|
+
}
|
|
523
|
+
interface UsageDay {
|
|
524
|
+
readonly api_key_id: string;
|
|
525
|
+
readonly date: string;
|
|
526
|
+
readonly estimated_micro_usd: number;
|
|
527
|
+
readonly provider: Provider;
|
|
528
|
+
readonly sandbox_count: number;
|
|
529
|
+
readonly sandbox_seconds: number;
|
|
530
|
+
}
|
|
531
|
+
interface VendorIncident {
|
|
532
|
+
readonly id: string;
|
|
533
|
+
readonly impact: IncidentImpact;
|
|
534
|
+
readonly resolved_at: string | null;
|
|
535
|
+
readonly started_at: string;
|
|
536
|
+
readonly title: string;
|
|
537
|
+
readonly url: string;
|
|
538
|
+
}
|
|
539
|
+
interface VendorIncidentRead {
|
|
540
|
+
readonly data: readonly VendorIncident[];
|
|
541
|
+
readonly read_at: string;
|
|
542
|
+
readonly source_url: string;
|
|
543
|
+
}
|
|
544
|
+
type ApiError = ConcurrencyLimitReachedError | ConflictError | ForbiddenError | InvalidRequestError | NoProviderAvailableError | NotFoundError | ProviderError | SpendLimitReachedError | UnauthorizedError | UnsupportedError;
|
|
545
|
+
export { PROVIDERS as $, Estimate as A, SizeName as At, GPU_TYPES as B, UsageDay as Bt, CreditCheckout as C, Sandbox as Ct, EGRESS_MODES as D, SandboxStatus as Dt, DetachedExecRequest as E, SandboxList as Et, ExecResult as F, StandardSize as Ft, InvalidRequestError as G, GpuType as H, VendorIncidentRead as Ht, FileEntry as I, UnauthorizedError as It, KeyKind_1 as J, Key as K, FileEntryType as L, UnsupportedError as Lt, EstimateRequest as M, SpendLimit as Mt, ExecEvent as N, SpendLimitPeriod as Nt, EgressMode as O, SecurityList as Ot, ExecRequest as P, SpendLimitReachedError as Pt, Offer as Q, FileList as R, UpdateKeyRequest as Rt, CredentialFields as S, STANDARD_SIZES as St, DetachedExec as T, SandboxEndReason as Tt, Health as U, Gpu as V, VendorIncident as Vt, IncidentImpact as W, NoProviderAvailableError as X, KeyList as Y, NotFoundError as Z, CreateFailureReason as _, ProviderStatus as _t, ApiError as a, Provider as at, CreatedKey as b, Region as bt, CatalogFlag as c, ProviderCatalog as ct, CatalogList as d, ProviderCredentialList as dt, PROVIDER_1S as et, CatalogMeasurement as f, ProviderError as ft, CreateAttempt as g, ProviderSort as gt, ConflictError as h, ProviderSecurity as ht, ActivityList as i, ProPrice as it, EstimateList as j, Snapshot as jt, EgressPolicy as k, SecurityText as kt, CatalogGpus as l, ProviderCatalogEntry as lt, ConcurrencyLimitReachedError as m, ProviderPreferences as mt, ActivityAction as n, PortPreview as nt, Billing as o, ProviderBoard as ot, CatalogText as p, ProviderFeatures as pt, KeyKind as q, ActivityEvent as r, ProInterval as rt, CatalogBenchmarkTerms as s, ProviderBoardEntry as st, ACTIVITY_ACTIONS as t, Plan as tt, CatalogLimit as u, ProviderCredential as ut, CreateKeyRequest as v, Provider_1 as vt, CreditPurchaseRequest as w, SandboxCost as wt, CredentialField as x, SIZE_NAMES as xt, CreateSandboxRequest as y, REGIONS as yt, ForbiddenError as z, Usage as zt };
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $ as PROVIDERS, A as Estimate, At as SizeName, B as GPU_TYPES, Bt as UsageDay, C as CreditCheckout, Ct as Sandbox, D as EGRESS_MODES, Dt as SandboxStatus, E as DetachedExecRequest, Et as SandboxList, F as ExecResult, Ft as StandardSize, G as InvalidRequestError, H as GpuType, Ht as VendorIncidentRead, I as FileEntry, It as UnauthorizedError, J as KeyKind_1, K as Key, L as FileEntryType, Lt as UnsupportedError, M as EstimateRequest, Mt as SpendLimit, N as ExecEvent, Nt as SpendLimitPeriod, O as EgressMode, Ot as SecurityList, P as ExecRequest, Pt as SpendLimitReachedError, Q as Offer, R as FileList, Rt as UpdateKeyRequest, S as CredentialFields, St as STANDARD_SIZES, T as DetachedExec, Tt as SandboxEndReason, U as Health, V as Gpu, Vt as VendorIncident, W as IncidentImpact, X as NoProviderAvailableError, Y as KeyList, Z as NotFoundError, _ as CreateFailureReason, _t as ProviderStatus, a as ApiError, at as Provider, b as CreatedKey, bt as Region, c as CatalogFlag, ct as ProviderCatalog, d as CatalogList, dt as ProviderCredentialList, et as PROVIDER_1S, f as CatalogMeasurement, ft as ProviderError, g as CreateAttempt, gt as ProviderSort, h as ConflictError, ht as ProviderSecurity, i as ActivityList, it as ProPrice, j as EstimateList, jt as Snapshot, k as EgressPolicy, kt as SecurityText, l as CatalogGpus, lt as ProviderCatalogEntry, m as ConcurrencyLimitReachedError, mt as ProviderPreferences, n as ActivityAction, nt as PortPreview, o as Billing, ot as ProviderBoard, p as CatalogText, pt as ProviderFeatures, q as KeyKind, r as ActivityEvent, rt as ProInterval, s as CatalogBenchmarkTerms, st as ProviderBoardEntry, t as ACTIVITY_ACTIONS, tt as Plan, u as CatalogLimit, ut as ProviderCredential, v as CreateKeyRequest, vt as Provider_1, w as CreditPurchaseRequest, wt as SandboxCost, x as CredentialField, xt as SIZE_NAMES, y as CreateSandboxRequest, yt as REGIONS, z as ForbiddenError, zt as Usage } from "./types-DMB8KnA3.mjs";
|
|
2
|
+
export { ACTIVITY_ACTIONS, ActivityAction, ActivityEvent, ActivityList, ApiError, Billing, CatalogBenchmarkTerms, CatalogFlag, CatalogGpus, CatalogLimit, CatalogList, CatalogMeasurement, CatalogText, ConcurrencyLimitReachedError, ConflictError, CreateAttempt, CreateFailureReason, CreateKeyRequest, CreateSandboxRequest, CreatedKey, CredentialField, CredentialFields, CreditCheckout, CreditPurchaseRequest, DetachedExec, DetachedExecRequest, EGRESS_MODES, EgressMode, EgressPolicy, Estimate, EstimateList, EstimateRequest, ExecEvent, ExecRequest, ExecResult, FileEntry, FileEntryType, FileList, ForbiddenError, GPU_TYPES, Gpu, GpuType, Health, IncidentImpact, InvalidRequestError, Key, KeyKind, KeyKind_1, KeyList, NoProviderAvailableError, NotFoundError, Offer, PROVIDERS, PROVIDER_1S, Plan, PortPreview, ProInterval, ProPrice, Provider, ProviderBoard, ProviderBoardEntry, ProviderCatalog, ProviderCatalogEntry, ProviderCredential, ProviderCredentialList, ProviderError, ProviderFeatures, ProviderPreferences, ProviderSecurity, ProviderSort, ProviderStatus, Provider_1, REGIONS, Region, SIZE_NAMES, STANDARD_SIZES, Sandbox, SandboxCost, SandboxEndReason, SandboxList, SandboxStatus, SecurityList, SecurityText, SizeName, Snapshot, SpendLimit, SpendLimitPeriod, SpendLimitReachedError, StandardSize, UnauthorizedError, UnsupportedError, UpdateKeyRequest, Usage, UsageDay, VendorIncident, VendorIncidentRead };
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// src/types.ts
|
|
2
|
+
const ACTIVITY_ACTIONS = [
|
|
3
|
+
"sandbox.create",
|
|
4
|
+
"sandbox.create_attempt",
|
|
5
|
+
"sandbox.destroy",
|
|
6
|
+
"sandbox.expire",
|
|
7
|
+
"sandbox.pause",
|
|
8
|
+
"sandbox.resume",
|
|
9
|
+
"sandbox.snapshot"
|
|
10
|
+
];
|
|
11
|
+
const EGRESS_MODES = [
|
|
12
|
+
"allow_all",
|
|
13
|
+
"allowlist",
|
|
14
|
+
"deny_all"
|
|
15
|
+
];
|
|
16
|
+
const GPU_TYPES = [
|
|
17
|
+
"b200",
|
|
18
|
+
"b300",
|
|
19
|
+
"h100",
|
|
20
|
+
"h200",
|
|
21
|
+
"mi355x",
|
|
22
|
+
"rtx-4090",
|
|
23
|
+
"rtx-5090",
|
|
24
|
+
"rtx-pro-6000"
|
|
25
|
+
];
|
|
26
|
+
const PROVIDERS = [
|
|
27
|
+
"daytona",
|
|
28
|
+
"depot",
|
|
29
|
+
"e2b",
|
|
30
|
+
"upstash"
|
|
31
|
+
];
|
|
32
|
+
const PROVIDER_1S = [
|
|
33
|
+
"daytona",
|
|
34
|
+
"depot",
|
|
35
|
+
"e2b",
|
|
36
|
+
"upstash"
|
|
37
|
+
];
|
|
38
|
+
const REGIONS = [
|
|
39
|
+
"asia",
|
|
40
|
+
"eu",
|
|
41
|
+
"us"
|
|
42
|
+
];
|
|
43
|
+
const SIZE_NAMES = [
|
|
44
|
+
"1x2",
|
|
45
|
+
"1x2:cheapest",
|
|
46
|
+
"1x2:fastest",
|
|
47
|
+
"1x2:most-reliable",
|
|
48
|
+
"2x4",
|
|
49
|
+
"2x4:cheapest",
|
|
50
|
+
"2x4:fastest",
|
|
51
|
+
"2x4:most-reliable",
|
|
52
|
+
"4x8",
|
|
53
|
+
"4x8:cheapest",
|
|
54
|
+
"4x8:fastest",
|
|
55
|
+
"4x8:most-reliable",
|
|
56
|
+
"8x16",
|
|
57
|
+
"8x16:cheapest",
|
|
58
|
+
"8x16:fastest",
|
|
59
|
+
"8x16:most-reliable"
|
|
60
|
+
];
|
|
61
|
+
const STANDARD_SIZES = [
|
|
62
|
+
"1x2",
|
|
63
|
+
"2x4",
|
|
64
|
+
"4x8",
|
|
65
|
+
"8x16"
|
|
66
|
+
];
|
|
67
|
+
export { ACTIVITY_ACTIONS, EGRESS_MODES, GPU_TYPES, PROVIDERS, PROVIDER_1S, REGIONS, SIZE_NAMES, STANDARD_SIZES };
|
package/package.json
CHANGED
|
@@ -1,14 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sandcovery",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "TypeScript client for the Sandcovery API: one API and one key for ephemeral sandboxes across providers.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"daytona",
|
|
7
|
+
"depot",
|
|
8
|
+
"e2b",
|
|
9
|
+
"sandbox",
|
|
10
|
+
"sandcovery"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://www.sandcovery.com",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/starcovery/starcovery.git",
|
|
17
|
+
"directory": "packages/sdk-node"
|
|
18
|
+
},
|
|
19
|
+
"bin": {
|
|
20
|
+
"sandcovery": "dist/cli/index.mjs"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
4
25
|
"type": "module",
|
|
5
26
|
"exports": {
|
|
6
27
|
".": {
|
|
7
28
|
"types": "./dist/index.d.mts",
|
|
8
29
|
"default": "./dist/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"./types": {
|
|
32
|
+
"types": "./dist/types.d.mts",
|
|
33
|
+
"default": "./dist/types.mjs"
|
|
9
34
|
}
|
|
10
35
|
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "vp pack src/index.ts src/types.ts src/cli/index.ts --dts",
|
|
38
|
+
"prepack": "pnpm run build --env.SANDCOVERY_RELEASE true",
|
|
39
|
+
"typecheck": "tsc"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@coveries/cli-core": "workspace:*",
|
|
43
|
+
"@coveries/format": "workspace:*",
|
|
44
|
+
"@coveries/sandcovery-contract": "workspace:*",
|
|
45
|
+
"@coveries/tsconfig": "workspace:*",
|
|
46
|
+
"@types/node": "^26.6.6",
|
|
47
|
+
"effect": "^4.1.1",
|
|
48
|
+
"es-toolkit": "^1.53.1",
|
|
49
|
+
"typescript": "^7.0.2",
|
|
50
|
+
"uuid": "^14.0.3",
|
|
51
|
+
"vite-plus": "catalog:"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=24"
|
|
55
|
+
}
|
|
14
56
|
}
|