@agentuity/core 1.0.33 → 1.0.35
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/index.d.ts +2 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -15
- package/dist/index.js.map +1 -1
- package/dist/services/adapter.d.ts +57 -22
- package/dist/services/adapter.d.ts.map +1 -1
- package/dist/services/adapter.js +52 -1
- package/dist/services/adapter.js.map +1 -1
- package/dist/services/api.d.ts +222 -0
- package/dist/services/api.d.ts.map +1 -0
- package/dist/services/api.js +662 -0
- package/dist/services/api.js.map +1 -0
- package/dist/services/apikey/create.d.ts +34 -0
- package/dist/services/apikey/create.d.ts.map +1 -0
- package/dist/services/apikey/create.js +29 -0
- package/dist/services/apikey/create.js.map +1 -0
- package/dist/services/apikey/delete.d.ts.map +1 -0
- package/dist/services/apikey/delete.js.map +1 -0
- package/dist/services/apikey/get.d.ts.map +1 -0
- package/dist/services/apikey/get.js.map +1 -0
- package/dist/services/apikey/index.d.ts.map +1 -0
- package/dist/services/apikey/index.js.map +1 -0
- package/dist/services/apikey/list.d.ts +65 -0
- package/dist/services/apikey/list.d.ts.map +1 -0
- package/dist/services/apikey/list.js +50 -0
- package/dist/services/apikey/list.js.map +1 -0
- package/dist/services/apikey/util.d.ts.map +1 -0
- package/dist/services/apikey/util.js.map +1 -0
- package/dist/services/config.d.ts +22 -0
- package/dist/services/config.d.ts.map +1 -0
- package/dist/services/config.js +55 -0
- package/dist/services/config.js.map +1 -0
- package/dist/services/db/index.d.ts +6 -0
- package/dist/services/db/index.d.ts.map +1 -0
- package/dist/services/db/index.js +6 -0
- package/dist/services/db/index.js.map +1 -0
- package/dist/services/db/logs.d.ts.map +1 -0
- package/dist/services/db/logs.js.map +1 -0
- package/dist/services/db/query.d.ts +40 -0
- package/dist/services/db/query.d.ts.map +1 -0
- package/dist/services/db/query.js +55 -0
- package/dist/services/db/query.js.map +1 -0
- package/dist/services/db/stats.d.ts +146 -0
- package/dist/services/db/stats.d.ts.map +1 -0
- package/dist/services/db/stats.js +94 -0
- package/dist/services/db/stats.js.map +1 -0
- package/dist/services/db/tables.d.ts +50 -0
- package/dist/services/db/tables.d.ts.map +1 -0
- package/dist/services/db/tables.js +64 -0
- package/dist/services/db/tables.js.map +1 -0
- package/dist/services/db/util.d.ts.map +1 -0
- package/dist/services/db/util.js.map +1 -0
- package/dist/services/email/index.d.ts +2 -0
- package/dist/services/email/index.d.ts.map +1 -0
- package/dist/services/email/index.js +2 -0
- package/dist/services/email/index.js.map +1 -0
- package/dist/services/email/service.d.ts +742 -0
- package/dist/services/email/service.d.ts.map +1 -0
- package/dist/services/email/service.js +1107 -0
- package/dist/services/email/service.js.map +1 -0
- package/dist/services/env.d.ts.map +1 -0
- package/dist/services/env.js.map +1 -0
- package/dist/services/eval/events.d.ts +93 -0
- package/dist/services/eval/events.d.ts.map +1 -0
- package/dist/services/eval/events.js +24 -0
- package/dist/services/eval/events.js.map +1 -0
- package/dist/services/eval/get.d.ts.map +1 -0
- package/dist/services/eval/get.js.map +1 -0
- package/dist/services/eval/index.d.ts +6 -0
- package/dist/services/eval/index.d.ts.map +1 -0
- package/dist/services/eval/index.js +6 -0
- package/dist/services/eval/index.js.map +1 -0
- package/dist/services/eval/list.d.ts.map +1 -0
- package/dist/services/eval/list.js.map +1 -0
- package/dist/services/eval/run-get.d.ts.map +1 -0
- package/dist/services/eval/run-get.js.map +1 -0
- package/dist/services/eval/run-list.d.ts.map +1 -0
- package/dist/services/eval/run-list.js.map +1 -0
- package/dist/services/exception.d.ts +28 -9
- package/dist/services/exception.d.ts.map +1 -1
- package/dist/services/exception.js +14 -0
- package/dist/services/exception.js.map +1 -1
- package/dist/services/index.d.ts +26 -12
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +26 -11
- package/dist/services/index.js.map +1 -1
- package/dist/services/keyvalue/index.d.ts +2 -0
- package/dist/services/keyvalue/index.d.ts.map +1 -0
- package/dist/services/keyvalue/index.js +2 -0
- package/dist/services/keyvalue/index.js.map +1 -0
- package/dist/services/keyvalue/service.d.ts +261 -0
- package/dist/services/keyvalue/service.d.ts.map +1 -0
- package/dist/services/keyvalue/service.js +475 -0
- package/dist/services/keyvalue/service.js.map +1 -0
- package/dist/services/logger.d.ts.map +1 -0
- package/dist/services/logger.js.map +1 -0
- package/dist/services/machine/index.d.ts.map +1 -0
- package/dist/services/machine/index.js.map +1 -0
- package/dist/services/machine/machine.d.ts.map +1 -0
- package/dist/services/machine/machine.js +177 -0
- package/dist/services/machine/machine.js.map +1 -0
- package/dist/services/machine/util.d.ts.map +1 -0
- package/dist/services/machine/util.js.map +1 -0
- package/dist/services/org/env-delete.d.ts.map +1 -0
- package/dist/services/org/env-delete.js.map +1 -0
- package/dist/services/org/env-get.d.ts +33 -0
- package/dist/services/org/env-get.d.ts.map +1 -0
- package/dist/services/org/env-get.js +33 -0
- package/dist/services/org/env-get.js.map +1 -0
- package/dist/services/org/env-update.d.ts.map +1 -0
- package/dist/services/org/env-update.js.map +1 -0
- package/dist/services/org/index.d.ts.map +1 -0
- package/dist/services/org/index.js.map +1 -0
- package/dist/services/org/list.d.ts.map +1 -0
- package/dist/services/org/list.js.map +1 -0
- package/dist/services/org/resources.d.ts +150 -0
- package/dist/services/org/resources.d.ts.map +1 -0
- package/dist/services/org/resources.js +111 -0
- package/dist/services/org/resources.js.map +1 -0
- package/dist/services/org/util.d.ts.map +1 -0
- package/dist/services/org/util.js.map +1 -0
- package/dist/services/pagination.d.ts +38 -11
- package/dist/services/pagination.d.ts.map +1 -1
- package/dist/services/pagination.js +30 -1
- package/dist/services/pagination.js.map +1 -1
- package/dist/services/project/agent.d.ts.map +1 -0
- package/dist/services/project/agent.js.map +1 -0
- package/dist/services/project/create.d.ts.map +1 -0
- package/dist/services/project/create.js.map +1 -0
- package/dist/services/project/delete.d.ts.map +1 -0
- package/dist/services/project/delete.js +15 -0
- package/dist/services/project/delete.js.map +1 -0
- package/dist/services/project/deploy.d.ts +468 -0
- package/dist/services/project/deploy.d.ts.map +1 -0
- package/dist/services/project/deploy.js.map +1 -0
- package/dist/services/project/deployment.d.ts.map +1 -0
- package/dist/services/project/deployment.js +180 -0
- package/dist/services/project/deployment.js.map +1 -0
- package/dist/services/project/env-delete.d.ts.map +1 -0
- package/dist/services/project/env-delete.js.map +1 -0
- package/dist/services/project/env-update.d.ts.map +1 -0
- package/dist/services/project/env-update.js.map +1 -0
- package/dist/services/project/exists.d.ts.map +1 -0
- package/dist/services/project/exists.js.map +1 -0
- package/dist/services/project/get.d.ts.map +1 -0
- package/dist/services/project/get.js.map +1 -0
- package/dist/services/project/hostname.d.ts.map +1 -0
- package/dist/services/project/hostname.js +43 -0
- package/dist/services/project/hostname.js.map +1 -0
- package/dist/services/project/index.d.ts.map +1 -0
- package/dist/services/project/index.js.map +1 -0
- package/dist/services/project/list.d.ts.map +1 -0
- package/dist/services/project/list.js.map +1 -0
- package/dist/services/project/malware.d.ts.map +1 -0
- package/dist/services/project/malware.js +57 -0
- package/dist/services/project/malware.js.map +1 -0
- package/dist/services/project/update-region.d.ts.map +1 -0
- package/dist/services/project/update-region.js.map +1 -0
- package/dist/services/project/util.d.ts.map +1 -0
- package/dist/services/project/util.js.map +1 -0
- package/dist/services/queue/analytics.d.ts +261 -0
- package/dist/services/queue/analytics.d.ts.map +1 -0
- package/dist/services/queue/analytics.js +254 -0
- package/dist/services/queue/analytics.js.map +1 -0
- package/dist/services/queue/consumers.d.ts +48 -0
- package/dist/services/queue/consumers.d.ts.map +1 -0
- package/dist/services/queue/consumers.js +43 -0
- package/dist/services/queue/consumers.js.map +1 -0
- package/dist/services/queue/destinations.d.ts +269 -0
- package/dist/services/queue/destinations.d.ts.map +1 -0
- package/dist/services/queue/destinations.js +215 -0
- package/dist/services/queue/destinations.js.map +1 -0
- package/dist/services/queue/dlq.d.ts +170 -0
- package/dist/services/queue/dlq.d.ts.map +1 -0
- package/dist/services/queue/dlq.js.map +1 -0
- package/dist/services/queue/index.d.ts +58 -0
- package/dist/services/queue/index.d.ts.map +1 -0
- package/dist/services/queue/index.js +98 -0
- package/dist/services/queue/index.js.map +1 -0
- package/dist/services/queue/messages.d.ts +511 -0
- package/dist/services/queue/messages.d.ts.map +1 -0
- package/dist/services/queue/messages.js.map +1 -0
- package/dist/services/queue/queues.d.ts +228 -0
- package/dist/services/queue/queues.d.ts.map +1 -0
- package/dist/services/queue/queues.js.map +1 -0
- package/dist/services/queue/service.d.ts +309 -0
- package/dist/services/queue/service.d.ts.map +1 -0
- package/dist/services/queue/service.js +456 -0
- package/dist/services/queue/service.js.map +1 -0
- package/dist/services/queue/sources.d.ts +252 -0
- package/dist/services/queue/sources.d.ts.map +1 -0
- package/dist/services/queue/sources.js +249 -0
- package/dist/services/queue/sources.js.map +1 -0
- package/dist/services/queue/types.d.ts +1335 -0
- package/dist/services/queue/types.d.ts.map +1 -0
- package/dist/services/queue/types.js +1382 -0
- package/dist/services/queue/types.js.map +1 -0
- package/dist/services/queue/util.d.ts +278 -0
- package/dist/services/queue/util.d.ts.map +1 -0
- package/dist/services/queue/util.js +233 -0
- package/dist/services/queue/util.js.map +1 -0
- package/dist/services/queue/validation.d.ts +218 -0
- package/dist/services/queue/validation.d.ts.map +1 -0
- package/dist/services/queue/validation.js +498 -0
- package/dist/services/queue/validation.js.map +1 -0
- package/dist/services/queue/websocket.d.ts +154 -0
- package/dist/services/queue/websocket.d.ts.map +1 -0
- package/dist/services/queue/websocket.js +491 -0
- package/dist/services/queue/websocket.js.map +1 -0
- package/dist/services/region/create.d.ts.map +1 -0
- package/dist/services/region/create.js.map +1 -0
- package/dist/services/region/delete.d.ts.map +1 -0
- package/dist/services/region/delete.js.map +1 -0
- package/dist/services/region/index.d.ts.map +1 -0
- package/dist/services/region/index.js.map +1 -0
- package/dist/services/region/list.d.ts.map +1 -0
- package/dist/services/region/list.js.map +1 -0
- package/dist/services/region/resources.d.ts.map +1 -0
- package/dist/services/region/resources.js.map +1 -0
- package/dist/services/region/util.d.ts.map +1 -0
- package/dist/services/region/util.js.map +1 -0
- package/dist/services/sandbox/cli-list.d.ts +103 -0
- package/dist/services/sandbox/cli-list.d.ts.map +1 -0
- package/dist/services/sandbox/cli-list.js +106 -0
- package/dist/services/sandbox/cli-list.js.map +1 -0
- package/dist/services/sandbox/client.d.ts +173 -0
- package/dist/services/sandbox/client.d.ts.map +1 -0
- package/dist/services/sandbox/client.js +302 -0
- package/dist/services/sandbox/client.js.map +1 -0
- package/dist/services/sandbox/create.d.ts +193 -0
- package/dist/services/sandbox/create.d.ts.map +1 -0
- package/dist/services/sandbox/create.js +215 -0
- package/dist/services/sandbox/create.js.map +1 -0
- package/dist/services/sandbox/destroy.d.ts +23 -0
- package/dist/services/sandbox/destroy.d.ts.map +1 -0
- package/dist/services/sandbox/destroy.js +30 -0
- package/dist/services/sandbox/destroy.js.map +1 -0
- package/dist/services/sandbox/disk-checkpoint.d.ts +108 -0
- package/dist/services/sandbox/disk-checkpoint.d.ts.map +1 -0
- package/dist/services/sandbox/disk-checkpoint.js +124 -0
- package/dist/services/sandbox/disk-checkpoint.js.map +1 -0
- package/dist/services/sandbox/execute.d.ts +96 -0
- package/dist/services/sandbox/execute.d.ts.map +1 -0
- package/dist/services/sandbox/execute.js +109 -0
- package/dist/services/sandbox/execute.js.map +1 -0
- package/dist/services/sandbox/execution.d.ts +145 -0
- package/dist/services/sandbox/execution.d.ts.map +1 -0
- package/dist/services/sandbox/execution.js +113 -0
- package/dist/services/sandbox/execution.js.map +1 -0
- package/dist/services/sandbox/files.d.ts +269 -0
- package/dist/services/sandbox/files.d.ts.map +1 -0
- package/dist/services/sandbox/files.js +454 -0
- package/dist/services/sandbox/files.js.map +1 -0
- package/dist/services/sandbox/get.d.ts +284 -0
- package/dist/services/sandbox/get.d.ts.map +1 -0
- package/dist/services/sandbox/get.js +231 -0
- package/dist/services/sandbox/get.js.map +1 -0
- package/dist/services/sandbox/getStatus.d.ts +20 -0
- package/dist/services/sandbox/getStatus.d.ts.map +1 -0
- package/dist/services/sandbox/getStatus.js +36 -0
- package/dist/services/sandbox/getStatus.js.map +1 -0
- package/dist/services/sandbox/index.d.ts +40 -0
- package/dist/services/sandbox/index.d.ts.map +1 -0
- package/dist/services/sandbox/index.js +21 -0
- package/dist/services/sandbox/index.js.map +1 -0
- package/dist/services/sandbox/list.d.ts +327 -0
- package/dist/services/sandbox/list.d.ts.map +1 -0
- package/dist/services/sandbox/list.js +204 -0
- package/dist/services/sandbox/list.js.map +1 -0
- package/dist/services/sandbox/pause.d.ts +23 -0
- package/dist/services/sandbox/pause.d.ts.map +1 -0
- package/dist/services/sandbox/pause.js +30 -0
- package/dist/services/sandbox/pause.js.map +1 -0
- package/dist/services/sandbox/resolve.d.ts +75 -0
- package/dist/services/sandbox/resolve.d.ts.map +1 -0
- package/dist/services/sandbox/resolve.js +76 -0
- package/dist/services/sandbox/resolve.js.map +1 -0
- package/dist/services/sandbox/resume.d.ts +23 -0
- package/dist/services/sandbox/resume.d.ts.map +1 -0
- package/dist/services/sandbox/resume.js +30 -0
- package/dist/services/sandbox/resume.js.map +1 -0
- package/dist/services/sandbox/run.d.ts +71 -0
- package/dist/services/sandbox/run.d.ts.map +1 -0
- package/dist/services/sandbox/run.js +355 -0
- package/dist/services/sandbox/run.js.map +1 -0
- package/dist/services/sandbox/runtime.d.ts +94 -0
- package/dist/services/sandbox/runtime.d.ts.map +1 -0
- package/dist/services/sandbox/runtime.js +82 -0
- package/dist/services/sandbox/runtime.js.map +1 -0
- package/dist/services/sandbox/snapshot-build.d.ts.map +1 -0
- package/dist/services/sandbox/snapshot-build.js.map +1 -0
- package/dist/services/sandbox/snapshot.d.ts +596 -0
- package/dist/services/sandbox/snapshot.d.ts.map +1 -0
- package/dist/services/sandbox/snapshot.js +612 -0
- package/dist/services/sandbox/snapshot.js.map +1 -0
- package/dist/services/sandbox/types.d.ts +851 -0
- package/dist/services/sandbox/types.d.ts.map +1 -0
- package/dist/services/sandbox/types.js +674 -0
- package/dist/services/sandbox/types.js.map +1 -0
- package/dist/services/sandbox/util.d.ts +295 -0
- package/dist/services/sandbox/util.d.ts.map +1 -0
- package/dist/services/sandbox/util.js +233 -0
- package/dist/services/sandbox/util.js.map +1 -0
- package/dist/services/schedule/index.d.ts +2 -0
- package/dist/services/schedule/index.d.ts.map +1 -0
- package/dist/services/schedule/index.js +2 -0
- package/dist/services/schedule/index.js.map +1 -0
- package/dist/services/schedule/service.d.ts +439 -0
- package/dist/services/schedule/service.d.ts.map +1 -0
- package/dist/services/schedule/service.js +701 -0
- package/dist/services/schedule/service.js.map +1 -0
- package/dist/services/session/events.d.ts +127 -0
- package/dist/services/session/events.d.ts.map +1 -0
- package/dist/services/session/events.js +42 -0
- package/dist/services/session/events.js.map +1 -0
- package/dist/services/session/get.d.ts +170 -0
- package/dist/services/session/get.d.ts.map +1 -0
- package/dist/services/session/get.js.map +1 -0
- package/dist/services/session/index.d.ts +5 -0
- package/dist/services/session/index.d.ts.map +1 -0
- package/dist/services/session/index.js +5 -0
- package/dist/services/session/index.js.map +1 -0
- package/dist/services/session/list.d.ts +150 -0
- package/dist/services/session/list.d.ts.map +1 -0
- package/dist/services/session/list.js +117 -0
- package/dist/services/session/list.js.map +1 -0
- package/dist/services/session/logs.d.ts.map +1 -0
- package/dist/services/session/logs.js.map +1 -0
- package/dist/services/session/util.d.ts.map +1 -0
- package/dist/services/session/util.js.map +1 -0
- package/dist/services/stats.d.ts +261 -0
- package/dist/services/stats.d.ts.map +1 -0
- package/dist/services/stats.js +181 -0
- package/dist/services/stats.js.map +1 -0
- package/dist/services/storage/config.d.ts.map +1 -0
- package/dist/services/storage/config.js.map +1 -0
- package/dist/services/storage/index.d.ts.map +1 -0
- package/dist/services/storage/index.js.map +1 -0
- package/dist/services/storage/objects.d.ts +158 -0
- package/dist/services/storage/objects.d.ts.map +1 -0
- package/dist/services/storage/objects.js +161 -0
- package/dist/services/storage/objects.js.map +1 -0
- package/dist/services/storage/types.d.ts.map +1 -0
- package/dist/services/storage/types.js.map +1 -0
- package/dist/services/storage/util.d.ts.map +1 -0
- package/dist/services/storage/util.js.map +1 -0
- package/dist/services/stream/get.d.ts.map +1 -0
- package/dist/services/stream/get.js.map +1 -0
- package/dist/services/stream/index.d.ts +5 -0
- package/dist/services/stream/index.d.ts.map +1 -0
- package/dist/services/stream/index.js +5 -0
- package/dist/services/stream/index.js.map +1 -0
- package/dist/services/stream/list.d.ts +96 -0
- package/dist/services/stream/list.d.ts.map +1 -0
- package/dist/services/stream/list.js +92 -0
- package/dist/services/stream/list.js.map +1 -0
- package/dist/services/stream/service.d.ts +264 -0
- package/dist/services/stream/service.d.ts.map +1 -0
- package/dist/services/stream/service.js +631 -0
- package/dist/services/stream/service.js.map +1 -0
- package/dist/services/stream/util.d.ts.map +1 -0
- package/dist/services/stream/util.js.map +1 -0
- package/dist/services/task/index.d.ts +2 -0
- package/dist/services/task/index.d.ts.map +1 -0
- package/dist/services/task/index.js +2 -0
- package/dist/services/task/index.js.map +1 -0
- package/dist/services/task/service.d.ts +1491 -0
- package/dist/services/task/service.d.ts.map +1 -0
- package/dist/services/task/service.js +1887 -0
- package/dist/services/task/service.js.map +1 -0
- package/dist/services/thread/delete.d.ts.map +1 -0
- package/dist/services/thread/delete.js.map +1 -0
- package/dist/services/thread/get.d.ts.map +1 -0
- package/dist/services/thread/get.js.map +1 -0
- package/dist/services/thread/index.d.ts.map +1 -0
- package/dist/services/thread/index.js.map +1 -0
- package/dist/services/thread/list.d.ts +75 -0
- package/dist/services/thread/list.d.ts.map +1 -0
- package/dist/services/thread/list.js +65 -0
- package/dist/services/thread/list.js.map +1 -0
- package/dist/services/thread/util.d.ts.map +1 -0
- package/dist/services/thread/util.js.map +1 -0
- package/dist/services/user/index.d.ts.map +1 -0
- package/dist/services/user/index.js.map +1 -0
- package/dist/services/user/util.d.ts.map +1 -0
- package/dist/services/user/util.js.map +1 -0
- package/dist/services/user/whoami.d.ts.map +1 -0
- package/dist/services/user/whoami.js.map +1 -0
- package/dist/services/vector/index.d.ts +2 -0
- package/dist/services/vector/index.d.ts.map +1 -0
- package/dist/services/vector/index.js +2 -0
- package/dist/services/vector/index.js.map +1 -0
- package/dist/services/vector/service.d.ts +459 -0
- package/dist/services/vector/service.d.ts.map +1 -0
- package/dist/services/vector/service.js +707 -0
- package/dist/services/vector/service.js.map +1 -0
- package/dist/services/webhook/analytics.d.ts +77 -0
- package/dist/services/webhook/analytics.d.ts.map +1 -0
- package/dist/services/webhook/analytics.js +56 -0
- package/dist/services/webhook/analytics.js.map +1 -0
- package/dist/services/webhook/deliveries.d.ts +94 -0
- package/dist/services/webhook/deliveries.d.ts.map +1 -0
- package/dist/services/webhook/deliveries.js.map +1 -0
- package/dist/services/webhook/destinations.d.ts +140 -0
- package/dist/services/webhook/destinations.d.ts.map +1 -0
- package/dist/services/webhook/destinations.js.map +1 -0
- package/dist/services/webhook/index.d.ts +43 -0
- package/dist/services/webhook/index.d.ts.map +1 -0
- package/dist/services/webhook/index.js +64 -0
- package/dist/services/webhook/index.js.map +1 -0
- package/dist/services/webhook/receipts.d.ts.map +1 -0
- package/dist/services/webhook/receipts.js.map +1 -0
- package/dist/services/webhook/service.d.ts +374 -0
- package/dist/services/webhook/service.d.ts.map +1 -0
- package/dist/services/webhook/service.js +663 -0
- package/dist/services/webhook/service.js.map +1 -0
- package/dist/services/webhook/types.d.ts +182 -0
- package/dist/services/webhook/types.d.ts.map +1 -0
- package/dist/services/webhook/types.js +188 -0
- package/dist/services/webhook/types.js.map +1 -0
- package/dist/services/webhook/util.d.ts.map +1 -0
- package/dist/services/webhook/util.js.map +1 -0
- package/dist/services/webhook/webhooks.d.ts +150 -0
- package/dist/services/webhook/webhooks.d.ts.map +1 -0
- package/dist/services/webhook/webhooks.js.map +1 -0
- package/package.json +59 -7
- package/src/index.ts +6 -247
- package/src/services/adapter.ts +69 -24
- package/src/services/api.ts +951 -0
- package/src/services/apikey/create.ts +48 -0
- package/src/services/apikey/list.ts +66 -0
- package/src/services/config.ts +65 -0
- package/src/services/db/index.ts +42 -0
- package/src/services/db/query.ts +69 -0
- package/src/services/db/stats.ts +121 -0
- package/src/services/db/tables.ts +94 -0
- package/src/services/email/index.ts +1 -0
- package/src/services/email/service.ts +1476 -0
- package/src/services/eval/index.ts +29 -0
- package/src/services/exception.ts +16 -7
- package/src/services/index.ts +29 -28
- package/src/services/keyvalue/index.ts +1 -0
- package/src/services/keyvalue/service.ts +677 -0
- package/src/services/machine/machine.ts +228 -0
- package/src/services/org/env-get.ts +48 -0
- package/src/services/org/resources.ts +140 -0
- package/src/services/pagination.ts +40 -11
- package/src/services/project/delete.ts +27 -0
- package/src/services/project/deploy.ts +433 -0
- package/src/services/project/deployment.ts +250 -0
- package/src/services/project/hostname.ts +79 -0
- package/src/services/project/malware.ts +85 -0
- package/src/services/queue/analytics.ts +343 -0
- package/src/services/queue/consumers.ts +56 -0
- package/src/services/queue/destinations.ts +329 -0
- package/src/services/queue/index.ts +339 -0
- package/src/services/queue/service.ts +634 -0
- package/src/services/queue/sources.ts +364 -0
- package/src/services/queue/types.ts +1666 -0
- package/src/services/queue/util.ts +275 -0
- package/src/services/queue/validation.ts +541 -0
- package/src/services/queue/websocket.ts +578 -0
- package/src/services/sandbox/cli-list.ts +117 -0
- package/src/services/sandbox/client.ts +435 -0
- package/src/services/sandbox/create.ts +249 -0
- package/src/services/sandbox/destroy.ts +43 -0
- package/src/services/sandbox/disk-checkpoint.ts +184 -0
- package/src/services/sandbox/execute.ts +134 -0
- package/src/services/sandbox/execution.ts +144 -0
- package/src/services/sandbox/files.ts +608 -0
- package/src/services/sandbox/get.ts +262 -0
- package/src/services/sandbox/getStatus.ts +51 -0
- package/src/services/sandbox/index.ts +230 -0
- package/src/services/sandbox/list.ts +234 -0
- package/src/services/sandbox/pause.ts +41 -0
- package/src/services/sandbox/resolve.ts +96 -0
- package/src/services/sandbox/resume.ts +41 -0
- package/src/services/sandbox/run.ts +441 -0
- package/src/services/sandbox/runtime.ts +106 -0
- package/src/services/sandbox/snapshot.ts +791 -0
- package/src/services/sandbox/types.ts +798 -0
- package/src/services/sandbox/util.ts +279 -0
- package/src/services/schedule/index.ts +1 -0
- package/src/services/schedule/service.ts +814 -0
- package/src/services/session/get.ts +108 -0
- package/src/services/session/index.ts +4 -0
- package/src/services/session/list.ts +143 -0
- package/src/services/stats.ts +232 -0
- package/src/services/storage/objects.ts +256 -0
- package/src/services/stream/index.ts +14 -0
- package/src/services/stream/list.ts +105 -0
- package/src/services/stream/service.ts +929 -0
- package/src/services/task/index.ts +1 -0
- package/src/services/task/service.ts +2573 -0
- package/src/services/thread/list.ts +81 -0
- package/src/services/vector/index.ts +1 -0
- package/src/services/vector/service.ts +1242 -0
- package/src/services/webhook/analytics.ts +80 -0
- package/src/services/webhook/index.ts +160 -0
- package/src/services/webhook/service.ts +900 -0
- package/src/services/webhook/types.ts +277 -0
- package/dist/api/api.d.ts +0 -226
- package/dist/api/api.d.ts.map +0 -1
- package/dist/api/api.js +0 -635
- package/dist/api/api.js.map +0 -1
- package/dist/api/apikey/create.d.ts +0 -33
- package/dist/api/apikey/create.d.ts.map +0 -1
- package/dist/api/apikey/create.js +0 -23
- package/dist/api/apikey/create.js.map +0 -1
- package/dist/api/apikey/delete.d.ts.map +0 -1
- package/dist/api/apikey/delete.js.map +0 -1
- package/dist/api/apikey/get.d.ts.map +0 -1
- package/dist/api/apikey/get.js.map +0 -1
- package/dist/api/apikey/index.d.ts.map +0 -1
- package/dist/api/apikey/index.js.map +0 -1
- package/dist/api/apikey/list.d.ts +0 -64
- package/dist/api/apikey/list.d.ts.map +0 -1
- package/dist/api/apikey/list.js +0 -46
- package/dist/api/apikey/list.js.map +0 -1
- package/dist/api/apikey/util.d.ts.map +0 -1
- package/dist/api/apikey/util.js.map +0 -1
- package/dist/api/config.d.ts +0 -20
- package/dist/api/config.d.ts.map +0 -1
- package/dist/api/config.js +0 -43
- package/dist/api/config.js.map +0 -1
- package/dist/api/db/index.d.ts +0 -5
- package/dist/api/db/index.d.ts.map +0 -1
- package/dist/api/db/index.js +0 -5
- package/dist/api/db/index.js.map +0 -1
- package/dist/api/db/logs.d.ts.map +0 -1
- package/dist/api/db/logs.js.map +0 -1
- package/dist/api/db/query.d.ts +0 -39
- package/dist/api/db/query.d.ts.map +0 -1
- package/dist/api/db/query.js +0 -49
- package/dist/api/db/query.js.map +0 -1
- package/dist/api/db/tables.d.ts +0 -49
- package/dist/api/db/tables.d.ts.map +0 -1
- package/dist/api/db/tables.js +0 -59
- package/dist/api/db/tables.js.map +0 -1
- package/dist/api/db/util.d.ts.map +0 -1
- package/dist/api/db/util.js.map +0 -1
- package/dist/api/env.d.ts.map +0 -1
- package/dist/api/env.js.map +0 -1
- package/dist/api/eval/get.d.ts.map +0 -1
- package/dist/api/eval/get.js.map +0 -1
- package/dist/api/eval/index.d.ts +0 -5
- package/dist/api/eval/index.d.ts.map +0 -1
- package/dist/api/eval/index.js +0 -5
- package/dist/api/eval/index.js.map +0 -1
- package/dist/api/eval/list.d.ts.map +0 -1
- package/dist/api/eval/list.js.map +0 -1
- package/dist/api/eval/run-get.d.ts.map +0 -1
- package/dist/api/eval/run-get.js.map +0 -1
- package/dist/api/eval/run-list.d.ts.map +0 -1
- package/dist/api/eval/run-list.js.map +0 -1
- package/dist/api/index.d.ts +0 -21
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -21
- package/dist/api/index.js.map +0 -1
- package/dist/api/logger.d.ts.map +0 -1
- package/dist/api/logger.js.map +0 -1
- package/dist/api/machine/index.d.ts.map +0 -1
- package/dist/api/machine/index.js.map +0 -1
- package/dist/api/machine/machine.d.ts.map +0 -1
- package/dist/api/machine/machine.js +0 -109
- package/dist/api/machine/machine.js.map +0 -1
- package/dist/api/machine/util.d.ts.map +0 -1
- package/dist/api/machine/util.js.map +0 -1
- package/dist/api/org/env-delete.d.ts.map +0 -1
- package/dist/api/org/env-delete.js.map +0 -1
- package/dist/api/org/env-get.d.ts +0 -33
- package/dist/api/org/env-get.d.ts.map +0 -1
- package/dist/api/org/env-get.js +0 -26
- package/dist/api/org/env-get.js.map +0 -1
- package/dist/api/org/env-update.d.ts.map +0 -1
- package/dist/api/org/env-update.js.map +0 -1
- package/dist/api/org/index.d.ts.map +0 -1
- package/dist/api/org/index.js.map +0 -1
- package/dist/api/org/list.d.ts.map +0 -1
- package/dist/api/org/list.js.map +0 -1
- package/dist/api/org/resources.d.ts +0 -141
- package/dist/api/org/resources.d.ts.map +0 -1
- package/dist/api/org/resources.js +0 -97
- package/dist/api/org/resources.js.map +0 -1
- package/dist/api/org/util.d.ts.map +0 -1
- package/dist/api/org/util.js.map +0 -1
- package/dist/api/project/agent.d.ts.map +0 -1
- package/dist/api/project/agent.js.map +0 -1
- package/dist/api/project/create.d.ts.map +0 -1
- package/dist/api/project/create.js.map +0 -1
- package/dist/api/project/delete.d.ts.map +0 -1
- package/dist/api/project/delete.js +0 -13
- package/dist/api/project/delete.js.map +0 -1
- package/dist/api/project/deploy.d.ts +0 -490
- package/dist/api/project/deploy.d.ts.map +0 -1
- package/dist/api/project/deploy.js.map +0 -1
- package/dist/api/project/deployment.d.ts.map +0 -1
- package/dist/api/project/deployment.js +0 -127
- package/dist/api/project/deployment.js.map +0 -1
- package/dist/api/project/env-delete.d.ts.map +0 -1
- package/dist/api/project/env-delete.js.map +0 -1
- package/dist/api/project/env-update.d.ts.map +0 -1
- package/dist/api/project/env-update.js.map +0 -1
- package/dist/api/project/exists.d.ts.map +0 -1
- package/dist/api/project/exists.js.map +0 -1
- package/dist/api/project/get.d.ts.map +0 -1
- package/dist/api/project/get.js.map +0 -1
- package/dist/api/project/hostname.d.ts.map +0 -1
- package/dist/api/project/hostname.js +0 -37
- package/dist/api/project/hostname.js.map +0 -1
- package/dist/api/project/index.d.ts.map +0 -1
- package/dist/api/project/index.js.map +0 -1
- package/dist/api/project/list.d.ts.map +0 -1
- package/dist/api/project/list.js.map +0 -1
- package/dist/api/project/malware.d.ts.map +0 -1
- package/dist/api/project/malware.js +0 -42
- package/dist/api/project/malware.js.map +0 -1
- package/dist/api/project/update-region.d.ts.map +0 -1
- package/dist/api/project/update-region.js.map +0 -1
- package/dist/api/project/util.d.ts.map +0 -1
- package/dist/api/project/util.js.map +0 -1
- package/dist/api/queue/analytics.d.ts +0 -250
- package/dist/api/queue/analytics.d.ts.map +0 -1
- package/dist/api/queue/analytics.js +0 -233
- package/dist/api/queue/analytics.js.map +0 -1
- package/dist/api/queue/destinations.d.ts +0 -202
- package/dist/api/queue/destinations.d.ts.map +0 -1
- package/dist/api/queue/destinations.js +0 -168
- package/dist/api/queue/destinations.js.map +0 -1
- package/dist/api/queue/dlq.d.ts +0 -168
- package/dist/api/queue/dlq.d.ts.map +0 -1
- package/dist/api/queue/dlq.js.map +0 -1
- package/dist/api/queue/index.d.ts +0 -56
- package/dist/api/queue/index.d.ts.map +0 -1
- package/dist/api/queue/index.js +0 -90
- package/dist/api/queue/index.js.map +0 -1
- package/dist/api/queue/messages.d.ts +0 -503
- package/dist/api/queue/messages.d.ts.map +0 -1
- package/dist/api/queue/messages.js.map +0 -1
- package/dist/api/queue/queues.d.ts +0 -226
- package/dist/api/queue/queues.d.ts.map +0 -1
- package/dist/api/queue/queues.js.map +0 -1
- package/dist/api/queue/sources.d.ts +0 -202
- package/dist/api/queue/sources.d.ts.map +0 -1
- package/dist/api/queue/sources.js +0 -202
- package/dist/api/queue/sources.js.map +0 -1
- package/dist/api/queue/types.d.ts +0 -1218
- package/dist/api/queue/types.d.ts.map +0 -1
- package/dist/api/queue/types.js +0 -1002
- package/dist/api/queue/types.js.map +0 -1
- package/dist/api/queue/util.d.ts +0 -278
- package/dist/api/queue/util.d.ts.map +0 -1
- package/dist/api/queue/util.js +0 -233
- package/dist/api/queue/util.js.map +0 -1
- package/dist/api/queue/validation.d.ts +0 -247
- package/dist/api/queue/validation.d.ts.map +0 -1
- package/dist/api/queue/validation.js +0 -513
- package/dist/api/queue/validation.js.map +0 -1
- package/dist/api/queue/websocket.d.ts +0 -172
- package/dist/api/queue/websocket.d.ts.map +0 -1
- package/dist/api/queue/websocket.js +0 -396
- package/dist/api/queue/websocket.js.map +0 -1
- package/dist/api/region/create.d.ts.map +0 -1
- package/dist/api/region/create.js.map +0 -1
- package/dist/api/region/delete.d.ts.map +0 -1
- package/dist/api/region/delete.js.map +0 -1
- package/dist/api/region/index.d.ts.map +0 -1
- package/dist/api/region/index.js.map +0 -1
- package/dist/api/region/list.d.ts.map +0 -1
- package/dist/api/region/list.js.map +0 -1
- package/dist/api/region/resources.d.ts.map +0 -1
- package/dist/api/region/resources.js.map +0 -1
- package/dist/api/region/util.d.ts.map +0 -1
- package/dist/api/region/util.js.map +0 -1
- package/dist/api/sandbox/cli-list.d.ts +0 -114
- package/dist/api/sandbox/cli-list.d.ts.map +0 -1
- package/dist/api/sandbox/cli-list.js +0 -71
- package/dist/api/sandbox/cli-list.js.map +0 -1
- package/dist/api/sandbox/client.d.ts +0 -192
- package/dist/api/sandbox/client.d.ts.map +0 -1
- package/dist/api/sandbox/client.js +0 -262
- package/dist/api/sandbox/client.js.map +0 -1
- package/dist/api/sandbox/create.d.ts +0 -118
- package/dist/api/sandbox/create.d.ts.map +0 -1
- package/dist/api/sandbox/create.js +0 -211
- package/dist/api/sandbox/create.js.map +0 -1
- package/dist/api/sandbox/destroy.d.ts +0 -22
- package/dist/api/sandbox/destroy.d.ts.map +0 -1
- package/dist/api/sandbox/destroy.js +0 -25
- package/dist/api/sandbox/destroy.js.map +0 -1
- package/dist/api/sandbox/disk-checkpoint.d.ts +0 -104
- package/dist/api/sandbox/disk-checkpoint.d.ts.map +0 -1
- package/dist/api/sandbox/disk-checkpoint.js +0 -104
- package/dist/api/sandbox/disk-checkpoint.js.map +0 -1
- package/dist/api/sandbox/execute.d.ts +0 -69
- package/dist/api/sandbox/execute.d.ts.map +0 -1
- package/dist/api/sandbox/execute.js +0 -103
- package/dist/api/sandbox/execute.js.map +0 -1
- package/dist/api/sandbox/execution.d.ts +0 -169
- package/dist/api/sandbox/execution.d.ts.map +0 -1
- package/dist/api/sandbox/execution.js +0 -118
- package/dist/api/sandbox/execution.js.map +0 -1
- package/dist/api/sandbox/files.d.ts +0 -261
- package/dist/api/sandbox/files.d.ts.map +0 -1
- package/dist/api/sandbox/files.js +0 -386
- package/dist/api/sandbox/files.js.map +0 -1
- package/dist/api/sandbox/get.d.ts +0 -283
- package/dist/api/sandbox/get.d.ts.map +0 -1
- package/dist/api/sandbox/get.js +0 -215
- package/dist/api/sandbox/get.js.map +0 -1
- package/dist/api/sandbox/getStatus.d.ts +0 -16
- package/dist/api/sandbox/getStatus.d.ts.map +0 -1
- package/dist/api/sandbox/getStatus.js +0 -32
- package/dist/api/sandbox/getStatus.js.map +0 -1
- package/dist/api/sandbox/index.d.ts +0 -39
- package/dist/api/sandbox/index.d.ts.map +0 -1
- package/dist/api/sandbox/index.js +0 -20
- package/dist/api/sandbox/index.js.map +0 -1
- package/dist/api/sandbox/list.d.ts +0 -293
- package/dist/api/sandbox/list.d.ts.map +0 -1
- package/dist/api/sandbox/list.js +0 -191
- package/dist/api/sandbox/list.js.map +0 -1
- package/dist/api/sandbox/pause.d.ts +0 -22
- package/dist/api/sandbox/pause.d.ts.map +0 -1
- package/dist/api/sandbox/pause.js +0 -25
- package/dist/api/sandbox/pause.js.map +0 -1
- package/dist/api/sandbox/resolve.d.ts +0 -82
- package/dist/api/sandbox/resolve.d.ts.map +0 -1
- package/dist/api/sandbox/resolve.js +0 -71
- package/dist/api/sandbox/resolve.js.map +0 -1
- package/dist/api/sandbox/resume.d.ts +0 -22
- package/dist/api/sandbox/resume.d.ts.map +0 -1
- package/dist/api/sandbox/resume.js +0 -25
- package/dist/api/sandbox/resume.js.map +0 -1
- package/dist/api/sandbox/run.d.ts +0 -28
- package/dist/api/sandbox/run.d.ts.map +0 -1
- package/dist/api/sandbox/run.js +0 -342
- package/dist/api/sandbox/run.js.map +0 -1
- package/dist/api/sandbox/runtime.d.ts +0 -83
- package/dist/api/sandbox/runtime.d.ts.map +0 -1
- package/dist/api/sandbox/runtime.js +0 -78
- package/dist/api/sandbox/runtime.js.map +0 -1
- package/dist/api/sandbox/snapshot-build.d.ts.map +0 -1
- package/dist/api/sandbox/snapshot-build.js.map +0 -1
- package/dist/api/sandbox/snapshot.d.ts +0 -595
- package/dist/api/sandbox/snapshot.d.ts.map +0 -1
- package/dist/api/sandbox/snapshot.js +0 -598
- package/dist/api/sandbox/snapshot.js.map +0 -1
- package/dist/api/sandbox/util.d.ts +0 -284
- package/dist/api/sandbox/util.d.ts.map +0 -1
- package/dist/api/sandbox/util.js +0 -210
- package/dist/api/sandbox/util.js.map +0 -1
- package/dist/api/services/index.d.ts +0 -2
- package/dist/api/services/index.d.ts.map +0 -1
- package/dist/api/services/index.js +0 -2
- package/dist/api/services/index.js.map +0 -1
- package/dist/api/services/stats.d.ts +0 -263
- package/dist/api/services/stats.d.ts.map +0 -1
- package/dist/api/services/stats.js +0 -144
- package/dist/api/services/stats.js.map +0 -1
- package/dist/api/session/get.d.ts +0 -169
- package/dist/api/session/get.d.ts.map +0 -1
- package/dist/api/session/get.js.map +0 -1
- package/dist/api/session/index.d.ts +0 -4
- package/dist/api/session/index.d.ts.map +0 -1
- package/dist/api/session/index.js +0 -4
- package/dist/api/session/index.js.map +0 -1
- package/dist/api/session/list.d.ts +0 -143
- package/dist/api/session/list.d.ts.map +0 -1
- package/dist/api/session/list.js +0 -91
- package/dist/api/session/list.js.map +0 -1
- package/dist/api/session/logs.d.ts.map +0 -1
- package/dist/api/session/logs.js.map +0 -1
- package/dist/api/session/util.d.ts.map +0 -1
- package/dist/api/session/util.js.map +0 -1
- package/dist/api/storage/config.d.ts.map +0 -1
- package/dist/api/storage/config.js.map +0 -1
- package/dist/api/storage/index.d.ts.map +0 -1
- package/dist/api/storage/index.js.map +0 -1
- package/dist/api/storage/objects.d.ts +0 -155
- package/dist/api/storage/objects.d.ts.map +0 -1
- package/dist/api/storage/objects.js +0 -148
- package/dist/api/storage/objects.js.map +0 -1
- package/dist/api/storage/types.d.ts.map +0 -1
- package/dist/api/storage/types.js.map +0 -1
- package/dist/api/storage/util.d.ts.map +0 -1
- package/dist/api/storage/util.js.map +0 -1
- package/dist/api/stream/get.d.ts.map +0 -1
- package/dist/api/stream/get.js.map +0 -1
- package/dist/api/stream/index.d.ts +0 -4
- package/dist/api/stream/index.d.ts.map +0 -1
- package/dist/api/stream/index.js +0 -4
- package/dist/api/stream/index.js.map +0 -1
- package/dist/api/stream/list.d.ts +0 -120
- package/dist/api/stream/list.d.ts.map +0 -1
- package/dist/api/stream/list.js +0 -77
- package/dist/api/stream/list.js.map +0 -1
- package/dist/api/stream/util.d.ts.map +0 -1
- package/dist/api/stream/util.js.map +0 -1
- package/dist/api/thread/delete.d.ts.map +0 -1
- package/dist/api/thread/delete.js.map +0 -1
- package/dist/api/thread/get.d.ts.map +0 -1
- package/dist/api/thread/get.js.map +0 -1
- package/dist/api/thread/index.d.ts.map +0 -1
- package/dist/api/thread/index.js.map +0 -1
- package/dist/api/thread/list.d.ts +0 -69
- package/dist/api/thread/list.d.ts.map +0 -1
- package/dist/api/thread/list.js +0 -51
- package/dist/api/thread/list.js.map +0 -1
- package/dist/api/thread/util.d.ts.map +0 -1
- package/dist/api/thread/util.js.map +0 -1
- package/dist/api/user/index.d.ts.map +0 -1
- package/dist/api/user/index.js.map +0 -1
- package/dist/api/user/util.d.ts.map +0 -1
- package/dist/api/user/util.js.map +0 -1
- package/dist/api/user/whoami.d.ts.map +0 -1
- package/dist/api/user/whoami.js.map +0 -1
- package/dist/api/webhook/deliveries.d.ts +0 -94
- package/dist/api/webhook/deliveries.d.ts.map +0 -1
- package/dist/api/webhook/deliveries.js.map +0 -1
- package/dist/api/webhook/destinations.d.ts +0 -136
- package/dist/api/webhook/destinations.d.ts.map +0 -1
- package/dist/api/webhook/destinations.js.map +0 -1
- package/dist/api/webhook/index.d.ts +0 -41
- package/dist/api/webhook/index.d.ts.map +0 -1
- package/dist/api/webhook/index.js +0 -59
- package/dist/api/webhook/index.js.map +0 -1
- package/dist/api/webhook/receipts.d.ts.map +0 -1
- package/dist/api/webhook/receipts.js.map +0 -1
- package/dist/api/webhook/types.d.ts +0 -249
- package/dist/api/webhook/types.d.ts.map +0 -1
- package/dist/api/webhook/types.js +0 -221
- package/dist/api/webhook/types.js.map +0 -1
- package/dist/api/webhook/util.d.ts.map +0 -1
- package/dist/api/webhook/util.js.map +0 -1
- package/dist/api/webhook/webhooks.d.ts +0 -146
- package/dist/api/webhook/webhooks.d.ts.map +0 -1
- package/dist/api/webhook/webhooks.js.map +0 -1
- package/dist/services/email.d.ts +0 -901
- package/dist/services/email.d.ts.map +0 -1
- package/dist/services/email.js +0 -722
- package/dist/services/email.js.map +0 -1
- package/dist/services/evalrun.d.ts +0 -93
- package/dist/services/evalrun.d.ts.map +0 -1
- package/dist/services/evalrun.js +0 -24
- package/dist/services/evalrun.js.map +0 -1
- package/dist/services/keyvalue.d.ts +0 -283
- package/dist/services/keyvalue.d.ts.map +0 -1
- package/dist/services/keyvalue.js +0 -305
- package/dist/services/keyvalue.js.map +0 -1
- package/dist/services/queue.d.ts +0 -361
- package/dist/services/queue.d.ts.map +0 -1
- package/dist/services/queue.js +0 -308
- package/dist/services/queue.js.map +0 -1
- package/dist/services/sandbox.d.ts +0 -1241
- package/dist/services/sandbox.d.ts.map +0 -1
- package/dist/services/sandbox.js +0 -6
- package/dist/services/sandbox.js.map +0 -1
- package/dist/services/schedule.d.ts +0 -501
- package/dist/services/schedule.d.ts.map +0 -1
- package/dist/services/schedule.js +0 -425
- package/dist/services/schedule.js.map +0 -1
- package/dist/services/session.d.ts +0 -127
- package/dist/services/session.d.ts.map +0 -1
- package/dist/services/session.js +0 -42
- package/dist/services/session.js.map +0 -1
- package/dist/services/stream.d.ts +0 -293
- package/dist/services/stream.d.ts.map +0 -1
- package/dist/services/stream.js +0 -500
- package/dist/services/stream.js.map +0 -1
- package/dist/services/task.d.ts +0 -1337
- package/dist/services/task.d.ts.map +0 -1
- package/dist/services/task.js +0 -1397
- package/dist/services/task.js.map +0 -1
- package/dist/services/vector.d.ts +0 -498
- package/dist/services/vector.d.ts.map +0 -1
- package/dist/services/vector.js +0 -381
- package/dist/services/vector.js.map +0 -1
- package/dist/services/webhook.d.ts +0 -454
- package/dist/services/webhook.d.ts.map +0 -1
- package/dist/services/webhook.js +0 -589
- package/dist/services/webhook.js.map +0 -1
- package/src/api/api.ts +0 -931
- package/src/api/apikey/create.ts +0 -41
- package/src/api/apikey/list.ts +0 -64
- package/src/api/config.ts +0 -60
- package/src/api/db/index.ts +0 -27
- package/src/api/db/query.ts +0 -67
- package/src/api/db/tables.ts +0 -92
- package/src/api/eval/index.ts +0 -28
- package/src/api/index.ts +0 -20
- package/src/api/machine/machine.ts +0 -160
- package/src/api/org/env-get.ts +0 -43
- package/src/api/org/resources.ts +0 -140
- package/src/api/project/delete.ts +0 -25
- package/src/api/project/deploy.ts +0 -458
- package/src/api/project/deployment.ts +0 -195
- package/src/api/project/hostname.ts +0 -73
- package/src/api/project/malware.ts +0 -68
- package/src/api/queue/analytics.ts +0 -311
- package/src/api/queue/destinations.ts +0 -259
- package/src/api/queue/index.ts +0 -308
- package/src/api/queue/sources.ts +0 -294
- package/src/api/queue/types.ts +0 -1325
- package/src/api/queue/util.ts +0 -275
- package/src/api/queue/validation.ts +0 -560
- package/src/api/queue/websocket.ts +0 -521
- package/src/api/sandbox/cli-list.ts +0 -127
- package/src/api/sandbox/client.ts +0 -460
- package/src/api/sandbox/create.ts +0 -256
- package/src/api/sandbox/destroy.ts +0 -41
- package/src/api/sandbox/disk-checkpoint.ts +0 -179
- package/src/api/sandbox/execute.ts +0 -132
- package/src/api/sandbox/execution.ts +0 -183
- package/src/api/sandbox/files.ts +0 -596
- package/src/api/sandbox/get.ts +0 -249
- package/src/api/sandbox/getStatus.ts +0 -54
- package/src/api/sandbox/index.ts +0 -211
- package/src/api/sandbox/list.ts +0 -224
- package/src/api/sandbox/pause.ts +0 -39
- package/src/api/sandbox/resolve.ts +0 -98
- package/src/api/sandbox/resume.ts +0 -39
- package/src/api/sandbox/run.ts +0 -439
- package/src/api/sandbox/runtime.ts +0 -104
- package/src/api/sandbox/snapshot.ts +0 -781
- package/src/api/sandbox/util.ts +0 -275
- package/src/api/services/index.ts +0 -1
- package/src/api/services/stats.ts +0 -213
- package/src/api/session/get.ts +0 -106
- package/src/api/session/index.ts +0 -3
- package/src/api/session/list.ts +0 -136
- package/src/api/storage/objects.ts +0 -250
- package/src/api/stream/index.ts +0 -3
- package/src/api/stream/list.ts +0 -127
- package/src/api/thread/list.ts +0 -76
- package/src/api/webhook/index.ts +0 -133
- package/src/api/webhook/types.ts +0 -309
- package/src/services/email.ts +0 -1410
- package/src/services/keyvalue.ts +0 -620
- package/src/services/queue.ts +0 -603
- package/src/services/sandbox.ts +0 -1466
- package/src/services/schedule.ts +0 -763
- package/src/services/stream.ts +0 -886
- package/src/services/task.ts +0 -2611
- package/src/services/vector.ts +0 -1119
- package/src/services/webhook.ts +0 -921
- /package/dist/{api → services}/apikey/delete.d.ts +0 -0
- /package/dist/{api → services}/apikey/delete.js +0 -0
- /package/dist/{api → services}/apikey/get.d.ts +0 -0
- /package/dist/{api → services}/apikey/get.js +0 -0
- /package/dist/{api → services}/apikey/index.d.ts +0 -0
- /package/dist/{api → services}/apikey/index.js +0 -0
- /package/dist/{api → services}/apikey/util.d.ts +0 -0
- /package/dist/{api → services}/apikey/util.js +0 -0
- /package/dist/{api → services}/db/logs.d.ts +0 -0
- /package/dist/{api → services}/db/logs.js +0 -0
- /package/dist/{api → services}/db/util.d.ts +0 -0
- /package/dist/{api → services}/db/util.js +0 -0
- /package/dist/{api → services}/env.d.ts +0 -0
- /package/dist/{api → services}/env.js +0 -0
- /package/dist/{api → services}/eval/get.d.ts +0 -0
- /package/dist/{api → services}/eval/get.js +0 -0
- /package/dist/{api → services}/eval/list.d.ts +0 -0
- /package/dist/{api → services}/eval/list.js +0 -0
- /package/dist/{api → services}/eval/run-get.d.ts +0 -0
- /package/dist/{api → services}/eval/run-get.js +0 -0
- /package/dist/{api → services}/eval/run-list.d.ts +0 -0
- /package/dist/{api → services}/eval/run-list.js +0 -0
- /package/dist/{api → services}/logger.d.ts +0 -0
- /package/dist/{api → services}/logger.js +0 -0
- /package/dist/{api → services}/machine/index.d.ts +0 -0
- /package/dist/{api → services}/machine/index.js +0 -0
- /package/dist/{api → services}/machine/machine.d.ts +0 -0
- /package/dist/{api → services}/machine/util.d.ts +0 -0
- /package/dist/{api → services}/machine/util.js +0 -0
- /package/dist/{api → services}/org/env-delete.d.ts +0 -0
- /package/dist/{api → services}/org/env-delete.js +0 -0
- /package/dist/{api → services}/org/env-update.d.ts +0 -0
- /package/dist/{api → services}/org/env-update.js +0 -0
- /package/dist/{api → services}/org/index.d.ts +0 -0
- /package/dist/{api → services}/org/index.js +0 -0
- /package/dist/{api → services}/org/list.d.ts +0 -0
- /package/dist/{api → services}/org/list.js +0 -0
- /package/dist/{api → services}/org/util.d.ts +0 -0
- /package/dist/{api → services}/org/util.js +0 -0
- /package/dist/{api → services}/project/agent.d.ts +0 -0
- /package/dist/{api → services}/project/agent.js +0 -0
- /package/dist/{api → services}/project/create.d.ts +0 -0
- /package/dist/{api → services}/project/create.js +0 -0
- /package/dist/{api → services}/project/delete.d.ts +0 -0
- /package/dist/{api → services}/project/deploy.js +0 -0
- /package/dist/{api → services}/project/deployment.d.ts +0 -0
- /package/dist/{api → services}/project/env-delete.d.ts +0 -0
- /package/dist/{api → services}/project/env-delete.js +0 -0
- /package/dist/{api → services}/project/env-update.d.ts +0 -0
- /package/dist/{api → services}/project/env-update.js +0 -0
- /package/dist/{api → services}/project/exists.d.ts +0 -0
- /package/dist/{api → services}/project/exists.js +0 -0
- /package/dist/{api → services}/project/get.d.ts +0 -0
- /package/dist/{api → services}/project/get.js +0 -0
- /package/dist/{api → services}/project/hostname.d.ts +0 -0
- /package/dist/{api → services}/project/index.d.ts +0 -0
- /package/dist/{api → services}/project/index.js +0 -0
- /package/dist/{api → services}/project/list.d.ts +0 -0
- /package/dist/{api → services}/project/list.js +0 -0
- /package/dist/{api → services}/project/malware.d.ts +0 -0
- /package/dist/{api → services}/project/update-region.d.ts +0 -0
- /package/dist/{api → services}/project/update-region.js +0 -0
- /package/dist/{api → services}/project/util.d.ts +0 -0
- /package/dist/{api → services}/project/util.js +0 -0
- /package/dist/{api → services}/queue/dlq.js +0 -0
- /package/dist/{api → services}/queue/messages.js +0 -0
- /package/dist/{api → services}/queue/queues.js +0 -0
- /package/dist/{api → services}/region/create.d.ts +0 -0
- /package/dist/{api → services}/region/create.js +0 -0
- /package/dist/{api → services}/region/delete.d.ts +0 -0
- /package/dist/{api → services}/region/delete.js +0 -0
- /package/dist/{api → services}/region/index.d.ts +0 -0
- /package/dist/{api → services}/region/index.js +0 -0
- /package/dist/{api → services}/region/list.d.ts +0 -0
- /package/dist/{api → services}/region/list.js +0 -0
- /package/dist/{api → services}/region/resources.d.ts +0 -0
- /package/dist/{api → services}/region/resources.js +0 -0
- /package/dist/{api → services}/region/util.d.ts +0 -0
- /package/dist/{api → services}/region/util.js +0 -0
- /package/dist/{api → services}/sandbox/snapshot-build.d.ts +0 -0
- /package/dist/{api → services}/sandbox/snapshot-build.js +0 -0
- /package/dist/{api → services}/session/get.js +0 -0
- /package/dist/{api → services}/session/logs.d.ts +0 -0
- /package/dist/{api → services}/session/logs.js +0 -0
- /package/dist/{api → services}/session/util.d.ts +0 -0
- /package/dist/{api → services}/session/util.js +0 -0
- /package/dist/{api → services}/storage/config.d.ts +0 -0
- /package/dist/{api → services}/storage/config.js +0 -0
- /package/dist/{api → services}/storage/index.d.ts +0 -0
- /package/dist/{api → services}/storage/index.js +0 -0
- /package/dist/{api → services}/storage/types.d.ts +0 -0
- /package/dist/{api → services}/storage/types.js +0 -0
- /package/dist/{api → services}/storage/util.d.ts +0 -0
- /package/dist/{api → services}/storage/util.js +0 -0
- /package/dist/{api → services}/stream/get.d.ts +0 -0
- /package/dist/{api → services}/stream/get.js +0 -0
- /package/dist/{api → services}/stream/util.d.ts +0 -0
- /package/dist/{api → services}/stream/util.js +0 -0
- /package/dist/{api → services}/thread/delete.d.ts +0 -0
- /package/dist/{api → services}/thread/delete.js +0 -0
- /package/dist/{api → services}/thread/get.d.ts +0 -0
- /package/dist/{api → services}/thread/get.js +0 -0
- /package/dist/{api → services}/thread/index.d.ts +0 -0
- /package/dist/{api → services}/thread/index.js +0 -0
- /package/dist/{api → services}/thread/util.d.ts +0 -0
- /package/dist/{api → services}/thread/util.js +0 -0
- /package/dist/{api → services}/user/index.d.ts +0 -0
- /package/dist/{api → services}/user/index.js +0 -0
- /package/dist/{api → services}/user/util.d.ts +0 -0
- /package/dist/{api → services}/user/util.js +0 -0
- /package/dist/{api → services}/user/whoami.d.ts +0 -0
- /package/dist/{api → services}/user/whoami.js +0 -0
- /package/dist/{api → services}/webhook/deliveries.js +0 -0
- /package/dist/{api → services}/webhook/destinations.js +0 -0
- /package/dist/{api → services}/webhook/receipts.d.ts +0 -0
- /package/dist/{api → services}/webhook/receipts.js +0 -0
- /package/dist/{api → services}/webhook/util.d.ts +0 -0
- /package/dist/{api → services}/webhook/util.js +0 -0
- /package/dist/{api → services}/webhook/webhooks.js +0 -0
- /package/src/{api → services}/api-example.md +0 -0
- /package/src/{api → services}/apikey/delete.ts +0 -0
- /package/src/{api → services}/apikey/get.ts +0 -0
- /package/src/{api → services}/apikey/index.ts +0 -0
- /package/src/{api → services}/apikey/util.ts +0 -0
- /package/src/{api → services}/db/logs.ts +0 -0
- /package/src/{api → services}/db/util.ts +0 -0
- /package/src/{api → services}/env.ts +0 -0
- /package/src/services/{evalrun.ts → eval/events.ts} +0 -0
- /package/src/{api → services}/eval/get.ts +0 -0
- /package/src/{api → services}/eval/list.ts +0 -0
- /package/src/{api → services}/eval/run-get.ts +0 -0
- /package/src/{api → services}/eval/run-list.ts +0 -0
- /package/src/{api → services}/logger.ts +0 -0
- /package/src/{api → services}/machine/index.ts +0 -0
- /package/src/{api → services}/machine/util.ts +0 -0
- /package/src/{api → services}/org/env-delete.ts +0 -0
- /package/src/{api → services}/org/env-update.ts +0 -0
- /package/src/{api → services}/org/index.ts +0 -0
- /package/src/{api → services}/org/list.ts +0 -0
- /package/src/{api → services}/org/util.ts +0 -0
- /package/src/{api → services}/project/agent.ts +0 -0
- /package/src/{api → services}/project/create.ts +0 -0
- /package/src/{api → services}/project/env-delete.ts +0 -0
- /package/src/{api → services}/project/env-update.ts +0 -0
- /package/src/{api → services}/project/exists.ts +0 -0
- /package/src/{api → services}/project/get.ts +0 -0
- /package/src/{api → services}/project/index.ts +0 -0
- /package/src/{api → services}/project/list.ts +0 -0
- /package/src/{api → services}/project/update-region.ts +0 -0
- /package/src/{api → services}/project/util.ts +0 -0
- /package/src/{api → services}/queue/dlq.ts +0 -0
- /package/src/{api → services}/queue/messages.ts +0 -0
- /package/src/{api → services}/queue/queues.ts +0 -0
- /package/src/{api → services}/region/create.ts +0 -0
- /package/src/{api → services}/region/delete.ts +0 -0
- /package/src/{api → services}/region/index.ts +0 -0
- /package/src/{api → services}/region/list.ts +0 -0
- /package/src/{api → services}/region/resources.ts +0 -0
- /package/src/{api → services}/region/util.ts +0 -0
- /package/src/{api → services}/sandbox/snapshot-build.ts +0 -0
- /package/src/services/{session.ts → session/events.ts} +0 -0
- /package/src/{api → services}/session/logs.ts +0 -0
- /package/src/{api → services}/session/util.ts +0 -0
- /package/src/{api → services}/storage/config.ts +0 -0
- /package/src/{api → services}/storage/index.ts +0 -0
- /package/src/{api → services}/storage/types.ts +0 -0
- /package/src/{api → services}/storage/util.ts +0 -0
- /package/src/{api → services}/stream/get.ts +0 -0
- /package/src/{api → services}/stream/util.ts +0 -0
- /package/src/{api → services}/thread/delete.ts +0 -0
- /package/src/{api → services}/thread/get.ts +0 -0
- /package/src/{api → services}/thread/index.ts +0 -0
- /package/src/{api → services}/thread/util.ts +0 -0
- /package/src/{api → services}/user/index.ts +0 -0
- /package/src/{api → services}/user/util.ts +0 -0
- /package/src/{api → services}/user/whoami.ts +0 -0
- /package/src/{api → services}/webhook/deliveries.ts +0 -0
- /package/src/{api → services}/webhook/destinations.ts +0 -0
- /package/src/{api → services}/webhook/receipts.ts +0 -0
- /package/src/{api → services}/webhook/util.ts +0 -0
- /package/src/{api → services}/webhook/webhooks.ts +0 -0
|
@@ -1,425 +0,0 @@
|
|
|
1
|
-
import { buildUrl, toServiceException } from "./_util.js";
|
|
2
|
-
/**
|
|
3
|
-
* Client for the Agentuity Schedule service.
|
|
4
|
-
*
|
|
5
|
-
* Provides methods for creating, managing, and monitoring cron-based scheduled jobs.
|
|
6
|
-
* Schedules fire at intervals defined by cron expressions and deliver HTTP requests
|
|
7
|
-
* to configured destinations (URLs or sandboxes).
|
|
8
|
-
*
|
|
9
|
-
* The service supports:
|
|
10
|
-
* - CRUD operations on schedules and their destinations
|
|
11
|
-
* - Cron expression validation
|
|
12
|
-
* - Delivery history and monitoring
|
|
13
|
-
* - Automatic due date computation from cron expressions
|
|
14
|
-
*
|
|
15
|
-
* All methods are instrumented with OpenTelemetry spans for observability.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const schedules = new ScheduleService(baseUrl, adapter);
|
|
20
|
-
*
|
|
21
|
-
* // Create a schedule that fires every hour
|
|
22
|
-
* const result = await schedules.create({
|
|
23
|
-
* name: 'Hourly Sync',
|
|
24
|
-
* expression: '0 * * * *',
|
|
25
|
-
* destinations: [{ type: 'url', config: { url: 'https://example.com/sync' } }],
|
|
26
|
-
* });
|
|
27
|
-
*
|
|
28
|
-
* // List all schedules
|
|
29
|
-
* const { schedules: list, total } = await schedules.list();
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export class ScheduleService {
|
|
33
|
-
#adapter;
|
|
34
|
-
#baseUrl;
|
|
35
|
-
/**
|
|
36
|
-
* Create a new ScheduleService instance.
|
|
37
|
-
*
|
|
38
|
-
* @param baseUrl - The base URL for the Agentuity Schedule API (e.g., `https://api.agentuity.com`)
|
|
39
|
-
* @param adapter - The HTTP fetch adapter used for making API requests
|
|
40
|
-
*/
|
|
41
|
-
constructor(baseUrl, adapter) {
|
|
42
|
-
this.#adapter = adapter;
|
|
43
|
-
this.#baseUrl = baseUrl;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Create a new schedule with optional destinations.
|
|
47
|
-
*
|
|
48
|
-
* The schedule and its destinations are created atomically — if any validation
|
|
49
|
-
* fails, the entire operation is rolled back.
|
|
50
|
-
*
|
|
51
|
-
* @param params - The schedule creation parameters including name, cron expression, and optional destinations
|
|
52
|
-
* @returns The created schedule and its destinations
|
|
53
|
-
* @throws ServiceException on API errors (e.g., invalid cron expression, invalid destination URL)
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* ```typescript
|
|
57
|
-
* const result = await schedules.create({
|
|
58
|
-
* name: 'Daily Report',
|
|
59
|
-
* description: 'Generate and send daily reports',
|
|
60
|
-
* expression: '0 9 * * *',
|
|
61
|
-
* destinations: [
|
|
62
|
-
* { type: 'url', config: { url: 'https://example.com/reports' } },
|
|
63
|
-
* ],
|
|
64
|
-
* });
|
|
65
|
-
* console.log('Created schedule:', result.schedule.id);
|
|
66
|
-
* console.log('Next run:', result.schedule.due_date);
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
async create(params) {
|
|
70
|
-
const url = buildUrl(this.#baseUrl, '/schedule/create');
|
|
71
|
-
const signal = AbortSignal.timeout(30_000);
|
|
72
|
-
const res = await this.#adapter.invoke(url, {
|
|
73
|
-
method: 'POST',
|
|
74
|
-
signal,
|
|
75
|
-
body: JSON.stringify(params),
|
|
76
|
-
contentType: 'application/json',
|
|
77
|
-
telemetry: {
|
|
78
|
-
name: 'agentuity.schedule.create',
|
|
79
|
-
attributes: {
|
|
80
|
-
destinationCount: String(params.destinations?.length ?? 0),
|
|
81
|
-
name: params.name,
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
});
|
|
85
|
-
if (res.ok) {
|
|
86
|
-
return res.data;
|
|
87
|
-
}
|
|
88
|
-
throw await toServiceException('POST', url, res.response);
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* List all schedules with optional pagination.
|
|
92
|
-
*
|
|
93
|
-
* @param params - Optional pagination parameters
|
|
94
|
-
* @param params.limit - Maximum number of schedules to return (max 500)
|
|
95
|
-
* @param params.offset - Number of schedules to skip for pagination
|
|
96
|
-
* @returns A paginated list of schedules with the total count
|
|
97
|
-
* @throws ServiceException on API errors
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* ```typescript
|
|
101
|
-
* // List first page
|
|
102
|
-
* const { schedules, total } = await service.list({ limit: 20 });
|
|
103
|
-
* console.log(`Showing ${schedules.length} of ${total} schedules`);
|
|
104
|
-
*
|
|
105
|
-
* // Paginate through all schedules
|
|
106
|
-
* const page2 = await service.list({ limit: 20, offset: 20 });
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
async list(params) {
|
|
110
|
-
const qs = new URLSearchParams();
|
|
111
|
-
if (params?.limit !== undefined) {
|
|
112
|
-
qs.set('limit', String(params.limit));
|
|
113
|
-
}
|
|
114
|
-
if (params?.offset !== undefined) {
|
|
115
|
-
qs.set('offset', String(params.offset));
|
|
116
|
-
}
|
|
117
|
-
const path = qs.toString() ? `/schedule/list?${qs.toString()}` : '/schedule/list';
|
|
118
|
-
const url = buildUrl(this.#baseUrl, path);
|
|
119
|
-
const signal = AbortSignal.timeout(30_000);
|
|
120
|
-
const res = await this.#adapter.invoke(url, {
|
|
121
|
-
method: 'GET',
|
|
122
|
-
signal,
|
|
123
|
-
telemetry: {
|
|
124
|
-
name: 'agentuity.schedule.list',
|
|
125
|
-
attributes: {
|
|
126
|
-
limit: String(params?.limit ?? ''),
|
|
127
|
-
offset: String(params?.offset ?? ''),
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
});
|
|
131
|
-
if (res.ok) {
|
|
132
|
-
return res.data;
|
|
133
|
-
}
|
|
134
|
-
throw await toServiceException('GET', url, res.response);
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Get a schedule by its ID, including all configured destinations.
|
|
138
|
-
*
|
|
139
|
-
* @param scheduleId - The schedule ID (prefixed with `sch_`)
|
|
140
|
-
* @returns The schedule record and its array of destinations
|
|
141
|
-
* @throws ServiceException on API errors (including 404 if not found)
|
|
142
|
-
*
|
|
143
|
-
* @example
|
|
144
|
-
* ```typescript
|
|
145
|
-
* const { schedule, destinations } = await service.get('sch_abc123');
|
|
146
|
-
* console.log('Schedule:', schedule.name);
|
|
147
|
-
* console.log('Next run:', schedule.due_date);
|
|
148
|
-
* console.log('Destinations:', destinations.length);
|
|
149
|
-
* ```
|
|
150
|
-
*/
|
|
151
|
-
async get(scheduleId) {
|
|
152
|
-
const url = buildUrl(this.#baseUrl, `/schedule/get/${encodeURIComponent(scheduleId)}`);
|
|
153
|
-
const signal = AbortSignal.timeout(30_000);
|
|
154
|
-
const res = await this.#adapter.invoke(url, {
|
|
155
|
-
method: 'GET',
|
|
156
|
-
signal,
|
|
157
|
-
telemetry: {
|
|
158
|
-
name: 'agentuity.schedule.get',
|
|
159
|
-
attributes: {
|
|
160
|
-
scheduleId,
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
});
|
|
164
|
-
if (res.ok) {
|
|
165
|
-
return res.data;
|
|
166
|
-
}
|
|
167
|
-
if (res.response.status === 404) {
|
|
168
|
-
throw await toServiceException('GET', url, res.response);
|
|
169
|
-
}
|
|
170
|
-
throw await toServiceException('GET', url, res.response);
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Update an existing schedule. Only the provided fields are modified.
|
|
174
|
-
*
|
|
175
|
-
* @remarks If the `expression` field is changed, the `due_date` is automatically
|
|
176
|
-
* recomputed based on the new cron expression.
|
|
177
|
-
*
|
|
178
|
-
* @param scheduleId - The schedule ID (prefixed with `sch_`)
|
|
179
|
-
* @param params - The fields to update (all optional)
|
|
180
|
-
* @returns The updated schedule record
|
|
181
|
-
* @throws ServiceException on API errors (e.g., invalid cron expression, schedule not found)
|
|
182
|
-
*
|
|
183
|
-
* @example
|
|
184
|
-
* ```typescript
|
|
185
|
-
* // Update the name and expression
|
|
186
|
-
* const { schedule } = await service.update('sch_abc123', {
|
|
187
|
-
* name: 'Daily Midnight Sync',
|
|
188
|
-
* expression: '0 0 * * *',
|
|
189
|
-
* });
|
|
190
|
-
* console.log('Updated. Next run:', schedule.due_date);
|
|
191
|
-
* ```
|
|
192
|
-
*/
|
|
193
|
-
async update(scheduleId, params) {
|
|
194
|
-
const url = buildUrl(this.#baseUrl, `/schedule/update/${encodeURIComponent(scheduleId)}`);
|
|
195
|
-
const signal = AbortSignal.timeout(30_000);
|
|
196
|
-
const res = await this.#adapter.invoke(url, {
|
|
197
|
-
method: 'PUT',
|
|
198
|
-
signal,
|
|
199
|
-
body: JSON.stringify(params),
|
|
200
|
-
contentType: 'application/json',
|
|
201
|
-
telemetry: {
|
|
202
|
-
name: 'agentuity.schedule.update',
|
|
203
|
-
attributes: {
|
|
204
|
-
scheduleId,
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
});
|
|
208
|
-
if (res.ok) {
|
|
209
|
-
return res.data;
|
|
210
|
-
}
|
|
211
|
-
throw await toServiceException('PUT', url, res.response);
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Delete a schedule and all of its destinations and delivery history.
|
|
215
|
-
*
|
|
216
|
-
* @param scheduleId - The schedule ID (prefixed with `sch_`)
|
|
217
|
-
* @throws ServiceException on API errors (e.g., schedule not found)
|
|
218
|
-
*
|
|
219
|
-
* @example
|
|
220
|
-
* ```typescript
|
|
221
|
-
* await service.delete('sch_abc123');
|
|
222
|
-
* console.log('Schedule deleted');
|
|
223
|
-
* ```
|
|
224
|
-
*/
|
|
225
|
-
async delete(scheduleId) {
|
|
226
|
-
const url = buildUrl(this.#baseUrl, `/schedule/delete/${encodeURIComponent(scheduleId)}`);
|
|
227
|
-
const signal = AbortSignal.timeout(30_000);
|
|
228
|
-
const res = await this.#adapter.invoke(url, {
|
|
229
|
-
method: 'DELETE',
|
|
230
|
-
signal,
|
|
231
|
-
telemetry: {
|
|
232
|
-
name: 'agentuity.schedule.delete',
|
|
233
|
-
attributes: {
|
|
234
|
-
scheduleId,
|
|
235
|
-
},
|
|
236
|
-
},
|
|
237
|
-
});
|
|
238
|
-
if (res.ok) {
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
throw await toServiceException('DELETE', url, res.response);
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Create a new destination on an existing schedule.
|
|
245
|
-
*
|
|
246
|
-
* @param scheduleId - The schedule ID (prefixed with `sch_`)
|
|
247
|
-
* @param params - The destination configuration including type and type-specific config
|
|
248
|
-
* @returns The newly created destination record
|
|
249
|
-
* @throws ServiceException on API errors (e.g., invalid URL, schedule not found)
|
|
250
|
-
*
|
|
251
|
-
* @example
|
|
252
|
-
* ```typescript
|
|
253
|
-
* const { destination } = await service.createDestination('sch_abc123', {
|
|
254
|
-
* type: 'url',
|
|
255
|
-
* config: {
|
|
256
|
-
* url: 'https://example.com/webhook',
|
|
257
|
-
* headers: { 'Authorization': 'Bearer token' },
|
|
258
|
-
* },
|
|
259
|
-
* });
|
|
260
|
-
* console.log('Destination created:', destination.id);
|
|
261
|
-
* ```
|
|
262
|
-
*/
|
|
263
|
-
async createDestination(scheduleId, params) {
|
|
264
|
-
const url = buildUrl(this.#baseUrl, `/schedule/destinations/create/${encodeURIComponent(scheduleId)}`);
|
|
265
|
-
const signal = AbortSignal.timeout(30_000);
|
|
266
|
-
const res = await this.#adapter.invoke(url, {
|
|
267
|
-
method: 'POST',
|
|
268
|
-
signal,
|
|
269
|
-
body: JSON.stringify(params),
|
|
270
|
-
contentType: 'application/json',
|
|
271
|
-
telemetry: {
|
|
272
|
-
name: 'agentuity.schedule.createDestination',
|
|
273
|
-
attributes: {
|
|
274
|
-
scheduleId,
|
|
275
|
-
type: params.type,
|
|
276
|
-
},
|
|
277
|
-
},
|
|
278
|
-
});
|
|
279
|
-
if (res.ok) {
|
|
280
|
-
return res.data;
|
|
281
|
-
}
|
|
282
|
-
throw await toServiceException('POST', url, res.response);
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* Delete a destination from a schedule.
|
|
286
|
-
*
|
|
287
|
-
* @param destinationId - The destination ID (prefixed with `sdst_`)
|
|
288
|
-
* @throws ServiceException on API errors (e.g., destination not found)
|
|
289
|
-
*
|
|
290
|
-
* @example
|
|
291
|
-
* ```typescript
|
|
292
|
-
* await service.deleteDestination('sdst_xyz789');
|
|
293
|
-
* console.log('Destination removed');
|
|
294
|
-
* ```
|
|
295
|
-
*/
|
|
296
|
-
async deleteDestination(destinationId) {
|
|
297
|
-
const url = buildUrl(this.#baseUrl, `/schedule/destinations/delete/${encodeURIComponent(destinationId)}`);
|
|
298
|
-
const signal = AbortSignal.timeout(30_000);
|
|
299
|
-
const res = await this.#adapter.invoke(url, {
|
|
300
|
-
method: 'DELETE',
|
|
301
|
-
signal,
|
|
302
|
-
telemetry: {
|
|
303
|
-
name: 'agentuity.schedule.deleteDestination',
|
|
304
|
-
attributes: {
|
|
305
|
-
destinationId,
|
|
306
|
-
},
|
|
307
|
-
},
|
|
308
|
-
});
|
|
309
|
-
if (res.ok) {
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
throw await toServiceException('DELETE', url, res.response);
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* List delivery attempts for a schedule with optional pagination.
|
|
316
|
-
*
|
|
317
|
-
* @param scheduleId - The schedule ID (prefixed with `sch_`)
|
|
318
|
-
* @param params - Optional pagination parameters
|
|
319
|
-
* @param params.limit - Maximum number of deliveries to return
|
|
320
|
-
* @param params.offset - Number of deliveries to skip for pagination
|
|
321
|
-
* @returns A list of delivery attempt records
|
|
322
|
-
* @throws ServiceException on API errors (including 404 if schedule not found)
|
|
323
|
-
*
|
|
324
|
-
* @example
|
|
325
|
-
* ```typescript
|
|
326
|
-
* const { deliveries } = await service.listDeliveries('sch_abc123');
|
|
327
|
-
* for (const d of deliveries) {
|
|
328
|
-
* console.log(`${d.date}: ${d.status} (retries: ${d.retries})`);
|
|
329
|
-
* if (d.error) {
|
|
330
|
-
* console.error(' Error:', d.error);
|
|
331
|
-
* }
|
|
332
|
-
* }
|
|
333
|
-
* ```
|
|
334
|
-
*/
|
|
335
|
-
async listDeliveries(scheduleId, params) {
|
|
336
|
-
const qs = new URLSearchParams();
|
|
337
|
-
if (params?.limit !== undefined) {
|
|
338
|
-
qs.set('limit', String(params.limit));
|
|
339
|
-
}
|
|
340
|
-
if (params?.offset !== undefined) {
|
|
341
|
-
qs.set('offset', String(params.offset));
|
|
342
|
-
}
|
|
343
|
-
const basePath = `/schedule/deliveries/${encodeURIComponent(scheduleId)}`;
|
|
344
|
-
const path = qs.toString() ? `${basePath}?${qs.toString()}` : basePath;
|
|
345
|
-
const url = buildUrl(this.#baseUrl, path);
|
|
346
|
-
const signal = AbortSignal.timeout(30_000);
|
|
347
|
-
const res = await this.#adapter.invoke(url, {
|
|
348
|
-
method: 'GET',
|
|
349
|
-
signal,
|
|
350
|
-
telemetry: {
|
|
351
|
-
name: 'agentuity.schedule.listDeliveries',
|
|
352
|
-
attributes: {
|
|
353
|
-
scheduleId,
|
|
354
|
-
limit: String(params?.limit ?? ''),
|
|
355
|
-
offset: String(params?.offset ?? ''),
|
|
356
|
-
},
|
|
357
|
-
},
|
|
358
|
-
});
|
|
359
|
-
if (res.ok) {
|
|
360
|
-
return res.data;
|
|
361
|
-
}
|
|
362
|
-
if (res.response.status === 404) {
|
|
363
|
-
throw await toServiceException('GET', url, res.response);
|
|
364
|
-
}
|
|
365
|
-
throw await toServiceException('GET', url, res.response);
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Get a specific destination for a schedule by its ID.
|
|
369
|
-
*
|
|
370
|
-
* @remarks This is a convenience method that fetches the schedule and filters
|
|
371
|
-
* its destinations client-side. For large destination lists, prefer using
|
|
372
|
-
* {@link get} directly.
|
|
373
|
-
*
|
|
374
|
-
* @param scheduleId - The schedule ID (prefixed with `sch_`)
|
|
375
|
-
* @param destinationId - The destination ID (prefixed with `sdst_`)
|
|
376
|
-
* @returns The matching destination record
|
|
377
|
-
* @throws Error if the destination is not found within the schedule
|
|
378
|
-
* @throws ServiceException on API errors when fetching the schedule
|
|
379
|
-
*
|
|
380
|
-
* @example
|
|
381
|
-
* ```typescript
|
|
382
|
-
* const dest = await service.getDestination('sch_abc123', 'sdst_xyz789');
|
|
383
|
-
* console.log('Destination type:', dest.type);
|
|
384
|
-
* console.log('Config:', dest.config);
|
|
385
|
-
* ```
|
|
386
|
-
*/
|
|
387
|
-
async getDestination(scheduleId, destinationId) {
|
|
388
|
-
const result = await this.get(scheduleId);
|
|
389
|
-
const destination = result.destinations.find((d) => d.id === destinationId);
|
|
390
|
-
if (!destination) {
|
|
391
|
-
throw new Error(`Destination not found: ${destinationId}`);
|
|
392
|
-
}
|
|
393
|
-
return destination;
|
|
394
|
-
}
|
|
395
|
-
/**
|
|
396
|
-
* Get a specific delivery record by its ID.
|
|
397
|
-
*
|
|
398
|
-
* @remarks This is a convenience method that lists deliveries and filters
|
|
399
|
-
* client-side. Use the optional `params` to control the search window if
|
|
400
|
-
* the delivery may not be in the first page of results.
|
|
401
|
-
*
|
|
402
|
-
* @param scheduleId - The schedule ID (prefixed with `sch_`)
|
|
403
|
-
* @param deliveryId - The delivery ID to find
|
|
404
|
-
* @param params - Optional pagination parameters to control the search window
|
|
405
|
-
* @returns The matching delivery record
|
|
406
|
-
* @throws Error if the delivery is not found in the result set
|
|
407
|
-
* @throws ServiceException on API errors when listing deliveries
|
|
408
|
-
*
|
|
409
|
-
* @example
|
|
410
|
-
* ```typescript
|
|
411
|
-
* const delivery = await service.getDelivery('sch_abc123', 'del_xyz789');
|
|
412
|
-
* console.log('Status:', delivery.status);
|
|
413
|
-
* console.log('Retries:', delivery.retries);
|
|
414
|
-
* ```
|
|
415
|
-
*/
|
|
416
|
-
async getDelivery(scheduleId, deliveryId, params) {
|
|
417
|
-
const result = await this.listDeliveries(scheduleId, params);
|
|
418
|
-
const delivery = result.deliveries.find((d) => d.id === deliveryId);
|
|
419
|
-
if (!delivery) {
|
|
420
|
-
throw new Error(`Delivery not found: ${deliveryId}`);
|
|
421
|
-
}
|
|
422
|
-
return delivery;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
//# sourceMappingURL=schedule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../src/services/schedule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAoS1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,eAAe;IAC3B,QAAQ,CAAe;IACvB,QAAQ,CAAS;IAEjB;;;;;OAKG;IACH,YAAY,OAAe,EAAE,OAAqB;QACjD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,KAAK,CAAC,MAAM,CAAC,MAA4B;QACxC,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;QACxD,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3C,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAuB,GAAG,EAAE;YACjE,MAAM,EAAE,MAAM;YACd,MAAM;YACN,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;YAC5B,WAAW,EAAE,kBAAkB;YAC/B,SAAS,EAAE;gBACV,IAAI,EAAE,2BAA2B;gBACjC,UAAU,EAAE;oBACX,gBAAgB,EAAE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C,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC;QACpE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;QACtD,CAAC;QACD,OAAO,QAAQ,CAAC;IACjB,CAAC;CACD"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const SessionStartEventSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodString;
|
|
4
|
-
threadId: z.ZodOptional<z.ZodString>;
|
|
5
|
-
orgId: z.ZodString;
|
|
6
|
-
projectId: z.ZodString;
|
|
7
|
-
deploymentId: z.ZodOptional<z.ZodString>;
|
|
8
|
-
routeId: z.ZodString;
|
|
9
|
-
environment: z.ZodString;
|
|
10
|
-
devmode: z.ZodBoolean;
|
|
11
|
-
url: z.ZodString;
|
|
12
|
-
method: z.ZodString;
|
|
13
|
-
trigger: z.ZodEnum<{
|
|
14
|
-
agent: "agent";
|
|
15
|
-
api: "api";
|
|
16
|
-
email: "email";
|
|
17
|
-
sms: "sms";
|
|
18
|
-
cron: "cron";
|
|
19
|
-
manual: "manual";
|
|
20
|
-
discord: "discord";
|
|
21
|
-
websocket: "websocket";
|
|
22
|
-
}>;
|
|
23
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
24
|
-
}, z.core.$strip>;
|
|
25
|
-
export type SessionStartEvent = z.infer<typeof SessionStartEventSchema>;
|
|
26
|
-
export declare const SessionCompleteEventSchema: z.ZodObject<{
|
|
27
|
-
id: z.ZodString;
|
|
28
|
-
threadId: z.ZodNullable<z.ZodString>;
|
|
29
|
-
error: z.ZodOptional<z.ZodString>;
|
|
30
|
-
agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
|
-
statusCode: z.ZodNumber;
|
|
32
|
-
userData: z.ZodOptional<z.ZodString>;
|
|
33
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
export type SessionCompleteEvent = z.infer<typeof SessionCompleteEventSchema>;
|
|
36
|
-
export declare const SessionStartEventDelayedSchema: z.ZodIntersection<z.ZodObject<{
|
|
37
|
-
id: z.ZodString;
|
|
38
|
-
threadId: z.ZodOptional<z.ZodString>;
|
|
39
|
-
orgId: z.ZodString;
|
|
40
|
-
projectId: z.ZodString;
|
|
41
|
-
deploymentId: z.ZodOptional<z.ZodString>;
|
|
42
|
-
routeId: z.ZodString;
|
|
43
|
-
environment: z.ZodString;
|
|
44
|
-
devmode: z.ZodBoolean;
|
|
45
|
-
url: z.ZodString;
|
|
46
|
-
method: z.ZodString;
|
|
47
|
-
trigger: z.ZodEnum<{
|
|
48
|
-
agent: "agent";
|
|
49
|
-
api: "api";
|
|
50
|
-
email: "email";
|
|
51
|
-
sms: "sms";
|
|
52
|
-
cron: "cron";
|
|
53
|
-
manual: "manual";
|
|
54
|
-
discord: "discord";
|
|
55
|
-
websocket: "websocket";
|
|
56
|
-
}>;
|
|
57
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
58
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
-
timestamp: z.ZodNumber;
|
|
60
|
-
}, z.core.$strip>>;
|
|
61
|
-
export declare const SessionCompleteEventDelayedSchema: z.ZodIntersection<z.ZodObject<{
|
|
62
|
-
id: z.ZodString;
|
|
63
|
-
threadId: z.ZodNullable<z.ZodString>;
|
|
64
|
-
error: z.ZodOptional<z.ZodString>;
|
|
65
|
-
agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
|
-
statusCode: z.ZodNumber;
|
|
67
|
-
userData: z.ZodOptional<z.ZodString>;
|
|
68
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
69
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
70
|
-
timestamp: z.ZodNumber;
|
|
71
|
-
}, z.core.$strip>>;
|
|
72
|
-
/**
|
|
73
|
-
* SessionEventProvider is a provider for logging and tracking agent session lifecycle events.
|
|
74
|
-
* Sessions represent individual agent executions triggered by API calls, cron jobs, or other sources.
|
|
75
|
-
*/
|
|
76
|
-
export interface SessionEventProvider {
|
|
77
|
-
/**
|
|
78
|
-
* Called when an agent session starts. Records the initial context and metadata
|
|
79
|
-
* for the session including trigger source, environment, and routing information.
|
|
80
|
-
*
|
|
81
|
-
* @param event - SessionStartEvent containing session initialization data
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```typescript
|
|
85
|
-
* await sessionProvider.start({
|
|
86
|
-
* id: 'session-123',
|
|
87
|
-
* threadId: 'thread-abc',
|
|
88
|
-
* orgId: 'org-456',
|
|
89
|
-
* projectId: 'proj-789',
|
|
90
|
-
* deploymentId: 'deploy-xyz',
|
|
91
|
-
* routeId: 'route-001',
|
|
92
|
-
* environment: 'production',
|
|
93
|
-
* devmode: false,
|
|
94
|
-
* url: '/api/agent/chat',
|
|
95
|
-
* method: 'POST',
|
|
96
|
-
* trigger: 'api'
|
|
97
|
-
* });
|
|
98
|
-
* ```
|
|
99
|
-
*/
|
|
100
|
-
start(event: SessionStartEvent): Promise<void>;
|
|
101
|
-
/**
|
|
102
|
-
* Called when an agent session completes (successfully or with error).
|
|
103
|
-
* Records final status, any errors, and which agents participated.
|
|
104
|
-
*
|
|
105
|
-
* @param event - SessionCompleteEvent containing completion status and results
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* ```typescript
|
|
109
|
-
* // Successful completion
|
|
110
|
-
* await sessionProvider.complete({
|
|
111
|
-
* id: 'session-123',
|
|
112
|
-
* statusCode: 200,
|
|
113
|
-
* agentIds: ['agent-1', 'agent-2']
|
|
114
|
-
* });
|
|
115
|
-
*
|
|
116
|
-
* // Completion with error
|
|
117
|
-
* await sessionProvider.complete({
|
|
118
|
-
* id: 'session-123',
|
|
119
|
-
* statusCode: 500,
|
|
120
|
-
* error: 'Database connection timeout',
|
|
121
|
-
* agentIds: ['agent-1']
|
|
122
|
-
* });
|
|
123
|
-
* ```
|
|
124
|
-
*/
|
|
125
|
-
complete(event: SessionCompleteEvent): Promise<void>;
|
|
126
|
-
}
|
|
127
|
-
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/services/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;iBAoBe,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,0BAA0B;;;;;;;;iBAgB2B,CAAC;AAEnE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;kBAG1C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;kBAG7C,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD"}
|
package/dist/services/session.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export const SessionStartEventSchema = z
|
|
3
|
-
.object({
|
|
4
|
-
id: z.string().describe('the session id'),
|
|
5
|
-
threadId: z.string().optional().describe('the thread id (optional, can be set in complete)'),
|
|
6
|
-
orgId: z.string().describe('the organization id'),
|
|
7
|
-
projectId: z.string().describe('the project id'),
|
|
8
|
-
deploymentId: z.string().optional().describe('the deployment id'),
|
|
9
|
-
routeId: z.string().describe('the route id'),
|
|
10
|
-
environment: z.string().describe('the environment (AGENTUITY_ENVIRONMENT)'),
|
|
11
|
-
devmode: z.boolean().describe('true if running in devmode'),
|
|
12
|
-
url: z.string().describe('the url for the session event'),
|
|
13
|
-
method: z.string().describe('the method for the session event'),
|
|
14
|
-
trigger: z
|
|
15
|
-
.enum(['agent', 'api', 'email', 'sms', 'cron', 'manual', 'discord', 'websocket'])
|
|
16
|
-
.describe('how the session was triggered'),
|
|
17
|
-
metadata: z
|
|
18
|
-
.record(z.string(), z.unknown())
|
|
19
|
-
.optional()
|
|
20
|
-
.describe('optional unencrypted key-value metadata'),
|
|
21
|
-
})
|
|
22
|
-
.describe('The event to record a session started');
|
|
23
|
-
export const SessionCompleteEventSchema = z
|
|
24
|
-
.object({
|
|
25
|
-
id: z.string().describe('the session id'),
|
|
26
|
-
threadId: z.string().nullable().describe('the thread id (null if thread has no data)'),
|
|
27
|
-
error: z.string().optional().describe('the optional error message if the session failed'),
|
|
28
|
-
agentIds: z
|
|
29
|
-
.array(z.string())
|
|
30
|
-
.optional()
|
|
31
|
-
.describe('optional array of ids for the agents that executed for the session'),
|
|
32
|
-
statusCode: z.number().describe('the HTTP status code'),
|
|
33
|
-
userData: z.string().optional().describe('optional JSON string of session state data'),
|
|
34
|
-
metadata: z
|
|
35
|
-
.record(z.string(), z.unknown())
|
|
36
|
-
.optional()
|
|
37
|
-
.describe('optional unencrypted key-value metadata'),
|
|
38
|
-
})
|
|
39
|
-
.describe('The event to record a session completed successfully');
|
|
40
|
-
export const SessionStartEventDelayedSchema = z.intersection(SessionStartEventSchema, z.object({ timestamp: z.number().int().describe('the event timestamp in epoch') }));
|
|
41
|
-
export const SessionCompleteEventDelayedSchema = z.intersection(SessionCompleteEventSchema, z.object({ timestamp: z.number().int().describe('the event timestamp in epoch') }));
|
|
42
|
-
//# sourceMappingURL=session.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/services/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACtC,MAAM,CAAC;IACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;IAC5F,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IACjD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAChD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IACjE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;IAC5C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IAC3E,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IAC3D,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAC/D,OAAO,EAAE,CAAC;SACR,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAA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