@agentuity/server 1.0.32 → 1.0.34
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/dist/api/api.d.ts +1 -227
- package/dist/api/api.d.ts.map +1 -1
- package/dist/api/api.js +1 -637
- package/dist/api/api.js.map +1 -1
- package/dist/api/index.d.ts +1 -17
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -17
- package/dist/api/index.js.map +1 -1
- package/dist/api/org/env-delete.d.ts +1 -22
- package/dist/api/org/env-delete.d.ts.map +1 -1
- package/dist/api/org/env-delete.js +1 -24
- package/dist/api/org/env-delete.js.map +1 -1
- package/dist/api/org/env-get.d.ts +1 -32
- package/dist/api/org/env-get.d.ts.map +1 -1
- package/dist/api/org/env-get.js +1 -25
- package/dist/api/org/env-get.js.map +1 -1
- package/dist/api/org/env-update.d.ts +1 -23
- package/dist/api/org/env-update.d.ts.map +1 -1
- package/dist/api/org/env-update.js +1 -25
- package/dist/api/org/env-update.js.map +1 -1
- package/dist/api/project/get.d.ts +1 -42
- package/dist/api/project/get.d.ts.map +1 -1
- package/dist/api/project/get.js +1 -35
- package/dist/api/project/get.js.map +1 -1
- package/dist/api/project/list.d.ts +1 -47
- package/dist/api/project/list.d.ts.map +1 -1
- package/dist/api/project/list.js +1 -37
- package/dist/api/project/list.js.map +1 -1
- package/dist/api/project/malware.d.ts +1 -70
- package/dist/api/project/malware.d.ts.map +1 -1
- package/dist/api/project/malware.js +1 -41
- package/dist/api/project/malware.js.map +1 -1
- package/dist/api/region/create.d.ts +1 -80
- package/dist/api/region/create.d.ts.map +1 -1
- package/dist/api/region/create.js +1 -176
- package/dist/api/region/create.js.map +1 -1
- package/dist/api/sandbox/client.d.ts +1 -190
- package/dist/api/sandbox/client.d.ts.map +1 -1
- package/dist/api/sandbox/client.js +1 -260
- package/dist/api/sandbox/client.js.map +1 -1
- package/dist/api/sandbox/pause.d.ts +1 -21
- package/dist/api/sandbox/pause.d.ts.map +1 -1
- package/dist/api/sandbox/pause.js +1 -24
- package/dist/api/sandbox/pause.js.map +1 -1
- package/dist/api/sandbox/resume.d.ts +1 -21
- package/dist/api/sandbox/resume.d.ts.map +1 -1
- package/dist/api/sandbox/resume.js +1 -24
- package/dist/api/sandbox/resume.js.map +1 -1
- package/dist/api/sandbox/util.d.ts +1 -284
- package/dist/api/sandbox/util.d.ts.map +1 -1
- package/dist/api/sandbox/util.js +1 -210
- package/dist/api/sandbox/util.js.map +1 -1
- package/dist/api/user/whoami.d.ts +1 -38
- package/dist/api/user/whoami.d.ts.map +1 -1
- package/dist/api/user/whoami.js +1 -26
- package/dist/api/user/whoami.js.map +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -12
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/api/api.ts +1 -936
- package/src/api/index.ts +1 -17
- package/src/api/org/env-delete.ts +1 -37
- package/src/api/org/env-get.ts +1 -43
- package/src/api/org/env-update.ts +1 -38
- package/src/api/project/get.ts +1 -49
- package/src/api/project/list.ts +1 -54
- package/src/api/project/malware.ts +1 -68
- package/src/api/region/create.ts +1 -207
- package/src/api/sandbox/client.ts +1 -460
- package/src/api/sandbox/pause.ts +1 -39
- package/src/api/sandbox/resume.ts +1 -39
- package/src/api/sandbox/util.ts +1 -276
- package/src/api/user/whoami.ts +1 -32
- package/src/index.ts +3 -30
- package/dist/api/apikey/create.d.ts +0 -33
- package/dist/api/apikey/create.d.ts.map +0 -1
- package/dist/api/apikey/create.js +0 -23
- package/dist/api/apikey/create.js.map +0 -1
- package/dist/api/apikey/delete.d.ts +0 -19
- package/dist/api/apikey/delete.d.ts.map +0 -1
- package/dist/api/apikey/delete.js +0 -19
- package/dist/api/apikey/delete.js.map +0 -1
- package/dist/api/apikey/get.d.ts +0 -45
- package/dist/api/apikey/get.d.ts.map +0 -1
- package/dist/api/apikey/get.js +0 -36
- package/dist/api/apikey/get.js.map +0 -1
- package/dist/api/apikey/index.d.ts +0 -6
- package/dist/api/apikey/index.d.ts.map +0 -1
- package/dist/api/apikey/index.js +0 -6
- package/dist/api/apikey/index.js.map +0 -1
- package/dist/api/apikey/list.d.ts +0 -64
- package/dist/api/apikey/list.d.ts.map +0 -1
- package/dist/api/apikey/list.js +0 -46
- package/dist/api/apikey/list.js.map +0 -1
- package/dist/api/apikey/util.d.ts +0 -23
- package/dist/api/apikey/util.d.ts.map +0 -1
- package/dist/api/apikey/util.js +0 -3
- package/dist/api/apikey/util.js.map +0 -1
- package/dist/api/db/index.d.ts +0 -5
- package/dist/api/db/index.d.ts.map +0 -1
- package/dist/api/db/index.js +0 -5
- package/dist/api/db/index.js.map +0 -1
- package/dist/api/db/logs.d.ts +0 -70
- package/dist/api/db/logs.d.ts.map +0 -1
- package/dist/api/db/logs.js +0 -59
- package/dist/api/db/logs.js.map +0 -1
- package/dist/api/db/query.d.ts +0 -39
- package/dist/api/db/query.d.ts.map +0 -1
- package/dist/api/db/query.js +0 -49
- package/dist/api/db/query.js.map +0 -1
- package/dist/api/db/tables.d.ts +0 -49
- package/dist/api/db/tables.d.ts.map +0 -1
- package/dist/api/db/tables.js +0 -59
- package/dist/api/db/tables.js.map +0 -1
- package/dist/api/db/util.d.ts +0 -31
- package/dist/api/db/util.d.ts.map +0 -1
- package/dist/api/db/util.js +0 -4
- package/dist/api/db/util.js.map +0 -1
- package/dist/api/eval/get.d.ts +0 -36
- package/dist/api/eval/get.d.ts.map +0 -1
- package/dist/api/eval/get.js +0 -23
- package/dist/api/eval/get.js.map +0 -1
- package/dist/api/eval/index.d.ts +0 -5
- package/dist/api/eval/index.d.ts.map +0 -1
- package/dist/api/eval/index.js +0 -5
- package/dist/api/eval/index.js.map +0 -1
- package/dist/api/eval/list.d.ts +0 -50
- package/dist/api/eval/list.d.ts.map +0 -1
- package/dist/api/eval/list.js +0 -32
- package/dist/api/eval/list.js.map +0 -1
- package/dist/api/eval/run-get.d.ts +0 -48
- package/dist/api/eval/run-get.d.ts.map +0 -1
- package/dist/api/eval/run-get.js +0 -29
- package/dist/api/eval/run-get.js.map +0 -1
- package/dist/api/eval/run-list.d.ts +0 -70
- package/dist/api/eval/run-list.d.ts.map +0 -1
- package/dist/api/eval/run-list.js +0 -42
- package/dist/api/eval/run-list.js.map +0 -1
- package/dist/api/machine/index.d.ts +0 -3
- package/dist/api/machine/index.d.ts.map +0 -1
- package/dist/api/machine/index.js +0 -3
- package/dist/api/machine/index.js.map +0 -1
- package/dist/api/machine/machine.d.ts +0 -192
- package/dist/api/machine/machine.d.ts.map +0 -1
- package/dist/api/machine/machine.js +0 -109
- package/dist/api/machine/machine.js.map +0 -1
- package/dist/api/machine/util.d.ts +0 -14
- package/dist/api/machine/util.d.ts.map +0 -1
- package/dist/api/machine/util.js +0 -3
- package/dist/api/machine/util.js.map +0 -1
- package/dist/api/org/index.d.ts +0 -7
- package/dist/api/org/index.d.ts.map +0 -1
- package/dist/api/org/index.js +0 -7
- package/dist/api/org/index.js.map +0 -1
- package/dist/api/org/list.d.ts +0 -27
- package/dist/api/org/list.d.ts.map +0 -1
- package/dist/api/org/list.js +0 -22
- package/dist/api/org/list.js.map +0 -1
- package/dist/api/org/resources.d.ts +0 -141
- package/dist/api/org/resources.d.ts.map +0 -1
- package/dist/api/org/resources.js +0 -97
- package/dist/api/org/resources.js.map +0 -1
- package/dist/api/org/util.d.ts +0 -45
- package/dist/api/org/util.d.ts.map +0 -1
- package/dist/api/org/util.js +0 -4
- package/dist/api/org/util.js.map +0 -1
- package/dist/api/project/agent.d.ts +0 -89
- package/dist/api/project/agent.d.ts.map +0 -1
- package/dist/api/project/agent.js +0 -60
- package/dist/api/project/agent.js.map +0 -1
- package/dist/api/project/create.d.ts +0 -37
- package/dist/api/project/create.d.ts.map +0 -1
- package/dist/api/project/create.js +0 -31
- package/dist/api/project/create.js.map +0 -1
- package/dist/api/project/delete.d.ts +0 -15
- package/dist/api/project/delete.d.ts.map +0 -1
- package/dist/api/project/delete.js +0 -13
- package/dist/api/project/delete.js.map +0 -1
- package/dist/api/project/deploy.d.ts +0 -490
- package/dist/api/project/deploy.d.ts.map +0 -1
- package/dist/api/project/deploy.js +0 -313
- package/dist/api/project/deploy.js.map +0 -1
- package/dist/api/project/deployment.d.ts +0 -237
- package/dist/api/project/deployment.d.ts.map +0 -1
- package/dist/api/project/deployment.js +0 -127
- package/dist/api/project/deployment.js.map +0 -1
- package/dist/api/project/env-delete.d.ts +0 -22
- package/dist/api/project/env-delete.d.ts.map +0 -1
- package/dist/api/project/env-delete.js +0 -29
- package/dist/api/project/env-delete.js.map +0 -1
- package/dist/api/project/env-update.d.ts +0 -31
- package/dist/api/project/env-update.d.ts.map +0 -1
- package/dist/api/project/env-update.js +0 -36
- package/dist/api/project/env-update.js.map +0 -1
- package/dist/api/project/exists.d.ts +0 -25
- package/dist/api/project/exists.d.ts.map +0 -1
- package/dist/api/project/exists.js +0 -45
- package/dist/api/project/exists.js.map +0 -1
- package/dist/api/project/hostname.d.ts +0 -25
- package/dist/api/project/hostname.d.ts.map +0 -1
- package/dist/api/project/hostname.js +0 -37
- package/dist/api/project/hostname.js.map +0 -1
- package/dist/api/project/index.d.ts +0 -14
- package/dist/api/project/index.d.ts.map +0 -1
- package/dist/api/project/index.js +0 -14
- package/dist/api/project/index.js.map +0 -1
- package/dist/api/project/update-region.d.ts +0 -27
- package/dist/api/project/update-region.d.ts.map +0 -1
- package/dist/api/project/update-region.js +0 -25
- package/dist/api/project/update-region.js.map +0 -1
- package/dist/api/project/util.d.ts +0 -62
- package/dist/api/project/util.d.ts.map +0 -1
- package/dist/api/project/util.js +0 -6
- package/dist/api/project/util.js.map +0 -1
- package/dist/api/queue/analytics.d.ts +0 -250
- package/dist/api/queue/analytics.d.ts.map +0 -1
- package/dist/api/queue/analytics.js +0 -233
- package/dist/api/queue/analytics.js.map +0 -1
- package/dist/api/queue/destinations.d.ts +0 -202
- package/dist/api/queue/destinations.d.ts.map +0 -1
- package/dist/api/queue/destinations.js +0 -168
- package/dist/api/queue/destinations.js.map +0 -1
- package/dist/api/queue/dlq.d.ts +0 -168
- package/dist/api/queue/dlq.d.ts.map +0 -1
- package/dist/api/queue/dlq.js +0 -166
- package/dist/api/queue/dlq.js.map +0 -1
- package/dist/api/queue/index.d.ts +0 -56
- package/dist/api/queue/index.d.ts.map +0 -1
- package/dist/api/queue/index.js +0 -90
- package/dist/api/queue/index.js.map +0 -1
- package/dist/api/queue/messages.d.ts +0 -503
- package/dist/api/queue/messages.d.ts.map +0 -1
- package/dist/api/queue/messages.js +0 -549
- package/dist/api/queue/messages.js.map +0 -1
- package/dist/api/queue/queues.d.ts +0 -226
- package/dist/api/queue/queues.d.ts.map +0 -1
- package/dist/api/queue/queues.js +0 -321
- package/dist/api/queue/queues.js.map +0 -1
- package/dist/api/queue/sources.d.ts +0 -202
- package/dist/api/queue/sources.d.ts.map +0 -1
- package/dist/api/queue/sources.js +0 -202
- package/dist/api/queue/sources.js.map +0 -1
- package/dist/api/queue/types.d.ts +0 -1218
- package/dist/api/queue/types.d.ts.map +0 -1
- package/dist/api/queue/types.js +0 -1002
- package/dist/api/queue/types.js.map +0 -1
- package/dist/api/queue/util.d.ts +0 -278
- package/dist/api/queue/util.d.ts.map +0 -1
- package/dist/api/queue/util.js +0 -235
- package/dist/api/queue/util.js.map +0 -1
- package/dist/api/queue/validation.d.ts +0 -247
- package/dist/api/queue/validation.d.ts.map +0 -1
- package/dist/api/queue/validation.js +0 -513
- package/dist/api/queue/validation.js.map +0 -1
- package/dist/api/queue/websocket.d.ts +0 -168
- package/dist/api/queue/websocket.d.ts.map +0 -1
- package/dist/api/queue/websocket.js +0 -394
- package/dist/api/queue/websocket.js.map +0 -1
- package/dist/api/region/delete.d.ts +0 -62
- package/dist/api/region/delete.d.ts.map +0 -1
- package/dist/api/region/delete.js +0 -37
- package/dist/api/region/delete.js.map +0 -1
- package/dist/api/region/index.d.ts +0 -5
- package/dist/api/region/index.d.ts.map +0 -1
- package/dist/api/region/index.js +0 -5
- package/dist/api/region/index.js.map +0 -1
- package/dist/api/region/list.d.ts +0 -27
- package/dist/api/region/list.d.ts.map +0 -1
- package/dist/api/region/list.js +0 -22
- package/dist/api/region/list.js.map +0 -1
- package/dist/api/region/resources.d.ts +0 -71
- package/dist/api/region/resources.d.ts.map +0 -1
- package/dist/api/region/resources.js +0 -53
- package/dist/api/region/resources.js.map +0 -1
- package/dist/api/region/util.d.ts +0 -23
- package/dist/api/region/util.d.ts.map +0 -1
- package/dist/api/region/util.js +0 -3
- package/dist/api/region/util.js.map +0 -1
- package/dist/api/sandbox/cli-list.d.ts +0 -114
- package/dist/api/sandbox/cli-list.d.ts.map +0 -1
- package/dist/api/sandbox/cli-list.js +0 -71
- package/dist/api/sandbox/cli-list.js.map +0 -1
- package/dist/api/sandbox/create.d.ts +0 -118
- package/dist/api/sandbox/create.d.ts.map +0 -1
- package/dist/api/sandbox/create.js +0 -211
- package/dist/api/sandbox/create.js.map +0 -1
- package/dist/api/sandbox/destroy.d.ts +0 -22
- package/dist/api/sandbox/destroy.d.ts.map +0 -1
- package/dist/api/sandbox/destroy.js +0 -25
- package/dist/api/sandbox/destroy.js.map +0 -1
- package/dist/api/sandbox/disk-checkpoint.d.ts +0 -104
- package/dist/api/sandbox/disk-checkpoint.d.ts.map +0 -1
- package/dist/api/sandbox/disk-checkpoint.js +0 -104
- package/dist/api/sandbox/disk-checkpoint.js.map +0 -1
- package/dist/api/sandbox/execute.d.ts +0 -69
- package/dist/api/sandbox/execute.d.ts.map +0 -1
- package/dist/api/sandbox/execute.js +0 -103
- package/dist/api/sandbox/execute.js.map +0 -1
- package/dist/api/sandbox/execution.d.ts +0 -169
- package/dist/api/sandbox/execution.d.ts.map +0 -1
- package/dist/api/sandbox/execution.js +0 -118
- package/dist/api/sandbox/execution.js.map +0 -1
- package/dist/api/sandbox/files.d.ts +0 -261
- package/dist/api/sandbox/files.d.ts.map +0 -1
- package/dist/api/sandbox/files.js +0 -386
- package/dist/api/sandbox/files.js.map +0 -1
- package/dist/api/sandbox/get.d.ts +0 -283
- package/dist/api/sandbox/get.d.ts.map +0 -1
- package/dist/api/sandbox/get.js +0 -215
- package/dist/api/sandbox/get.js.map +0 -1
- package/dist/api/sandbox/getStatus.d.ts +0 -16
- package/dist/api/sandbox/getStatus.d.ts.map +0 -1
- package/dist/api/sandbox/getStatus.js +0 -32
- package/dist/api/sandbox/getStatus.js.map +0 -1
- package/dist/api/sandbox/index.d.ts +0 -39
- package/dist/api/sandbox/index.d.ts.map +0 -1
- package/dist/api/sandbox/index.js +0 -20
- package/dist/api/sandbox/index.js.map +0 -1
- package/dist/api/sandbox/list.d.ts +0 -293
- package/dist/api/sandbox/list.d.ts.map +0 -1
- package/dist/api/sandbox/list.js +0 -191
- package/dist/api/sandbox/list.js.map +0 -1
- package/dist/api/sandbox/resolve.d.ts +0 -82
- package/dist/api/sandbox/resolve.d.ts.map +0 -1
- package/dist/api/sandbox/resolve.js +0 -71
- package/dist/api/sandbox/resolve.js.map +0 -1
- package/dist/api/sandbox/run.d.ts +0 -28
- package/dist/api/sandbox/run.d.ts.map +0 -1
- package/dist/api/sandbox/run.js +0 -342
- package/dist/api/sandbox/run.js.map +0 -1
- package/dist/api/sandbox/runtime.d.ts +0 -83
- package/dist/api/sandbox/runtime.d.ts.map +0 -1
- package/dist/api/sandbox/runtime.js +0 -78
- package/dist/api/sandbox/runtime.js.map +0 -1
- package/dist/api/sandbox/snapshot-build.d.ts +0 -48
- package/dist/api/sandbox/snapshot-build.d.ts.map +0 -1
- package/dist/api/sandbox/snapshot-build.js +0 -74
- package/dist/api/sandbox/snapshot-build.js.map +0 -1
- package/dist/api/sandbox/snapshot.d.ts +0 -595
- package/dist/api/sandbox/snapshot.d.ts.map +0 -1
- package/dist/api/sandbox/snapshot.js +0 -598
- package/dist/api/sandbox/snapshot.js.map +0 -1
- package/dist/api/services/index.d.ts +0 -2
- package/dist/api/services/index.d.ts.map +0 -1
- package/dist/api/services/index.js +0 -2
- package/dist/api/services/index.js.map +0 -1
- package/dist/api/services/stats.d.ts +0 -263
- package/dist/api/services/stats.d.ts.map +0 -1
- package/dist/api/services/stats.js +0 -144
- package/dist/api/services/stats.js.map +0 -1
- package/dist/api/session/get.d.ts +0 -169
- package/dist/api/session/get.d.ts.map +0 -1
- package/dist/api/session/get.js +0 -56
- package/dist/api/session/get.js.map +0 -1
- package/dist/api/session/index.d.ts +0 -4
- package/dist/api/session/index.d.ts.map +0 -1
- package/dist/api/session/index.js +0 -4
- package/dist/api/session/index.js.map +0 -1
- package/dist/api/session/list.d.ts +0 -143
- package/dist/api/session/list.d.ts.map +0 -1
- package/dist/api/session/list.js +0 -91
- package/dist/api/session/list.js.map +0 -1
- package/dist/api/session/logs.d.ts +0 -40
- package/dist/api/session/logs.d.ts.map +0 -1
- package/dist/api/session/logs.js +0 -28
- package/dist/api/session/logs.js.map +0 -1
- package/dist/api/session/util.d.ts +0 -23
- package/dist/api/session/util.d.ts.map +0 -1
- package/dist/api/session/util.js +0 -3
- package/dist/api/session/util.js.map +0 -1
- package/dist/api/storage/config.d.ts +0 -99
- package/dist/api/storage/config.d.ts.map +0 -1
- package/dist/api/storage/config.js +0 -61
- package/dist/api/storage/config.js.map +0 -1
- package/dist/api/storage/index.d.ts +0 -5
- package/dist/api/storage/index.d.ts.map +0 -1
- package/dist/api/storage/index.js +0 -5
- package/dist/api/storage/index.js.map +0 -1
- package/dist/api/storage/objects.d.ts +0 -155
- package/dist/api/storage/objects.d.ts.map +0 -1
- package/dist/api/storage/objects.js +0 -148
- package/dist/api/storage/objects.js.map +0 -1
- package/dist/api/storage/types.d.ts +0 -161
- package/dist/api/storage/types.d.ts.map +0 -1
- package/dist/api/storage/types.js +0 -141
- package/dist/api/storage/types.js.map +0 -1
- package/dist/api/storage/util.d.ts +0 -48
- package/dist/api/storage/util.d.ts.map +0 -1
- package/dist/api/storage/util.js +0 -8
- package/dist/api/storage/util.js.map +0 -1
- package/dist/api/stream/get.d.ts +0 -58
- package/dist/api/stream/get.d.ts.map +0 -1
- package/dist/api/stream/get.js +0 -40
- package/dist/api/stream/get.js.map +0 -1
- package/dist/api/stream/index.d.ts +0 -4
- package/dist/api/stream/index.d.ts.map +0 -1
- package/dist/api/stream/index.js +0 -4
- package/dist/api/stream/index.js.map +0 -1
- package/dist/api/stream/list.d.ts +0 -120
- package/dist/api/stream/list.d.ts.map +0 -1
- package/dist/api/stream/list.js +0 -77
- package/dist/api/stream/list.js.map +0 -1
- package/dist/api/stream/util.d.ts +0 -23
- package/dist/api/stream/util.d.ts.map +0 -1
- package/dist/api/stream/util.js +0 -3
- package/dist/api/stream/util.js.map +0 -1
- package/dist/api/thread/delete.d.ts +0 -23
- package/dist/api/thread/delete.d.ts.map +0 -1
- package/dist/api/thread/delete.js +0 -21
- package/dist/api/thread/delete.js.map +0 -1
- package/dist/api/thread/get.d.ts +0 -36
- package/dist/api/thread/get.d.ts.map +0 -1
- package/dist/api/thread/get.js +0 -23
- package/dist/api/thread/get.js.map +0 -1
- package/dist/api/thread/index.d.ts +0 -5
- package/dist/api/thread/index.d.ts.map +0 -1
- package/dist/api/thread/index.js +0 -5
- package/dist/api/thread/index.js.map +0 -1
- package/dist/api/thread/list.d.ts +0 -69
- package/dist/api/thread/list.d.ts.map +0 -1
- package/dist/api/thread/list.js +0 -51
- package/dist/api/thread/list.js.map +0 -1
- package/dist/api/thread/util.d.ts +0 -23
- package/dist/api/thread/util.d.ts.map +0 -1
- package/dist/api/thread/util.js +0 -3
- package/dist/api/thread/util.js.map +0 -1
- package/dist/api/user/index.d.ts +0 -2
- package/dist/api/user/index.d.ts.map +0 -1
- package/dist/api/user/index.js +0 -2
- package/dist/api/user/index.js.map +0 -1
- package/dist/api/user/util.d.ts +0 -23
- package/dist/api/user/util.d.ts.map +0 -1
- package/dist/api/user/util.js +0 -3
- package/dist/api/user/util.js.map +0 -1
- package/dist/api/webhook/deliveries.d.ts +0 -94
- package/dist/api/webhook/deliveries.d.ts.map +0 -1
- package/dist/api/webhook/deliveries.js +0 -79
- package/dist/api/webhook/deliveries.js.map +0 -1
- package/dist/api/webhook/destinations.d.ts +0 -136
- package/dist/api/webhook/destinations.d.ts.map +0 -1
- package/dist/api/webhook/destinations.js +0 -137
- package/dist/api/webhook/destinations.js.map +0 -1
- package/dist/api/webhook/index.d.ts +0 -41
- package/dist/api/webhook/index.d.ts.map +0 -1
- package/dist/api/webhook/index.js +0 -59
- package/dist/api/webhook/index.js.map +0 -1
- package/dist/api/webhook/receipts.d.ts +0 -77
- package/dist/api/webhook/receipts.d.ts.map +0 -1
- package/dist/api/webhook/receipts.js +0 -78
- package/dist/api/webhook/receipts.js.map +0 -1
- package/dist/api/webhook/types.d.ts +0 -249
- package/dist/api/webhook/types.d.ts.map +0 -1
- package/dist/api/webhook/types.js +0 -221
- package/dist/api/webhook/types.js.map +0 -1
- package/dist/api/webhook/util.d.ts +0 -202
- package/dist/api/webhook/util.d.ts.map +0 -1
- package/dist/api/webhook/util.js +0 -201
- package/dist/api/webhook/util.js.map +0 -1
- package/dist/api/webhook/webhooks.d.ts +0 -146
- package/dist/api/webhook/webhooks.d.ts.map +0 -1
- package/dist/api/webhook/webhooks.js +0 -165
- package/dist/api/webhook/webhooks.js.map +0 -1
- package/src/api/api-example.md +0 -164
- package/src/api/apikey/create.ts +0 -41
- package/src/api/apikey/delete.ts +0 -30
- package/src/api/apikey/get.ts +0 -48
- package/src/api/apikey/index.ts +0 -5
- package/src/api/apikey/list.ts +0 -64
- package/src/api/apikey/util.ts +0 -3
- package/src/api/db/index.ts +0 -27
- package/src/api/db/logs.ts +0 -75
- package/src/api/db/query.ts +0 -67
- package/src/api/db/tables.ts +0 -92
- package/src/api/db/util.ts +0 -9
- package/src/api/eval/get.ts +0 -33
- package/src/api/eval/index.ts +0 -28
- package/src/api/eval/list.ts +0 -49
- package/src/api/eval/run-get.ts +0 -39
- package/src/api/eval/run-list.ts +0 -59
- package/src/api/machine/index.ts +0 -2
- package/src/api/machine/machine.ts +0 -160
- package/src/api/machine/util.ts +0 -5
- package/src/api/org/index.ts +0 -6
- package/src/api/org/list.ts +0 -28
- package/src/api/org/resources.ts +0 -140
- package/src/api/org/util.ts +0 -4
- package/src/api/project/agent.ts +0 -86
- package/src/api/project/create.ts +0 -47
- package/src/api/project/delete.ts +0 -25
- package/src/api/project/deploy.ts +0 -458
- package/src/api/project/deployment.ts +0 -195
- package/src/api/project/env-delete.ts +0 -45
- package/src/api/project/env-update.ts +0 -55
- package/src/api/project/exists.ts +0 -58
- package/src/api/project/hostname.ts +0 -73
- package/src/api/project/index.ts +0 -13
- package/src/api/project/update-region.ts +0 -44
- package/src/api/project/util.ts +0 -8
- package/src/api/queue/analytics.ts +0 -311
- package/src/api/queue/destinations.ts +0 -259
- package/src/api/queue/dlq.ts +0 -243
- package/src/api/queue/index.ts +0 -308
- package/src/api/queue/messages.ts +0 -784
- package/src/api/queue/queues.ts +0 -460
- package/src/api/queue/sources.ts +0 -294
- package/src/api/queue/types.ts +0 -1325
- package/src/api/queue/util.ts +0 -278
- package/src/api/queue/validation.ts +0 -560
- package/src/api/queue/websocket.ts +0 -514
- package/src/api/region/delete.ts +0 -57
- package/src/api/region/index.ts +0 -4
- package/src/api/region/list.ts +0 -32
- package/src/api/region/resources.ts +0 -69
- package/src/api/region/util.ts +0 -3
- package/src/api/sandbox/cli-list.ts +0 -127
- package/src/api/sandbox/create.ts +0 -256
- package/src/api/sandbox/destroy.ts +0 -41
- package/src/api/sandbox/disk-checkpoint.ts +0 -179
- package/src/api/sandbox/execute.ts +0 -132
- package/src/api/sandbox/execution.ts +0 -183
- package/src/api/sandbox/files.ts +0 -596
- package/src/api/sandbox/get.ts +0 -249
- package/src/api/sandbox/getStatus.ts +0 -54
- package/src/api/sandbox/index.ts +0 -211
- package/src/api/sandbox/list.ts +0 -224
- package/src/api/sandbox/resolve.ts +0 -98
- package/src/api/sandbox/run.ts +0 -439
- package/src/api/sandbox/runtime.ts +0 -100
- package/src/api/sandbox/snapshot-build.ts +0 -98
- package/src/api/sandbox/snapshot.ts +0 -781
- package/src/api/services/index.ts +0 -1
- package/src/api/services/stats.ts +0 -213
- package/src/api/session/get.ts +0 -106
- package/src/api/session/index.ts +0 -3
- package/src/api/session/list.ts +0 -136
- package/src/api/session/logs.ts +0 -47
- package/src/api/session/util.ts +0 -3
- package/src/api/storage/config.ts +0 -111
- package/src/api/storage/index.ts +0 -4
- package/src/api/storage/objects.ts +0 -250
- package/src/api/storage/types.ts +0 -174
- package/src/api/storage/util.ts +0 -10
- package/src/api/stream/get.ts +0 -51
- package/src/api/stream/index.ts +0 -3
- package/src/api/stream/list.ts +0 -127
- package/src/api/stream/util.ts +0 -3
- package/src/api/thread/delete.ts +0 -31
- package/src/api/thread/get.ts +0 -34
- package/src/api/thread/index.ts +0 -4
- package/src/api/thread/list.ts +0 -76
- package/src/api/thread/util.ts +0 -3
- package/src/api/user/index.ts +0 -1
- package/src/api/user/util.ts +0 -3
- package/src/api/webhook/deliveries.ts +0 -129
- package/src/api/webhook/destinations.ts +0 -224
- package/src/api/webhook/index.ts +0 -133
- package/src/api/webhook/receipts.ts +0 -124
- package/src/api/webhook/types.ts +0 -309
- package/src/api/webhook/util.ts +0 -237
- package/src/api/webhook/webhooks.ts +0 -260
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
-
import { SandboxResponseError } from './util.ts';
|
|
4
|
-
|
|
5
|
-
export const SandboxInfoSchema = z.object({
|
|
6
|
-
id: z.string().describe('the sandbox id'),
|
|
7
|
-
name: z.string().nullable().describe('the sandbox name'),
|
|
8
|
-
description: z.string().nullable().describe('the sandbox description'),
|
|
9
|
-
status: z.string().describe('sandbox status'),
|
|
10
|
-
region: z.string().nullable().describe('cloud region'),
|
|
11
|
-
createdAt: z.string().nullable().describe('ISO 8601 creation timestamp'),
|
|
12
|
-
orgId: z.string().describe('the organization id'),
|
|
13
|
-
orgName: z.string().nullable().describe('the organization name'),
|
|
14
|
-
projectId: z.string().nullable().describe('the project id'),
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export const SandboxListDataSchema = z.object({
|
|
18
|
-
sandboxes: z.array(SandboxInfoSchema).describe('list of sandboxes'),
|
|
19
|
-
total: z.number().describe('total count of matching sandboxes'),
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export const SandboxListResponseSchema = APIResponseSchema(SandboxListDataSchema);
|
|
23
|
-
|
|
24
|
-
export type CLISandboxListResponse = z.infer<typeof SandboxListResponseSchema>;
|
|
25
|
-
export type CLISandboxListData = z.infer<typeof SandboxListDataSchema>;
|
|
26
|
-
export type CLISandboxInfo = z.infer<typeof SandboxInfoSchema>;
|
|
27
|
-
|
|
28
|
-
export interface CLISandboxListOptions {
|
|
29
|
-
/**
|
|
30
|
-
* Filter by sandbox name
|
|
31
|
-
*/
|
|
32
|
-
name?: string;
|
|
33
|
-
/**
|
|
34
|
-
* Filter by sandbox mode
|
|
35
|
-
*/
|
|
36
|
-
mode?: 'oneshot' | 'interactive';
|
|
37
|
-
/**
|
|
38
|
-
* Filter by specific project ID
|
|
39
|
-
*/
|
|
40
|
-
projectId?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Filter by specific organization ID
|
|
43
|
-
*/
|
|
44
|
-
orgId?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Filter by sandbox status
|
|
47
|
-
*/
|
|
48
|
-
status?:
|
|
49
|
-
| 'creating'
|
|
50
|
-
| 'idle'
|
|
51
|
-
| 'running'
|
|
52
|
-
| 'paused'
|
|
53
|
-
| 'stopping'
|
|
54
|
-
| 'suspended'
|
|
55
|
-
| 'terminated'
|
|
56
|
-
| 'failed';
|
|
57
|
-
/**
|
|
58
|
-
* Maximum number of sandboxes to return (default: 50, max: 100)
|
|
59
|
-
*/
|
|
60
|
-
limit?: number;
|
|
61
|
-
/**
|
|
62
|
-
* Number of sandboxes to skip for pagination
|
|
63
|
-
*/
|
|
64
|
-
offset?: number;
|
|
65
|
-
/**
|
|
66
|
-
* Field to sort by
|
|
67
|
-
*/
|
|
68
|
-
sort?: string;
|
|
69
|
-
/**
|
|
70
|
-
* Sort direction (default: 'desc')
|
|
71
|
-
*/
|
|
72
|
-
direction?: 'asc' | 'desc';
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* List sandboxes with optional filtering using the CLI API endpoint.
|
|
77
|
-
*
|
|
78
|
-
* This endpoint searches across all organizations the user is a member of,
|
|
79
|
-
* unlike the Catalyst API which requires an orgId.
|
|
80
|
-
*
|
|
81
|
-
* @param client - The API client
|
|
82
|
-
* @param options - Filtering and pagination options
|
|
83
|
-
* @returns A promise that resolves to the list of sandboxes
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* // List all sandboxes across all orgs
|
|
87
|
-
* const result = await cliSandboxList(client);
|
|
88
|
-
* console.log(`Found ${result.total} sandboxes`);
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* // List running sandboxes
|
|
92
|
-
* const result = await cliSandboxList(client, { status: 'running' });
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* // List sandboxes for a specific project
|
|
96
|
-
* const result = await cliSandboxList(client, { projectId: 'proj_123' });
|
|
97
|
-
*/
|
|
98
|
-
export async function cliSandboxList(
|
|
99
|
-
client: APIClient,
|
|
100
|
-
options: CLISandboxListOptions = {}
|
|
101
|
-
): Promise<CLISandboxListData> {
|
|
102
|
-
const { projectId, orgId, status, limit, offset, sort, direction } = options;
|
|
103
|
-
const params = new URLSearchParams();
|
|
104
|
-
|
|
105
|
-
if (options.name) params.set('name', options.name);
|
|
106
|
-
if (options.mode) params.set('mode', options.mode);
|
|
107
|
-
if (projectId) params.set('projectId', projectId);
|
|
108
|
-
if (orgId) params.set('orgId', orgId);
|
|
109
|
-
if (status) params.set('status', status);
|
|
110
|
-
if (limit !== undefined) params.set('limit', limit.toString());
|
|
111
|
-
if (offset !== undefined) params.set('offset', offset.toString());
|
|
112
|
-
if (sort) params.set('sort', sort);
|
|
113
|
-
if (direction) params.set('direction', direction);
|
|
114
|
-
|
|
115
|
-
const queryString = params.toString();
|
|
116
|
-
const resp = await client.request<CLISandboxListResponse>(
|
|
117
|
-
'GET',
|
|
118
|
-
`/cli/sandbox${queryString ? `?${queryString}` : ''}`,
|
|
119
|
-
SandboxListResponseSchema
|
|
120
|
-
);
|
|
121
|
-
|
|
122
|
-
if (resp.success) {
|
|
123
|
-
return resp.data;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
throw new SandboxResponseError({ message: resp.message });
|
|
127
|
-
}
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import type { SandboxCreateOptions, SandboxStatus } from '@agentuity/core';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
4
|
-
import { NPM_PACKAGE_NAME_PATTERN } from './snapshot-build.ts';
|
|
5
|
-
import { API_VERSION, throwSandboxError } from './util.ts';
|
|
6
|
-
|
|
7
|
-
export const SandboxCreateRequestSchema = z
|
|
8
|
-
.object({
|
|
9
|
-
projectId: z.string().optional().describe('Project ID to associate the sandbox with'),
|
|
10
|
-
runtime: z.string().optional().describe('Runtime name (e.g., "bun:1", "python:3.14")'),
|
|
11
|
-
runtimeId: z.string().optional().describe('Runtime ID (e.g., "srt_xxx")'),
|
|
12
|
-
name: z.string().optional().describe('Optional sandbox name'),
|
|
13
|
-
description: z.string().optional().describe('Optional sandbox description'),
|
|
14
|
-
resources: z
|
|
15
|
-
.object({
|
|
16
|
-
memory: z.string().optional().describe('Memory limit (e.g., "512Mi", "1Gi")'),
|
|
17
|
-
cpu: z.string().optional().describe('CPU limit (e.g., "0.5", "1")'),
|
|
18
|
-
disk: z.string().optional().describe('Disk size limit (e.g., "1Gi", "10Gi")'),
|
|
19
|
-
})
|
|
20
|
-
.optional()
|
|
21
|
-
.describe('Resource constraints for the sandbox'),
|
|
22
|
-
env: z
|
|
23
|
-
.record(z.string(), z.string())
|
|
24
|
-
.optional()
|
|
25
|
-
.describe('Environment variables to set in the sandbox'),
|
|
26
|
-
network: z
|
|
27
|
-
.object({
|
|
28
|
-
enabled: z.boolean().optional().describe('Whether network access is enabled'),
|
|
29
|
-
port: z
|
|
30
|
-
.number()
|
|
31
|
-
.int()
|
|
32
|
-
.min(1024)
|
|
33
|
-
.max(65535)
|
|
34
|
-
.optional()
|
|
35
|
-
.describe('Port to expose from the sandbox (1024-65535)'),
|
|
36
|
-
})
|
|
37
|
-
.optional()
|
|
38
|
-
.describe('Network configuration for the sandbox'),
|
|
39
|
-
stream: z
|
|
40
|
-
.object({
|
|
41
|
-
stdout: z.string().optional().describe('Stream ID for stdout output'),
|
|
42
|
-
stderr: z.string().optional().describe('Stream ID for stderr output'),
|
|
43
|
-
stdin: z.string().optional().describe('Stream ID for stdin input'),
|
|
44
|
-
timestamps: z.boolean().optional().describe('Whether to include timestamps in output'),
|
|
45
|
-
})
|
|
46
|
-
.optional()
|
|
47
|
-
.describe('Stream configuration for I/O redirection'),
|
|
48
|
-
timeout: z
|
|
49
|
-
.object({
|
|
50
|
-
idle: z.string().optional().describe('Idle timeout duration (e.g., "5m", "1h")'),
|
|
51
|
-
execution: z.string().optional().describe('Maximum execution time (e.g., "30m", "2h")'),
|
|
52
|
-
})
|
|
53
|
-
.optional()
|
|
54
|
-
.describe('Timeout settings for the sandbox'),
|
|
55
|
-
command: z
|
|
56
|
-
.object({
|
|
57
|
-
exec: z.array(z.string()).describe('Command and arguments to execute'),
|
|
58
|
-
files: z
|
|
59
|
-
.array(
|
|
60
|
-
z.object({
|
|
61
|
-
path: z
|
|
62
|
-
.string()
|
|
63
|
-
.describe('Path to the file relative to the sandbox workspace'),
|
|
64
|
-
content: z.string().describe('Base64-encoded file content'),
|
|
65
|
-
})
|
|
66
|
-
)
|
|
67
|
-
.optional()
|
|
68
|
-
.describe('Files to write before execution (deprecated: use top-level files)'),
|
|
69
|
-
mode: z
|
|
70
|
-
.enum(['oneshot', 'interactive'])
|
|
71
|
-
.optional()
|
|
72
|
-
.describe('Execution mode: oneshot runs once, interactive keeps running'),
|
|
73
|
-
})
|
|
74
|
-
.optional()
|
|
75
|
-
.describe('Initial command to run in the sandbox'),
|
|
76
|
-
files: z
|
|
77
|
-
.array(
|
|
78
|
-
z.object({
|
|
79
|
-
path: z.string().describe('Path to the file relative to the sandbox workspace'),
|
|
80
|
-
content: z.string().describe('Base64-encoded file content'),
|
|
81
|
-
})
|
|
82
|
-
)
|
|
83
|
-
.optional()
|
|
84
|
-
.describe('Files to write to sandbox on creation'),
|
|
85
|
-
snapshot: z.string().optional().describe('Snapshot ID to restore the sandbox from'),
|
|
86
|
-
dependencies: z
|
|
87
|
-
.array(z.string())
|
|
88
|
-
.optional()
|
|
89
|
-
.describe('Apt packages to install when creating the sandbox'),
|
|
90
|
-
packages: z
|
|
91
|
-
.array(
|
|
92
|
-
z
|
|
93
|
-
.string()
|
|
94
|
-
.regex(
|
|
95
|
-
NPM_PACKAGE_NAME_PATTERN,
|
|
96
|
-
'Invalid npm/bun package specifier: must not contain whitespace, semicolons, backticks, pipes, or dollar signs'
|
|
97
|
-
)
|
|
98
|
-
)
|
|
99
|
-
.optional()
|
|
100
|
-
.describe('npm/bun packages to install globally when creating the sandbox'),
|
|
101
|
-
metadata: z
|
|
102
|
-
.record(z.string(), z.unknown())
|
|
103
|
-
.optional()
|
|
104
|
-
.describe('Optional user-defined metadata to associate with the sandbox'),
|
|
105
|
-
})
|
|
106
|
-
.refine(
|
|
107
|
-
(data) => {
|
|
108
|
-
// If snapshot is provided, runtime and runtimeId must not be provided
|
|
109
|
-
if (data.snapshot) {
|
|
110
|
-
return !data.runtime && !data.runtimeId;
|
|
111
|
-
}
|
|
112
|
-
return true;
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
message: 'cannot specify both snapshot and runtime; snapshot includes its own runtime',
|
|
116
|
-
path: ['snapshot'],
|
|
117
|
-
}
|
|
118
|
-
)
|
|
119
|
-
.describe('Request body for creating a new sandbox');
|
|
120
|
-
|
|
121
|
-
export const SandboxCreateDataSchema = z
|
|
122
|
-
.object({
|
|
123
|
-
sandboxId: z.string().describe('Unique identifier for the created sandbox'),
|
|
124
|
-
status: z
|
|
125
|
-
.enum([
|
|
126
|
-
'creating',
|
|
127
|
-
'idle',
|
|
128
|
-
'running',
|
|
129
|
-
'paused',
|
|
130
|
-
'stopping',
|
|
131
|
-
'suspended',
|
|
132
|
-
'terminated',
|
|
133
|
-
'failed',
|
|
134
|
-
])
|
|
135
|
-
.describe('Current status of the sandbox'),
|
|
136
|
-
stdoutStreamId: z.string().optional().describe('Stream ID for reading stdout'),
|
|
137
|
-
stdoutStreamUrl: z.string().optional().describe('URL for streaming stdout output'),
|
|
138
|
-
stderrStreamId: z.string().optional().describe('Stream ID for reading stderr'),
|
|
139
|
-
stderrStreamUrl: z.string().optional().describe('URL for streaming stderr output'),
|
|
140
|
-
auditStreamId: z.string().optional().describe('Stream ID for reading audit events'),
|
|
141
|
-
auditStreamUrl: z.string().optional().describe('URL for streaming audit events'),
|
|
142
|
-
})
|
|
143
|
-
.describe('Response data from sandbox creation');
|
|
144
|
-
|
|
145
|
-
export const SandboxCreateResponseSchema = APIResponseSchema(SandboxCreateDataSchema);
|
|
146
|
-
|
|
147
|
-
export interface SandboxCreateResponse {
|
|
148
|
-
sandboxId: string;
|
|
149
|
-
status: SandboxStatus;
|
|
150
|
-
stdoutStreamId?: string;
|
|
151
|
-
stdoutStreamUrl?: string;
|
|
152
|
-
stderrStreamId?: string;
|
|
153
|
-
stderrStreamUrl?: string;
|
|
154
|
-
auditStreamId?: string;
|
|
155
|
-
auditStreamUrl?: string;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export interface SandboxCreateParams {
|
|
159
|
-
options?: SandboxCreateOptions;
|
|
160
|
-
orgId?: string;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Creates a new sandbox instance.
|
|
165
|
-
*
|
|
166
|
-
* @param client - The API client to use for the request
|
|
167
|
-
* @param params - Parameters for creating the sandbox
|
|
168
|
-
* @returns The created sandbox response including sandbox ID and stream URLs
|
|
169
|
-
* @throws {SandboxResponseError} If the sandbox creation fails
|
|
170
|
-
*/
|
|
171
|
-
export async function sandboxCreate(
|
|
172
|
-
client: APIClient,
|
|
173
|
-
params: SandboxCreateParams = {}
|
|
174
|
-
): Promise<SandboxCreateResponse> {
|
|
175
|
-
const { options = {}, orgId } = params;
|
|
176
|
-
const body: z.infer<typeof SandboxCreateRequestSchema> = {};
|
|
177
|
-
|
|
178
|
-
if (options.projectId) {
|
|
179
|
-
body.projectId = options.projectId;
|
|
180
|
-
}
|
|
181
|
-
if (options.runtime) {
|
|
182
|
-
body.runtime = options.runtime;
|
|
183
|
-
}
|
|
184
|
-
if (options.runtimeId) {
|
|
185
|
-
body.runtimeId = options.runtimeId;
|
|
186
|
-
}
|
|
187
|
-
if (options.name) {
|
|
188
|
-
body.name = options.name;
|
|
189
|
-
}
|
|
190
|
-
if (options.description) {
|
|
191
|
-
body.description = options.description;
|
|
192
|
-
}
|
|
193
|
-
if (options.resources) {
|
|
194
|
-
body.resources = options.resources;
|
|
195
|
-
}
|
|
196
|
-
if (options.env) {
|
|
197
|
-
body.env = options.env;
|
|
198
|
-
}
|
|
199
|
-
if (options.network) {
|
|
200
|
-
body.network = options.network;
|
|
201
|
-
}
|
|
202
|
-
if (options.stream) {
|
|
203
|
-
body.stream = options.stream;
|
|
204
|
-
}
|
|
205
|
-
if (options.timeout) {
|
|
206
|
-
body.timeout = options.timeout;
|
|
207
|
-
}
|
|
208
|
-
if (options.command) {
|
|
209
|
-
body.command = {
|
|
210
|
-
exec: options.command.exec,
|
|
211
|
-
mode: options.command.mode,
|
|
212
|
-
files: options.command.files?.map((f) => ({
|
|
213
|
-
path: f.path,
|
|
214
|
-
content: f.content.toString('base64'),
|
|
215
|
-
})),
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
if (options.files && options.files.length > 0) {
|
|
219
|
-
body.files = options.files.map((f) => ({
|
|
220
|
-
path: f.path,
|
|
221
|
-
content: f.content.toString('base64'),
|
|
222
|
-
}));
|
|
223
|
-
}
|
|
224
|
-
if (options.snapshot) {
|
|
225
|
-
body.snapshot = options.snapshot;
|
|
226
|
-
}
|
|
227
|
-
if (options.dependencies && options.dependencies.length > 0) {
|
|
228
|
-
body.dependencies = options.dependencies;
|
|
229
|
-
}
|
|
230
|
-
if (options.packages && options.packages.length > 0) {
|
|
231
|
-
body.packages = options.packages;
|
|
232
|
-
}
|
|
233
|
-
if (options.metadata) {
|
|
234
|
-
body.metadata = options.metadata;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
const queryParams = new URLSearchParams();
|
|
238
|
-
if (orgId) {
|
|
239
|
-
queryParams.set('orgId', orgId);
|
|
240
|
-
}
|
|
241
|
-
const queryString = queryParams.toString();
|
|
242
|
-
const url = `/sandbox/${API_VERSION}${queryString ? `?${queryString}` : ''}`;
|
|
243
|
-
|
|
244
|
-
const resp = await client.post<z.infer<typeof SandboxCreateResponseSchema>>(
|
|
245
|
-
url,
|
|
246
|
-
body,
|
|
247
|
-
SandboxCreateResponseSchema,
|
|
248
|
-
SandboxCreateRequestSchema
|
|
249
|
-
);
|
|
250
|
-
|
|
251
|
-
if (resp.success) {
|
|
252
|
-
return resp.data;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
throwSandboxError(resp, {});
|
|
256
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchemaNoData } from '../api.ts';
|
|
3
|
-
import { API_VERSION, throwSandboxError } from './util.ts';
|
|
4
|
-
|
|
5
|
-
export const DestroyResponseSchema = APIResponseSchemaNoData();
|
|
6
|
-
|
|
7
|
-
export interface SandboxDestroyParams {
|
|
8
|
-
sandboxId: string;
|
|
9
|
-
orgId?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Destroys a sandbox and releases all associated resources.
|
|
14
|
-
*
|
|
15
|
-
* @param client - The API client to use for the request
|
|
16
|
-
* @param params - Parameters including the sandbox ID to destroy
|
|
17
|
-
* @throws {SandboxResponseError} If the sandbox is not found or destruction fails
|
|
18
|
-
*/
|
|
19
|
-
export async function sandboxDestroy(
|
|
20
|
-
client: APIClient,
|
|
21
|
-
params: SandboxDestroyParams
|
|
22
|
-
): Promise<void> {
|
|
23
|
-
const { sandboxId, orgId } = params;
|
|
24
|
-
const queryParams = new URLSearchParams();
|
|
25
|
-
if (orgId) {
|
|
26
|
-
queryParams.set('orgId', orgId);
|
|
27
|
-
}
|
|
28
|
-
const queryString = queryParams.toString();
|
|
29
|
-
const url = `/sandbox/${API_VERSION}/${sandboxId}${queryString ? `?${queryString}` : ''}`;
|
|
30
|
-
|
|
31
|
-
const resp = await client.delete<z.infer<typeof DestroyResponseSchema>>(
|
|
32
|
-
url,
|
|
33
|
-
DestroyResponseSchema
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
if (resp.success) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
throwSandboxError(resp, { sandboxId });
|
|
41
|
-
}
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import type { z as zType } from 'zod';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { type APIClient, APIResponseSchema, APIResponseSchemaNoData } from '../api.ts';
|
|
4
|
-
import { API_VERSION, throwSandboxError } from './util.ts';
|
|
5
|
-
|
|
6
|
-
// --- Schemas ---
|
|
7
|
-
|
|
8
|
-
export const DiskCheckpointInfoSchema = z.object({
|
|
9
|
-
id: z.string().describe('Globally unique checkpoint ID (ckpt_xxx)'),
|
|
10
|
-
name: z.string().describe('User-provided checkpoint name'),
|
|
11
|
-
createdAt: z.string().describe('ISO timestamp of creation'),
|
|
12
|
-
parent: z.string().describe('Parent checkpoint name (empty for base)'),
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export type DiskCheckpointInfo = z.infer<typeof DiskCheckpointInfoSchema>;
|
|
16
|
-
|
|
17
|
-
const CreateDiskCheckpointDataSchema = DiskCheckpointInfoSchema;
|
|
18
|
-
export const CreateDiskCheckpointResponseSchema = APIResponseSchema(CreateDiskCheckpointDataSchema);
|
|
19
|
-
|
|
20
|
-
const ListDiskCheckpointsDataSchema = z.object({
|
|
21
|
-
checkpoints: z.array(DiskCheckpointInfoSchema),
|
|
22
|
-
});
|
|
23
|
-
export const ListDiskCheckpointsResponseSchema = APIResponseSchema(ListDiskCheckpointsDataSchema);
|
|
24
|
-
|
|
25
|
-
export const RestoreDiskCheckpointResponseSchema = APIResponseSchemaNoData();
|
|
26
|
-
export const DeleteDiskCheckpointResponseSchema = APIResponseSchemaNoData();
|
|
27
|
-
|
|
28
|
-
// --- Params ---
|
|
29
|
-
|
|
30
|
-
export interface DiskCheckpointCreateParams {
|
|
31
|
-
sandboxId: string;
|
|
32
|
-
name: string;
|
|
33
|
-
orgId?: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface DiskCheckpointListParams {
|
|
37
|
-
sandboxId: string;
|
|
38
|
-
orgId?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface DiskCheckpointRestoreParams {
|
|
42
|
-
sandboxId: string;
|
|
43
|
-
checkpointId: string;
|
|
44
|
-
orgId?: string;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface DiskCheckpointDeleteParams {
|
|
48
|
-
sandboxId: string;
|
|
49
|
-
checkpointId: string;
|
|
50
|
-
orgId?: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// --- API Functions ---
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Creates a new disk checkpoint for a sandbox.
|
|
57
|
-
*
|
|
58
|
-
* @param client - The API client to use for the request
|
|
59
|
-
* @param params - Parameters including the sandbox ID and checkpoint name
|
|
60
|
-
* @throws {SandboxResponseError} If the sandbox is not found or checkpoint creation fails
|
|
61
|
-
*/
|
|
62
|
-
export async function diskCheckpointCreate(
|
|
63
|
-
client: APIClient,
|
|
64
|
-
params: DiskCheckpointCreateParams
|
|
65
|
-
): Promise<DiskCheckpointInfo> {
|
|
66
|
-
const { sandboxId, name, orgId } = params;
|
|
67
|
-
const queryParams = new URLSearchParams();
|
|
68
|
-
if (orgId) {
|
|
69
|
-
queryParams.set('orgId', orgId);
|
|
70
|
-
}
|
|
71
|
-
const queryString = queryParams.toString();
|
|
72
|
-
const url = `/sandbox/${API_VERSION}/${encodeURIComponent(sandboxId)}/checkpoint${queryString ? `?${queryString}` : ''}`;
|
|
73
|
-
|
|
74
|
-
const resp = await client.post<zType.infer<typeof CreateDiskCheckpointResponseSchema>>(
|
|
75
|
-
url,
|
|
76
|
-
{ name },
|
|
77
|
-
CreateDiskCheckpointResponseSchema
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
if (resp.success) {
|
|
81
|
-
return resp.data;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
throwSandboxError(resp, { sandboxId });
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Lists all disk checkpoints for a sandbox.
|
|
89
|
-
*
|
|
90
|
-
* @param client - The API client to use for the request
|
|
91
|
-
* @param params - Parameters including the sandbox ID
|
|
92
|
-
* @throws {SandboxResponseError} If the sandbox is not found or listing fails
|
|
93
|
-
*/
|
|
94
|
-
export async function diskCheckpointList(
|
|
95
|
-
client: APIClient,
|
|
96
|
-
params: DiskCheckpointListParams
|
|
97
|
-
): Promise<DiskCheckpointInfo[]> {
|
|
98
|
-
const { sandboxId, orgId } = params;
|
|
99
|
-
const queryParams = new URLSearchParams();
|
|
100
|
-
if (orgId) {
|
|
101
|
-
queryParams.set('orgId', orgId);
|
|
102
|
-
}
|
|
103
|
-
const queryString = queryParams.toString();
|
|
104
|
-
const url = `/sandbox/${API_VERSION}/checkpoints/${encodeURIComponent(sandboxId)}${queryString ? `?${queryString}` : ''}`;
|
|
105
|
-
|
|
106
|
-
const resp = await client.get<zType.infer<typeof ListDiskCheckpointsResponseSchema>>(
|
|
107
|
-
url,
|
|
108
|
-
ListDiskCheckpointsResponseSchema
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
if (resp.success) {
|
|
112
|
-
return resp.data.checkpoints;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
throwSandboxError(resp, { sandboxId });
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Restores a sandbox to a specific disk checkpoint.
|
|
120
|
-
*
|
|
121
|
-
* @param client - The API client to use for the request
|
|
122
|
-
* @param params - Parameters including the sandbox ID and checkpoint ID
|
|
123
|
-
* @throws {SandboxResponseError} If the sandbox or checkpoint is not found, or restore fails
|
|
124
|
-
*/
|
|
125
|
-
export async function diskCheckpointRestore(
|
|
126
|
-
client: APIClient,
|
|
127
|
-
params: DiskCheckpointRestoreParams
|
|
128
|
-
): Promise<void> {
|
|
129
|
-
const { sandboxId, checkpointId, orgId } = params;
|
|
130
|
-
const queryParams = new URLSearchParams();
|
|
131
|
-
if (orgId) {
|
|
132
|
-
queryParams.set('orgId', orgId);
|
|
133
|
-
}
|
|
134
|
-
const queryString = queryParams.toString();
|
|
135
|
-
const url = `/sandbox/${API_VERSION}/${encodeURIComponent(sandboxId)}/checkpoint/${encodeURIComponent(checkpointId)}/restore${queryString ? `?${queryString}` : ''}`;
|
|
136
|
-
|
|
137
|
-
const resp = await client.post<zType.infer<typeof RestoreDiskCheckpointResponseSchema>>(
|
|
138
|
-
url,
|
|
139
|
-
undefined,
|
|
140
|
-
RestoreDiskCheckpointResponseSchema
|
|
141
|
-
);
|
|
142
|
-
|
|
143
|
-
if (resp.success) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
throwSandboxError(resp, { sandboxId });
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Deletes a disk checkpoint from a sandbox.
|
|
152
|
-
*
|
|
153
|
-
* @param client - The API client to use for the request
|
|
154
|
-
* @param params - Parameters including the sandbox ID and checkpoint ID
|
|
155
|
-
* @throws {SandboxResponseError} If the sandbox or checkpoint is not found, or deletion fails
|
|
156
|
-
*/
|
|
157
|
-
export async function diskCheckpointDelete(
|
|
158
|
-
client: APIClient,
|
|
159
|
-
params: DiskCheckpointDeleteParams
|
|
160
|
-
): Promise<void> {
|
|
161
|
-
const { sandboxId, checkpointId, orgId } = params;
|
|
162
|
-
const queryParams = new URLSearchParams();
|
|
163
|
-
if (orgId) {
|
|
164
|
-
queryParams.set('orgId', orgId);
|
|
165
|
-
}
|
|
166
|
-
const queryString = queryParams.toString();
|
|
167
|
-
const url = `/sandbox/${API_VERSION}/${encodeURIComponent(sandboxId)}/checkpoint/${encodeURIComponent(checkpointId)}${queryString ? `?${queryString}` : ''}`;
|
|
168
|
-
|
|
169
|
-
const resp = await client.delete<zType.infer<typeof DeleteDiskCheckpointResponseSchema>>(
|
|
170
|
-
url,
|
|
171
|
-
DeleteDiskCheckpointResponseSchema
|
|
172
|
-
);
|
|
173
|
-
|
|
174
|
-
if (resp.success) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
throwSandboxError(resp, { sandboxId });
|
|
179
|
-
}
|