@agentuity/core 1.0.31 → 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/error.d.ts.map +1 -1
- package/dist/error.js +16 -9
- package/dist/error.js.map +1 -1
- 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 +3 -3
- package/dist/services/stream.d.ts.map +1 -1
- package/dist/services/stream.js +8 -13
- 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/error.ts +16 -9
- 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 +11 -17
- package/src/services/vector.ts +9 -12
- package/src/services/webhook.ts +14 -24
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type APIClient } from '../api.ts';
|
|
3
|
+
export declare const ServiceStatsError: {
|
|
4
|
+
new (args?: ({
|
|
5
|
+
message: string;
|
|
6
|
+
} & {
|
|
7
|
+
message?: string;
|
|
8
|
+
cause?: unknown;
|
|
9
|
+
}) | undefined): import("../../error.ts").RichError & {
|
|
10
|
+
readonly _tag: "ServiceStatsError";
|
|
11
|
+
} & Readonly<{
|
|
12
|
+
message: string;
|
|
13
|
+
}>;
|
|
14
|
+
readonly defaultMessage?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const KeyValueStatSchema: z.ZodObject<{
|
|
17
|
+
namespaceCount: z.ZodNumber;
|
|
18
|
+
keyCount: z.ZodNumber;
|
|
19
|
+
totalSizeBytes: z.ZodNumber;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export declare const VectorStatSchema: z.ZodObject<{
|
|
22
|
+
namespaceCount: z.ZodNumber;
|
|
23
|
+
documentCount: z.ZodNumber;
|
|
24
|
+
totalSizeBytes: z.ZodNumber;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export declare const QueueStatSchema: z.ZodObject<{
|
|
27
|
+
queueCount: z.ZodNumber;
|
|
28
|
+
totalMessages: z.ZodNumber;
|
|
29
|
+
totalDlq: z.ZodNumber;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export declare const StreamStatSchema: z.ZodObject<{
|
|
32
|
+
streamCount: z.ZodNumber;
|
|
33
|
+
totalSizeBytes: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export declare const SandboxStatSchema: z.ZodObject<{
|
|
36
|
+
totalActive: z.ZodNumber;
|
|
37
|
+
running: z.ZodNumber;
|
|
38
|
+
idle: z.ZodNumber;
|
|
39
|
+
creating: z.ZodNumber;
|
|
40
|
+
totalExecutions: z.ZodNumber;
|
|
41
|
+
totalCpuTimeMs: z.ZodNumber;
|
|
42
|
+
totalMemoryByteSec: z.ZodNumber;
|
|
43
|
+
totalNetworkEgressBytes: z.ZodNumber;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export declare const EmailStatSchema: z.ZodObject<{
|
|
46
|
+
addressCount: z.ZodNumber;
|
|
47
|
+
inboundCount: z.ZodNumber;
|
|
48
|
+
outboundCount: z.ZodNumber;
|
|
49
|
+
outboundSuccess: z.ZodNumber;
|
|
50
|
+
outboundFailed: z.ZodNumber;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export declare const TaskStatSchema: z.ZodObject<{
|
|
53
|
+
total: z.ZodDefault<z.ZodNumber>;
|
|
54
|
+
open: z.ZodDefault<z.ZodNumber>;
|
|
55
|
+
inProgress: z.ZodDefault<z.ZodNumber>;
|
|
56
|
+
done: z.ZodDefault<z.ZodNumber>;
|
|
57
|
+
closed: z.ZodDefault<z.ZodNumber>;
|
|
58
|
+
cancelled: z.ZodDefault<z.ZodNumber>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export declare const ScheduleStatSchema: z.ZodObject<{
|
|
61
|
+
scheduleCount: z.ZodNumber;
|
|
62
|
+
totalDeliveries: z.ZodNumber;
|
|
63
|
+
successDeliveries: z.ZodNumber;
|
|
64
|
+
failedDeliveries: z.ZodNumber;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export declare const DatabaseStatSchema: z.ZodObject<{
|
|
67
|
+
databaseCount: z.ZodNumber;
|
|
68
|
+
totalTableCount: z.ZodNumber;
|
|
69
|
+
totalRecordCount: z.ZodNumber;
|
|
70
|
+
totalSizeBytes: z.ZodNumber;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
export declare const ServiceStatsDataSchema: z.ZodObject<{
|
|
73
|
+
services: z.ZodObject<{
|
|
74
|
+
database: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
databaseCount: z.ZodNumber;
|
|
76
|
+
totalTableCount: z.ZodNumber;
|
|
77
|
+
totalRecordCount: z.ZodNumber;
|
|
78
|
+
totalSizeBytes: z.ZodNumber;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
keyvalue: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
namespaceCount: z.ZodNumber;
|
|
82
|
+
keyCount: z.ZodNumber;
|
|
83
|
+
totalSizeBytes: z.ZodNumber;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
vector: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
namespaceCount: z.ZodNumber;
|
|
87
|
+
documentCount: z.ZodNumber;
|
|
88
|
+
totalSizeBytes: z.ZodNumber;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
queue: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
queueCount: z.ZodNumber;
|
|
92
|
+
totalMessages: z.ZodNumber;
|
|
93
|
+
totalDlq: z.ZodNumber;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
streamCount: z.ZodNumber;
|
|
97
|
+
totalSizeBytes: z.ZodNumber;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
sandbox: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
totalActive: z.ZodNumber;
|
|
101
|
+
running: z.ZodNumber;
|
|
102
|
+
idle: z.ZodNumber;
|
|
103
|
+
creating: z.ZodNumber;
|
|
104
|
+
totalExecutions: z.ZodNumber;
|
|
105
|
+
totalCpuTimeMs: z.ZodNumber;
|
|
106
|
+
totalMemoryByteSec: z.ZodNumber;
|
|
107
|
+
totalNetworkEgressBytes: z.ZodNumber;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
email: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
addressCount: z.ZodNumber;
|
|
111
|
+
inboundCount: z.ZodNumber;
|
|
112
|
+
outboundCount: z.ZodNumber;
|
|
113
|
+
outboundSuccess: z.ZodNumber;
|
|
114
|
+
outboundFailed: z.ZodNumber;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
task: z.ZodOptional<z.ZodObject<{
|
|
117
|
+
total: z.ZodDefault<z.ZodNumber>;
|
|
118
|
+
open: z.ZodDefault<z.ZodNumber>;
|
|
119
|
+
inProgress: z.ZodDefault<z.ZodNumber>;
|
|
120
|
+
done: z.ZodDefault<z.ZodNumber>;
|
|
121
|
+
closed: z.ZodDefault<z.ZodNumber>;
|
|
122
|
+
cancelled: z.ZodDefault<z.ZodNumber>;
|
|
123
|
+
}, z.core.$strip>>;
|
|
124
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
125
|
+
scheduleCount: z.ZodNumber;
|
|
126
|
+
totalDeliveries: z.ZodNumber;
|
|
127
|
+
successDeliveries: z.ZodNumber;
|
|
128
|
+
failedDeliveries: z.ZodNumber;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
export declare const ServiceStatsResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
133
|
+
success: z.ZodLiteral<false>;
|
|
134
|
+
message: z.ZodString;
|
|
135
|
+
code: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
success: z.ZodLiteral<true>;
|
|
138
|
+
data: z.ZodObject<{
|
|
139
|
+
services: z.ZodObject<{
|
|
140
|
+
database: z.ZodOptional<z.ZodObject<{
|
|
141
|
+
databaseCount: z.ZodNumber;
|
|
142
|
+
totalTableCount: z.ZodNumber;
|
|
143
|
+
totalRecordCount: z.ZodNumber;
|
|
144
|
+
totalSizeBytes: z.ZodNumber;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
keyvalue: z.ZodOptional<z.ZodObject<{
|
|
147
|
+
namespaceCount: z.ZodNumber;
|
|
148
|
+
keyCount: z.ZodNumber;
|
|
149
|
+
totalSizeBytes: z.ZodNumber;
|
|
150
|
+
}, z.core.$strip>>;
|
|
151
|
+
vector: z.ZodOptional<z.ZodObject<{
|
|
152
|
+
namespaceCount: z.ZodNumber;
|
|
153
|
+
documentCount: z.ZodNumber;
|
|
154
|
+
totalSizeBytes: z.ZodNumber;
|
|
155
|
+
}, z.core.$strip>>;
|
|
156
|
+
queue: z.ZodOptional<z.ZodObject<{
|
|
157
|
+
queueCount: z.ZodNumber;
|
|
158
|
+
totalMessages: z.ZodNumber;
|
|
159
|
+
totalDlq: z.ZodNumber;
|
|
160
|
+
}, z.core.$strip>>;
|
|
161
|
+
stream: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
streamCount: z.ZodNumber;
|
|
163
|
+
totalSizeBytes: z.ZodNumber;
|
|
164
|
+
}, z.core.$strip>>;
|
|
165
|
+
sandbox: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
totalActive: z.ZodNumber;
|
|
167
|
+
running: z.ZodNumber;
|
|
168
|
+
idle: z.ZodNumber;
|
|
169
|
+
creating: z.ZodNumber;
|
|
170
|
+
totalExecutions: z.ZodNumber;
|
|
171
|
+
totalCpuTimeMs: z.ZodNumber;
|
|
172
|
+
totalMemoryByteSec: z.ZodNumber;
|
|
173
|
+
totalNetworkEgressBytes: z.ZodNumber;
|
|
174
|
+
}, z.core.$strip>>;
|
|
175
|
+
email: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
addressCount: z.ZodNumber;
|
|
177
|
+
inboundCount: z.ZodNumber;
|
|
178
|
+
outboundCount: z.ZodNumber;
|
|
179
|
+
outboundSuccess: z.ZodNumber;
|
|
180
|
+
outboundFailed: z.ZodNumber;
|
|
181
|
+
}, z.core.$strip>>;
|
|
182
|
+
task: z.ZodOptional<z.ZodObject<{
|
|
183
|
+
total: z.ZodDefault<z.ZodNumber>;
|
|
184
|
+
open: z.ZodDefault<z.ZodNumber>;
|
|
185
|
+
inProgress: z.ZodDefault<z.ZodNumber>;
|
|
186
|
+
done: z.ZodDefault<z.ZodNumber>;
|
|
187
|
+
closed: z.ZodDefault<z.ZodNumber>;
|
|
188
|
+
cancelled: z.ZodDefault<z.ZodNumber>;
|
|
189
|
+
}, z.core.$strip>>;
|
|
190
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
scheduleCount: z.ZodNumber;
|
|
192
|
+
totalDeliveries: z.ZodNumber;
|
|
193
|
+
successDeliveries: z.ZodNumber;
|
|
194
|
+
failedDeliveries: z.ZodNumber;
|
|
195
|
+
}, z.core.$strip>>;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
}, z.core.$strip>], "success">;
|
|
199
|
+
export type KeyValueStat = z.infer<typeof KeyValueStatSchema>;
|
|
200
|
+
export type VectorStat = z.infer<typeof VectorStatSchema>;
|
|
201
|
+
export type QueueStat = z.infer<typeof QueueStatSchema>;
|
|
202
|
+
export type StreamStat = z.infer<typeof StreamStatSchema>;
|
|
203
|
+
export type SandboxStat = z.infer<typeof SandboxStatSchema>;
|
|
204
|
+
export type EmailStat = z.infer<typeof EmailStatSchema>;
|
|
205
|
+
export type TaskStat = z.infer<typeof TaskStatSchema>;
|
|
206
|
+
export type ScheduleStat = z.infer<typeof ScheduleStatSchema>;
|
|
207
|
+
export type DatabaseStat = z.infer<typeof DatabaseStatSchema>;
|
|
208
|
+
export type ServiceStatsData = z.infer<typeof ServiceStatsDataSchema>;
|
|
209
|
+
export type ServiceStatsResponse = z.infer<typeof ServiceStatsResponseSchema>;
|
|
210
|
+
/**
|
|
211
|
+
* Valid service names that can be used to filter stats.
|
|
212
|
+
*/
|
|
213
|
+
export declare const VALID_SERVICES: readonly ["database", "keyvalue", "email", "vector", "schedule", "task", "stream", "sandbox", "queue"];
|
|
214
|
+
export type ServiceName = (typeof VALID_SERVICES)[number];
|
|
215
|
+
export interface ServiceStatsOptions {
|
|
216
|
+
/**
|
|
217
|
+
* Filter to a specific service. If omitted, returns stats for all services.
|
|
218
|
+
*/
|
|
219
|
+
service?: ServiceName;
|
|
220
|
+
/**
|
|
221
|
+
* Start time filter (ISO 8601 timestamp).
|
|
222
|
+
*/
|
|
223
|
+
start?: string;
|
|
224
|
+
/**
|
|
225
|
+
* End time filter (ISO 8601 timestamp).
|
|
226
|
+
*/
|
|
227
|
+
end?: string;
|
|
228
|
+
/**
|
|
229
|
+
* For CLI auth: sets x-agentuity-orgid header.
|
|
230
|
+
* Required when using CLI token auth (bearer tokens without embedded org).
|
|
231
|
+
*/
|
|
232
|
+
orgIdHeader?: string;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Get aggregated stats for services used by an organization.
|
|
236
|
+
*
|
|
237
|
+
* Returns per-service stats with service-specific fields (counts, sizes, etc.).
|
|
238
|
+
* Services that error on the backend are omitted from the response.
|
|
239
|
+
* Services with no provisioned tenant DB return zero values.
|
|
240
|
+
*
|
|
241
|
+
* @param client - The API client instance
|
|
242
|
+
* @param orgId - The organization ID
|
|
243
|
+
* @param options - Optional filtering (service, time range)
|
|
244
|
+
* @returns Service stats data with per-service breakdown
|
|
245
|
+
* @throws {ServiceStatsError} If the API request fails
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* ```typescript
|
|
249
|
+
* // Get stats for all services
|
|
250
|
+
* const stats = await getServiceStats(client, 'org_123');
|
|
251
|
+
* console.log(`KV keys: ${stats.services.keyvalue?.keyCount}`);
|
|
252
|
+
* ```
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* ```typescript
|
|
256
|
+
* // Get stats for a specific service
|
|
257
|
+
* const stats = await getServiceStats(client, 'org_123', {
|
|
258
|
+
* service: 'keyvalue',
|
|
259
|
+
* });
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
export declare function getServiceStats(client: APIClient, orgId: string, options?: ServiceStatsOptions): Promise<ServiceStatsData>;
|
|
263
|
+
//# sourceMappingURL=stats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../src/api/services/stats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,WAAW,CAAC;AAK9D,eAAO,MAAM,iBAAiB;;iBACpB,MAAM;;;;;;;iBAAN,MAAM;;;CACZ,CAAC;AAIL,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;iBAI3B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;iBAI1B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;iBAS5B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;iBAM1B,CAAC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AC,OAAO,0BAA0B,CAAC,CAAC;AAI9E;;GAEG;AACH,eAAO,MAAM,cAAc,wGAUjB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAI1D,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,eAAe,CACpC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CA4B3B"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { APIResponseSchema } from "../api.js";
|
|
3
|
+
import { StructuredError } from "../../error.js";
|
|
4
|
+
// --- Error ---
|
|
5
|
+
export const ServiceStatsError = StructuredError('ServiceStatsError')();
|
|
6
|
+
// --- Per-Service Stat Schemas ---
|
|
7
|
+
export const KeyValueStatSchema = z.object({
|
|
8
|
+
namespaceCount: z.number(),
|
|
9
|
+
keyCount: z.number(),
|
|
10
|
+
totalSizeBytes: z.number(),
|
|
11
|
+
});
|
|
12
|
+
export const VectorStatSchema = z.object({
|
|
13
|
+
namespaceCount: z.number(),
|
|
14
|
+
documentCount: z.number(),
|
|
15
|
+
totalSizeBytes: z.number(),
|
|
16
|
+
});
|
|
17
|
+
export const QueueStatSchema = z.object({
|
|
18
|
+
queueCount: z.number(),
|
|
19
|
+
totalMessages: z.number(),
|
|
20
|
+
totalDlq: z.number(),
|
|
21
|
+
});
|
|
22
|
+
export const StreamStatSchema = z.object({
|
|
23
|
+
streamCount: z.number(),
|
|
24
|
+
totalSizeBytes: z.number(),
|
|
25
|
+
});
|
|
26
|
+
export const SandboxStatSchema = z.object({
|
|
27
|
+
totalActive: z.number(),
|
|
28
|
+
running: z.number(),
|
|
29
|
+
idle: z.number(),
|
|
30
|
+
creating: z.number(),
|
|
31
|
+
totalExecutions: z.number(),
|
|
32
|
+
totalCpuTimeMs: z.number(),
|
|
33
|
+
totalMemoryByteSec: z.number(),
|
|
34
|
+
totalNetworkEgressBytes: z.number(),
|
|
35
|
+
});
|
|
36
|
+
export const EmailStatSchema = z.object({
|
|
37
|
+
addressCount: z.number(),
|
|
38
|
+
inboundCount: z.number(),
|
|
39
|
+
outboundCount: z.number(),
|
|
40
|
+
outboundSuccess: z.number(),
|
|
41
|
+
outboundFailed: z.number(),
|
|
42
|
+
});
|
|
43
|
+
export const TaskStatSchema = z.object({
|
|
44
|
+
total: z.number().default(0),
|
|
45
|
+
open: z.number().default(0),
|
|
46
|
+
inProgress: z.number().default(0),
|
|
47
|
+
done: z.number().default(0),
|
|
48
|
+
closed: z.number().default(0),
|
|
49
|
+
cancelled: z.number().default(0),
|
|
50
|
+
});
|
|
51
|
+
export const ScheduleStatSchema = z.object({
|
|
52
|
+
scheduleCount: z.number(),
|
|
53
|
+
totalDeliveries: z.number(),
|
|
54
|
+
successDeliveries: z.number(),
|
|
55
|
+
failedDeliveries: z.number(),
|
|
56
|
+
});
|
|
57
|
+
export const DatabaseStatSchema = z.object({
|
|
58
|
+
databaseCount: z.number(),
|
|
59
|
+
totalTableCount: z.number(),
|
|
60
|
+
totalRecordCount: z.number(),
|
|
61
|
+
totalSizeBytes: z.number(),
|
|
62
|
+
});
|
|
63
|
+
// --- Aggregate Schema ---
|
|
64
|
+
export const ServiceStatsDataSchema = z.object({
|
|
65
|
+
services: z.object({
|
|
66
|
+
database: DatabaseStatSchema.optional(),
|
|
67
|
+
keyvalue: KeyValueStatSchema.optional(),
|
|
68
|
+
vector: VectorStatSchema.optional(),
|
|
69
|
+
queue: QueueStatSchema.optional(),
|
|
70
|
+
stream: StreamStatSchema.optional(),
|
|
71
|
+
sandbox: SandboxStatSchema.optional(),
|
|
72
|
+
email: EmailStatSchema.optional(),
|
|
73
|
+
task: TaskStatSchema.optional(),
|
|
74
|
+
schedule: ScheduleStatSchema.optional(),
|
|
75
|
+
}),
|
|
76
|
+
});
|
|
77
|
+
export const ServiceStatsResponseSchema = APIResponseSchema(ServiceStatsDataSchema);
|
|
78
|
+
// --- Valid Services ---
|
|
79
|
+
/**
|
|
80
|
+
* Valid service names that can be used to filter stats.
|
|
81
|
+
*/
|
|
82
|
+
export const VALID_SERVICES = [
|
|
83
|
+
'database',
|
|
84
|
+
'keyvalue',
|
|
85
|
+
'email',
|
|
86
|
+
'vector',
|
|
87
|
+
'schedule',
|
|
88
|
+
'task',
|
|
89
|
+
'stream',
|
|
90
|
+
'sandbox',
|
|
91
|
+
'queue',
|
|
92
|
+
];
|
|
93
|
+
// --- API Function ---
|
|
94
|
+
/**
|
|
95
|
+
* Get aggregated stats for services used by an organization.
|
|
96
|
+
*
|
|
97
|
+
* Returns per-service stats with service-specific fields (counts, sizes, etc.).
|
|
98
|
+
* Services that error on the backend are omitted from the response.
|
|
99
|
+
* Services with no provisioned tenant DB return zero values.
|
|
100
|
+
*
|
|
101
|
+
* @param client - The API client instance
|
|
102
|
+
* @param orgId - The organization ID
|
|
103
|
+
* @param options - Optional filtering (service, time range)
|
|
104
|
+
* @returns Service stats data with per-service breakdown
|
|
105
|
+
* @throws {ServiceStatsError} If the API request fails
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```typescript
|
|
109
|
+
* // Get stats for all services
|
|
110
|
+
* const stats = await getServiceStats(client, 'org_123');
|
|
111
|
+
* console.log(`KV keys: ${stats.services.keyvalue?.keyCount}`);
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* // Get stats for a specific service
|
|
117
|
+
* const stats = await getServiceStats(client, 'org_123', {
|
|
118
|
+
* service: 'keyvalue',
|
|
119
|
+
* });
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
export async function getServiceStats(client, orgId, options) {
|
|
123
|
+
const params = new URLSearchParams();
|
|
124
|
+
if (options?.service)
|
|
125
|
+
params.set('service', options.service);
|
|
126
|
+
if (options?.start)
|
|
127
|
+
params.set('start', options.start);
|
|
128
|
+
if (options?.end)
|
|
129
|
+
params.set('end', options.end);
|
|
130
|
+
const queryString = params.toString();
|
|
131
|
+
const url = `/services/stats/${encodeURIComponent(orgId)}${queryString ? `?${queryString}` : ''}`;
|
|
132
|
+
const headers = {};
|
|
133
|
+
if (options?.orgIdHeader) {
|
|
134
|
+
headers['x-agentuity-orgid'] = options.orgIdHeader;
|
|
135
|
+
}
|
|
136
|
+
const resp = await client.get(url, ServiceStatsResponseSchema, undefined, Object.keys(headers).length > 0 ? headers : undefined);
|
|
137
|
+
if (resp.success) {
|
|
138
|
+
return resp.data;
|
|
139
|
+
}
|
|
140
|
+
throw new ServiceStatsError({
|
|
141
|
+
message: resp.message || 'Failed to get service stats',
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=stats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../src/api/services/stats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,gBAAgB;AAEhB,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,mBAAmB,CAAC,EAEjE,CAAC;AAEL,mCAAmC;AAEnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,QAAQ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E,OAAO,CAAC,GAAG,CAAC,CAAC;IAEjD,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IACtC,MAAM,GAAG,GAAG,mBAAmB,kBAAkB,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAElG,MAAM,OAAO,GAA2B,EAAE,CAAC;IAC3C,IAAI,OAAO,EAAE,WAAW,EAAE,CAAC;QAC1B,OAAO,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IACpD,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAC5B,GAAG,EACH,0BAA0B,EAC1B,SAAS,EACT,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CACrD,CAAC;IAEF,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,iBAAiB,CAAC;QAC3B,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,6BAA6B;KACtD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { APIClient } from '../api.ts';
|
|
3
|
+
import { type Session } from './list.ts';
|
|
4
|
+
export declare const _SessionGetRequestSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const SessionEvalRunSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
created_at: z.ZodString;
|
|
10
|
+
eval_id: z.ZodString;
|
|
11
|
+
pending: z.ZodBoolean;
|
|
12
|
+
success: z.ZodBoolean;
|
|
13
|
+
error: z.ZodNullable<z.ZodString>;
|
|
14
|
+
result: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export interface SpanNode {
|
|
17
|
+
id: string;
|
|
18
|
+
duration: number;
|
|
19
|
+
operation: string;
|
|
20
|
+
attributes: Record<string, unknown>;
|
|
21
|
+
children?: SpanNode[];
|
|
22
|
+
error?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const SpanNodeSchema: z.ZodType<SpanNode>;
|
|
25
|
+
export declare const RouteInfoSchema: z.ZodNullable<z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
method: z.ZodString;
|
|
28
|
+
path: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
export declare const AgentInfoSchema: z.ZodObject<{
|
|
31
|
+
name: z.ZodString;
|
|
32
|
+
identifier: z.ZodString;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export declare const EnrichedSessionDataSchema: z.ZodObject<{
|
|
35
|
+
session: z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
created_at: z.ZodString;
|
|
38
|
+
updated_at: z.ZodString;
|
|
39
|
+
deleted: z.ZodBoolean;
|
|
40
|
+
deleted_at: z.ZodNullable<z.ZodString>;
|
|
41
|
+
deleted_by: z.ZodNullable<z.ZodString>;
|
|
42
|
+
start_time: z.ZodString;
|
|
43
|
+
end_time: z.ZodNullable<z.ZodString>;
|
|
44
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
45
|
+
org_id: z.ZodString;
|
|
46
|
+
project_id: z.ZodString;
|
|
47
|
+
deployment_id: z.ZodString;
|
|
48
|
+
agent_ids: z.ZodArray<z.ZodString>;
|
|
49
|
+
trigger: z.ZodString;
|
|
50
|
+
env: z.ZodString;
|
|
51
|
+
devmode: z.ZodBoolean;
|
|
52
|
+
pending: z.ZodBoolean;
|
|
53
|
+
success: z.ZodBoolean;
|
|
54
|
+
error: z.ZodNullable<z.ZodString>;
|
|
55
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
56
|
+
cpu_time: z.ZodNullable<z.ZodNumber>;
|
|
57
|
+
llm_cost: z.ZodNullable<z.ZodNumber>;
|
|
58
|
+
llm_prompt_token_count: z.ZodNullable<z.ZodNumber>;
|
|
59
|
+
llm_completion_token_count: z.ZodNullable<z.ZodNumber>;
|
|
60
|
+
total_cost: z.ZodNullable<z.ZodNumber>;
|
|
61
|
+
method: z.ZodNullable<z.ZodString>;
|
|
62
|
+
url: z.ZodNullable<z.ZodString>;
|
|
63
|
+
route_id: z.ZodNullable<z.ZodString>;
|
|
64
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
65
|
+
timeline: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
66
|
+
user_data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
69
|
+
name: z.ZodString;
|
|
70
|
+
identifier: z.ZodString;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
eval_runs: z.ZodArray<z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
created_at: z.ZodString;
|
|
75
|
+
eval_id: z.ZodString;
|
|
76
|
+
pending: z.ZodBoolean;
|
|
77
|
+
success: z.ZodBoolean;
|
|
78
|
+
error: z.ZodNullable<z.ZodString>;
|
|
79
|
+
result: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
route: z.ZodNullable<z.ZodObject<{
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
method: z.ZodString;
|
|
84
|
+
path: z.ZodString;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
export declare const SessionGetResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
88
|
+
success: z.ZodLiteral<false>;
|
|
89
|
+
message: z.ZodString;
|
|
90
|
+
code: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
92
|
+
success: z.ZodLiteral<true>;
|
|
93
|
+
data: z.ZodObject<{
|
|
94
|
+
session: z.ZodObject<{
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
created_at: z.ZodString;
|
|
97
|
+
updated_at: z.ZodString;
|
|
98
|
+
deleted: z.ZodBoolean;
|
|
99
|
+
deleted_at: z.ZodNullable<z.ZodString>;
|
|
100
|
+
deleted_by: z.ZodNullable<z.ZodString>;
|
|
101
|
+
start_time: z.ZodString;
|
|
102
|
+
end_time: z.ZodNullable<z.ZodString>;
|
|
103
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
104
|
+
org_id: z.ZodString;
|
|
105
|
+
project_id: z.ZodString;
|
|
106
|
+
deployment_id: z.ZodString;
|
|
107
|
+
agent_ids: z.ZodArray<z.ZodString>;
|
|
108
|
+
trigger: z.ZodString;
|
|
109
|
+
env: z.ZodString;
|
|
110
|
+
devmode: z.ZodBoolean;
|
|
111
|
+
pending: z.ZodBoolean;
|
|
112
|
+
success: z.ZodBoolean;
|
|
113
|
+
error: z.ZodNullable<z.ZodString>;
|
|
114
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
115
|
+
cpu_time: z.ZodNullable<z.ZodNumber>;
|
|
116
|
+
llm_cost: z.ZodNullable<z.ZodNumber>;
|
|
117
|
+
llm_prompt_token_count: z.ZodNullable<z.ZodNumber>;
|
|
118
|
+
llm_completion_token_count: z.ZodNullable<z.ZodNumber>;
|
|
119
|
+
total_cost: z.ZodNullable<z.ZodNumber>;
|
|
120
|
+
method: z.ZodNullable<z.ZodString>;
|
|
121
|
+
url: z.ZodNullable<z.ZodString>;
|
|
122
|
+
route_id: z.ZodNullable<z.ZodString>;
|
|
123
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
124
|
+
timeline: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
125
|
+
user_data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
128
|
+
name: z.ZodString;
|
|
129
|
+
identifier: z.ZodString;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
eval_runs: z.ZodArray<z.ZodObject<{
|
|
132
|
+
id: z.ZodString;
|
|
133
|
+
created_at: z.ZodString;
|
|
134
|
+
eval_id: z.ZodString;
|
|
135
|
+
pending: z.ZodBoolean;
|
|
136
|
+
success: z.ZodBoolean;
|
|
137
|
+
error: z.ZodNullable<z.ZodString>;
|
|
138
|
+
result: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
route: z.ZodNullable<z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
method: z.ZodString;
|
|
143
|
+
path: z.ZodString;
|
|
144
|
+
}, z.core.$strip>>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
}, z.core.$strip>], "success">;
|
|
147
|
+
type SessionGetRequest = z.infer<typeof _SessionGetRequestSchema>;
|
|
148
|
+
/**
|
|
149
|
+
* Get a single session by id
|
|
150
|
+
*
|
|
151
|
+
* @param client
|
|
152
|
+
* @param request
|
|
153
|
+
* @returns
|
|
154
|
+
*/
|
|
155
|
+
export type SessionEvalRun = z.infer<typeof SessionEvalRunSchema>;
|
|
156
|
+
/** @deprecated Use SessionEvalRun instead */
|
|
157
|
+
export type EvalRun = SessionEvalRun;
|
|
158
|
+
export type RouteInfo = z.infer<typeof RouteInfoSchema>;
|
|
159
|
+
export type AgentInfo = z.infer<typeof AgentInfoSchema>;
|
|
160
|
+
export type EnrichedSession = {
|
|
161
|
+
session: Session;
|
|
162
|
+
agents: AgentInfo[];
|
|
163
|
+
evalRuns: SessionEvalRun[];
|
|
164
|
+
timeline: SpanNode | null;
|
|
165
|
+
route: RouteInfo;
|
|
166
|
+
};
|
|
167
|
+
export declare function sessionGet(client: APIClient, request: SessionGetRequest): Promise<EnrichedSession>;
|
|
168
|
+
export {};
|
|
169
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/api/session/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,WAAW,CAAC;AACzD,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAGxD,eAAO,MAAM,wBAAwB;;iBAEnC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;iBAQ/B,CAAC;AAEH,MAAM,WAAW,QAAQ;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAS9C,CAAC;AAEF,eAAO,MAAM,eAAe;;;;kBAMhB,CAAC;AAEb,eAAO,MAAM,eAAe;;;iBAG1B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKpC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAA+C,CAAC;AAErF,KAAK,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAGlE;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,6CAA6C;AAC7C,MAAM,MAAM,OAAO,GAAG,cAAc,CAAC;AACrC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,wBAAsB,UAAU,CAC/B,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,iBAAiB,GACxB,OAAO,CAAC,eAAe,CAAC,CAkB1B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { APIResponseSchema } from "../api.js";
|
|
3
|
+
import { SessionSchema } from "./list.js";
|
|
4
|
+
import { SessionResponseError } from "./util.js";
|
|
5
|
+
export const _SessionGetRequestSchema = z.object({
|
|
6
|
+
id: z.string().describe('the session id'),
|
|
7
|
+
});
|
|
8
|
+
export const SessionEvalRunSchema = z.object({
|
|
9
|
+
id: z.string().describe('eval run id'),
|
|
10
|
+
created_at: z.string().describe('creation timestamp'),
|
|
11
|
+
eval_id: z.string().describe('evaluation id'),
|
|
12
|
+
pending: z.boolean().describe('pending status'),
|
|
13
|
+
success: z.boolean().describe('success status'),
|
|
14
|
+
error: z.string().nullable().describe('error message'),
|
|
15
|
+
result: z.record(z.string(), z.unknown()).nullable().describe('result object'),
|
|
16
|
+
});
|
|
17
|
+
export const SpanNodeSchema = z.lazy(() => z.object({
|
|
18
|
+
id: z.string().describe('span ID'),
|
|
19
|
+
duration: z.number().describe('duration in milliseconds'),
|
|
20
|
+
operation: z.string().describe('operation name'),
|
|
21
|
+
attributes: z.record(z.string(), z.unknown()).describe('span attributes'),
|
|
22
|
+
children: z.array(SpanNodeSchema).optional().describe('child spans'),
|
|
23
|
+
error: z.string().optional().describe('error message'),
|
|
24
|
+
}));
|
|
25
|
+
export const RouteInfoSchema = z
|
|
26
|
+
.object({
|
|
27
|
+
id: z.string().describe('route id'),
|
|
28
|
+
method: z.string().describe('HTTP method'),
|
|
29
|
+
path: z.string().describe('route path'),
|
|
30
|
+
})
|
|
31
|
+
.nullable();
|
|
32
|
+
export const AgentInfoSchema = z.object({
|
|
33
|
+
name: z.string().describe('agent name'),
|
|
34
|
+
identifier: z.string().describe('agent identifier'),
|
|
35
|
+
});
|
|
36
|
+
export const EnrichedSessionDataSchema = z.object({
|
|
37
|
+
session: SessionSchema,
|
|
38
|
+
agents: z.array(AgentInfoSchema).describe('resolved agents'),
|
|
39
|
+
eval_runs: z.array(SessionEvalRunSchema).describe('eval runs for this session'),
|
|
40
|
+
route: RouteInfoSchema.describe('route information'),
|
|
41
|
+
});
|
|
42
|
+
export const SessionGetResponseSchema = APIResponseSchema(EnrichedSessionDataSchema);
|
|
43
|
+
export async function sessionGet(client, request) {
|
|
44
|
+
const resp = await client.request('GET', `/session/${request.id}`, SessionGetResponseSchema);
|
|
45
|
+
if (resp.success) {
|
|
46
|
+
return {
|
|
47
|
+
session: resp.data.session,
|
|
48
|
+
agents: resp.data.agents,
|
|
49
|
+
evalRuns: resp.data.eval_runs,
|
|
50
|
+
timeline: resp.data.session.timeline ?? null,
|
|
51
|
+
route: resp.data.route,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
throw new SessionResponseError({ message: resp.message });
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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