@agentuity/cli 2.0.0-beta.0 → 2.0.0-beta.1
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/bin/cli.ts +5 -0
- package/dist/auth.d.ts +1 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +12 -1
- package/dist/auth.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +29 -1
- package/dist/cli.js.map +1 -1
- package/dist/cmd/auth/ssh/delete.js +1 -1
- package/dist/cmd/auth/ssh/delete.js.map +1 -1
- package/dist/cmd/build/app-config-extractor.d.ts +27 -0
- package/dist/cmd/build/app-config-extractor.d.ts.map +1 -0
- package/dist/cmd/build/app-config-extractor.js +152 -0
- package/dist/cmd/build/app-config-extractor.js.map +1 -0
- package/dist/cmd/build/ci.d.ts +18 -0
- package/dist/cmd/build/ci.d.ts.map +1 -0
- package/dist/cmd/build/ci.js +181 -0
- package/dist/cmd/build/ci.js.map +1 -0
- package/dist/cmd/build/index.d.ts.map +1 -1
- package/dist/cmd/build/index.js +53 -14
- package/dist/cmd/build/index.js.map +1 -1
- package/dist/cmd/build/vite/bun-dev-server.d.ts +35 -0
- package/dist/cmd/build/vite/bun-dev-server.d.ts.map +1 -1
- package/dist/cmd/build/vite/bun-dev-server.js +232 -4
- package/dist/cmd/build/vite/bun-dev-server.js.map +1 -1
- package/dist/cmd/build/vite/config-loader.d.ts +15 -20
- package/dist/cmd/build/vite/config-loader.d.ts.map +1 -1
- package/dist/cmd/build/vite/config-loader.js +41 -74
- package/dist/cmd/build/vite/config-loader.js.map +1 -1
- package/dist/cmd/build/vite/static-renderer.d.ts +0 -2
- package/dist/cmd/build/vite/static-renderer.d.ts.map +1 -1
- package/dist/cmd/build/vite/static-renderer.js +28 -14
- package/dist/cmd/build/vite/static-renderer.js.map +1 -1
- package/dist/cmd/build/vite/tailwind-source-plugin.d.ts +15 -0
- package/dist/cmd/build/vite/tailwind-source-plugin.d.ts.map +1 -0
- package/dist/cmd/build/vite/tailwind-source-plugin.js +61 -0
- package/dist/cmd/build/vite/tailwind-source-plugin.js.map +1 -0
- package/dist/cmd/build/vite/vite-asset-server-config.d.ts.map +1 -1
- package/dist/cmd/build/vite/vite-asset-server-config.js +4 -48
- package/dist/cmd/build/vite/vite-asset-server-config.js.map +1 -1
- package/dist/cmd/build/vite/vite-builder.d.ts.map +1 -1
- package/dist/cmd/build/vite/vite-builder.js +38 -156
- package/dist/cmd/build/vite/vite-builder.js.map +1 -1
- package/dist/cmd/cloud/agent/get.d.ts.map +1 -1
- package/dist/cmd/cloud/agent/get.js +1 -0
- package/dist/cmd/cloud/agent/get.js.map +1 -1
- package/dist/cmd/cloud/apikey/delete.js +1 -1
- package/dist/cmd/cloud/apikey/delete.js.map +1 -1
- package/dist/cmd/cloud/apikey/get.d.ts.map +1 -1
- package/dist/cmd/cloud/apikey/get.js +1 -0
- package/dist/cmd/cloud/apikey/get.js.map +1 -1
- package/dist/cmd/cloud/apikey/index.d.ts.map +1 -1
- package/dist/cmd/cloud/apikey/index.js +1 -0
- package/dist/cmd/cloud/apikey/index.js.map +1 -1
- package/dist/cmd/cloud/db/delete.js +1 -1
- package/dist/cmd/cloud/db/delete.js.map +1 -1
- package/dist/cmd/cloud/deploy.js +1 -1
- package/dist/cmd/cloud/deploy.js.map +1 -1
- package/dist/cmd/cloud/deployment/remove.js +17 -17
- package/dist/cmd/cloud/deployment/remove.js.map +1 -1
- package/dist/cmd/cloud/deployment/show.js +1 -1
- package/dist/cmd/cloud/deployment/show.js.map +1 -1
- package/dist/cmd/cloud/email/create.js +1 -1
- package/dist/cmd/cloud/email/create.js.map +1 -1
- package/dist/cmd/cloud/email/delete.js +1 -1
- package/dist/cmd/cloud/email/delete.js.map +1 -1
- package/dist/cmd/cloud/email/destination/delete.js +1 -1
- package/dist/cmd/cloud/email/destination/delete.js.map +1 -1
- package/dist/cmd/cloud/email/get.d.ts.map +1 -1
- package/dist/cmd/cloud/email/get.js +1 -0
- package/dist/cmd/cloud/email/get.js.map +1 -1
- package/dist/cmd/cloud/email/inbound/get.d.ts.map +1 -1
- package/dist/cmd/cloud/email/inbound/get.js +1 -0
- package/dist/cmd/cloud/email/inbound/get.js.map +1 -1
- package/dist/cmd/cloud/email/outbound/get.d.ts.map +1 -1
- package/dist/cmd/cloud/email/outbound/get.js +1 -0
- package/dist/cmd/cloud/email/outbound/get.js.map +1 -1
- package/dist/cmd/cloud/env/delete.js +1 -1
- package/dist/cmd/cloud/env/delete.js.map +1 -1
- package/dist/cmd/cloud/env/get.d.ts.map +1 -1
- package/dist/cmd/cloud/env/get.js +1 -0
- package/dist/cmd/cloud/env/get.js.map +1 -1
- package/dist/cmd/cloud/eval/get.d.ts.map +1 -1
- package/dist/cmd/cloud/eval/get.js +1 -0
- package/dist/cmd/cloud/eval/get.js.map +1 -1
- package/dist/cmd/cloud/eval/index.d.ts.map +1 -1
- package/dist/cmd/cloud/eval/index.js +1 -0
- package/dist/cmd/cloud/eval/index.js.map +1 -1
- package/dist/cmd/cloud/eval/list.js +1 -1
- package/dist/cmd/cloud/eval/list.js.map +1 -1
- package/dist/cmd/cloud/eval-run/get.d.ts.map +1 -1
- package/dist/cmd/cloud/eval-run/get.js +1 -0
- package/dist/cmd/cloud/eval-run/get.js.map +1 -1
- package/dist/cmd/cloud/eval-run/index.d.ts.map +1 -1
- package/dist/cmd/cloud/eval-run/index.js +1 -0
- package/dist/cmd/cloud/eval-run/index.js.map +1 -1
- package/dist/cmd/cloud/eval-run/list.js +1 -1
- package/dist/cmd/cloud/eval-run/list.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/delete-namespace.js +1 -1
- package/dist/cmd/cloud/keyvalue/delete-namespace.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/delete.js +1 -1
- package/dist/cmd/cloud/keyvalue/delete.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/get.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/get.js +1 -0
- package/dist/cmd/cloud/keyvalue/get.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/index.js +1 -1
- package/dist/cmd/cloud/keyvalue/index.js.map +1 -1
- package/dist/cmd/cloud/machine/delete.js +1 -1
- package/dist/cmd/cloud/machine/delete.js.map +1 -1
- package/dist/cmd/cloud/oidc/delete.js +1 -1
- package/dist/cmd/cloud/oidc/delete.js.map +1 -1
- package/dist/cmd/cloud/oidc/get.d.ts.map +1 -1
- package/dist/cmd/cloud/oidc/get.js +1 -0
- package/dist/cmd/cloud/oidc/get.js.map +1 -1
- package/dist/cmd/cloud/queue/create.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/create.js +1 -0
- package/dist/cmd/cloud/queue/create.js.map +1 -1
- package/dist/cmd/cloud/queue/delete.js +1 -1
- package/dist/cmd/cloud/queue/delete.js.map +1 -1
- package/dist/cmd/cloud/queue/get.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/get.js +1 -0
- package/dist/cmd/cloud/queue/get.js.map +1 -1
- package/dist/cmd/cloud/redis/get.js +1 -1
- package/dist/cmd/cloud/redis/get.js.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/create.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/create.js +1 -0
- package/dist/cmd/cloud/sandbox/checkpoint/create.js.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/delete.js +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/delete.js.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/index.js +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/index.js.map +1 -1
- package/dist/cmd/cloud/sandbox/create.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/create.js +9 -0
- package/dist/cmd/cloud/sandbox/create.js.map +1 -1
- package/dist/cmd/cloud/sandbox/delete.js +1 -1
- package/dist/cmd/cloud/sandbox/delete.js.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/index.js +1 -1
- package/dist/cmd/cloud/sandbox/execution/index.js.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/list.js +2 -2
- package/dist/cmd/cloud/sandbox/execution/list.js.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/cp.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/fs/cp.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/{cp.js → fs/cp.js} +13 -13
- package/dist/cmd/cloud/sandbox/fs/cp.js.map +1 -0
- package/dist/cmd/cloud/sandbox/fs/download.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/fs/download.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/{download.js → fs/download.js} +7 -7
- package/dist/cmd/cloud/sandbox/fs/download.js.map +1 -0
- package/dist/cmd/cloud/sandbox/fs/index.d.ts +2 -0
- package/dist/cmd/cloud/sandbox/fs/index.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/fs/index.js +36 -0
- package/dist/cmd/cloud/sandbox/fs/index.js.map +1 -0
- package/dist/cmd/cloud/sandbox/fs/ls.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/fs/ls.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/{ls.js → fs/ls.js} +10 -10
- package/dist/cmd/cloud/sandbox/fs/ls.js.map +1 -0
- package/dist/cmd/cloud/sandbox/fs/mkdir.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/fs/mkdir.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/{mkdir.js → fs/mkdir.js} +6 -6
- package/dist/cmd/cloud/sandbox/fs/mkdir.js.map +1 -0
- package/dist/cmd/cloud/sandbox/fs/rm.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/fs/rm.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/{rm.js → fs/rm.js} +6 -5
- package/dist/cmd/cloud/sandbox/fs/rm.js.map +1 -0
- package/dist/cmd/cloud/sandbox/fs/rmdir.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/fs/rmdir.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/{rmdir.js → fs/rmdir.js} +6 -6
- package/dist/cmd/cloud/sandbox/fs/rmdir.js.map +1 -0
- package/dist/cmd/cloud/sandbox/fs/upload.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/fs/upload.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/{upload.js → fs/upload.js} +7 -7
- package/dist/cmd/cloud/sandbox/fs/upload.js.map +1 -0
- package/dist/cmd/cloud/sandbox/index.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/index.js +4 -14
- package/dist/cmd/cloud/sandbox/index.js.map +1 -1
- package/dist/cmd/cloud/sandbox/job/create.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/job/create.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/job/create.js +52 -0
- package/dist/cmd/cloud/sandbox/job/create.js.map +1 -0
- package/dist/cmd/cloud/sandbox/job/destroy.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/job/destroy.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/job/destroy.js +59 -0
- package/dist/cmd/cloud/sandbox/job/destroy.js.map +1 -0
- package/dist/cmd/cloud/sandbox/job/get.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/job/get.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/job/get.js +66 -0
- package/dist/cmd/cloud/sandbox/job/get.js.map +1 -0
- package/dist/cmd/cloud/sandbox/job/index.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/job/index.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/job/index.js +30 -0
- package/dist/cmd/cloud/sandbox/job/index.js.map +1 -0
- package/dist/cmd/cloud/sandbox/job/list.d.ts +3 -0
- package/dist/cmd/cloud/sandbox/job/list.d.ts.map +1 -0
- package/dist/cmd/cloud/sandbox/job/list.js +67 -0
- package/dist/cmd/cloud/sandbox/job/list.js.map +1 -0
- package/dist/cmd/cloud/sandbox/runtime/index.js +1 -1
- package/dist/cmd/cloud/sandbox/runtime/index.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/create.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/create.js +1 -0
- package/dist/cmd/cloud/sandbox/snapshot/create.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/delete.js +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/delete.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/index.js +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/index.js.map +1 -1
- package/dist/cmd/cloud/schedule/create.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/create.js +1 -0
- package/dist/cmd/cloud/schedule/create.js.map +1 -1
- package/dist/cmd/cloud/schedule/delete.js +1 -1
- package/dist/cmd/cloud/schedule/delete.js.map +1 -1
- package/dist/cmd/cloud/schedule/delivery/get.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/delivery/get.js +1 -0
- package/dist/cmd/cloud/schedule/delivery/get.js.map +1 -1
- package/dist/cmd/cloud/schedule/destination/create.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/destination/create.js +1 -0
- package/dist/cmd/cloud/schedule/destination/create.js.map +1 -1
- package/dist/cmd/cloud/schedule/destination/delete.js +1 -1
- package/dist/cmd/cloud/schedule/destination/delete.js.map +1 -1
- package/dist/cmd/cloud/schedule/destination/get.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/destination/get.js +1 -0
- package/dist/cmd/cloud/schedule/destination/get.js.map +1 -1
- package/dist/cmd/cloud/schedule/get.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/get.js +1 -0
- package/dist/cmd/cloud/schedule/get.js.map +1 -1
- package/dist/cmd/cloud/session/get.d.ts.map +1 -1
- package/dist/cmd/cloud/session/get.js +1 -0
- package/dist/cmd/cloud/session/get.js.map +1 -1
- package/dist/cmd/cloud/session/index.d.ts.map +1 -1
- package/dist/cmd/cloud/session/index.js +1 -0
- package/dist/cmd/cloud/session/index.js.map +1 -1
- package/dist/cmd/cloud/session/list.js +1 -1
- package/dist/cmd/cloud/session/list.js.map +1 -1
- package/dist/cmd/cloud/storage/delete.js +1 -1
- package/dist/cmd/cloud/storage/delete.js.map +1 -1
- package/dist/cmd/cloud/stream/delete.js +1 -1
- package/dist/cmd/cloud/stream/delete.js.map +1 -1
- package/dist/cmd/cloud/stream/get.d.ts.map +1 -1
- package/dist/cmd/cloud/stream/get.js +1 -0
- package/dist/cmd/cloud/stream/get.js.map +1 -1
- package/dist/cmd/cloud/task/delete.js +1 -1
- package/dist/cmd/cloud/task/delete.js.map +1 -1
- package/dist/cmd/cloud/task/index.d.ts.map +1 -1
- package/dist/cmd/cloud/task/index.js +1 -0
- package/dist/cmd/cloud/task/index.js.map +1 -1
- package/dist/cmd/cloud/thread/delete.js +1 -1
- package/dist/cmd/cloud/thread/delete.js.map +1 -1
- package/dist/cmd/cloud/thread/get.d.ts.map +1 -1
- package/dist/cmd/cloud/thread/get.js +1 -0
- package/dist/cmd/cloud/thread/get.js.map +1 -1
- package/dist/cmd/cloud/thread/index.d.ts.map +1 -1
- package/dist/cmd/cloud/thread/index.js +1 -0
- package/dist/cmd/cloud/thread/index.js.map +1 -1
- package/dist/cmd/cloud/thread/list.js +1 -1
- package/dist/cmd/cloud/thread/list.js.map +1 -1
- package/dist/cmd/cloud/vector/delete-namespace.js +1 -1
- package/dist/cmd/cloud/vector/delete-namespace.js.map +1 -1
- package/dist/cmd/cloud/vector/delete.js +1 -1
- package/dist/cmd/cloud/vector/delete.js.map +1 -1
- package/dist/cmd/cloud/vector/get.d.ts.map +1 -1
- package/dist/cmd/cloud/vector/get.js +1 -0
- package/dist/cmd/cloud/vector/get.js.map +1 -1
- package/dist/cmd/cloud/vector/index.js +1 -1
- package/dist/cmd/cloud/vector/index.js.map +1 -1
- package/dist/cmd/cloud/webhook/create.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/create.js +1 -0
- package/dist/cmd/cloud/webhook/create.js.map +1 -1
- package/dist/cmd/cloud/webhook/delete.js +1 -1
- package/dist/cmd/cloud/webhook/delete.js.map +1 -1
- package/dist/cmd/cloud/webhook/get.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/get.js +1 -0
- package/dist/cmd/cloud/webhook/get.js.map +1 -1
- package/dist/cmd/dev/index.d.ts.map +1 -1
- package/dist/cmd/dev/index.js +161 -130
- package/dist/cmd/dev/index.js.map +1 -1
- package/dist/cmd/dev/process-manager.d.ts +104 -0
- package/dist/cmd/dev/process-manager.d.ts.map +1 -0
- package/dist/cmd/dev/process-manager.js +204 -0
- package/dist/cmd/dev/process-manager.js.map +1 -0
- package/dist/cmd/git/account/remove.d.ts.map +1 -1
- package/dist/cmd/git/account/remove.js +1 -0
- package/dist/cmd/git/account/remove.js.map +1 -1
- package/dist/cmd/profile/delete.js +1 -1
- package/dist/cmd/profile/delete.js.map +1 -1
- package/dist/cmd/project/delete.js +1 -1
- package/dist/cmd/project/delete.js.map +1 -1
- package/dist/cmd/project/hostname/get.d.ts.map +1 -1
- package/dist/cmd/project/hostname/get.js +1 -0
- package/dist/cmd/project/hostname/get.js.map +1 -1
- package/dist/cmd/upgrade/index.d.ts.map +1 -1
- package/dist/cmd/upgrade/index.js +3 -16
- package/dist/cmd/upgrade/index.js.map +1 -1
- package/dist/schema-generator.js +1 -1
- package/dist/schema-generator.js.map +1 -1
- package/dist/schema-parser.d.ts.map +1 -1
- package/dist/schema-parser.js +8 -0
- package/dist/schema-parser.js.map +1 -1
- package/dist/utils/version-mismatch.d.ts +39 -0
- package/dist/utils/version-mismatch.d.ts.map +1 -0
- package/dist/utils/version-mismatch.js +161 -0
- package/dist/utils/version-mismatch.js.map +1 -0
- package/package.json +8 -6
- package/src/auth.ts +12 -2
- package/src/cli.ts +33 -1
- package/src/cmd/auth/ssh/delete.ts +1 -1
- package/src/cmd/build/app-config-extractor.ts +186 -0
- package/src/cmd/build/ci.ts +223 -0
- package/src/cmd/build/index.ts +65 -14
- package/src/cmd/build/vite/bun-dev-server.ts +319 -6
- package/src/cmd/build/vite/config-loader.ts +45 -77
- package/src/cmd/build/vite/static-renderer.ts +34 -16
- package/src/cmd/build/vite/tailwind-source-plugin.ts +73 -0
- package/src/cmd/build/vite/vite-asset-server-config.ts +4 -47
- package/src/cmd/build/vite/vite-builder.ts +45 -169
- package/src/cmd/cloud/agent/get.ts +1 -0
- package/src/cmd/cloud/apikey/delete.ts +1 -1
- package/src/cmd/cloud/apikey/get.ts +1 -0
- package/src/cmd/cloud/apikey/index.ts +1 -0
- package/src/cmd/cloud/db/delete.ts +1 -1
- package/src/cmd/cloud/deploy.ts +1 -1
- package/src/cmd/cloud/deployment/remove.ts +17 -17
- package/src/cmd/cloud/deployment/show.ts +1 -1
- package/src/cmd/cloud/email/create.ts +1 -1
- package/src/cmd/cloud/email/delete.ts +1 -1
- package/src/cmd/cloud/email/destination/delete.ts +1 -1
- package/src/cmd/cloud/email/get.ts +1 -0
- package/src/cmd/cloud/email/inbound/get.ts +1 -0
- package/src/cmd/cloud/email/outbound/get.ts +1 -0
- package/src/cmd/cloud/env/delete.ts +1 -1
- package/src/cmd/cloud/env/get.ts +1 -0
- package/src/cmd/cloud/eval/get.ts +1 -0
- package/src/cmd/cloud/eval/index.ts +1 -0
- package/src/cmd/cloud/eval/list.ts +1 -1
- package/src/cmd/cloud/eval-run/get.ts +1 -0
- package/src/cmd/cloud/eval-run/index.ts +1 -0
- package/src/cmd/cloud/eval-run/list.ts +1 -1
- package/src/cmd/cloud/keyvalue/delete-namespace.ts +1 -1
- package/src/cmd/cloud/keyvalue/delete.ts +1 -1
- package/src/cmd/cloud/keyvalue/get.ts +1 -0
- package/src/cmd/cloud/keyvalue/index.ts +1 -1
- package/src/cmd/cloud/machine/delete.ts +1 -1
- package/src/cmd/cloud/oidc/delete.ts +1 -1
- package/src/cmd/cloud/oidc/get.ts +1 -0
- package/src/cmd/cloud/queue/create.ts +1 -0
- package/src/cmd/cloud/queue/delete.ts +1 -1
- package/src/cmd/cloud/queue/get.ts +1 -0
- package/src/cmd/cloud/redis/get.ts +1 -1
- package/src/cmd/cloud/sandbox/checkpoint/create.ts +1 -0
- package/src/cmd/cloud/sandbox/checkpoint/delete.ts +1 -1
- package/src/cmd/cloud/sandbox/checkpoint/index.ts +1 -1
- package/src/cmd/cloud/sandbox/create.ts +9 -0
- package/src/cmd/cloud/sandbox/delete.ts +1 -1
- package/src/cmd/cloud/sandbox/execution/index.ts +1 -1
- package/src/cmd/cloud/sandbox/execution/list.ts +2 -2
- package/src/cmd/cloud/sandbox/{cp.ts → fs/cp.ts} +13 -13
- package/src/cmd/cloud/sandbox/{download.ts → fs/download.ts} +7 -7
- package/src/cmd/cloud/sandbox/fs/index.ts +36 -0
- package/src/cmd/cloud/sandbox/{ls.ts → fs/ls.ts} +10 -10
- package/src/cmd/cloud/sandbox/{mkdir.ts → fs/mkdir.ts} +6 -6
- package/src/cmd/cloud/sandbox/{rm.ts → fs/rm.ts} +6 -5
- package/src/cmd/cloud/sandbox/{rmdir.ts → fs/rmdir.ts} +6 -6
- package/src/cmd/cloud/sandbox/{upload.ts → fs/upload.ts} +7 -7
- package/src/cmd/cloud/sandbox/index.ts +4 -14
- package/src/cmd/cloud/sandbox/job/create.ts +63 -0
- package/src/cmd/cloud/sandbox/job/destroy.ts +67 -0
- package/src/cmd/cloud/sandbox/job/get.ts +78 -0
- package/src/cmd/cloud/sandbox/job/index.ts +31 -0
- package/src/cmd/cloud/sandbox/job/list.ts +81 -0
- package/src/cmd/cloud/sandbox/runtime/index.ts +1 -1
- package/src/cmd/cloud/sandbox/snapshot/create.ts +1 -0
- package/src/cmd/cloud/sandbox/snapshot/delete.ts +1 -1
- package/src/cmd/cloud/sandbox/snapshot/index.ts +1 -1
- package/src/cmd/cloud/schedule/create.ts +1 -0
- package/src/cmd/cloud/schedule/delete.ts +1 -1
- package/src/cmd/cloud/schedule/delivery/get.ts +1 -0
- package/src/cmd/cloud/schedule/destination/create.ts +1 -0
- package/src/cmd/cloud/schedule/destination/delete.ts +1 -1
- package/src/cmd/cloud/schedule/destination/get.ts +1 -0
- package/src/cmd/cloud/schedule/get.ts +1 -0
- package/src/cmd/cloud/session/get.ts +1 -0
- package/src/cmd/cloud/session/index.ts +1 -0
- package/src/cmd/cloud/session/list.ts +1 -1
- package/src/cmd/cloud/storage/delete.ts +1 -1
- package/src/cmd/cloud/stream/delete.ts +1 -1
- package/src/cmd/cloud/stream/get.ts +1 -0
- package/src/cmd/cloud/task/delete.ts +1 -1
- package/src/cmd/cloud/task/index.ts +1 -0
- package/src/cmd/cloud/thread/delete.ts +1 -1
- package/src/cmd/cloud/thread/get.ts +1 -0
- package/src/cmd/cloud/thread/index.ts +1 -0
- package/src/cmd/cloud/thread/list.ts +1 -1
- package/src/cmd/cloud/vector/delete-namespace.ts +1 -1
- package/src/cmd/cloud/vector/delete.ts +1 -1
- package/src/cmd/cloud/vector/get.ts +1 -0
- package/src/cmd/cloud/vector/index.ts +1 -1
- package/src/cmd/cloud/webhook/create.ts +1 -0
- package/src/cmd/cloud/webhook/delete.ts +1 -1
- package/src/cmd/cloud/webhook/get.ts +1 -0
- package/src/cmd/dev/index.ts +171 -131
- package/src/cmd/dev/process-manager.ts +261 -0
- package/src/cmd/git/account/remove.ts +1 -0
- package/src/cmd/profile/delete.ts +1 -1
- package/src/cmd/project/delete.ts +1 -1
- package/src/cmd/project/hostname/get.ts +1 -0
- package/src/cmd/upgrade/index.ts +3 -18
- package/src/schema-generator.ts +1 -1
- package/src/schema-parser.ts +11 -0
- package/src/utils/version-mismatch.ts +204 -0
- package/dist/cmd/cloud/sandbox/cp.d.ts +0 -3
- package/dist/cmd/cloud/sandbox/cp.d.ts.map +0 -1
- package/dist/cmd/cloud/sandbox/cp.js.map +0 -1
- package/dist/cmd/cloud/sandbox/download.d.ts +0 -3
- package/dist/cmd/cloud/sandbox/download.d.ts.map +0 -1
- package/dist/cmd/cloud/sandbox/download.js.map +0 -1
- package/dist/cmd/cloud/sandbox/ls.d.ts +0 -3
- package/dist/cmd/cloud/sandbox/ls.d.ts.map +0 -1
- package/dist/cmd/cloud/sandbox/ls.js.map +0 -1
- package/dist/cmd/cloud/sandbox/mkdir.d.ts +0 -3
- package/dist/cmd/cloud/sandbox/mkdir.d.ts.map +0 -1
- package/dist/cmd/cloud/sandbox/mkdir.js.map +0 -1
- package/dist/cmd/cloud/sandbox/rm.d.ts +0 -3
- package/dist/cmd/cloud/sandbox/rm.d.ts.map +0 -1
- package/dist/cmd/cloud/sandbox/rm.js.map +0 -1
- package/dist/cmd/cloud/sandbox/rmdir.d.ts +0 -3
- package/dist/cmd/cloud/sandbox/rmdir.d.ts.map +0 -1
- package/dist/cmd/cloud/sandbox/rmdir.js.map +0 -1
- package/dist/cmd/cloud/sandbox/upload.d.ts +0 -3
- package/dist/cmd/cloud/sandbox/upload.d.ts.map +0 -1
- package/dist/cmd/cloud/sandbox/upload.js.map +0 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vite plugin to fix Tailwind v4 oxide scanner hang in containers
|
|
3
|
+
*
|
|
4
|
+
* The Tailwind v4 oxide scanner (native Rust binary) can hang or fail when
|
|
5
|
+
* scanning the filesystem in containerized environments. Adding source(none)
|
|
6
|
+
* to @import "tailwindcss" disables the oxide filesystem scanner, and an
|
|
7
|
+
* explicit @source directive pointing at the project's src/ directory tells
|
|
8
|
+
* Tailwind exactly where to find utility classes.
|
|
9
|
+
*
|
|
10
|
+
* @see https://github.com/tailwindlabs/tailwindcss/discussions/19661
|
|
11
|
+
* @see https://tailwindcss.com/docs/detecting-classes-in-source-files
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { dirname, join, relative, sep } from 'node:path';
|
|
15
|
+
import type { Plugin } from 'vite';
|
|
16
|
+
|
|
17
|
+
export function tailwindSourcePlugin(): Plugin {
|
|
18
|
+
let root: string;
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
name: 'agentuity:tailwind-source',
|
|
22
|
+
enforce: 'pre',
|
|
23
|
+
|
|
24
|
+
configResolved(config) {
|
|
25
|
+
root = config.root;
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
transform(code, id) {
|
|
29
|
+
// Only transform CSS files
|
|
30
|
+
if (!id.endsWith('.css')) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Check if the file contains @import "tailwindcss" (with either quote type)
|
|
35
|
+
if (!/@import\s+["']tailwindcss["']/.test(code)) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Compute relative path from CSS file to project's src/ directory
|
|
40
|
+
const cssDir = dirname(id);
|
|
41
|
+
const srcDir = join(root, 'src');
|
|
42
|
+
let relPath = relative(cssDir, srcDir).split(sep).join('/');
|
|
43
|
+
if (relPath === '') {
|
|
44
|
+
relPath = '.';
|
|
45
|
+
} else if (!relPath.startsWith('.')) {
|
|
46
|
+
relPath = './' + relPath;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Transform @import "tailwindcss" → @import "tailwindcss" source(none)
|
|
50
|
+
// and add explicit @source so Tailwind knows where to scan for classes.
|
|
51
|
+
// Does NOT transform if source() is already specified.
|
|
52
|
+
const transformed = code.replace(
|
|
53
|
+
/@import\s+(["'])tailwindcss\1([^;]*);/g,
|
|
54
|
+
(match, quote, rest) => {
|
|
55
|
+
// If source() is already present, don't modify
|
|
56
|
+
if (/source\s*\(/.test(rest)) {
|
|
57
|
+
return match;
|
|
58
|
+
}
|
|
59
|
+
return `@import ${quote}tailwindcss${quote}${rest} source(none);\n@source "${relPath}";`;
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
if (transformed !== code) {
|
|
64
|
+
return {
|
|
65
|
+
code: transformed,
|
|
66
|
+
map: null,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return null;
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
import { join } from 'node:path';
|
|
9
9
|
import { existsSync } from 'node:fs';
|
|
10
|
-
import { createRequire } from 'node:module';
|
|
11
10
|
import type { InlineConfig, Plugin } from 'vite';
|
|
12
11
|
import type { Logger } from '../../../types';
|
|
13
12
|
|
|
@@ -168,22 +167,6 @@ export async function generateAssetServerConfig(
|
|
|
168
167
|
): Promise<InlineConfig> {
|
|
169
168
|
const { rootDir, logger, workbenchPath, port, backendPort, routePaths = ['/api'] } = options;
|
|
170
169
|
|
|
171
|
-
// Load custom user config for define values and plugins
|
|
172
|
-
const { loadAgentuityConfig } = await import('./config-loader');
|
|
173
|
-
const userConfig = await loadAgentuityConfig(rootDir, logger);
|
|
174
|
-
const userDefine = userConfig?.define || {};
|
|
175
|
-
const userPlugins = userConfig?.plugins || [];
|
|
176
|
-
|
|
177
|
-
if (Object.keys(userDefine).length > 0) {
|
|
178
|
-
logger.debug(
|
|
179
|
-
'Loaded %d custom define(s) from agentuity.config.ts',
|
|
180
|
-
Object.keys(userDefine).length
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
if (userPlugins.length > 0) {
|
|
184
|
-
logger.debug('Loaded %d custom plugin(s) from agentuity.config.ts', userPlugins.length);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
170
|
// Load path aliases from tsconfig.json if available
|
|
188
171
|
const tsconfigPath = join(rootDir, 'tsconfig.json');
|
|
189
172
|
let alias = {};
|
|
@@ -217,16 +200,14 @@ export async function generateAssetServerConfig(
|
|
|
217
200
|
|
|
218
201
|
resolve: {
|
|
219
202
|
alias,
|
|
220
|
-
// Deduplicate React to prevent multiple instances
|
|
203
|
+
// Deduplicate React to prevent multiple instances (if used)
|
|
221
204
|
dedupe: ['react', 'react-dom', 'react/jsx-runtime', 'react/jsx-dev-runtime'],
|
|
222
205
|
},
|
|
223
206
|
|
|
224
|
-
// Pre-bundle dependencies to avoid
|
|
207
|
+
// Pre-bundle dependencies to avoid issues with pre-built packages
|
|
225
208
|
// Only include @agentuity/workbench if workbench is enabled
|
|
226
209
|
optimizeDeps: {
|
|
227
|
-
include: workbenchPath
|
|
228
|
-
? ['@agentuity/workbench', '@agentuity/core', '@agentuity/react']
|
|
229
|
-
: ['@agentuity/core', '@agentuity/react'],
|
|
210
|
+
include: workbenchPath ? ['@agentuity/workbench', '@agentuity/core'] : ['@agentuity/core'],
|
|
230
211
|
},
|
|
231
212
|
|
|
232
213
|
// Only allow frontend env vars (server uses process.env)
|
|
@@ -288,9 +269,6 @@ export async function generateAssetServerConfig(
|
|
|
288
269
|
|
|
289
270
|
// Define environment variables for browser
|
|
290
271
|
define: {
|
|
291
|
-
// Merge user-defined constants first
|
|
292
|
-
...userDefine,
|
|
293
|
-
// Then add default defines (these will override any user-defined protected keys)
|
|
294
272
|
...(workbenchPath
|
|
295
273
|
? { 'import.meta.env.AGENTUITY_PUBLIC_WORKBENCH_PATH': JSON.stringify(workbenchPath) }
|
|
296
274
|
: {}),
|
|
@@ -300,33 +278,12 @@ export async function generateAssetServerConfig(
|
|
|
300
278
|
'process.env.NODE_ENV': JSON.stringify('development'),
|
|
301
279
|
},
|
|
302
280
|
|
|
303
|
-
//
|
|
304
|
-
// Try project's node_modules first, fall back to CLI's bundled version
|
|
281
|
+
// Agentuity-specific plugins (Vite loads user plugins from vite.config.ts automatically)
|
|
305
282
|
plugins: await (async () => {
|
|
306
283
|
const { browserEnvPlugin } = await import('./browser-env-plugin');
|
|
307
284
|
const { publicAssetPathPlugin } = await import('./public-asset-path-plugin');
|
|
308
|
-
const { hasFrameworkPlugin } = await import('./config-loader');
|
|
309
|
-
|
|
310
|
-
// Auto-add React plugin if no framework plugin is present (backwards compatibility)
|
|
311
|
-
const resolvedUserPlugins = [...userPlugins];
|
|
312
|
-
if (resolvedUserPlugins.length === 0 || !hasFrameworkPlugin(resolvedUserPlugins)) {
|
|
313
|
-
logger.debug(
|
|
314
|
-
'No framework plugin found in agentuity.config.ts plugins, adding React automatically for dev server'
|
|
315
|
-
);
|
|
316
|
-
const projectRequire = createRequire(join(rootDir, 'package.json'));
|
|
317
|
-
let reactPluginPath = '@vitejs/plugin-react';
|
|
318
|
-
try {
|
|
319
|
-
reactPluginPath = projectRequire.resolve('@vitejs/plugin-react');
|
|
320
|
-
} catch {
|
|
321
|
-
// Project doesn't have @vitejs/plugin-react, use CLI's bundled version
|
|
322
|
-
}
|
|
323
|
-
const reactModule = await import(reactPluginPath);
|
|
324
|
-
resolvedUserPlugins.unshift(reactModule.default());
|
|
325
|
-
}
|
|
326
285
|
|
|
327
286
|
return [
|
|
328
|
-
// User-defined plugins from agentuity.config.ts (framework plugin + extras)
|
|
329
|
-
...resolvedUserPlugins,
|
|
330
287
|
// Browser env plugin to map process.env to import.meta.env
|
|
331
288
|
browserEnvPlugin(),
|
|
332
289
|
// Warn about incorrect public asset paths in dev mode
|
|
@@ -5,47 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { join } from 'node:path';
|
|
8
|
-
import { existsSync,
|
|
9
|
-
import {
|
|
10
|
-
import type { InlineConfig, Plugin } from 'vite';
|
|
8
|
+
import { existsSync, rmSync } from 'node:fs';
|
|
9
|
+
import type { InlineConfig } from 'vite';
|
|
11
10
|
import type { Logger, DeployOptions } from '../../../types';
|
|
12
|
-
import { browserEnvPlugin } from './browser-env-plugin';
|
|
13
|
-
import { beaconPlugin } from './beacon-plugin';
|
|
14
|
-
import { publicAssetPathPlugin } from './public-asset-path-plugin';
|
|
15
11
|
import type { BuildReportCollector } from '../../../build-report';
|
|
16
12
|
|
|
17
|
-
/**
|
|
18
|
-
* Vite plugin to flatten the output structure for index.html
|
|
19
|
-
*
|
|
20
|
-
* When root is set to the project root (for TanStack Router compatibility),
|
|
21
|
-
* Vite outputs index.html to .agentuity/client/src/web/index.html instead of
|
|
22
|
-
* .agentuity/client/index.html. This plugin moves it to the expected location.
|
|
23
|
-
*/
|
|
24
|
-
function flattenHtmlOutputPlugin(outDir: string): Plugin {
|
|
25
|
-
return {
|
|
26
|
-
name: 'agentuity:flatten-html-output',
|
|
27
|
-
apply: 'build',
|
|
28
|
-
closeBundle() {
|
|
29
|
-
const nestedHtmlPath = join(outDir, 'src', 'web', 'index.html');
|
|
30
|
-
const targetHtmlPath = join(outDir, 'index.html');
|
|
31
|
-
|
|
32
|
-
if (existsSync(nestedHtmlPath)) {
|
|
33
|
-
renameSync(nestedHtmlPath, targetHtmlPath);
|
|
34
|
-
|
|
35
|
-
// Clean up empty src/web directory structure
|
|
36
|
-
const srcWebDir = join(outDir, 'src', 'web');
|
|
37
|
-
const srcDir = join(outDir, 'src');
|
|
38
|
-
try {
|
|
39
|
-
rmSync(srcWebDir, { recursive: true, force: true });
|
|
40
|
-
rmSync(srcDir, { recursive: true, force: true });
|
|
41
|
-
} catch {
|
|
42
|
-
// Ignore cleanup errors
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
13
|
export interface ViteBuildOptions {
|
|
50
14
|
rootDir: string;
|
|
51
15
|
mode: 'client' | 'server' | 'workbench';
|
|
@@ -74,7 +38,7 @@ export interface ViteBuildOptions {
|
|
|
74
38
|
* Uses inline Vite config (customizable via agentuity.config.ts)
|
|
75
39
|
*/
|
|
76
40
|
export async function runViteBuild(options: ViteBuildOptions): Promise<void> {
|
|
77
|
-
const { rootDir, mode, dev = false,
|
|
41
|
+
const { rootDir, mode, dev = false, logger, profile } = options;
|
|
78
42
|
|
|
79
43
|
logger.debug(`Running Vite build for mode: ${mode}`);
|
|
80
44
|
|
|
@@ -117,136 +81,56 @@ export async function runViteBuild(options: ViteBuildOptions): Promise<void> {
|
|
|
117
81
|
return;
|
|
118
82
|
}
|
|
119
83
|
|
|
120
|
-
// Dynamically import vite
|
|
121
|
-
|
|
122
|
-
const projectRequire = createRequire(join(rootDir, 'package.json'));
|
|
123
|
-
let vitePath = 'vite';
|
|
124
|
-
let reactPluginPath = '@vitejs/plugin-react';
|
|
125
|
-
try {
|
|
126
|
-
vitePath = projectRequire.resolve('vite');
|
|
127
|
-
reactPluginPath = projectRequire.resolve('@vitejs/plugin-react');
|
|
128
|
-
} catch {
|
|
129
|
-
// Project doesn't have vite, use CLI's bundled version
|
|
130
|
-
}
|
|
131
|
-
const { build: viteBuild } = await import(vitePath);
|
|
132
|
-
const reactModule = await import(reactPluginPath);
|
|
133
|
-
const react = reactModule.default;
|
|
84
|
+
// Dynamically import vite for workbench builds
|
|
85
|
+
const { build: viteBuild } = await import('vite');
|
|
134
86
|
|
|
135
|
-
// For client/workbench, use inline config
|
|
87
|
+
// For client/workbench, use inline config with vite.config.ts loading
|
|
136
88
|
let viteConfig: InlineConfig;
|
|
137
89
|
|
|
138
90
|
if (mode === 'client') {
|
|
139
|
-
//
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
//
|
|
143
|
-
const
|
|
144
|
-
workbenchEnabled = false,
|
|
145
|
-
workbenchRoute = '/workbench',
|
|
146
|
-
analyticsEnabled = false,
|
|
147
|
-
} = options;
|
|
148
|
-
|
|
149
|
-
// Determine CDN base URL for production builds
|
|
150
|
-
// Use CDN for all non-dev builds with a deploymentId (including local region)
|
|
151
|
-
const isLocalRegion = options.region === 'local';
|
|
152
|
-
const cdnDomain = isLocalRegion
|
|
153
|
-
? 'localstack-static-assets.t3.storageapi.dev'
|
|
154
|
-
: 'cdn.agentuity.com';
|
|
155
|
-
const cdnBaseUrl =
|
|
156
|
-
!dev && deploymentId ? `https://${cdnDomain}/${deploymentId}/client/` : undefined;
|
|
157
|
-
|
|
158
|
-
// Load custom user plugins from agentuity.config.ts if it exists
|
|
91
|
+
// For client builds, spawn vite as a subprocess.
|
|
92
|
+
// This avoids issues with Bun's module loading that cause problems
|
|
93
|
+
// with certain plugins like @sveltejs/vite-plugin-svelte.
|
|
94
|
+
// The vite.config.ts in the project handles all configuration.
|
|
95
|
+
const buildMode = dev ? 'development' : 'production';
|
|
159
96
|
const clientOutDir = join(rootDir, '.agentuity/client');
|
|
160
|
-
const { loadAgentuityConfig, hasFrameworkPlugin } = await import('./config-loader');
|
|
161
|
-
const userConfig = await loadAgentuityConfig(rootDir, logger);
|
|
162
|
-
const userPlugins = userConfig?.plugins || [];
|
|
163
|
-
|
|
164
|
-
// Auto-add React plugin if no framework plugin is present (backwards compatibility)
|
|
165
|
-
if (userPlugins.length === 0 || !hasFrameworkPlugin(userPlugins)) {
|
|
166
|
-
logger.debug(
|
|
167
|
-
'No framework plugin found in agentuity.config.ts plugins, adding React automatically'
|
|
168
|
-
);
|
|
169
|
-
userPlugins.unshift(react());
|
|
170
|
-
}
|
|
171
97
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
98
|
+
logger.debug('Spawning vite build for client (subprocess mode)');
|
|
99
|
+
logger.debug(' outDir: %s', clientOutDir);
|
|
100
|
+
logger.debug(' mode: %s', buildMode);
|
|
101
|
+
|
|
102
|
+
const viteProcess = Bun.spawn(
|
|
103
|
+
['bun', 'x', 'vite', 'build', '--mode', buildMode, '--outDir', clientOutDir],
|
|
104
|
+
{
|
|
105
|
+
cwd: rootDir,
|
|
106
|
+
stdout: 'inherit',
|
|
107
|
+
stderr: 'inherit',
|
|
108
|
+
}
|
|
109
|
+
);
|
|
175
110
|
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
publicAssetPathPlugin({ cdnBaseUrl }),
|
|
181
|
-
flattenHtmlOutputPlugin(clientOutDir),
|
|
182
|
-
// Emit analytics beacon as hashed CDN asset (prod builds only)
|
|
183
|
-
beaconPlugin({ enabled: analyticsEnabled && !dev }),
|
|
184
|
-
];
|
|
185
|
-
|
|
186
|
-
// Merge custom define values from user config
|
|
187
|
-
const userDefine = userConfig?.define || {};
|
|
188
|
-
if (Object.keys(userDefine).length > 0) {
|
|
189
|
-
logger.debug(
|
|
190
|
-
'Loaded %d custom define(s) from agentuity.config.ts',
|
|
191
|
-
Object.keys(userDefine).length
|
|
192
|
-
);
|
|
111
|
+
const exitCode = await viteProcess.exited;
|
|
112
|
+
|
|
113
|
+
if (exitCode !== 0) {
|
|
114
|
+
throw new Error(`Vite build exited with code ${exitCode}`);
|
|
193
115
|
}
|
|
194
116
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
// from the repo root, matching where agentuity.config.ts is located
|
|
198
|
-
root: rootDir,
|
|
199
|
-
plugins,
|
|
200
|
-
envPrefix: ['VITE_', 'AGENTUITY_PUBLIC_', 'PUBLIC_'],
|
|
201
|
-
publicDir: join(rootDir, 'src', 'web', 'public'),
|
|
202
|
-
base: cdnBaseUrl, // CDN URL for production assets
|
|
203
|
-
define: {
|
|
204
|
-
// Merge user-defined constants first
|
|
205
|
-
...userDefine,
|
|
206
|
-
// Then add default defines (these will override any user-defined protected keys)
|
|
207
|
-
// Set workbench path if enabled (use import.meta.env for client code)
|
|
208
|
-
'import.meta.env.AGENTUITY_PUBLIC_WORKBENCH_PATH': workbenchEnabled
|
|
209
|
-
? JSON.stringify(workbenchRoute)
|
|
210
|
-
: 'undefined',
|
|
211
|
-
},
|
|
212
|
-
build: {
|
|
213
|
-
outDir: clientOutDir,
|
|
214
|
-
rollupOptions: {
|
|
215
|
-
input: htmlPath,
|
|
216
|
-
},
|
|
217
|
-
manifest: true,
|
|
218
|
-
emptyOutDir: true,
|
|
219
|
-
// Copy public files to output for CDN upload (production builds only)
|
|
220
|
-
// In dev mode, Vite serves them directly from src/web/public/
|
|
221
|
-
copyPublicDir: !dev,
|
|
222
|
-
},
|
|
223
|
-
logLevel: 'warn',
|
|
224
|
-
};
|
|
117
|
+
logger.debug('Vite build complete for mode: client');
|
|
118
|
+
return;
|
|
225
119
|
} else if (mode === 'workbench') {
|
|
226
120
|
const { workbenchRoute = '/workbench' } = options;
|
|
227
121
|
// Ensure route ends with / for Vite base
|
|
228
122
|
const base = workbenchRoute.endsWith('/') ? workbenchRoute : `${workbenchRoute}/`;
|
|
229
123
|
|
|
230
|
-
//
|
|
231
|
-
|
|
232
|
-
const
|
|
233
|
-
const
|
|
234
|
-
if (Object.keys(userDefine).length > 0) {
|
|
235
|
-
logger.debug(
|
|
236
|
-
'Loaded %d custom define(s) from agentuity.config.ts for workbench',
|
|
237
|
-
Object.keys(userDefine).length
|
|
238
|
-
);
|
|
239
|
-
}
|
|
124
|
+
// Workbench is built with React (internal UI)
|
|
125
|
+
// Use CLI's bundled React plugin since workbench is our code
|
|
126
|
+
const reactModule = await import('@vitejs/plugin-react');
|
|
127
|
+
const react = reactModule.default;
|
|
240
128
|
|
|
241
129
|
viteConfig = {
|
|
242
130
|
root: join(rootDir, '.agentuity/workbench-src'), // Use generated workbench source
|
|
243
131
|
base, // All workbench assets are under the configured route
|
|
244
132
|
plugins: [react()],
|
|
245
133
|
envPrefix: ['VITE_', 'AGENTUITY_PUBLIC_', 'PUBLIC_'],
|
|
246
|
-
define: {
|
|
247
|
-
// Merge user-defined constants
|
|
248
|
-
...userDefine,
|
|
249
|
-
},
|
|
250
134
|
build: {
|
|
251
135
|
outDir: join(rootDir, '.agentuity/workbench'),
|
|
252
136
|
rollupOptions: {
|
|
@@ -261,8 +145,7 @@ export async function runViteBuild(options: ViteBuildOptions): Promise<void> {
|
|
|
261
145
|
throw new Error(`Unknown build mode: ${mode}`);
|
|
262
146
|
}
|
|
263
147
|
|
|
264
|
-
//
|
|
265
|
-
// Force the build to use the correct mode
|
|
148
|
+
// For workbench mode, use programmatic vite build
|
|
266
149
|
const buildMode = dev ? 'development' : 'production';
|
|
267
150
|
|
|
268
151
|
await viteBuild({
|
|
@@ -297,21 +180,11 @@ export async function runAllBuilds(options: Omit<ViteBuildOptions, 'mode'>): Pro
|
|
|
297
180
|
static: { included: false, duration: 0, routes: 0 },
|
|
298
181
|
};
|
|
299
182
|
|
|
300
|
-
// Load config
|
|
301
|
-
const {
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
// Copy bundle files if configured (before build so build output takes priority)
|
|
305
|
-
if (config?.bundle?.length) {
|
|
306
|
-
const { copyBundleFiles } = await import('./bundle-files');
|
|
307
|
-
const outDir = join(rootDir, '.agentuity');
|
|
308
|
-
const count = await copyBundleFiles(rootDir, outDir, config.bundle, logger);
|
|
309
|
-
if (count > 0) {
|
|
310
|
-
logger.debug(`Copied ${count} bundle file(s) to .agentuity`);
|
|
311
|
-
}
|
|
312
|
-
}
|
|
183
|
+
// Load runtime config from createApp() in app.ts (v2 approach)
|
|
184
|
+
const { getWorkbenchConfig, loadRuntimeConfig } = await import('./config-loader');
|
|
185
|
+
const runtimeConfig = await loadRuntimeConfig(rootDir, logger);
|
|
313
186
|
|
|
314
|
-
const workbenchConfig = getWorkbenchConfig(
|
|
187
|
+
const workbenchConfig = getWorkbenchConfig(dev, runtimeConfig);
|
|
315
188
|
// Generate workbench files BEFORE any builds if enabled (dev mode only)
|
|
316
189
|
if (workbenchConfig.enabled) {
|
|
317
190
|
logger.debug('Workbench enabled (dev mode), generating files before build...');
|
|
@@ -339,7 +212,10 @@ export async function runAllBuilds(options: Omit<ViteBuildOptions, 'mode'>): Pro
|
|
|
339
212
|
const hasWebFrontend = await Bun.file(join(rootDir, 'src', 'web', 'index.html')).exists();
|
|
340
213
|
|
|
341
214
|
// Check if analytics is enabled
|
|
342
|
-
|
|
215
|
+
// v2: analytics config comes from createApp()
|
|
216
|
+
const analyticsFromRuntime = runtimeConfig?.analytics;
|
|
217
|
+
const analyticsEnabled =
|
|
218
|
+
analyticsFromRuntime !== undefined ? analyticsFromRuntime !== false : true;
|
|
343
219
|
|
|
344
220
|
// 2. Build client (only if web frontend exists)
|
|
345
221
|
if (hasWebFrontend) {
|
|
@@ -360,15 +236,15 @@ export async function runAllBuilds(options: Omit<ViteBuildOptions, 'mode'>): Pro
|
|
|
360
236
|
logger.debug('Skipping client build - no src/web/index.html found');
|
|
361
237
|
}
|
|
362
238
|
|
|
363
|
-
// 2b. Static rendering (if
|
|
364
|
-
|
|
239
|
+
// 2b. Static rendering (if entry-server.tsx exists)
|
|
240
|
+
const entryServerPath = join(rootDir, 'src', 'web', 'entry-server.tsx');
|
|
241
|
+
if (existsSync(entryServerPath) && hasWebFrontend) {
|
|
365
242
|
logger.debug('Running static rendering (pre-rendering all routes)...');
|
|
366
243
|
const endStaticDiagnostic = collector?.startDiagnostic('static-render');
|
|
367
244
|
const { runStaticRender } = await import('./static-renderer');
|
|
368
245
|
const staticResult = await runStaticRender({
|
|
369
246
|
rootDir,
|
|
370
247
|
logger,
|
|
371
|
-
userPlugins: config?.plugins || [],
|
|
372
248
|
});
|
|
373
249
|
result.static.included = true;
|
|
374
250
|
result.static.duration = staticResult.duration;
|
|
@@ -8,6 +8,7 @@ import { AgentSchema } from './schema';
|
|
|
8
8
|
|
|
9
9
|
export const getSubcommand = createSubcommand({
|
|
10
10
|
name: 'get',
|
|
11
|
+
aliases: ['show', 'info'],
|
|
11
12
|
description: 'Get details about a specific agent',
|
|
12
13
|
requires: { auth: true, apiClient: true, project: true },
|
|
13
14
|
examples: [
|
|
@@ -12,7 +12,7 @@ const APIKeyDeleteResponseSchema = z.object({
|
|
|
12
12
|
|
|
13
13
|
export const deleteSubcommand = createSubcommand({
|
|
14
14
|
name: 'delete',
|
|
15
|
-
aliases: ['del', '
|
|
15
|
+
aliases: ['rm', 'del', 'remove', 'terminate'],
|
|
16
16
|
description: 'Delete an API key (soft delete)',
|
|
17
17
|
tags: ['destructive', 'deletes-resource', 'slow', 'requires-auth'],
|
|
18
18
|
idempotent: true,
|
|
@@ -7,6 +7,7 @@ import { ErrorCode } from '../../../errors';
|
|
|
7
7
|
|
|
8
8
|
export const getSubcommand = createSubcommand({
|
|
9
9
|
name: 'get',
|
|
10
|
+
aliases: ['show', 'info'],
|
|
10
11
|
description: 'Get a specific API key by id',
|
|
11
12
|
tags: ['read-only', 'fast', 'requires-auth'],
|
|
12
13
|
examples: [{ command: getCommand('cloud apikey get <id>'), description: 'Get item details' }],
|
|
@@ -12,7 +12,7 @@ import { createSubcommand } from '../../../types';
|
|
|
12
12
|
|
|
13
13
|
export const deleteSubcommand = createSubcommand({
|
|
14
14
|
name: 'delete',
|
|
15
|
-
aliases: ['rm', 'del'],
|
|
15
|
+
aliases: ['rm', 'del', 'remove', 'terminate'],
|
|
16
16
|
description: 'Delete a database resource',
|
|
17
17
|
tags: ['destructive', 'deletes-resource', 'slow', 'requires-auth', 'requires-deployment'],
|
|
18
18
|
idempotent: false,
|
package/src/cmd/cloud/deploy.ts
CHANGED
|
@@ -801,9 +801,9 @@ export const deploySubcommand = createSubcommand({
|
|
|
801
801
|
ctx.logger.trace(`Upload file size: ${fileSize} bytes`);
|
|
802
802
|
const resp = await fetch(instructions.deployment, {
|
|
803
803
|
method: 'PUT',
|
|
804
|
-
duplex: 'half',
|
|
805
804
|
headers: {
|
|
806
805
|
'Content-Type': 'application/zip',
|
|
806
|
+
'Content-Length': String(fileSize),
|
|
807
807
|
},
|
|
808
808
|
body: zipfile,
|
|
809
809
|
signal: stepCtx.signal,
|
|
@@ -4,33 +4,33 @@ import * as tui from '../../../tui';
|
|
|
4
4
|
import { projectDeploymentDelete } from '@agentuity/server';
|
|
5
5
|
import { resolveProjectId } from './utils';
|
|
6
6
|
import { getCommand } from '../../../command-prefix';
|
|
7
|
-
const
|
|
8
|
-
success: z.boolean().describe('Whether the
|
|
7
|
+
const DeploymentDeleteResponseSchema = z.object({
|
|
8
|
+
success: z.boolean().describe('Whether the deletion succeeded'),
|
|
9
9
|
projectId: z.string().describe('Project ID'),
|
|
10
|
-
deploymentId: z.string().describe('Deployment ID that was
|
|
10
|
+
deploymentId: z.string().describe('Deployment ID that was deleted'),
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
export const removeSubcommand = createSubcommand({
|
|
14
|
-
name: '
|
|
15
|
-
|
|
14
|
+
name: 'delete',
|
|
15
|
+
aliases: ['rm', 'del', 'remove', 'terminate'],
|
|
16
|
+
description: 'Delete a specific deployment',
|
|
16
17
|
tags: ['destructive', 'deletes-resource', 'slow', 'requires-auth', 'requires-deployment'],
|
|
17
18
|
examples: [
|
|
18
19
|
{
|
|
19
|
-
command: getCommand('cloud deployment
|
|
20
|
-
description: '
|
|
20
|
+
command: getCommand('cloud deployment delete deploy_abc123xyz'),
|
|
21
|
+
description: 'Delete with confirmation',
|
|
21
22
|
},
|
|
22
23
|
{
|
|
23
|
-
command: getCommand('cloud deployment
|
|
24
|
-
description: '
|
|
24
|
+
command: getCommand('cloud deployment delete deploy_abc123xyz --force'),
|
|
25
|
+
description: 'Delete without confirmation',
|
|
25
26
|
},
|
|
26
27
|
{
|
|
27
28
|
command: getCommand(
|
|
28
|
-
'cloud deployment
|
|
29
|
+
'cloud deployment delete deploy_2024-11-20 --project-id=proj_abc123xyz'
|
|
29
30
|
),
|
|
30
|
-
description: '
|
|
31
|
+
description: 'Delete deployment from specific project',
|
|
31
32
|
},
|
|
32
33
|
],
|
|
33
|
-
aliases: ['rm', 'delete'],
|
|
34
34
|
idempotent: false,
|
|
35
35
|
requires: { auth: true, apiClient: true },
|
|
36
36
|
optional: { project: true },
|
|
@@ -41,9 +41,9 @@ export const removeSubcommand = createSubcommand({
|
|
|
41
41
|
}),
|
|
42
42
|
options: z.object({
|
|
43
43
|
projectId: z.string().optional().describe('filter by project id'),
|
|
44
|
-
force: z.boolean().default(false).describe('Force
|
|
44
|
+
force: z.boolean().default(false).describe('Force deletion without confirmation'),
|
|
45
45
|
}),
|
|
46
|
-
response:
|
|
46
|
+
response: DeploymentDeleteResponseSchema,
|
|
47
47
|
},
|
|
48
48
|
async handler(ctx) {
|
|
49
49
|
const projectId = resolveProjectId(ctx, { projectId: ctx.opts.projectId });
|
|
@@ -51,7 +51,7 @@ export const removeSubcommand = createSubcommand({
|
|
|
51
51
|
|
|
52
52
|
if (!opts.force) {
|
|
53
53
|
const confirmed = await tui.confirm(
|
|
54
|
-
`Are you sure you want to
|
|
54
|
+
`Are you sure you want to delete deployment ${args.deployment_id}?`
|
|
55
55
|
);
|
|
56
56
|
if (!confirmed) {
|
|
57
57
|
tui.info('Operation cancelled');
|
|
@@ -61,7 +61,7 @@ export const removeSubcommand = createSubcommand({
|
|
|
61
61
|
|
|
62
62
|
try {
|
|
63
63
|
await projectDeploymentDelete(apiClient, projectId, args.deployment_id);
|
|
64
|
-
tui.success(`Deployment ${args.deployment_id}
|
|
64
|
+
tui.success(`Deployment ${args.deployment_id} deleted successfully.`);
|
|
65
65
|
|
|
66
66
|
return {
|
|
67
67
|
success: true,
|
|
@@ -69,7 +69,7 @@ export const removeSubcommand = createSubcommand({
|
|
|
69
69
|
deploymentId: args.deployment_id,
|
|
70
70
|
};
|
|
71
71
|
} catch (ex) {
|
|
72
|
-
tui.fatal(`Failed to
|
|
72
|
+
tui.fatal(`Failed to delete deployment: ${ex}`);
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
});
|
|
@@ -60,7 +60,7 @@ export const showSubcommand = createSubcommand({
|
|
|
60
60
|
tags: ['read-only', 'fast', 'requires-auth', 'requires-deployment'],
|
|
61
61
|
examples: [
|
|
62
62
|
{
|
|
63
|
-
command: `${getCommand('cloud deployment show')}
|
|
63
|
+
command: `${getCommand('cloud deployment show')} deploy_abc123xyz`,
|
|
64
64
|
description: 'Show deployment details by ID',
|
|
65
65
|
},
|
|
66
66
|
{
|
|
@@ -8,7 +8,7 @@ import { defaultProfileName, getDefaultRegion } from '../../../config';
|
|
|
8
8
|
|
|
9
9
|
export const createSubcommand = createCommand({
|
|
10
10
|
name: 'create',
|
|
11
|
-
aliases: ['add'],
|
|
11
|
+
aliases: ['new', 'add'],
|
|
12
12
|
description: 'Create an email address',
|
|
13
13
|
tags: ['mutating', 'creates-resource', 'requires-auth'],
|
|
14
14
|
requires: { auth: true },
|
|
@@ -10,7 +10,7 @@ const DeleteResponseSchema = z.object({
|
|
|
10
10
|
|
|
11
11
|
export const deleteSubcommand = createCommand({
|
|
12
12
|
name: 'delete',
|
|
13
|
-
aliases: ['rm', 'del'],
|
|
13
|
+
aliases: ['rm', 'del', 'remove', 'terminate'],
|
|
14
14
|
description: 'Delete an email address',
|
|
15
15
|
tags: ['destructive', 'deletes-resource', 'requires-auth'],
|
|
16
16
|
requires: { auth: true },
|
|
@@ -11,7 +11,7 @@ const DeleteDestinationResponseSchema = z.object({
|
|
|
11
11
|
|
|
12
12
|
export const deleteSubcommand = createCommand({
|
|
13
13
|
name: 'delete',
|
|
14
|
-
aliases: ['rm', 'del'],
|
|
14
|
+
aliases: ['rm', 'del', 'remove', 'terminate'],
|
|
15
15
|
description: 'Delete a destination from an email address',
|
|
16
16
|
tags: ['destructive', 'deletes-resource', 'requires-auth'],
|
|
17
17
|
requires: { auth: true },
|
|
@@ -5,6 +5,7 @@ import { createEmailAdapter, EmailAddressSchema } from './util';
|
|
|
5
5
|
|
|
6
6
|
export const getSubcommand = createCommand({
|
|
7
7
|
name: 'get',
|
|
8
|
+
aliases: ['show', 'info'],
|
|
8
9
|
description: 'Get an email address by ID',
|
|
9
10
|
tags: ['read-only', 'requires-auth'],
|
|
10
11
|
requires: { auth: true },
|