@agentuity/server 1.0.16 → 1.0.18
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/apikey/create.d.ts +1 -1
- package/dist/api/apikey/create.d.ts.map +1 -1
- package/dist/api/apikey/create.js +2 -2
- package/dist/api/apikey/create.js.map +1 -1
- package/dist/api/apikey/delete.d.ts +1 -1
- package/dist/api/apikey/delete.d.ts.map +1 -1
- package/dist/api/apikey/delete.js +2 -2
- package/dist/api/apikey/delete.js.map +1 -1
- package/dist/api/apikey/get.d.ts +1 -1
- package/dist/api/apikey/get.d.ts.map +1 -1
- package/dist/api/apikey/get.js +2 -2
- package/dist/api/apikey/get.js.map +1 -1
- package/dist/api/apikey/index.d.ts +5 -5
- package/dist/api/apikey/index.d.ts.map +1 -1
- package/dist/api/apikey/index.js +5 -5
- package/dist/api/apikey/index.js.map +1 -1
- package/dist/api/apikey/list.d.ts +1 -1
- package/dist/api/apikey/list.d.ts.map +1 -1
- package/dist/api/apikey/list.js +2 -2
- package/dist/api/apikey/list.js.map +1 -1
- package/dist/api/db/index.d.ts +4 -4
- package/dist/api/db/index.d.ts.map +1 -1
- package/dist/api/db/index.js +4 -4
- package/dist/api/db/index.js.map +1 -1
- package/dist/api/db/logs.d.ts +1 -1
- package/dist/api/db/logs.d.ts.map +1 -1
- package/dist/api/db/logs.js +2 -2
- package/dist/api/db/logs.js.map +1 -1
- package/dist/api/db/query.d.ts +1 -1
- package/dist/api/db/query.d.ts.map +1 -1
- package/dist/api/db/query.js +2 -2
- package/dist/api/db/query.js.map +1 -1
- package/dist/api/db/tables.d.ts +1 -1
- package/dist/api/db/tables.d.ts.map +1 -1
- package/dist/api/db/tables.js +2 -2
- package/dist/api/db/tables.js.map +1 -1
- package/dist/api/eval/get.d.ts +1 -1
- package/dist/api/eval/get.d.ts.map +1 -1
- package/dist/api/eval/get.js +1 -1
- package/dist/api/eval/get.js.map +1 -1
- package/dist/api/eval/index.d.ts +4 -4
- package/dist/api/eval/index.d.ts.map +1 -1
- package/dist/api/eval/index.js +4 -4
- package/dist/api/eval/index.js.map +1 -1
- package/dist/api/eval/list.d.ts +1 -1
- package/dist/api/eval/list.d.ts.map +1 -1
- package/dist/api/eval/list.js +1 -1
- package/dist/api/eval/list.js.map +1 -1
- package/dist/api/eval/run-get.d.ts +1 -1
- package/dist/api/eval/run-get.d.ts.map +1 -1
- package/dist/api/eval/run-get.js +1 -1
- package/dist/api/eval/run-get.js.map +1 -1
- package/dist/api/eval/run-list.d.ts +1 -1
- package/dist/api/eval/run-list.d.ts.map +1 -1
- package/dist/api/eval/run-list.js +1 -1
- package/dist/api/eval/run-list.js.map +1 -1
- package/dist/api/index.d.ts +14 -14
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +14 -14
- package/dist/api/index.js.map +1 -1
- package/dist/api/machine/index.d.ts +2 -2
- package/dist/api/machine/index.d.ts.map +1 -1
- package/dist/api/machine/index.js +2 -2
- package/dist/api/machine/index.js.map +1 -1
- package/dist/api/machine/machine.d.ts +1 -1
- package/dist/api/machine/machine.d.ts.map +1 -1
- package/dist/api/machine/machine.js +2 -2
- package/dist/api/machine/machine.js.map +1 -1
- package/dist/api/org/env-delete.d.ts +1 -1
- package/dist/api/org/env-delete.d.ts.map +1 -1
- package/dist/api/org/env-delete.js +2 -2
- package/dist/api/org/env-delete.js.map +1 -1
- package/dist/api/org/env-get.d.ts +1 -1
- package/dist/api/org/env-get.d.ts.map +1 -1
- package/dist/api/org/env-get.js +2 -2
- package/dist/api/org/env-get.js.map +1 -1
- package/dist/api/org/env-update.d.ts +1 -1
- package/dist/api/org/env-update.d.ts.map +1 -1
- package/dist/api/org/env-update.js +2 -2
- package/dist/api/org/env-update.js.map +1 -1
- package/dist/api/org/index.d.ts +6 -6
- package/dist/api/org/index.d.ts.map +1 -1
- package/dist/api/org/index.js +6 -6
- package/dist/api/org/index.js.map +1 -1
- package/dist/api/org/list.d.ts +1 -1
- package/dist/api/org/list.d.ts.map +1 -1
- package/dist/api/org/list.js +2 -2
- package/dist/api/org/list.js.map +1 -1
- package/dist/api/org/resources.d.ts +1 -1
- package/dist/api/org/resources.d.ts.map +1 -1
- package/dist/api/org/resources.js +2 -2
- package/dist/api/org/resources.js.map +1 -1
- package/dist/api/project/agent.d.ts +1 -1
- package/dist/api/project/agent.d.ts.map +1 -1
- package/dist/api/project/agent.js +2 -2
- package/dist/api/project/agent.js.map +1 -1
- package/dist/api/project/create.d.ts +1 -1
- package/dist/api/project/create.d.ts.map +1 -1
- package/dist/api/project/create.js +2 -2
- package/dist/api/project/create.js.map +1 -1
- package/dist/api/project/delete.d.ts +1 -1
- package/dist/api/project/delete.d.ts.map +1 -1
- package/dist/api/project/delete.js +2 -2
- package/dist/api/project/delete.js.map +1 -1
- package/dist/api/project/deploy.d.ts +1 -1
- package/dist/api/project/deploy.d.ts.map +1 -1
- package/dist/api/project/deploy.js +2 -2
- package/dist/api/project/deploy.js.map +1 -1
- package/dist/api/project/deployment.d.ts +1 -1
- package/dist/api/project/deployment.d.ts.map +1 -1
- package/dist/api/project/deployment.js +2 -2
- package/dist/api/project/deployment.js.map +1 -1
- package/dist/api/project/env-delete.d.ts +1 -1
- package/dist/api/project/env-delete.d.ts.map +1 -1
- package/dist/api/project/env-delete.js +2 -2
- package/dist/api/project/env-delete.js.map +1 -1
- package/dist/api/project/env-update.d.ts +2 -2
- package/dist/api/project/env-update.d.ts.map +1 -1
- package/dist/api/project/env-update.js +3 -3
- package/dist/api/project/env-update.js.map +1 -1
- package/dist/api/project/exists.d.ts +1 -1
- package/dist/api/project/exists.d.ts.map +1 -1
- package/dist/api/project/exists.js +2 -2
- package/dist/api/project/exists.js.map +1 -1
- package/dist/api/project/get.d.ts +1 -1
- package/dist/api/project/get.d.ts.map +1 -1
- package/dist/api/project/get.js +2 -2
- package/dist/api/project/get.js.map +1 -1
- package/dist/api/project/hostname.d.ts +1 -1
- package/dist/api/project/hostname.d.ts.map +1 -1
- package/dist/api/project/hostname.js +2 -2
- package/dist/api/project/hostname.js.map +1 -1
- package/dist/api/project/index.d.ts +13 -13
- package/dist/api/project/index.d.ts.map +1 -1
- package/dist/api/project/index.js +13 -13
- package/dist/api/project/index.js.map +1 -1
- package/dist/api/project/list.d.ts +1 -1
- package/dist/api/project/list.d.ts.map +1 -1
- package/dist/api/project/list.js +2 -2
- package/dist/api/project/list.js.map +1 -1
- package/dist/api/project/malware.d.ts +1 -1
- package/dist/api/project/malware.d.ts.map +1 -1
- package/dist/api/project/malware.js +6 -2
- package/dist/api/project/malware.js.map +1 -1
- package/dist/api/project/update-region.d.ts +1 -1
- package/dist/api/project/update-region.d.ts.map +1 -1
- package/dist/api/project/update-region.js +2 -2
- package/dist/api/project/update-region.js.map +1 -1
- package/dist/api/project/util.d.ts +13 -0
- package/dist/api/project/util.d.ts.map +1 -1
- package/dist/api/project/util.js +1 -0
- package/dist/api/project/util.js.map +1 -1
- package/dist/api/queue/analytics.d.ts +2 -2
- package/dist/api/queue/analytics.d.ts.map +1 -1
- package/dist/api/queue/analytics.js +6 -18
- package/dist/api/queue/analytics.js.map +1 -1
- package/dist/api/queue/destinations.d.ts +2 -2
- package/dist/api/queue/destinations.d.ts.map +1 -1
- package/dist/api/queue/destinations.js +14 -84
- package/dist/api/queue/destinations.js.map +1 -1
- package/dist/api/queue/dlq.d.ts +2 -2
- package/dist/api/queue/dlq.d.ts.map +1 -1
- package/dist/api/queue/dlq.js +8 -46
- package/dist/api/queue/dlq.js.map +1 -1
- package/dist/api/queue/index.d.ts +10 -10
- package/dist/api/queue/index.d.ts.map +1 -1
- package/dist/api/queue/index.js +10 -10
- package/dist/api/queue/index.js.map +1 -1
- package/dist/api/queue/messages.d.ts +2 -2
- package/dist/api/queue/messages.d.ts.map +1 -1
- package/dist/api/queue/messages.js +17 -107
- package/dist/api/queue/messages.js.map +1 -1
- package/dist/api/queue/queues.d.ts +2 -2
- package/dist/api/queue/queues.d.ts.map +1 -1
- package/dist/api/queue/queues.js +9 -39
- package/dist/api/queue/queues.js.map +1 -1
- package/dist/api/queue/sources.d.ts +2 -2
- package/dist/api/queue/sources.d.ts.map +1 -1
- package/dist/api/queue/sources.js +15 -98
- package/dist/api/queue/sources.js.map +1 -1
- package/dist/api/queue/util.d.ts +16 -0
- package/dist/api/queue/util.d.ts.map +1 -1
- package/dist/api/queue/util.js +64 -0
- package/dist/api/queue/util.js.map +1 -1
- package/dist/api/queue/websocket.d.ts +1 -1
- package/dist/api/queue/websocket.d.ts.map +1 -1
- package/dist/api/queue/websocket.js +3 -3
- package/dist/api/queue/websocket.js.map +1 -1
- package/dist/api/region/create.d.ts +1 -1
- package/dist/api/region/create.d.ts.map +1 -1
- package/dist/api/region/create.js +2 -2
- package/dist/api/region/create.js.map +1 -1
- package/dist/api/region/delete.d.ts +1 -1
- package/dist/api/region/delete.d.ts.map +1 -1
- package/dist/api/region/delete.js +2 -2
- package/dist/api/region/delete.js.map +1 -1
- package/dist/api/region/index.d.ts +4 -4
- package/dist/api/region/index.d.ts.map +1 -1
- package/dist/api/region/index.js +4 -4
- package/dist/api/region/index.js.map +1 -1
- package/dist/api/region/list.d.ts +1 -1
- package/dist/api/region/list.d.ts.map +1 -1
- package/dist/api/region/list.js +2 -2
- package/dist/api/region/list.js.map +1 -1
- package/dist/api/region/resources.d.ts +1 -1
- package/dist/api/region/resources.d.ts.map +1 -1
- package/dist/api/region/resources.js +2 -2
- package/dist/api/region/resources.js.map +1 -1
- package/dist/api/sandbox/cli-list.d.ts +2 -2
- package/dist/api/sandbox/cli-list.d.ts.map +1 -1
- package/dist/api/sandbox/cli-list.js +2 -2
- package/dist/api/sandbox/cli-list.js.map +1 -1
- package/dist/api/sandbox/client.d.ts +1 -1
- package/dist/api/sandbox/client.d.ts.map +1 -1
- package/dist/api/sandbox/client.js +11 -11
- package/dist/api/sandbox/client.js.map +1 -1
- package/dist/api/sandbox/create.d.ts +7 -1
- package/dist/api/sandbox/create.d.ts.map +1 -1
- package/dist/api/sandbox/create.js +4 -4
- package/dist/api/sandbox/create.js.map +1 -1
- package/dist/api/sandbox/destroy.d.ts +1 -1
- package/dist/api/sandbox/destroy.d.ts.map +1 -1
- package/dist/api/sandbox/destroy.js +2 -2
- package/dist/api/sandbox/destroy.js.map +1 -1
- package/dist/api/sandbox/execute.d.ts +1 -1
- package/dist/api/sandbox/execute.d.ts.map +1 -1
- package/dist/api/sandbox/execute.js +2 -2
- package/dist/api/sandbox/execute.js.map +1 -1
- package/dist/api/sandbox/execution.d.ts +1 -1
- package/dist/api/sandbox/execution.d.ts.map +1 -1
- package/dist/api/sandbox/execution.js +2 -2
- package/dist/api/sandbox/execution.js.map +1 -1
- package/dist/api/sandbox/files.d.ts +1 -1
- package/dist/api/sandbox/files.d.ts.map +1 -1
- package/dist/api/sandbox/files.js +1 -1
- package/dist/api/sandbox/files.js.map +1 -1
- package/dist/api/sandbox/get.d.ts +7 -1
- package/dist/api/sandbox/get.d.ts.map +1 -1
- package/dist/api/sandbox/get.js +3 -3
- package/dist/api/sandbox/get.js.map +1 -1
- package/dist/api/sandbox/index.d.ts +34 -30
- package/dist/api/sandbox/index.d.ts.map +1 -1
- package/dist/api/sandbox/index.js +17 -15
- package/dist/api/sandbox/index.js.map +1 -1
- package/dist/api/sandbox/list.d.ts +10 -1
- package/dist/api/sandbox/list.d.ts.map +1 -1
- package/dist/api/sandbox/list.js +3 -3
- package/dist/api/sandbox/list.js.map +1 -1
- 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 +1 -1
- package/dist/api/sandbox/resolve.d.ts.map +1 -1
- package/dist/api/sandbox/resolve.js +1 -1
- package/dist/api/sandbox/resolve.js.map +1 -1
- 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 +1 -1
- package/dist/api/sandbox/run.d.ts.map +1 -1
- package/dist/api/sandbox/run.js +6 -6
- package/dist/api/sandbox/run.js.map +1 -1
- package/dist/api/sandbox/runtime.d.ts +1 -1
- package/dist/api/sandbox/runtime.d.ts.map +1 -1
- package/dist/api/sandbox/runtime.js +2 -2
- package/dist/api/sandbox/runtime.js.map +1 -1
- package/dist/api/sandbox/snapshot.d.ts +1 -1
- package/dist/api/sandbox/snapshot.d.ts.map +1 -1
- package/dist/api/sandbox/snapshot.js +3 -3
- package/dist/api/sandbox/snapshot.js.map +1 -1
- package/dist/api/sandbox/util.d.ts +6 -0
- package/dist/api/sandbox/util.d.ts.map +1 -1
- package/dist/api/sandbox/util.js +6 -0
- package/dist/api/sandbox/util.js.map +1 -1
- package/dist/api/session/get.d.ts +2 -2
- package/dist/api/session/get.d.ts.map +1 -1
- package/dist/api/session/get.js +3 -3
- package/dist/api/session/get.js.map +1 -1
- package/dist/api/session/index.d.ts +3 -3
- package/dist/api/session/index.d.ts.map +1 -1
- package/dist/api/session/index.js +3 -3
- package/dist/api/session/index.js.map +1 -1
- package/dist/api/session/list.d.ts +1 -1
- package/dist/api/session/list.d.ts.map +1 -1
- package/dist/api/session/list.js +2 -2
- package/dist/api/session/list.js.map +1 -1
- package/dist/api/session/logs.d.ts +1 -1
- package/dist/api/session/logs.d.ts.map +1 -1
- package/dist/api/session/logs.js +2 -2
- package/dist/api/session/logs.js.map +1 -1
- package/dist/api/stream/get.d.ts +1 -1
- package/dist/api/stream/get.d.ts.map +1 -1
- package/dist/api/stream/get.js +2 -2
- package/dist/api/stream/get.js.map +1 -1
- package/dist/api/stream/index.d.ts +3 -3
- package/dist/api/stream/index.d.ts.map +1 -1
- package/dist/api/stream/index.js +3 -3
- package/dist/api/stream/index.js.map +1 -1
- package/dist/api/stream/list.d.ts +1 -1
- package/dist/api/stream/list.d.ts.map +1 -1
- package/dist/api/stream/list.js +2 -2
- package/dist/api/stream/list.js.map +1 -1
- package/dist/api/thread/delete.d.ts +1 -1
- package/dist/api/thread/delete.d.ts.map +1 -1
- package/dist/api/thread/delete.js +2 -2
- package/dist/api/thread/delete.js.map +1 -1
- package/dist/api/thread/get.d.ts +2 -2
- package/dist/api/thread/get.d.ts.map +1 -1
- package/dist/api/thread/get.js +3 -3
- package/dist/api/thread/get.js.map +1 -1
- package/dist/api/thread/index.d.ts +4 -4
- package/dist/api/thread/index.d.ts.map +1 -1
- package/dist/api/thread/index.js +4 -4
- package/dist/api/thread/index.js.map +1 -1
- package/dist/api/thread/list.d.ts +1 -1
- package/dist/api/thread/list.d.ts.map +1 -1
- package/dist/api/thread/list.js +2 -2
- package/dist/api/thread/list.js.map +1 -1
- package/dist/api/user/index.d.ts +1 -1
- package/dist/api/user/index.d.ts.map +1 -1
- package/dist/api/user/index.js +1 -1
- package/dist/api/user/index.js.map +1 -1
- package/dist/api/user/whoami.d.ts +1 -1
- package/dist/api/user/whoami.d.ts.map +1 -1
- package/dist/api/user/whoami.js +2 -2
- package/dist/api/user/whoami.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/runtime-bootstrap.js +1 -1
- package/dist/runtime-bootstrap.js.map +1 -1
- package/package.json +4 -4
- package/src/api/apikey/create.ts +2 -2
- package/src/api/apikey/delete.ts +2 -2
- package/src/api/apikey/get.ts +2 -2
- package/src/api/apikey/index.ts +5 -5
- package/src/api/apikey/list.ts +2 -2
- package/src/api/db/index.ts +4 -4
- package/src/api/db/logs.ts +2 -2
- package/src/api/db/query.ts +2 -2
- package/src/api/db/tables.ts +2 -2
- package/src/api/eval/get.ts +1 -1
- package/src/api/eval/index.ts +4 -4
- package/src/api/eval/list.ts +1 -1
- package/src/api/eval/run-get.ts +1 -1
- package/src/api/eval/run-list.ts +1 -1
- package/src/api/index.ts +14 -14
- package/src/api/machine/index.ts +2 -2
- package/src/api/machine/machine.ts +2 -2
- package/src/api/org/env-delete.ts +2 -2
- package/src/api/org/env-get.ts +2 -2
- package/src/api/org/env-update.ts +2 -2
- package/src/api/org/index.ts +6 -6
- package/src/api/org/list.ts +2 -2
- package/src/api/org/resources.ts +2 -2
- package/src/api/project/agent.ts +3 -3
- package/src/api/project/create.ts +2 -2
- package/src/api/project/delete.ts +2 -2
- package/src/api/project/deploy.ts +2 -2
- package/src/api/project/deployment.ts +2 -2
- package/src/api/project/env-delete.ts +2 -2
- package/src/api/project/env-update.ts +4 -4
- package/src/api/project/exists.ts +2 -2
- package/src/api/project/get.ts +2 -2
- package/src/api/project/hostname.ts +2 -2
- package/src/api/project/index.ts +13 -13
- package/src/api/project/list.ts +2 -2
- package/src/api/project/malware.ts +6 -2
- package/src/api/project/update-region.ts +2 -2
- package/src/api/project/util.ts +3 -0
- package/src/api/queue/analytics.ts +28 -28
- package/src/api/queue/destinations.ts +53 -116
- package/src/api/queue/dlq.ts +32 -72
- package/src/api/queue/index.ts +10 -10
- package/src/api/queue/messages.ts +92 -185
- package/src/api/queue/queues.ts +45 -71
- package/src/api/queue/sources.ts +51 -136
- package/src/api/queue/util.ts +74 -0
- package/src/api/queue/websocket.ts +4 -4
- package/src/api/region/create.ts +2 -2
- package/src/api/region/delete.ts +2 -2
- package/src/api/region/index.ts +4 -4
- package/src/api/region/list.ts +2 -2
- package/src/api/region/resources.ts +2 -2
- package/src/api/sandbox/cli-list.ts +3 -3
- package/src/api/sandbox/client.ts +11 -11
- package/src/api/sandbox/create.ts +4 -4
- package/src/api/sandbox/destroy.ts +2 -2
- package/src/api/sandbox/execute.ts +2 -2
- package/src/api/sandbox/execution.ts +2 -2
- package/src/api/sandbox/files.ts +2 -2
- package/src/api/sandbox/get.ts +3 -3
- package/src/api/sandbox/index.ts +34 -30
- package/src/api/sandbox/list.ts +3 -3
- package/src/api/sandbox/pause.ts +42 -0
- package/src/api/sandbox/resolve.ts +1 -1
- package/src/api/sandbox/resume.ts +42 -0
- package/src/api/sandbox/run.ts +6 -6
- package/src/api/sandbox/runtime.ts +2 -2
- package/src/api/sandbox/snapshot.ts +3 -3
- package/src/api/sandbox/util.ts +6 -0
- package/src/api/session/get.ts +3 -3
- package/src/api/session/index.ts +3 -3
- package/src/api/session/list.ts +2 -2
- package/src/api/session/logs.ts +2 -2
- package/src/api/stream/get.ts +2 -2
- package/src/api/stream/index.ts +3 -3
- package/src/api/stream/list.ts +2 -2
- package/src/api/thread/delete.ts +2 -2
- package/src/api/thread/get.ts +3 -3
- package/src/api/thread/index.ts +4 -4
- package/src/api/thread/list.ts +2 -2
- package/src/api/user/index.ts +1 -1
- package/src/api/user/whoami.ts +2 -2
- package/src/index.ts +8 -8
- package/src/runtime-bootstrap.ts +1 -1
package/src/api/queue/sources.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type APIClient,
|
|
2
|
+
import { type APIClient, APIResponseSchema, APIResponseSchemaNoData } from '../api.ts';
|
|
3
3
|
import {
|
|
4
4
|
type CreateSourceRequest,
|
|
5
5
|
CreateSourceRequestSchema,
|
|
@@ -8,16 +8,14 @@ import {
|
|
|
8
8
|
SourceSchema,
|
|
9
9
|
type UpdateSourceRequest,
|
|
10
10
|
UpdateSourceRequestSchema,
|
|
11
|
-
} from './types';
|
|
11
|
+
} from './types.ts';
|
|
12
12
|
import {
|
|
13
13
|
buildQueueHeaders,
|
|
14
14
|
QueueError,
|
|
15
|
-
QueueNotFoundError,
|
|
16
15
|
queueApiPath,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from './
|
|
20
|
-
import { validateQueueName, validateSourceId, validateSourceName } from './validation';
|
|
16
|
+
withQueueErrorHandling,
|
|
17
|
+
} from './util.ts';
|
|
18
|
+
import { validateQueueName, validateSourceId, validateSourceName } from './validation.ts';
|
|
21
19
|
|
|
22
20
|
export const SourceResponseSchema = APIResponseSchema(z.object({ source: SourceSchema }));
|
|
23
21
|
export const SourcesListResponseSchema = APIResponseSchema(
|
|
@@ -64,63 +62,27 @@ export async function createSource(
|
|
|
64
62
|
validateSourceName(params.name);
|
|
65
63
|
|
|
66
64
|
const url = queueApiPath('sources/create', queueName);
|
|
65
|
+
const resp = await withQueueErrorHandling(
|
|
66
|
+
() =>
|
|
67
|
+
client.post(
|
|
68
|
+
url,
|
|
69
|
+
params,
|
|
70
|
+
SourceResponseSchema,
|
|
71
|
+
CreateSourceRequestSchema,
|
|
72
|
+
undefined,
|
|
73
|
+
buildQueueHeaders(options?.orgId)
|
|
74
|
+
),
|
|
75
|
+
{ queueName, sourceName: params.name }
|
|
76
|
+
);
|
|
67
77
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
url,
|
|
71
|
-
params,
|
|
72
|
-
SourceResponseSchema,
|
|
73
|
-
CreateSourceRequestSchema,
|
|
74
|
-
undefined,
|
|
75
|
-
buildQueueHeaders(options?.orgId)
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
if (resp.success) {
|
|
79
|
-
return resp.data.source;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (resp.message?.includes('queue') && resp.message?.includes('not found')) {
|
|
83
|
-
throw new QueueNotFoundError({
|
|
84
|
-
queueName,
|
|
85
|
-
message: resp.message,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (resp.message?.includes('already exists')) {
|
|
90
|
-
throw new SourceAlreadyExistsError({
|
|
91
|
-
queueName,
|
|
92
|
-
name: params.name,
|
|
93
|
-
message: `A source with name "${params.name}" already exists for queue "${queueName}"`,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
throw new QueueError({
|
|
98
|
-
queueName,
|
|
99
|
-
message: resp.message || 'Failed to create source',
|
|
100
|
-
});
|
|
101
|
-
} catch (error) {
|
|
102
|
-
if (error instanceof APIError) {
|
|
103
|
-
const message = error.message || '';
|
|
104
|
-
if (message.includes('already exists')) {
|
|
105
|
-
throw new SourceAlreadyExistsError({
|
|
106
|
-
queueName,
|
|
107
|
-
name: params.name,
|
|
108
|
-
message: `A source with name "${params.name}" already exists for queue "${queueName}"`,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
if (message.includes('queue') && message.includes('not found')) {
|
|
112
|
-
throw new QueueNotFoundError({
|
|
113
|
-
queueName,
|
|
114
|
-
message,
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
throw new QueueError({
|
|
118
|
-
queueName,
|
|
119
|
-
message: message || 'Failed to create source',
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
throw error;
|
|
78
|
+
if (resp.success) {
|
|
79
|
+
return resp.data.source;
|
|
123
80
|
}
|
|
81
|
+
|
|
82
|
+
throw new QueueError({
|
|
83
|
+
queueName,
|
|
84
|
+
message: resp.message || 'Failed to create source',
|
|
85
|
+
});
|
|
124
86
|
}
|
|
125
87
|
|
|
126
88
|
/**
|
|
@@ -153,24 +115,16 @@ export async function listSources(
|
|
|
153
115
|
): Promise<Source[]> {
|
|
154
116
|
validateQueueName(queueName);
|
|
155
117
|
const url = queueApiPath('sources/list', queueName);
|
|
156
|
-
const resp = await
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
buildQueueHeaders(options?.orgId)
|
|
118
|
+
const resp = await withQueueErrorHandling(
|
|
119
|
+
() =>
|
|
120
|
+
client.get(url, SourcesListResponseSchema, undefined, buildQueueHeaders(options?.orgId)),
|
|
121
|
+
{ queueName }
|
|
161
122
|
);
|
|
162
123
|
|
|
163
124
|
if (resp.success) {
|
|
164
125
|
return resp.data.sources;
|
|
165
126
|
}
|
|
166
127
|
|
|
167
|
-
if (resp.message?.includes('not found')) {
|
|
168
|
-
throw new QueueNotFoundError({
|
|
169
|
-
queueName,
|
|
170
|
-
message: resp.message,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
|
|
174
128
|
throw new QueueError({
|
|
175
129
|
queueName,
|
|
176
130
|
message: resp.message || 'Failed to list sources',
|
|
@@ -210,32 +164,15 @@ export async function getSource(
|
|
|
210
164
|
validateSourceId(sourceId);
|
|
211
165
|
|
|
212
166
|
const url = queueApiPath('sources/get', queueName, sourceId);
|
|
213
|
-
const resp = await
|
|
214
|
-
url,
|
|
215
|
-
|
|
216
|
-
undefined,
|
|
217
|
-
buildQueueHeaders(options?.orgId)
|
|
167
|
+
const resp = await withQueueErrorHandling(
|
|
168
|
+
() => client.get(url, SourceResponseSchema, undefined, buildQueueHeaders(options?.orgId)),
|
|
169
|
+
{ queueName, sourceId }
|
|
218
170
|
);
|
|
219
171
|
|
|
220
172
|
if (resp.success) {
|
|
221
173
|
return resp.data.source;
|
|
222
174
|
}
|
|
223
175
|
|
|
224
|
-
if (resp.message?.includes('source') && resp.message?.includes('not found')) {
|
|
225
|
-
throw new SourceNotFoundError({
|
|
226
|
-
queueName,
|
|
227
|
-
sourceId,
|
|
228
|
-
message: resp.message,
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
if (resp.message?.includes('queue') && resp.message?.includes('not found')) {
|
|
233
|
-
throw new QueueNotFoundError({
|
|
234
|
-
queueName,
|
|
235
|
-
message: resp.message,
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
|
|
239
176
|
throw new QueueError({
|
|
240
177
|
queueName,
|
|
241
178
|
message: resp.message || 'Failed to get source',
|
|
@@ -286,34 +223,23 @@ export async function updateSource(
|
|
|
286
223
|
}
|
|
287
224
|
|
|
288
225
|
const url = queueApiPath('sources/update', queueName, sourceId);
|
|
289
|
-
const resp = await
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
226
|
+
const resp = await withQueueErrorHandling(
|
|
227
|
+
() =>
|
|
228
|
+
client.patch(
|
|
229
|
+
url,
|
|
230
|
+
params,
|
|
231
|
+
SourceResponseSchema,
|
|
232
|
+
UpdateSourceRequestSchema,
|
|
233
|
+
undefined,
|
|
234
|
+
buildQueueHeaders(options?.orgId)
|
|
235
|
+
),
|
|
236
|
+
{ queueName, sourceId }
|
|
296
237
|
);
|
|
297
238
|
|
|
298
239
|
if (resp.success) {
|
|
299
240
|
return resp.data.source;
|
|
300
241
|
}
|
|
301
242
|
|
|
302
|
-
if (resp.message?.includes('source') && resp.message?.includes('not found')) {
|
|
303
|
-
throw new SourceNotFoundError({
|
|
304
|
-
queueName,
|
|
305
|
-
sourceId,
|
|
306
|
-
message: resp.message,
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
if (resp.message?.includes('queue') && resp.message?.includes('not found')) {
|
|
311
|
-
throw new QueueNotFoundError({
|
|
312
|
-
queueName,
|
|
313
|
-
message: resp.message,
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
|
|
317
243
|
throw new QueueError({
|
|
318
244
|
queueName,
|
|
319
245
|
message: resp.message || 'Failed to update source',
|
|
@@ -351,32 +277,21 @@ export async function deleteSource(
|
|
|
351
277
|
validateSourceId(sourceId);
|
|
352
278
|
|
|
353
279
|
const url = queueApiPath('sources/delete', queueName, sourceId);
|
|
354
|
-
const resp = await
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
280
|
+
const resp = await withQueueErrorHandling(
|
|
281
|
+
() =>
|
|
282
|
+
client.delete(
|
|
283
|
+
url,
|
|
284
|
+
DeleteSourceResponseSchema,
|
|
285
|
+
undefined,
|
|
286
|
+
buildQueueHeaders(options?.orgId)
|
|
287
|
+
),
|
|
288
|
+
{ queueName, sourceId }
|
|
359
289
|
);
|
|
360
290
|
|
|
361
291
|
if (resp.success) {
|
|
362
292
|
return;
|
|
363
293
|
}
|
|
364
294
|
|
|
365
|
-
if (resp.message?.includes('source') && resp.message?.includes('not found')) {
|
|
366
|
-
throw new SourceNotFoundError({
|
|
367
|
-
queueName,
|
|
368
|
-
sourceId,
|
|
369
|
-
message: resp.message,
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
if (resp.message?.includes('queue') && resp.message?.includes('not found')) {
|
|
374
|
-
throw new QueueNotFoundError({
|
|
375
|
-
queueName,
|
|
376
|
-
message: resp.message,
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
|
|
380
295
|
throw new QueueError({
|
|
381
296
|
queueName,
|
|
382
297
|
message: resp.message || 'Failed to delete source',
|
package/src/api/queue/util.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StructuredError } from '@agentuity/core';
|
|
2
|
+
import { APIError } from '../api.ts';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* General queue operation error.
|
|
@@ -202,3 +203,76 @@ export function buildQueueHeaders(orgId?: string): Record<string, string> | unde
|
|
|
202
203
|
}
|
|
203
204
|
return undefined;
|
|
204
205
|
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Wraps an API call and translates APIError with HTTP status codes to domain-specific queue errors.
|
|
209
|
+
*
|
|
210
|
+
* - 404 → QueueNotFoundError / MessageNotFoundError / DestinationNotFoundError / SourceNotFoundError
|
|
211
|
+
* - 409 with "already exists" → DestinationAlreadyExistsError / SourceAlreadyExistsError
|
|
212
|
+
*
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
215
|
+
export async function withQueueErrorHandling<T>(
|
|
216
|
+
apiCall: () => Promise<T>,
|
|
217
|
+
context: {
|
|
218
|
+
queueName?: string;
|
|
219
|
+
messageId?: string;
|
|
220
|
+
destinationId?: string;
|
|
221
|
+
sourceId?: string;
|
|
222
|
+
sourceName?: string;
|
|
223
|
+
destinationUrl?: string;
|
|
224
|
+
}
|
|
225
|
+
): Promise<T> {
|
|
226
|
+
try {
|
|
227
|
+
return await apiCall();
|
|
228
|
+
} catch (error) {
|
|
229
|
+
if (error instanceof APIError) {
|
|
230
|
+
if (error.status === 404) {
|
|
231
|
+
if (context.messageId && context.queueName) {
|
|
232
|
+
throw new MessageNotFoundError({
|
|
233
|
+
queueName: context.queueName,
|
|
234
|
+
messageId: context.messageId,
|
|
235
|
+
message: error.message,
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
if (context.destinationId && context.queueName) {
|
|
239
|
+
throw new DestinationNotFoundError({
|
|
240
|
+
queueName: context.queueName,
|
|
241
|
+
destinationId: context.destinationId,
|
|
242
|
+
message: error.message,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
if (context.sourceId && context.queueName) {
|
|
246
|
+
throw new SourceNotFoundError({
|
|
247
|
+
queueName: context.queueName,
|
|
248
|
+
sourceId: context.sourceId,
|
|
249
|
+
message: error.message,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
if (context.queueName) {
|
|
253
|
+
throw new QueueNotFoundError({
|
|
254
|
+
queueName: context.queueName,
|
|
255
|
+
message: error.message,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (error.status === 409) {
|
|
260
|
+
if (context.destinationUrl && context.queueName) {
|
|
261
|
+
throw new DestinationAlreadyExistsError({
|
|
262
|
+
queueName: context.queueName,
|
|
263
|
+
url: context.destinationUrl,
|
|
264
|
+
message: error.message,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
if (context.sourceName && context.queueName) {
|
|
268
|
+
throw new SourceAlreadyExistsError({
|
|
269
|
+
queueName: context.queueName,
|
|
270
|
+
name: context.sourceName,
|
|
271
|
+
message: error.message,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
throw error;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
43
|
|
|
44
|
-
import type { Message } from './types';
|
|
45
|
-
import { WebSocketAuthResponseSchema, WebSocketMessageSchema } from './types';
|
|
46
|
-
import { QueueError } from './util';
|
|
47
|
-
import { validateQueueName } from './validation';
|
|
44
|
+
import type { Message } from './types.ts';
|
|
45
|
+
import { WebSocketAuthResponseSchema, WebSocketMessageSchema } from './types.ts';
|
|
46
|
+
import { QueueError } from './util.ts';
|
|
47
|
+
import { validateQueueName } from './validation.ts';
|
|
48
48
|
|
|
49
49
|
// ============================================================================
|
|
50
50
|
// Types
|
package/src/api/region/create.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIResponseSchema, APIClient } from '../api';
|
|
3
|
-
import { RegionResponseError } from './util';
|
|
2
|
+
import { APIResponseSchema, APIClient } from '../api.ts';
|
|
3
|
+
import { RegionResponseError } from './util.ts';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Database name validation regex - must match catalyst server validation:
|
package/src/api/region/delete.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIResponseSchema, APIClient } from '../api';
|
|
3
|
-
import { RegionResponseError } from './util';
|
|
2
|
+
import { APIResponseSchema, APIClient } from '../api.ts';
|
|
3
|
+
import { RegionResponseError } from './util.ts';
|
|
4
4
|
|
|
5
5
|
export const DeleteResourceSpec = z.object({
|
|
6
6
|
type: z.enum(['db', 's3']).describe('the resource type'),
|
package/src/api/region/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './list';
|
|
2
|
-
export * from './resources';
|
|
3
|
-
export * from './create';
|
|
4
|
-
export * from './delete';
|
|
1
|
+
export * from './list.ts';
|
|
2
|
+
export * from './resources.ts';
|
|
3
|
+
export * from './create.ts';
|
|
4
|
+
export * from './delete.ts';
|
package/src/api/region/list.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIResponseSchema, APIClient } from '../api';
|
|
3
|
-
import { RegionResponseError } from './util';
|
|
2
|
+
import { APIResponseSchema, APIClient } from '../api.ts';
|
|
3
|
+
import { RegionResponseError } from './util.ts';
|
|
4
4
|
|
|
5
5
|
export const ListRegionsResponse = z.array(
|
|
6
6
|
z.object({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIResponseSchema, APIClient } from '../api';
|
|
3
|
-
import { RegionResponseError } from './util';
|
|
2
|
+
import { APIResponseSchema, APIClient } from '../api.ts';
|
|
3
|
+
import { RegionResponseError } from './util.ts';
|
|
4
4
|
|
|
5
5
|
export const ResourceListResponse = z.object({
|
|
6
6
|
s3: z.array(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchema } from '../api';
|
|
3
|
-
import { SandboxResponseError } from './util';
|
|
2
|
+
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
+
import { SandboxResponseError } from './util.ts';
|
|
4
4
|
|
|
5
5
|
export const SandboxInfoSchema = z.object({
|
|
6
6
|
id: z.string().describe('the sandbox id'),
|
|
@@ -45,7 +45,7 @@ export interface CLISandboxListOptions {
|
|
|
45
45
|
/**
|
|
46
46
|
* Filter by sandbox status
|
|
47
47
|
*/
|
|
48
|
-
status?: 'creating' | 'idle' | 'running' | 'terminated' | 'failed';
|
|
48
|
+
status?: 'creating' | 'idle' | 'running' | 'paused' | 'stopping' | 'suspended' | 'terminated' | 'failed';
|
|
49
49
|
/**
|
|
50
50
|
* Maximum number of sandboxes to return (default: 50, max: 100)
|
|
51
51
|
*/
|
|
@@ -9,17 +9,17 @@ import type {
|
|
|
9
9
|
SandboxRunResult,
|
|
10
10
|
} from '@agentuity/core';
|
|
11
11
|
import type { Readable, Writable } from 'node:stream';
|
|
12
|
-
import { APIClient } from '../api';
|
|
13
|
-
import { sandboxCreate, type SandboxCreateResponse } from './create';
|
|
14
|
-
import { sandboxDestroy } from './destroy';
|
|
15
|
-
import { sandboxGet } from './get';
|
|
16
|
-
import { sandboxExecute } from './execute';
|
|
17
|
-
import { sandboxWriteFiles, sandboxReadFile } from './files';
|
|
18
|
-
import { sandboxRun } from './run';
|
|
19
|
-
import { executionGet, type ExecutionInfo } from './execution';
|
|
20
|
-
import { ConsoleLogger } from '../../logger';
|
|
21
|
-
import { getServiceUrls } from '../../config';
|
|
22
|
-
import { writeAndDrain } from './util';
|
|
12
|
+
import { APIClient } from '../api.ts';
|
|
13
|
+
import { sandboxCreate, type SandboxCreateResponse } from './create.ts';
|
|
14
|
+
import { sandboxDestroy } from './destroy.ts';
|
|
15
|
+
import { sandboxGet } from './get.ts';
|
|
16
|
+
import { sandboxExecute } from './execute.ts';
|
|
17
|
+
import { sandboxWriteFiles, sandboxReadFile } from './files.ts';
|
|
18
|
+
import { sandboxRun } from './run.ts';
|
|
19
|
+
import { executionGet, type ExecutionInfo } from './execution.ts';
|
|
20
|
+
import { ConsoleLogger } from '../../logger.ts';
|
|
21
|
+
import { getServiceUrls } from '../../config.ts';
|
|
22
|
+
import { writeAndDrain } from './util.ts';
|
|
23
23
|
|
|
24
24
|
// Server-side long-poll wait duration (max 5 minutes supported by server)
|
|
25
25
|
const EXECUTION_WAIT_DURATION = '5m';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { SandboxCreateOptions, SandboxStatus } from '@agentuity/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { type APIClient, APIResponseSchema } from '../api';
|
|
4
|
-
import { NPM_PACKAGE_NAME_PATTERN } from './snapshot-build';
|
|
5
|
-
import { API_VERSION, throwSandboxError } from './util';
|
|
3
|
+
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
4
|
+
import { NPM_PACKAGE_NAME_PATTERN } from './snapshot-build.ts';
|
|
5
|
+
import { API_VERSION, throwSandboxError } from './util.ts';
|
|
6
6
|
|
|
7
7
|
export const SandboxCreateRequestSchema = z
|
|
8
8
|
.object({
|
|
@@ -122,7 +122,7 @@ export const SandboxCreateDataSchema = z
|
|
|
122
122
|
.object({
|
|
123
123
|
sandboxId: z.string().describe('Unique identifier for the created sandbox'),
|
|
124
124
|
status: z
|
|
125
|
-
.enum(['creating', 'idle', 'running', 'terminated', 'failed'])
|
|
125
|
+
.enum(['creating', 'idle', 'running', 'paused', 'stopping', 'suspended', 'terminated', 'failed'])
|
|
126
126
|
.describe('Current status of the sandbox'),
|
|
127
127
|
stdoutStreamId: z.string().optional().describe('Stream ID for reading stdout'),
|
|
128
128
|
stdoutStreamUrl: z.string().optional().describe('URL for streaming stdout output'),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchemaNoData } from '../api';
|
|
3
|
-
import { API_VERSION, throwSandboxError } from './util';
|
|
2
|
+
import { type APIClient, APIResponseSchemaNoData } from '../api.ts';
|
|
3
|
+
import { API_VERSION, throwSandboxError } from './util.ts';
|
|
4
4
|
|
|
5
5
|
export const DestroyResponseSchema = APIResponseSchemaNoData();
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExecuteOptions, Execution, ExecutionStatus } from '@agentuity/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { type APIClient, APIResponseSchema } from '../api';
|
|
4
|
-
import { API_VERSION, SandboxBusyError, throwSandboxError } from './util';
|
|
3
|
+
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
4
|
+
import { API_VERSION, SandboxBusyError, throwSandboxError } from './util.ts';
|
|
5
5
|
|
|
6
6
|
export const ExecuteRequestSchema = z
|
|
7
7
|
.object({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExecutionStatus } from '@agentuity/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { type APIClient, APIResponseSchema } from '../api';
|
|
4
|
-
import { API_VERSION, throwSandboxError } from './util';
|
|
3
|
+
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
4
|
+
import { API_VERSION, throwSandboxError } from './util.ts';
|
|
5
5
|
|
|
6
6
|
export const ExecutionInfoSchema = z
|
|
7
7
|
.object({
|
package/src/api/sandbox/files.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { APIClient } from '../api';
|
|
3
|
-
import { SandboxResponseError, throwSandboxError, API_VERSION } from './util';
|
|
2
|
+
import { APIClient } from '../api.ts';
|
|
3
|
+
import { SandboxResponseError, throwSandboxError, API_VERSION } from './util.ts';
|
|
4
4
|
import type { FileToWrite } from '@agentuity/core';
|
|
5
5
|
|
|
6
6
|
export const FileToWriteSchema = z.object({
|
package/src/api/sandbox/get.ts
CHANGED
|
@@ -5,8 +5,8 @@ import type {
|
|
|
5
5
|
SandboxStatus,
|
|
6
6
|
} from '@agentuity/core';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { type APIClient, APIResponseSchema } from '../api';
|
|
9
|
-
import { API_VERSION, throwSandboxError } from './util';
|
|
8
|
+
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
9
|
+
import { API_VERSION, throwSandboxError } from './util.ts';
|
|
10
10
|
|
|
11
11
|
export const SandboxResourcesSchema = z
|
|
12
12
|
.object({
|
|
@@ -105,7 +105,7 @@ export const SandboxInfoDataSchema = z
|
|
|
105
105
|
name: z.string().optional().describe('Sandbox name'),
|
|
106
106
|
description: z.string().optional().describe('Sandbox description'),
|
|
107
107
|
status: z
|
|
108
|
-
.enum(['creating', 'idle', 'running', 'terminated', 'failed', 'deleted'])
|
|
108
|
+
.enum(['creating', 'idle', 'running', 'paused', 'stopping', 'suspended', 'terminated', 'failed', 'deleted'])
|
|
109
109
|
.describe('Current status of the sandbox'),
|
|
110
110
|
mode: z.string().optional().describe('Sandbox mode (interactive or oneshot)'),
|
|
111
111
|
createdAt: z.string().describe('ISO timestamp when the sandbox was created'),
|