@agentuity/core 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 +226 -0
- package/dist/api/api.d.ts.map +1 -0
- package/dist/api/api.js +635 -0
- package/dist/api/api.js.map +1 -0
- package/dist/api/apikey/create.d.ts +33 -0
- package/dist/api/apikey/create.d.ts.map +1 -0
- package/dist/api/apikey/create.js +23 -0
- package/dist/api/apikey/create.js.map +1 -0
- package/dist/api/apikey/delete.d.ts +19 -0
- package/dist/api/apikey/delete.d.ts.map +1 -0
- package/dist/api/apikey/delete.js +19 -0
- package/dist/api/apikey/delete.js.map +1 -0
- package/dist/api/apikey/get.d.ts +45 -0
- package/dist/api/apikey/get.d.ts.map +1 -0
- package/dist/api/apikey/get.js +36 -0
- package/dist/api/apikey/get.js.map +1 -0
- package/dist/api/apikey/index.d.ts +6 -0
- package/dist/api/apikey/index.d.ts.map +1 -0
- package/dist/api/apikey/index.js +6 -0
- package/dist/api/apikey/index.js.map +1 -0
- package/dist/api/apikey/list.d.ts +64 -0
- package/dist/api/apikey/list.d.ts.map +1 -0
- package/dist/api/apikey/list.js +46 -0
- package/dist/api/apikey/list.js.map +1 -0
- package/dist/api/apikey/util.d.ts +23 -0
- package/dist/api/apikey/util.d.ts.map +1 -0
- package/dist/api/apikey/util.js +3 -0
- package/dist/api/apikey/util.js.map +1 -0
- package/dist/api/config.d.ts +20 -0
- package/dist/api/config.d.ts.map +1 -0
- package/dist/api/config.js +43 -0
- package/dist/api/config.js.map +1 -0
- package/dist/api/db/index.d.ts +5 -0
- package/dist/api/db/index.d.ts.map +1 -0
- package/dist/api/db/index.js +5 -0
- package/dist/api/db/index.js.map +1 -0
- package/dist/api/db/logs.d.ts +70 -0
- package/dist/api/db/logs.d.ts.map +1 -0
- package/dist/api/db/logs.js +59 -0
- package/dist/api/db/logs.js.map +1 -0
- package/dist/api/db/query.d.ts +39 -0
- package/dist/api/db/query.d.ts.map +1 -0
- package/dist/api/db/query.js +49 -0
- package/dist/api/db/query.js.map +1 -0
- package/dist/api/db/tables.d.ts +49 -0
- package/dist/api/db/tables.d.ts.map +1 -0
- package/dist/api/db/tables.js +59 -0
- package/dist/api/db/tables.js.map +1 -0
- package/dist/api/db/util.d.ts +31 -0
- package/dist/api/db/util.d.ts.map +1 -0
- package/dist/api/db/util.js +4 -0
- package/dist/api/db/util.js.map +1 -0
- package/dist/api/env.d.ts +5 -0
- package/dist/api/env.d.ts.map +1 -0
- package/dist/api/env.js +10 -0
- package/dist/api/env.js.map +1 -0
- package/dist/api/eval/get.d.ts +36 -0
- package/dist/api/eval/get.d.ts.map +1 -0
- package/dist/api/eval/get.js +23 -0
- package/dist/api/eval/get.js.map +1 -0
- package/dist/api/eval/index.d.ts +5 -0
- package/dist/api/eval/index.d.ts.map +1 -0
- package/dist/api/eval/index.js +5 -0
- package/dist/api/eval/index.js.map +1 -0
- package/dist/api/eval/list.d.ts +50 -0
- package/dist/api/eval/list.d.ts.map +1 -0
- package/dist/api/eval/list.js +32 -0
- package/dist/api/eval/list.js.map +1 -0
- package/dist/api/eval/run-get.d.ts +48 -0
- package/dist/api/eval/run-get.d.ts.map +1 -0
- package/dist/api/eval/run-get.js +29 -0
- package/dist/api/eval/run-get.js.map +1 -0
- package/dist/api/eval/run-list.d.ts +70 -0
- package/dist/api/eval/run-list.d.ts.map +1 -0
- package/dist/api/eval/run-list.js +42 -0
- package/dist/api/eval/run-list.js.map +1 -0
- package/dist/api/index.d.ts +21 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +21 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/logger.d.ts +7 -0
- package/dist/api/logger.d.ts.map +1 -0
- package/dist/api/logger.js +23 -0
- package/dist/api/logger.js.map +1 -0
- package/dist/api/machine/index.d.ts +3 -0
- package/dist/api/machine/index.d.ts.map +1 -0
- package/dist/api/machine/index.js +3 -0
- package/dist/api/machine/index.js.map +1 -0
- package/dist/api/machine/machine.d.ts +192 -0
- package/dist/api/machine/machine.d.ts.map +1 -0
- package/dist/api/machine/machine.js +109 -0
- package/dist/api/machine/machine.js.map +1 -0
- package/dist/api/machine/util.d.ts +14 -0
- package/dist/api/machine/util.d.ts.map +1 -0
- package/dist/api/machine/util.js +3 -0
- package/dist/api/machine/util.js.map +1 -0
- package/dist/api/org/env-delete.d.ts +23 -0
- package/dist/api/org/env-delete.d.ts.map +1 -0
- package/dist/api/org/env-delete.js +25 -0
- package/dist/api/org/env-delete.js.map +1 -0
- package/dist/api/org/env-get.d.ts +33 -0
- package/dist/api/org/env-get.d.ts.map +1 -0
- package/dist/api/org/env-get.js +26 -0
- package/dist/api/org/env-get.js.map +1 -0
- package/dist/api/org/env-update.d.ts +24 -0
- package/dist/api/org/env-update.d.ts.map +1 -0
- package/dist/api/org/env-update.js +26 -0
- package/dist/api/org/env-update.js.map +1 -0
- package/dist/api/org/index.d.ts +7 -0
- package/dist/api/org/index.d.ts.map +1 -0
- package/dist/api/org/index.js +7 -0
- package/dist/api/org/index.js.map +1 -0
- package/dist/api/org/list.d.ts +27 -0
- package/dist/api/org/list.d.ts.map +1 -0
- package/dist/api/org/list.js +22 -0
- package/dist/api/org/list.js.map +1 -0
- package/dist/api/org/resources.d.ts +141 -0
- package/dist/api/org/resources.d.ts.map +1 -0
- package/dist/api/org/resources.js +97 -0
- package/dist/api/org/resources.js.map +1 -0
- package/dist/api/org/util.d.ts +45 -0
- package/dist/api/org/util.d.ts.map +1 -0
- package/dist/api/org/util.js +4 -0
- package/dist/api/org/util.js.map +1 -0
- package/dist/api/project/agent.d.ts +89 -0
- package/dist/api/project/agent.d.ts.map +1 -0
- package/dist/api/project/agent.js +60 -0
- package/dist/api/project/agent.js.map +1 -0
- package/dist/api/project/create.d.ts +37 -0
- package/dist/api/project/create.d.ts.map +1 -0
- package/dist/api/project/create.js +31 -0
- package/dist/api/project/create.js.map +1 -0
- package/dist/api/project/delete.d.ts +15 -0
- package/dist/api/project/delete.d.ts.map +1 -0
- package/dist/api/project/delete.js +13 -0
- package/dist/api/project/delete.js.map +1 -0
- package/dist/api/project/deploy.d.ts +490 -0
- package/dist/api/project/deploy.d.ts.map +1 -0
- package/dist/api/project/deploy.js +313 -0
- package/dist/api/project/deploy.js.map +1 -0
- package/dist/api/project/deployment.d.ts +237 -0
- package/dist/api/project/deployment.d.ts.map +1 -0
- package/dist/api/project/deployment.js +127 -0
- package/dist/api/project/deployment.js.map +1 -0
- package/dist/api/project/env-delete.d.ts +22 -0
- package/dist/api/project/env-delete.d.ts.map +1 -0
- package/dist/api/project/env-delete.js +29 -0
- package/dist/api/project/env-delete.js.map +1 -0
- package/dist/api/project/env-update.d.ts +31 -0
- package/dist/api/project/env-update.d.ts.map +1 -0
- package/dist/api/project/env-update.js +36 -0
- package/dist/api/project/env-update.js.map +1 -0
- package/dist/api/project/exists.d.ts +25 -0
- package/dist/api/project/exists.d.ts.map +1 -0
- package/dist/api/project/exists.js +45 -0
- package/dist/api/project/exists.js.map +1 -0
- package/dist/api/project/get.d.ts +43 -0
- package/dist/api/project/get.d.ts.map +1 -0
- package/dist/api/project/get.js +36 -0
- package/dist/api/project/get.js.map +1 -0
- package/dist/api/project/hostname.d.ts +25 -0
- package/dist/api/project/hostname.d.ts.map +1 -0
- package/dist/api/project/hostname.js +37 -0
- package/dist/api/project/hostname.js.map +1 -0
- package/dist/api/project/index.d.ts +14 -0
- package/dist/api/project/index.d.ts.map +1 -0
- package/dist/api/project/index.js +14 -0
- package/dist/api/project/index.js.map +1 -0
- package/dist/api/project/list.d.ts +48 -0
- package/dist/api/project/list.d.ts.map +1 -0
- package/dist/api/project/list.js +38 -0
- package/dist/api/project/list.js.map +1 -0
- package/dist/api/project/malware.d.ts +71 -0
- package/dist/api/project/malware.d.ts.map +1 -0
- package/dist/api/project/malware.js +42 -0
- package/dist/api/project/malware.js.map +1 -0
- package/dist/api/project/update-region.d.ts +27 -0
- package/dist/api/project/update-region.d.ts.map +1 -0
- package/dist/api/project/update-region.js +25 -0
- package/dist/api/project/update-region.js.map +1 -0
- package/dist/api/project/util.d.ts +62 -0
- package/dist/api/project/util.d.ts.map +1 -0
- package/dist/api/project/util.js +6 -0
- package/dist/api/project/util.js.map +1 -0
- package/dist/api/queue/analytics.d.ts +250 -0
- package/dist/api/queue/analytics.d.ts.map +1 -0
- package/dist/api/queue/analytics.js +233 -0
- package/dist/api/queue/analytics.js.map +1 -0
- package/dist/api/queue/destinations.d.ts +202 -0
- package/dist/api/queue/destinations.d.ts.map +1 -0
- package/dist/api/queue/destinations.js +168 -0
- package/dist/api/queue/destinations.js.map +1 -0
- package/dist/api/queue/dlq.d.ts +168 -0
- package/dist/api/queue/dlq.d.ts.map +1 -0
- package/dist/api/queue/dlq.js +166 -0
- package/dist/api/queue/dlq.js.map +1 -0
- package/dist/api/queue/index.d.ts +56 -0
- package/dist/api/queue/index.d.ts.map +1 -0
- package/dist/api/queue/index.js +90 -0
- package/dist/api/queue/index.js.map +1 -0
- package/dist/api/queue/messages.d.ts +503 -0
- package/dist/api/queue/messages.d.ts.map +1 -0
- package/dist/api/queue/messages.js +549 -0
- package/dist/api/queue/messages.js.map +1 -0
- package/dist/api/queue/queues.d.ts +226 -0
- package/dist/api/queue/queues.d.ts.map +1 -0
- package/dist/api/queue/queues.js +321 -0
- package/dist/api/queue/queues.js.map +1 -0
- package/dist/api/queue/sources.d.ts +202 -0
- package/dist/api/queue/sources.d.ts.map +1 -0
- package/dist/api/queue/sources.js +202 -0
- package/dist/api/queue/sources.js.map +1 -0
- package/dist/api/queue/types.d.ts +1218 -0
- package/dist/api/queue/types.d.ts.map +1 -0
- package/dist/api/queue/types.js +1002 -0
- package/dist/api/queue/types.js.map +1 -0
- package/dist/api/queue/util.d.ts +278 -0
- package/dist/api/queue/util.d.ts.map +1 -0
- package/dist/api/queue/util.js +233 -0
- package/dist/api/queue/util.js.map +1 -0
- package/dist/api/queue/validation.d.ts +247 -0
- package/dist/api/queue/validation.d.ts.map +1 -0
- package/dist/api/queue/validation.js +513 -0
- package/dist/api/queue/validation.js.map +1 -0
- package/dist/api/queue/websocket.d.ts +172 -0
- package/dist/api/queue/websocket.d.ts.map +1 -0
- package/dist/api/queue/websocket.js +396 -0
- package/dist/api/queue/websocket.js.map +1 -0
- package/dist/api/region/create.d.ts +81 -0
- package/dist/api/region/create.d.ts.map +1 -0
- package/dist/api/region/create.js +177 -0
- package/dist/api/region/create.js.map +1 -0
- package/dist/api/region/delete.d.ts +62 -0
- package/dist/api/region/delete.d.ts.map +1 -0
- package/dist/api/region/delete.js +37 -0
- package/dist/api/region/delete.js.map +1 -0
- package/dist/api/region/index.d.ts +5 -0
- package/dist/api/region/index.d.ts.map +1 -0
- package/dist/api/region/index.js +5 -0
- package/dist/api/region/index.js.map +1 -0
- package/dist/api/region/list.d.ts +27 -0
- package/dist/api/region/list.d.ts.map +1 -0
- package/dist/api/region/list.js +22 -0
- package/dist/api/region/list.js.map +1 -0
- package/dist/api/region/resources.d.ts +71 -0
- package/dist/api/region/resources.d.ts.map +1 -0
- package/dist/api/region/resources.js +53 -0
- package/dist/api/region/resources.js.map +1 -0
- package/dist/api/region/util.d.ts +23 -0
- package/dist/api/region/util.d.ts.map +1 -0
- package/dist/api/region/util.js +3 -0
- package/dist/api/region/util.js.map +1 -0
- package/dist/api/sandbox/cli-list.d.ts +114 -0
- package/dist/api/sandbox/cli-list.d.ts.map +1 -0
- package/dist/api/sandbox/cli-list.js +71 -0
- package/dist/api/sandbox/cli-list.js.map +1 -0
- package/dist/api/sandbox/client.d.ts +192 -0
- package/dist/api/sandbox/client.d.ts.map +1 -0
- package/dist/api/sandbox/client.js +262 -0
- package/dist/api/sandbox/client.js.map +1 -0
- package/dist/api/sandbox/create.d.ts +118 -0
- package/dist/api/sandbox/create.d.ts.map +1 -0
- package/dist/api/sandbox/create.js +211 -0
- package/dist/api/sandbox/create.js.map +1 -0
- package/dist/api/sandbox/destroy.d.ts +22 -0
- package/dist/api/sandbox/destroy.d.ts.map +1 -0
- package/dist/api/sandbox/destroy.js +25 -0
- package/dist/api/sandbox/destroy.js.map +1 -0
- package/dist/api/sandbox/disk-checkpoint.d.ts +104 -0
- package/dist/api/sandbox/disk-checkpoint.d.ts.map +1 -0
- package/dist/api/sandbox/disk-checkpoint.js +104 -0
- package/dist/api/sandbox/disk-checkpoint.js.map +1 -0
- package/dist/api/sandbox/execute.d.ts +69 -0
- package/dist/api/sandbox/execute.d.ts.map +1 -0
- package/dist/api/sandbox/execute.js +103 -0
- package/dist/api/sandbox/execute.js.map +1 -0
- package/dist/api/sandbox/execution.d.ts +169 -0
- package/dist/api/sandbox/execution.d.ts.map +1 -0
- package/dist/api/sandbox/execution.js +118 -0
- package/dist/api/sandbox/execution.js.map +1 -0
- package/dist/api/sandbox/files.d.ts +261 -0
- package/dist/api/sandbox/files.d.ts.map +1 -0
- package/dist/api/sandbox/files.js +386 -0
- package/dist/api/sandbox/files.js.map +1 -0
- package/dist/api/sandbox/get.d.ts +283 -0
- package/dist/api/sandbox/get.d.ts.map +1 -0
- package/dist/api/sandbox/get.js +215 -0
- package/dist/api/sandbox/get.js.map +1 -0
- package/dist/api/sandbox/getStatus.d.ts +16 -0
- package/dist/api/sandbox/getStatus.d.ts.map +1 -0
- package/dist/api/sandbox/getStatus.js +32 -0
- package/dist/api/sandbox/getStatus.js.map +1 -0
- package/dist/api/sandbox/index.d.ts +39 -0
- package/dist/api/sandbox/index.d.ts.map +1 -0
- package/dist/api/sandbox/index.js +20 -0
- package/dist/api/sandbox/index.js.map +1 -0
- package/dist/api/sandbox/list.d.ts +293 -0
- package/dist/api/sandbox/list.d.ts.map +1 -0
- package/dist/api/sandbox/list.js +191 -0
- package/dist/api/sandbox/list.js.map +1 -0
- package/dist/api/sandbox/pause.d.ts +22 -0
- package/dist/api/sandbox/pause.d.ts.map +1 -0
- package/dist/api/sandbox/pause.js +25 -0
- package/dist/api/sandbox/pause.js.map +1 -0
- package/dist/api/sandbox/resolve.d.ts +82 -0
- package/dist/api/sandbox/resolve.d.ts.map +1 -0
- package/dist/api/sandbox/resolve.js +71 -0
- package/dist/api/sandbox/resolve.js.map +1 -0
- package/dist/api/sandbox/resume.d.ts +22 -0
- package/dist/api/sandbox/resume.d.ts.map +1 -0
- package/dist/api/sandbox/resume.js +25 -0
- package/dist/api/sandbox/resume.js.map +1 -0
- package/dist/api/sandbox/run.d.ts +28 -0
- package/dist/api/sandbox/run.d.ts.map +1 -0
- package/dist/api/sandbox/run.js +342 -0
- package/dist/api/sandbox/run.js.map +1 -0
- package/dist/api/sandbox/runtime.d.ts +83 -0
- package/dist/api/sandbox/runtime.d.ts.map +1 -0
- package/dist/api/sandbox/runtime.js +78 -0
- package/dist/api/sandbox/runtime.js.map +1 -0
- package/dist/api/sandbox/snapshot-build.d.ts +48 -0
- package/dist/api/sandbox/snapshot-build.d.ts.map +1 -0
- package/dist/api/sandbox/snapshot-build.js +72 -0
- package/dist/api/sandbox/snapshot-build.js.map +1 -0
- package/dist/api/sandbox/snapshot.d.ts +595 -0
- package/dist/api/sandbox/snapshot.d.ts.map +1 -0
- package/dist/api/sandbox/snapshot.js +598 -0
- package/dist/api/sandbox/snapshot.js.map +1 -0
- package/dist/api/sandbox/util.d.ts +284 -0
- package/dist/api/sandbox/util.d.ts.map +1 -0
- package/dist/api/sandbox/util.js +210 -0
- package/dist/api/sandbox/util.js.map +1 -0
- package/dist/api/services/index.d.ts +2 -0
- package/dist/api/services/index.d.ts.map +1 -0
- package/dist/api/services/index.js +2 -0
- package/dist/api/services/index.js.map +1 -0
- package/dist/api/services/stats.d.ts +263 -0
- package/dist/api/services/stats.d.ts.map +1 -0
- package/dist/api/services/stats.js +144 -0
- package/dist/api/services/stats.js.map +1 -0
- package/dist/api/session/get.d.ts +169 -0
- package/dist/api/session/get.d.ts.map +1 -0
- package/dist/api/session/get.js +56 -0
- package/dist/api/session/get.js.map +1 -0
- package/dist/api/session/index.d.ts +4 -0
- package/dist/api/session/index.d.ts.map +1 -0
- package/dist/api/session/index.js +4 -0
- package/dist/api/session/index.js.map +1 -0
- package/dist/api/session/list.d.ts +143 -0
- package/dist/api/session/list.d.ts.map +1 -0
- package/dist/api/session/list.js +91 -0
- package/dist/api/session/list.js.map +1 -0
- package/dist/api/session/logs.d.ts +40 -0
- package/dist/api/session/logs.d.ts.map +1 -0
- package/dist/api/session/logs.js +28 -0
- package/dist/api/session/logs.js.map +1 -0
- package/dist/api/session/util.d.ts +23 -0
- package/dist/api/session/util.d.ts.map +1 -0
- package/dist/api/session/util.js +3 -0
- package/dist/api/session/util.js.map +1 -0
- package/dist/api/storage/config.d.ts +99 -0
- package/dist/api/storage/config.d.ts.map +1 -0
- package/dist/api/storage/config.js +61 -0
- package/dist/api/storage/config.js.map +1 -0
- package/dist/api/storage/index.d.ts +5 -0
- package/dist/api/storage/index.d.ts.map +1 -0
- package/dist/api/storage/index.js +5 -0
- package/dist/api/storage/index.js.map +1 -0
- package/dist/api/storage/objects.d.ts +155 -0
- package/dist/api/storage/objects.d.ts.map +1 -0
- package/dist/api/storage/objects.js +148 -0
- package/dist/api/storage/objects.js.map +1 -0
- package/dist/api/storage/types.d.ts +161 -0
- package/dist/api/storage/types.d.ts.map +1 -0
- package/dist/api/storage/types.js +141 -0
- package/dist/api/storage/types.js.map +1 -0
- package/dist/api/storage/util.d.ts +45 -0
- package/dist/api/storage/util.d.ts.map +1 -0
- package/dist/api/storage/util.js +4 -0
- package/dist/api/storage/util.js.map +1 -0
- package/dist/api/stream/get.d.ts +58 -0
- package/dist/api/stream/get.d.ts.map +1 -0
- package/dist/api/stream/get.js +40 -0
- package/dist/api/stream/get.js.map +1 -0
- package/dist/api/stream/index.d.ts +4 -0
- package/dist/api/stream/index.d.ts.map +1 -0
- package/dist/api/stream/index.js +4 -0
- package/dist/api/stream/index.js.map +1 -0
- package/dist/api/stream/list.d.ts +120 -0
- package/dist/api/stream/list.d.ts.map +1 -0
- package/dist/api/stream/list.js +77 -0
- package/dist/api/stream/list.js.map +1 -0
- package/dist/api/stream/util.d.ts +23 -0
- package/dist/api/stream/util.d.ts.map +1 -0
- package/dist/api/stream/util.js +3 -0
- package/dist/api/stream/util.js.map +1 -0
- package/dist/api/thread/delete.d.ts +23 -0
- package/dist/api/thread/delete.d.ts.map +1 -0
- package/dist/api/thread/delete.js +21 -0
- package/dist/api/thread/delete.js.map +1 -0
- package/dist/api/thread/get.d.ts +36 -0
- package/dist/api/thread/get.d.ts.map +1 -0
- package/dist/api/thread/get.js +23 -0
- package/dist/api/thread/get.js.map +1 -0
- package/dist/api/thread/index.d.ts +5 -0
- package/dist/api/thread/index.d.ts.map +1 -0
- package/dist/api/thread/index.js +5 -0
- package/dist/api/thread/index.js.map +1 -0
- package/dist/api/thread/list.d.ts +69 -0
- package/dist/api/thread/list.d.ts.map +1 -0
- package/dist/api/thread/list.js +51 -0
- package/dist/api/thread/list.js.map +1 -0
- package/dist/api/thread/util.d.ts +23 -0
- package/dist/api/thread/util.d.ts.map +1 -0
- package/dist/api/thread/util.js +3 -0
- package/dist/api/thread/util.js.map +1 -0
- package/dist/api/user/index.d.ts +2 -0
- package/dist/api/user/index.d.ts.map +1 -0
- package/dist/api/user/index.js +2 -0
- package/dist/api/user/index.js.map +1 -0
- package/dist/api/user/util.d.ts +23 -0
- package/dist/api/user/util.d.ts.map +1 -0
- package/dist/api/user/util.js +3 -0
- package/dist/api/user/util.js.map +1 -0
- package/dist/api/user/whoami.d.ts +39 -0
- package/dist/api/user/whoami.d.ts.map +1 -0
- package/dist/api/user/whoami.js +27 -0
- package/dist/api/user/whoami.js.map +1 -0
- package/dist/api/webhook/deliveries.d.ts +94 -0
- package/dist/api/webhook/deliveries.d.ts.map +1 -0
- package/dist/api/webhook/deliveries.js +79 -0
- package/dist/api/webhook/deliveries.js.map +1 -0
- package/dist/api/webhook/destinations.d.ts +136 -0
- package/dist/api/webhook/destinations.d.ts.map +1 -0
- package/dist/api/webhook/destinations.js +137 -0
- package/dist/api/webhook/destinations.js.map +1 -0
- package/dist/api/webhook/index.d.ts +41 -0
- package/dist/api/webhook/index.d.ts.map +1 -0
- package/dist/api/webhook/index.js +59 -0
- package/dist/api/webhook/index.js.map +1 -0
- package/dist/api/webhook/receipts.d.ts +77 -0
- package/dist/api/webhook/receipts.d.ts.map +1 -0
- package/dist/api/webhook/receipts.js +78 -0
- package/dist/api/webhook/receipts.js.map +1 -0
- package/dist/api/webhook/types.d.ts +249 -0
- package/dist/api/webhook/types.d.ts.map +1 -0
- package/dist/api/webhook/types.js +221 -0
- package/dist/api/webhook/types.js.map +1 -0
- package/dist/api/webhook/util.d.ts +202 -0
- package/dist/api/webhook/util.d.ts.map +1 -0
- package/dist/api/webhook/util.js +199 -0
- package/dist/api/webhook/util.js.map +1 -0
- package/dist/api/webhook/webhooks.d.ts +146 -0
- package/dist/api/webhook/webhooks.d.ts.map +1 -0
- package/dist/api/webhook/webhooks.js +165 -0
- package/dist/api/webhook/webhooks.js.map +1 -0
- package/dist/env-example.d.ts +11 -0
- package/dist/env-example.d.ts.map +1 -0
- package/dist/env-example.js +70 -0
- package/dist/env-example.js.map +1 -0
- package/dist/index.d.ts +20 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -12
- package/dist/index.js.map +1 -1
- package/dist/services/email.d.ts.map +1 -1
- package/dist/services/email.js +15 -15
- package/dist/services/email.js.map +1 -1
- package/dist/services/keyvalue.d.ts.map +1 -1
- package/dist/services/keyvalue.js +10 -10
- package/dist/services/keyvalue.js.map +1 -1
- package/dist/services/queue.d.ts.map +1 -1
- package/dist/services/queue.js +3 -3
- package/dist/services/queue.js.map +1 -1
- package/dist/services/schedule.d.ts.map +1 -1
- package/dist/services/schedule.js +8 -10
- package/dist/services/schedule.js.map +1 -1
- package/dist/services/stream.d.ts +2 -2
- package/dist/services/stream.d.ts.map +1 -1
- package/dist/services/stream.js +2 -2
- package/dist/services/stream.js.map +1 -1
- package/dist/services/vector.d.ts.map +1 -1
- package/dist/services/vector.js +9 -9
- package/dist/services/vector.js.map +1 -1
- package/dist/services/webhook.d.ts +2 -1
- package/dist/services/webhook.d.ts.map +1 -1
- package/dist/services/webhook.js +12 -14
- package/dist/services/webhook.js.map +1 -1
- package/package.json +2 -2
- package/src/api/api-example.md +164 -0
- package/src/api/api.ts +931 -0
- package/src/api/apikey/create.ts +41 -0
- package/src/api/apikey/delete.ts +30 -0
- package/src/api/apikey/get.ts +48 -0
- package/src/api/apikey/index.ts +5 -0
- package/src/api/apikey/list.ts +64 -0
- package/src/api/apikey/util.ts +3 -0
- package/src/api/config.ts +60 -0
- package/src/api/db/index.ts +27 -0
- package/src/api/db/logs.ts +75 -0
- package/src/api/db/query.ts +67 -0
- package/src/api/db/tables.ts +92 -0
- package/src/api/db/util.ts +9 -0
- package/src/api/env.ts +9 -0
- package/src/api/eval/get.ts +33 -0
- package/src/api/eval/index.ts +28 -0
- package/src/api/eval/list.ts +49 -0
- package/src/api/eval/run-get.ts +39 -0
- package/src/api/eval/run-list.ts +59 -0
- package/src/api/index.ts +20 -0
- package/src/api/logger.ts +24 -0
- package/src/api/machine/index.ts +2 -0
- package/src/api/machine/machine.ts +160 -0
- package/src/api/machine/util.ts +5 -0
- package/src/api/org/env-delete.ts +37 -0
- package/src/api/org/env-get.ts +43 -0
- package/src/api/org/env-update.ts +38 -0
- package/src/api/org/index.ts +6 -0
- package/src/api/org/list.ts +28 -0
- package/src/api/org/resources.ts +140 -0
- package/src/api/org/util.ts +4 -0
- package/src/api/project/agent.ts +86 -0
- package/src/api/project/create.ts +47 -0
- package/src/api/project/delete.ts +25 -0
- package/src/api/project/deploy.ts +458 -0
- package/src/api/project/deployment.ts +195 -0
- package/src/api/project/env-delete.ts +45 -0
- package/src/api/project/env-update.ts +55 -0
- package/src/api/project/exists.ts +58 -0
- package/src/api/project/get.ts +49 -0
- package/src/api/project/hostname.ts +73 -0
- package/src/api/project/index.ts +13 -0
- package/src/api/project/list.ts +54 -0
- package/src/api/project/malware.ts +68 -0
- package/src/api/project/update-region.ts +44 -0
- package/src/api/project/util.ts +8 -0
- package/src/api/queue/analytics.ts +311 -0
- package/src/api/queue/destinations.ts +259 -0
- package/src/api/queue/dlq.ts +243 -0
- package/src/api/queue/index.ts +308 -0
- package/src/api/queue/messages.ts +784 -0
- package/src/api/queue/queues.ts +460 -0
- package/src/api/queue/sources.ts +294 -0
- package/src/api/queue/types.ts +1325 -0
- package/src/api/queue/util.ts +275 -0
- package/src/api/queue/validation.ts +560 -0
- package/src/api/queue/websocket.ts +521 -0
- package/src/api/region/create.ts +207 -0
- package/src/api/region/delete.ts +57 -0
- package/src/api/region/index.ts +4 -0
- package/src/api/region/list.ts +32 -0
- package/src/api/region/resources.ts +69 -0
- package/src/api/region/util.ts +3 -0
- package/src/api/sandbox/cli-list.ts +127 -0
- package/src/api/sandbox/client.ts +460 -0
- package/src/api/sandbox/create.ts +256 -0
- package/src/api/sandbox/destroy.ts +41 -0
- package/src/api/sandbox/disk-checkpoint.ts +179 -0
- package/src/api/sandbox/execute.ts +132 -0
- package/src/api/sandbox/execution.ts +183 -0
- package/src/api/sandbox/files.ts +596 -0
- package/src/api/sandbox/get.ts +249 -0
- package/src/api/sandbox/getStatus.ts +54 -0
- package/src/api/sandbox/index.ts +211 -0
- package/src/api/sandbox/list.ts +224 -0
- package/src/api/sandbox/pause.ts +39 -0
- package/src/api/sandbox/resolve.ts +98 -0
- package/src/api/sandbox/resume.ts +39 -0
- package/src/api/sandbox/run.ts +439 -0
- package/src/api/sandbox/runtime.ts +104 -0
- package/src/api/sandbox/snapshot-build.ts +94 -0
- package/src/api/sandbox/snapshot.ts +781 -0
- package/src/api/sandbox/util.ts +275 -0
- package/src/api/services/index.ts +1 -0
- package/src/api/services/stats.ts +213 -0
- package/src/api/session/get.ts +106 -0
- package/src/api/session/index.ts +3 -0
- package/src/api/session/list.ts +136 -0
- package/src/api/session/logs.ts +47 -0
- package/src/api/session/util.ts +3 -0
- package/src/api/storage/config.ts +111 -0
- package/src/api/storage/index.ts +4 -0
- package/src/api/storage/objects.ts +250 -0
- package/src/api/storage/types.ts +174 -0
- package/src/api/storage/util.ts +4 -0
- package/src/api/stream/get.ts +51 -0
- package/src/api/stream/index.ts +3 -0
- package/src/api/stream/list.ts +127 -0
- package/src/api/stream/util.ts +3 -0
- package/src/api/thread/delete.ts +31 -0
- package/src/api/thread/get.ts +34 -0
- package/src/api/thread/index.ts +4 -0
- package/src/api/thread/list.ts +76 -0
- package/src/api/thread/util.ts +3 -0
- package/src/api/user/index.ts +1 -0
- package/src/api/user/util.ts +3 -0
- package/src/api/user/whoami.ts +32 -0
- package/src/api/webhook/deliveries.ts +129 -0
- package/src/api/webhook/destinations.ts +224 -0
- package/src/api/webhook/index.ts +133 -0
- package/src/api/webhook/receipts.ts +124 -0
- package/src/api/webhook/types.ts +309 -0
- package/src/api/webhook/util.ts +234 -0
- package/src/api/webhook/webhooks.ts +260 -0
- package/src/env-example.ts +90 -0
- package/src/index.ts +209 -206
- package/src/services/email.ts +15 -24
- package/src/services/keyvalue.ts +10 -13
- package/src/services/queue.ts +3 -6
- package/src/services/schedule.ts +8 -19
- package/src/services/stream.ts +4 -4
- package/src/services/vector.ts +9 -12
- package/src/services/webhook.ts +14 -24
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { APIClient } from '../api.ts';
|
|
3
|
+
import { APIResponseSchema } from '../api.ts';
|
|
4
|
+
import { AgentNotFoundError, ProjectResponseError } from './util.ts';
|
|
5
|
+
|
|
6
|
+
export const AgentSchema = z.object({
|
|
7
|
+
id: z.string().describe('Agent ID (same as identifier)'),
|
|
8
|
+
name: z.string().describe('Agent name'),
|
|
9
|
+
description: z.string().nullable().describe('Agent description'),
|
|
10
|
+
identifier: z.string().describe('Agent identifier'),
|
|
11
|
+
deploymentId: z.string().nullable().describe('Deployment ID'),
|
|
12
|
+
devmode: z.boolean().describe('Whether agent is in development mode'),
|
|
13
|
+
metadata: z.record(z.string(), z.unknown()).nullable().describe('Agent metadata'),
|
|
14
|
+
createdAt: z.string().describe('Creation timestamp'),
|
|
15
|
+
updatedAt: z.string().describe('Last update timestamp'),
|
|
16
|
+
evals: z
|
|
17
|
+
.array(
|
|
18
|
+
z.object({
|
|
19
|
+
id: z.string().describe('Evaluation ID'),
|
|
20
|
+
name: z.string().describe('Evaluation name'),
|
|
21
|
+
description: z.string().nullable().describe('Evaluation description'),
|
|
22
|
+
identifier: z.string().nullable().describe('Evaluation identifier'),
|
|
23
|
+
devmode: z.boolean().describe('Whether evaluation is in development mode'),
|
|
24
|
+
createdAt: z.string().describe('Creation timestamp'),
|
|
25
|
+
updatedAt: z.string().describe('Last update timestamp'),
|
|
26
|
+
})
|
|
27
|
+
)
|
|
28
|
+
.describe('Associated evaluations'),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const AgentListResponseSchema = APIResponseSchema(z.array(AgentSchema));
|
|
32
|
+
export const AgentGetResponseSchema = APIResponseSchema(z.array(AgentSchema));
|
|
33
|
+
|
|
34
|
+
export type Agent = z.infer<typeof AgentSchema>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* List agents for a project
|
|
38
|
+
*/
|
|
39
|
+
export async function projectAgentList(
|
|
40
|
+
client: APIClient,
|
|
41
|
+
projectId: string,
|
|
42
|
+
options?: {
|
|
43
|
+
deploymentId?: string;
|
|
44
|
+
orgId?: string;
|
|
45
|
+
}
|
|
46
|
+
): Promise<Agent[]> {
|
|
47
|
+
const queryParams = new URLSearchParams();
|
|
48
|
+
if (options?.deploymentId) {
|
|
49
|
+
queryParams.set('deploymentId', options.deploymentId);
|
|
50
|
+
}
|
|
51
|
+
if (options?.orgId) {
|
|
52
|
+
queryParams.set('orgId', options.orgId);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const url = `/cli/agent/${projectId}${queryParams.toString() ? `?${queryParams.toString()}` : ''}`;
|
|
56
|
+
|
|
57
|
+
const resp = await client.get(url, AgentListResponseSchema);
|
|
58
|
+
|
|
59
|
+
if (resp.success) {
|
|
60
|
+
return resp.data;
|
|
61
|
+
}
|
|
62
|
+
throw new ProjectResponseError({ message: resp.message });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Get a specific agent by identifier
|
|
67
|
+
*/
|
|
68
|
+
export async function projectAgentGet(
|
|
69
|
+
client: APIClient,
|
|
70
|
+
projectId: string,
|
|
71
|
+
agentId: string
|
|
72
|
+
): Promise<Agent> {
|
|
73
|
+
const resp = await client.get(
|
|
74
|
+
`/cli/agent/${projectId}?identifier=${agentId}`,
|
|
75
|
+
AgentGetResponseSchema
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
if (resp.success) {
|
|
79
|
+
const agent = resp.data[0];
|
|
80
|
+
if (resp.data.length === 0 || agent === undefined) {
|
|
81
|
+
throw new AgentNotFoundError({ id: agentId, message: `Agent not found: ${agentId}` });
|
|
82
|
+
}
|
|
83
|
+
return agent;
|
|
84
|
+
}
|
|
85
|
+
throw new ProjectResponseError({ message: resp.message });
|
|
86
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
+
import { ProjectResponseError } from './util.ts';
|
|
4
|
+
|
|
5
|
+
export const CreateProjectRequestSchema = z.object({
|
|
6
|
+
name: z.string().max(255).min(1).describe('the name of the new project'),
|
|
7
|
+
description: z.string().max(255).min(0).optional().describe('the description of the project'),
|
|
8
|
+
tags: z.array(z.string()).optional().describe('tags for the project'),
|
|
9
|
+
orgId: z.string().max(255).min(1).describe('the organization id to create the project in'),
|
|
10
|
+
cloudRegion: z.string().describe('the cloud region to create the project'),
|
|
11
|
+
domains: z.array(z.string()).optional().describe('the custom domains for this project'),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const NewProjectSchema = z.object({
|
|
15
|
+
id: z.string().describe('the unique id for the project'),
|
|
16
|
+
sdkKey: z.string().describe('the SDK key for the project'),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const CreateProjectResponseSchema = APIResponseSchema(NewProjectSchema);
|
|
20
|
+
|
|
21
|
+
export type CreateProjectRequest = z.infer<typeof CreateProjectRequestSchema>;
|
|
22
|
+
export type CreateProjectResponse = z.infer<typeof CreateProjectResponseSchema>;
|
|
23
|
+
export type NewProject = z.infer<typeof NewProjectSchema>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Create a new Project
|
|
27
|
+
*
|
|
28
|
+
* @param client
|
|
29
|
+
* @param body
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
export async function projectCreate(
|
|
33
|
+
client: APIClient,
|
|
34
|
+
body: CreateProjectRequest
|
|
35
|
+
): Promise<NewProject> {
|
|
36
|
+
const resp = await client.request<CreateProjectResponse, CreateProjectRequest>(
|
|
37
|
+
'POST',
|
|
38
|
+
'/cli/project',
|
|
39
|
+
CreateProjectResponseSchema,
|
|
40
|
+
body,
|
|
41
|
+
CreateProjectRequestSchema
|
|
42
|
+
);
|
|
43
|
+
if (resp.success) {
|
|
44
|
+
return resp.data;
|
|
45
|
+
}
|
|
46
|
+
throw new ProjectResponseError({ message: resp.message });
|
|
47
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
+
import { ProjectResponseError } from './util.ts';
|
|
4
|
+
|
|
5
|
+
export const ProjectDeleteRequestSchema = z.object({ ids: z.array(z.string()) });
|
|
6
|
+
export const ProjectDeleteResponseSchema = APIResponseSchema(z.array(z.string()));
|
|
7
|
+
|
|
8
|
+
type ProjectDeleteRequest = z.infer<typeof ProjectDeleteRequestSchema>;
|
|
9
|
+
type ProjectDeleteResponse = z.infer<typeof ProjectDeleteResponseSchema>;
|
|
10
|
+
|
|
11
|
+
export async function projectDelete(client: APIClient, ...ids: string[]): Promise<string[]> {
|
|
12
|
+
const resp = await client.request<ProjectDeleteResponse, ProjectDeleteRequest>(
|
|
13
|
+
'DELETE',
|
|
14
|
+
'/cli/project',
|
|
15
|
+
ProjectDeleteResponseSchema,
|
|
16
|
+
{ ids },
|
|
17
|
+
ProjectDeleteRequestSchema
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
if (resp.success) {
|
|
21
|
+
return resp.data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
throw new ProjectResponseError({ message: resp.message ?? 'failed to delete project' });
|
|
25
|
+
}
|
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
+
import { ProjectResponseError } from './util.ts';
|
|
4
|
+
|
|
5
|
+
export const Resources = z.object({
|
|
6
|
+
memory: z.string().default('500Mi').describe('The memory requirements'),
|
|
7
|
+
cpu: z.string().default('500m').describe('The CPU requirements'),
|
|
8
|
+
disk: z.string().default('500Mi').describe('The disk requirements'),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const Mode = z.object({
|
|
12
|
+
type: z
|
|
13
|
+
.enum(['on-demand', 'provisioned'])
|
|
14
|
+
.default('on-demand')
|
|
15
|
+
.describe('on-demand or provisioned'),
|
|
16
|
+
idle: z.string().optional().describe('duration in seconds if on-demand'),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const ProjectBuildConfig = z.object({
|
|
20
|
+
timeout: z.string().optional().describe('Build execution timeout (e.g. "30m")'),
|
|
21
|
+
resources: z
|
|
22
|
+
.object({
|
|
23
|
+
memory: z.string().optional().describe('Build sandbox memory (e.g. "4Gi")'),
|
|
24
|
+
cpu: z.string().optional().describe('Build sandbox CPU (e.g. "2")'),
|
|
25
|
+
disk: z.string().optional().describe('Build sandbox disk (e.g. "4Gi")'),
|
|
26
|
+
})
|
|
27
|
+
.optional()
|
|
28
|
+
.describe('Build sandbox resource limits'),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const DeploymentConfig = z.object({
|
|
32
|
+
resources: Resources.optional().describe('the resource requirements for your deployed project'),
|
|
33
|
+
mode: Mode.optional().describe('the provisioning mode for the project'),
|
|
34
|
+
dependencies: z
|
|
35
|
+
.array(z.string().describe('APT dependencies to install prior to launching your project'))
|
|
36
|
+
.optional(),
|
|
37
|
+
domains: z.array(z.string().describe('the custom domain')).optional(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const BaseFileFields = {
|
|
41
|
+
filename: z.string().describe('the relative path for the file'),
|
|
42
|
+
version: z.string().describe('the SHA256 content of the file'),
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const BuildEvalSchema = z.object({
|
|
46
|
+
...BaseFileFields,
|
|
47
|
+
id: z.string().describe('the unique calculated id for the eval'),
|
|
48
|
+
identifier: z.string().describe('the unique id for eval for the project across deployments'),
|
|
49
|
+
name: z.string().describe('the name of the eval'),
|
|
50
|
+
description: z.string().optional().describe('the eval description'),
|
|
51
|
+
agentIdentifier: z.string().describe('the identifier of the agent'),
|
|
52
|
+
projectId: z.string().describe('the project id'),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const BaseAgentFields = {
|
|
56
|
+
...BaseFileFields,
|
|
57
|
+
id: z.string().describe('the unique calculated id for the agent'),
|
|
58
|
+
agentId: z.string().describe('the unique id for agent for the project across deployments'),
|
|
59
|
+
projectId: z.string().describe('the project id'),
|
|
60
|
+
name: z.string().describe('the name of the agent'),
|
|
61
|
+
description: z.string().optional().describe('the agent description'),
|
|
62
|
+
evals: z.array(BuildEvalSchema).optional().describe('the evals for the agent'),
|
|
63
|
+
schema: z
|
|
64
|
+
.object({
|
|
65
|
+
input: z.string().optional().describe('JSON schema for input (stringified JSON)'),
|
|
66
|
+
output: z.string().optional().describe('JSON schema for output (stringified JSON)'),
|
|
67
|
+
})
|
|
68
|
+
.optional()
|
|
69
|
+
.describe('input and output JSON schemas for the agent'),
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const BuildAgentSchema = z.object({
|
|
73
|
+
...BaseAgentFields,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export const BuildMetadataSchema = z.object({
|
|
77
|
+
routes: z.array(
|
|
78
|
+
z.object({
|
|
79
|
+
id: z.string().describe('the unique calculated id for the route'),
|
|
80
|
+
filename: z.string().describe('the relative path for the file'),
|
|
81
|
+
path: z.string().describe('the route path'),
|
|
82
|
+
method: z.enum(['get', 'post', 'put', 'delete', 'patch']).describe('the HTTP method'),
|
|
83
|
+
version: z.string().describe('the SHA256 content of the file'),
|
|
84
|
+
type: z.enum(['api', 'sms', 'email', 'cron', 'websocket', 'sse', 'stream']),
|
|
85
|
+
agentIds: z
|
|
86
|
+
.array(z.string())
|
|
87
|
+
.optional()
|
|
88
|
+
.describe('the agent ids associated with this route'),
|
|
89
|
+
config: z
|
|
90
|
+
.record(z.string(), z.unknown())
|
|
91
|
+
.optional()
|
|
92
|
+
.describe('type specific configuration'),
|
|
93
|
+
schema: z
|
|
94
|
+
.object({
|
|
95
|
+
input: z.string().optional().describe('JSON schema for input (stringified JSON)'),
|
|
96
|
+
output: z.string().optional().describe('JSON schema for output (stringified JSON)'),
|
|
97
|
+
})
|
|
98
|
+
.optional()
|
|
99
|
+
.describe('input and output JSON schemas for the route'),
|
|
100
|
+
})
|
|
101
|
+
),
|
|
102
|
+
agents: z.array(BuildAgentSchema),
|
|
103
|
+
assets: z.array(
|
|
104
|
+
z.object({
|
|
105
|
+
filename: z.string().describe('the relative path for the file'),
|
|
106
|
+
kind: z.string().describe('the type of asset'),
|
|
107
|
+
contentType: z.string().describe('the content-type for the file'),
|
|
108
|
+
contentEncoding: z.string().optional().describe('the content-encoding for the file'),
|
|
109
|
+
size: z.number().describe('the size in bytes for the file'),
|
|
110
|
+
})
|
|
111
|
+
),
|
|
112
|
+
project: z.object({
|
|
113
|
+
id: z.string().describe('the project id'),
|
|
114
|
+
name: z.string().describe('the name of the project (from package.json)'),
|
|
115
|
+
version: z.string().optional().describe('the version of the project (from package.json)'),
|
|
116
|
+
description: z
|
|
117
|
+
.string()
|
|
118
|
+
.optional()
|
|
119
|
+
.describe('the description of the project (from package.json)'),
|
|
120
|
+
keywords: z.array(z.string()).optional().describe('the keywords from package.json'),
|
|
121
|
+
orgId: z.string().describe('the organization id for the project'),
|
|
122
|
+
}),
|
|
123
|
+
deployment: z.intersection(
|
|
124
|
+
DeploymentConfig,
|
|
125
|
+
z.object({
|
|
126
|
+
id: z.string().describe('the deployment id'),
|
|
127
|
+
date: z.string().describe('the date the deployment was created in UTC format'),
|
|
128
|
+
git: z
|
|
129
|
+
.object({
|
|
130
|
+
repo: z.string().optional().describe('the repository name'),
|
|
131
|
+
commit: z.string().optional().describe('the git commit sha'),
|
|
132
|
+
message: z.string().optional().describe('the git commit message'),
|
|
133
|
+
branch: z.string().optional().describe('the git branch'),
|
|
134
|
+
tags: z.array(z.string()).optional().describe('the tags for the current branch'),
|
|
135
|
+
pr: z.string().optional().describe('the pull request number'),
|
|
136
|
+
provider: z.string().optional().describe('the CI provider'),
|
|
137
|
+
trigger: z
|
|
138
|
+
.string()
|
|
139
|
+
.default('cli')
|
|
140
|
+
.optional()
|
|
141
|
+
.describe('the trigger that caused the build'),
|
|
142
|
+
url: z
|
|
143
|
+
.string()
|
|
144
|
+
.url()
|
|
145
|
+
.optional()
|
|
146
|
+
.describe('the url to the commit for the CI provider'),
|
|
147
|
+
buildUrl: z
|
|
148
|
+
.string()
|
|
149
|
+
.url()
|
|
150
|
+
.optional()
|
|
151
|
+
.describe('the url to the build for the CI provider'),
|
|
152
|
+
event: z
|
|
153
|
+
.enum(['pull_request', 'push', 'manual', 'workflow'])
|
|
154
|
+
.default('manual')
|
|
155
|
+
.optional()
|
|
156
|
+
.describe(
|
|
157
|
+
'The type of Git-related event that triggered the deployment: pull_request (A pull request or merge request was opened, updated, or merged), push (A commit was pushed directly to a branch), manual (A deployment was triggered manually via CLI or a button), workflow (A deployment was triggered by an automated workflow, such as a CI pipeline)'
|
|
158
|
+
),
|
|
159
|
+
pull_request: z
|
|
160
|
+
.object({
|
|
161
|
+
number: z.number(),
|
|
162
|
+
url: z.string().optional(),
|
|
163
|
+
})
|
|
164
|
+
.optional()
|
|
165
|
+
.describe(
|
|
166
|
+
'This is only present when the deployment was triggered via a pull request.'
|
|
167
|
+
),
|
|
168
|
+
})
|
|
169
|
+
.optional()
|
|
170
|
+
.describe('git commit information'),
|
|
171
|
+
build: z.object({
|
|
172
|
+
bun: z.string().describe('the version of bun that was used to build the deployment'),
|
|
173
|
+
agentuity: z.string().describe('the version of the agentuity runtime'),
|
|
174
|
+
arch: z.string().describe('the machine architecture'),
|
|
175
|
+
platform: z.string().describe('the machine os platform'),
|
|
176
|
+
}),
|
|
177
|
+
})
|
|
178
|
+
),
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
export type BuildMetadata = z.infer<typeof BuildMetadataSchema>;
|
|
182
|
+
|
|
183
|
+
export const CreateProjectDeploymentSchema = z.object({
|
|
184
|
+
id: z.string().describe('the unique id for the deployment'),
|
|
185
|
+
orgId: z.string().describe('the organization id'),
|
|
186
|
+
publicKey: z.string().describe('the public key to use for encrypting the deployment'),
|
|
187
|
+
buildLogsStreamURL: z
|
|
188
|
+
.string()
|
|
189
|
+
.optional()
|
|
190
|
+
.describe('the URL for streaming build logs (PUT to write, GET to read)'),
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
export const CreateProjectDeploymentResponseSchema = APIResponseSchema(
|
|
194
|
+
CreateProjectDeploymentSchema
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
type CreateProjectDeploymentPayload = z.infer<typeof CreateProjectDeploymentResponseSchema>;
|
|
198
|
+
|
|
199
|
+
export type Deployment = z.infer<typeof CreateProjectDeploymentSchema>;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Create a new project deployment
|
|
203
|
+
*
|
|
204
|
+
* @param client
|
|
205
|
+
* @param projectId
|
|
206
|
+
* @returns
|
|
207
|
+
*/
|
|
208
|
+
export async function projectDeploymentCreate(
|
|
209
|
+
client: APIClient,
|
|
210
|
+
projectId: string,
|
|
211
|
+
deploymentConfig?: z.infer<typeof DeploymentConfig>
|
|
212
|
+
): Promise<Deployment> {
|
|
213
|
+
const resp = await client.request<CreateProjectDeploymentPayload>(
|
|
214
|
+
'POST',
|
|
215
|
+
`/cli/deploy/2/start/${projectId}`,
|
|
216
|
+
CreateProjectDeploymentResponseSchema,
|
|
217
|
+
deploymentConfig ?? {}
|
|
218
|
+
);
|
|
219
|
+
if (resp.success) {
|
|
220
|
+
return resp.data;
|
|
221
|
+
}
|
|
222
|
+
throw new ProjectResponseError({ message: resp.message });
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export const DeploymentInstructionsSchema = z.object({
|
|
226
|
+
deployment: z.string().describe('the url for uploading the encrypted deployment archive'),
|
|
227
|
+
assets: z
|
|
228
|
+
.record(
|
|
229
|
+
z.string().describe('the asset id'),
|
|
230
|
+
z.string().describe('the url for the asset upload')
|
|
231
|
+
)
|
|
232
|
+
.describe('the upload metadata for public assets'),
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
export const DeploymentInstructionsResponseSchema = APIResponseSchema(DeploymentInstructionsSchema);
|
|
236
|
+
|
|
237
|
+
type DeploymentInstructionsResponse = z.infer<typeof DeploymentInstructionsResponseSchema>;
|
|
238
|
+
export type DeploymentInstructions = z.infer<typeof DeploymentInstructionsSchema>;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Update the deployment with the build metadata
|
|
242
|
+
*
|
|
243
|
+
* @param client
|
|
244
|
+
* @param deploymentId
|
|
245
|
+
* @returns
|
|
246
|
+
*/
|
|
247
|
+
export async function projectDeploymentUpdate(
|
|
248
|
+
client: APIClient,
|
|
249
|
+
deploymentId: string,
|
|
250
|
+
deployment: BuildMetadata,
|
|
251
|
+
signal?: AbortSignal
|
|
252
|
+
): Promise<DeploymentInstructions> {
|
|
253
|
+
const resp = await client.request<DeploymentInstructionsResponse, BuildMetadata>(
|
|
254
|
+
'PUT',
|
|
255
|
+
`/cli/deploy/2/start/${deploymentId}`,
|
|
256
|
+
DeploymentInstructionsResponseSchema,
|
|
257
|
+
deployment,
|
|
258
|
+
BuildMetadataSchema,
|
|
259
|
+
signal
|
|
260
|
+
);
|
|
261
|
+
if (resp.success) {
|
|
262
|
+
return resp.data;
|
|
263
|
+
}
|
|
264
|
+
throw new ProjectResponseError({ message: resp.message });
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export const DeploymentCompleteSchema = z.object({
|
|
268
|
+
streamId: z.string().optional().describe('the stream id for warmup logs'),
|
|
269
|
+
publicUrls: z
|
|
270
|
+
.object({
|
|
271
|
+
latest: z.string().url().describe('the public url for the latest deployment'),
|
|
272
|
+
deployment: z.string().url().describe('the public url for this deployment'),
|
|
273
|
+
custom: z.array(z.string().describe('the custom domain')),
|
|
274
|
+
vanityDeployment: z
|
|
275
|
+
.string()
|
|
276
|
+
.url()
|
|
277
|
+
.nullable()
|
|
278
|
+
.optional()
|
|
279
|
+
.describe('the vanity url for this deployment'),
|
|
280
|
+
vanityProject: z
|
|
281
|
+
.string()
|
|
282
|
+
.url()
|
|
283
|
+
.nullable()
|
|
284
|
+
.optional()
|
|
285
|
+
.describe('the vanity url for the latest deployment'),
|
|
286
|
+
})
|
|
287
|
+
.describe('the map of public urls'),
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
export const DeploymentCompleteResponseSchema = APIResponseSchema(DeploymentCompleteSchema);
|
|
291
|
+
|
|
292
|
+
type DeploymentCompleteResponse = z.infer<typeof DeploymentCompleteResponseSchema>;
|
|
293
|
+
export type DeploymentComplete = z.infer<typeof DeploymentCompleteSchema>;
|
|
294
|
+
|
|
295
|
+
export const DeploymentStateValue = z.enum([
|
|
296
|
+
'pending',
|
|
297
|
+
'building',
|
|
298
|
+
'deploying',
|
|
299
|
+
'failed',
|
|
300
|
+
'completed',
|
|
301
|
+
]);
|
|
302
|
+
|
|
303
|
+
export type DeploymentState = z.infer<typeof DeploymentStateValue>;
|
|
304
|
+
|
|
305
|
+
export const DeploymentStatusSchema = z.object({
|
|
306
|
+
state: DeploymentStateValue.describe('the current deployment state'),
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
export const DeploymentStatusResponseSchema = APIResponseSchema(DeploymentStatusSchema);
|
|
310
|
+
|
|
311
|
+
type DeploymentStatusResponse = z.infer<typeof DeploymentStatusResponseSchema>;
|
|
312
|
+
export type DeploymentStatusResult = z.infer<typeof DeploymentStatusSchema>;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Complete the deployment once build is uploaded
|
|
316
|
+
*
|
|
317
|
+
* @param client
|
|
318
|
+
* @param deploymentId
|
|
319
|
+
* @returns
|
|
320
|
+
*/
|
|
321
|
+
export async function projectDeploymentComplete(
|
|
322
|
+
client: APIClient,
|
|
323
|
+
deploymentId: string,
|
|
324
|
+
signal?: AbortSignal
|
|
325
|
+
): Promise<DeploymentComplete> {
|
|
326
|
+
const resp = await client.request<DeploymentCompleteResponse>(
|
|
327
|
+
'POST',
|
|
328
|
+
`/cli/deploy/2/complete/${deploymentId}`,
|
|
329
|
+
DeploymentCompleteResponseSchema,
|
|
330
|
+
undefined,
|
|
331
|
+
undefined,
|
|
332
|
+
signal
|
|
333
|
+
);
|
|
334
|
+
if (resp.success) {
|
|
335
|
+
return resp.data;
|
|
336
|
+
}
|
|
337
|
+
throw new ProjectResponseError({
|
|
338
|
+
message: resp.message || 'Deployment completion failed with unknown error',
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Get the current provisioning status of a deployment
|
|
344
|
+
*
|
|
345
|
+
* @param client
|
|
346
|
+
* @param deploymentId
|
|
347
|
+
* @returns
|
|
348
|
+
*/
|
|
349
|
+
export async function projectDeploymentStatus(
|
|
350
|
+
client: APIClient,
|
|
351
|
+
deploymentId: string,
|
|
352
|
+
signal?: AbortSignal
|
|
353
|
+
): Promise<DeploymentStatusResult> {
|
|
354
|
+
const resp = await client.request<DeploymentStatusResponse>(
|
|
355
|
+
'GET',
|
|
356
|
+
`/cli/deploy/2/status/${deploymentId}`,
|
|
357
|
+
DeploymentStatusResponseSchema,
|
|
358
|
+
undefined,
|
|
359
|
+
undefined,
|
|
360
|
+
signal
|
|
361
|
+
);
|
|
362
|
+
if (resp.success) {
|
|
363
|
+
return resp.data;
|
|
364
|
+
}
|
|
365
|
+
throw new ProjectResponseError({ message: resp.message });
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export interface ClientDiagnosticsError {
|
|
369
|
+
type: 'file' | 'general';
|
|
370
|
+
scope: 'typescript' | 'ast' | 'build' | 'bundler' | 'validation' | 'deploy';
|
|
371
|
+
path?: string;
|
|
372
|
+
line?: number;
|
|
373
|
+
column?: number;
|
|
374
|
+
message: string;
|
|
375
|
+
code?: string;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export interface ClientDiagnosticsTiming {
|
|
379
|
+
name: string;
|
|
380
|
+
startedAt: string;
|
|
381
|
+
completedAt: string;
|
|
382
|
+
durationMs: number;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export interface ClientDiagnostics {
|
|
386
|
+
success: boolean;
|
|
387
|
+
errors: ClientDiagnosticsError[];
|
|
388
|
+
warnings: ClientDiagnosticsError[];
|
|
389
|
+
diagnostics: ClientDiagnosticsTiming[];
|
|
390
|
+
error?: string;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export interface DeploymentFailPayload {
|
|
394
|
+
error?: string;
|
|
395
|
+
diagnostics?: ClientDiagnostics;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export const ClientDiagnosticsErrorSchema = z.object({
|
|
399
|
+
type: z.enum(['file', 'general']),
|
|
400
|
+
scope: z.enum(['typescript', 'ast', 'build', 'bundler', 'validation', 'deploy']),
|
|
401
|
+
path: z.string().optional(),
|
|
402
|
+
line: z.number().optional(),
|
|
403
|
+
column: z.number().optional(),
|
|
404
|
+
message: z.string(),
|
|
405
|
+
code: z.string().optional(),
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
export const ClientDiagnosticsTimingSchema = z.object({
|
|
409
|
+
name: z.string(),
|
|
410
|
+
startedAt: z.string(),
|
|
411
|
+
completedAt: z.string(),
|
|
412
|
+
durationMs: z.number(),
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
export const ClientDiagnosticsSchema = z.object({
|
|
416
|
+
success: z.boolean(),
|
|
417
|
+
errors: z.array(ClientDiagnosticsErrorSchema),
|
|
418
|
+
warnings: z.array(ClientDiagnosticsErrorSchema),
|
|
419
|
+
diagnostics: z.array(ClientDiagnosticsTimingSchema),
|
|
420
|
+
error: z.string().optional(),
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
export const DeploymentFailPayloadSchema = z.object({
|
|
424
|
+
error: z.string().optional(),
|
|
425
|
+
diagnostics: ClientDiagnosticsSchema.optional(),
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
export const DeploymentFailResponseSchema = z.object({
|
|
429
|
+
state: z.literal('failed'),
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
export const DeploymentFailAPIResponseSchema = APIResponseSchema(DeploymentFailResponseSchema);
|
|
433
|
+
type DeploymentFailResponse = z.infer<typeof DeploymentFailAPIResponseSchema>;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Report a deployment failure from the client
|
|
437
|
+
*
|
|
438
|
+
* @param client
|
|
439
|
+
* @param deploymentId
|
|
440
|
+
* @param payload - Error message and/or structured diagnostics
|
|
441
|
+
* @returns
|
|
442
|
+
*/
|
|
443
|
+
export async function projectDeploymentFail(
|
|
444
|
+
client: APIClient,
|
|
445
|
+
deploymentId: string,
|
|
446
|
+
payload: DeploymentFailPayload
|
|
447
|
+
): Promise<void> {
|
|
448
|
+
const resp = await client.request<DeploymentFailResponse, DeploymentFailPayload>(
|
|
449
|
+
'POST',
|
|
450
|
+
`/cli/deploy/2/fail/${deploymentId}`,
|
|
451
|
+
DeploymentFailAPIResponseSchema,
|
|
452
|
+
payload,
|
|
453
|
+
DeploymentFailPayloadSchema
|
|
454
|
+
);
|
|
455
|
+
if (!resp.success) {
|
|
456
|
+
throw new ProjectResponseError({ message: resp.message });
|
|
457
|
+
}
|
|
458
|
+
}
|