@shardflux/sdk 0.15.0 → 0.16.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/CHANGELOG.md +42 -22
- package/README.md +99 -1
- package/dist/account.d.ts +2 -0
- package/dist/account.js +6 -0
- package/dist/cell.d.ts +2 -0
- package/dist/cell.js +2 -0
- package/dist/client.d.ts +25 -1
- package/dist/client.js +44 -3
- package/dist/computer.d.ts +11 -1
- package/dist/computer.js +89 -6
- package/dist/errors.d.ts +5 -1
- package/dist/errors.js +9 -0
- package/dist/executions.d.ts +2 -6
- package/dist/executions.js +9 -0
- package/dist/exit-code.d.ts +7 -0
- package/dist/exit-code.js +12 -0
- package/dist/generated/app-api.d.ts +565 -13
- package/dist/generated/cell-api.d.ts +2 -0
- package/dist/http.d.ts +7 -1
- package/dist/http.js +34 -13
- package/dist/index.d.ts +8 -5
- package/dist/index.js +4 -2
- package/dist/ports.d.ts +7 -0
- package/dist/ports.js +1 -1
- package/dist/progress.d.ts +2 -2
- package/dist/progress.js +1 -1
- package/dist/testing/index.d.ts +62 -0
- package/dist/testing/index.js +585 -0
- package/dist/testing/seed.d.ts +433 -0
- package/dist/testing/seed.js +449 -0
- package/dist/tools.d.ts +5 -0
- package/dist/tools.js +4 -2
- package/dist/tunnel-assets/linux-amd64.gz +0 -0
- package/dist/tunnel-assets/linux-arm64.gz +0 -0
- package/dist/tunnel-assets.d.ts +10 -0
- package/dist/tunnel-assets.js +11 -0
- package/dist/tunnel-packet.d.ts +3 -0
- package/dist/tunnel-packet.js +43 -0
- package/dist/tunnel-pty.d.ts +86 -0
- package/dist/tunnel-pty.js +243 -0
- package/dist/tunnels.d.ts +47 -0
- package/dist/tunnels.js +454 -0
- package/dist/workspace-ref.d.ts +4 -0
- package/dist/workspace-ref.js +24 -0
- package/dist/workspace.d.ts +18 -1
- package/dist/workspace.js +76 -3
- package/package.json +7 -2
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
export declare const seed: {
|
|
2
|
+
_captured: string;
|
|
3
|
+
defaultWorkspace: {
|
|
4
|
+
id: string;
|
|
5
|
+
organization_id: string;
|
|
6
|
+
project_id: string;
|
|
7
|
+
workspace_key: string;
|
|
8
|
+
labels: {};
|
|
9
|
+
template_version_id: string;
|
|
10
|
+
template: {
|
|
11
|
+
version_id: string;
|
|
12
|
+
template_id: string;
|
|
13
|
+
slug: string;
|
|
14
|
+
version: number;
|
|
15
|
+
immutable_version: null;
|
|
16
|
+
};
|
|
17
|
+
desired_state: string;
|
|
18
|
+
observed_state: string;
|
|
19
|
+
cell_id: string;
|
|
20
|
+
cell_endpoint: string;
|
|
21
|
+
ownership_epoch: number;
|
|
22
|
+
caps: {
|
|
23
|
+
cpu_millis: null;
|
|
24
|
+
memory_mib: null;
|
|
25
|
+
disk_gib: null;
|
|
26
|
+
allocation_mode: string;
|
|
27
|
+
memory_mib_held: number;
|
|
28
|
+
};
|
|
29
|
+
memory: {
|
|
30
|
+
allocation_mode: string;
|
|
31
|
+
promised_mib: number;
|
|
32
|
+
held_mib: number;
|
|
33
|
+
plugged_mib: number;
|
|
34
|
+
};
|
|
35
|
+
ceilings: {
|
|
36
|
+
cpu_millis: number;
|
|
37
|
+
memory_mib: number;
|
|
38
|
+
disk_gib: number;
|
|
39
|
+
sources: {
|
|
40
|
+
cpu_millis: string;
|
|
41
|
+
memory_mib: string;
|
|
42
|
+
disk_gib: string;
|
|
43
|
+
};
|
|
44
|
+
resolved_at: string;
|
|
45
|
+
};
|
|
46
|
+
grants: {
|
|
47
|
+
disk_gib: number;
|
|
48
|
+
cpu_millis: number;
|
|
49
|
+
memory_mib: number;
|
|
50
|
+
memory_layout: number;
|
|
51
|
+
memory_mib_max: number;
|
|
52
|
+
allocation_mode: string;
|
|
53
|
+
memory_mib_base: number;
|
|
54
|
+
memory_mib_held: number;
|
|
55
|
+
memory_mib_ceiling: number;
|
|
56
|
+
};
|
|
57
|
+
active_operation: null;
|
|
58
|
+
pending_reason: null;
|
|
59
|
+
forked_from_workspace_id: null;
|
|
60
|
+
disk_layout: string;
|
|
61
|
+
lifetime: string;
|
|
62
|
+
purpose: string;
|
|
63
|
+
idle_timeout_seconds: number;
|
|
64
|
+
idle: null;
|
|
65
|
+
origin: null;
|
|
66
|
+
ended_reason: null;
|
|
67
|
+
dev_template_id: null;
|
|
68
|
+
startup: null;
|
|
69
|
+
mode: string;
|
|
70
|
+
tree_revision: number;
|
|
71
|
+
computer_use: {
|
|
72
|
+
enabled: boolean;
|
|
73
|
+
workspace: null;
|
|
74
|
+
template: boolean;
|
|
75
|
+
available: boolean;
|
|
76
|
+
};
|
|
77
|
+
created_at: string;
|
|
78
|
+
updated_at: string;
|
|
79
|
+
deleted_at: null;
|
|
80
|
+
};
|
|
81
|
+
workspace: {
|
|
82
|
+
id: string;
|
|
83
|
+
organization_id: string;
|
|
84
|
+
project_id: string;
|
|
85
|
+
workspace_key: string;
|
|
86
|
+
labels: {};
|
|
87
|
+
template_version_id: string;
|
|
88
|
+
template: {
|
|
89
|
+
version_id: string;
|
|
90
|
+
template_id: string;
|
|
91
|
+
slug: string;
|
|
92
|
+
version: number;
|
|
93
|
+
immutable_version: null;
|
|
94
|
+
};
|
|
95
|
+
desired_state: string;
|
|
96
|
+
observed_state: string;
|
|
97
|
+
cell_id: string;
|
|
98
|
+
cell_endpoint: string;
|
|
99
|
+
ownership_epoch: number;
|
|
100
|
+
caps: {
|
|
101
|
+
cpu_millis: null;
|
|
102
|
+
memory_mib: number;
|
|
103
|
+
disk_gib: null;
|
|
104
|
+
allocation_mode: string;
|
|
105
|
+
};
|
|
106
|
+
memory: {
|
|
107
|
+
allocation_mode: string;
|
|
108
|
+
promised_mib: number;
|
|
109
|
+
held_mib: number;
|
|
110
|
+
plugged_mib: null;
|
|
111
|
+
};
|
|
112
|
+
ceilings: {
|
|
113
|
+
cpu_millis: number;
|
|
114
|
+
memory_mib: number;
|
|
115
|
+
disk_gib: number;
|
|
116
|
+
sources: {
|
|
117
|
+
cpu_millis: string;
|
|
118
|
+
memory_mib: string;
|
|
119
|
+
disk_gib: string;
|
|
120
|
+
};
|
|
121
|
+
resolved_at: string;
|
|
122
|
+
};
|
|
123
|
+
grants: {
|
|
124
|
+
disk_gib: number;
|
|
125
|
+
cpu_millis: number;
|
|
126
|
+
memory_mib: number;
|
|
127
|
+
memory_layout: number;
|
|
128
|
+
allocation_mode: string;
|
|
129
|
+
memory_mib_base: number;
|
|
130
|
+
memory_mib_ceiling: number;
|
|
131
|
+
};
|
|
132
|
+
active_operation: null;
|
|
133
|
+
pending_reason: null;
|
|
134
|
+
forked_from_workspace_id: null;
|
|
135
|
+
disk_layout: string;
|
|
136
|
+
lifetime: string;
|
|
137
|
+
purpose: string;
|
|
138
|
+
idle_timeout_seconds: number;
|
|
139
|
+
idle: null;
|
|
140
|
+
origin: null;
|
|
141
|
+
ended_reason: null;
|
|
142
|
+
dev_template_id: null;
|
|
143
|
+
startup: null;
|
|
144
|
+
mode: string;
|
|
145
|
+
tree_revision: number;
|
|
146
|
+
computer_use: {
|
|
147
|
+
enabled: boolean;
|
|
148
|
+
workspace: null;
|
|
149
|
+
template: boolean;
|
|
150
|
+
available: boolean;
|
|
151
|
+
};
|
|
152
|
+
created_at: string;
|
|
153
|
+
updated_at: string;
|
|
154
|
+
deleted_at: null;
|
|
155
|
+
};
|
|
156
|
+
idle: {
|
|
157
|
+
auto_suspend: {
|
|
158
|
+
backoff_until: null;
|
|
159
|
+
disabled_reason: null;
|
|
160
|
+
enabled: boolean;
|
|
161
|
+
failures: number;
|
|
162
|
+
last_error: null;
|
|
163
|
+
last_operation_id: null;
|
|
164
|
+
};
|
|
165
|
+
idle_since: string;
|
|
166
|
+
keepalive_until: null;
|
|
167
|
+
last_attach_at: null;
|
|
168
|
+
last_tool_at: null;
|
|
169
|
+
observed_state: string;
|
|
170
|
+
policy: {
|
|
171
|
+
idle_minutes: null;
|
|
172
|
+
mode: string;
|
|
173
|
+
source: string;
|
|
174
|
+
};
|
|
175
|
+
running_since: string;
|
|
176
|
+
suspend_at: null;
|
|
177
|
+
suspend_request: null;
|
|
178
|
+
};
|
|
179
|
+
busyIdle: {
|
|
180
|
+
auto_suspend: {
|
|
181
|
+
backoff_until: null;
|
|
182
|
+
disabled_reason: null;
|
|
183
|
+
enabled: boolean;
|
|
184
|
+
failures: number;
|
|
185
|
+
last_error: null;
|
|
186
|
+
last_operation_id: null;
|
|
187
|
+
};
|
|
188
|
+
idle_since: string;
|
|
189
|
+
keepalive_until: null;
|
|
190
|
+
last_attach_at: null;
|
|
191
|
+
last_tool_at: string;
|
|
192
|
+
observed_state: string;
|
|
193
|
+
policy: {
|
|
194
|
+
idle_minutes: null;
|
|
195
|
+
mode: string;
|
|
196
|
+
source: string;
|
|
197
|
+
};
|
|
198
|
+
running_since: string;
|
|
199
|
+
suspend_at: null;
|
|
200
|
+
suspend_request: null;
|
|
201
|
+
};
|
|
202
|
+
resize: {
|
|
203
|
+
workspace_id: string;
|
|
204
|
+
operation_id: string;
|
|
205
|
+
state: string;
|
|
206
|
+
caps: {
|
|
207
|
+
cpu_millis: null;
|
|
208
|
+
memory_mib: number;
|
|
209
|
+
disk_gib: null;
|
|
210
|
+
allocation_mode: string;
|
|
211
|
+
};
|
|
212
|
+
memory: {
|
|
213
|
+
applies_at: string;
|
|
214
|
+
allocation_mode: string;
|
|
215
|
+
requested_mib: number;
|
|
216
|
+
target_mib: number;
|
|
217
|
+
previous_mib: number;
|
|
218
|
+
applied_mib: number;
|
|
219
|
+
held_mib: null;
|
|
220
|
+
converged: boolean;
|
|
221
|
+
limit_reason: null;
|
|
222
|
+
reason: null;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
missing: {
|
|
226
|
+
error: {
|
|
227
|
+
code: string;
|
|
228
|
+
message: string;
|
|
229
|
+
request_id: string;
|
|
230
|
+
retryable: boolean;
|
|
231
|
+
details: {
|
|
232
|
+
reason: string;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
sessionLifetime: {
|
|
237
|
+
error: {
|
|
238
|
+
code: string;
|
|
239
|
+
message: string;
|
|
240
|
+
request_id: string;
|
|
241
|
+
retryable: boolean;
|
|
242
|
+
details: {
|
|
243
|
+
reason: string;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
gone: {
|
|
248
|
+
error: {
|
|
249
|
+
code: string;
|
|
250
|
+
message: string;
|
|
251
|
+
request_id: string;
|
|
252
|
+
retryable: boolean;
|
|
253
|
+
details: {
|
|
254
|
+
reason: string;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
computerUnavailable: {
|
|
259
|
+
error: {
|
|
260
|
+
code: string;
|
|
261
|
+
message: string;
|
|
262
|
+
request_id: string;
|
|
263
|
+
retryable: boolean;
|
|
264
|
+
details: {
|
|
265
|
+
reason: string;
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
templateViews: {
|
|
270
|
+
"python-node-browser": {
|
|
271
|
+
version_id: string;
|
|
272
|
+
template_id: string;
|
|
273
|
+
slug: string;
|
|
274
|
+
version: number;
|
|
275
|
+
immutable_version: null;
|
|
276
|
+
};
|
|
277
|
+
"ubuntu-24.04": {
|
|
278
|
+
version_id: string;
|
|
279
|
+
template_id: string;
|
|
280
|
+
slug: string;
|
|
281
|
+
version: number;
|
|
282
|
+
immutable_version: null;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
_supplemental: {
|
|
286
|
+
token: string;
|
|
287
|
+
computerStopped: string;
|
|
288
|
+
me: string;
|
|
289
|
+
};
|
|
290
|
+
token: {
|
|
291
|
+
token: string;
|
|
292
|
+
token_type: string;
|
|
293
|
+
expires_at: string;
|
|
294
|
+
issued_at: string;
|
|
295
|
+
kid: string;
|
|
296
|
+
audience: string;
|
|
297
|
+
workspace_id: string;
|
|
298
|
+
agent_session_id: string;
|
|
299
|
+
ownership_epoch: number;
|
|
300
|
+
tools: string[];
|
|
301
|
+
cell_endpoint: string;
|
|
302
|
+
};
|
|
303
|
+
computerStopped: {
|
|
304
|
+
running: boolean;
|
|
305
|
+
streams: {
|
|
306
|
+
interactive: boolean;
|
|
307
|
+
view: boolean;
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
me: {
|
|
311
|
+
type: string;
|
|
312
|
+
user: null;
|
|
313
|
+
memberships: never[];
|
|
314
|
+
api_key: {
|
|
315
|
+
id: string;
|
|
316
|
+
key_id: string;
|
|
317
|
+
organization_id: string;
|
|
318
|
+
project_id: string;
|
|
319
|
+
tool_permissions: string[];
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
fileInfo: {
|
|
323
|
+
gid: number;
|
|
324
|
+
mode: string;
|
|
325
|
+
modified_at: string;
|
|
326
|
+
name: string;
|
|
327
|
+
path: string;
|
|
328
|
+
revision: string;
|
|
329
|
+
size: number;
|
|
330
|
+
type: string;
|
|
331
|
+
uid: number;
|
|
332
|
+
};
|
|
333
|
+
fileWrite: {
|
|
334
|
+
bytes_written: number;
|
|
335
|
+
durable: boolean;
|
|
336
|
+
file: {
|
|
337
|
+
gid: number;
|
|
338
|
+
mode: string;
|
|
339
|
+
modified_at: string;
|
|
340
|
+
name: string;
|
|
341
|
+
path: string;
|
|
342
|
+
revision: string;
|
|
343
|
+
size: number;
|
|
344
|
+
type: string;
|
|
345
|
+
uid: number;
|
|
346
|
+
};
|
|
347
|
+
path: string;
|
|
348
|
+
revision: string;
|
|
349
|
+
sha256: string;
|
|
350
|
+
};
|
|
351
|
+
fileList: {
|
|
352
|
+
entries: {
|
|
353
|
+
gid: number;
|
|
354
|
+
mode: string;
|
|
355
|
+
modified_at: string;
|
|
356
|
+
name: string;
|
|
357
|
+
path: string;
|
|
358
|
+
size: number;
|
|
359
|
+
type: string;
|
|
360
|
+
uid: number;
|
|
361
|
+
}[];
|
|
362
|
+
truncated: boolean;
|
|
363
|
+
};
|
|
364
|
+
filePatch: {
|
|
365
|
+
bytes_written: number;
|
|
366
|
+
durable: boolean;
|
|
367
|
+
file: {
|
|
368
|
+
gid: number;
|
|
369
|
+
mode: string;
|
|
370
|
+
modified_at: string;
|
|
371
|
+
name: string;
|
|
372
|
+
path: string;
|
|
373
|
+
revision: string;
|
|
374
|
+
size: number;
|
|
375
|
+
type: string;
|
|
376
|
+
uid: number;
|
|
377
|
+
};
|
|
378
|
+
path: string;
|
|
379
|
+
previous_revision: string;
|
|
380
|
+
replacements: number;
|
|
381
|
+
revision: string;
|
|
382
|
+
};
|
|
383
|
+
fileSearch: {
|
|
384
|
+
files_scanned: number;
|
|
385
|
+
matches: {
|
|
386
|
+
column: number;
|
|
387
|
+
line: number;
|
|
388
|
+
path: string;
|
|
389
|
+
text: string;
|
|
390
|
+
}[];
|
|
391
|
+
truncated: boolean;
|
|
392
|
+
};
|
|
393
|
+
computerStatus: {
|
|
394
|
+
display: string;
|
|
395
|
+
height: number;
|
|
396
|
+
running: boolean;
|
|
397
|
+
session: string;
|
|
398
|
+
started_at: string;
|
|
399
|
+
streams: {
|
|
400
|
+
interactive: boolean;
|
|
401
|
+
view: boolean;
|
|
402
|
+
};
|
|
403
|
+
width: number;
|
|
404
|
+
};
|
|
405
|
+
computerActions: {
|
|
406
|
+
results: never[];
|
|
407
|
+
screenshot: {
|
|
408
|
+
format: string;
|
|
409
|
+
width: number;
|
|
410
|
+
height: number;
|
|
411
|
+
data: string;
|
|
412
|
+
};
|
|
413
|
+
cursor: number[];
|
|
414
|
+
display: {
|
|
415
|
+
width: number;
|
|
416
|
+
height: number;
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
execSession: {
|
|
420
|
+
canceled: boolean;
|
|
421
|
+
created: boolean;
|
|
422
|
+
created_at: string;
|
|
423
|
+
ended_at: string;
|
|
424
|
+
exit_code: number;
|
|
425
|
+
pid: number;
|
|
426
|
+
session_id: string;
|
|
427
|
+
started_at: string;
|
|
428
|
+
state: string;
|
|
429
|
+
stderr_size: number;
|
|
430
|
+
stdout_size: number;
|
|
431
|
+
timed_out: boolean;
|
|
432
|
+
};
|
|
433
|
+
};
|