@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
package/src/api/db/index.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
DbLogsAPIResponseSchema,
|
|
3
|
-
DbLogsRequestSchema,
|
|
4
|
-
DbLogsResponseSchema,
|
|
5
|
-
type DbQueryLog,
|
|
6
|
-
DbQueryLogSchema,
|
|
7
|
-
type DbQueryLogs,
|
|
8
|
-
dbLogs,
|
|
9
|
-
} from './logs.ts';
|
|
10
|
-
export {
|
|
11
|
-
dbQuery,
|
|
12
|
-
type QueryColumn,
|
|
13
|
-
QueryColumnSchema,
|
|
14
|
-
QueryResponseSchema,
|
|
15
|
-
type QueryResult,
|
|
16
|
-
QueryResultSchema,
|
|
17
|
-
} from './query.ts';
|
|
18
|
-
export {
|
|
19
|
-
dbTables,
|
|
20
|
-
generateCreateTableSQL,
|
|
21
|
-
type TableColumn,
|
|
22
|
-
TableColumnSchema,
|
|
23
|
-
type TableSchema,
|
|
24
|
-
TableSchemaSchema,
|
|
25
|
-
TablesResponseSchema,
|
|
26
|
-
} from './tables.ts';
|
|
27
|
-
export { DbInvalidArgumentError, DbResponseError } from './util.ts';
|
package/src/api/db/logs.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
-
import { DbInvalidArgumentError, DbResponseError } from './util.ts';
|
|
4
|
-
|
|
5
|
-
export const DbLogsRequestSchema = z.object({
|
|
6
|
-
database: z.string().describe('the database name'),
|
|
7
|
-
orgId: z.string().describe('the organization ID'),
|
|
8
|
-
region: z.string().describe('the region'),
|
|
9
|
-
startDate: z.string().optional().describe('start date filter'),
|
|
10
|
-
endDate: z.string().optional().describe('end date filter'),
|
|
11
|
-
username: z.string().optional().describe('username filter'),
|
|
12
|
-
command: z.string().optional().describe('command filter'),
|
|
13
|
-
hasError: z.boolean().optional().describe('filter by error status'),
|
|
14
|
-
sessionId: z.string().optional().describe('filter by session ID (trace ID)'),
|
|
15
|
-
limit: z.number().optional().describe('maximum number of logs to return'),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export const DbQueryLogSchema = z.object({
|
|
19
|
-
timestamp: z.string().describe('log timestamp'),
|
|
20
|
-
username: z.string().describe('username'),
|
|
21
|
-
database: z.string().describe('database name'),
|
|
22
|
-
duration: z.number().describe('query duration in milliseconds'),
|
|
23
|
-
txStatus: z.string().describe('transaction status'),
|
|
24
|
-
command: z.string().describe('SQL command type'),
|
|
25
|
-
rowCount: z.number().describe('number of rows affected'),
|
|
26
|
-
sql: z.string().describe('SQL query'),
|
|
27
|
-
error: z.string().optional().describe('error message if any'),
|
|
28
|
-
sessionId: z.string().optional().describe('session ID with sess_ prefix'),
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export const DbLogsResponseSchema = z.array(DbQueryLogSchema);
|
|
32
|
-
|
|
33
|
-
export const DbLogsAPIResponseSchema = APIResponseSchema(DbLogsResponseSchema);
|
|
34
|
-
|
|
35
|
-
type DbLogsRequest = z.infer<typeof DbLogsRequestSchema>;
|
|
36
|
-
type DbLogsAPIResponse = z.infer<typeof DbLogsAPIResponseSchema>;
|
|
37
|
-
|
|
38
|
-
export type DbQueryLog = z.infer<typeof DbQueryLogSchema>;
|
|
39
|
-
export type DbQueryLogs = DbQueryLog[];
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Get query logs for a database from the App API
|
|
43
|
-
*
|
|
44
|
-
* @param client APIClient configured for the App API base URL
|
|
45
|
-
* @param request
|
|
46
|
-
* @returns
|
|
47
|
-
*/
|
|
48
|
-
export async function dbLogs(client: APIClient, request: DbLogsRequest): Promise<DbQueryLogs> {
|
|
49
|
-
const { database, orgId, region, ...filters } = request;
|
|
50
|
-
|
|
51
|
-
if (!orgId || !region) {
|
|
52
|
-
throw new DbInvalidArgumentError({ message: 'orgId and region are required', orgId, region });
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const params = new URLSearchParams();
|
|
56
|
-
Object.entries(filters).forEach(([key, value]) => {
|
|
57
|
-
if (value !== undefined) {
|
|
58
|
-
params.append(key, String(value));
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
const queryString = params.toString();
|
|
63
|
-
const url = `/resource/2025-03-17/${orgId}/${region}/${database}/logs${queryString ? `?${queryString}` : ''}`;
|
|
64
|
-
|
|
65
|
-
const resp = await client.get<DbLogsAPIResponse>(url, DbLogsAPIResponseSchema);
|
|
66
|
-
|
|
67
|
-
if (resp.success) {
|
|
68
|
-
return resp.data;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
throw new DbResponseError({
|
|
72
|
-
database,
|
|
73
|
-
message: resp.message || 'Failed to fetch database logs',
|
|
74
|
-
});
|
|
75
|
-
}
|
package/src/api/db/query.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { APIClient, APIError } from '../api.ts';
|
|
3
|
-
import { DbInvalidArgumentError, DbResponseError } from './util.ts';
|
|
4
|
-
|
|
5
|
-
export const QueryColumnSchema = z.object({
|
|
6
|
-
name: z.string().describe('column name'),
|
|
7
|
-
type: z.string().describe('PostgreSQL data type OID'),
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export const QueryResultSchema = z.object({
|
|
11
|
-
columns: z.array(QueryColumnSchema).describe('column metadata'),
|
|
12
|
-
rows: z.array(z.record(z.string(), z.any())).describe('query result rows'),
|
|
13
|
-
rowCount: z.number().describe('number of rows returned'),
|
|
14
|
-
truncated: z.boolean().describe('whether results were truncated (max 1000 rows)'),
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export const QueryResponseSchema = z.object({
|
|
18
|
-
success: z.boolean(),
|
|
19
|
-
message: z.string().optional(),
|
|
20
|
-
data: QueryResultSchema.optional(),
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export type QueryColumn = z.infer<typeof QueryColumnSchema>;
|
|
24
|
-
export type QueryResult = z.infer<typeof QueryResultSchema>;
|
|
25
|
-
|
|
26
|
-
interface DbQueryRequest {
|
|
27
|
-
database: string;
|
|
28
|
-
query: string;
|
|
29
|
-
orgId: string;
|
|
30
|
-
region: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export async function dbQuery(client: APIClient, request: DbQueryRequest): Promise<QueryResult> {
|
|
34
|
-
const { database, query, orgId, region } = request;
|
|
35
|
-
|
|
36
|
-
if (!orgId || !region) {
|
|
37
|
-
throw new DbInvalidArgumentError({ message: 'orgId and region are required', orgId, region });
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (!query) {
|
|
41
|
-
throw new DbInvalidArgumentError({ message: 'query is required', query });
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const url = `/resource/2025-03-17/${orgId}/${region}/${database}/query`;
|
|
45
|
-
|
|
46
|
-
try {
|
|
47
|
-
const resp = await client.post(url, { query }, QueryResponseSchema);
|
|
48
|
-
|
|
49
|
-
if (resp.success && resp.data) {
|
|
50
|
-
return resp.data;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
throw new DbResponseError({
|
|
54
|
-
database,
|
|
55
|
-
message: resp.message ?? 'Failed to execute database query',
|
|
56
|
-
});
|
|
57
|
-
} catch (ex) {
|
|
58
|
-
if (ex instanceof APIError) {
|
|
59
|
-
let message = ex.message;
|
|
60
|
-
if (message?.startsWith('failed to execute query: ')) {
|
|
61
|
-
message = message.substring(25);
|
|
62
|
-
}
|
|
63
|
-
throw new DbResponseError({ database, message });
|
|
64
|
-
}
|
|
65
|
-
throw ex;
|
|
66
|
-
}
|
|
67
|
-
}
|
package/src/api/db/tables.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
-
import { DbInvalidArgumentError, DbResponseError } from './util.ts';
|
|
4
|
-
|
|
5
|
-
export const TableColumnSchema = z.object({
|
|
6
|
-
name: z.string().describe('column name'),
|
|
7
|
-
data_type: z.string().describe('PostgreSQL data type'),
|
|
8
|
-
is_nullable: z.boolean().describe('whether the column is nullable'),
|
|
9
|
-
default_value: z.string().optional().describe('default value'),
|
|
10
|
-
is_primary_key: z.boolean().describe('whether this column is part of the primary key'),
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export const TableSchemaSchema = z.object({
|
|
14
|
-
table_name: z.string().describe('table name'),
|
|
15
|
-
columns: z.array(TableColumnSchema).describe('table columns'),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export const TablesResponseSchema = APIResponseSchema(
|
|
19
|
-
z.object({
|
|
20
|
-
tables: z.array(TableSchemaSchema),
|
|
21
|
-
})
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
export type TableColumn = z.infer<typeof TableColumnSchema>;
|
|
25
|
-
export type TableSchema = z.infer<typeof TableSchemaSchema>;
|
|
26
|
-
|
|
27
|
-
interface DbTablesRequest {
|
|
28
|
-
database: string;
|
|
29
|
-
orgId: string;
|
|
30
|
-
region: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export async function dbTables(
|
|
34
|
-
client: APIClient,
|
|
35
|
-
request: DbTablesRequest
|
|
36
|
-
): Promise<TableSchema[]> {
|
|
37
|
-
const { database, orgId, region } = request;
|
|
38
|
-
|
|
39
|
-
if (!orgId || !region) {
|
|
40
|
-
throw new DbInvalidArgumentError({ message: 'orgId and region are required', orgId, region });
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const url = `/resource/2025-03-17/${orgId}/${region}/${database}/tables`;
|
|
44
|
-
|
|
45
|
-
const resp = await client.get(url, TablesResponseSchema);
|
|
46
|
-
|
|
47
|
-
if (resp.success) {
|
|
48
|
-
return resp.data.tables;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
throw new DbResponseError({
|
|
52
|
-
database,
|
|
53
|
-
message: resp.message || 'Failed to fetch database tables',
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export function generateCreateTableSQL(table: TableSchema): string {
|
|
58
|
-
const lines: string[] = [`CREATE TABLE ${table.table_name} (`];
|
|
59
|
-
|
|
60
|
-
// Collect primary key columns
|
|
61
|
-
const primaryKeyColumns: string[] = [];
|
|
62
|
-
|
|
63
|
-
const columnDefs = table.columns.map((col) => {
|
|
64
|
-
let def = ` ${col.name} ${col.data_type}`;
|
|
65
|
-
|
|
66
|
-
if (!col.is_nullable) {
|
|
67
|
-
def += ' NOT NULL';
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (col.default_value) {
|
|
71
|
-
def += ` DEFAULT ${col.default_value}`;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (col.is_primary_key) {
|
|
75
|
-
primaryKeyColumns.push(col.name);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return def;
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
lines.push(columnDefs.join(',\n'));
|
|
82
|
-
|
|
83
|
-
// Add table-level PRIMARY KEY constraint if any columns are marked as primary keys
|
|
84
|
-
if (primaryKeyColumns.length > 0) {
|
|
85
|
-
lines.push(',');
|
|
86
|
-
lines.push(` PRIMARY KEY (${primaryKeyColumns.join(', ')})`);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
lines.push(');');
|
|
90
|
-
|
|
91
|
-
return lines.join('\n');
|
|
92
|
-
}
|
package/src/api/db/util.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { StructuredError } from '@agentuity/core';
|
|
2
|
-
|
|
3
|
-
export const DbResponseError = StructuredError('DbResponseError')<{ database: string }>();
|
|
4
|
-
|
|
5
|
-
export const DbInvalidArgumentError = StructuredError('DbInvalidArgumentError')<{
|
|
6
|
-
orgId?: string;
|
|
7
|
-
region?: string;
|
|
8
|
-
query?: string;
|
|
9
|
-
}>();
|
package/src/api/eval/get.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
-
|
|
4
|
-
export const EvaluationDetailSchema = z.object({
|
|
5
|
-
id: z.string().describe('Evaluation ID'),
|
|
6
|
-
name: z.string().describe('Evaluation name'),
|
|
7
|
-
description: z.string().nullable().describe('Evaluation description'),
|
|
8
|
-
identifier: z.string().nullable().describe('Stable evaluation identifier'),
|
|
9
|
-
agentIdentifier: z.string().describe('Agent identifier'),
|
|
10
|
-
projectId: z.string().describe('Project ID'),
|
|
11
|
-
orgId: z.string().describe('Organization ID'),
|
|
12
|
-
devmode: z.boolean().describe('Whether this is a devmode evaluation'),
|
|
13
|
-
createdAt: z.string().describe('Creation timestamp'),
|
|
14
|
-
updatedAt: z.string().describe('Last updated timestamp'),
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export const EvalGetResponseSchema = APIResponseSchema(EvaluationDetailSchema);
|
|
18
|
-
|
|
19
|
-
export type EvaluationDetail = z.infer<typeof EvaluationDetailSchema>;
|
|
20
|
-
|
|
21
|
-
export async function evalGet(client: APIClient, id: string): Promise<EvaluationDetail> {
|
|
22
|
-
const resp = await client.request<z.infer<typeof EvalGetResponseSchema>>(
|
|
23
|
-
'GET',
|
|
24
|
-
`/cli/eval/${encodeURIComponent(id)}`,
|
|
25
|
-
EvalGetResponseSchema
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
if (resp.success) {
|
|
29
|
-
return resp.data;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
throw new Error(resp.message || 'Failed to get evaluation');
|
|
33
|
-
}
|
package/src/api/eval/index.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
EvalGetResponseSchema,
|
|
3
|
-
type EvaluationDetail,
|
|
4
|
-
EvaluationDetailSchema,
|
|
5
|
-
evalGet,
|
|
6
|
-
} from './get.ts';
|
|
7
|
-
export {
|
|
8
|
-
EvalListResponseData,
|
|
9
|
-
EvalListResponseSchema,
|
|
10
|
-
type Evaluation,
|
|
11
|
-
type EvaluationListRequest,
|
|
12
|
-
EvaluationSchema,
|
|
13
|
-
evalList,
|
|
14
|
-
} from './list.ts';
|
|
15
|
-
export {
|
|
16
|
-
type EvalRunDetail,
|
|
17
|
-
EvalRunDetailSchema,
|
|
18
|
-
EvalRunGetResponseSchema,
|
|
19
|
-
evalRunGet,
|
|
20
|
-
} from './run-get.ts';
|
|
21
|
-
export {
|
|
22
|
-
type EvalRunListItem,
|
|
23
|
-
type EvalRunListRequest,
|
|
24
|
-
EvalRunListResponseData,
|
|
25
|
-
EvalRunListResponseSchema,
|
|
26
|
-
EvalRunSchema,
|
|
27
|
-
evalRunList,
|
|
28
|
-
} from './run-list.ts';
|
package/src/api/eval/list.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
-
|
|
4
|
-
export const EvaluationSchema = z.object({
|
|
5
|
-
id: z.string().describe('Evaluation ID'),
|
|
6
|
-
name: z.string().describe('Evaluation name'),
|
|
7
|
-
description: z.string().nullable().describe('Evaluation description'),
|
|
8
|
-
identifier: z.string().nullable().describe('Stable evaluation identifier'),
|
|
9
|
-
agentIdentifier: z.string().describe('Agent identifier'),
|
|
10
|
-
projectId: z.string().describe('Project ID'),
|
|
11
|
-
devmode: z.boolean().describe('Whether this is a devmode evaluation'),
|
|
12
|
-
createdAt: z.string().describe('Creation timestamp'),
|
|
13
|
-
updatedAt: z.string().describe('Last updated timestamp'),
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
export const EvalListResponseData = z.array(EvaluationSchema);
|
|
17
|
-
export const EvalListResponseSchema = APIResponseSchema(EvalListResponseData);
|
|
18
|
-
|
|
19
|
-
export type Evaluation = z.infer<typeof EvaluationSchema>;
|
|
20
|
-
export type EvaluationListRequest = {
|
|
21
|
-
projectId?: string;
|
|
22
|
-
agentId?: string;
|
|
23
|
-
orgId?: string;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export async function evalList(
|
|
27
|
-
client: APIClient,
|
|
28
|
-
request: EvaluationListRequest = {}
|
|
29
|
-
): Promise<Evaluation[]> {
|
|
30
|
-
const params = new URLSearchParams();
|
|
31
|
-
if (request.orgId) params.set('orgId', request.orgId);
|
|
32
|
-
if (request.projectId) params.set('projectId', request.projectId);
|
|
33
|
-
if (request.agentId) params.set('agentId', request.agentId);
|
|
34
|
-
|
|
35
|
-
const queryString = params.toString();
|
|
36
|
-
const url = `/cli/eval${queryString ? `?${queryString}` : ''}`;
|
|
37
|
-
|
|
38
|
-
const resp = await client.request<z.infer<typeof EvalListResponseSchema>>(
|
|
39
|
-
'GET',
|
|
40
|
-
url,
|
|
41
|
-
EvalListResponseSchema
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
if (resp.success) {
|
|
45
|
-
return resp.data;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
throw new Error(resp.message || 'Failed to list evaluations');
|
|
49
|
-
}
|
package/src/api/eval/run-get.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
-
|
|
4
|
-
export const EvalRunDetailSchema = z.object({
|
|
5
|
-
id: z.string().describe('Eval run ID'),
|
|
6
|
-
sessionId: z.string().describe('Session ID'),
|
|
7
|
-
evalId: z.string().describe('Evaluation record ID'),
|
|
8
|
-
evalIdentifier: z.string().nullable().describe('Stable evaluation identifier'),
|
|
9
|
-
evalName: z.string().nullable().describe('Evaluation name'),
|
|
10
|
-
agentIdentifier: z.string().nullable().describe('Agent identifier'),
|
|
11
|
-
projectId: z.string().describe('Project ID'),
|
|
12
|
-
orgId: z.string().describe('Organization ID'),
|
|
13
|
-
deploymentId: z.string().nullable().describe('Deployment ID'),
|
|
14
|
-
devmode: z.boolean().describe('Whether this is a devmode run'),
|
|
15
|
-
pending: z.boolean().describe('Whether the eval run is pending'),
|
|
16
|
-
success: z.boolean().describe('Whether the eval run succeeded'),
|
|
17
|
-
error: z.string().nullable().describe('Error message if failed'),
|
|
18
|
-
result: z.any().nullable().describe('Eval run result'),
|
|
19
|
-
createdAt: z.string().describe('Creation timestamp'),
|
|
20
|
-
updatedAt: z.string().describe('Last updated timestamp'),
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export const EvalRunGetResponseSchema = APIResponseSchema(EvalRunDetailSchema);
|
|
24
|
-
|
|
25
|
-
export type EvalRunDetail = z.infer<typeof EvalRunDetailSchema>;
|
|
26
|
-
|
|
27
|
-
export async function evalRunGet(client: APIClient, id: string): Promise<EvalRunDetail> {
|
|
28
|
-
const resp = await client.request<z.infer<typeof EvalRunGetResponseSchema>>(
|
|
29
|
-
'GET',
|
|
30
|
-
`/cli/eval-run/${encodeURIComponent(id)}`,
|
|
31
|
-
EvalRunGetResponseSchema
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
if (resp.success) {
|
|
35
|
-
return resp.data;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
throw new Error(resp.message || 'Failed to get eval run');
|
|
39
|
-
}
|
package/src/api/eval/run-list.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
-
|
|
4
|
-
export const EvalRunSchema = z.object({
|
|
5
|
-
id: z.string().describe('Eval run ID'),
|
|
6
|
-
sessionId: z.string().describe('Session ID'),
|
|
7
|
-
evalId: z.string().describe('Evaluation record ID'),
|
|
8
|
-
evalIdentifier: z.string().nullable().describe('Stable evaluation identifier'),
|
|
9
|
-
evalName: z.string().nullable().describe('Evaluation name'),
|
|
10
|
-
agentIdentifier: z.string().nullable().describe('Agent identifier'),
|
|
11
|
-
projectId: z.string().describe('Project ID'),
|
|
12
|
-
deploymentId: z.string().nullable().describe('Deployment ID'),
|
|
13
|
-
devmode: z.boolean().describe('Whether this is a devmode run'),
|
|
14
|
-
pending: z.boolean().describe('Whether the eval run is pending'),
|
|
15
|
-
success: z.boolean().describe('Whether the eval run succeeded'),
|
|
16
|
-
error: z.string().nullable().describe('Error message if failed'),
|
|
17
|
-
result: z.any().nullable().describe('Eval run result'),
|
|
18
|
-
createdAt: z.string().describe('Creation timestamp'),
|
|
19
|
-
updatedAt: z.string().describe('Last updated timestamp'),
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export const EvalRunListResponseData = z.array(EvalRunSchema);
|
|
23
|
-
export const EvalRunListResponseSchema = APIResponseSchema(EvalRunListResponseData);
|
|
24
|
-
|
|
25
|
-
export type EvalRunListItem = z.infer<typeof EvalRunSchema>;
|
|
26
|
-
export type EvalRunListRequest = {
|
|
27
|
-
projectId?: string;
|
|
28
|
-
agentId?: string;
|
|
29
|
-
evalId?: string;
|
|
30
|
-
sessionId?: string;
|
|
31
|
-
orgId?: string;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export async function evalRunList(
|
|
35
|
-
client: APIClient,
|
|
36
|
-
request: EvalRunListRequest = {}
|
|
37
|
-
): Promise<EvalRunListItem[]> {
|
|
38
|
-
const params = new URLSearchParams();
|
|
39
|
-
if (request.orgId) params.set('orgId', request.orgId);
|
|
40
|
-
if (request.projectId) params.set('projectId', request.projectId);
|
|
41
|
-
if (request.agentId) params.set('agentId', request.agentId);
|
|
42
|
-
if (request.evalId) params.set('evalId', request.evalId);
|
|
43
|
-
if (request.sessionId) params.set('sessionId', request.sessionId);
|
|
44
|
-
|
|
45
|
-
const queryString = params.toString();
|
|
46
|
-
const url = `/cli/eval-run${queryString ? `?${queryString}` : ''}`;
|
|
47
|
-
|
|
48
|
-
const resp = await client.request<z.infer<typeof EvalRunListResponseSchema>>(
|
|
49
|
-
'GET',
|
|
50
|
-
url,
|
|
51
|
-
EvalRunListResponseSchema
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
if (resp.success) {
|
|
55
|
-
return resp.data;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
throw new Error(resp.message || 'Failed to list eval runs');
|
|
59
|
-
}
|
package/src/api/machine/index.ts
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { APIResponseSchema, APIResponseSchemaNoData, APIClient } from '../api.ts';
|
|
3
|
-
import { MachineResponseError } from './util.ts';
|
|
4
|
-
|
|
5
|
-
// TODO: The old /cli/auth/machine/* endpoints should be aliased to redirect
|
|
6
|
-
// to /cli/auth/org/* in the backend (app repo). Remove aliases in follow-up PR.
|
|
7
|
-
|
|
8
|
-
export const MachineSchema = z.object({
|
|
9
|
-
id: z.string(),
|
|
10
|
-
instanceId: z.string().nullable().optional(),
|
|
11
|
-
privateIPv4: z.string().nullable().optional(),
|
|
12
|
-
availabilityZone: z.string().nullable().optional(),
|
|
13
|
-
instanceType: z.string().nullable().optional(),
|
|
14
|
-
instanceTags: z.array(z.string()).nullable().optional(),
|
|
15
|
-
deploymentCount: z.number().optional(),
|
|
16
|
-
status: z.string(),
|
|
17
|
-
provider: z.string(),
|
|
18
|
-
region: z.string(),
|
|
19
|
-
startedAt: z.string().nullable().optional(),
|
|
20
|
-
stoppedAt: z.string().nullable().optional(),
|
|
21
|
-
pausedAt: z.string().nullable().optional(),
|
|
22
|
-
erroredAt: z.string().nullable().optional(),
|
|
23
|
-
error: z.string().nullable().optional(),
|
|
24
|
-
orgId: z.string().nullable().optional(),
|
|
25
|
-
orgName: z.string().nullable().optional(),
|
|
26
|
-
createdAt: z.string(),
|
|
27
|
-
updatedAt: z.string().nullable().optional(),
|
|
28
|
-
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export const MachineListResponseSchema = APIResponseSchema(z.array(MachineSchema));
|
|
32
|
-
export const MachineGetResponseSchema = APIResponseSchema(MachineSchema);
|
|
33
|
-
export const MachineDeleteResponseSchema = APIResponseSchemaNoData();
|
|
34
|
-
|
|
35
|
-
export type Machine = z.infer<typeof MachineSchema>;
|
|
36
|
-
|
|
37
|
-
export async function machineList(
|
|
38
|
-
client: APIClient,
|
|
39
|
-
options?: { orgId?: string }
|
|
40
|
-
): Promise<Machine[]> {
|
|
41
|
-
const headers = options?.orgId ? { 'x-agentuity-orgid': options.orgId } : undefined;
|
|
42
|
-
const resp = await client.get('/machine', MachineListResponseSchema, undefined, headers);
|
|
43
|
-
if (resp.success) {
|
|
44
|
-
return resp.data;
|
|
45
|
-
}
|
|
46
|
-
throw new MachineResponseError({ message: resp.message });
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export async function machineGet(client: APIClient, machineId: string): Promise<Machine> {
|
|
50
|
-
const resp = await client.get(`/machine/${machineId}`, MachineGetResponseSchema);
|
|
51
|
-
if (resp.success) {
|
|
52
|
-
return resp.data;
|
|
53
|
-
}
|
|
54
|
-
throw new MachineResponseError({ message: resp.message });
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export async function machineDelete(client: APIClient, machineId: string): Promise<void> {
|
|
58
|
-
const resp = await client.delete(`/machine/${machineId}`, MachineDeleteResponseSchema);
|
|
59
|
-
if (!resp.success) {
|
|
60
|
-
throw new MachineResponseError({ message: resp.message });
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export const MachineDeploymentProjectSchema = z.object({
|
|
65
|
-
id: z.string(),
|
|
66
|
-
name: z.string(),
|
|
67
|
-
identifier: z.string(),
|
|
68
|
-
domains: z.array(z.string()),
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
export type MachineDeploymentProject = z.infer<typeof MachineDeploymentProjectSchema>;
|
|
72
|
-
|
|
73
|
-
export const MachineDeploymentResourcesSchema = z.object({
|
|
74
|
-
cpuUnits: z.number(),
|
|
75
|
-
memoryUnits: z.number(),
|
|
76
|
-
diskUnits: z.number(),
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
export type MachineDeploymentResources = z.infer<typeof MachineDeploymentResourcesSchema>;
|
|
80
|
-
|
|
81
|
-
export const MachineDeploymentSchema = z.object({
|
|
82
|
-
id: z.string(),
|
|
83
|
-
identifier: z.string().optional(),
|
|
84
|
-
state: z.string().optional(),
|
|
85
|
-
project: MachineDeploymentProjectSchema.nullable().optional(),
|
|
86
|
-
resources: MachineDeploymentResourcesSchema.nullable().optional(),
|
|
87
|
-
customDomains: z.array(z.string()),
|
|
88
|
-
paused: z.boolean(),
|
|
89
|
-
pausedDuration: z.number(),
|
|
90
|
-
domainSuffix: z.string(),
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
export const MachineDeploymentsResponseSchema = APIResponseSchema(z.array(MachineDeploymentSchema));
|
|
94
|
-
|
|
95
|
-
export type MachineDeployment = z.infer<typeof MachineDeploymentSchema>;
|
|
96
|
-
|
|
97
|
-
export async function machineDeployments(
|
|
98
|
-
client: APIClient,
|
|
99
|
-
machineId: string
|
|
100
|
-
): Promise<MachineDeployment[]> {
|
|
101
|
-
const resp = await client.get(
|
|
102
|
-
`/machine/deployments/${machineId}`,
|
|
103
|
-
MachineDeploymentsResponseSchema
|
|
104
|
-
);
|
|
105
|
-
if (resp.success) {
|
|
106
|
-
return resp.data;
|
|
107
|
-
}
|
|
108
|
-
throw new MachineResponseError({ message: resp.message });
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export const OrgAuthEnrollResponseSchema = APIResponseSchema(
|
|
112
|
-
z.object({
|
|
113
|
-
orgId: z.string(),
|
|
114
|
-
})
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
export async function orgAuthEnroll(
|
|
118
|
-
client: APIClient,
|
|
119
|
-
orgId: string,
|
|
120
|
-
publicKey: string
|
|
121
|
-
): Promise<{ orgId: string }> {
|
|
122
|
-
const resp = await client.post(
|
|
123
|
-
'/cli/auth/org/enroll',
|
|
124
|
-
{ orgId, publicKey },
|
|
125
|
-
OrgAuthEnrollResponseSchema
|
|
126
|
-
);
|
|
127
|
-
if (resp.success) {
|
|
128
|
-
return resp.data;
|
|
129
|
-
}
|
|
130
|
-
throw new MachineResponseError({ message: resp.message });
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export const OrgAuthStatusResponseSchema = APIResponseSchema(
|
|
134
|
-
z.object({
|
|
135
|
-
publicKey: z.string().nullable(),
|
|
136
|
-
})
|
|
137
|
-
);
|
|
138
|
-
|
|
139
|
-
export async function orgAuthStatus(
|
|
140
|
-
client: APIClient,
|
|
141
|
-
orgId: string
|
|
142
|
-
): Promise<{ publicKey: string | null }> {
|
|
143
|
-
const resp = await client.get(`/cli/auth/org/status/${orgId}`, OrgAuthStatusResponseSchema);
|
|
144
|
-
if (resp.success) {
|
|
145
|
-
return resp.data;
|
|
146
|
-
}
|
|
147
|
-
throw new MachineResponseError({ message: resp.message });
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export const OrgAuthUnenrollResponseSchema = APIResponseSchemaNoData();
|
|
151
|
-
|
|
152
|
-
export async function orgAuthUnenroll(client: APIClient, orgId: string): Promise<void> {
|
|
153
|
-
const resp = await client.delete(
|
|
154
|
-
`/cli/auth/org/unenroll/${orgId}`,
|
|
155
|
-
OrgAuthUnenrollResponseSchema
|
|
156
|
-
);
|
|
157
|
-
if (!resp.success) {
|
|
158
|
-
throw new MachineResponseError({ message: resp.message });
|
|
159
|
-
}
|
|
160
|
-
}
|
package/src/api/machine/util.ts
DELETED