@agentuity/server 1.0.32 → 1.0.33
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,211 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { APIResponseSchema } from "../api.js";
|
|
3
|
-
import { NPM_PACKAGE_NAME_PATTERN } from "./snapshot-build.js";
|
|
4
|
-
import { API_VERSION, throwSandboxError } from "./util.js";
|
|
5
|
-
export const SandboxCreateRequestSchema = z
|
|
6
|
-
.object({
|
|
7
|
-
projectId: z.string().optional().describe('Project ID to associate the sandbox with'),
|
|
8
|
-
runtime: z.string().optional().describe('Runtime name (e.g., "bun:1", "python:3.14")'),
|
|
9
|
-
runtimeId: z.string().optional().describe('Runtime ID (e.g., "srt_xxx")'),
|
|
10
|
-
name: z.string().optional().describe('Optional sandbox name'),
|
|
11
|
-
description: z.string().optional().describe('Optional sandbox description'),
|
|
12
|
-
resources: z
|
|
13
|
-
.object({
|
|
14
|
-
memory: z.string().optional().describe('Memory limit (e.g., "512Mi", "1Gi")'),
|
|
15
|
-
cpu: z.string().optional().describe('CPU limit (e.g., "0.5", "1")'),
|
|
16
|
-
disk: z.string().optional().describe('Disk size limit (e.g., "1Gi", "10Gi")'),
|
|
17
|
-
})
|
|
18
|
-
.optional()
|
|
19
|
-
.describe('Resource constraints for the sandbox'),
|
|
20
|
-
env: z
|
|
21
|
-
.record(z.string(), z.string())
|
|
22
|
-
.optional()
|
|
23
|
-
.describe('Environment variables to set in the sandbox'),
|
|
24
|
-
network: z
|
|
25
|
-
.object({
|
|
26
|
-
enabled: z.boolean().optional().describe('Whether network access is enabled'),
|
|
27
|
-
port: z
|
|
28
|
-
.number()
|
|
29
|
-
.int()
|
|
30
|
-
.min(1024)
|
|
31
|
-
.max(65535)
|
|
32
|
-
.optional()
|
|
33
|
-
.describe('Port to expose from the sandbox (1024-65535)'),
|
|
34
|
-
})
|
|
35
|
-
.optional()
|
|
36
|
-
.describe('Network configuration for the sandbox'),
|
|
37
|
-
stream: z
|
|
38
|
-
.object({
|
|
39
|
-
stdout: z.string().optional().describe('Stream ID for stdout output'),
|
|
40
|
-
stderr: z.string().optional().describe('Stream ID for stderr output'),
|
|
41
|
-
stdin: z.string().optional().describe('Stream ID for stdin input'),
|
|
42
|
-
timestamps: z.boolean().optional().describe('Whether to include timestamps in output'),
|
|
43
|
-
})
|
|
44
|
-
.optional()
|
|
45
|
-
.describe('Stream configuration for I/O redirection'),
|
|
46
|
-
timeout: z
|
|
47
|
-
.object({
|
|
48
|
-
idle: z.string().optional().describe('Idle timeout duration (e.g., "5m", "1h")'),
|
|
49
|
-
execution: z.string().optional().describe('Maximum execution time (e.g., "30m", "2h")'),
|
|
50
|
-
})
|
|
51
|
-
.optional()
|
|
52
|
-
.describe('Timeout settings for the sandbox'),
|
|
53
|
-
command: z
|
|
54
|
-
.object({
|
|
55
|
-
exec: z.array(z.string()).describe('Command and arguments to execute'),
|
|
56
|
-
files: z
|
|
57
|
-
.array(z.object({
|
|
58
|
-
path: z
|
|
59
|
-
.string()
|
|
60
|
-
.describe('Path to the file relative to the sandbox workspace'),
|
|
61
|
-
content: z.string().describe('Base64-encoded file content'),
|
|
62
|
-
}))
|
|
63
|
-
.optional()
|
|
64
|
-
.describe('Files to write before execution (deprecated: use top-level files)'),
|
|
65
|
-
mode: z
|
|
66
|
-
.enum(['oneshot', 'interactive'])
|
|
67
|
-
.optional()
|
|
68
|
-
.describe('Execution mode: oneshot runs once, interactive keeps running'),
|
|
69
|
-
})
|
|
70
|
-
.optional()
|
|
71
|
-
.describe('Initial command to run in the sandbox'),
|
|
72
|
-
files: z
|
|
73
|
-
.array(z.object({
|
|
74
|
-
path: z.string().describe('Path to the file relative to the sandbox workspace'),
|
|
75
|
-
content: z.string().describe('Base64-encoded file content'),
|
|
76
|
-
}))
|
|
77
|
-
.optional()
|
|
78
|
-
.describe('Files to write to sandbox on creation'),
|
|
79
|
-
snapshot: z.string().optional().describe('Snapshot ID to restore the sandbox from'),
|
|
80
|
-
dependencies: z
|
|
81
|
-
.array(z.string())
|
|
82
|
-
.optional()
|
|
83
|
-
.describe('Apt packages to install when creating the sandbox'),
|
|
84
|
-
packages: z
|
|
85
|
-
.array(z
|
|
86
|
-
.string()
|
|
87
|
-
.regex(NPM_PACKAGE_NAME_PATTERN, 'Invalid npm/bun package specifier: must not contain whitespace, semicolons, backticks, pipes, or dollar signs'))
|
|
88
|
-
.optional()
|
|
89
|
-
.describe('npm/bun packages to install globally when creating the sandbox'),
|
|
90
|
-
metadata: z
|
|
91
|
-
.record(z.string(), z.unknown())
|
|
92
|
-
.optional()
|
|
93
|
-
.describe('Optional user-defined metadata to associate with the sandbox'),
|
|
94
|
-
})
|
|
95
|
-
.refine((data) => {
|
|
96
|
-
// If snapshot is provided, runtime and runtimeId must not be provided
|
|
97
|
-
if (data.snapshot) {
|
|
98
|
-
return !data.runtime && !data.runtimeId;
|
|
99
|
-
}
|
|
100
|
-
return true;
|
|
101
|
-
}, {
|
|
102
|
-
message: 'cannot specify both snapshot and runtime; snapshot includes its own runtime',
|
|
103
|
-
path: ['snapshot'],
|
|
104
|
-
})
|
|
105
|
-
.describe('Request body for creating a new sandbox');
|
|
106
|
-
export const SandboxCreateDataSchema = z
|
|
107
|
-
.object({
|
|
108
|
-
sandboxId: z.string().describe('Unique identifier for the created sandbox'),
|
|
109
|
-
status: z
|
|
110
|
-
.enum([
|
|
111
|
-
'creating',
|
|
112
|
-
'idle',
|
|
113
|
-
'running',
|
|
114
|
-
'paused',
|
|
115
|
-
'stopping',
|
|
116
|
-
'suspended',
|
|
117
|
-
'terminated',
|
|
118
|
-
'failed',
|
|
119
|
-
])
|
|
120
|
-
.describe('Current status of the sandbox'),
|
|
121
|
-
stdoutStreamId: z.string().optional().describe('Stream ID for reading stdout'),
|
|
122
|
-
stdoutStreamUrl: z.string().optional().describe('URL for streaming stdout output'),
|
|
123
|
-
stderrStreamId: z.string().optional().describe('Stream ID for reading stderr'),
|
|
124
|
-
stderrStreamUrl: z.string().optional().describe('URL for streaming stderr output'),
|
|
125
|
-
auditStreamId: z.string().optional().describe('Stream ID for reading audit events'),
|
|
126
|
-
auditStreamUrl: z.string().optional().describe('URL for streaming audit events'),
|
|
127
|
-
})
|
|
128
|
-
.describe('Response data from sandbox creation');
|
|
129
|
-
export const SandboxCreateResponseSchema = APIResponseSchema(SandboxCreateDataSchema);
|
|
130
|
-
/**
|
|
131
|
-
* Creates a new sandbox instance.
|
|
132
|
-
*
|
|
133
|
-
* @param client - The API client to use for the request
|
|
134
|
-
* @param params - Parameters for creating the sandbox
|
|
135
|
-
* @returns The created sandbox response including sandbox ID and stream URLs
|
|
136
|
-
* @throws {SandboxResponseError} If the sandbox creation fails
|
|
137
|
-
*/
|
|
138
|
-
export async function sandboxCreate(client, params = {}) {
|
|
139
|
-
const { options = {}, orgId } = params;
|
|
140
|
-
const body = {};
|
|
141
|
-
if (options.projectId) {
|
|
142
|
-
body.projectId = options.projectId;
|
|
143
|
-
}
|
|
144
|
-
if (options.runtime) {
|
|
145
|
-
body.runtime = options.runtime;
|
|
146
|
-
}
|
|
147
|
-
if (options.runtimeId) {
|
|
148
|
-
body.runtimeId = options.runtimeId;
|
|
149
|
-
}
|
|
150
|
-
if (options.name) {
|
|
151
|
-
body.name = options.name;
|
|
152
|
-
}
|
|
153
|
-
if (options.description) {
|
|
154
|
-
body.description = options.description;
|
|
155
|
-
}
|
|
156
|
-
if (options.resources) {
|
|
157
|
-
body.resources = options.resources;
|
|
158
|
-
}
|
|
159
|
-
if (options.env) {
|
|
160
|
-
body.env = options.env;
|
|
161
|
-
}
|
|
162
|
-
if (options.network) {
|
|
163
|
-
body.network = options.network;
|
|
164
|
-
}
|
|
165
|
-
if (options.stream) {
|
|
166
|
-
body.stream = options.stream;
|
|
167
|
-
}
|
|
168
|
-
if (options.timeout) {
|
|
169
|
-
body.timeout = options.timeout;
|
|
170
|
-
}
|
|
171
|
-
if (options.command) {
|
|
172
|
-
body.command = {
|
|
173
|
-
exec: options.command.exec,
|
|
174
|
-
mode: options.command.mode,
|
|
175
|
-
files: options.command.files?.map((f) => ({
|
|
176
|
-
path: f.path,
|
|
177
|
-
content: f.content.toString('base64'),
|
|
178
|
-
})),
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
if (options.files && options.files.length > 0) {
|
|
182
|
-
body.files = options.files.map((f) => ({
|
|
183
|
-
path: f.path,
|
|
184
|
-
content: f.content.toString('base64'),
|
|
185
|
-
}));
|
|
186
|
-
}
|
|
187
|
-
if (options.snapshot) {
|
|
188
|
-
body.snapshot = options.snapshot;
|
|
189
|
-
}
|
|
190
|
-
if (options.dependencies && options.dependencies.length > 0) {
|
|
191
|
-
body.dependencies = options.dependencies;
|
|
192
|
-
}
|
|
193
|
-
if (options.packages && options.packages.length > 0) {
|
|
194
|
-
body.packages = options.packages;
|
|
195
|
-
}
|
|
196
|
-
if (options.metadata) {
|
|
197
|
-
body.metadata = options.metadata;
|
|
198
|
-
}
|
|
199
|
-
const queryParams = new URLSearchParams();
|
|
200
|
-
if (orgId) {
|
|
201
|
-
queryParams.set('orgId', orgId);
|
|
202
|
-
}
|
|
203
|
-
const queryString = queryParams.toString();
|
|
204
|
-
const url = `/sandbox/${API_VERSION}${queryString ? `?${queryString}` : ''}`;
|
|
205
|
-
const resp = await client.post(url, body, SandboxCreateResponseSchema, SandboxCreateRequestSchema);
|
|
206
|
-
if (resp.success) {
|
|
207
|
-
return resp.data;
|
|
208
|
-
}
|
|
209
|
-
throwSandboxError(resp, {});
|
|
210
|
-
}
|
|
211
|
-
//# sourceMappingURL=create.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/api/sandbox/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACzC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACrF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IACtF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACzE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IAC7D,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EA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CAAC,EAAE,EAAE,CAAC;IAE7E,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAC7B,GAAG,EACH,IAAI,EACJ,2BAA2B,EAC3B,0BAA0B,CAC1B,CAAC;IAEF,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IAED,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { z } from 'zod';
|
|
2
|
-
import { type APIClient } from '../api.ts';
|
|
3
|
-
export declare const DestroyResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
-
success: z.ZodLiteral<false>;
|
|
5
|
-
message: z.ZodString;
|
|
6
|
-
code: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
8
|
-
success: z.ZodLiteral<true>;
|
|
9
|
-
}, z.core.$strip>], "success">;
|
|
10
|
-
export interface SandboxDestroyParams {
|
|
11
|
-
sandboxId: string;
|
|
12
|
-
orgId?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Destroys a sandbox and releases all associated resources.
|
|
16
|
-
*
|
|
17
|
-
* @param client - The API client to use for the request
|
|
18
|
-
* @param params - Parameters including the sandbox ID to destroy
|
|
19
|
-
* @throws {SandboxResponseError} If the sandbox is not found or destruction fails
|
|
20
|
-
*/
|
|
21
|
-
export declare function sandboxDestroy(client: APIClient, params: SandboxDestroyParams): Promise<void>;
|
|
22
|
-
//# sourceMappingURL=destroy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"destroy.d.ts","sourceRoot":"","sources":["../../../src/api/sandbox/destroy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,KAAK,SAAS,EAA2B,MAAM,WAAW,CAAC;AAGpE,eAAO,MAAM,qBAAqB;;;;;;8BAA4B,CAAC;AAE/D,MAAM,WAAW,oBAAoB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CACnC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,oBAAoB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { APIResponseSchemaNoData } from "../api.js";
|
|
2
|
-
import { API_VERSION, throwSandboxError } from "./util.js";
|
|
3
|
-
export const DestroyResponseSchema = APIResponseSchemaNoData();
|
|
4
|
-
/**
|
|
5
|
-
* Destroys a sandbox and releases all associated resources.
|
|
6
|
-
*
|
|
7
|
-
* @param client - The API client to use for the request
|
|
8
|
-
* @param params - Parameters including the sandbox ID to destroy
|
|
9
|
-
* @throws {SandboxResponseError} If the sandbox is not found or destruction fails
|
|
10
|
-
*/
|
|
11
|
-
export async function sandboxDestroy(client, params) {
|
|
12
|
-
const { sandboxId, orgId } = params;
|
|
13
|
-
const queryParams = new URLSearchParams();
|
|
14
|
-
if (orgId) {
|
|
15
|
-
queryParams.set('orgId', orgId);
|
|
16
|
-
}
|
|
17
|
-
const queryString = queryParams.toString();
|
|
18
|
-
const url = `/sandbox/${API_VERSION}/${sandboxId}${queryString ? `?${queryString}` : ''}`;
|
|
19
|
-
const resp = await client.delete(url, DestroyResponseSchema);
|
|
20
|
-
if (resp.success) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
throwSandboxError(resp, { sandboxId });
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=destroy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"destroy.js","sourceRoot":"","sources":["../../../src/api/sandbox/destroy.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,EAAE,CAAC;AAO/D;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CACnC,MAAiB,EACjB,MAA4B;IAE5B,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IACpC,MAAM,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC;IAC1C,IAAI,KAAK,EAAE,CAAC;QACX,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;IACD,MAAM,WAAW,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC3C,MAAM,GAAG,GAAG,YAAY,WAAW,IAAI,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAE1F,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAC/B,GAAG,EACH,qBAAqB,CACrB,CAAC;IAEF,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAClB,OAAO;IACR,CAAC;IAED,iBAAiB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import type { z as zType } from 'zod';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { type APIClient } from '../api.ts';
|
|
4
|
-
export declare const DiskCheckpointInfoSchema: zType.ZodObject<{
|
|
5
|
-
id: zType.ZodString;
|
|
6
|
-
name: zType.ZodString;
|
|
7
|
-
createdAt: zType.ZodString;
|
|
8
|
-
parent: zType.ZodString;
|
|
9
|
-
}, zType.core.$strip>;
|
|
10
|
-
export type DiskCheckpointInfo = z.infer<typeof DiskCheckpointInfoSchema>;
|
|
11
|
-
export declare const CreateDiskCheckpointResponseSchema: zType.ZodDiscriminatedUnion<[zType.ZodObject<{
|
|
12
|
-
success: zType.ZodLiteral<false>;
|
|
13
|
-
message: zType.ZodString;
|
|
14
|
-
code: zType.ZodOptional<zType.ZodString>;
|
|
15
|
-
}, zType.core.$strip>, zType.ZodObject<{
|
|
16
|
-
success: zType.ZodLiteral<true>;
|
|
17
|
-
data: zType.ZodObject<{
|
|
18
|
-
id: zType.ZodString;
|
|
19
|
-
name: zType.ZodString;
|
|
20
|
-
createdAt: zType.ZodString;
|
|
21
|
-
parent: zType.ZodString;
|
|
22
|
-
}, zType.core.$strip>;
|
|
23
|
-
}, zType.core.$strip>], "success">;
|
|
24
|
-
export declare const ListDiskCheckpointsResponseSchema: zType.ZodDiscriminatedUnion<[zType.ZodObject<{
|
|
25
|
-
success: zType.ZodLiteral<false>;
|
|
26
|
-
message: zType.ZodString;
|
|
27
|
-
code: zType.ZodOptional<zType.ZodString>;
|
|
28
|
-
}, zType.core.$strip>, zType.ZodObject<{
|
|
29
|
-
success: zType.ZodLiteral<true>;
|
|
30
|
-
data: zType.ZodObject<{
|
|
31
|
-
checkpoints: zType.ZodArray<zType.ZodObject<{
|
|
32
|
-
id: zType.ZodString;
|
|
33
|
-
name: zType.ZodString;
|
|
34
|
-
createdAt: zType.ZodString;
|
|
35
|
-
parent: zType.ZodString;
|
|
36
|
-
}, zType.core.$strip>>;
|
|
37
|
-
}, zType.core.$strip>;
|
|
38
|
-
}, zType.core.$strip>], "success">;
|
|
39
|
-
export declare const RestoreDiskCheckpointResponseSchema: zType.ZodDiscriminatedUnion<[zType.ZodObject<{
|
|
40
|
-
success: zType.ZodLiteral<false>;
|
|
41
|
-
message: zType.ZodString;
|
|
42
|
-
code: zType.ZodOptional<zType.ZodString>;
|
|
43
|
-
}, zType.core.$strip>, zType.ZodObject<{
|
|
44
|
-
success: zType.ZodLiteral<true>;
|
|
45
|
-
}, zType.core.$strip>], "success">;
|
|
46
|
-
export declare const DeleteDiskCheckpointResponseSchema: zType.ZodDiscriminatedUnion<[zType.ZodObject<{
|
|
47
|
-
success: zType.ZodLiteral<false>;
|
|
48
|
-
message: zType.ZodString;
|
|
49
|
-
code: zType.ZodOptional<zType.ZodString>;
|
|
50
|
-
}, zType.core.$strip>, zType.ZodObject<{
|
|
51
|
-
success: zType.ZodLiteral<true>;
|
|
52
|
-
}, zType.core.$strip>], "success">;
|
|
53
|
-
export interface DiskCheckpointCreateParams {
|
|
54
|
-
sandboxId: string;
|
|
55
|
-
name: string;
|
|
56
|
-
orgId?: string;
|
|
57
|
-
}
|
|
58
|
-
export interface DiskCheckpointListParams {
|
|
59
|
-
sandboxId: string;
|
|
60
|
-
orgId?: string;
|
|
61
|
-
}
|
|
62
|
-
export interface DiskCheckpointRestoreParams {
|
|
63
|
-
sandboxId: string;
|
|
64
|
-
checkpointId: string;
|
|
65
|
-
orgId?: string;
|
|
66
|
-
}
|
|
67
|
-
export interface DiskCheckpointDeleteParams {
|
|
68
|
-
sandboxId: string;
|
|
69
|
-
checkpointId: string;
|
|
70
|
-
orgId?: string;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Creates a new disk checkpoint for a sandbox.
|
|
74
|
-
*
|
|
75
|
-
* @param client - The API client to use for the request
|
|
76
|
-
* @param params - Parameters including the sandbox ID and checkpoint name
|
|
77
|
-
* @throws {SandboxResponseError} If the sandbox is not found or checkpoint creation fails
|
|
78
|
-
*/
|
|
79
|
-
export declare function diskCheckpointCreate(client: APIClient, params: DiskCheckpointCreateParams): Promise<DiskCheckpointInfo>;
|
|
80
|
-
/**
|
|
81
|
-
* Lists all disk checkpoints for a sandbox.
|
|
82
|
-
*
|
|
83
|
-
* @param client - The API client to use for the request
|
|
84
|
-
* @param params - Parameters including the sandbox ID
|
|
85
|
-
* @throws {SandboxResponseError} If the sandbox is not found or listing fails
|
|
86
|
-
*/
|
|
87
|
-
export declare function diskCheckpointList(client: APIClient, params: DiskCheckpointListParams): Promise<DiskCheckpointInfo[]>;
|
|
88
|
-
/**
|
|
89
|
-
* Restores a sandbox to a specific disk checkpoint.
|
|
90
|
-
*
|
|
91
|
-
* @param client - The API client to use for the request
|
|
92
|
-
* @param params - Parameters including the sandbox ID and checkpoint ID
|
|
93
|
-
* @throws {SandboxResponseError} If the sandbox or checkpoint is not found, or restore fails
|
|
94
|
-
*/
|
|
95
|
-
export declare function diskCheckpointRestore(client: APIClient, params: DiskCheckpointRestoreParams): Promise<void>;
|
|
96
|
-
/**
|
|
97
|
-
* Deletes a disk checkpoint from a sandbox.
|
|
98
|
-
*
|
|
99
|
-
* @param client - The API client to use for the request
|
|
100
|
-
* @param params - Parameters including the sandbox ID and checkpoint ID
|
|
101
|
-
* @throws {SandboxResponseError} If the sandbox or checkpoint is not found, or deletion fails
|
|
102
|
-
*/
|
|
103
|
-
export declare function diskCheckpointDelete(client: APIClient, params: DiskCheckpointDeleteParams): Promise<void>;
|
|
104
|
-
//# sourceMappingURL=disk-checkpoint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"disk-checkpoint.d.ts","sourceRoot":"","sources":["../../../src/api/sandbox/disk-checkpoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,IAAI,KAAK,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAA8C,MAAM,WAAW,CAAC;AAKvF,eAAO,MAAM,wBAAwB;;;;;qBAKnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAG1E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;kCAAoD,CAAC;AAKpG,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;kCAAmD,CAAC;AAElG,eAAO,MAAM,mCAAmC;;;;;;kCAA4B,CAAC;AAC7E,eAAO,MAAM,kCAAkC;;;;;;kCAA4B,CAAC;AAI5E,MAAM,WAAW,0BAA0B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,2BAA2B;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,0BAA0B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAID;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACzC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,0BAA0B,GAChC,OAAO,CAAC,kBAAkB,CAAC,CAoB7B;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACvC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,wBAAwB,GAC9B,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAmB/B;AAED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAC1C,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,2BAA2B,GACjC,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACzC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,0BAA0B,GAChC,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { APIResponseSchema, APIResponseSchemaNoData } from "../api.js";
|
|
3
|
-
import { API_VERSION, throwSandboxError } from "./util.js";
|
|
4
|
-
// --- Schemas ---
|
|
5
|
-
export const DiskCheckpointInfoSchema = z.object({
|
|
6
|
-
id: z.string().describe('Globally unique checkpoint ID (ckpt_xxx)'),
|
|
7
|
-
name: z.string().describe('User-provided checkpoint name'),
|
|
8
|
-
createdAt: z.string().describe('ISO timestamp of creation'),
|
|
9
|
-
parent: z.string().describe('Parent checkpoint name (empty for base)'),
|
|
10
|
-
});
|
|
11
|
-
const CreateDiskCheckpointDataSchema = DiskCheckpointInfoSchema;
|
|
12
|
-
export const CreateDiskCheckpointResponseSchema = APIResponseSchema(CreateDiskCheckpointDataSchema);
|
|
13
|
-
const ListDiskCheckpointsDataSchema = z.object({
|
|
14
|
-
checkpoints: z.array(DiskCheckpointInfoSchema),
|
|
15
|
-
});
|
|
16
|
-
export const ListDiskCheckpointsResponseSchema = APIResponseSchema(ListDiskCheckpointsDataSchema);
|
|
17
|
-
export const RestoreDiskCheckpointResponseSchema = APIResponseSchemaNoData();
|
|
18
|
-
export const DeleteDiskCheckpointResponseSchema = APIResponseSchemaNoData();
|
|
19
|
-
// --- API Functions ---
|
|
20
|
-
/**
|
|
21
|
-
* Creates a new disk checkpoint for a sandbox.
|
|
22
|
-
*
|
|
23
|
-
* @param client - The API client to use for the request
|
|
24
|
-
* @param params - Parameters including the sandbox ID and checkpoint name
|
|
25
|
-
* @throws {SandboxResponseError} If the sandbox is not found or checkpoint creation fails
|
|
26
|
-
*/
|
|
27
|
-
export async function diskCheckpointCreate(client, params) {
|
|
28
|
-
const { sandboxId, name, orgId } = params;
|
|
29
|
-
const queryParams = new URLSearchParams();
|
|
30
|
-
if (orgId) {
|
|
31
|
-
queryParams.set('orgId', orgId);
|
|
32
|
-
}
|
|
33
|
-
const queryString = queryParams.toString();
|
|
34
|
-
const url = `/sandbox/${API_VERSION}/${encodeURIComponent(sandboxId)}/checkpoint${queryString ? `?${queryString}` : ''}`;
|
|
35
|
-
const resp = await client.post(url, { name }, CreateDiskCheckpointResponseSchema);
|
|
36
|
-
if (resp.success) {
|
|
37
|
-
return resp.data;
|
|
38
|
-
}
|
|
39
|
-
throwSandboxError(resp, { sandboxId });
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Lists all disk checkpoints for a sandbox.
|
|
43
|
-
*
|
|
44
|
-
* @param client - The API client to use for the request
|
|
45
|
-
* @param params - Parameters including the sandbox ID
|
|
46
|
-
* @throws {SandboxResponseError} If the sandbox is not found or listing fails
|
|
47
|
-
*/
|
|
48
|
-
export async function diskCheckpointList(client, params) {
|
|
49
|
-
const { sandboxId, orgId } = params;
|
|
50
|
-
const queryParams = new URLSearchParams();
|
|
51
|
-
if (orgId) {
|
|
52
|
-
queryParams.set('orgId', orgId);
|
|
53
|
-
}
|
|
54
|
-
const queryString = queryParams.toString();
|
|
55
|
-
const url = `/sandbox/${API_VERSION}/checkpoints/${encodeURIComponent(sandboxId)}${queryString ? `?${queryString}` : ''}`;
|
|
56
|
-
const resp = await client.get(url, ListDiskCheckpointsResponseSchema);
|
|
57
|
-
if (resp.success) {
|
|
58
|
-
return resp.data.checkpoints;
|
|
59
|
-
}
|
|
60
|
-
throwSandboxError(resp, { sandboxId });
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Restores a sandbox to a specific disk checkpoint.
|
|
64
|
-
*
|
|
65
|
-
* @param client - The API client to use for the request
|
|
66
|
-
* @param params - Parameters including the sandbox ID and checkpoint ID
|
|
67
|
-
* @throws {SandboxResponseError} If the sandbox or checkpoint is not found, or restore fails
|
|
68
|
-
*/
|
|
69
|
-
export async function diskCheckpointRestore(client, params) {
|
|
70
|
-
const { sandboxId, checkpointId, orgId } = params;
|
|
71
|
-
const queryParams = new URLSearchParams();
|
|
72
|
-
if (orgId) {
|
|
73
|
-
queryParams.set('orgId', orgId);
|
|
74
|
-
}
|
|
75
|
-
const queryString = queryParams.toString();
|
|
76
|
-
const url = `/sandbox/${API_VERSION}/${encodeURIComponent(sandboxId)}/checkpoint/${encodeURIComponent(checkpointId)}/restore${queryString ? `?${queryString}` : ''}`;
|
|
77
|
-
const resp = await client.post(url, undefined, RestoreDiskCheckpointResponseSchema);
|
|
78
|
-
if (resp.success) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
throwSandboxError(resp, { sandboxId });
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Deletes a disk checkpoint from a sandbox.
|
|
85
|
-
*
|
|
86
|
-
* @param client - The API client to use for the request
|
|
87
|
-
* @param params - Parameters including the sandbox ID and checkpoint ID
|
|
88
|
-
* @throws {SandboxResponseError} If the sandbox or checkpoint is not found, or deletion fails
|
|
89
|
-
*/
|
|
90
|
-
export async function diskCheckpointDelete(client, params) {
|
|
91
|
-
const { sandboxId, checkpointId, orgId } = params;
|
|
92
|
-
const queryParams = new URLSearchParams();
|
|
93
|
-
if (orgId) {
|
|
94
|
-
queryParams.set('orgId', orgId);
|
|
95
|
-
}
|
|
96
|
-
const queryString = queryParams.toString();
|
|
97
|
-
const url = `/sandbox/${API_VERSION}/${encodeURIComponent(sandboxId)}/checkpoint/${encodeURIComponent(checkpointId)}${queryString ? `?${queryString}` : ''}`;
|
|
98
|
-
const resp = await client.delete(url, DeleteDiskCheckpointResponseSchema);
|
|
99
|
-
if (resp.success) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
throwSandboxError(resp, { sandboxId });
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=disk-checkpoint.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"disk-checkpoint.js","sourceRoot":"","sources":["../../../src/api/sandbox/disk-checkpoint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE3D,kBAAkB;AAElB,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0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AI,CAAC,OAAO,EAAE,CAAC;QAClB,OAAO;IACR,CAAC;IAED,iBAAiB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { ExecuteOptions, Execution } from '@agentuity/core';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { type APIClient } from '../api.ts';
|
|
4
|
-
export declare const ExecuteRequestSchema: z.ZodObject<{
|
|
5
|
-
command: z.ZodArray<z.ZodString>;
|
|
6
|
-
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7
|
-
path: z.ZodString;
|
|
8
|
-
content: z.ZodString;
|
|
9
|
-
}, z.core.$strip>>>;
|
|
10
|
-
timeout: z.ZodOptional<z.ZodString>;
|
|
11
|
-
stream: z.ZodOptional<z.ZodObject<{
|
|
12
|
-
stdout: z.ZodOptional<z.ZodString>;
|
|
13
|
-
stderr: z.ZodOptional<z.ZodString>;
|
|
14
|
-
timestamps: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
-
}, z.core.$strip>>;
|
|
16
|
-
}, z.core.$strip>;
|
|
17
|
-
export declare const ExecuteDataSchema: z.ZodObject<{
|
|
18
|
-
executionId: z.ZodString;
|
|
19
|
-
status: z.ZodEnum<{
|
|
20
|
-
timeout: "timeout";
|
|
21
|
-
failed: "failed";
|
|
22
|
-
completed: "completed";
|
|
23
|
-
running: "running";
|
|
24
|
-
queued: "queued";
|
|
25
|
-
cancelled: "cancelled";
|
|
26
|
-
}>;
|
|
27
|
-
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
29
|
-
stdoutStreamUrl: z.ZodOptional<z.ZodString>;
|
|
30
|
-
stderrStreamUrl: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
export declare const ExecuteResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
33
|
-
success: z.ZodLiteral<false>;
|
|
34
|
-
message: z.ZodString;
|
|
35
|
-
code: z.ZodOptional<z.ZodString>;
|
|
36
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
-
success: z.ZodLiteral<true>;
|
|
38
|
-
data: z.ZodObject<{
|
|
39
|
-
executionId: z.ZodString;
|
|
40
|
-
status: z.ZodEnum<{
|
|
41
|
-
timeout: "timeout";
|
|
42
|
-
failed: "failed";
|
|
43
|
-
completed: "completed";
|
|
44
|
-
running: "running";
|
|
45
|
-
queued: "queued";
|
|
46
|
-
cancelled: "cancelled";
|
|
47
|
-
}>;
|
|
48
|
-
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
49
|
-
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
50
|
-
stdoutStreamUrl: z.ZodOptional<z.ZodString>;
|
|
51
|
-
stderrStreamUrl: z.ZodOptional<z.ZodString>;
|
|
52
|
-
}, z.core.$strip>;
|
|
53
|
-
}, z.core.$strip>], "success">;
|
|
54
|
-
export interface SandboxExecuteParams {
|
|
55
|
-
sandboxId: string;
|
|
56
|
-
options: ExecuteOptions;
|
|
57
|
-
orgId?: string;
|
|
58
|
-
signal?: AbortSignal;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Executes a command in an existing sandbox.
|
|
62
|
-
*
|
|
63
|
-
* @param client - The API client to use for the request
|
|
64
|
-
* @param params - Parameters including sandbox ID and execution options
|
|
65
|
-
* @returns The execution result including status and stream URLs
|
|
66
|
-
* @throws {SandboxResponseError} If the execution request fails
|
|
67
|
-
*/
|
|
68
|
-
export declare function sandboxExecute(client: APIClient, params: SandboxExecuteParams): Promise<Execution>;
|
|
69
|
-
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/api/sandbox/execute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,WAAW,CAAC;AAG9D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;iBAsB8B,CAAC;AAEhE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;iBAWoB,CAAC;AAEnD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;8BAAuC,CAAC;AAE1E,MAAM,WAAW,oBAAoB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CACnC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,oBAAoB,GAC1B,OAAO,CAAC,SAAS,CAAC,CAqEpB"}
|