@agentuity/cli 3.0.0-alpha.6 → 3.0.0-beta.0
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/AGENTS.md +146 -21
- package/bin/cli.js +31 -0
- package/dist/agent-detection.d.ts.map +1 -1
- package/dist/agent-detection.js +127 -34
- package/dist/agent-detection.js.map +1 -1
- package/dist/ai-help.d.ts +1 -1
- package/dist/ai-help.d.ts.map +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/auth.d.ts +2 -2
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +10 -10
- package/dist/auth.js.map +1 -1
- package/dist/banner.d.ts.map +1 -1
- package/dist/banner.js +6 -13
- package/dist/banner.js.map +1 -1
- package/dist/build-report.d.ts +2 -2
- package/dist/build-report.d.ts.map +1 -1
- package/dist/build-report.js +3 -5
- package/dist/build-report.js.map +1 -1
- package/dist/bun-path.d.ts +11 -4
- package/dist/bun-path.d.ts.map +1 -1
- package/dist/bun-path.js +27 -14
- package/dist/bun-path.js.map +1 -1
- package/dist/cache/index.d.ts +3 -4
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +3 -4
- package/dist/cache/index.js.map +1 -1
- package/dist/cache/resource-region.d.ts.map +1 -1
- package/dist/cache/resource-region.js +62 -33
- package/dist/cache/resource-region.js.map +1 -1
- package/dist/cache/user-cache.d.ts +4 -4
- package/dist/cache/user-cache.d.ts.map +1 -1
- package/dist/cache/user-cache.js +19 -17
- package/dist/cache/user-cache.js.map +1 -1
- package/dist/cli-logger.d.ts +2 -2
- package/dist/cli-logger.d.ts.map +1 -1
- package/dist/cli-logger.js +1 -1
- package/dist/cli-logger.js.map +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +51 -48
- package/dist/cli.js.map +1 -1
- package/dist/cmd/ai/capabilities/index.d.ts +1 -1
- package/dist/cmd/ai/capabilities/index.d.ts.map +1 -1
- package/dist/cmd/ai/capabilities/index.js +3 -3
- package/dist/cmd/ai/capabilities/index.js.map +1 -1
- package/dist/cmd/ai/capabilities/show.d.ts +1 -1
- package/dist/cmd/ai/capabilities/show.d.ts.map +1 -1
- package/dist/cmd/ai/capabilities/show.js +3 -3
- package/dist/cmd/ai/capabilities/show.js.map +1 -1
- package/dist/cmd/ai/claude-code/index.d.ts +1 -1
- package/dist/cmd/ai/claude-code/index.d.ts.map +1 -1
- package/dist/cmd/ai/claude-code/index.js +4 -4
- package/dist/cmd/ai/claude-code/index.js.map +1 -1
- package/dist/cmd/ai/claude-code/install.d.ts +1 -1
- package/dist/cmd/ai/claude-code/install.d.ts.map +1 -1
- package/dist/cmd/ai/claude-code/install.js +12 -11
- package/dist/cmd/ai/claude-code/install.js.map +1 -1
- package/dist/cmd/ai/claude-code/uninstall.d.ts +1 -1
- package/dist/cmd/ai/claude-code/uninstall.d.ts.map +1 -1
- package/dist/cmd/ai/claude-code/uninstall.js +8 -7
- package/dist/cmd/ai/claude-code/uninstall.js.map +1 -1
- package/dist/cmd/ai/detect.d.ts +1 -1
- package/dist/cmd/ai/detect.d.ts.map +1 -1
- package/dist/cmd/ai/detect.js +4 -4
- package/dist/cmd/ai/detect.js.map +1 -1
- package/dist/cmd/ai/index.d.ts +1 -1
- package/dist/cmd/ai/index.d.ts.map +1 -1
- package/dist/cmd/ai/index.js +9 -9
- package/dist/cmd/ai/index.js.map +1 -1
- package/dist/cmd/ai/intro.d.ts +1 -1
- package/dist/cmd/ai/intro.d.ts.map +1 -1
- package/dist/cmd/ai/intro.js +5 -5
- package/dist/cmd/ai/intro.js.map +1 -1
- package/dist/cmd/ai/opencode/dashboard.d.ts +1 -1
- package/dist/cmd/ai/opencode/dashboard.d.ts.map +1 -1
- package/dist/cmd/ai/opencode/dashboard.js +16 -15
- package/dist/cmd/ai/opencode/dashboard.js.map +1 -1
- package/dist/cmd/ai/opencode/db.d.ts.map +1 -1
- package/dist/cmd/ai/opencode/db.js +3 -2
- package/dist/cmd/ai/opencode/db.js.map +1 -1
- package/dist/cmd/ai/opencode/index.d.ts +1 -1
- package/dist/cmd/ai/opencode/index.d.ts.map +1 -1
- package/dist/cmd/ai/opencode/index.js +7 -7
- package/dist/cmd/ai/opencode/index.js.map +1 -1
- package/dist/cmd/ai/opencode/inspect.d.ts +1 -1
- package/dist/cmd/ai/opencode/inspect.d.ts.map +1 -1
- package/dist/cmd/ai/opencode/inspect.js +15 -15
- package/dist/cmd/ai/opencode/inspect.js.map +1 -1
- package/dist/cmd/ai/opencode/install.d.ts +1 -1
- package/dist/cmd/ai/opencode/install.d.ts.map +1 -1
- package/dist/cmd/ai/opencode/install.js +3 -3
- package/dist/cmd/ai/opencode/install.js.map +1 -1
- package/dist/cmd/ai/opencode/run.d.ts +1 -1
- package/dist/cmd/ai/opencode/run.d.ts.map +1 -1
- package/dist/cmd/ai/opencode/run.js +8 -9
- package/dist/cmd/ai/opencode/run.js.map +1 -1
- package/dist/cmd/ai/opencode/uninstall.d.ts +1 -1
- package/dist/cmd/ai/opencode/uninstall.d.ts.map +1 -1
- package/dist/cmd/ai/opencode/uninstall.js +3 -3
- package/dist/cmd/ai/opencode/uninstall.js.map +1 -1
- package/dist/cmd/ai/prompt/api.d.ts +1 -1
- package/dist/cmd/ai/prompt/api.d.ts.map +1 -1
- package/dist/cmd/ai/prompt/api.js +10 -4
- package/dist/cmd/ai/prompt/api.js.map +1 -1
- package/dist/cmd/ai/prompt/index.d.ts +1 -1
- package/dist/cmd/ai/prompt/index.d.ts.map +1 -1
- package/dist/cmd/ai/prompt/index.js +5 -5
- package/dist/cmd/ai/prompt/index.js.map +1 -1
- package/dist/cmd/ai/prompt/llm.d.ts +1 -1
- package/dist/cmd/ai/prompt/llm.d.ts.map +1 -1
- package/dist/cmd/ai/prompt/llm.js +2 -2
- package/dist/cmd/ai/prompt/llm.js.map +1 -1
- package/dist/cmd/ai/prompt/version.d.ts +1 -1
- package/dist/cmd/ai/prompt/version.d.ts.map +1 -1
- package/dist/cmd/ai/prompt/version.js +3 -4
- package/dist/cmd/ai/prompt/version.js.map +1 -1
- package/dist/cmd/ai/prompt/web.d.ts +1 -1
- package/dist/cmd/ai/prompt/web.d.ts.map +1 -1
- package/dist/cmd/ai/prompt/web.js +11 -4
- package/dist/cmd/ai/prompt/web.js.map +1 -1
- package/dist/cmd/ai/prompt/web.md +373 -0
- package/dist/cmd/ai/schema/generate.d.ts +1 -1
- package/dist/cmd/ai/schema/generate.d.ts.map +1 -1
- package/dist/cmd/ai/schema/generate.js +3 -3
- package/dist/cmd/ai/schema/generate.js.map +1 -1
- package/dist/cmd/ai/schema/index.d.ts +1 -1
- package/dist/cmd/ai/schema/index.d.ts.map +1 -1
- package/dist/cmd/ai/schema/index.js +4 -4
- package/dist/cmd/ai/schema/index.js.map +1 -1
- package/dist/cmd/ai/schema/show.d.ts +1 -1
- package/dist/cmd/ai/schema/show.d.ts.map +1 -1
- package/dist/cmd/ai/schema/show.js +3 -3
- package/dist/cmd/ai/schema/show.js.map +1 -1
- package/dist/cmd/auth/api.d.ts +1 -1
- package/dist/cmd/auth/api.d.ts.map +1 -1
- package/dist/cmd/auth/api.js +6 -5
- package/dist/cmd/auth/api.js.map +1 -1
- package/dist/cmd/auth/apikey.d.ts +1 -1
- package/dist/cmd/auth/apikey.d.ts.map +1 -1
- package/dist/cmd/auth/apikey.js +2 -2
- package/dist/cmd/auth/apikey.js.map +1 -1
- package/dist/cmd/auth/index.d.ts +1 -1
- package/dist/cmd/auth/index.d.ts.map +1 -1
- package/dist/cmd/auth/index.js +9 -9
- package/dist/cmd/auth/index.js.map +1 -1
- package/dist/cmd/auth/login.d.ts +1 -1
- package/dist/cmd/auth/login.d.ts.map +1 -1
- package/dist/cmd/auth/login.js +9 -21
- package/dist/cmd/auth/login.js.map +1 -1
- package/dist/cmd/auth/logout.d.ts +1 -1
- package/dist/cmd/auth/logout.d.ts.map +1 -1
- package/dist/cmd/auth/logout.js +6 -6
- package/dist/cmd/auth/logout.js.map +1 -1
- package/dist/cmd/auth/org/enroll.d.ts +1 -1
- package/dist/cmd/auth/org/enroll.d.ts.map +1 -1
- package/dist/cmd/auth/org/enroll.js +6 -5
- package/dist/cmd/auth/org/enroll.js.map +1 -1
- package/dist/cmd/auth/org/index.d.ts +1 -1
- package/dist/cmd/auth/org/index.d.ts.map +1 -1
- package/dist/cmd/auth/org/index.js +7 -7
- package/dist/cmd/auth/org/index.js.map +1 -1
- package/dist/cmd/auth/org/status.d.ts +1 -1
- package/dist/cmd/auth/org/status.d.ts.map +1 -1
- package/dist/cmd/auth/org/status.js +4 -4
- package/dist/cmd/auth/org/status.js.map +1 -1
- package/dist/cmd/auth/org/unenroll.d.ts +1 -1
- package/dist/cmd/auth/org/unenroll.d.ts.map +1 -1
- package/dist/cmd/auth/org/unenroll.js +4 -4
- package/dist/cmd/auth/org/unenroll.js.map +1 -1
- package/dist/cmd/auth/signup.d.ts +1 -1
- package/dist/cmd/auth/signup.d.ts.map +1 -1
- package/dist/cmd/auth/signup.js +6 -6
- package/dist/cmd/auth/signup.js.map +1 -1
- package/dist/cmd/auth/ssh/add.d.ts +1 -1
- package/dist/cmd/auth/ssh/add.d.ts.map +1 -1
- package/dist/cmd/auth/ssh/add.js +11 -10
- package/dist/cmd/auth/ssh/add.js.map +1 -1
- package/dist/cmd/auth/ssh/api.d.ts +1 -1
- package/dist/cmd/auth/ssh/api.d.ts.map +1 -1
- package/dist/cmd/auth/ssh/delete.d.ts +1 -1
- package/dist/cmd/auth/ssh/delete.d.ts.map +1 -1
- package/dist/cmd/auth/ssh/delete.js +6 -6
- package/dist/cmd/auth/ssh/delete.js.map +1 -1
- package/dist/cmd/auth/ssh/index.d.ts +1 -1
- package/dist/cmd/auth/ssh/index.d.ts.map +1 -1
- package/dist/cmd/auth/ssh/index.js +5 -5
- package/dist/cmd/auth/ssh/index.js.map +1 -1
- package/dist/cmd/auth/ssh/list.d.ts +1 -1
- package/dist/cmd/auth/ssh/list.d.ts.map +1 -1
- package/dist/cmd/auth/ssh/list.js +5 -5
- package/dist/cmd/auth/ssh/list.js.map +1 -1
- package/dist/cmd/auth/whoami.d.ts +1 -1
- package/dist/cmd/auth/whoami.d.ts.map +1 -1
- package/dist/cmd/auth/whoami.js +3 -3
- package/dist/cmd/auth/whoami.js.map +1 -1
- package/dist/cmd/build/adapters/generic.d.ts +1 -1
- package/dist/cmd/build/adapters/generic.d.ts.map +1 -1
- package/dist/cmd/build/adapters/generic.js +20 -18
- package/dist/cmd/build/adapters/generic.js.map +1 -1
- package/dist/cmd/build/adapters/index.d.ts +2 -2
- package/dist/cmd/build/adapters/index.d.ts.map +1 -1
- package/dist/cmd/build/adapters/index.js +2 -2
- package/dist/cmd/build/adapters/index.js.map +1 -1
- package/dist/cmd/build/adapters/nextjs.d.ts +1 -1
- package/dist/cmd/build/adapters/nextjs.d.ts.map +1 -1
- package/dist/cmd/build/adapters/nextjs.js +1 -1
- package/dist/cmd/build/adapters/nextjs.js.map +1 -1
- package/dist/cmd/build/adapters/static-server.d.ts.map +1 -1
- package/dist/cmd/build/adapters/static-server.js +16 -7
- package/dist/cmd/build/adapters/static-server.js.map +1 -1
- package/dist/cmd/build/adapters/types.d.ts +3 -3
- package/dist/cmd/build/adapters/types.d.ts.map +1 -1
- package/dist/cmd/build/ci.d.ts.map +1 -1
- package/dist/cmd/build/ci.js +12 -19
- package/dist/cmd/build/ci.js.map +1 -1
- package/dist/cmd/build/detect/engine.d.ts +2 -2
- package/dist/cmd/build/detect/engine.d.ts.map +1 -1
- package/dist/cmd/build/detect/engine.js +4 -3
- package/dist/cmd/build/detect/engine.js.map +1 -1
- package/dist/cmd/build/detect/generic.d.ts +1 -1
- package/dist/cmd/build/detect/generic.d.ts.map +1 -1
- package/dist/cmd/build/detect/generic.js +3 -3
- package/dist/cmd/build/detect/generic.js.map +1 -1
- package/dist/cmd/build/detect/index.d.ts +2 -2
- package/dist/cmd/build/detect/index.d.ts.map +1 -1
- package/dist/cmd/build/detect/index.js +4 -4
- package/dist/cmd/build/detect/index.js.map +1 -1
- package/dist/cmd/build/detect/util.d.ts +1 -1
- package/dist/cmd/build/detect/util.d.ts.map +1 -1
- package/dist/cmd/build/detect/util.js +11 -10
- package/dist/cmd/build/detect/util.js.map +1 -1
- package/dist/cmd/build/ids.d.ts.map +1 -1
- package/dist/cmd/build/ids.js +5 -3
- package/dist/cmd/build/ids.js.map +1 -1
- package/dist/cmd/build/index.d.ts +1 -1
- package/dist/cmd/build/index.d.ts.map +1 -1
- package/dist/cmd/build/index.js +15 -14
- package/dist/cmd/build/index.js.map +1 -1
- package/dist/cmd/build/package/index.d.ts +4 -4
- package/dist/cmd/build/package/index.d.ts.map +1 -1
- package/dist/cmd/build/package/index.js +1 -1
- package/dist/cmd/build/package/index.js.map +1 -1
- package/dist/cmd/build/package/launch.d.ts +2 -2
- package/dist/cmd/build/package/launch.d.ts.map +1 -1
- package/dist/cmd/build/patch/aisdk.d.ts +1 -1
- package/dist/cmd/build/patch/aisdk.d.ts.map +1 -1
- package/dist/cmd/build/patch/aisdk.js +1 -1
- package/dist/cmd/build/patch/aisdk.js.map +1 -1
- package/dist/cmd/build/patch/index.d.ts +8 -2
- package/dist/cmd/build/patch/index.d.ts.map +1 -1
- package/dist/cmd/build/patch/index.js +6 -5
- package/dist/cmd/build/patch/index.js.map +1 -1
- package/dist/cmd/build/patch/llm.d.ts +1 -1
- package/dist/cmd/build/patch/llm.d.ts.map +1 -1
- package/dist/cmd/build/patch/llm.js +1 -1
- package/dist/cmd/build/patch/llm.js.map +1 -1
- package/dist/cmd/build/patch/otel-llm.d.ts +1 -1
- package/dist/cmd/build/patch/otel-llm.d.ts.map +1 -1
- package/dist/cmd/build/typecheck.d.ts +2 -2
- package/dist/cmd/build/typecheck.d.ts.map +1 -1
- package/dist/cmd/build/typecheck.js +14 -14
- package/dist/cmd/build/typecheck.js.map +1 -1
- package/dist/cmd/canary/index.d.ts +1 -1
- package/dist/cmd/canary/index.d.ts.map +1 -1
- package/dist/cmd/canary/index.js +10 -7
- package/dist/cmd/canary/index.js.map +1 -1
- package/dist/cmd/cloud/agent/get.d.ts +1 -1
- package/dist/cmd/cloud/agent/get.d.ts.map +1 -1
- package/dist/cmd/cloud/agent/get.js +4 -4
- package/dist/cmd/cloud/agent/get.js.map +1 -1
- package/dist/cmd/cloud/agent/index.d.ts +1 -1
- package/dist/cmd/cloud/agent/index.d.ts.map +1 -1
- package/dist/cmd/cloud/agent/index.js +4 -4
- package/dist/cmd/cloud/agent/index.js.map +1 -1
- package/dist/cmd/cloud/agent/list.d.ts +1 -1
- package/dist/cmd/cloud/agent/list.d.ts.map +1 -1
- package/dist/cmd/cloud/agent/list.js +5 -5
- package/dist/cmd/cloud/agent/list.js.map +1 -1
- package/dist/cmd/cloud/apikey/create.d.ts +1 -1
- package/dist/cmd/cloud/apikey/create.d.ts.map +1 -1
- package/dist/cmd/cloud/apikey/create.js +4 -4
- package/dist/cmd/cloud/apikey/create.js.map +1 -1
- package/dist/cmd/cloud/apikey/delete.d.ts +1 -1
- package/dist/cmd/cloud/apikey/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/apikey/delete.js +4 -4
- package/dist/cmd/cloud/apikey/delete.js.map +1 -1
- package/dist/cmd/cloud/apikey/get.d.ts +1 -1
- package/dist/cmd/cloud/apikey/get.d.ts.map +1 -1
- package/dist/cmd/cloud/apikey/get.js +4 -4
- package/dist/cmd/cloud/apikey/get.js.map +1 -1
- package/dist/cmd/cloud/apikey/index.d.ts +1 -1
- package/dist/cmd/cloud/apikey/index.d.ts.map +1 -1
- package/dist/cmd/cloud/apikey/index.js +6 -6
- package/dist/cmd/cloud/apikey/index.js.map +1 -1
- package/dist/cmd/cloud/apikey/list.d.ts +1 -1
- package/dist/cmd/cloud/apikey/list.d.ts.map +1 -1
- package/dist/cmd/cloud/apikey/list.js +3 -3
- package/dist/cmd/cloud/apikey/list.js.map +1 -1
- package/dist/cmd/cloud/db/create.d.ts +1 -1
- package/dist/cmd/cloud/db/create.d.ts.map +1 -1
- package/dist/cmd/cloud/db/create.js +7 -7
- package/dist/cmd/cloud/db/create.js.map +1 -1
- package/dist/cmd/cloud/db/delete.d.ts +1 -1
- package/dist/cmd/cloud/db/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/db/delete.js +8 -8
- package/dist/cmd/cloud/db/delete.js.map +1 -1
- package/dist/cmd/cloud/db/get.d.ts +1 -1
- package/dist/cmd/cloud/db/get.d.ts.map +1 -1
- package/dist/cmd/cloud/db/get.js +6 -6
- package/dist/cmd/cloud/db/get.js.map +1 -1
- package/dist/cmd/cloud/db/index.d.ts +1 -1
- package/dist/cmd/cloud/db/index.d.ts.map +1 -1
- package/dist/cmd/cloud/db/index.js +9 -9
- package/dist/cmd/cloud/db/index.js.map +1 -1
- package/dist/cmd/cloud/db/list.d.ts +1 -1
- package/dist/cmd/cloud/db/list.d.ts.map +1 -1
- package/dist/cmd/cloud/db/list.js +4 -4
- package/dist/cmd/cloud/db/list.js.map +1 -1
- package/dist/cmd/cloud/db/logs.d.ts +1 -1
- package/dist/cmd/cloud/db/logs.d.ts.map +1 -1
- package/dist/cmd/cloud/db/logs.js +6 -6
- package/dist/cmd/cloud/db/logs.js.map +1 -1
- package/dist/cmd/cloud/db/sql.d.ts +1 -1
- package/dist/cmd/cloud/db/sql.d.ts.map +1 -1
- package/dist/cmd/cloud/db/sql.js +4 -4
- package/dist/cmd/cloud/db/sql.js.map +1 -1
- package/dist/cmd/cloud/db/stats.d.ts +1 -1
- package/dist/cmd/cloud/db/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/db/stats.js +4 -4
- package/dist/cmd/cloud/db/stats.js.map +1 -1
- package/dist/cmd/cloud/deploy/build.d.ts +68 -0
- package/dist/cmd/cloud/deploy/build.d.ts.map +1 -0
- package/dist/cmd/cloud/deploy/build.js +166 -0
- package/dist/cmd/cloud/deploy/build.js.map +1 -0
- package/dist/cmd/cloud/deploy/discover.d.ts +42 -0
- package/dist/cmd/cloud/deploy/discover.d.ts.map +1 -0
- package/dist/cmd/cloud/deploy/discover.js +85 -0
- package/dist/cmd/cloud/deploy/discover.js.map +1 -0
- package/dist/cmd/cloud/deploy/preflight.d.ts +81 -0
- package/dist/cmd/cloud/deploy/preflight.d.ts.map +1 -0
- package/dist/cmd/cloud/deploy/preflight.js +116 -0
- package/dist/cmd/cloud/deploy/preflight.js.map +1 -0
- package/dist/cmd/cloud/deploy/register.d.ts +62 -0
- package/dist/cmd/cloud/deploy/register.d.ts.map +1 -0
- package/dist/cmd/cloud/deploy/register.js +135 -0
- package/dist/cmd/cloud/deploy/register.js.map +1 -0
- package/dist/cmd/cloud/deploy/types.d.ts +43 -0
- package/dist/cmd/cloud/deploy/types.d.ts.map +1 -0
- package/dist/cmd/cloud/deploy/types.js +12 -0
- package/dist/cmd/cloud/deploy/types.js.map +1 -0
- package/dist/cmd/cloud/deploy/upload.d.ts +77 -0
- package/dist/cmd/cloud/deploy/upload.d.ts.map +1 -0
- package/dist/cmd/cloud/deploy/upload.js +343 -0
- package/dist/cmd/cloud/deploy/upload.js.map +1 -0
- package/dist/cmd/cloud/deploy/wait.d.ts +84 -0
- package/dist/cmd/cloud/deploy/wait.d.ts.map +1 -0
- package/dist/cmd/cloud/deploy/wait.js +237 -0
- package/dist/cmd/cloud/deploy/wait.js.map +1 -0
- package/dist/cmd/cloud/deploy-fork.d.ts +2 -2
- package/dist/cmd/cloud/deploy-fork.d.ts.map +1 -1
- package/dist/cmd/cloud/deploy-fork.js +59 -46
- package/dist/cmd/cloud/deploy-fork.js.map +1 -1
- package/dist/cmd/cloud/deploy.d.ts +1 -1
- package/dist/cmd/cloud/deploy.d.ts.map +1 -1
- package/dist/cmd/cloud/deploy.js +128 -663
- package/dist/cmd/cloud/deploy.js.map +1 -1
- package/dist/cmd/cloud/deployment/index.d.ts +1 -1
- package/dist/cmd/cloud/deployment/index.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/index.js +8 -8
- package/dist/cmd/cloud/deployment/index.js.map +1 -1
- package/dist/cmd/cloud/deployment/list.d.ts +1 -1
- package/dist/cmd/cloud/deployment/list.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/list.js +4 -4
- package/dist/cmd/cloud/deployment/list.js.map +1 -1
- package/dist/cmd/cloud/deployment/logs.d.ts +1 -1
- package/dist/cmd/cloud/deployment/logs.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/logs.js +5 -5
- package/dist/cmd/cloud/deployment/logs.js.map +1 -1
- package/dist/cmd/cloud/deployment/remove.d.ts +1 -1
- package/dist/cmd/cloud/deployment/remove.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/remove.js +4 -4
- package/dist/cmd/cloud/deployment/remove.js.map +1 -1
- package/dist/cmd/cloud/deployment/rollback.d.ts +1 -1
- package/dist/cmd/cloud/deployment/rollback.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/rollback.js +4 -4
- package/dist/cmd/cloud/deployment/rollback.js.map +1 -1
- package/dist/cmd/cloud/deployment/show.d.ts +1 -1
- package/dist/cmd/cloud/deployment/show.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/show.js +4 -4
- package/dist/cmd/cloud/deployment/show.js.map +1 -1
- package/dist/cmd/cloud/deployment/undeploy.d.ts +1 -1
- package/dist/cmd/cloud/deployment/undeploy.d.ts.map +1 -1
- package/dist/cmd/cloud/deployment/undeploy.js +4 -4
- package/dist/cmd/cloud/deployment/undeploy.js.map +1 -1
- package/dist/cmd/cloud/deployment/utils.d.ts +1 -1
- package/dist/cmd/cloud/deployment/utils.d.ts.map +1 -1
- package/dist/cmd/cloud/email/create.d.ts +1 -1
- package/dist/cmd/cloud/email/create.d.ts.map +1 -1
- package/dist/cmd/cloud/email/create.js +5 -5
- package/dist/cmd/cloud/email/create.js.map +1 -1
- package/dist/cmd/cloud/email/delete.d.ts +1 -1
- package/dist/cmd/cloud/email/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/email/delete.js +3 -3
- package/dist/cmd/cloud/email/delete.js.map +1 -1
- package/dist/cmd/cloud/email/destination/delete.d.ts +1 -1
- package/dist/cmd/cloud/email/destination/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/email/destination/delete.js +3 -3
- package/dist/cmd/cloud/email/destination/delete.js.map +1 -1
- package/dist/cmd/cloud/email/destination/index.d.ts +1 -1
- package/dist/cmd/cloud/email/destination/index.d.ts.map +1 -1
- package/dist/cmd/cloud/email/destination/index.js +4 -4
- package/dist/cmd/cloud/email/destination/index.js.map +1 -1
- package/dist/cmd/cloud/email/destination/list.d.ts +1 -1
- package/dist/cmd/cloud/email/destination/list.d.ts.map +1 -1
- package/dist/cmd/cloud/email/destination/list.js +4 -4
- package/dist/cmd/cloud/email/destination/list.js.map +1 -1
- package/dist/cmd/cloud/email/destination/url.d.ts +1 -1
- package/dist/cmd/cloud/email/destination/url.d.ts.map +1 -1
- package/dist/cmd/cloud/email/destination/url.js +6 -6
- package/dist/cmd/cloud/email/destination/url.js.map +1 -1
- package/dist/cmd/cloud/email/get.d.ts +1 -1
- package/dist/cmd/cloud/email/get.d.ts.map +1 -1
- package/dist/cmd/cloud/email/get.js +3 -3
- package/dist/cmd/cloud/email/get.js.map +1 -1
- package/dist/cmd/cloud/email/inbound/get.d.ts +1 -1
- package/dist/cmd/cloud/email/inbound/get.d.ts.map +1 -1
- package/dist/cmd/cloud/email/inbound/get.js +4 -4
- package/dist/cmd/cloud/email/inbound/get.js.map +1 -1
- package/dist/cmd/cloud/email/inbound/index.d.ts +1 -1
- package/dist/cmd/cloud/email/inbound/index.d.ts.map +1 -1
- package/dist/cmd/cloud/email/inbound/index.js +3 -3
- package/dist/cmd/cloud/email/inbound/index.js.map +1 -1
- package/dist/cmd/cloud/email/inbound/list.d.ts +1 -1
- package/dist/cmd/cloud/email/inbound/list.d.ts.map +1 -1
- package/dist/cmd/cloud/email/inbound/list.js +4 -4
- package/dist/cmd/cloud/email/inbound/list.js.map +1 -1
- package/dist/cmd/cloud/email/index.d.ts +1 -1
- package/dist/cmd/cloud/email/index.d.ts.map +1 -1
- package/dist/cmd/cloud/email/index.js +10 -10
- package/dist/cmd/cloud/email/index.js.map +1 -1
- package/dist/cmd/cloud/email/list.d.ts +1 -1
- package/dist/cmd/cloud/email/list.d.ts.map +1 -1
- package/dist/cmd/cloud/email/list.js +3 -3
- package/dist/cmd/cloud/email/list.js.map +1 -1
- package/dist/cmd/cloud/email/outbound/get.d.ts +1 -1
- package/dist/cmd/cloud/email/outbound/get.d.ts.map +1 -1
- package/dist/cmd/cloud/email/outbound/get.js +4 -4
- package/dist/cmd/cloud/email/outbound/get.js.map +1 -1
- package/dist/cmd/cloud/email/outbound/index.d.ts +1 -1
- package/dist/cmd/cloud/email/outbound/index.d.ts.map +1 -1
- package/dist/cmd/cloud/email/outbound/index.js +3 -3
- package/dist/cmd/cloud/email/outbound/index.js.map +1 -1
- package/dist/cmd/cloud/email/outbound/list.d.ts +1 -1
- package/dist/cmd/cloud/email/outbound/list.d.ts.map +1 -1
- package/dist/cmd/cloud/email/outbound/list.js +4 -4
- package/dist/cmd/cloud/email/outbound/list.js.map +1 -1
- package/dist/cmd/cloud/email/send.d.ts +1 -1
- package/dist/cmd/cloud/email/send.d.ts.map +1 -1
- package/dist/cmd/cloud/email/send.js +10 -8
- package/dist/cmd/cloud/email/send.js.map +1 -1
- package/dist/cmd/cloud/email/stats.d.ts +1 -1
- package/dist/cmd/cloud/email/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/email/stats.js +4 -4
- package/dist/cmd/cloud/email/stats.js.map +1 -1
- package/dist/cmd/cloud/email/util.d.ts +1 -1
- package/dist/cmd/cloud/email/util.d.ts.map +1 -1
- package/dist/cmd/cloud/email/util.js +3 -3
- package/dist/cmd/cloud/email/util.js.map +1 -1
- package/dist/cmd/cloud/env/delete.d.ts +1 -1
- package/dist/cmd/cloud/env/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/env/delete.js +6 -6
- package/dist/cmd/cloud/env/delete.js.map +1 -1
- package/dist/cmd/cloud/env/env-diff.js +2 -2
- package/dist/cmd/cloud/env/env-diff.js.map +1 -1
- package/dist/cmd/cloud/env/get.d.ts +1 -1
- package/dist/cmd/cloud/env/get.d.ts.map +1 -1
- package/dist/cmd/cloud/env/get.js +5 -5
- package/dist/cmd/cloud/env/get.js.map +1 -1
- package/dist/cmd/cloud/env/import.d.ts +1 -1
- package/dist/cmd/cloud/env/import.d.ts.map +1 -1
- package/dist/cmd/cloud/env/import.js +5 -5
- package/dist/cmd/cloud/env/import.js.map +1 -1
- package/dist/cmd/cloud/env/index.d.ts +1 -1
- package/dist/cmd/cloud/env/index.d.ts.map +1 -1
- package/dist/cmd/cloud/env/index.js +9 -9
- package/dist/cmd/cloud/env/index.js.map +1 -1
- package/dist/cmd/cloud/env/list.d.ts +1 -1
- package/dist/cmd/cloud/env/list.d.ts.map +1 -1
- package/dist/cmd/cloud/env/list.js +4 -4
- package/dist/cmd/cloud/env/list.js.map +1 -1
- package/dist/cmd/cloud/env/org-util.d.ts +2 -2
- package/dist/cmd/cloud/env/org-util.d.ts.map +1 -1
- package/dist/cmd/cloud/env/org-util.js +1 -1
- package/dist/cmd/cloud/env/org-util.js.map +1 -1
- package/dist/cmd/cloud/env/pull.d.ts +1 -1
- package/dist/cmd/cloud/env/pull.d.ts.map +1 -1
- package/dist/cmd/cloud/env/pull.js +6 -6
- package/dist/cmd/cloud/env/pull.js.map +1 -1
- package/dist/cmd/cloud/env/push.d.ts +1 -1
- package/dist/cmd/cloud/env/push.d.ts.map +1 -1
- package/dist/cmd/cloud/env/push.js +6 -6
- package/dist/cmd/cloud/env/push.js.map +1 -1
- package/dist/cmd/cloud/env/set.d.ts +1 -1
- package/dist/cmd/cloud/env/set.d.ts.map +1 -1
- package/dist/cmd/cloud/env/set.js +5 -5
- package/dist/cmd/cloud/env/set.js.map +1 -1
- package/dist/cmd/cloud/index.d.ts +1 -1
- package/dist/cmd/cloud/index.d.ts.map +1 -1
- package/dist/cmd/cloud/index.js +29 -33
- package/dist/cmd/cloud/index.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/create-namespace.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/create-namespace.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/create-namespace.js +4 -4
- package/dist/cmd/cloud/keyvalue/create-namespace.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/delete-namespace.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/delete-namespace.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/delete-namespace.js +5 -5
- package/dist/cmd/cloud/keyvalue/delete-namespace.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/delete.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/delete.js +4 -4
- package/dist/cmd/cloud/keyvalue/delete.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/get.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/get.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/get.js +5 -5
- package/dist/cmd/cloud/keyvalue/get.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/index.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/index.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/index.js +12 -12
- package/dist/cmd/cloud/keyvalue/index.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/keys.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/keys.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/keys.js +4 -4
- package/dist/cmd/cloud/keyvalue/keys.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/list-namespaces.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/list-namespaces.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/list-namespaces.js +4 -4
- package/dist/cmd/cloud/keyvalue/list-namespaces.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/repl.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/repl.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/repl.js +10 -14
- package/dist/cmd/cloud/keyvalue/repl.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/search.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/search.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/search.js +13 -20
- package/dist/cmd/cloud/keyvalue/search.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/set.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/set.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/set.js +5 -5
- package/dist/cmd/cloud/keyvalue/set.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/stats.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/stats.js +4 -4
- package/dist/cmd/cloud/keyvalue/stats.js.map +1 -1
- package/dist/cmd/cloud/keyvalue/util.d.ts +1 -1
- package/dist/cmd/cloud/keyvalue/util.d.ts.map +1 -1
- package/dist/cmd/cloud/keyvalue/util.js +2 -2
- package/dist/cmd/cloud/keyvalue/util.js.map +1 -1
- package/dist/cmd/cloud/machine/delete.d.ts +1 -1
- package/dist/cmd/cloud/machine/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/machine/delete.js +5 -5
- package/dist/cmd/cloud/machine/delete.js.map +1 -1
- package/dist/cmd/cloud/machine/deployments.d.ts +1 -1
- package/dist/cmd/cloud/machine/deployments.d.ts.map +1 -1
- package/dist/cmd/cloud/machine/deployments.js +5 -5
- package/dist/cmd/cloud/machine/deployments.js.map +1 -1
- package/dist/cmd/cloud/machine/get.d.ts +1 -1
- package/dist/cmd/cloud/machine/get.d.ts.map +1 -1
- package/dist/cmd/cloud/machine/get.js +5 -5
- package/dist/cmd/cloud/machine/get.js.map +1 -1
- package/dist/cmd/cloud/machine/index.d.ts +1 -1
- package/dist/cmd/cloud/machine/index.d.ts.map +1 -1
- package/dist/cmd/cloud/machine/index.js +6 -6
- package/dist/cmd/cloud/machine/index.js.map +1 -1
- package/dist/cmd/cloud/machine/list.d.ts +1 -1
- package/dist/cmd/cloud/machine/list.d.ts.map +1 -1
- package/dist/cmd/cloud/machine/list.js +5 -5
- package/dist/cmd/cloud/machine/list.js.map +1 -1
- package/dist/cmd/cloud/monitor.d.ts +1 -1
- package/dist/cmd/cloud/monitor.d.ts.map +1 -1
- package/dist/cmd/cloud/monitor.js +4 -4
- package/dist/cmd/cloud/monitor.js.map +1 -1
- package/dist/cmd/cloud/oidc/activity.d.ts +1 -1
- package/dist/cmd/cloud/oidc/activity.d.ts.map +1 -1
- package/dist/cmd/cloud/oidc/activity.js +4 -4
- package/dist/cmd/cloud/oidc/activity.js.map +1 -1
- package/dist/cmd/cloud/oidc/create.d.ts +1 -1
- package/dist/cmd/cloud/oidc/create.d.ts.map +1 -1
- package/dist/cmd/cloud/oidc/create.js +4 -4
- package/dist/cmd/cloud/oidc/create.js.map +1 -1
- package/dist/cmd/cloud/oidc/delete.d.ts +1 -1
- package/dist/cmd/cloud/oidc/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/oidc/delete.js +5 -5
- package/dist/cmd/cloud/oidc/delete.js.map +1 -1
- package/dist/cmd/cloud/oidc/get.d.ts +1 -1
- package/dist/cmd/cloud/oidc/get.d.ts.map +1 -1
- package/dist/cmd/cloud/oidc/get.js +5 -5
- package/dist/cmd/cloud/oidc/get.js.map +1 -1
- package/dist/cmd/cloud/oidc/index.d.ts +1 -1
- package/dist/cmd/cloud/oidc/index.d.ts.map +1 -1
- package/dist/cmd/cloud/oidc/index.js +9 -9
- package/dist/cmd/cloud/oidc/index.js.map +1 -1
- package/dist/cmd/cloud/oidc/list.d.ts +1 -1
- package/dist/cmd/cloud/oidc/list.d.ts.map +1 -1
- package/dist/cmd/cloud/oidc/list.js +4 -4
- package/dist/cmd/cloud/oidc/list.js.map +1 -1
- package/dist/cmd/cloud/oidc/rotate-secret.d.ts +1 -1
- package/dist/cmd/cloud/oidc/rotate-secret.d.ts.map +1 -1
- package/dist/cmd/cloud/oidc/rotate-secret.js +5 -5
- package/dist/cmd/cloud/oidc/rotate-secret.js.map +1 -1
- package/dist/cmd/cloud/oidc/users.d.ts +1 -1
- package/dist/cmd/cloud/oidc/users.d.ts.map +1 -1
- package/dist/cmd/cloud/oidc/users.js +4 -4
- package/dist/cmd/cloud/oidc/users.js.map +1 -1
- package/dist/cmd/cloud/oidc/util.d.ts +1 -1
- package/dist/cmd/cloud/oidc/util.d.ts.map +1 -1
- package/dist/cmd/cloud/oidc/util.js +2 -2
- package/dist/cmd/cloud/oidc/util.js.map +1 -1
- package/dist/cmd/cloud/queue/ack.d.ts +1 -1
- package/dist/cmd/cloud/queue/ack.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/ack.js +4 -4
- package/dist/cmd/cloud/queue/ack.js.map +1 -1
- package/dist/cmd/cloud/queue/consumers.d.ts +1 -1
- package/dist/cmd/cloud/queue/consumers.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/consumers.js +4 -4
- package/dist/cmd/cloud/queue/consumers.js.map +1 -1
- package/dist/cmd/cloud/queue/create.d.ts +1 -1
- package/dist/cmd/cloud/queue/create.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/create.js +4 -4
- package/dist/cmd/cloud/queue/create.js.map +1 -1
- package/dist/cmd/cloud/queue/delete.d.ts +1 -1
- package/dist/cmd/cloud/queue/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/delete.js +5 -5
- package/dist/cmd/cloud/queue/delete.js.map +1 -1
- package/dist/cmd/cloud/queue/destinations.d.ts +1 -1
- package/dist/cmd/cloud/queue/destinations.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/destinations.js +5 -5
- package/dist/cmd/cloud/queue/destinations.js.map +1 -1
- package/dist/cmd/cloud/queue/dlq.d.ts +1 -1
- package/dist/cmd/cloud/queue/dlq.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/dlq.js +5 -5
- package/dist/cmd/cloud/queue/dlq.js.map +1 -1
- package/dist/cmd/cloud/queue/get.d.ts +1 -1
- package/dist/cmd/cloud/queue/get.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/get.js +4 -4
- package/dist/cmd/cloud/queue/get.js.map +1 -1
- package/dist/cmd/cloud/queue/index.d.ts +1 -1
- package/dist/cmd/cloud/queue/index.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/index.js +18 -18
- package/dist/cmd/cloud/queue/index.js.map +1 -1
- package/dist/cmd/cloud/queue/list.d.ts +1 -1
- package/dist/cmd/cloud/queue/list.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/list.js +4 -4
- package/dist/cmd/cloud/queue/list.js.map +1 -1
- package/dist/cmd/cloud/queue/messages.d.ts +1 -1
- package/dist/cmd/cloud/queue/messages.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/messages.js +4 -4
- package/dist/cmd/cloud/queue/messages.js.map +1 -1
- package/dist/cmd/cloud/queue/nack.d.ts +1 -1
- package/dist/cmd/cloud/queue/nack.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/nack.js +4 -4
- package/dist/cmd/cloud/queue/nack.js.map +1 -1
- package/dist/cmd/cloud/queue/pause.d.ts +1 -1
- package/dist/cmd/cloud/queue/pause.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/pause.js +4 -4
- package/dist/cmd/cloud/queue/pause.js.map +1 -1
- package/dist/cmd/cloud/queue/publish.d.ts +1 -1
- package/dist/cmd/cloud/queue/publish.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/publish.js +5 -5
- package/dist/cmd/cloud/queue/publish.js.map +1 -1
- package/dist/cmd/cloud/queue/receive.d.ts +1 -1
- package/dist/cmd/cloud/queue/receive.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/receive.js +4 -4
- package/dist/cmd/cloud/queue/receive.js.map +1 -1
- package/dist/cmd/cloud/queue/resume.d.ts +1 -1
- package/dist/cmd/cloud/queue/resume.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/resume.js +4 -4
- package/dist/cmd/cloud/queue/resume.js.map +1 -1
- package/dist/cmd/cloud/queue/sources.d.ts +1 -1
- package/dist/cmd/cloud/queue/sources.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/sources.js +5 -5
- package/dist/cmd/cloud/queue/sources.js.map +1 -1
- package/dist/cmd/cloud/queue/stats.d.ts +1 -1
- package/dist/cmd/cloud/queue/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/stats.js +4 -4
- package/dist/cmd/cloud/queue/stats.js.map +1 -1
- package/dist/cmd/cloud/queue/util.d.ts +1 -1
- package/dist/cmd/cloud/queue/util.d.ts.map +1 -1
- package/dist/cmd/cloud/queue/util.js +1 -1
- package/dist/cmd/cloud/queue/util.js.map +1 -1
- package/dist/cmd/cloud/redis/get.d.ts +1 -1
- package/dist/cmd/cloud/redis/get.d.ts.map +1 -1
- package/dist/cmd/cloud/redis/get.js +4 -4
- package/dist/cmd/cloud/redis/get.js.map +1 -1
- package/dist/cmd/cloud/redis/index.d.ts +1 -1
- package/dist/cmd/cloud/redis/index.d.ts.map +1 -1
- package/dist/cmd/cloud/redis/index.js +3 -3
- package/dist/cmd/cloud/redis/index.js.map +1 -1
- package/dist/cmd/cloud/region/index.d.ts +1 -1
- package/dist/cmd/cloud/region/index.d.ts.map +1 -1
- package/dist/cmd/cloud/region/index.js +5 -5
- package/dist/cmd/cloud/region/index.js.map +1 -1
- package/dist/cmd/cloud/region/list.d.ts +1 -1
- package/dist/cmd/cloud/region/list.d.ts.map +1 -1
- package/dist/cmd/cloud/region/list.js +3 -3
- package/dist/cmd/cloud/region/list.js.map +1 -1
- package/dist/cmd/cloud/region-lookup.d.ts +1 -1
- package/dist/cmd/cloud/region-lookup.d.ts.map +1 -1
- package/dist/cmd/cloud/region-lookup.js +4 -4
- package/dist/cmd/cloud/region-lookup.js.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/create.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/create.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/create.js +6 -7
- package/dist/cmd/cloud/sandbox/checkpoint/create.js.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/delete.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/delete.js +6 -7
- package/dist/cmd/cloud/sandbox/checkpoint/delete.js.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/index.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/index.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/index.js +6 -6
- package/dist/cmd/cloud/sandbox/checkpoint/index.js.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/list.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/list.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/list.js +6 -7
- package/dist/cmd/cloud/sandbox/checkpoint/list.js.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/restore.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/restore.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/checkpoint/restore.js +6 -7
- package/dist/cmd/cloud/sandbox/checkpoint/restore.js.map +1 -1
- package/dist/cmd/cloud/sandbox/create.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/create.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/create.js +62 -11
- package/dist/cmd/cloud/sandbox/create.js.map +1 -1
- package/dist/cmd/cloud/sandbox/delete.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/delete.js +6 -7
- package/dist/cmd/cloud/sandbox/delete.js.map +1 -1
- package/dist/cmd/cloud/sandbox/env.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/env.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/env.js +6 -8
- package/dist/cmd/cloud/sandbox/env.js.map +1 -1
- package/dist/cmd/cloud/sandbox/events.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/events.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/events.js +4 -4
- package/dist/cmd/cloud/sandbox/events.js.map +1 -1
- package/dist/cmd/cloud/sandbox/exec.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/exec.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/exec.js +120 -46
- package/dist/cmd/cloud/sandbox/exec.js.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/get.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/execution/get.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/get.js +4 -4
- package/dist/cmd/cloud/sandbox/execution/get.js.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/index.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/execution/index.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/index.js +4 -4
- package/dist/cmd/cloud/sandbox/execution/index.js.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/list.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/execution/list.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/execution/list.js +6 -8
- package/dist/cmd/cloud/sandbox/execution/list.js.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/cp.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/fs/cp.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/cp.js +68 -119
- package/dist/cmd/cloud/sandbox/fs/cp.js.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/download.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/fs/download.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/download.js +14 -25
- package/dist/cmd/cloud/sandbox/fs/download.js.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/index.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/fs/index.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/index.js +9 -9
- package/dist/cmd/cloud/sandbox/fs/index.js.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/ls.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/fs/ls.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/ls.js +6 -8
- package/dist/cmd/cloud/sandbox/fs/ls.js.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/mkdir.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/fs/mkdir.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/mkdir.js +6 -8
- package/dist/cmd/cloud/sandbox/fs/mkdir.js.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/rm.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/fs/rm.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/rm.js +6 -8
- package/dist/cmd/cloud/sandbox/fs/rm.js.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/rmdir.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/fs/rmdir.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/rmdir.js +6 -8
- package/dist/cmd/cloud/sandbox/fs/rmdir.js.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/upload.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/fs/upload.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/fs/upload.js +10 -11
- package/dist/cmd/cloud/sandbox/fs/upload.js.map +1 -1
- package/dist/cmd/cloud/sandbox/get.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/get.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/get.js +24 -10
- package/dist/cmd/cloud/sandbox/get.js.map +1 -1
- package/dist/cmd/cloud/sandbox/index.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/index.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/index.js +19 -19
- package/dist/cmd/cloud/sandbox/index.js.map +1 -1
- package/dist/cmd/cloud/sandbox/job/create.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/job/create.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/job/create.js +6 -7
- package/dist/cmd/cloud/sandbox/job/create.js.map +1 -1
- package/dist/cmd/cloud/sandbox/job/destroy.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/job/destroy.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/job/destroy.js +6 -7
- package/dist/cmd/cloud/sandbox/job/destroy.js.map +1 -1
- package/dist/cmd/cloud/sandbox/job/get.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/job/get.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/job/get.js +5 -6
- package/dist/cmd/cloud/sandbox/job/get.js.map +1 -1
- package/dist/cmd/cloud/sandbox/job/index.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/job/index.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/job/index.js +7 -7
- package/dist/cmd/cloud/sandbox/job/index.js.map +1 -1
- package/dist/cmd/cloud/sandbox/job/list.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/job/list.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/job/list.js +5 -6
- package/dist/cmd/cloud/sandbox/job/list.js.map +1 -1
- package/dist/cmd/cloud/sandbox/job/logs.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/job/logs.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/job/logs.js +8 -8
- package/dist/cmd/cloud/sandbox/job/logs.js.map +1 -1
- package/dist/cmd/cloud/sandbox/list.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/list.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/list.js +3 -3
- package/dist/cmd/cloud/sandbox/list.js.map +1 -1
- package/dist/cmd/cloud/sandbox/pause.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/pause.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/pause.js +24 -8
- package/dist/cmd/cloud/sandbox/pause.js.map +1 -1
- package/dist/cmd/cloud/sandbox/resume.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/resume.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/resume.js +6 -7
- package/dist/cmd/cloud/sandbox/resume.js.map +1 -1
- package/dist/cmd/cloud/sandbox/run.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/run.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/run.js +45 -12
- package/dist/cmd/cloud/sandbox/run.js.map +1 -1
- package/dist/cmd/cloud/sandbox/runtime/index.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/runtime/index.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/runtime/index.js +3 -3
- package/dist/cmd/cloud/sandbox/runtime/index.js.map +1 -1
- package/dist/cmd/cloud/sandbox/runtime/list.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/runtime/list.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/runtime/list.js +4 -4
- package/dist/cmd/cloud/sandbox/runtime/list.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/build.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/build.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/build.js +36 -33
- package/dist/cmd/cloud/sandbox/snapshot/build.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/create.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/create.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/create.js +7 -7
- package/dist/cmd/cloud/sandbox/snapshot/create.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/delete.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/delete.js +4 -4
- package/dist/cmd/cloud/sandbox/snapshot/delete.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/generate.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/generate.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/generate.js +2 -2
- package/dist/cmd/cloud/sandbox/snapshot/generate.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/get.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/get.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/get.js +4 -4
- package/dist/cmd/cloud/sandbox/snapshot/get.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/index.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/index.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/index.js +9 -9
- package/dist/cmd/cloud/sandbox/snapshot/index.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/list.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/list.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/list.js +4 -4
- package/dist/cmd/cloud/sandbox/snapshot/list.js.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/tag.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/tag.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/snapshot/tag.js +4 -4
- package/dist/cmd/cloud/sandbox/snapshot/tag.js.map +1 -1
- package/dist/cmd/cloud/sandbox/stats.d.ts +1 -1
- package/dist/cmd/cloud/sandbox/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/stats.js +4 -4
- package/dist/cmd/cloud/sandbox/stats.js.map +1 -1
- package/dist/cmd/cloud/sandbox/util.d.ts +20 -1
- package/dist/cmd/cloud/sandbox/util.d.ts.map +1 -1
- package/dist/cmd/cloud/sandbox/util.js +46 -8
- package/dist/cmd/cloud/sandbox/util.js.map +1 -1
- package/dist/cmd/cloud/schedule/create.d.ts +1 -1
- package/dist/cmd/cloud/schedule/create.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/create.js +4 -4
- package/dist/cmd/cloud/schedule/create.js.map +1 -1
- package/dist/cmd/cloud/schedule/delete.d.ts +1 -1
- package/dist/cmd/cloud/schedule/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/delete.js +4 -4
- package/dist/cmd/cloud/schedule/delete.js.map +1 -1
- package/dist/cmd/cloud/schedule/delivery/get.d.ts +1 -1
- package/dist/cmd/cloud/schedule/delivery/get.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/delivery/get.js +4 -4
- package/dist/cmd/cloud/schedule/delivery/get.js.map +1 -1
- package/dist/cmd/cloud/schedule/delivery/index.d.ts +1 -1
- package/dist/cmd/cloud/schedule/delivery/index.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/delivery/index.js +4 -4
- package/dist/cmd/cloud/schedule/delivery/index.js.map +1 -1
- package/dist/cmd/cloud/schedule/delivery/list.d.ts +1 -1
- package/dist/cmd/cloud/schedule/delivery/list.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/delivery/list.js +4 -4
- package/dist/cmd/cloud/schedule/delivery/list.js.map +1 -1
- package/dist/cmd/cloud/schedule/destination/create.d.ts +1 -1
- package/dist/cmd/cloud/schedule/destination/create.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/destination/create.js +4 -4
- package/dist/cmd/cloud/schedule/destination/create.js.map +1 -1
- package/dist/cmd/cloud/schedule/destination/delete.d.ts +1 -1
- package/dist/cmd/cloud/schedule/destination/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/destination/delete.js +4 -4
- package/dist/cmd/cloud/schedule/destination/delete.js.map +1 -1
- package/dist/cmd/cloud/schedule/destination/get.d.ts +1 -1
- package/dist/cmd/cloud/schedule/destination/get.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/destination/get.js +4 -4
- package/dist/cmd/cloud/schedule/destination/get.js.map +1 -1
- package/dist/cmd/cloud/schedule/destination/index.d.ts +1 -1
- package/dist/cmd/cloud/schedule/destination/index.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/destination/index.js +6 -6
- package/dist/cmd/cloud/schedule/destination/index.js.map +1 -1
- package/dist/cmd/cloud/schedule/destination/list.d.ts +1 -1
- package/dist/cmd/cloud/schedule/destination/list.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/destination/list.js +4 -4
- package/dist/cmd/cloud/schedule/destination/list.js.map +1 -1
- package/dist/cmd/cloud/schedule/get.d.ts +1 -1
- package/dist/cmd/cloud/schedule/get.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/get.js +4 -4
- package/dist/cmd/cloud/schedule/get.js.map +1 -1
- package/dist/cmd/cloud/schedule/index.d.ts +1 -1
- package/dist/cmd/cloud/schedule/index.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/index.js +10 -10
- package/dist/cmd/cloud/schedule/index.js.map +1 -1
- package/dist/cmd/cloud/schedule/list.d.ts +1 -1
- package/dist/cmd/cloud/schedule/list.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/list.js +4 -4
- package/dist/cmd/cloud/schedule/list.js.map +1 -1
- package/dist/cmd/cloud/schedule/stats.d.ts +1 -1
- package/dist/cmd/cloud/schedule/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/stats.js +4 -4
- package/dist/cmd/cloud/schedule/stats.js.map +1 -1
- package/dist/cmd/cloud/schedule/update.d.ts +1 -1
- package/dist/cmd/cloud/schedule/update.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/update.js +4 -4
- package/dist/cmd/cloud/schedule/update.js.map +1 -1
- package/dist/cmd/cloud/schedule/util.d.ts +1 -1
- package/dist/cmd/cloud/schedule/util.d.ts.map +1 -1
- package/dist/cmd/cloud/schedule/util.js +3 -3
- package/dist/cmd/cloud/schedule/util.js.map +1 -1
- package/dist/cmd/cloud/scp/download.d.ts +1 -1
- package/dist/cmd/cloud/scp/download.d.ts.map +1 -1
- package/dist/cmd/cloud/scp/download.js +10 -13
- package/dist/cmd/cloud/scp/download.js.map +1 -1
- package/dist/cmd/cloud/scp/index.d.ts +1 -1
- package/dist/cmd/cloud/scp/index.d.ts.map +1 -1
- package/dist/cmd/cloud/scp/index.js +4 -4
- package/dist/cmd/cloud/scp/index.js.map +1 -1
- package/dist/cmd/cloud/scp/upload.d.ts +1 -1
- package/dist/cmd/cloud/scp/upload.d.ts.map +1 -1
- package/dist/cmd/cloud/scp/upload.js +10 -13
- package/dist/cmd/cloud/scp/upload.js.map +1 -1
- package/dist/cmd/cloud/services/index.d.ts +1 -1
- package/dist/cmd/cloud/services/index.d.ts.map +1 -1
- package/dist/cmd/cloud/services/index.js +2 -2
- package/dist/cmd/cloud/services/index.js.map +1 -1
- package/dist/cmd/cloud/services/stats.d.ts +1 -1
- package/dist/cmd/cloud/services/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/services/stats.js +4 -4
- package/dist/cmd/cloud/services/stats.js.map +1 -1
- package/dist/cmd/cloud/session/get.d.ts +1 -1
- package/dist/cmd/cloud/session/get.d.ts.map +1 -1
- package/dist/cmd/cloud/session/get.js +6 -46
- package/dist/cmd/cloud/session/get.js.map +1 -1
- package/dist/cmd/cloud/session/index.d.ts +1 -1
- package/dist/cmd/cloud/session/index.d.ts.map +1 -1
- package/dist/cmd/cloud/session/index.js +5 -5
- package/dist/cmd/cloud/session/index.js.map +1 -1
- package/dist/cmd/cloud/session/list.d.ts +1 -1
- package/dist/cmd/cloud/session/list.d.ts.map +1 -1
- package/dist/cmd/cloud/session/list.js +5 -5
- package/dist/cmd/cloud/session/list.js.map +1 -1
- package/dist/cmd/cloud/session/logs.d.ts +1 -1
- package/dist/cmd/cloud/session/logs.d.ts.map +1 -1
- package/dist/cmd/cloud/session/logs.js +4 -4
- package/dist/cmd/cloud/session/logs.js.map +1 -1
- package/dist/cmd/cloud/ssh.d.ts +1 -1
- package/dist/cmd/cloud/ssh.d.ts.map +1 -1
- package/dist/cmd/cloud/ssh.js +8 -14
- package/dist/cmd/cloud/ssh.js.map +1 -1
- package/dist/cmd/cloud/storage/config.d.ts +1 -1
- package/dist/cmd/cloud/storage/config.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/config.js +5 -5
- package/dist/cmd/cloud/storage/config.js.map +1 -1
- package/dist/cmd/cloud/storage/create.d.ts +1 -1
- package/dist/cmd/cloud/storage/create.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/create.js +7 -7
- package/dist/cmd/cloud/storage/create.js.map +1 -1
- package/dist/cmd/cloud/storage/delete.d.ts +1 -1
- package/dist/cmd/cloud/storage/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/delete.js +9 -9
- package/dist/cmd/cloud/storage/delete.js.map +1 -1
- package/dist/cmd/cloud/storage/download.d.ts +1 -1
- package/dist/cmd/cloud/storage/download.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/download.js +9 -8
- package/dist/cmd/cloud/storage/download.js.map +1 -1
- package/dist/cmd/cloud/storage/get.d.ts +1 -1
- package/dist/cmd/cloud/storage/get.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/get.js +6 -6
- package/dist/cmd/cloud/storage/get.js.map +1 -1
- package/dist/cmd/cloud/storage/index.d.ts +1 -1
- package/dist/cmd/cloud/storage/index.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/index.js +9 -9
- package/dist/cmd/cloud/storage/index.js.map +1 -1
- package/dist/cmd/cloud/storage/list.d.ts +1 -1
- package/dist/cmd/cloud/storage/list.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/list.js +7 -7
- package/dist/cmd/cloud/storage/list.js.map +1 -1
- package/dist/cmd/cloud/storage/upload.d.ts +1 -1
- package/dist/cmd/cloud/storage/upload.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/upload.js +20 -16
- package/dist/cmd/cloud/storage/upload.js.map +1 -1
- package/dist/cmd/cloud/storage/utils.d.ts +13 -13
- package/dist/cmd/cloud/storage/utils.d.ts.map +1 -1
- package/dist/cmd/cloud/storage/utils.js +13 -16
- package/dist/cmd/cloud/storage/utils.js.map +1 -1
- package/dist/cmd/cloud/stream/create.d.ts +1 -1
- package/dist/cmd/cloud/stream/create.d.ts.map +1 -1
- package/dist/cmd/cloud/stream/create.js +11 -10
- package/dist/cmd/cloud/stream/create.js.map +1 -1
- package/dist/cmd/cloud/stream/delete.d.ts +1 -1
- package/dist/cmd/cloud/stream/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/stream/delete.js +4 -4
- package/dist/cmd/cloud/stream/delete.js.map +1 -1
- package/dist/cmd/cloud/stream/get.d.ts +1 -1
- package/dist/cmd/cloud/stream/get.d.ts.map +1 -1
- package/dist/cmd/cloud/stream/get.js +11 -9
- package/dist/cmd/cloud/stream/get.js.map +1 -1
- package/dist/cmd/cloud/stream/index.d.ts +1 -1
- package/dist/cmd/cloud/stream/index.d.ts.map +1 -1
- package/dist/cmd/cloud/stream/index.js +7 -7
- package/dist/cmd/cloud/stream/index.js.map +1 -1
- package/dist/cmd/cloud/stream/list.d.ts +1 -1
- package/dist/cmd/cloud/stream/list.d.ts.map +1 -1
- package/dist/cmd/cloud/stream/list.js +3 -3
- package/dist/cmd/cloud/stream/list.js.map +1 -1
- package/dist/cmd/cloud/stream/stats.d.ts +1 -1
- package/dist/cmd/cloud/stream/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/stream/stats.js +4 -4
- package/dist/cmd/cloud/stream/stats.js.map +1 -1
- package/dist/cmd/cloud/stream/util.d.ts +1 -1
- package/dist/cmd/cloud/stream/util.d.ts.map +1 -1
- package/dist/cmd/cloud/stream/util.js +2 -2
- package/dist/cmd/cloud/stream/util.js.map +1 -1
- package/dist/cmd/cloud/task/attachment.d.ts +1 -1
- package/dist/cmd/cloud/task/attachment.d.ts.map +1 -1
- package/dist/cmd/cloud/task/attachment.js +19 -13
- package/dist/cmd/cloud/task/attachment.js.map +1 -1
- package/dist/cmd/cloud/task/close.d.ts +1 -1
- package/dist/cmd/cloud/task/close.d.ts.map +1 -1
- package/dist/cmd/cloud/task/close.js +9 -8
- package/dist/cmd/cloud/task/close.js.map +1 -1
- package/dist/cmd/cloud/task/create.d.ts +1 -1
- package/dist/cmd/cloud/task/create.d.ts.map +1 -1
- package/dist/cmd/cloud/task/create.js +22 -18
- package/dist/cmd/cloud/task/create.js.map +1 -1
- package/dist/cmd/cloud/task/delete.d.ts +2 -2
- package/dist/cmd/cloud/task/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/task/delete.js +6 -6
- package/dist/cmd/cloud/task/delete.js.map +1 -1
- package/dist/cmd/cloud/task/get.d.ts +1 -1
- package/dist/cmd/cloud/task/get.d.ts.map +1 -1
- package/dist/cmd/cloud/task/get.js +4 -4
- package/dist/cmd/cloud/task/get.js.map +1 -1
- package/dist/cmd/cloud/task/index.d.ts +1 -1
- package/dist/cmd/cloud/task/index.d.ts.map +1 -1
- package/dist/cmd/cloud/task/index.js +12 -12
- package/dist/cmd/cloud/task/index.js.map +1 -1
- package/dist/cmd/cloud/task/list.d.ts +1 -1
- package/dist/cmd/cloud/task/list.d.ts.map +1 -1
- package/dist/cmd/cloud/task/list.js +4 -4
- package/dist/cmd/cloud/task/list.js.map +1 -1
- package/dist/cmd/cloud/task/project.d.ts +1 -1
- package/dist/cmd/cloud/task/project.d.ts.map +1 -1
- package/dist/cmd/cloud/task/project.js +4 -4
- package/dist/cmd/cloud/task/project.js.map +1 -1
- package/dist/cmd/cloud/task/stats.d.ts +1 -1
- package/dist/cmd/cloud/task/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/task/stats.js +4 -4
- package/dist/cmd/cloud/task/stats.js.map +1 -1
- package/dist/cmd/cloud/task/update.d.ts +1 -1
- package/dist/cmd/cloud/task/update.d.ts.map +1 -1
- package/dist/cmd/cloud/task/update.js +4 -4
- package/dist/cmd/cloud/task/update.js.map +1 -1
- package/dist/cmd/cloud/task/user.d.ts +1 -1
- package/dist/cmd/cloud/task/user.d.ts.map +1 -1
- package/dist/cmd/cloud/task/user.js +4 -4
- package/dist/cmd/cloud/task/user.js.map +1 -1
- package/dist/cmd/cloud/task/util.d.ts +1 -1
- package/dist/cmd/cloud/task/util.d.ts.map +1 -1
- package/dist/cmd/cloud/task/util.js +4 -4
- package/dist/cmd/cloud/task/util.js.map +1 -1
- package/dist/cmd/cloud/thread/delete.d.ts +1 -1
- package/dist/cmd/cloud/thread/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/thread/delete.js +5 -5
- package/dist/cmd/cloud/thread/delete.js.map +1 -1
- package/dist/cmd/cloud/thread/get.d.ts +1 -1
- package/dist/cmd/cloud/thread/get.d.ts.map +1 -1
- package/dist/cmd/cloud/thread/get.js +5 -5
- package/dist/cmd/cloud/thread/get.js.map +1 -1
- package/dist/cmd/cloud/thread/index.d.ts +1 -1
- package/dist/cmd/cloud/thread/index.d.ts.map +1 -1
- package/dist/cmd/cloud/thread/index.js +5 -5
- package/dist/cmd/cloud/thread/index.js.map +1 -1
- package/dist/cmd/cloud/thread/list.d.ts +1 -1
- package/dist/cmd/cloud/thread/list.d.ts.map +1 -1
- package/dist/cmd/cloud/thread/list.js +5 -5
- package/dist/cmd/cloud/thread/list.js.map +1 -1
- package/dist/cmd/cloud/vector/delete-namespace.d.ts +1 -1
- package/dist/cmd/cloud/vector/delete-namespace.d.ts.map +1 -1
- package/dist/cmd/cloud/vector/delete-namespace.js +5 -5
- package/dist/cmd/cloud/vector/delete-namespace.js.map +1 -1
- package/dist/cmd/cloud/vector/delete.d.ts +1 -1
- package/dist/cmd/cloud/vector/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/vector/delete.js +5 -5
- package/dist/cmd/cloud/vector/delete.js.map +1 -1
- package/dist/cmd/cloud/vector/get.d.ts +1 -1
- package/dist/cmd/cloud/vector/get.d.ts.map +1 -1
- package/dist/cmd/cloud/vector/get.js +4 -4
- package/dist/cmd/cloud/vector/get.js.map +1 -1
- package/dist/cmd/cloud/vector/index.d.ts +1 -1
- package/dist/cmd/cloud/vector/index.d.ts.map +1 -1
- package/dist/cmd/cloud/vector/index.js +9 -9
- package/dist/cmd/cloud/vector/index.js.map +1 -1
- package/dist/cmd/cloud/vector/list-namespaces.d.ts +1 -1
- package/dist/cmd/cloud/vector/list-namespaces.d.ts.map +1 -1
- package/dist/cmd/cloud/vector/list-namespaces.js +4 -4
- package/dist/cmd/cloud/vector/list-namespaces.js.map +1 -1
- package/dist/cmd/cloud/vector/search.d.ts +1 -1
- package/dist/cmd/cloud/vector/search.d.ts.map +1 -1
- package/dist/cmd/cloud/vector/search.js +4 -4
- package/dist/cmd/cloud/vector/search.js.map +1 -1
- package/dist/cmd/cloud/vector/stats.d.ts +1 -1
- package/dist/cmd/cloud/vector/stats.d.ts.map +1 -1
- package/dist/cmd/cloud/vector/stats.js +4 -4
- package/dist/cmd/cloud/vector/stats.js.map +1 -1
- package/dist/cmd/cloud/vector/upsert.d.ts +1 -1
- package/dist/cmd/cloud/vector/upsert.d.ts.map +1 -1
- package/dist/cmd/cloud/vector/upsert.js +10 -19
- package/dist/cmd/cloud/vector/upsert.js.map +1 -1
- package/dist/cmd/cloud/vector/util.d.ts +1 -1
- package/dist/cmd/cloud/vector/util.d.ts.map +1 -1
- package/dist/cmd/cloud/vector/util.js +2 -2
- package/dist/cmd/cloud/vector/util.js.map +1 -1
- package/dist/cmd/cloud/webhook/create.d.ts +1 -1
- package/dist/cmd/cloud/webhook/create.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/create.js +4 -4
- package/dist/cmd/cloud/webhook/create.js.map +1 -1
- package/dist/cmd/cloud/webhook/delete.d.ts +1 -1
- package/dist/cmd/cloud/webhook/delete.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/delete.js +5 -5
- package/dist/cmd/cloud/webhook/delete.js.map +1 -1
- package/dist/cmd/cloud/webhook/deliveries.d.ts +1 -1
- package/dist/cmd/cloud/webhook/deliveries.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/deliveries.js +4 -4
- package/dist/cmd/cloud/webhook/deliveries.js.map +1 -1
- package/dist/cmd/cloud/webhook/destinations.d.ts +1 -1
- package/dist/cmd/cloud/webhook/destinations.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/destinations.js +5 -5
- package/dist/cmd/cloud/webhook/destinations.js.map +1 -1
- package/dist/cmd/cloud/webhook/get.d.ts +1 -1
- package/dist/cmd/cloud/webhook/get.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/get.js +4 -4
- package/dist/cmd/cloud/webhook/get.js.map +1 -1
- package/dist/cmd/cloud/webhook/index.d.ts +1 -1
- package/dist/cmd/cloud/webhook/index.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/index.js +9 -9
- package/dist/cmd/cloud/webhook/index.js.map +1 -1
- package/dist/cmd/cloud/webhook/list.d.ts +1 -1
- package/dist/cmd/cloud/webhook/list.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/list.js +4 -4
- package/dist/cmd/cloud/webhook/list.js.map +1 -1
- package/dist/cmd/cloud/webhook/receipts.d.ts +1 -1
- package/dist/cmd/cloud/webhook/receipts.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/receipts.js +4 -4
- package/dist/cmd/cloud/webhook/receipts.js.map +1 -1
- package/dist/cmd/cloud/webhook/util.d.ts +1 -1
- package/dist/cmd/cloud/webhook/util.d.ts.map +1 -1
- package/dist/cmd/cloud/webhook/util.js +1 -1
- package/dist/cmd/cloud/webhook/util.js.map +1 -1
- package/dist/cmd/cloud/workflow/get.d.ts +1 -1
- package/dist/cmd/cloud/workflow/get.d.ts.map +1 -1
- package/dist/cmd/cloud/workflow/get.js +4 -4
- package/dist/cmd/cloud/workflow/get.js.map +1 -1
- package/dist/cmd/cloud/workflow/index.d.ts +1 -1
- package/dist/cmd/cloud/workflow/index.d.ts.map +1 -1
- package/dist/cmd/cloud/workflow/index.js +4 -4
- package/dist/cmd/cloud/workflow/index.js.map +1 -1
- package/dist/cmd/cloud/workflow/list.d.ts +1 -1
- package/dist/cmd/cloud/workflow/list.d.ts.map +1 -1
- package/dist/cmd/cloud/workflow/list.js +4 -4
- package/dist/cmd/cloud/workflow/list.js.map +1 -1
- package/dist/cmd/cloud/workflow/util.d.ts +1 -1
- package/dist/cmd/cloud/workflow/util.d.ts.map +1 -1
- package/dist/cmd/cloud/workflow/util.js +3 -3
- package/dist/cmd/cloud/workflow/util.js.map +1 -1
- package/dist/cmd/coder/archive.d.ts +1 -1
- package/dist/cmd/coder/archive.d.ts.map +1 -1
- package/dist/cmd/coder/archive.js +4 -4
- package/dist/cmd/coder/archive.js.map +1 -1
- package/dist/cmd/coder/create.d.ts +1 -1
- package/dist/cmd/coder/create.d.ts.map +1 -1
- package/dist/cmd/coder/create.js +7 -7
- package/dist/cmd/coder/create.js.map +1 -1
- package/dist/cmd/coder/delete.d.ts +1 -1
- package/dist/cmd/coder/delete.d.ts.map +1 -1
- package/dist/cmd/coder/delete.js +4 -4
- package/dist/cmd/coder/delete.js.map +1 -1
- package/dist/cmd/coder/events.d.ts +1 -1
- package/dist/cmd/coder/events.d.ts.map +1 -1
- package/dist/cmd/coder/events.js +4 -4
- package/dist/cmd/coder/events.js.map +1 -1
- package/dist/cmd/coder/extension-path.d.ts.map +1 -1
- package/dist/cmd/coder/extension-path.js +5 -4
- package/dist/cmd/coder/extension-path.js.map +1 -1
- package/dist/cmd/coder/get.d.ts +1 -1
- package/dist/cmd/coder/get.d.ts.map +1 -1
- package/dist/cmd/coder/get.js +4 -4
- package/dist/cmd/coder/get.js.map +1 -1
- package/dist/cmd/coder/index.d.ts +1 -1
- package/dist/cmd/coder/index.d.ts.map +1 -1
- package/dist/cmd/coder/index.js +16 -16
- package/dist/cmd/coder/index.js.map +1 -1
- package/dist/cmd/coder/list.d.ts +1 -1
- package/dist/cmd/coder/list.d.ts.map +1 -1
- package/dist/cmd/coder/list.js +4 -4
- package/dist/cmd/coder/list.js.map +1 -1
- package/dist/cmd/coder/loop.d.ts +1 -1
- package/dist/cmd/coder/loop.d.ts.map +1 -1
- package/dist/cmd/coder/loop.js +4 -4
- package/dist/cmd/coder/loop.js.map +1 -1
- package/dist/cmd/coder/participants.d.ts +1 -1
- package/dist/cmd/coder/participants.d.ts.map +1 -1
- package/dist/cmd/coder/participants.js +4 -4
- package/dist/cmd/coder/participants.js.map +1 -1
- package/dist/cmd/coder/replay.d.ts +1 -1
- package/dist/cmd/coder/replay.d.ts.map +1 -1
- package/dist/cmd/coder/replay.js +4 -4
- package/dist/cmd/coder/replay.js.map +1 -1
- package/dist/cmd/coder/skill/buckets.d.ts +1 -1
- package/dist/cmd/coder/skill/buckets.d.ts.map +1 -1
- package/dist/cmd/coder/skill/buckets.js +4 -4
- package/dist/cmd/coder/skill/buckets.js.map +1 -1
- package/dist/cmd/coder/skill/delete.d.ts +1 -1
- package/dist/cmd/coder/skill/delete.d.ts.map +1 -1
- package/dist/cmd/coder/skill/delete.js +4 -4
- package/dist/cmd/coder/skill/delete.js.map +1 -1
- package/dist/cmd/coder/skill/index.d.ts +1 -1
- package/dist/cmd/coder/skill/index.d.ts.map +1 -1
- package/dist/cmd/coder/skill/index.js +6 -6
- package/dist/cmd/coder/skill/index.js.map +1 -1
- package/dist/cmd/coder/skill/list.d.ts +1 -1
- package/dist/cmd/coder/skill/list.d.ts.map +1 -1
- package/dist/cmd/coder/skill/list.js +4 -4
- package/dist/cmd/coder/skill/list.js.map +1 -1
- package/dist/cmd/coder/skill/save.d.ts +1 -1
- package/dist/cmd/coder/skill/save.d.ts.map +1 -1
- package/dist/cmd/coder/skill/save.js +4 -4
- package/dist/cmd/coder/skill/save.js.map +1 -1
- package/dist/cmd/coder/start.d.ts +1 -1
- package/dist/cmd/coder/start.d.ts.map +1 -1
- package/dist/cmd/coder/start.js +25 -20
- package/dist/cmd/coder/start.js.map +1 -1
- package/dist/cmd/coder/tui-init.js +1 -1
- package/dist/cmd/coder/tui-init.js.map +1 -1
- package/dist/cmd/coder/update.d.ts +1 -1
- package/dist/cmd/coder/update.d.ts.map +1 -1
- package/dist/cmd/coder/update.js +4 -4
- package/dist/cmd/coder/update.js.map +1 -1
- package/dist/cmd/coder/users.d.ts +1 -1
- package/dist/cmd/coder/users.d.ts.map +1 -1
- package/dist/cmd/coder/users.js +4 -4
- package/dist/cmd/coder/users.js.map +1 -1
- package/dist/cmd/coder/workspace/create.d.ts +1 -1
- package/dist/cmd/coder/workspace/create.d.ts.map +1 -1
- package/dist/cmd/coder/workspace/create.js +5 -5
- package/dist/cmd/coder/workspace/create.js.map +1 -1
- package/dist/cmd/coder/workspace/delete.d.ts +1 -1
- package/dist/cmd/coder/workspace/delete.d.ts.map +1 -1
- package/dist/cmd/coder/workspace/delete.js +4 -4
- package/dist/cmd/coder/workspace/delete.js.map +1 -1
- package/dist/cmd/coder/workspace/get.d.ts +1 -1
- package/dist/cmd/coder/workspace/get.d.ts.map +1 -1
- package/dist/cmd/coder/workspace/get.js +4 -4
- package/dist/cmd/coder/workspace/get.js.map +1 -1
- package/dist/cmd/coder/workspace/index.d.ts +1 -1
- package/dist/cmd/coder/workspace/index.d.ts.map +1 -1
- package/dist/cmd/coder/workspace/index.js +6 -6
- package/dist/cmd/coder/workspace/index.js.map +1 -1
- package/dist/cmd/coder/workspace/list.d.ts +1 -1
- package/dist/cmd/coder/workspace/list.d.ts.map +1 -1
- package/dist/cmd/coder/workspace/list.js +4 -4
- package/dist/cmd/coder/workspace/list.js.map +1 -1
- package/dist/cmd/dev/index.d.ts +1 -1
- package/dist/cmd/dev/index.d.ts.map +1 -1
- package/dist/cmd/dev/index.js +18 -14
- package/dist/cmd/dev/index.js.map +1 -1
- package/dist/cmd/git/account/add.d.ts +3 -3
- package/dist/cmd/git/account/add.d.ts.map +1 -1
- package/dist/cmd/git/account/add.js +8 -17
- package/dist/cmd/git/account/add.js.map +1 -1
- package/dist/cmd/git/account/index.d.ts +1 -1
- package/dist/cmd/git/account/index.d.ts.map +1 -1
- package/dist/cmd/git/account/index.js +4 -4
- package/dist/cmd/git/account/index.js.map +1 -1
- package/dist/cmd/git/account/list.d.ts +1 -1
- package/dist/cmd/git/account/list.d.ts.map +1 -1
- package/dist/cmd/git/account/list.js +5 -5
- package/dist/cmd/git/account/list.js.map +1 -1
- package/dist/cmd/git/account/remove.d.ts +1 -1
- package/dist/cmd/git/account/remove.d.ts.map +1 -1
- package/dist/cmd/git/account/remove.js +5 -5
- package/dist/cmd/git/account/remove.js.map +1 -1
- package/dist/cmd/git/api.d.ts +1 -1
- package/dist/cmd/git/api.d.ts.map +1 -1
- package/dist/cmd/git/api.js +2 -1
- package/dist/cmd/git/api.js.map +1 -1
- package/dist/cmd/git/identity/connect.d.ts +3 -3
- package/dist/cmd/git/identity/connect.d.ts.map +1 -1
- package/dist/cmd/git/identity/connect.js +8 -17
- package/dist/cmd/git/identity/connect.js.map +1 -1
- package/dist/cmd/git/identity/disconnect.d.ts +1 -1
- package/dist/cmd/git/identity/disconnect.d.ts.map +1 -1
- package/dist/cmd/git/identity/disconnect.js +5 -5
- package/dist/cmd/git/identity/disconnect.js.map +1 -1
- package/dist/cmd/git/identity/index.d.ts +1 -1
- package/dist/cmd/git/identity/index.d.ts.map +1 -1
- package/dist/cmd/git/identity/index.js +4 -4
- package/dist/cmd/git/identity/index.js.map +1 -1
- package/dist/cmd/git/identity/status.d.ts +1 -1
- package/dist/cmd/git/identity/status.d.ts.map +1 -1
- package/dist/cmd/git/identity/status.js +5 -5
- package/dist/cmd/git/identity/status.js.map +1 -1
- package/dist/cmd/git/index.d.ts +1 -1
- package/dist/cmd/git/index.d.ts.map +1 -1
- package/dist/cmd/git/index.js +7 -7
- package/dist/cmd/git/index.js.map +1 -1
- package/dist/cmd/git/link.d.ts +4 -4
- package/dist/cmd/git/link.d.ts.map +1 -1
- package/dist/cmd/git/link.js +26 -36
- package/dist/cmd/git/link.js.map +1 -1
- package/dist/cmd/git/list.d.ts +1 -1
- package/dist/cmd/git/list.d.ts.map +1 -1
- package/dist/cmd/git/list.js +5 -5
- package/dist/cmd/git/list.js.map +1 -1
- package/dist/cmd/git/status.d.ts +1 -1
- package/dist/cmd/git/status.d.ts.map +1 -1
- package/dist/cmd/git/status.js +5 -5
- package/dist/cmd/git/status.js.map +1 -1
- package/dist/cmd/git/unlink.d.ts +1 -1
- package/dist/cmd/git/unlink.d.ts.map +1 -1
- package/dist/cmd/git/unlink.js +5 -5
- package/dist/cmd/git/unlink.js.map +1 -1
- package/dist/cmd/help/index.d.ts +1 -1
- package/dist/cmd/help/index.d.ts.map +1 -1
- package/dist/cmd/help/index.js +3 -3
- package/dist/cmd/help/index.js.map +1 -1
- package/dist/cmd/index.d.ts +1 -1
- package/dist/cmd/index.d.ts.map +1 -1
- package/dist/cmd/index.js +16 -16
- package/dist/cmd/index.js.map +1 -1
- package/dist/cmd/profile/create.d.ts +1 -1
- package/dist/cmd/profile/create.d.ts.map +1 -1
- package/dist/cmd/profile/create.js +5 -5
- package/dist/cmd/profile/create.js.map +1 -1
- package/dist/cmd/profile/current.d.ts +1 -1
- package/dist/cmd/profile/current.d.ts.map +1 -1
- package/dist/cmd/profile/current.js +2 -2
- package/dist/cmd/profile/current.js.map +1 -1
- package/dist/cmd/profile/delete.d.ts +1 -1
- package/dist/cmd/profile/delete.d.ts.map +1 -1
- package/dist/cmd/profile/delete.js +5 -5
- package/dist/cmd/profile/delete.js.map +1 -1
- package/dist/cmd/profile/index.d.ts +1 -1
- package/dist/cmd/profile/index.d.ts.map +1 -1
- package/dist/cmd/profile/index.js +8 -8
- package/dist/cmd/profile/index.js.map +1 -1
- package/dist/cmd/profile/list.d.ts +1 -1
- package/dist/cmd/profile/list.d.ts.map +1 -1
- package/dist/cmd/profile/list.js +4 -4
- package/dist/cmd/profile/list.js.map +1 -1
- package/dist/cmd/profile/show.d.ts +1 -1
- package/dist/cmd/profile/show.d.ts.map +1 -1
- package/dist/cmd/profile/show.js +5 -5
- package/dist/cmd/profile/show.js.map +1 -1
- package/dist/cmd/profile/use.d.ts +1 -1
- package/dist/cmd/profile/use.d.ts.map +1 -1
- package/dist/cmd/profile/use.js +4 -4
- package/dist/cmd/profile/use.js.map +1 -1
- package/dist/cmd/project/add/database.d.ts +1 -1
- package/dist/cmd/project/add/database.d.ts.map +1 -1
- package/dist/cmd/project/add/database.js +8 -8
- package/dist/cmd/project/add/database.js.map +1 -1
- package/dist/cmd/project/add/domain.d.ts +1 -1
- package/dist/cmd/project/add/domain.d.ts.map +1 -1
- package/dist/cmd/project/add/domain.js +8 -8
- package/dist/cmd/project/add/domain.js.map +1 -1
- package/dist/cmd/project/add/index.d.ts +1 -1
- package/dist/cmd/project/add/index.d.ts.map +1 -1
- package/dist/cmd/project/add/index.js +5 -5
- package/dist/cmd/project/add/index.js.map +1 -1
- package/dist/cmd/project/add/storage.d.ts +1 -1
- package/dist/cmd/project/add/storage.d.ts.map +1 -1
- package/dist/cmd/project/add/storage.js +8 -8
- package/dist/cmd/project/add/storage.js.map +1 -1
- package/dist/cmd/project/create.d.ts +1 -1
- package/dist/cmd/project/create.d.ts.map +1 -1
- package/dist/cmd/project/create.js +153 -6
- package/dist/cmd/project/create.js.map +1 -1
- package/dist/cmd/project/delete.d.ts +1 -1
- package/dist/cmd/project/delete.d.ts.map +1 -1
- package/dist/cmd/project/delete.js +3 -3
- package/dist/cmd/project/delete.js.map +1 -1
- package/dist/cmd/project/detect-existing.d.ts +46 -0
- package/dist/cmd/project/detect-existing.d.ts.map +1 -0
- package/dist/cmd/project/detect-existing.js +113 -0
- package/dist/cmd/project/detect-existing.js.map +1 -0
- package/dist/cmd/project/domain/check.d.ts +1 -1
- package/dist/cmd/project/domain/check.d.ts.map +1 -1
- package/dist/cmd/project/domain/check.js +6 -6
- package/dist/cmd/project/domain/check.js.map +1 -1
- package/dist/cmd/project/domain/index.d.ts +1 -1
- package/dist/cmd/project/domain/index.d.ts.map +1 -1
- package/dist/cmd/project/domain/index.js +3 -3
- package/dist/cmd/project/domain/index.js.map +1 -1
- package/dist/cmd/project/frameworks.d.ts.map +1 -1
- package/dist/cmd/project/frameworks.js +19 -15
- package/dist/cmd/project/frameworks.js.map +1 -1
- package/dist/cmd/project/hostname/get.d.ts +1 -1
- package/dist/cmd/project/hostname/get.d.ts.map +1 -1
- package/dist/cmd/project/hostname/get.js +4 -4
- package/dist/cmd/project/hostname/get.js.map +1 -1
- package/dist/cmd/project/hostname/index.d.ts +1 -1
- package/dist/cmd/project/hostname/index.d.ts.map +1 -1
- package/dist/cmd/project/hostname/index.js +4 -4
- package/dist/cmd/project/hostname/index.js.map +1 -1
- package/dist/cmd/project/hostname/set.d.ts +1 -1
- package/dist/cmd/project/hostname/set.d.ts.map +1 -1
- package/dist/cmd/project/hostname/set.js +5 -5
- package/dist/cmd/project/hostname/set.js.map +1 -1
- package/dist/cmd/project/import.d.ts +1 -1
- package/dist/cmd/project/import.d.ts.map +1 -1
- package/dist/cmd/project/import.js +7 -7
- package/dist/cmd/project/import.js.map +1 -1
- package/dist/cmd/project/index.d.ts +1 -1
- package/dist/cmd/project/index.d.ts.map +1 -1
- package/dist/cmd/project/index.js +10 -13
- package/dist/cmd/project/index.js.map +1 -1
- package/dist/cmd/project/list.d.ts +1 -1
- package/dist/cmd/project/list.d.ts.map +1 -1
- package/dist/cmd/project/list.js +3 -3
- package/dist/cmd/project/list.js.map +1 -1
- package/dist/cmd/project/provisioning-decisions.d.ts +43 -0
- package/dist/cmd/project/provisioning-decisions.d.ts.map +1 -0
- package/dist/cmd/project/provisioning-decisions.js +51 -0
- package/dist/cmd/project/provisioning-decisions.js.map +1 -0
- package/dist/cmd/project/random-name.d.ts +17 -0
- package/dist/cmd/project/random-name.d.ts.map +1 -0
- package/dist/cmd/project/random-name.js +144 -0
- package/dist/cmd/project/random-name.js.map +1 -0
- package/dist/cmd/project/reconcile.d.ts +5 -5
- package/dist/cmd/project/reconcile.d.ts.map +1 -1
- package/dist/cmd/project/reconcile.js +17 -16
- package/dist/cmd/project/reconcile.js.map +1 -1
- package/dist/cmd/project/remote-import.d.ts +2 -2
- package/dist/cmd/project/remote-import.d.ts.map +1 -1
- package/dist/cmd/project/remote-import.js +50 -79
- package/dist/cmd/project/remote-import.js.map +1 -1
- package/dist/cmd/project/scaffold.d.ts +1 -1
- package/dist/cmd/project/scaffold.d.ts.map +1 -1
- package/dist/cmd/project/scaffold.js +9 -8
- package/dist/cmd/project/scaffold.js.map +1 -1
- package/dist/cmd/project/services-catalog.d.ts +72 -0
- package/dist/cmd/project/services-catalog.d.ts.map +1 -0
- package/dist/cmd/project/services-catalog.js +141 -0
- package/dist/cmd/project/services-catalog.js.map +1 -0
- package/dist/cmd/project/services-composer.d.ts +49 -0
- package/dist/cmd/project/services-composer.d.ts.map +1 -0
- package/dist/cmd/project/services-composer.js +366 -0
- package/dist/cmd/project/services-composer.js.map +1 -0
- package/dist/cmd/project/show.d.ts +1 -1
- package/dist/cmd/project/show.d.ts.map +1 -1
- package/dist/cmd/project/show.js +3 -3
- package/dist/cmd/project/show.js.map +1 -1
- package/dist/cmd/project/template-flow.d.ts +9 -3
- package/dist/cmd/project/template-flow.d.ts.map +1 -1
- package/dist/cmd/project/template-flow.js +248 -270
- package/dist/cmd/project/template-flow.js.map +1 -1
- package/dist/cmd/project/templates/astro/manifest.json +27 -0
- package/dist/cmd/project/templates/astro/src/lib/translate.ts +40 -0
- package/dist/cmd/project/templates/astro/src/pages/api/translate.ts +10 -0
- package/dist/cmd/project/templates/astro/src/pages/index.astro +173 -0
- package/dist/cmd/project/templates/hono/manifest.json +35 -0
- package/dist/cmd/project/templates/hono/src/index.ts +29 -0
- package/dist/cmd/project/templates/hono/src/landing.html +91 -0
- package/dist/cmd/project/templates/hono/src/translate.ts +40 -0
- package/dist/cmd/project/templates/nextjs/manifest.json +27 -0
- package/dist/cmd/project/templates/nextjs/src/app/api/translate/route.ts +8 -0
- package/dist/cmd/project/templates/nextjs/src/app/page.tsx +246 -0
- package/dist/cmd/project/templates/nextjs/src/lib/translate.ts +40 -0
- package/dist/cmd/project/templates/nuxt/app.vue +203 -0
- package/dist/cmd/project/templates/nuxt/manifest.json +27 -0
- package/dist/cmd/project/templates/nuxt/server/api/translate.post.ts +4 -0
- package/dist/cmd/project/templates/nuxt/server/utils/translate.ts +40 -0
- package/dist/cmd/project/templates/remix/app/lib/translate.ts +40 -0
- package/dist/cmd/project/templates/remix/app/routes/api.translate.ts +17 -0
- package/dist/cmd/project/templates/remix/app/routes/home.tsx +249 -0
- package/dist/cmd/project/templates/remix/manifest.json +27 -0
- package/dist/cmd/project/templates/services/db/files/astro/drizzle.config.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/astro/src/db/index.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/astro/src/db/schema.ts +20 -0
- package/dist/cmd/project/templates/services/db/files/astro/src/pages/api/history.ts +14 -0
- package/dist/cmd/project/templates/services/db/files/hono/drizzle.config.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/hono/src/db/index.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/hono/src/db/schema.ts +20 -0
- package/dist/cmd/project/templates/services/db/files/nextjs/drizzle.config.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/nextjs/src/app/api/history/route.ts +12 -0
- package/dist/cmd/project/templates/services/db/files/nextjs/src/db/index.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/nextjs/src/db/schema.ts +20 -0
- package/dist/cmd/project/templates/services/db/files/nuxt/drizzle.config.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/nuxt/server/api/history.get.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/nuxt/server/db/index.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/nuxt/server/db/schema.ts +20 -0
- package/dist/cmd/project/templates/services/db/files/remix/app/db/index.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/remix/app/db/schema.ts +20 -0
- package/dist/cmd/project/templates/services/db/files/remix/app/routes/api.history.ts +12 -0
- package/dist/cmd/project/templates/services/db/files/remix/drizzle.config.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/sveltekit/drizzle.config.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/sveltekit/src/lib/server/db/index.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/sveltekit/src/lib/server/db/schema.ts +20 -0
- package/dist/cmd/project/templates/services/db/files/sveltekit/src/routes/api/history/+server.ts +12 -0
- package/dist/cmd/project/templates/services/db/files/vite-react/drizzle.config.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/vite-react/server/db/index.ts +10 -0
- package/dist/cmd/project/templates/services/db/files/vite-react/server/db/schema.ts +20 -0
- package/dist/cmd/project/templates/services/db/manifest.json +23 -0
- package/dist/cmd/project/templates/services/db/snippets/astro/page.after-form.astro +1 -0
- package/dist/cmd/project/templates/services/db/snippets/astro/page.on-mount.astro +1 -0
- package/dist/cmd/project/templates/services/db/snippets/astro/page.on-result.astro +7 -0
- package/dist/cmd/project/templates/services/db/snippets/astro/page.state.astro +44 -0
- package/dist/cmd/project/templates/services/db/snippets/astro/translate.imports.ts +2 -0
- package/dist/cmd/project/templates/services/db/snippets/astro/translate.translate-post.ts +9 -0
- package/dist/cmd/project/templates/services/db/snippets/astro/translate.translate-pre.ts +21 -0
- package/dist/cmd/project/templates/services/db/snippets/hono/page.after-form.html +1 -0
- package/dist/cmd/project/templates/services/db/snippets/hono/page.on-mount.html +1 -0
- package/dist/cmd/project/templates/services/db/snippets/hono/page.on-result.html +7 -0
- package/dist/cmd/project/templates/services/db/snippets/hono/page.state.html +37 -0
- package/dist/cmd/project/templates/services/db/snippets/hono/server.imports.ts +2 -0
- package/dist/cmd/project/templates/services/db/snippets/hono/server.routes.ts +9 -0
- package/dist/cmd/project/templates/services/db/snippets/hono/translate.imports.ts +2 -0
- package/dist/cmd/project/templates/services/db/snippets/hono/translate.translate-post.ts +9 -0
- package/dist/cmd/project/templates/services/db/snippets/hono/translate.translate-pre.ts +21 -0
- package/dist/cmd/project/templates/services/db/snippets/nextjs/page.after-form.tsx +22 -0
- package/dist/cmd/project/templates/services/db/snippets/nextjs/page.after-result.tsx +3 -0
- package/dist/cmd/project/templates/services/db/snippets/nextjs/page.imports.tsx +2 -0
- package/dist/cmd/project/templates/services/db/snippets/nextjs/page.on-mount.tsx +6 -0
- package/dist/cmd/project/templates/services/db/snippets/nextjs/page.on-result.tsx +8 -0
- package/dist/cmd/project/templates/services/db/snippets/nextjs/page.state.tsx +1 -0
- package/dist/cmd/project/templates/services/db/snippets/nextjs/translate.imports.ts +2 -0
- package/dist/cmd/project/templates/services/db/snippets/nextjs/translate.translate-post.ts +9 -0
- package/dist/cmd/project/templates/services/db/snippets/nextjs/translate.translate-pre.ts +21 -0
- package/dist/cmd/project/templates/services/db/snippets/nuxt/page.after-form.vue +17 -0
- package/dist/cmd/project/templates/services/db/snippets/nuxt/page.after-result.vue +3 -0
- package/dist/cmd/project/templates/services/db/snippets/nuxt/page.imports.vue +1 -0
- package/dist/cmd/project/templates/services/db/snippets/nuxt/page.on-result.vue +5 -0
- package/dist/cmd/project/templates/services/db/snippets/nuxt/page.state.vue +3 -0
- package/dist/cmd/project/templates/services/db/snippets/nuxt/translate.imports.ts +2 -0
- package/dist/cmd/project/templates/services/db/snippets/nuxt/translate.translate-post.ts +9 -0
- package/dist/cmd/project/templates/services/db/snippets/nuxt/translate.translate-pre.ts +21 -0
- package/dist/cmd/project/templates/services/db/snippets/remix/page.after-form.tsx +22 -0
- package/dist/cmd/project/templates/services/db/snippets/remix/page.after-result.tsx +3 -0
- package/dist/cmd/project/templates/services/db/snippets/remix/page.imports.tsx +2 -0
- package/dist/cmd/project/templates/services/db/snippets/remix/page.on-mount.tsx +6 -0
- package/dist/cmd/project/templates/services/db/snippets/remix/page.on-result.tsx +8 -0
- package/dist/cmd/project/templates/services/db/snippets/remix/page.state.tsx +1 -0
- package/dist/cmd/project/templates/services/db/snippets/remix/translate.imports.ts +2 -0
- package/dist/cmd/project/templates/services/db/snippets/remix/translate.translate-post.ts +9 -0
- package/dist/cmd/project/templates/services/db/snippets/remix/translate.translate-pre.ts +21 -0
- package/dist/cmd/project/templates/services/db/snippets/sveltekit/page.after-form.svelte +17 -0
- package/dist/cmd/project/templates/services/db/snippets/sveltekit/page.after-result.svelte +3 -0
- package/dist/cmd/project/templates/services/db/snippets/sveltekit/page.imports.svelte +11 -0
- package/dist/cmd/project/templates/services/db/snippets/sveltekit/page.on-mount.svelte +1 -0
- package/dist/cmd/project/templates/services/db/snippets/sveltekit/page.on-result.svelte +3 -0
- package/dist/cmd/project/templates/services/db/snippets/sveltekit/page.state.svelte +8 -0
- package/dist/cmd/project/templates/services/db/snippets/sveltekit/translate.imports.ts +2 -0
- package/dist/cmd/project/templates/services/db/snippets/sveltekit/translate.translate-post.ts +9 -0
- package/dist/cmd/project/templates/services/db/snippets/sveltekit/translate.translate-pre.ts +21 -0
- package/dist/cmd/project/templates/services/db/snippets/vite-react/page.after-form.tsx +22 -0
- package/dist/cmd/project/templates/services/db/snippets/vite-react/page.after-result.tsx +3 -0
- package/dist/cmd/project/templates/services/db/snippets/vite-react/page.imports.tsx +3 -0
- package/dist/cmd/project/templates/services/db/snippets/vite-react/page.on-result.tsx +5 -0
- package/dist/cmd/project/templates/services/db/snippets/vite-react/page.state.tsx +9 -0
- package/dist/cmd/project/templates/services/db/snippets/vite-react/server.imports.ts +2 -0
- package/dist/cmd/project/templates/services/db/snippets/vite-react/server.routes.ts +8 -0
- package/dist/cmd/project/templates/services/db/snippets/vite-react/translate.imports.ts +2 -0
- package/dist/cmd/project/templates/services/db/snippets/vite-react/translate.translate-post.ts +9 -0
- package/dist/cmd/project/templates/services/db/snippets/vite-react/translate.translate-pre.ts +21 -0
- package/dist/cmd/project/templates/services/keyvalue/files/astro/src/pages/api/preferences.ts +21 -0
- package/dist/cmd/project/templates/services/keyvalue/files/nextjs/src/app/api/preferences/route.ts +22 -0
- package/dist/cmd/project/templates/services/keyvalue/files/nuxt/server/api/preferences.get.ts +11 -0
- package/dist/cmd/project/templates/services/keyvalue/files/nuxt/server/api/preferences.post.ts +9 -0
- package/dist/cmd/project/templates/services/keyvalue/files/remix/app/routes/api.preferences.ts +23 -0
- package/dist/cmd/project/templates/services/keyvalue/files/sveltekit/src/routes/api/preferences/+server.ts +17 -0
- package/dist/cmd/project/templates/services/keyvalue/manifest.json +9 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/astro/page.on-mount.astro +8 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/astro/page.on-result.astro +5 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/hono/page.on-mount.html +10 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/hono/page.on-result.html +5 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/hono/server.imports.ts +1 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/hono/server.module.ts +3 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/hono/server.routes.ts +14 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/nextjs/page.imports.tsx +1 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/nextjs/page.on-mount.tsx +9 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/nextjs/page.on-result.tsx +9 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/nuxt/page.on-mount.vue +11 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/nuxt/page.on-result.vue +8 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/remix/page.imports.tsx +1 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/remix/page.on-mount.tsx +9 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/remix/page.on-result.tsx +9 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/sveltekit/page.imports.svelte +1 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/sveltekit/page.on-mount.svelte +9 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/sveltekit/page.on-result.svelte +9 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/vite-react/page.imports.tsx +1 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/vite-react/page.on-mount.tsx +9 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/vite-react/page.on-result.tsx +9 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/vite-react/server.imports.ts +1 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/vite-react/server.module.ts +3 -0
- package/dist/cmd/project/templates/services/keyvalue/snippets/vite-react/server.routes.ts +13 -0
- package/dist/cmd/project/templates/services/queue/files/astro/src/pages/api/jobs.ts +13 -0
- package/dist/cmd/project/templates/services/queue/files/nextjs/src/app/api/jobs/route.ts +11 -0
- package/dist/cmd/project/templates/services/queue/files/nuxt/server/api/jobs.post.ts +9 -0
- package/dist/cmd/project/templates/services/queue/files/remix/app/routes/api.jobs.ts +12 -0
- package/dist/cmd/project/templates/services/queue/files/sveltekit/src/routes/api/jobs/+server.ts +11 -0
- package/dist/cmd/project/templates/services/queue/manifest.json +9 -0
- package/dist/cmd/project/templates/services/queue/snippets/astro/page.after-form.astro +1 -0
- package/dist/cmd/project/templates/services/queue/snippets/astro/page.inside-form-buttons.astro +7 -0
- package/dist/cmd/project/templates/services/queue/snippets/astro/page.state.astro +50 -0
- package/dist/cmd/project/templates/services/queue/snippets/hono/page.after-form.html +1 -0
- package/dist/cmd/project/templates/services/queue/snippets/hono/page.inside-form-buttons.html +7 -0
- package/dist/cmd/project/templates/services/queue/snippets/hono/page.state.html +42 -0
- package/dist/cmd/project/templates/services/queue/snippets/hono/server.imports.ts +1 -0
- package/dist/cmd/project/templates/services/queue/snippets/hono/server.module.ts +2 -0
- package/dist/cmd/project/templates/services/queue/snippets/hono/server.routes.ts +6 -0
- package/dist/cmd/project/templates/services/queue/snippets/nextjs/page.after-form.tsx +21 -0
- package/dist/cmd/project/templates/services/queue/snippets/nextjs/page.inside-form-buttons.tsx +8 -0
- package/dist/cmd/project/templates/services/queue/snippets/nextjs/page.state.tsx +19 -0
- package/dist/cmd/project/templates/services/queue/snippets/nuxt/page.after-form.vue +18 -0
- package/dist/cmd/project/templates/services/queue/snippets/nuxt/page.inside-form-buttons.vue +8 -0
- package/dist/cmd/project/templates/services/queue/snippets/nuxt/page.state.vue +25 -0
- package/dist/cmd/project/templates/services/queue/snippets/remix/page.after-form.tsx +21 -0
- package/dist/cmd/project/templates/services/queue/snippets/remix/page.inside-form-buttons.tsx +8 -0
- package/dist/cmd/project/templates/services/queue/snippets/remix/page.state.tsx +19 -0
- package/dist/cmd/project/templates/services/queue/snippets/sveltekit/page.after-form.svelte +18 -0
- package/dist/cmd/project/templates/services/queue/snippets/sveltekit/page.inside-form-buttons.svelte +8 -0
- package/dist/cmd/project/templates/services/queue/snippets/sveltekit/page.state.svelte +19 -0
- package/dist/cmd/project/templates/services/queue/snippets/vite-react/page.after-form.tsx +21 -0
- package/dist/cmd/project/templates/services/queue/snippets/vite-react/page.inside-form-buttons.tsx +8 -0
- package/dist/cmd/project/templates/services/queue/snippets/vite-react/page.state.tsx +19 -0
- package/dist/cmd/project/templates/services/queue/snippets/vite-react/server.imports.ts +1 -0
- package/dist/cmd/project/templates/services/queue/snippets/vite-react/server.module.ts +2 -0
- package/dist/cmd/project/templates/services/queue/snippets/vite-react/server.routes.ts +5 -0
- package/dist/cmd/project/templates/services/storage/files/astro/src/pages/api/export.ts +18 -0
- package/dist/cmd/project/templates/services/storage/files/astro/src/storage/index.ts +15 -0
- package/dist/cmd/project/templates/services/storage/files/hono/src/storage/index.ts +15 -0
- package/dist/cmd/project/templates/services/storage/files/nextjs/src/app/api/export/route.ts +16 -0
- package/dist/cmd/project/templates/services/storage/files/nextjs/src/storage/index.ts +15 -0
- package/dist/cmd/project/templates/services/storage/files/nuxt/server/api/export.post.ts +15 -0
- package/dist/cmd/project/templates/services/storage/files/nuxt/server/storage/index.ts +15 -0
- package/dist/cmd/project/templates/services/storage/files/remix/app/routes/api.export.ts +16 -0
- package/dist/cmd/project/templates/services/storage/files/remix/app/storage/index.ts +15 -0
- package/dist/cmd/project/templates/services/storage/files/sveltekit/src/lib/server/storage/index.ts +15 -0
- package/dist/cmd/project/templates/services/storage/files/sveltekit/src/routes/api/export/+server.ts +16 -0
- package/dist/cmd/project/templates/services/storage/files/vite-react/server/storage/index.ts +15 -0
- package/dist/cmd/project/templates/services/storage/manifest.json +19 -0
- package/dist/cmd/project/templates/services/storage/snippets/astro/page.after-form.astro +13 -0
- package/dist/cmd/project/templates/services/storage/snippets/astro/page.state.astro +17 -0
- package/dist/cmd/project/templates/services/storage/snippets/hono/page.after-form.html +13 -0
- package/dist/cmd/project/templates/services/storage/snippets/hono/page.state.html +17 -0
- package/dist/cmd/project/templates/services/storage/snippets/hono/server.imports.ts +1 -0
- package/dist/cmd/project/templates/services/storage/snippets/hono/server.routes.ts +12 -0
- package/dist/cmd/project/templates/services/storage/snippets/nextjs/page.after-form.tsx +18 -0
- package/dist/cmd/project/templates/services/storage/snippets/nextjs/page.state.tsx +12 -0
- package/dist/cmd/project/templates/services/storage/snippets/nuxt/page.after-form.vue +16 -0
- package/dist/cmd/project/templates/services/storage/snippets/nuxt/page.state.vue +13 -0
- package/dist/cmd/project/templates/services/storage/snippets/remix/page.after-form.tsx +18 -0
- package/dist/cmd/project/templates/services/storage/snippets/remix/page.state.tsx +12 -0
- package/dist/cmd/project/templates/services/storage/snippets/sveltekit/page.after-form.svelte +18 -0
- package/dist/cmd/project/templates/services/storage/snippets/sveltekit/page.state.svelte +12 -0
- package/dist/cmd/project/templates/services/storage/snippets/vite-react/page.after-form.tsx +18 -0
- package/dist/cmd/project/templates/services/storage/snippets/vite-react/page.state.tsx +12 -0
- package/dist/cmd/project/templates/services/storage/snippets/vite-react/server.imports.ts +1 -0
- package/dist/cmd/project/templates/services/storage/snippets/vite-react/server.routes.ts +11 -0
- package/dist/cmd/project/templates/services/vector/files/astro/src/pages/api/similar.ts +18 -0
- package/dist/cmd/project/templates/services/vector/files/nextjs/src/app/api/similar/route.ts +13 -0
- package/dist/cmd/project/templates/services/vector/files/nuxt/server/api/similar.get.ts +10 -0
- package/dist/cmd/project/templates/services/vector/files/remix/app/routes/api.similar.ts +14 -0
- package/dist/cmd/project/templates/services/vector/files/sveltekit/src/routes/api/similar/+server.ts +12 -0
- package/dist/cmd/project/templates/services/vector/manifest.json +9 -0
- package/dist/cmd/project/templates/services/vector/snippets/astro/page.after-result.astro +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/astro/page.on-result.astro +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/astro/page.state.astro +29 -0
- package/dist/cmd/project/templates/services/vector/snippets/astro/translate.imports.ts +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/astro/translate.module.ts +2 -0
- package/dist/cmd/project/templates/services/vector/snippets/astro/translate.translate-post.ts +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/hono/page.after-result.html +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/hono/page.on-result.html +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/hono/page.state.html +25 -0
- package/dist/cmd/project/templates/services/vector/snippets/hono/server.imports.ts +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/hono/server.module.ts +2 -0
- package/dist/cmd/project/templates/services/vector/snippets/hono/server.routes.ts +7 -0
- package/dist/cmd/project/templates/services/vector/snippets/hono/translate.imports.ts +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/hono/translate.module.ts +2 -0
- package/dist/cmd/project/templates/services/vector/snippets/hono/translate.translate-post.ts +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/nextjs/page.after-result.tsx +13 -0
- package/dist/cmd/project/templates/services/vector/snippets/nextjs/page.imports.tsx +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/nextjs/page.on-result.tsx +7 -0
- package/dist/cmd/project/templates/services/vector/snippets/nextjs/page.state.tsx +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/nextjs/translate.imports.ts +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/nextjs/translate.module.ts +2 -0
- package/dist/cmd/project/templates/services/vector/snippets/nextjs/translate.translate-post.ts +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/nuxt/page.after-result.vue +16 -0
- package/dist/cmd/project/templates/services/vector/snippets/nuxt/page.on-result.vue +10 -0
- package/dist/cmd/project/templates/services/vector/snippets/nuxt/page.state.vue +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/nuxt/translate.imports.ts +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/nuxt/translate.module.ts +2 -0
- package/dist/cmd/project/templates/services/vector/snippets/nuxt/translate.translate-post.ts +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/remix/page.after-result.tsx +13 -0
- package/dist/cmd/project/templates/services/vector/snippets/remix/page.imports.tsx +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/remix/page.on-result.tsx +7 -0
- package/dist/cmd/project/templates/services/vector/snippets/remix/page.state.tsx +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/remix/translate.imports.ts +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/remix/translate.module.ts +2 -0
- package/dist/cmd/project/templates/services/vector/snippets/remix/translate.translate-post.ts +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/sveltekit/page.after-result.svelte +13 -0
- package/dist/cmd/project/templates/services/vector/snippets/sveltekit/page.on-result.svelte +11 -0
- package/dist/cmd/project/templates/services/vector/snippets/sveltekit/page.state.svelte +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/sveltekit/translate.imports.ts +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/sveltekit/translate.module.ts +2 -0
- package/dist/cmd/project/templates/services/vector/snippets/sveltekit/translate.translate-post.ts +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/vite-react/page.after-result.tsx +13 -0
- package/dist/cmd/project/templates/services/vector/snippets/vite-react/page.imports.tsx +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/vite-react/page.on-result.tsx +7 -0
- package/dist/cmd/project/templates/services/vector/snippets/vite-react/page.state.tsx +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/vite-react/server.imports.ts +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/vite-react/server.module.ts +2 -0
- package/dist/cmd/project/templates/services/vector/snippets/vite-react/server.routes.ts +6 -0
- package/dist/cmd/project/templates/services/vector/snippets/vite-react/translate.imports.ts +1 -0
- package/dist/cmd/project/templates/services/vector/snippets/vite-react/translate.module.ts +2 -0
- package/dist/cmd/project/templates/services/vector/snippets/vite-react/translate.translate-post.ts +6 -0
- package/dist/cmd/project/templates/sveltekit/manifest.json +27 -0
- package/dist/cmd/project/templates/sveltekit/src/lib/server/translate.ts +40 -0
- package/dist/cmd/project/templates/sveltekit/src/routes/+page.server.ts +13 -0
- package/dist/cmd/project/templates/sveltekit/src/routes/+page.svelte +216 -0
- package/dist/cmd/project/templates/vite-react/manifest.json +35 -0
- package/dist/cmd/project/templates/vite-react/server/translate.ts +40 -0
- package/dist/cmd/project/templates/vite-react/server.ts +33 -0
- package/dist/cmd/project/templates/vite-react/src/App.tsx +253 -0
- package/dist/cmd/project/templates/vite-react/vite.config.ts +8 -0
- package/dist/cmd/repl/index.d.ts +1 -1
- package/dist/cmd/repl/index.d.ts.map +1 -1
- package/dist/cmd/repl/index.js +3 -3
- package/dist/cmd/repl/index.js.map +1 -1
- package/dist/cmd/setup/index.d.ts +1 -1
- package/dist/cmd/setup/index.d.ts.map +1 -1
- package/dist/cmd/setup/index.js +9 -13
- package/dist/cmd/setup/index.js.map +1 -1
- package/dist/cmd/support/index.d.ts +1 -1
- package/dist/cmd/support/index.d.ts.map +1 -1
- package/dist/cmd/support/index.js +4 -4
- package/dist/cmd/support/index.js.map +1 -1
- package/dist/cmd/support/logs/index.d.ts +1 -1
- package/dist/cmd/support/logs/index.js +3 -3
- package/dist/cmd/support/logs/index.js.map +1 -1
- package/dist/cmd/support/logs/path.d.ts +1 -1
- package/dist/cmd/support/logs/path.js +3 -3
- package/dist/cmd/support/logs/path.js.map +1 -1
- package/dist/cmd/support/logs/show.d.ts +1 -1
- package/dist/cmd/support/logs/show.js +3 -3
- package/dist/cmd/support/logs/show.js.map +1 -1
- package/dist/cmd/support/report.d.ts +1 -1
- package/dist/cmd/support/report.d.ts.map +1 -1
- package/dist/cmd/support/report.js +25 -22
- package/dist/cmd/support/report.js.map +1 -1
- package/dist/cmd/support/system.d.ts +1 -1
- package/dist/cmd/support/system.d.ts.map +1 -1
- package/dist/cmd/support/system.js +10 -9
- package/dist/cmd/support/system.js.map +1 -1
- package/dist/cmd/upgrade/index.d.ts +2 -2
- package/dist/cmd/upgrade/index.d.ts.map +1 -1
- package/dist/cmd/upgrade/index.js +11 -11
- package/dist/cmd/upgrade/index.js.map +1 -1
- package/dist/cmd/upgrade/npm-availability.d.ts +3 -2
- package/dist/cmd/upgrade/npm-availability.d.ts.map +1 -1
- package/dist/cmd/upgrade/npm-availability.js +12 -29
- package/dist/cmd/upgrade/npm-availability.js.map +1 -1
- package/dist/cmd/version/index.d.ts +1 -1
- package/dist/cmd/version/index.d.ts.map +1 -1
- package/dist/cmd/version/index.js +4 -4
- package/dist/cmd/version/index.js.map +1 -1
- package/dist/command-prefix.js +2 -2
- package/dist/command-prefix.js.map +1 -1
- package/dist/composite-logger.d.ts.map +1 -1
- package/dist/composite-logger.js +19 -0
- package/dist/composite-logger.js.map +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +34 -43
- package/dist/config.js.map +1 -1
- package/dist/deploy-metadata.d.ts +4 -5
- package/dist/deploy-metadata.d.ts.map +1 -1
- package/dist/deploy-metadata.js +11 -5
- package/dist/deploy-metadata.js.map +1 -1
- package/dist/domain.d.ts +1 -1
- package/dist/domain.d.ts.map +1 -1
- package/dist/domain.js +6 -4
- package/dist/domain.js.map +1 -1
- package/dist/download.js +2 -2
- package/dist/download.js.map +1 -1
- package/dist/env-util.d.ts.map +1 -1
- package/dist/env-util.js +5 -4
- package/dist/env-util.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/explain.d.ts +1 -1
- package/dist/explain.d.ts.map +1 -1
- package/dist/explain.js +1 -1
- package/dist/explain.js.map +1 -1
- package/dist/git-helper.d.ts +51 -9
- package/dist/git-helper.d.ts.map +1 -1
- package/dist/git-helper.js +70 -45
- package/dist/git-helper.js.map +1 -1
- package/dist/index.d.ts +31 -31
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -28
- package/dist/index.js.map +1 -1
- package/dist/internal-logger.d.ts.map +1 -1
- package/dist/internal-logger.js +8 -6
- package/dist/internal-logger.js.map +1 -1
- package/dist/keychain.d.ts.map +1 -1
- package/dist/keychain.js +35 -38
- package/dist/keychain.js.map +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +396 -0
- package/dist/main.js.map +1 -0
- package/dist/node-compat/ansi.d.ts +134 -0
- package/dist/node-compat/ansi.d.ts.map +1 -0
- package/dist/node-compat/ansi.js +128 -0
- package/dist/node-compat/ansi.js.map +1 -0
- package/dist/node-compat/crypto.d.ts +30 -0
- package/dist/node-compat/crypto.d.ts.map +1 -0
- package/dist/node-compat/crypto.js +33 -0
- package/dist/node-compat/crypto.js.map +1 -0
- package/dist/node-compat/fs.d.ts +31 -0
- package/dist/node-compat/fs.d.ts.map +1 -0
- package/dist/node-compat/fs.js +44 -0
- package/dist/node-compat/fs.js.map +1 -0
- package/dist/node-compat/index.d.ts +31 -0
- package/dist/node-compat/index.d.ts.map +1 -0
- package/dist/node-compat/index.js +31 -0
- package/dist/node-compat/index.js.map +1 -0
- package/dist/node-compat/proc.d.ts +120 -0
- package/dist/node-compat/proc.d.ts.map +1 -0
- package/dist/node-compat/proc.js +184 -0
- package/dist/node-compat/proc.js.map +1 -0
- package/dist/node-compat/runtime-info.d.ts +47 -0
- package/dist/node-compat/runtime-info.d.ts.map +1 -0
- package/dist/node-compat/runtime-info.js +65 -0
- package/dist/node-compat/runtime-info.js.map +1 -0
- package/dist/node-compat/sqlite.d.ts +58 -0
- package/dist/node-compat/sqlite.d.ts.map +1 -0
- package/dist/node-compat/sqlite.js +47 -0
- package/dist/node-compat/sqlite.js.map +1 -0
- package/dist/node-compat/stdin.d.ts +18 -0
- package/dist/node-compat/stdin.d.ts.map +1 -0
- package/dist/node-compat/stdin.js +24 -0
- package/dist/node-compat/stdin.js.map +1 -0
- package/dist/node-compat/which.d.ts +21 -0
- package/dist/node-compat/which.d.ts.map +1 -0
- package/dist/node-compat/which.js +58 -0
- package/dist/node-compat/which.js.map +1 -0
- package/dist/onboarding/agentPrompt.d.ts.map +1 -1
- package/dist/onboarding/agentPrompt.js +5 -8
- package/dist/onboarding/agentPrompt.js.map +1 -1
- package/dist/output.d.ts +1 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +1 -1
- package/dist/output.js.map +1 -1
- package/dist/regions.d.ts +1 -1
- package/dist/regions.d.ts.map +1 -1
- package/dist/regions.js +7 -8
- package/dist/regions.js.map +1 -1
- package/dist/repl.d.ts +1 -1
- package/dist/repl.d.ts.map +1 -1
- package/dist/repl.js +8 -7
- package/dist/repl.js.map +1 -1
- package/dist/runtime.d.ts +6 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +26 -12
- package/dist/runtime.js.map +1 -1
- package/dist/schema-generator.d.ts +1 -1
- package/dist/schema-generator.d.ts.map +1 -1
- package/dist/schema-generator.js +2 -2
- package/dist/schema-generator.js.map +1 -1
- package/dist/schema-parser.d.ts +1 -1
- package/dist/schema-parser.d.ts.map +1 -1
- package/dist/sound.d.ts +1 -1
- package/dist/sound.d.ts.map +1 -1
- package/dist/sound.js +5 -5
- package/dist/sound.js.map +1 -1
- package/dist/steps.d.ts +1 -1
- package/dist/steps.d.ts.map +1 -1
- package/dist/steps.js +3 -3
- package/dist/steps.js.map +1 -1
- package/dist/system/browser.d.ts +39 -0
- package/dist/system/browser.d.ts.map +1 -0
- package/dist/system/browser.js +54 -0
- package/dist/system/browser.js.map +1 -0
- package/dist/tui/box.js +5 -5
- package/dist/tui/box.js.map +1 -1
- package/dist/tui/colors.js +1 -1
- package/dist/tui/colors.js.map +1 -1
- package/dist/tui/prompt.d.ts +29 -0
- package/dist/tui/prompt.d.ts.map +1 -1
- package/dist/tui/prompt.js +182 -10
- package/dist/tui/prompt.js.map +1 -1
- package/dist/tui/symbols.js +1 -1
- package/dist/tui/symbols.js.map +1 -1
- package/dist/tui.d.ts +14 -14
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +54 -69
- package/dist/tui.js.map +1 -1
- package/dist/types.d.ts +1 -168
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/typescript-errors.d.ts +1 -1
- package/dist/typescript-errors.d.ts.map +1 -1
- package/dist/typescript-errors.js +7 -6
- package/dist/typescript-errors.js.map +1 -1
- package/dist/utils/apt-validator.d.ts +1 -1
- package/dist/utils/apt-validator.d.ts.map +1 -1
- package/dist/utils/apt-validator.js +8 -8
- package/dist/utils/apt-validator.js.map +1 -1
- package/dist/utils/deps.d.ts +1 -1
- package/dist/utils/deps.d.ts.map +1 -1
- package/dist/utils/deps.js +10 -6
- package/dist/utils/deps.js.map +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +45 -58
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/installation-type.d.ts.map +1 -1
- package/dist/utils/installation-type.js +8 -3
- package/dist/utils/installation-type.js.map +1 -1
- package/dist/utils/stream-url.js +1 -1
- package/dist/utils/stream-url.js.map +1 -1
- package/dist/utils/zip.d.ts.map +1 -1
- package/dist/utils/zip.js +11 -5
- package/dist/utils/zip.js.map +1 -1
- package/dist/version-check.d.ts +1 -1
- package/dist/version-check.d.ts.map +1 -1
- package/dist/version-check.js +11 -16
- package/dist/version-check.js.map +1 -1
- package/dist/version.d.ts +25 -4
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +45 -7
- package/dist/version.js.map +1 -1
- package/package.json +19 -26
- package/bin/cli.ts +0 -455
- package/dist/cache/agent-intro.d.ts +0 -23
- package/dist/cache/agent-intro.d.ts.map +0 -1
- package/dist/cache/agent-intro.js +0 -104
- package/dist/cache/agent-intro.js.map +0 -1
- package/dist/cmd/build/app-config-extractor.d.ts +0 -27
- package/dist/cmd/build/app-config-extractor.d.ts.map +0 -1
- package/dist/cmd/build/app-config-extractor.js +0 -152
- package/dist/cmd/build/app-config-extractor.js.map +0 -1
- package/dist/cmd/cloud/eval/get.d.ts +0 -2
- package/dist/cmd/cloud/eval/get.d.ts.map +0 -1
- package/dist/cmd/cloud/eval/get.js +0 -80
- package/dist/cmd/cloud/eval/get.js.map +0 -1
- package/dist/cmd/cloud/eval/index.d.ts +0 -2
- package/dist/cmd/cloud/eval/index.d.ts.map +0 -1
- package/dist/cmd/cloud/eval/index.js +0 -16
- package/dist/cmd/cloud/eval/index.js.map +0 -1
- package/dist/cmd/cloud/eval/list.d.ts +0 -2
- package/dist/cmd/cloud/eval/list.d.ts.map +0 -1
- package/dist/cmd/cloud/eval/list.js +0 -124
- package/dist/cmd/cloud/eval/list.js.map +0 -1
- package/dist/cmd/cloud/eval-run/get.d.ts +0 -2
- package/dist/cmd/cloud/eval-run/get.d.ts.map +0 -1
- package/dist/cmd/cloud/eval-run/get.js +0 -107
- package/dist/cmd/cloud/eval-run/get.js.map +0 -1
- package/dist/cmd/cloud/eval-run/index.d.ts +0 -2
- package/dist/cmd/cloud/eval-run/index.d.ts.map +0 -1
- package/dist/cmd/cloud/eval-run/index.js +0 -16
- package/dist/cmd/cloud/eval-run/index.js.map +0 -1
- package/dist/cmd/cloud/eval-run/list.d.ts +0 -2
- package/dist/cmd/cloud/eval-run/list.d.ts.map +0 -1
- package/dist/cmd/cloud/eval-run/list.js +0 -149
- package/dist/cmd/cloud/eval-run/list.js.map +0 -1
- package/dist/cmd/project/auth/generate.d.ts +0 -5
- package/dist/cmd/project/auth/generate.d.ts.map +0 -1
- package/dist/cmd/project/auth/generate.js +0 -102
- package/dist/cmd/project/auth/generate.js.map +0 -1
- package/dist/cmd/project/auth/index.d.ts +0 -2
- package/dist/cmd/project/auth/index.d.ts.map +0 -1
- package/dist/cmd/project/auth/index.js +0 -21
- package/dist/cmd/project/auth/index.js.map +0 -1
- package/dist/cmd/project/auth/init.d.ts +0 -2
- package/dist/cmd/project/auth/init.d.ts.map +0 -1
- package/dist/cmd/project/auth/init.js +0 -213
- package/dist/cmd/project/auth/init.js.map +0 -1
- package/dist/cmd/project/auth/shared.d.ts +0 -93
- package/dist/cmd/project/auth/shared.d.ts.map +0 -1
- package/dist/cmd/project/auth/shared.js +0 -451
- package/dist/cmd/project/auth/shared.js.map +0 -1
- package/dist/cmd/upgrade/npm-availability.test.d.ts +0 -2
- package/dist/cmd/upgrade/npm-availability.test.d.ts.map +0 -1
- package/dist/cmd/upgrade/npm-availability.test.js +0 -48
- package/dist/cmd/upgrade/npm-availability.test.js.map +0 -1
- package/dist/utils/bun-version-checker.d.ts +0 -11
- package/dist/utils/bun-version-checker.d.ts.map +0 -1
- package/dist/utils/bun-version-checker.js +0 -56
- package/dist/utils/bun-version-checker.js.map +0 -1
- package/dist/utils/dependency-checker.d.ts +0 -20
- package/dist/utils/dependency-checker.d.ts.map +0 -1
- package/dist/utils/dependency-checker.js +0 -160
- package/dist/utils/dependency-checker.js.map +0 -1
- package/dist/utils/detectSubagent.d.ts +0 -15
- package/dist/utils/detectSubagent.d.ts.map +0 -1
- package/dist/utils/detectSubagent.js +0 -28
- package/dist/utils/detectSubagent.js.map +0 -1
- package/dist/utils/stream-capture.d.ts +0 -9
- package/dist/utils/stream-capture.d.ts.map +0 -1
- package/dist/utils/stream-capture.js +0 -34
- package/dist/utils/stream-capture.js.map +0 -1
- package/dist/utils/string.d.ts +0 -6
- package/dist/utils/string.d.ts.map +0 -1
- package/dist/utils/string.js +0 -6
- package/dist/utils/string.js.map +0 -1
- package/dist/utils/version-mismatch.d.ts +0 -39
- package/dist/utils/version-mismatch.d.ts.map +0 -1
- package/dist/utils/version-mismatch.js +0 -161
- package/dist/utils/version-mismatch.js.map +0 -1
- package/dist/utils/workbench-notify.d.ts +0 -29
- package/dist/utils/workbench-notify.d.ts.map +0 -1
- package/dist/utils/workbench-notify.js +0 -56
- package/dist/utils/workbench-notify.js.map +0 -1
- package/src/agent-detection.ts +0 -588
- package/src/ai-help.ts +0 -454
- package/src/api-errors.md +0 -115
- package/src/api.ts +0 -105
- package/src/auth.ts +0 -539
- package/src/banner.ts +0 -92
- package/src/build-report.ts +0 -457
- package/src/bun-path.ts +0 -27
- package/src/cache/agent-intro.ts +0 -115
- package/src/cache/index.ts +0 -22
- package/src/cache/project-cache.ts +0 -41
- package/src/cache/resource-region.ts +0 -209
- package/src/cache/user-cache.ts +0 -92
- package/src/catalyst.ts +0 -24
- package/src/cli-logger.ts +0 -80
- package/src/cli.ts +0 -2514
- package/src/cmd/ai/capabilities/index.ts +0 -16
- package/src/cmd/ai/capabilities/show.ts +0 -258
- package/src/cmd/ai/claude-code/constants.ts +0 -26
- package/src/cmd/ai/claude-code/index.ts +0 -23
- package/src/cmd/ai/claude-code/install.ts +0 -178
- package/src/cmd/ai/claude-code/uninstall.ts +0 -122
- package/src/cmd/ai/detect.ts +0 -54
- package/src/cmd/ai/index.ts +0 -51
- package/src/cmd/ai/intro.ts +0 -174
- package/src/cmd/ai/opencode/dashboard.ts +0 -772
- package/src/cmd/ai/opencode/db.ts +0 -66
- package/src/cmd/ai/opencode/index.ts +0 -44
- package/src/cmd/ai/opencode/inspect.ts +0 -516
- package/src/cmd/ai/opencode/install.ts +0 -120
- package/src/cmd/ai/opencode/run.ts +0 -112
- package/src/cmd/ai/opencode/uninstall.ts +0 -90
- package/src/cmd/ai/prompt/api.ts +0 -31
- package/src/cmd/ai/prompt/index.ts +0 -22
- package/src/cmd/ai/prompt/llm.ts +0 -368
- package/src/cmd/ai/prompt/version.ts +0 -62
- package/src/cmd/ai/prompt/web.md +0 -347
- package/src/cmd/ai/prompt/web.ts +0 -31
- package/src/cmd/ai/schema/generate.ts +0 -64
- package/src/cmd/ai/schema/index.ts +0 -15
- package/src/cmd/ai/schema/show.ts +0 -30
- package/src/cmd/auth/README.md +0 -129
- package/src/cmd/auth/api.ts +0 -159
- package/src/cmd/auth/apikey.ts +0 -36
- package/src/cmd/auth/index.ts +0 -29
- package/src/cmd/auth/login.ts +0 -147
- package/src/cmd/auth/logout.ts +0 -26
- package/src/cmd/auth/org/enroll.ts +0 -104
- package/src/cmd/auth/org/index.ts +0 -192
- package/src/cmd/auth/org/status.ts +0 -64
- package/src/cmd/auth/org/unenroll.ts +0 -80
- package/src/cmd/auth/signup.ts +0 -64
- package/src/cmd/auth/ssh/add.ts +0 -309
- package/src/cmd/auth/ssh/api.ts +0 -106
- package/src/cmd/auth/ssh/delete.ts +0 -168
- package/src/cmd/auth/ssh/index.ts +0 -16
- package/src/cmd/auth/ssh/list.ts +0 -82
- package/src/cmd/auth/whoami.ts +0 -77
- package/src/cmd/build/adapters/generic.ts +0 -239
- package/src/cmd/build/adapters/index.ts +0 -30
- package/src/cmd/build/adapters/nextjs.ts +0 -146
- package/src/cmd/build/adapters/static-server.ts +0 -143
- package/src/cmd/build/adapters/types.ts +0 -93
- package/src/cmd/build/app-config-extractor.ts +0 -186
- package/src/cmd/build/ci.ts +0 -225
- package/src/cmd/build/detect/engine.ts +0 -111
- package/src/cmd/build/detect/frameworks.ts +0 -335
- package/src/cmd/build/detect/generic.ts +0 -71
- package/src/cmd/build/detect/index.ts +0 -122
- package/src/cmd/build/detect/types.ts +0 -109
- package/src/cmd/build/detect/util.ts +0 -104
- package/src/cmd/build/ids.ts +0 -19
- package/src/cmd/build/index.ts +0 -260
- package/src/cmd/build/package/index.ts +0 -66
- package/src/cmd/build/package/launch.ts +0 -104
- package/src/cmd/build/patch/_util.ts +0 -90
- package/src/cmd/build/patch/aisdk.ts +0 -130
- package/src/cmd/build/patch/index.ts +0 -109
- package/src/cmd/build/patch/llm.ts +0 -36
- package/src/cmd/build/patch/otel-llm.ts +0 -421
- package/src/cmd/build/typecheck.ts +0 -141
- package/src/cmd/canary/index.ts +0 -149
- package/src/cmd/cloud/agent/get.ts +0 -119
- package/src/cmd/cloud/agent/index.ts +0 -16
- package/src/cmd/cloud/agent/list.ts +0 -123
- package/src/cmd/cloud/agent/schema.ts +0 -25
- package/src/cmd/cloud/apikey/create.ts +0 -117
- package/src/cmd/cloud/apikey/delete.ts +0 -66
- package/src/cmd/cloud/apikey/get.ts +0 -63
- package/src/cmd/cloud/apikey/index.ts +0 -22
- package/src/cmd/cloud/apikey/list.ts +0 -65
- package/src/cmd/cloud/db/create.ts +0 -109
- package/src/cmd/cloud/db/delete.ts +0 -222
- package/src/cmd/cloud/db/get.ts +0 -225
- package/src/cmd/cloud/db/index.ts +0 -29
- package/src/cmd/cloud/db/list.ts +0 -132
- package/src/cmd/cloud/db/logs.ts +0 -198
- package/src/cmd/cloud/db/sql.ts +0 -84
- package/src/cmd/cloud/db/stats.ts +0 -78
- package/src/cmd/cloud/deploy-fork.ts +0 -430
- package/src/cmd/cloud/deploy.ts +0 -1400
- package/src/cmd/cloud/deployment/index.ts +0 -27
- package/src/cmd/cloud/deployment/list.ts +0 -123
- package/src/cmd/cloud/deployment/logs.ts +0 -84
- package/src/cmd/cloud/deployment/remove.ts +0 -75
- package/src/cmd/cloud/deployment/rollback.ts +0 -92
- package/src/cmd/cloud/deployment/show.ts +0 -203
- package/src/cmd/cloud/deployment/undeploy.ts +0 -56
- package/src/cmd/cloud/deployment/utils.ts +0 -20
- package/src/cmd/cloud/email/create.ts +0 -75
- package/src/cmd/cloud/email/delete.ts +0 -53
- package/src/cmd/cloud/email/destination/delete.ts +0 -69
- package/src/cmd/cloud/email/destination/index.ts +0 -15
- package/src/cmd/cloud/email/destination/list.ts +0 -46
- package/src/cmd/cloud/email/destination/schemas.ts +0 -9
- package/src/cmd/cloud/email/destination/url.ts +0 -76
- package/src/cmd/cloud/email/get.ts +0 -88
- package/src/cmd/cloud/email/inbound/get.ts +0 -53
- package/src/cmd/cloud/email/inbound/index.ts +0 -13
- package/src/cmd/cloud/email/inbound/list.ts +0 -48
- package/src/cmd/cloud/email/inbound/schemas.ts +0 -13
- package/src/cmd/cloud/email/index.ts +0 -31
- package/src/cmd/cloud/email/list.ts +0 -45
- package/src/cmd/cloud/email/outbound/get.ts +0 -55
- package/src/cmd/cloud/email/outbound/index.ts +0 -13
- package/src/cmd/cloud/email/outbound/list.ts +0 -50
- package/src/cmd/cloud/email/outbound/schemas.ts +0 -15
- package/src/cmd/cloud/email/send.ts +0 -85
- package/src/cmd/cloud/email/stats.ts +0 -79
- package/src/cmd/cloud/email/util.ts +0 -68
- package/src/cmd/cloud/env/delete.ts +0 -185
- package/src/cmd/cloud/env/env-diff.ts +0 -180
- package/src/cmd/cloud/env/get.ts +0 -119
- package/src/cmd/cloud/env/import.ts +0 -173
- package/src/cmd/cloud/env/index.ts +0 -40
- package/src/cmd/cloud/env/list.ts +0 -200
- package/src/cmd/cloud/env/org-util.ts +0 -40
- package/src/cmd/cloud/env/pull.ts +0 -197
- package/src/cmd/cloud/env/push.ts +0 -243
- package/src/cmd/cloud/env/set.ts +0 -272
- package/src/cmd/cloud/eval/get.ts +0 -86
- package/src/cmd/cloud/eval/index.ts +0 -16
- package/src/cmd/cloud/eval/list.ts +0 -135
- package/src/cmd/cloud/eval-run/get.ts +0 -114
- package/src/cmd/cloud/eval-run/index.ts +0 -16
- package/src/cmd/cloud/eval-run/list.ts +0 -160
- package/src/cmd/cloud/index.ts +0 -73
- package/src/cmd/cloud/keyvalue/create-namespace.ts +0 -53
- package/src/cmd/cloud/keyvalue/delete-namespace.ts +0 -86
- package/src/cmd/cloud/keyvalue/delete.ts +0 -62
- package/src/cmd/cloud/keyvalue/get.ts +0 -80
- package/src/cmd/cloud/keyvalue/index.ts +0 -40
- package/src/cmd/cloud/keyvalue/keys.ts +0 -62
- package/src/cmd/cloud/keyvalue/list-namespaces.ts +0 -49
- package/src/cmd/cloud/keyvalue/repl.ts +0 -297
- package/src/cmd/cloud/keyvalue/search.ts +0 -87
- package/src/cmd/cloud/keyvalue/set.ts +0 -84
- package/src/cmd/cloud/keyvalue/stats.ts +0 -222
- package/src/cmd/cloud/keyvalue/util.ts +0 -41
- package/src/cmd/cloud/machine/delete.ts +0 -97
- package/src/cmd/cloud/machine/deployments.ts +0 -100
- package/src/cmd/cloud/machine/get.ts +0 -116
- package/src/cmd/cloud/machine/index.ts +0 -22
- package/src/cmd/cloud/machine/list.ts +0 -105
- package/src/cmd/cloud/monitor.ts +0 -375
- package/src/cmd/cloud/oidc/activity.ts +0 -64
- package/src/cmd/cloud/oidc/create.ts +0 -230
- package/src/cmd/cloud/oidc/delete.ts +0 -66
- package/src/cmd/cloud/oidc/get.ts +0 -69
- package/src/cmd/cloud/oidc/index.ts +0 -35
- package/src/cmd/cloud/oidc/list.ts +0 -53
- package/src/cmd/cloud/oidc/rotate-secret.ts +0 -80
- package/src/cmd/cloud/oidc/users.ts +0 -60
- package/src/cmd/cloud/oidc/util.ts +0 -28
- package/src/cmd/cloud/queue/ack.ts +0 -50
- package/src/cmd/cloud/queue/consumers.ts +0 -97
- package/src/cmd/cloud/queue/create.ts +0 -92
- package/src/cmd/cloud/queue/delete.ts +0 -57
- package/src/cmd/cloud/queue/destinations.ts +0 -402
- package/src/cmd/cloud/queue/dlq.ts +0 -209
- package/src/cmd/cloud/queue/get.ts +0 -159
- package/src/cmd/cloud/queue/index.ts +0 -68
- package/src/cmd/cloud/queue/list.ts +0 -99
- package/src/cmd/cloud/queue/messages.ts +0 -160
- package/src/cmd/cloud/queue/nack.ts +0 -50
- package/src/cmd/cloud/queue/pause.ts +0 -41
- package/src/cmd/cloud/queue/publish.ts +0 -94
- package/src/cmd/cloud/queue/receive.ts +0 -84
- package/src/cmd/cloud/queue/resume.ts +0 -40
- package/src/cmd/cloud/queue/sources.ts +0 -352
- package/src/cmd/cloud/queue/stats.ts +0 -297
- package/src/cmd/cloud/queue/util.ts +0 -35
- package/src/cmd/cloud/redis/get.ts +0 -72
- package/src/cmd/cloud/redis/index.ts +0 -13
- package/src/cmd/cloud/region/index.ts +0 -159
- package/src/cmd/cloud/region/list.ts +0 -62
- package/src/cmd/cloud/region-lookup.ts +0 -220
- package/src/cmd/cloud/sandbox/checkpoint/create.ts +0 -86
- package/src/cmd/cloud/sandbox/checkpoint/delete.ts +0 -93
- package/src/cmd/cloud/sandbox/checkpoint/index.ts +0 -33
- package/src/cmd/cloud/sandbox/checkpoint/list.ts +0 -83
- package/src/cmd/cloud/sandbox/checkpoint/restore.ts +0 -72
- package/src/cmd/cloud/sandbox/create.ts +0 -231
- package/src/cmd/cloud/sandbox/delete.ts +0 -82
- package/src/cmd/cloud/sandbox/env.ts +0 -108
- package/src/cmd/cloud/sandbox/events.ts +0 -108
- package/src/cmd/cloud/sandbox/exec.ts +0 -317
- package/src/cmd/cloud/sandbox/execution/get.ts +0 -120
- package/src/cmd/cloud/sandbox/execution/index.ts +0 -25
- package/src/cmd/cloud/sandbox/execution/list.ts +0 -120
- package/src/cmd/cloud/sandbox/fs/cp.ts +0 -646
- package/src/cmd/cloud/sandbox/fs/download.ts +0 -106
- package/src/cmd/cloud/sandbox/fs/index.ts +0 -36
- package/src/cmd/cloud/sandbox/fs/ls.ts +0 -131
- package/src/cmd/cloud/sandbox/fs/mkdir.ts +0 -70
- package/src/cmd/cloud/sandbox/fs/rm.ts +0 -62
- package/src/cmd/cloud/sandbox/fs/rmdir.ts +0 -75
- package/src/cmd/cloud/sandbox/fs/upload.ts +0 -95
- package/src/cmd/cloud/sandbox/get.ts +0 -187
- package/src/cmd/cloud/sandbox/index.ts +0 -62
- package/src/cmd/cloud/sandbox/job/create.ts +0 -63
- package/src/cmd/cloud/sandbox/job/destroy.ts +0 -67
- package/src/cmd/cloud/sandbox/job/get.ts +0 -78
- package/src/cmd/cloud/sandbox/job/index.ts +0 -42
- package/src/cmd/cloud/sandbox/job/list.ts +0 -81
- package/src/cmd/cloud/sandbox/job/logs.ts +0 -139
- package/src/cmd/cloud/sandbox/list.ts +0 -174
- package/src/cmd/cloud/sandbox/pause.ts +0 -60
- package/src/cmd/cloud/sandbox/resume.ts +0 -60
- package/src/cmd/cloud/sandbox/run.ts +0 -244
- package/src/cmd/cloud/sandbox/runtime/index.ts +0 -20
- package/src/cmd/cloud/sandbox/runtime/list.ts +0 -90
- package/src/cmd/cloud/sandbox/snapshot/build.ts +0 -1059
- package/src/cmd/cloud/sandbox/snapshot/create.ts +0 -143
- package/src/cmd/cloud/sandbox/snapshot/delete.ts +0 -80
- package/src/cmd/cloud/sandbox/snapshot/generate.ts +0 -147
- package/src/cmd/cloud/sandbox/snapshot/get.ts +0 -259
- package/src/cmd/cloud/sandbox/snapshot/index.ts +0 -46
- package/src/cmd/cloud/sandbox/snapshot/list.ts +0 -110
- package/src/cmd/cloud/sandbox/snapshot/tag.ts +0 -92
- package/src/cmd/cloud/sandbox/stats.ts +0 -88
- package/src/cmd/cloud/sandbox/util.ts +0 -126
- package/src/cmd/cloud/schedule/create.ts +0 -83
- package/src/cmd/cloud/schedule/delete.ts +0 -45
- package/src/cmd/cloud/schedule/delivery/get.ts +0 -85
- package/src/cmd/cloud/schedule/delivery/index.ts +0 -24
- package/src/cmd/cloud/schedule/delivery/list.ts +0 -83
- package/src/cmd/cloud/schedule/destination/create.ts +0 -123
- package/src/cmd/cloud/schedule/destination/delete.ts +0 -45
- package/src/cmd/cloud/schedule/destination/get.ts +0 -67
- package/src/cmd/cloud/schedule/destination/index.ts +0 -29
- package/src/cmd/cloud/schedule/destination/list.ts +0 -79
- package/src/cmd/cloud/schedule/get.ts +0 -103
- package/src/cmd/cloud/schedule/index.ts +0 -41
- package/src/cmd/cloud/schedule/list.ts +0 -79
- package/src/cmd/cloud/schedule/stats.ts +0 -78
- package/src/cmd/cloud/schedule/update.ts +0 -74
- package/src/cmd/cloud/schedule/util.ts +0 -28
- package/src/cmd/cloud/scp/download.ts +0 -113
- package/src/cmd/cloud/scp/index.ts +0 -21
- package/src/cmd/cloud/scp/upload.ts +0 -114
- package/src/cmd/cloud/services/index.ts +0 -11
- package/src/cmd/cloud/services/stats.ts +0 -205
- package/src/cmd/cloud/session/get.ts +0 -256
- package/src/cmd/cloud/session/index.ts +0 -17
- package/src/cmd/cloud/session/list.ts +0 -191
- package/src/cmd/cloud/session/logs.ts +0 -73
- package/src/cmd/cloud/ssh.ts +0 -114
- package/src/cmd/cloud/storage/config.ts +0 -245
- package/src/cmd/cloud/storage/create.ts +0 -125
- package/src/cmd/cloud/storage/delete.ts +0 -394
- package/src/cmd/cloud/storage/download.ts +0 -197
- package/src/cmd/cloud/storage/get.ts +0 -140
- package/src/cmd/cloud/storage/index.ts +0 -32
- package/src/cmd/cloud/storage/list.ts +0 -309
- package/src/cmd/cloud/storage/upload.ts +0 -210
- package/src/cmd/cloud/storage/utils.ts +0 -26
- package/src/cmd/cloud/stream/create.ts +0 -252
- package/src/cmd/cloud/stream/delete.ts +0 -79
- package/src/cmd/cloud/stream/get.ts +0 -157
- package/src/cmd/cloud/stream/index.ts +0 -35
- package/src/cmd/cloud/stream/list.ts +0 -195
- package/src/cmd/cloud/stream/stats.ts +0 -76
- package/src/cmd/cloud/stream/util.ts +0 -99
- package/src/cmd/cloud/task/attachment.ts +0 -432
- package/src/cmd/cloud/task/close.ts +0 -319
- package/src/cmd/cloud/task/create.ts +0 -280
- package/src/cmd/cloud/task/delete.ts +0 -314
- package/src/cmd/cloud/task/get.ts +0 -229
- package/src/cmd/cloud/task/index.ts +0 -80
- package/src/cmd/cloud/task/list.ts +0 -314
- package/src/cmd/cloud/task/project.ts +0 -227
- package/src/cmd/cloud/task/stats.ts +0 -80
- package/src/cmd/cloud/task/update.ts +0 -125
- package/src/cmd/cloud/task/user.ts +0 -202
- package/src/cmd/cloud/task/util.ts +0 -132
- package/src/cmd/cloud/thread/delete.ts +0 -47
- package/src/cmd/cloud/thread/get.ts +0 -96
- package/src/cmd/cloud/thread/index.ts +0 -18
- package/src/cmd/cloud/thread/list.ts +0 -144
- package/src/cmd/cloud/vector/delete-namespace.ts +0 -90
- package/src/cmd/cloud/vector/delete.ts +0 -117
- package/src/cmd/cloud/vector/get.ts +0 -116
- package/src/cmd/cloud/vector/index.ts +0 -40
- package/src/cmd/cloud/vector/list-namespaces.ts +0 -50
- package/src/cmd/cloud/vector/search.ts +0 -174
- package/src/cmd/cloud/vector/stats.ts +0 -209
- package/src/cmd/cloud/vector/upsert.ts +0 -244
- package/src/cmd/cloud/vector/util.ts +0 -41
- package/src/cmd/cloud/webhook/create.ts +0 -72
- package/src/cmd/cloud/webhook/delete.ts +0 -57
- package/src/cmd/cloud/webhook/deliveries.ts +0 -161
- package/src/cmd/cloud/webhook/destinations.ts +0 -286
- package/src/cmd/cloud/webhook/get.ts +0 -60
- package/src/cmd/cloud/webhook/index.ts +0 -46
- package/src/cmd/cloud/webhook/list.ts +0 -82
- package/src/cmd/cloud/webhook/receipts.ts +0 -170
- package/src/cmd/cloud/webhook/util.ts +0 -35
- package/src/cmd/cloud/workflow/get.ts +0 -58
- package/src/cmd/cloud/workflow/index.ts +0 -22
- package/src/cmd/cloud/workflow/list.ts +0 -84
- package/src/cmd/cloud/workflow/util.ts +0 -28
- package/src/cmd/coder/archive.ts +0 -59
- package/src/cmd/coder/create.ts +0 -291
- package/src/cmd/coder/delete.ts +0 -67
- package/src/cmd/coder/events.ts +0 -106
- package/src/cmd/coder/extension-path.ts +0 -71
- package/src/cmd/coder/get.ts +0 -199
- package/src/cmd/coder/index.ts +0 -81
- package/src/cmd/coder/list.ts +0 -106
- package/src/cmd/coder/loop.ts +0 -85
- package/src/cmd/coder/participants.ts +0 -100
- package/src/cmd/coder/replay.ts +0 -58
- package/src/cmd/coder/resolve-repo.ts +0 -119
- package/src/cmd/coder/skill/buckets.ts +0 -191
- package/src/cmd/coder/skill/delete.ts +0 -67
- package/src/cmd/coder/skill/index.ts +0 -35
- package/src/cmd/coder/skill/list.ts +0 -97
- package/src/cmd/coder/skill/save.ts +0 -84
- package/src/cmd/coder/start.ts +0 -457
- package/src/cmd/coder/tui-init.ts +0 -92
- package/src/cmd/coder/update.ts +0 -145
- package/src/cmd/coder/users.ts +0 -101
- package/src/cmd/coder/workspace/create.ts +0 -173
- package/src/cmd/coder/workspace/delete.ts +0 -70
- package/src/cmd/coder/workspace/get.ts +0 -112
- package/src/cmd/coder/workspace/index.ts +0 -40
- package/src/cmd/coder/workspace/list.ts +0 -101
- package/src/cmd/dev/index.ts +0 -212
- package/src/cmd/git/account/add.ts +0 -179
- package/src/cmd/git/account/index.ts +0 -10
- package/src/cmd/git/account/list.ts +0 -108
- package/src/cmd/git/account/remove.ts +0 -163
- package/src/cmd/git/api.ts +0 -444
- package/src/cmd/git/identity/connect.ts +0 -178
- package/src/cmd/git/identity/disconnect.ts +0 -103
- package/src/cmd/git/identity/index.ts +0 -10
- package/src/cmd/git/identity/status.ts +0 -96
- package/src/cmd/git/index.ts +0 -20
- package/src/cmd/git/link.ts +0 -465
- package/src/cmd/git/list.ts +0 -151
- package/src/cmd/git/status.ts +0 -159
- package/src/cmd/git/unlink.ts +0 -117
- package/src/cmd/help/index.ts +0 -26
- package/src/cmd/index.ts +0 -60
- package/src/cmd/profile/README.md +0 -80
- package/src/cmd/profile/create.ts +0 -113
- package/src/cmd/profile/current.ts +0 -31
- package/src/cmd/profile/delete.ts +0 -78
- package/src/cmd/profile/index.ts +0 -30
- package/src/cmd/profile/list.ts +0 -54
- package/src/cmd/profile/show.ts +0 -81
- package/src/cmd/profile/use.ts +0 -52
- package/src/cmd/project/add/database.ts +0 -196
- package/src/cmd/project/add/domain.ts +0 -187
- package/src/cmd/project/add/index.ts +0 -35
- package/src/cmd/project/add/storage.ts +0 -198
- package/src/cmd/project/auth/generate.ts +0 -116
- package/src/cmd/project/auth/index.ts +0 -21
- package/src/cmd/project/auth/init.ts +0 -256
- package/src/cmd/project/auth/shared.ts +0 -566
- package/src/cmd/project/create.ts +0 -134
- package/src/cmd/project/delete.ts +0 -188
- package/src/cmd/project/domain/check.ts +0 -153
- package/src/cmd/project/domain/index.ts +0 -20
- package/src/cmd/project/frameworks.ts +0 -218
- package/src/cmd/project/hostname/get.ts +0 -55
- package/src/cmd/project/hostname/index.ts +0 -18
- package/src/cmd/project/hostname/set.ts +0 -123
- package/src/cmd/project/import.ts +0 -170
- package/src/cmd/project/index.ts +0 -47
- package/src/cmd/project/list.ts +0 -55
- package/src/cmd/project/reconcile.ts +0 -755
- package/src/cmd/project/remote-import.ts +0 -1349
- package/src/cmd/project/scaffold.ts +0 -311
- package/src/cmd/project/show.ts +0 -74
- package/src/cmd/project/template-flow.ts +0 -806
- package/src/cmd/project/templates/astro/src/pages/api/translate.ts +0 -22
- package/src/cmd/project/templates/astro/src/pages/index.astro +0 -160
- package/src/cmd/project/templates/hono/src/index.ts +0 -103
- package/src/cmd/project/templates/nextjs/src/app/api/translate/route.ts +0 -19
- package/src/cmd/project/templates/nextjs/src/app/page.tsx +0 -234
- package/src/cmd/project/templates/nuxt/app.vue +0 -191
- package/src/cmd/project/templates/nuxt/server/api/translate.post.ts +0 -18
- package/src/cmd/project/templates/remix/app/routes/api.translate.ts +0 -24
- package/src/cmd/project/templates/remix/app/routes/home.tsx +0 -241
- package/src/cmd/project/templates/sveltekit/src/routes/+page.server.ts +0 -24
- package/src/cmd/project/templates/sveltekit/src/routes/+page.svelte +0 -204
- package/src/cmd/project/templates/vite-react/server.ts +0 -39
- package/src/cmd/project/templates/vite-react/src/App.tsx +0 -241
- package/src/cmd/repl/index.ts +0 -477
- package/src/cmd/setup/index.ts +0 -93
- package/src/cmd/support/index.ts +0 -11
- package/src/cmd/support/logs/index.ts +0 -9
- package/src/cmd/support/logs/path.ts +0 -56
- package/src/cmd/support/logs/show.ts +0 -144
- package/src/cmd/support/report.ts +0 -427
- package/src/cmd/support/system.ts +0 -136
- package/src/cmd/upgrade/index.ts +0 -308
- package/src/cmd/upgrade/npm-availability.test.ts +0 -57
- package/src/cmd/upgrade/npm-availability.ts +0 -261
- package/src/cmd/version/index.ts +0 -42
- package/src/coder-hub-url.ts +0 -32
- package/src/command-prefix.ts +0 -34
- package/src/composite-logger.ts +0 -86
- package/src/config.ts +0 -923
- package/src/crypto/box.ts +0 -529
- package/src/deploy-metadata.ts +0 -253
- package/src/domain.ts +0 -378
- package/src/download.ts +0 -105
- package/src/env-util.ts +0 -466
- package/src/errors.ts +0 -288
- package/src/explain.ts +0 -126
- package/src/git-helper.ts +0 -74
- package/src/index.ts +0 -132
- package/src/internal-logger.ts +0 -599
- package/src/json.ts +0 -28
- package/src/keychain.ts +0 -205
- package/src/log-collector.ts +0 -77
- package/src/onboarding/agentPrompt.ts +0 -263
- package/src/output.ts +0 -359
- package/src/program-ref.ts +0 -11
- package/src/regions.ts +0 -95
- package/src/repl.ts +0 -1523
- package/src/runtime-bootstrap.md +0 -161
- package/src/runtime.ts +0 -36
- package/src/schema-generator.ts +0 -443
- package/src/schema-parser.ts +0 -550
- package/src/sound.ts +0 -30
- package/src/steps.ts +0 -748
- package/src/terminal.ts +0 -151
- package/src/tsc-output-parser.ts +0 -1138
- package/src/tui/box.ts +0 -319
- package/src/tui/colors.ts +0 -112
- package/src/tui/group.ts +0 -56
- package/src/tui/prompt.ts +0 -578
- package/src/tui/symbols.ts +0 -75
- package/src/tui.md +0 -254
- package/src/tui.ts +0 -2266
- package/src/types/md.d.ts +0 -8
- package/src/types.ts +0 -794
- package/src/typescript-errors.ts +0 -422
- package/src/utils/apt-validator.ts +0 -215
- package/src/utils/bun-version-checker.ts +0 -70
- package/src/utils/date.ts +0 -66
- package/src/utils/dependency-checker.ts +0 -205
- package/src/utils/deps.ts +0 -219
- package/src/utils/detectSubagent.ts +0 -36
- package/src/utils/format.ts +0 -17
- package/src/utils/git.ts +0 -209
- package/src/utils/installation-type.ts +0 -106
- package/src/utils/jsonc.ts +0 -67
- package/src/utils/normalize-path.ts +0 -12
- package/src/utils/stream-capture.ts +0 -39
- package/src/utils/stream-url.ts +0 -226
- package/src/utils/string.ts +0 -6
- package/src/utils/version-mismatch.ts +0 -204
- package/src/utils/workbench-notify.ts +0 -67
- package/src/utils/zip.ts +0 -68
- package/src/version-check.ts +0 -329
- package/src/version.ts +0 -57
- /package/{src → dist}/cmd/ai/prompt/api.md +0 -0
- /package/{src → dist}/cmd/project/templates/nextjs/src/app/globals.css +0 -0
- /package/{src → dist}/cmd/project/templates/vite-react/src/index.css +0 -0
- /package/{src → dist}/cmd/project/templates/vite-react/src/main.tsx +0 -0
package/src/cli.ts
DELETED
|
@@ -1,2514 +0,0 @@
|
|
|
1
|
-
import { homedir } from 'node:os';
|
|
2
|
-
import { resolve } from 'node:path';
|
|
3
|
-
import { Command } from 'commander';
|
|
4
|
-
import type {
|
|
5
|
-
CommandDefinition,
|
|
6
|
-
SubcommandDefinition,
|
|
7
|
-
CommandContext,
|
|
8
|
-
ProjectConfig,
|
|
9
|
-
Config,
|
|
10
|
-
Requires,
|
|
11
|
-
Optional,
|
|
12
|
-
Logger,
|
|
13
|
-
AuthData,
|
|
14
|
-
GlobalOptions,
|
|
15
|
-
} from './types';
|
|
16
|
-
import { showBanner, generateBanner } from './banner';
|
|
17
|
-
import { getExecutingAgent } from './agent-detection';
|
|
18
|
-
import {
|
|
19
|
-
requireAuth,
|
|
20
|
-
optionalAuth,
|
|
21
|
-
requireOrg,
|
|
22
|
-
optionalOrg as selectOptionalOrg,
|
|
23
|
-
hasPrefixedResourceId,
|
|
24
|
-
resolveOrgIdWithoutPrompt,
|
|
25
|
-
} from './auth';
|
|
26
|
-
import { type RegionList, ValidationOutputError } from '@agentuity/server';
|
|
27
|
-
import { fetchRegionsWithCache } from './regions';
|
|
28
|
-
import enquirer from 'enquirer';
|
|
29
|
-
import * as tui from './tui';
|
|
30
|
-
import { parseArgsSchema, parseOptionsSchema, buildValidationInputAsync } from './schema-parser';
|
|
31
|
-
import { defaultProfileName, loadProjectConfig, saveProjectId, saveRegion } from './config';
|
|
32
|
-
import { APIClient, getAPIBaseURL, getAppBaseURL, type APIClient as APIClientType } from './api';
|
|
33
|
-
import { ErrorCode, ExitCode, createError, exitWithError, formatErrorJSON } from './errors';
|
|
34
|
-
import { getCommand } from './command-prefix';
|
|
35
|
-
import {
|
|
36
|
-
getOutputOptions,
|
|
37
|
-
isValidateMode,
|
|
38
|
-
outputValidation,
|
|
39
|
-
type ValidationResult,
|
|
40
|
-
} from './output';
|
|
41
|
-
import { StructuredError } from '@agentuity/core';
|
|
42
|
-
import { setProgram } from './program-ref';
|
|
43
|
-
import { generateIntroPrompt } from './cmd/ai/intro';
|
|
44
|
-
import {
|
|
45
|
-
getCachedProject,
|
|
46
|
-
getResourceInfo,
|
|
47
|
-
setCachedProject,
|
|
48
|
-
type ResourceType,
|
|
49
|
-
hasAgentSeenIntro,
|
|
50
|
-
markAgentIntroSeen,
|
|
51
|
-
} from './cache';
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Check if an error is a CLI input validation error (Zod error from schema parsing),
|
|
55
|
-
* and not an API response validation error (ValidationOutputError).
|
|
56
|
-
*/
|
|
57
|
-
function isCLIValidationError(error: unknown): boolean {
|
|
58
|
-
if (!error || typeof error !== 'object' || !('issues' in error)) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
// ValidationOutputError from API responses should NOT be treated as CLI validation errors
|
|
62
|
-
if (error instanceof ValidationOutputError) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
// Check for Zod error structure (has name 'ZodError' or is from SchemaValidationError)
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const APIClientConfigError = StructuredError('APIClientConfigError');
|
|
70
|
-
|
|
71
|
-
function createAPIClient(baseCtx: CommandContext, config: Config | null): APIClient {
|
|
72
|
-
try {
|
|
73
|
-
const apiUrl = getAPIBaseURL(config);
|
|
74
|
-
const apiClient = new APIClient(apiUrl, baseCtx.logger, config);
|
|
75
|
-
|
|
76
|
-
if (!apiClient) {
|
|
77
|
-
throw new APIClientConfigError({
|
|
78
|
-
message: 'APIClient constructor returned null/undefined',
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (typeof apiClient.request !== 'function') {
|
|
83
|
-
throw new APIClientConfigError({
|
|
84
|
-
message: 'APIClient instance is missing request method',
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return apiClient;
|
|
89
|
-
} catch (error) {
|
|
90
|
-
baseCtx.logger.error('Failed to create API client:', error);
|
|
91
|
-
throw new APIClientConfigError({
|
|
92
|
-
message: `API client initialization failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
93
|
-
cause: error,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
type WebUrlSpec = string | ((ctx: CommandContext) => string | undefined | null);
|
|
99
|
-
|
|
100
|
-
function resolveWebUrl(ctx: CommandContext, spec?: WebUrlSpec): string | undefined {
|
|
101
|
-
if (!spec) return undefined;
|
|
102
|
-
|
|
103
|
-
const raw = typeof spec === 'function' ? spec(ctx) : spec;
|
|
104
|
-
if (!raw) return undefined;
|
|
105
|
-
|
|
106
|
-
if (raw.startsWith('http://') || raw.startsWith('https://')) {
|
|
107
|
-
return raw;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
const appBase = getAppBaseURL(ctx.config ?? null).replace(/\/$/, '');
|
|
111
|
-
const path = raw.startsWith('/') ? raw : `/${raw}`;
|
|
112
|
-
return `${appBase}${path}`;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function maybeRenderWebLink(ctx: CommandContext, spec?: WebUrlSpec): void {
|
|
116
|
-
if (ctx.options.json) return;
|
|
117
|
-
if (isValidateMode(ctx.options)) return;
|
|
118
|
-
if (getExecutingAgent()) return;
|
|
119
|
-
|
|
120
|
-
const url = resolveWebUrl(ctx, spec);
|
|
121
|
-
if (!url) return;
|
|
122
|
-
|
|
123
|
-
if (tui.supportsHyperlinks()) {
|
|
124
|
-
tui.output(tui.muted(`→ ${tui.link(url, 'View on the web', '')}`));
|
|
125
|
-
} else {
|
|
126
|
-
tui.output(tui.muted(`→ View on the web: ${url}`));
|
|
127
|
-
}
|
|
128
|
-
tui.newline();
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Execute handler or output validation result based on mode
|
|
133
|
-
*/
|
|
134
|
-
async function executeOrValidate(
|
|
135
|
-
ctx: CommandContext,
|
|
136
|
-
commandName: string,
|
|
137
|
-
handler?: (ctx: CommandContext) => unknown | Promise<unknown>,
|
|
138
|
-
hasResponseSchema?: boolean,
|
|
139
|
-
webUrl?: WebUrlSpec
|
|
140
|
-
): Promise<void> {
|
|
141
|
-
if (isValidateMode(ctx.options)) {
|
|
142
|
-
// In validate mode, just output success (validation already passed via Zod)
|
|
143
|
-
const result: ValidationResult = {
|
|
144
|
-
valid: true,
|
|
145
|
-
command: commandName,
|
|
146
|
-
};
|
|
147
|
-
outputValidation(result, ctx.options);
|
|
148
|
-
} else if (handler) {
|
|
149
|
-
// Normal execution
|
|
150
|
-
const result = await handler(ctx);
|
|
151
|
-
|
|
152
|
-
// Render "View on the web" link after successful execution (not shown on errors)
|
|
153
|
-
maybeRenderWebLink(ctx, webUrl);
|
|
154
|
-
|
|
155
|
-
// If --json flag is set
|
|
156
|
-
if (ctx.options.json) {
|
|
157
|
-
// If command has a response schema but returned nothing, that's an error
|
|
158
|
-
if (hasResponseSchema && result === undefined) {
|
|
159
|
-
const { createError, exitWithError, ErrorCode } = await import('./errors');
|
|
160
|
-
exitWithError(
|
|
161
|
-
createError(
|
|
162
|
-
ErrorCode.INTERNAL_ERROR,
|
|
163
|
-
`Command '${commandName}' declares a response schema but returned no data. This is a bug in the command implementation.`
|
|
164
|
-
),
|
|
165
|
-
ctx.logger,
|
|
166
|
-
ctx.options.errorFormat
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// Output the result as JSON if we have data
|
|
171
|
-
if (result !== undefined) {
|
|
172
|
-
const { outputJSON } = await import('./output');
|
|
173
|
-
outputJSON(result);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Handle validation error - output structured result in validate mode, otherwise log and exit
|
|
181
|
-
*/
|
|
182
|
-
/**
|
|
183
|
-
* Format a user-friendly message for a validation issue
|
|
184
|
-
*/
|
|
185
|
-
function formatValidationIssueMessage(
|
|
186
|
-
field: string,
|
|
187
|
-
message: string,
|
|
188
|
-
isArg: boolean = false
|
|
189
|
-
): string {
|
|
190
|
-
// Detect "expected X, received undefined" pattern (missing required value)
|
|
191
|
-
if (message.includes('received undefined')) {
|
|
192
|
-
if (field && field !== 'unknown') {
|
|
193
|
-
if (isArg) {
|
|
194
|
-
return `Missing required argument: <${field}>`;
|
|
195
|
-
}
|
|
196
|
-
return `Missing required option: --${field}`;
|
|
197
|
-
}
|
|
198
|
-
return 'Missing required value';
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// Detect "expected X, received Y" pattern (wrong type)
|
|
202
|
-
const typeMatch = message.match(/expected (\w+), received (\w+)/i);
|
|
203
|
-
if (typeMatch) {
|
|
204
|
-
const [, expected, received] = typeMatch;
|
|
205
|
-
if (field && field !== 'unknown') {
|
|
206
|
-
if (isArg) {
|
|
207
|
-
return `Invalid value for <${field}>: expected ${expected}, got ${received}`;
|
|
208
|
-
}
|
|
209
|
-
return `Invalid value for --${field}: expected ${expected}, got ${received}`;
|
|
210
|
-
}
|
|
211
|
-
return `Invalid value: expected ${expected}, got ${received}`;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// Default: include the field name if we have it
|
|
215
|
-
if (field && field !== 'unknown') {
|
|
216
|
-
if (isArg) {
|
|
217
|
-
return `<${field}>: ${message}`;
|
|
218
|
-
}
|
|
219
|
-
return `--${field}: ${message}`;
|
|
220
|
-
}
|
|
221
|
-
return message;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Custom error class to wrap ZodErrors with context about whether they are for args or options
|
|
226
|
-
*/
|
|
227
|
-
class SchemaValidationError extends Error {
|
|
228
|
-
constructor(
|
|
229
|
-
public readonly originalError: unknown,
|
|
230
|
-
public readonly isArg: boolean
|
|
231
|
-
) {
|
|
232
|
-
super('Schema validation error');
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Parse args schema and wrap any ZodError with context
|
|
238
|
-
*/
|
|
239
|
-
function parseArgs<T>(schema: { parse: (input: unknown) => T }, input: unknown): T {
|
|
240
|
-
try {
|
|
241
|
-
return schema.parse(input);
|
|
242
|
-
} catch (error) {
|
|
243
|
-
if (error && typeof error === 'object' && 'issues' in error) {
|
|
244
|
-
throw new SchemaValidationError(error, true);
|
|
245
|
-
}
|
|
246
|
-
throw error;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Parse options schema (no wrapping needed, isArg defaults to false)
|
|
252
|
-
*/
|
|
253
|
-
function parseOptions<T>(schema: { parse: (input: unknown) => T }, input: unknown): T {
|
|
254
|
-
return schema.parse(input);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
function handleValidationError(
|
|
258
|
-
error: unknown,
|
|
259
|
-
commandName: string,
|
|
260
|
-
baseCtx: { options: GlobalOptions; logger: Logger }
|
|
261
|
-
): never {
|
|
262
|
-
// Unwrap SchemaValidationError to get context about whether it's an arg or option
|
|
263
|
-
let actualError = error;
|
|
264
|
-
let isArg = false;
|
|
265
|
-
if (error instanceof SchemaValidationError) {
|
|
266
|
-
actualError = error.originalError;
|
|
267
|
-
isArg = error.isArg;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
if (actualError && typeof actualError === 'object' && 'issues' in actualError) {
|
|
271
|
-
const issues = (actualError as { issues: Array<{ path: string[]; message: string }> }).issues;
|
|
272
|
-
|
|
273
|
-
const formattedIssues = issues.map((issue) => {
|
|
274
|
-
const field = issue.path?.length ? issue.path.join('.') : 'unknown';
|
|
275
|
-
return {
|
|
276
|
-
field,
|
|
277
|
-
message: issue.message,
|
|
278
|
-
formatted: formatValidationIssueMessage(field, issue.message, isArg),
|
|
279
|
-
};
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
if (isValidateMode(baseCtx.options)) {
|
|
283
|
-
// In validate mode, output structured validation result
|
|
284
|
-
const result: ValidationResult = {
|
|
285
|
-
valid: false,
|
|
286
|
-
command: commandName,
|
|
287
|
-
errors: formattedIssues.map(({ field, message }) => ({ field, message })),
|
|
288
|
-
};
|
|
289
|
-
outputValidation(result, baseCtx.options);
|
|
290
|
-
process.exit(ExitCode.VALIDATION_ERROR);
|
|
291
|
-
} else {
|
|
292
|
-
// Build a clear, actionable error message
|
|
293
|
-
const errorMessages = formattedIssues.map((i) => i.formatted);
|
|
294
|
-
const primaryMessage =
|
|
295
|
-
errorMessages.length === 1 && errorMessages[0]
|
|
296
|
-
? errorMessages[0]
|
|
297
|
-
: 'Invalid options or arguments';
|
|
298
|
-
|
|
299
|
-
const suggestions = [`Run 'agentuity ${commandName} --help' for usage information`];
|
|
300
|
-
// Add agent-friendly hints when running from an AI agent
|
|
301
|
-
if (getExecutingAgent()) {
|
|
302
|
-
suggestions.push(
|
|
303
|
-
`Run 'agentuity ${commandName} --describe' to see the command schema as JSON`,
|
|
304
|
-
`Use --input '{...}' to pass arguments and options as a JSON object`
|
|
305
|
-
);
|
|
306
|
-
}
|
|
307
|
-
exitWithError(
|
|
308
|
-
{
|
|
309
|
-
code: ErrorCode.VALIDATION_FAILED,
|
|
310
|
-
message: primaryMessage,
|
|
311
|
-
details: errorMessages.length > 1 ? { errors: errorMessages } : undefined,
|
|
312
|
-
suggestions,
|
|
313
|
-
},
|
|
314
|
-
baseCtx.logger,
|
|
315
|
-
baseCtx.options.errorFormat ?? 'text'
|
|
316
|
-
);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
throw error;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
type Normalized = {
|
|
323
|
-
requiresAuth: boolean;
|
|
324
|
-
optionalAuth: false | string;
|
|
325
|
-
requiresProject: boolean;
|
|
326
|
-
optionalProject: boolean;
|
|
327
|
-
requiresAPIClient: boolean;
|
|
328
|
-
requiresOrg: boolean;
|
|
329
|
-
optionalOrg: boolean;
|
|
330
|
-
requiresRegions: boolean;
|
|
331
|
-
requiresRegion: boolean;
|
|
332
|
-
optionalRegion: boolean;
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Get the full command path for a command (e.g., "cloud sandbox snapshot delete")
|
|
337
|
-
* Uses Commander's _getCommandAndAncestors to traverse the command hierarchy.
|
|
338
|
-
*/
|
|
339
|
-
function getFullCommandPath(cmd: Command): string {
|
|
340
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
341
|
-
const ancestors = (cmd as any)._getCommandAndAncestors() as Command[];
|
|
342
|
-
// ancestors is [current, parent, grandparent, ...root] - reverse and skip root program name
|
|
343
|
-
const names = ancestors.map((c) => c.name()).reverse();
|
|
344
|
-
// Skip the first entry if it's the root program (usually empty or 'agentuity')
|
|
345
|
-
if (names.length > 1 && (names[0] === '' || names[0] === 'agentuity')) {
|
|
346
|
-
return names.slice(1).join(' ');
|
|
347
|
-
}
|
|
348
|
-
return names.join(' ');
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
function normalizeReqs(def: CommandDefinition | SubcommandDefinition): Normalized {
|
|
352
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
353
|
-
const d: any = def as any;
|
|
354
|
-
const requires = d.requires as Requires | undefined;
|
|
355
|
-
const optional = d.optional as Optional | undefined;
|
|
356
|
-
|
|
357
|
-
const requiresAuth = requires?.auth === true;
|
|
358
|
-
const optionalAuthValue = optional?.auth;
|
|
359
|
-
const optionalAuth: false | string =
|
|
360
|
-
optionalAuthValue === true ? 'Continue without authentication' : optionalAuthValue || false;
|
|
361
|
-
|
|
362
|
-
const requiresProject = requires?.project === true;
|
|
363
|
-
const optionalProject = optional?.project === true;
|
|
364
|
-
|
|
365
|
-
const requiresOrg = requires?.org === true;
|
|
366
|
-
const optionalOrg = optional?.org === true;
|
|
367
|
-
const requiresRegions = requires?.regions === true;
|
|
368
|
-
const requiresRegion = requires?.region === true;
|
|
369
|
-
const optionalRegion = optional?.region === true;
|
|
370
|
-
|
|
371
|
-
// Implicitly require apiClient if org or region is required or optional
|
|
372
|
-
const requiresAPIClient =
|
|
373
|
-
requires?.apiClient === true ||
|
|
374
|
-
requiresOrg ||
|
|
375
|
-
optionalOrg ||
|
|
376
|
-
requiresRegion ||
|
|
377
|
-
optionalRegion ||
|
|
378
|
-
requiresRegions;
|
|
379
|
-
|
|
380
|
-
return {
|
|
381
|
-
requiresAuth,
|
|
382
|
-
optionalAuth,
|
|
383
|
-
requiresProject,
|
|
384
|
-
optionalProject,
|
|
385
|
-
requiresAPIClient,
|
|
386
|
-
requiresOrg,
|
|
387
|
-
optionalOrg,
|
|
388
|
-
requiresRegions,
|
|
389
|
-
requiresRegion,
|
|
390
|
-
optionalRegion,
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
function handleProjectConfigError(
|
|
395
|
-
error: unknown,
|
|
396
|
-
requiresProject: boolean,
|
|
397
|
-
logger: Logger,
|
|
398
|
-
errorFormat?: 'json' | 'text'
|
|
399
|
-
): never {
|
|
400
|
-
if (
|
|
401
|
-
requiresProject &&
|
|
402
|
-
error &&
|
|
403
|
-
typeof error === 'object' &&
|
|
404
|
-
'name' in error &&
|
|
405
|
-
error.name === 'ProjectConfigNotFoundException'
|
|
406
|
-
) {
|
|
407
|
-
exitWithError(
|
|
408
|
-
createError(ErrorCode.PROJECT_NOT_FOUND, 'Invalid project folder', undefined, [
|
|
409
|
-
'Use --dir to specify a different directory',
|
|
410
|
-
'Change to a directory containing agentuity.json',
|
|
411
|
-
`Run "${getCommand('project create')}" to create a new project`,
|
|
412
|
-
]),
|
|
413
|
-
logger,
|
|
414
|
-
errorFormat ?? 'text'
|
|
415
|
-
);
|
|
416
|
-
}
|
|
417
|
-
throw error;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* Prompt user to select a project from their available projects
|
|
422
|
-
*/
|
|
423
|
-
async function promptProjectSelection(baseCtx: CommandContext): Promise<ProjectConfig | null> {
|
|
424
|
-
const { config } = baseCtx;
|
|
425
|
-
|
|
426
|
-
// Need auth and API client to fetch projects
|
|
427
|
-
const auth = await requireAuth(baseCtx);
|
|
428
|
-
if (!auth) {
|
|
429
|
-
return null;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
const apiClient = createAPIClient(baseCtx, config);
|
|
433
|
-
|
|
434
|
-
// Fetch available projects
|
|
435
|
-
const { projectList } = await import('@agentuity/server');
|
|
436
|
-
const projects = await projectList(apiClient);
|
|
437
|
-
|
|
438
|
-
if (!projects || projects.length === 0) {
|
|
439
|
-
tui.warning('No projects found. Please create a project first.');
|
|
440
|
-
return null;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
// Sort projects: prioritize those matching orgId in preferences
|
|
444
|
-
const preferredOrgId = config?.preferences?.orgId;
|
|
445
|
-
const sortedProjects = [...projects].sort((a, b) => {
|
|
446
|
-
// Prioritize preferred org
|
|
447
|
-
if (preferredOrgId) {
|
|
448
|
-
if (a.orgId === preferredOrgId && b.orgId !== preferredOrgId) return -1;
|
|
449
|
-
if (b.orgId === preferredOrgId && a.orgId !== preferredOrgId) return 1;
|
|
450
|
-
}
|
|
451
|
-
// Otherwise sort by name
|
|
452
|
-
return a.name.localeCompare(b.name);
|
|
453
|
-
});
|
|
454
|
-
|
|
455
|
-
// Build select options with aligned formatting
|
|
456
|
-
const { createPrompt } = tui;
|
|
457
|
-
const prompt = createPrompt();
|
|
458
|
-
|
|
459
|
-
// Calculate max name length for padding (with reasonable max)
|
|
460
|
-
const maxNameLength = Math.min(40, Math.max(...sortedProjects.map((p) => p.name.length)));
|
|
461
|
-
|
|
462
|
-
const selectedProjectId = await prompt.select<string>({
|
|
463
|
-
message: 'Select a project',
|
|
464
|
-
options: sortedProjects.map((p) => {
|
|
465
|
-
// Truncate and pad name for alignment
|
|
466
|
-
const displayName =
|
|
467
|
-
p.name.length > maxNameLength
|
|
468
|
-
? p.name.substring(0, maxNameLength - 1) + '…'
|
|
469
|
-
: p.name.padEnd(maxNameLength);
|
|
470
|
-
|
|
471
|
-
return {
|
|
472
|
-
value: p.id,
|
|
473
|
-
label: `${displayName} ${tui.muted(p.id)}`,
|
|
474
|
-
};
|
|
475
|
-
}),
|
|
476
|
-
});
|
|
477
|
-
|
|
478
|
-
// Cleanup stdin after prompt to prevent hanging
|
|
479
|
-
if (process.stdin.isTTY) {
|
|
480
|
-
process.stdin.pause();
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
const selectedProject = sortedProjects.find((p) => p.id === selectedProjectId);
|
|
484
|
-
if (!selectedProject) {
|
|
485
|
-
return null;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
if (selectedProject.id !== config?.preferences?.projectId) {
|
|
489
|
-
await saveProjectId(selectedProject.id);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
// Convert to ProjectConfig format
|
|
493
|
-
return {
|
|
494
|
-
projectId: selectedProject.id,
|
|
495
|
-
orgId: selectedProject.orgId,
|
|
496
|
-
region: selectedProject.cloudRegion || '',
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
export async function createCLI(version: string): Promise<Command> {
|
|
501
|
-
const program = new Command();
|
|
502
|
-
setProgram(program);
|
|
503
|
-
|
|
504
|
-
program
|
|
505
|
-
.name('agentuity')
|
|
506
|
-
.version(version, '-v, --version', 'Display version')
|
|
507
|
-
.helpOption('-h, --help [json]', 'Display help (with optional JSON output)')
|
|
508
|
-
.allowUnknownOption(false)
|
|
509
|
-
.allowExcessArguments(false)
|
|
510
|
-
.showHelpAfterError(true);
|
|
511
|
-
|
|
512
|
-
program
|
|
513
|
-
.option('--config <path>', 'Config file path')
|
|
514
|
-
.option('--log-level <level>', 'Log level', process.env.AGENTUITY_LOG_LEVEL ?? 'info')
|
|
515
|
-
.option('--log-timestamp', 'Show timestamps in log output', false)
|
|
516
|
-
.option('--no-log-prefix', 'Hide log level prefixes', true)
|
|
517
|
-
.option(
|
|
518
|
-
'--org-id <id>',
|
|
519
|
-
'Use a specific organization when performing operations',
|
|
520
|
-
process.env.AGENTUITY_CLOUD_ORG_ID
|
|
521
|
-
)
|
|
522
|
-
.option(
|
|
523
|
-
'--project-id <id>',
|
|
524
|
-
'Use a specific project when performing operations (AGENTUITY_CLOUD_PROJECT_ID)',
|
|
525
|
-
process.env.AGENTUITY_CLOUD_PROJECT_ID
|
|
526
|
-
)
|
|
527
|
-
.option('--color-scheme <scheme>', 'Color scheme: light or dark')
|
|
528
|
-
.option('--color <mode>', 'Color output: auto, always, never', 'auto')
|
|
529
|
-
.option('--error-format <format>', 'Error output format: json or text', 'text')
|
|
530
|
-
.option('--json', 'Output in JSON format (machine-readable)', false)
|
|
531
|
-
.option('--quiet', 'Suppress non-essential output', false)
|
|
532
|
-
.option('--no-progress', 'Disable progress indicators', false)
|
|
533
|
-
.option('--explain', 'Show what the command would do without executing', false)
|
|
534
|
-
.option('--dry-run', 'Execute command without making changes', false)
|
|
535
|
-
.option('--validate', 'Validate arguments and options without executing', false)
|
|
536
|
-
.option('--ai-help', 'Show AI-optimized help in dashdash format', false)
|
|
537
|
-
.option('--input <json>', 'Pass arguments and options as a JSON object (for agents)')
|
|
538
|
-
.option('--describe', 'Output command schema as JSON for agent introspection', false)
|
|
539
|
-
.option(
|
|
540
|
-
'--fields <fields>',
|
|
541
|
-
'Filter JSON output to specified fields (comma-separated, dot notation for nested)'
|
|
542
|
-
);
|
|
543
|
-
|
|
544
|
-
// Note: We intentionally do NOT add a global --org alias for --org-id because
|
|
545
|
-
// some subcommands (like env commands) define their own --org option with
|
|
546
|
-
// different semantics (boolean for "use org scope" vs string for specific org ID).
|
|
547
|
-
// Adding a global --org would shadow the subcommand's --org option.
|
|
548
|
-
|
|
549
|
-
const skipVersionCheckOption = program.createOption(
|
|
550
|
-
'--skip-version-check',
|
|
551
|
-
'Skip version compatibility check (dev only)'
|
|
552
|
-
);
|
|
553
|
-
skipVersionCheckOption.hideHelp();
|
|
554
|
-
program.addOption(skipVersionCheckOption);
|
|
555
|
-
|
|
556
|
-
const profileOption = program.createOption(
|
|
557
|
-
'--profile <name>',
|
|
558
|
-
'Override the default profile (takes precedence over AGENTUITY_PROFILE env var)'
|
|
559
|
-
);
|
|
560
|
-
profileOption.hideHelp();
|
|
561
|
-
program.addOption(profileOption);
|
|
562
|
-
|
|
563
|
-
program.action(() => {
|
|
564
|
-
program.help();
|
|
565
|
-
});
|
|
566
|
-
|
|
567
|
-
// Handle unknown commands
|
|
568
|
-
program.on('command:*', (operands: string[]) => {
|
|
569
|
-
const unknownCommand = operands[0];
|
|
570
|
-
const opts = getOutputOptions();
|
|
571
|
-
if (opts?.json || opts?.errorFormat === 'json') {
|
|
572
|
-
console.error(
|
|
573
|
-
formatErrorJSON(
|
|
574
|
-
createError(ErrorCode.UNKNOWN_COMMAND, `unknown command '${unknownCommand}'`)
|
|
575
|
-
)
|
|
576
|
-
);
|
|
577
|
-
process.exit(1);
|
|
578
|
-
return;
|
|
579
|
-
}
|
|
580
|
-
console.error(`error: unknown command '${unknownCommand}'`);
|
|
581
|
-
console.error();
|
|
582
|
-
const availableCommands = program.commands.map((cmd) => cmd.name());
|
|
583
|
-
if (availableCommands.length > 0) {
|
|
584
|
-
console.error('Available commands:');
|
|
585
|
-
availableCommands.forEach((name) => {
|
|
586
|
-
console.error(` ${name}`);
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
console.error();
|
|
590
|
-
console.error(`Run '${getCommand('--help')}' for usage information.`);
|
|
591
|
-
process.exit(1);
|
|
592
|
-
});
|
|
593
|
-
|
|
594
|
-
// Track whether a JSON error was already emitted by outputError
|
|
595
|
-
// so we can suppress Commander's help-after-error text in JSON mode
|
|
596
|
-
let jsonErrorEmitted = false;
|
|
597
|
-
|
|
598
|
-
// Custom error handling for argument/command parsing errors
|
|
599
|
-
program.configureOutput({
|
|
600
|
-
writeErr: (str) => {
|
|
601
|
-
// In JSON mode, suppress Commander's help-after-error text
|
|
602
|
-
// (we already emitted a structured JSON error in outputError)
|
|
603
|
-
const opts = getOutputOptions();
|
|
604
|
-
if (jsonErrorEmitted && (opts?.json || opts?.errorFormat === 'json')) {
|
|
605
|
-
return;
|
|
606
|
-
}
|
|
607
|
-
process.stderr.write(str);
|
|
608
|
-
},
|
|
609
|
-
outputError: (str, write) => {
|
|
610
|
-
// Suppress "unknown option '--help'" error since we handle help flags specially
|
|
611
|
-
if (str.includes("unknown option '--help'")) {
|
|
612
|
-
return;
|
|
613
|
-
}
|
|
614
|
-
// In JSON mode, output structured JSON errors for all Commander parsing errors
|
|
615
|
-
const opts = getOutputOptions();
|
|
616
|
-
if (opts?.json || opts?.errorFormat === 'json') {
|
|
617
|
-
// Strip "error: " prefix and trailing newline for clean message
|
|
618
|
-
let message = str.replace(/^error:\s*/, '').replace(/\n$/, '');
|
|
619
|
-
let code = ErrorCode.INVALID_OPTION;
|
|
620
|
-
if (str.includes('unknown command') || str.includes('too many arguments')) {
|
|
621
|
-
code = ErrorCode.UNKNOWN_COMMAND;
|
|
622
|
-
} else if (str.includes('missing required argument')) {
|
|
623
|
-
code = ErrorCode.MISSING_ARGUMENT;
|
|
624
|
-
}
|
|
625
|
-
// Extract Commander's "Did you mean" suggestion into a separate field
|
|
626
|
-
let suggestions: string[] | undefined;
|
|
627
|
-
const suggestionMatch = message.match(/\n\(Did you mean (.+)\?\)/);
|
|
628
|
-
if (suggestionMatch?.[1] != null) {
|
|
629
|
-
suggestions = [suggestionMatch[1] as string];
|
|
630
|
-
message = message.replace(/\n\(Did you mean .+\?\)/, '');
|
|
631
|
-
}
|
|
632
|
-
// Write directly to stderr (not via write/writeErr) to avoid
|
|
633
|
-
// self-suppression — writeErr suppresses output when jsonErrorEmitted is true
|
|
634
|
-
jsonErrorEmitted = true;
|
|
635
|
-
process.stderr.write(
|
|
636
|
-
formatErrorJSON(createError(code, message, undefined, suggestions)) + '\n'
|
|
637
|
-
);
|
|
638
|
-
return;
|
|
639
|
-
}
|
|
640
|
-
// Intercept commander.js error messages
|
|
641
|
-
if (str.includes('too many arguments') || str.includes('unknown command')) {
|
|
642
|
-
// Extract potential command name from error context
|
|
643
|
-
const match = str.match(/got (\d+)/);
|
|
644
|
-
if (match) {
|
|
645
|
-
write(`${tui.colorError('error: unknown command or subcommand')}\n`);
|
|
646
|
-
write(tui.warn(`\nRun '${getCommand('--help')}' for available commands.\n`));
|
|
647
|
-
} else {
|
|
648
|
-
write(str);
|
|
649
|
-
}
|
|
650
|
-
} else if (str.startsWith('error:')) {
|
|
651
|
-
// Colorize all error: lines in red
|
|
652
|
-
write(tui.colorError(str));
|
|
653
|
-
} else {
|
|
654
|
-
write(str);
|
|
655
|
-
}
|
|
656
|
-
},
|
|
657
|
-
});
|
|
658
|
-
|
|
659
|
-
// Configure help to show only main command names, not aliases
|
|
660
|
-
program.configureHelp({
|
|
661
|
-
subcommandTerm: (cmd) => cmd.name(),
|
|
662
|
-
formatHelp: (cmd, helper) => {
|
|
663
|
-
// Check if JSON help was requested via --help=json (converted to --help json)
|
|
664
|
-
const args = process.argv.slice(2);
|
|
665
|
-
const helpIndex = args.findIndex((a) => a === '--help' || a === '-h');
|
|
666
|
-
const wantsJson = helpIndex !== -1 && args[helpIndex + 1] === 'json';
|
|
667
|
-
|
|
668
|
-
if (wantsJson) {
|
|
669
|
-
// Generate JSON help for this specific command
|
|
670
|
-
const commands = helper.visibleCommands(cmd);
|
|
671
|
-
|
|
672
|
-
// Extract examples if available
|
|
673
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
674
|
-
const cmdAny = cmd as any;
|
|
675
|
-
const examples = cmdAny._examples || [];
|
|
676
|
-
|
|
677
|
-
const cmdHelp = {
|
|
678
|
-
name: cmd.name(),
|
|
679
|
-
description: cmd.description(),
|
|
680
|
-
usage: cmd.usage(),
|
|
681
|
-
commands: commands.map((c) => ({
|
|
682
|
-
name: c.name(),
|
|
683
|
-
aliases: c.aliases(),
|
|
684
|
-
description: c.description(),
|
|
685
|
-
})),
|
|
686
|
-
arguments: helper.visibleArguments(cmd).map((arg) => ({
|
|
687
|
-
term: helper.argumentTerm(arg),
|
|
688
|
-
description: helper.argumentDescription(arg),
|
|
689
|
-
})),
|
|
690
|
-
options: helper.visibleOptions(cmd).map((opt) => ({
|
|
691
|
-
flags: helper.optionTerm(opt),
|
|
692
|
-
description: helper.optionDescription(opt),
|
|
693
|
-
})),
|
|
694
|
-
globalOptions: helper.visibleGlobalOptions(cmd).map((opt) => ({
|
|
695
|
-
flags: helper.optionTerm(opt),
|
|
696
|
-
description: helper.optionDescription(opt),
|
|
697
|
-
})),
|
|
698
|
-
...(examples.length > 0 && { examples }),
|
|
699
|
-
};
|
|
700
|
-
return JSON.stringify(cmdHelp, null, 2);
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
const termWidth = helper.padWidth(cmd, helper);
|
|
704
|
-
const itemIndentWidth = 2;
|
|
705
|
-
const itemSeparatorWidth = 2;
|
|
706
|
-
|
|
707
|
-
function formatItem(term: string, description: string) {
|
|
708
|
-
if (description) {
|
|
709
|
-
return `${' '.repeat(itemIndentWidth)}${tui.colorInfo(
|
|
710
|
-
term.padEnd(termWidth + itemSeparatorWidth)
|
|
711
|
-
)}${tui.colorMuted(description)}`;
|
|
712
|
-
}
|
|
713
|
-
return term;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
// Format each section (show banner for root command)
|
|
717
|
-
let output = '';
|
|
718
|
-
|
|
719
|
-
// Show intro for first-time agents (before normal help output)
|
|
720
|
-
// AGENTUITY_SHOW_INTRO=1 forces showing the intro (useful for testing)
|
|
721
|
-
const agent = getExecutingAgent();
|
|
722
|
-
const forceShowIntro = process.env.AGENTUITY_SHOW_INTRO === '1';
|
|
723
|
-
const hasSeenIntro = agent ? hasAgentSeenIntro(agent) : true;
|
|
724
|
-
|
|
725
|
-
if (agent && (forceShowIntro || !hasSeenIntro)) {
|
|
726
|
-
// Only mark as seen if this is their first time (not on forced re-shows)
|
|
727
|
-
if (!hasSeenIntro) {
|
|
728
|
-
markAgentIntroSeen(agent);
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
const separator = '='.repeat(79);
|
|
732
|
-
output += `${separator}\n\n`;
|
|
733
|
-
output += generateIntroPrompt(agent);
|
|
734
|
-
output += `\n${separator}\n\n`;
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
// Show banner (full for root, compact for subcommands)
|
|
738
|
-
// Skip banner when running from an AI coding agent
|
|
739
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
740
|
-
const isRootCommand = !(cmd as any).parent;
|
|
741
|
-
if (!agent) {
|
|
742
|
-
if (isRootCommand) {
|
|
743
|
-
output += `${generateBanner(version)}\n\n`;
|
|
744
|
-
} else {
|
|
745
|
-
output += `${generateBanner(version, true)}\n`;
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
// Description
|
|
750
|
-
const description = helper.commandDescription(cmd);
|
|
751
|
-
if (description) {
|
|
752
|
-
output += `${tui.colorInfo(description)}\n`;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
// Usage
|
|
756
|
-
const usage = helper.commandUsage(cmd);
|
|
757
|
-
if (usage) {
|
|
758
|
-
output += `\n${tui.colorPrimary('\x1b[4mUsage\x1b[24m')}\n ${tui.bold(tui.colorPrimary(usage))}\n`;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
// Arguments
|
|
762
|
-
const argumentList = helper.visibleArguments(cmd).map((argument) => {
|
|
763
|
-
return formatItem(helper.argumentTerm(argument), helper.argumentDescription(argument));
|
|
764
|
-
});
|
|
765
|
-
if (argumentList.length > 0) {
|
|
766
|
-
output += `\n${tui.colorPrimary('\x1b[4mArguments\x1b[24m')}\n${argumentList.join('\n')}\n`;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
// Options
|
|
770
|
-
const optionList = helper.visibleOptions(cmd).map((option) => {
|
|
771
|
-
return formatItem(helper.optionTerm(option), helper.optionDescription(option));
|
|
772
|
-
});
|
|
773
|
-
if (optionList.length > 0) {
|
|
774
|
-
output += `\n${tui.colorPrimary('\x1b[4mOptions\x1b[24m')}\n${optionList.join('\n')}\n`;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
// Global options
|
|
778
|
-
const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
|
|
779
|
-
return formatItem(helper.optionTerm(option), helper.optionDescription(option));
|
|
780
|
-
});
|
|
781
|
-
if (globalOptionList.length > 0) {
|
|
782
|
-
output += `\n${tui.colorPrimary('\x1b[4mGlobal Options\x1b[24m')}\n${globalOptionList.join('\n')}\n`;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
// Commands
|
|
786
|
-
const commandList = helper.visibleCommands(cmd).map((cmd) => {
|
|
787
|
-
return formatItem(helper.subcommandTerm(cmd), helper.subcommandDescription(cmd));
|
|
788
|
-
});
|
|
789
|
-
if (commandList.length > 0) {
|
|
790
|
-
output += `\n${tui.colorPrimary('\x1b[4mCommands\x1b[24m')}\n${commandList.join('\n')}\n`;
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
return output;
|
|
794
|
-
},
|
|
795
|
-
});
|
|
796
|
-
|
|
797
|
-
return program;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
async function getRegion(regions: RegionList, preferredRegion?: string): Promise<string> {
|
|
801
|
-
const firstRegion = regions[0];
|
|
802
|
-
if (regions.length === 1 && firstRegion) {
|
|
803
|
-
return firstRegion.region;
|
|
804
|
-
} else {
|
|
805
|
-
const preferredIndex = preferredRegion
|
|
806
|
-
? regions.findIndex((region) => region.region === preferredRegion)
|
|
807
|
-
: -1;
|
|
808
|
-
const response = await enquirer.prompt<{ region: string }>({
|
|
809
|
-
type: 'select',
|
|
810
|
-
name: 'region',
|
|
811
|
-
message: 'Select a cloud region:',
|
|
812
|
-
...(preferredIndex >= 0 && { initial: preferredIndex }),
|
|
813
|
-
choices: regions.map((r) => ({
|
|
814
|
-
name: r.region,
|
|
815
|
-
message: `${r.description.padEnd(15, ' ')} ${tui.muted(r.region)}`,
|
|
816
|
-
})),
|
|
817
|
-
});
|
|
818
|
-
return response.region;
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
const RESOURCE_PREFIXES: Array<{ prefix: string; type: ResourceType }> = [
|
|
823
|
-
{ prefix: 'sbx_', type: 'sandbox' },
|
|
824
|
-
{ prefix: 'proj_', type: 'project' },
|
|
825
|
-
{ prefix: 'db_', type: 'db' },
|
|
826
|
-
{ prefix: 'deploy_', type: 'deployment' },
|
|
827
|
-
{ prefix: 'machine_', type: 'machine' },
|
|
828
|
-
{ prefix: 'que_', type: 'queue' },
|
|
829
|
-
{ prefix: 'vec_', type: 'vector' },
|
|
830
|
-
{ prefix: 'kv_', type: 'kv' },
|
|
831
|
-
{ prefix: 'stream_', type: 'stream' },
|
|
832
|
-
];
|
|
833
|
-
|
|
834
|
-
type PrefixedResource = { id: string; type: ResourceType };
|
|
835
|
-
|
|
836
|
-
function getResourceTypeFromId(id: string): ResourceType | undefined {
|
|
837
|
-
for (const entry of RESOURCE_PREFIXES) {
|
|
838
|
-
if (id.startsWith(entry.prefix)) {
|
|
839
|
-
return entry.type;
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
return undefined;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
function collectPrefixedResources(
|
|
846
|
-
values?: Record<string, unknown> | unknown[]
|
|
847
|
-
): PrefixedResource[] {
|
|
848
|
-
if (!values) {
|
|
849
|
-
return [];
|
|
850
|
-
}
|
|
851
|
-
const results = new Map<string, ResourceType>();
|
|
852
|
-
const addValue = (value: unknown) => {
|
|
853
|
-
if (typeof value === 'string') {
|
|
854
|
-
const resourceType = getResourceTypeFromId(value);
|
|
855
|
-
if (resourceType) {
|
|
856
|
-
results.set(value, resourceType);
|
|
857
|
-
}
|
|
858
|
-
return;
|
|
859
|
-
}
|
|
860
|
-
if (Array.isArray(value)) {
|
|
861
|
-
for (const entry of value) {
|
|
862
|
-
addValue(entry);
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
};
|
|
866
|
-
|
|
867
|
-
if (Array.isArray(values)) {
|
|
868
|
-
for (const entry of values) {
|
|
869
|
-
addValue(entry);
|
|
870
|
-
}
|
|
871
|
-
} else {
|
|
872
|
-
for (const value of Object.values(values)) {
|
|
873
|
-
addValue(value);
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
return Array.from(results.entries()).map(([id, type]) => ({ id, type }));
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
export interface ResolveRegionOptions {
|
|
881
|
-
options: Record<string, unknown>;
|
|
882
|
-
regions: RegionList;
|
|
883
|
-
logger: Logger;
|
|
884
|
-
required: boolean;
|
|
885
|
-
region?: string;
|
|
886
|
-
config?: Config | null;
|
|
887
|
-
args?: Record<string, unknown> | unknown[];
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
export async function resolveRegion(opts: ResolveRegionOptions): Promise<string | undefined> {
|
|
891
|
-
const { options, regions, logger, required, config, args } = opts;
|
|
892
|
-
|
|
893
|
-
// No regions available
|
|
894
|
-
if (regions.length === 0) {
|
|
895
|
-
if (required) {
|
|
896
|
-
const errorFormat = (options as Record<string, unknown>).errorFormat as
|
|
897
|
-
| 'json'
|
|
898
|
-
| 'text'
|
|
899
|
-
| undefined;
|
|
900
|
-
exitWithError(
|
|
901
|
-
createError(ErrorCode.NO_REGIONS_AVAILABLE, 'No cloud regions available', undefined, [
|
|
902
|
-
'Contact support if you need access to cloud regions',
|
|
903
|
-
]),
|
|
904
|
-
logger,
|
|
905
|
-
errorFormat ?? 'text'
|
|
906
|
-
);
|
|
907
|
-
}
|
|
908
|
-
return undefined;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
// Check if region was provided via flag
|
|
912
|
-
let region = options.region as string | undefined;
|
|
913
|
-
|
|
914
|
-
// Validate --region flag if provided
|
|
915
|
-
if (region) {
|
|
916
|
-
const found = regions.find((r) => r.region === region);
|
|
917
|
-
if (!found) {
|
|
918
|
-
const errorFormat = (options as Record<string, unknown>).errorFormat as
|
|
919
|
-
| 'json'
|
|
920
|
-
| 'text'
|
|
921
|
-
| undefined;
|
|
922
|
-
exitWithError(
|
|
923
|
-
createError(
|
|
924
|
-
ErrorCode.REGION_NOT_FOUND,
|
|
925
|
-
`Invalid region '${region}'`,
|
|
926
|
-
{ region, availableRegions: regions.map((r) => r.region) },
|
|
927
|
-
[`Use one of: ${regions.map((r) => r.region).join(', ')}`]
|
|
928
|
-
),
|
|
929
|
-
logger,
|
|
930
|
-
errorFormat ?? 'text'
|
|
931
|
-
);
|
|
932
|
-
}
|
|
933
|
-
return region;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
const profileName = config?.name ?? defaultProfileName;
|
|
937
|
-
const candidateResources = new Map<string, ResourceType>();
|
|
938
|
-
for (const resource of collectPrefixedResources(args)) {
|
|
939
|
-
candidateResources.set(resource.id, resource.type);
|
|
940
|
-
}
|
|
941
|
-
for (const resource of collectPrefixedResources(options)) {
|
|
942
|
-
candidateResources.set(resource.id, resource.type);
|
|
943
|
-
}
|
|
944
|
-
for (const [id, type] of candidateResources.entries()) {
|
|
945
|
-
const cachedInfo = await getResourceInfo(type, profileName, id);
|
|
946
|
-
if (cachedInfo?.region) {
|
|
947
|
-
logger.trace('resolved region from cache for %s (%s): %s', id, type, cachedInfo.region);
|
|
948
|
-
return cachedInfo.region;
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
// Auto-select if only one region available
|
|
953
|
-
const singleRegion = regions[0];
|
|
954
|
-
if (regions.length === 1 && singleRegion) {
|
|
955
|
-
region = singleRegion.region;
|
|
956
|
-
if (!process.stdin.isTTY) {
|
|
957
|
-
logger.trace('auto-selected region (non-TTY): %s', region);
|
|
958
|
-
}
|
|
959
|
-
return region;
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
// Check for AGENTUITY_REGION environment variable
|
|
963
|
-
const envRegion = process.env.AGENTUITY_REGION;
|
|
964
|
-
if (envRegion) {
|
|
965
|
-
// Validate that the env region is in the available regions
|
|
966
|
-
const matchingRegion = regions.find((r) => r.region === envRegion);
|
|
967
|
-
if (matchingRegion) {
|
|
968
|
-
return matchingRegion.region;
|
|
969
|
-
}
|
|
970
|
-
// If not valid, fall through to error/prompt
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
// Check for preferred region in config
|
|
974
|
-
const preferredRegion = config?.preferences?.region;
|
|
975
|
-
if (preferredRegion) {
|
|
976
|
-
const matchingRegion = regions.find((r) => r.region === preferredRegion);
|
|
977
|
-
if (matchingRegion) {
|
|
978
|
-
if (process.stdin.isTTY) {
|
|
979
|
-
region = await getRegion(regions, matchingRegion.region);
|
|
980
|
-
return region;
|
|
981
|
-
}
|
|
982
|
-
logger.trace('selected preferred region (non-TTY): %s', matchingRegion.region);
|
|
983
|
-
return matchingRegion.region;
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
// Check for project region fallback
|
|
988
|
-
const projectRegion = opts.region;
|
|
989
|
-
if (projectRegion) {
|
|
990
|
-
const matchingRegion = regions.find((r) => r.region === projectRegion);
|
|
991
|
-
if (matchingRegion) {
|
|
992
|
-
return matchingRegion.region;
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
// No flag provided - handle TTY vs non-TTY
|
|
997
|
-
if (required && !process.stdin.isTTY) {
|
|
998
|
-
const errorFormat = (options as Record<string, unknown>).errorFormat as
|
|
999
|
-
| 'json'
|
|
1000
|
-
| 'text'
|
|
1001
|
-
| undefined;
|
|
1002
|
-
exitWithError(
|
|
1003
|
-
createError(
|
|
1004
|
-
ErrorCode.REGION_REQUIRED,
|
|
1005
|
-
'--region flag is required in non-interactive mode',
|
|
1006
|
-
{ availableRegions: regions.map((r) => r.region) },
|
|
1007
|
-
[
|
|
1008
|
-
`Use --region with one of: ${regions.map((r) => r.region).join(', ')}`,
|
|
1009
|
-
`Or set AGENTUITY_REGION environment variable`,
|
|
1010
|
-
]
|
|
1011
|
-
),
|
|
1012
|
-
logger,
|
|
1013
|
-
errorFormat ?? 'text'
|
|
1014
|
-
);
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
if (process.stdin.isTTY) {
|
|
1018
|
-
// Interactive mode - prompt user
|
|
1019
|
-
region = await getRegion(regions);
|
|
1020
|
-
|
|
1021
|
-
const hasSavedPreference = !!config?.preferences?.region;
|
|
1022
|
-
const hasEnvRegion = !!process.env.AGENTUITY_REGION;
|
|
1023
|
-
const hasTTY = process.stdin.isTTY && process.stdout.isTTY;
|
|
1024
|
-
if (region && hasTTY && !hasSavedPreference && !hasEnvRegion) {
|
|
1025
|
-
const selectedRegionInfo = regions.find((r) => r.region === region);
|
|
1026
|
-
const regionLabel = selectedRegionInfo
|
|
1027
|
-
? `${selectedRegionInfo.description} (${selectedRegionInfo.region})`
|
|
1028
|
-
: region;
|
|
1029
|
-
const shouldSave = await tui.confirm(
|
|
1030
|
-
`Would you like to set "${regionLabel}" as your default region?`,
|
|
1031
|
-
true
|
|
1032
|
-
);
|
|
1033
|
-
if (shouldSave) {
|
|
1034
|
-
await saveRegion(region);
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
return region;
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
// Non-interactive, optional region - return undefined
|
|
1042
|
-
return undefined;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
async function registerSubcommand(
|
|
1046
|
-
parent: Command,
|
|
1047
|
-
subcommand: SubcommandDefinition,
|
|
1048
|
-
baseCtx: CommandContext,
|
|
1049
|
-
hidden?: boolean
|
|
1050
|
-
): Promise<void> {
|
|
1051
|
-
const cmd = parent.command(subcommand.name, { hidden }).description(subcommand.description);
|
|
1052
|
-
|
|
1053
|
-
// Allow pass-through args for commands that need to forward unknown options
|
|
1054
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1055
|
-
if ((subcommand as any).passThroughArgs) {
|
|
1056
|
-
cmd.allowUnknownOption();
|
|
1057
|
-
cmd.allowExcessArguments();
|
|
1058
|
-
// Disable help option so --help passes through to the target command
|
|
1059
|
-
cmd.helpOption(false);
|
|
1060
|
-
} else {
|
|
1061
|
-
cmd.helpOption('-h, --help [json]', 'Display help (with optional JSON output)');
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
if (subcommand.aliases) {
|
|
1065
|
-
cmd.aliases(subcommand.aliases);
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
// Add examples to help text (skip in JSON mode)
|
|
1069
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1070
|
-
const examples = (subcommand as any).examples as
|
|
1071
|
-
| Array<{ command: string; description: string }>
|
|
1072
|
-
| undefined;
|
|
1073
|
-
if (examples && examples.length > 0) {
|
|
1074
|
-
// Store examples for JSON help generation
|
|
1075
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1076
|
-
(cmd as any)._examples = examples;
|
|
1077
|
-
|
|
1078
|
-
// Add formatted examples to text help
|
|
1079
|
-
cmd.addHelpText('after', () => {
|
|
1080
|
-
// Skip examples in JSON mode
|
|
1081
|
-
const args = process.argv.slice(2);
|
|
1082
|
-
const helpIndex = args.findIndex((a) => a === '--help' || a === '-h');
|
|
1083
|
-
if (helpIndex !== -1 && args[helpIndex + 1] === 'json') {
|
|
1084
|
-
return '';
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
const maxLength = Math.max(...examples.map((ex) => ex.command.length));
|
|
1088
|
-
const formatted = examples.map((ex) => {
|
|
1089
|
-
const padding = ' '.repeat(maxLength - ex.command.length + 1);
|
|
1090
|
-
return ` ${tui.colorPrimary(ex.command)}${padding}${tui.muted('#')} ${tui.muted(ex.description)}`;
|
|
1091
|
-
});
|
|
1092
|
-
return `\n${tui.colorPrimary('\x1b[4mExamples:\x1b[24m')}\n` + formatted.join('\n');
|
|
1093
|
-
});
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
// Check if this subcommand has its own subcommands (nested subcommands)
|
|
1097
|
-
const subDef = subcommand as unknown as { subcommands?: SubcommandDefinition[] };
|
|
1098
|
-
if (subDef.subcommands && subDef.subcommands.length > 0) {
|
|
1099
|
-
// Register nested subcommands recursively
|
|
1100
|
-
for (const nestedSub of subDef.subcommands) {
|
|
1101
|
-
await registerSubcommand(cmd, nestedSub, baseCtx);
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
// Add a virtual 'help' subcommand
|
|
1105
|
-
cmd.command('help', { hidden: true })
|
|
1106
|
-
.description('Display help')
|
|
1107
|
-
.action(() => {
|
|
1108
|
-
cmd.help();
|
|
1109
|
-
});
|
|
1110
|
-
|
|
1111
|
-
// Handle --describe for command-group nodes
|
|
1112
|
-
cmd.action(async () => {
|
|
1113
|
-
if (baseCtx.options.describe) {
|
|
1114
|
-
const { extractSubcommandSchema } = await import('./schema-generator');
|
|
1115
|
-
const schema = extractSubcommandSchema(subcommand);
|
|
1116
|
-
const { outputJSON } = await import('./output');
|
|
1117
|
-
outputJSON(schema);
|
|
1118
|
-
return;
|
|
1119
|
-
}
|
|
1120
|
-
cmd.help();
|
|
1121
|
-
});
|
|
1122
|
-
|
|
1123
|
-
// Don't add options to parent commands - only to leaf commands
|
|
1124
|
-
return;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
const {
|
|
1128
|
-
requiresProject,
|
|
1129
|
-
optionalProject,
|
|
1130
|
-
requiresOrg,
|
|
1131
|
-
optionalOrg,
|
|
1132
|
-
requiresRegion,
|
|
1133
|
-
optionalRegion,
|
|
1134
|
-
} = normalizeReqs(subcommand);
|
|
1135
|
-
|
|
1136
|
-
if (requiresProject || optionalProject) {
|
|
1137
|
-
cmd.option('--dir <path>', 'project directory (default: current directory)');
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
// Note: --org-id may also be added below if the schema defines orgId;
|
|
1141
|
-
// in that case we skip adding it here to avoid conflicts.
|
|
1142
|
-
const _deferOrgIdFlag = requiresOrg || optionalOrg;
|
|
1143
|
-
|
|
1144
|
-
if (requiresRegion || optionalRegion) {
|
|
1145
|
-
cmd.option('--region <region>', 'cloud region');
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
if (subcommand.schema?.args) {
|
|
1149
|
-
const parsed = parseArgsSchema(subcommand.schema.args);
|
|
1150
|
-
for (const argMeta of parsed.metadata) {
|
|
1151
|
-
let argSyntax: string;
|
|
1152
|
-
if (argMeta.variadic) {
|
|
1153
|
-
argSyntax = argMeta.optional ? `[${argMeta.name}...]` : `<${argMeta.name}...>`;
|
|
1154
|
-
} else {
|
|
1155
|
-
argSyntax = argMeta.optional ? `[${argMeta.name}]` : `<${argMeta.name}>`;
|
|
1156
|
-
}
|
|
1157
|
-
cmd.argument(argSyntax);
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
// Track if projectId/orgId is defined in schema options
|
|
1162
|
-
let hasProjectIdInSchema = false;
|
|
1163
|
-
let hasOrgIdInSchema = false;
|
|
1164
|
-
|
|
1165
|
-
if (subcommand.schema?.options) {
|
|
1166
|
-
const parsed = parseOptionsSchema(subcommand.schema.options);
|
|
1167
|
-
const aliases = subcommand.schema.aliases ?? {};
|
|
1168
|
-
for (const opt of parsed) {
|
|
1169
|
-
const flag = opt.name
|
|
1170
|
-
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
1171
|
-
.replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')
|
|
1172
|
-
.toLowerCase();
|
|
1173
|
-
|
|
1174
|
-
// Track if this schema defines projectId (as 'projectId' or 'project-id')
|
|
1175
|
-
if (opt.name === 'projectId' || opt.name === 'project-id' || flag === 'project-id') {
|
|
1176
|
-
hasProjectIdInSchema = true;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
// Track if this schema defines orgId (as 'orgId' or 'org-id')
|
|
1180
|
-
if (opt.name === 'orgId' || opt.name === 'org-id' || flag === 'org-id') {
|
|
1181
|
-
hasOrgIdInSchema = true;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
const desc = opt.description || '';
|
|
1185
|
-
// Build flag spec with aliases (check both camelCase and kebab-case names)
|
|
1186
|
-
// Auto-add -y alias for confirm flag
|
|
1187
|
-
let optAliases = aliases[opt.name] ?? aliases[flag] ?? [];
|
|
1188
|
-
if (flag === 'confirm' && !optAliases.includes('y')) {
|
|
1189
|
-
optAliases = ['y', ...optAliases];
|
|
1190
|
-
}
|
|
1191
|
-
let flagSpec = `--${flag}`;
|
|
1192
|
-
if (flag === 'verbose') {
|
|
1193
|
-
flagSpec = `-v, --${flag}`;
|
|
1194
|
-
} else if (flag === 'confirm') {
|
|
1195
|
-
// Add -y short alias for --confirm
|
|
1196
|
-
flagSpec = `-y, --${flag}`;
|
|
1197
|
-
} else if (optAliases.length > 0) {
|
|
1198
|
-
const aliasFlags = optAliases
|
|
1199
|
-
.map((a) => (a.length === 1 ? `-${a}` : `--${a}`))
|
|
1200
|
-
.join(', ');
|
|
1201
|
-
flagSpec = `${aliasFlags}, --${flag}`;
|
|
1202
|
-
}
|
|
1203
|
-
if (opt.type === 'boolean') {
|
|
1204
|
-
if (opt.hasDefault) {
|
|
1205
|
-
const defaultValue =
|
|
1206
|
-
typeof opt.defaultValue === 'function' ? opt.defaultValue() : opt.defaultValue;
|
|
1207
|
-
// Register both positive and negative forms so both work,
|
|
1208
|
-
// but only show one in help based on the default value
|
|
1209
|
-
const baseDesc = desc.replace(/\s*\(use\s+--no-\S+\s+to\s+skip\)/i, '').trim();
|
|
1210
|
-
const negatedDesc = baseDesc.toLowerCase().startsWith('run ')
|
|
1211
|
-
? `Skip ${baseDesc.slice(4)}`
|
|
1212
|
-
: `Do not ${baseDesc.charAt(0).toLowerCase()}${baseDesc.slice(1)}`;
|
|
1213
|
-
|
|
1214
|
-
if (defaultValue === true) {
|
|
1215
|
-
// Show --no-* in help, hide positive flag
|
|
1216
|
-
cmd.option(`--no-${flag}`, negatedDesc);
|
|
1217
|
-
const positiveOption = cmd.createOption(flagSpec, baseDesc);
|
|
1218
|
-
positiveOption.default(defaultValue);
|
|
1219
|
-
positiveOption.hideHelp();
|
|
1220
|
-
cmd.addOption(positiveOption);
|
|
1221
|
-
} else {
|
|
1222
|
-
// Show positive flag in help, but also register --no-* hidden
|
|
1223
|
-
cmd.option(flagSpec, desc);
|
|
1224
|
-
const negativeOption = cmd.createOption(`--no-${flag}`, negatedDesc);
|
|
1225
|
-
negativeOption.hideHelp();
|
|
1226
|
-
cmd.addOption(negativeOption);
|
|
1227
|
-
}
|
|
1228
|
-
} else {
|
|
1229
|
-
cmd.option(flagSpec, desc);
|
|
1230
|
-
}
|
|
1231
|
-
} else if (opt.type === 'number') {
|
|
1232
|
-
const numDefault = opt.hasDefault
|
|
1233
|
-
? typeof opt.defaultValue === 'function'
|
|
1234
|
-
? opt.defaultValue()
|
|
1235
|
-
: opt.defaultValue
|
|
1236
|
-
: undefined;
|
|
1237
|
-
const numDesc =
|
|
1238
|
-
opt.hasDefault && numDefault !== undefined
|
|
1239
|
-
? `${desc} (default: ${numDefault})`
|
|
1240
|
-
: desc;
|
|
1241
|
-
cmd.option(`${flagSpec} <${opt.name}>`, numDesc, parseFloat);
|
|
1242
|
-
} else if (opt.type === 'array') {
|
|
1243
|
-
const arrayDefault = opt.hasDefault
|
|
1244
|
-
? typeof opt.defaultValue === 'function'
|
|
1245
|
-
? opt.defaultValue()
|
|
1246
|
-
: opt.defaultValue
|
|
1247
|
-
: undefined;
|
|
1248
|
-
const arrayDesc =
|
|
1249
|
-
opt.hasDefault && Array.isArray(arrayDefault) && arrayDefault.length > 0
|
|
1250
|
-
? `${desc} (default: ${JSON.stringify(arrayDefault)})`
|
|
1251
|
-
: desc;
|
|
1252
|
-
cmd.option(
|
|
1253
|
-
`${flagSpec} <${opt.name}>`,
|
|
1254
|
-
arrayDesc,
|
|
1255
|
-
(value: string, previous: string[]) => (previous ?? []).concat([value])
|
|
1256
|
-
);
|
|
1257
|
-
} else if (opt.type === 'optionalString') {
|
|
1258
|
-
// Optional string: --flag uses true, --flag=value uses the string value
|
|
1259
|
-
// In Commander.js, [value] means optional argument
|
|
1260
|
-
cmd.option(`${flagSpec} [${opt.name}]`, desc);
|
|
1261
|
-
} else {
|
|
1262
|
-
const strDefault = opt.hasDefault
|
|
1263
|
-
? typeof opt.defaultValue === 'function'
|
|
1264
|
-
? opt.defaultValue()
|
|
1265
|
-
: opt.defaultValue
|
|
1266
|
-
: undefined;
|
|
1267
|
-
let strDesc = desc;
|
|
1268
|
-
if (opt.enumValues && opt.enumValues.length > 0) {
|
|
1269
|
-
strDesc += ` (${opt.enumValues.join(', ')})`;
|
|
1270
|
-
}
|
|
1271
|
-
if (opt.hasDefault && strDefault !== undefined) {
|
|
1272
|
-
strDesc += ` (default: ${JSON.stringify(strDefault)})`;
|
|
1273
|
-
}
|
|
1274
|
-
cmd.option(`${flagSpec} <${opt.name}>`, strDesc);
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
// Add hidden --yes and --force aliases for --confirm if command has a confirm option
|
|
1280
|
-
if (subcommand.schema?.options) {
|
|
1281
|
-
const parsed = parseOptionsSchema(subcommand.schema.options);
|
|
1282
|
-
const hasConfirmOption = parsed.some((opt) => opt.name === 'confirm');
|
|
1283
|
-
if (hasConfirmOption) {
|
|
1284
|
-
// Add hidden --yes option that sets confirm to true
|
|
1285
|
-
const yesOption = cmd.createOption('--yes', 'Alias for --confirm');
|
|
1286
|
-
yesOption.hideHelp();
|
|
1287
|
-
cmd.addOption(yesOption);
|
|
1288
|
-
// Add hidden --force option that sets confirm to true,
|
|
1289
|
-
// but only if the schema doesn't already declare its own --force option
|
|
1290
|
-
const hasForceOption = parsed.some((opt) => opt.name === 'force');
|
|
1291
|
-
if (!hasForceOption) {
|
|
1292
|
-
const forceOption = cmd.createOption('--force', 'Alias for --confirm');
|
|
1293
|
-
forceOption.hideHelp();
|
|
1294
|
-
cmd.addOption(forceOption);
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
// Add --org-id if command requires/optional org and doesn't define it in schema
|
|
1300
|
-
if (_deferOrgIdFlag && !hasOrgIdInSchema) {
|
|
1301
|
-
cmd.option('--org-id <id>', 'organization ID');
|
|
1302
|
-
// Add hidden --org alias, but only if schema doesn't define its own --org option
|
|
1303
|
-
// (e.g., env commands use --org for "org scope" which is different from --org-id)
|
|
1304
|
-
const schemaDefinesOrg = subcommand.schema?.options
|
|
1305
|
-
? parseOptionsSchema(subcommand.schema.options).some((o) => o.name === 'org')
|
|
1306
|
-
: false;
|
|
1307
|
-
if (!schemaDefinesOrg) {
|
|
1308
|
-
// Use [id] (optional) to allow --org without argument for default org
|
|
1309
|
-
const orgAlias = cmd.createOption('--org [id]', 'Alias for --org-id');
|
|
1310
|
-
orgAlias.hideHelp();
|
|
1311
|
-
cmd.addOption(orgAlias);
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
// Add --project-id if command requires/optional project and doesn't define it in schema
|
|
1316
|
-
if ((requiresProject || optionalProject) && !hasProjectIdInSchema) {
|
|
1317
|
-
cmd.option('--project-id <id>', 'project ID (alternative to --dir)');
|
|
1318
|
-
}
|
|
1319
|
-
|
|
1320
|
-
cmd.action(async (...rawArgs: unknown[]) => {
|
|
1321
|
-
const cmdObj = rawArgs[rawArgs.length - 1] as { opts: () => Record<string, unknown> };
|
|
1322
|
-
const options = cmdObj.opts();
|
|
1323
|
-
const args = rawArgs.slice(0, -1);
|
|
1324
|
-
|
|
1325
|
-
// Normalize --org to --org-id for downstream code
|
|
1326
|
-
// The --org [id] option is parsed into options.org, but code uses options.orgId
|
|
1327
|
-
// Handle: --org (true -> undefined for default org), --org org_123 (string -> string)
|
|
1328
|
-
if (options.org !== undefined && options.orgId === undefined) {
|
|
1329
|
-
if (options.org === true) {
|
|
1330
|
-
// --org without argument: mark as explicitly requested (use default org)
|
|
1331
|
-
// Set to undefined so org resolution falls through to preference/env/prompt
|
|
1332
|
-
options.orgId = undefined;
|
|
1333
|
-
} else if (typeof options.org === 'string') {
|
|
1334
|
-
options.orgId = options.org;
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
// Handle --describe mode: output command schema and exit
|
|
1339
|
-
if (baseCtx.options.describe) {
|
|
1340
|
-
const { extractSubcommandSchema } = await import('./schema-generator');
|
|
1341
|
-
const schema = extractSubcommandSchema(subcommand);
|
|
1342
|
-
const { outputJSON } = await import('./output');
|
|
1343
|
-
outputJSON(schema);
|
|
1344
|
-
return;
|
|
1345
|
-
}
|
|
1346
|
-
|
|
1347
|
-
// One-time hint for agents about structured input/output features
|
|
1348
|
-
// Emitted on stderr so it doesn't interfere with --json stdout
|
|
1349
|
-
const detectedAgent = getExecutingAgent();
|
|
1350
|
-
if (detectedAgent) {
|
|
1351
|
-
const { hasAgentSeenInputHint, markAgentInputHintSeen } = await import('./cache');
|
|
1352
|
-
if (!hasAgentSeenInputHint(detectedAgent)) {
|
|
1353
|
-
markAgentInputHintSeen(detectedAgent);
|
|
1354
|
-
console.error(
|
|
1355
|
-
`[agent] This CLI supports structured I/O for agents: --input <json> (structured input), --describe (schema introspection), --fields (output filtering). Run --ai-help for details.`
|
|
1356
|
-
);
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
// Merge global --org-id and --project-id into subcommand options when the schema
|
|
1361
|
-
// defines these fields. Global options (program-level) capture the values first,
|
|
1362
|
-
// so subcommand-level options may not have them. Only merge when the user
|
|
1363
|
-
// explicitly passed the flag on the CLI (not from env var defaults).
|
|
1364
|
-
const argv = process.argv;
|
|
1365
|
-
const hasExplicitOrgId = argv.some(
|
|
1366
|
-
(a) =>
|
|
1367
|
-
a === '--org-id' || a.startsWith('--org-id=') || a === '--org' || a.startsWith('--org=')
|
|
1368
|
-
);
|
|
1369
|
-
const hasExplicitProjectId = argv.some(
|
|
1370
|
-
(a) => a === '--project-id' || a.startsWith('--project-id=')
|
|
1371
|
-
);
|
|
1372
|
-
if (
|
|
1373
|
-
hasOrgIdInSchema &&
|
|
1374
|
-
options.orgId === undefined &&
|
|
1375
|
-
hasExplicitOrgId &&
|
|
1376
|
-
baseCtx.options.orgId
|
|
1377
|
-
) {
|
|
1378
|
-
options.orgId = baseCtx.options.orgId;
|
|
1379
|
-
}
|
|
1380
|
-
if (
|
|
1381
|
-
hasProjectIdInSchema &&
|
|
1382
|
-
options.projectId === undefined &&
|
|
1383
|
-
hasExplicitProjectId &&
|
|
1384
|
-
(baseCtx.options as unknown as Record<string, unknown>).projectId
|
|
1385
|
-
) {
|
|
1386
|
-
options.projectId = (baseCtx.options as unknown as Record<string, unknown>).projectId;
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
if (subcommand.banner) {
|
|
1390
|
-
showBanner();
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
const normalized = normalizeReqs(subcommand);
|
|
1394
|
-
|
|
1395
|
-
let project: ProjectConfig | undefined;
|
|
1396
|
-
let projectDir: string | undefined;
|
|
1397
|
-
const dirNeeded = normalized.requiresProject || normalized.optionalProject;
|
|
1398
|
-
|
|
1399
|
-
if (dirNeeded) {
|
|
1400
|
-
const optionsProjectId = options.projectId as string | undefined;
|
|
1401
|
-
|
|
1402
|
-
// Helper to fetch project from API by ID
|
|
1403
|
-
const fetchProjectFromAPI = async (
|
|
1404
|
-
projectId: string
|
|
1405
|
-
): Promise<ProjectConfig | undefined> => {
|
|
1406
|
-
const auth = await requireAuth(baseCtx);
|
|
1407
|
-
if (auth) {
|
|
1408
|
-
// Create config with auth credentials for API client
|
|
1409
|
-
const configWithAuth = {
|
|
1410
|
-
...baseCtx.config,
|
|
1411
|
-
auth: {
|
|
1412
|
-
api_key: auth.apiKey,
|
|
1413
|
-
user_id: auth.userId,
|
|
1414
|
-
expires: auth.expires.getTime(),
|
|
1415
|
-
},
|
|
1416
|
-
};
|
|
1417
|
-
const apiClient = createAPIClient(baseCtx, configWithAuth as Config);
|
|
1418
|
-
// Check cache first to avoid duplicate API calls
|
|
1419
|
-
const profile = baseCtx.config?.name ?? 'default';
|
|
1420
|
-
let projectDetails = getCachedProject(profile, projectId);
|
|
1421
|
-
if (!projectDetails) {
|
|
1422
|
-
const { projectGet } = await import('@agentuity/server');
|
|
1423
|
-
// Use keys: false to match other callers and ensure cache consistency
|
|
1424
|
-
projectDetails = await projectGet(apiClient, { id: projectId, keys: false });
|
|
1425
|
-
setCachedProject(profile, projectId, projectDetails);
|
|
1426
|
-
}
|
|
1427
|
-
return {
|
|
1428
|
-
projectId: projectDetails.id,
|
|
1429
|
-
orgId: projectDetails.orgId,
|
|
1430
|
-
region: projectDetails.cloudRegion || '',
|
|
1431
|
-
};
|
|
1432
|
-
}
|
|
1433
|
-
return undefined;
|
|
1434
|
-
};
|
|
1435
|
-
|
|
1436
|
-
// Resolution precedence:
|
|
1437
|
-
// 1. --project-id flag (or AGENTUITY_CLOUD_PROJECT_ID env var)
|
|
1438
|
-
// 2. agentuity.json in project directory
|
|
1439
|
-
// 3. config.preferences.projectId (global preference) - fallback only
|
|
1440
|
-
// 4. Interactive selection (if TTY)
|
|
1441
|
-
|
|
1442
|
-
if (optionsProjectId) {
|
|
1443
|
-
// Priority 1: Explicit flag/env var provided
|
|
1444
|
-
try {
|
|
1445
|
-
project = await fetchProjectFromAPI(optionsProjectId);
|
|
1446
|
-
} catch (_error) {
|
|
1447
|
-
if (normalized.requiresProject) {
|
|
1448
|
-
exitWithError(
|
|
1449
|
-
createError(
|
|
1450
|
-
ErrorCode.PROJECT_NOT_FOUND,
|
|
1451
|
-
`Project not found: ${optionsProjectId}`,
|
|
1452
|
-
undefined,
|
|
1453
|
-
[
|
|
1454
|
-
'Verify the project ID is correct',
|
|
1455
|
-
`Run "${getCommand('project list')}" to see available projects`,
|
|
1456
|
-
]
|
|
1457
|
-
),
|
|
1458
|
-
baseCtx.logger,
|
|
1459
|
-
baseCtx.options.errorFormat
|
|
1460
|
-
);
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
} else {
|
|
1464
|
-
// Priority 2: Try to load from agentuity.json in directory
|
|
1465
|
-
const dir = (options.dir as string | undefined) ?? process.cwd();
|
|
1466
|
-
projectDir = dir;
|
|
1467
|
-
if (projectDir.startsWith('~/')) {
|
|
1468
|
-
projectDir = projectDir.replace('~/', homedir());
|
|
1469
|
-
}
|
|
1470
|
-
projectDir = resolve(projectDir);
|
|
1471
|
-
try {
|
|
1472
|
-
project = await loadProjectConfig(dir, baseCtx.config);
|
|
1473
|
-
} catch (error) {
|
|
1474
|
-
const isConfigNotFound =
|
|
1475
|
-
error &&
|
|
1476
|
-
typeof error === 'object' &&
|
|
1477
|
-
'name' in error &&
|
|
1478
|
-
error.name === 'ProjectConfigNotFoundException';
|
|
1479
|
-
|
|
1480
|
-
if (isConfigNotFound) {
|
|
1481
|
-
// Priority 3: Try global preference (only when no agentuity.json found)
|
|
1482
|
-
const projectIdFromPreference = baseCtx.config?.preferences?.projectId as
|
|
1483
|
-
| string
|
|
1484
|
-
| undefined;
|
|
1485
|
-
if (projectIdFromPreference) {
|
|
1486
|
-
try {
|
|
1487
|
-
project = await fetchProjectFromAPI(projectIdFromPreference);
|
|
1488
|
-
if (project) {
|
|
1489
|
-
// Set the project ID in options so it can be used by the command
|
|
1490
|
-
(options as Record<string, unknown>).projectId = projectIdFromPreference;
|
|
1491
|
-
}
|
|
1492
|
-
} catch (_preferenceError) {
|
|
1493
|
-
// Preference project not found, fall through to interactive selection
|
|
1494
|
-
baseCtx.logger.trace(
|
|
1495
|
-
'Preference project not found: %s',
|
|
1496
|
-
projectIdFromPreference
|
|
1497
|
-
);
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
|
|
1501
|
-
// Priority 4: Interactive selection (if TTY and still no project)
|
|
1502
|
-
if (!project && normalized.requiresProject) {
|
|
1503
|
-
const hasTTY = process.stdin.isTTY && process.stdout.isTTY;
|
|
1504
|
-
|
|
1505
|
-
if (hasTTY) {
|
|
1506
|
-
// Try to prompt for project selection
|
|
1507
|
-
try {
|
|
1508
|
-
const selectedProject = await promptProjectSelection(baseCtx);
|
|
1509
|
-
if (selectedProject) {
|
|
1510
|
-
// Set the project ID in options so it can be used by the command
|
|
1511
|
-
(options as Record<string, unknown>).projectId =
|
|
1512
|
-
selectedProject.projectId;
|
|
1513
|
-
project = selectedProject;
|
|
1514
|
-
}
|
|
1515
|
-
} catch (promptError) {
|
|
1516
|
-
// If prompting fails, fall through to the original error
|
|
1517
|
-
baseCtx.logger.trace('Project selection prompt failed: %s', promptError);
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
|
-
if (!project) {
|
|
1522
|
-
exitWithError(
|
|
1523
|
-
createError(
|
|
1524
|
-
ErrorCode.PROJECT_NOT_FOUND,
|
|
1525
|
-
'Invalid project folder',
|
|
1526
|
-
undefined,
|
|
1527
|
-
[
|
|
1528
|
-
'Use --dir to specify a different directory',
|
|
1529
|
-
'Use --project-id to specify a project by ID',
|
|
1530
|
-
'Change to a directory containing agentuity.json',
|
|
1531
|
-
`Run "${getCommand('project create')}" to create a new project`,
|
|
1532
|
-
]
|
|
1533
|
-
),
|
|
1534
|
-
baseCtx.logger,
|
|
1535
|
-
baseCtx.options.errorFormat
|
|
1536
|
-
);
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
} else if (normalized.requiresProject) {
|
|
1540
|
-
throw error;
|
|
1541
|
-
}
|
|
1542
|
-
// For optional projects, silently continue without project config
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
if (normalized.requiresAuth) {
|
|
1548
|
-
// Create apiClient before requireAuth since login command needs it
|
|
1549
|
-
if (normalized.requiresAPIClient) {
|
|
1550
|
-
(baseCtx as Record<string, unknown>).apiClient = createAPIClient(
|
|
1551
|
-
baseCtx,
|
|
1552
|
-
baseCtx.config ?? null
|
|
1553
|
-
);
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
const auth = await requireAuth(baseCtx as CommandContext<undefined>);
|
|
1557
|
-
|
|
1558
|
-
if (subcommand.schema) {
|
|
1559
|
-
try {
|
|
1560
|
-
// Check if command uses stdin (don't auto-confirm if it does)
|
|
1561
|
-
const usesStdin = subcommand.tags?.includes('uses-stdin') ?? false;
|
|
1562
|
-
const input = await buildValidationInputAsync(
|
|
1563
|
-
subcommand.schema,
|
|
1564
|
-
args,
|
|
1565
|
-
options,
|
|
1566
|
-
{ usesStdin },
|
|
1567
|
-
baseCtx.options.input
|
|
1568
|
-
);
|
|
1569
|
-
const ctx: Record<string, unknown> = {
|
|
1570
|
-
...baseCtx,
|
|
1571
|
-
config: {
|
|
1572
|
-
...(baseCtx.config ?? {}),
|
|
1573
|
-
auth: {
|
|
1574
|
-
api_key: auth.apiKey,
|
|
1575
|
-
user_id: auth.userId,
|
|
1576
|
-
expires: auth.expires.getTime(),
|
|
1577
|
-
},
|
|
1578
|
-
},
|
|
1579
|
-
auth,
|
|
1580
|
-
};
|
|
1581
|
-
if (project || projectDir) {
|
|
1582
|
-
if (project) {
|
|
1583
|
-
ctx.project = project;
|
|
1584
|
-
}
|
|
1585
|
-
ctx.projectDir = projectDir;
|
|
1586
|
-
}
|
|
1587
|
-
if (subcommand.schema.args) {
|
|
1588
|
-
ctx.args = parseArgs(subcommand.schema.args, input.args);
|
|
1589
|
-
}
|
|
1590
|
-
if (subcommand.schema.options) {
|
|
1591
|
-
ctx.opts = parseOptions(subcommand.schema.options, input.options);
|
|
1592
|
-
}
|
|
1593
|
-
if (normalized.requiresAPIClient) {
|
|
1594
|
-
// Recreate apiClient with auth credentials
|
|
1595
|
-
ctx.apiClient = createAPIClient(baseCtx, ctx.config as Config | null);
|
|
1596
|
-
}
|
|
1597
|
-
// Auto-select org when --confirm flag is used
|
|
1598
|
-
const autoSelectOrg = options.confirm === true;
|
|
1599
|
-
const hasPrefixedId = hasPrefixedResourceId(
|
|
1600
|
-
ctx.args as Record<string, unknown> | undefined,
|
|
1601
|
-
ctx.opts as Record<string, unknown> | undefined
|
|
1602
|
-
);
|
|
1603
|
-
const prefixedOrgId = hasPrefixedId
|
|
1604
|
-
? await resolveOrgIdWithoutPrompt({
|
|
1605
|
-
options,
|
|
1606
|
-
config: (ctx.config as Config | null) ?? null,
|
|
1607
|
-
args: ctx.args as Record<string, unknown> | undefined,
|
|
1608
|
-
opts: ctx.opts as Record<string, unknown> | undefined,
|
|
1609
|
-
})
|
|
1610
|
-
: undefined;
|
|
1611
|
-
if (normalized.requiresOrg) {
|
|
1612
|
-
ctx.orgId = hasPrefixedId
|
|
1613
|
-
? prefixedOrgId
|
|
1614
|
-
: await requireOrg(
|
|
1615
|
-
ctx as CommandContext & { apiClient: APIClientType },
|
|
1616
|
-
autoSelectOrg
|
|
1617
|
-
);
|
|
1618
|
-
}
|
|
1619
|
-
// Skip org handling if --no-register is set (org only needed for registration)
|
|
1620
|
-
const skipOrg =
|
|
1621
|
-
normalized.optionalOrg &&
|
|
1622
|
-
!normalized.requiresOrg &&
|
|
1623
|
-
ctx.opts &&
|
|
1624
|
-
(ctx.opts as Record<string, unknown>).register === false;
|
|
1625
|
-
|
|
1626
|
-
if (normalized.optionalOrg && ctx.auth && !skipOrg) {
|
|
1627
|
-
ctx.orgId = hasPrefixedId
|
|
1628
|
-
? prefixedOrgId
|
|
1629
|
-
: await selectOptionalOrg(
|
|
1630
|
-
ctx as CommandContext & { apiClient: APIClientType },
|
|
1631
|
-
autoSelectOrg
|
|
1632
|
-
);
|
|
1633
|
-
}
|
|
1634
|
-
// Skip region handling if --no-register is set (region only needed for registration)
|
|
1635
|
-
const skipRegion =
|
|
1636
|
-
normalized.optionalRegion &&
|
|
1637
|
-
!normalized.requiresRegion &&
|
|
1638
|
-
!normalized.requiresRegions &&
|
|
1639
|
-
ctx.opts &&
|
|
1640
|
-
(ctx.opts as Record<string, unknown>).register === false;
|
|
1641
|
-
|
|
1642
|
-
if (
|
|
1643
|
-
(normalized.requiresRegion ||
|
|
1644
|
-
normalized.optionalRegion ||
|
|
1645
|
-
normalized.requiresRegions) &&
|
|
1646
|
-
ctx.apiClient &&
|
|
1647
|
-
!skipRegion
|
|
1648
|
-
) {
|
|
1649
|
-
const apiClient: APIClientType = ctx.apiClient as APIClientType;
|
|
1650
|
-
const regions = await tui.spinner({
|
|
1651
|
-
message: 'Fetching cloud regions',
|
|
1652
|
-
clearOnSuccess: true,
|
|
1653
|
-
callback: async () => {
|
|
1654
|
-
return fetchRegionsWithCache(
|
|
1655
|
-
baseCtx.config?.name ?? defaultProfileName,
|
|
1656
|
-
apiClient,
|
|
1657
|
-
baseCtx.logger
|
|
1658
|
-
);
|
|
1659
|
-
},
|
|
1660
|
-
});
|
|
1661
|
-
if (normalized.requiresRegions) {
|
|
1662
|
-
ctx.regions = regions;
|
|
1663
|
-
}
|
|
1664
|
-
if (normalized.requiresRegion || normalized.optionalRegion) {
|
|
1665
|
-
const region = await resolveRegion({
|
|
1666
|
-
options: options as Record<string, unknown>,
|
|
1667
|
-
args: ctx.args as Record<string, unknown> | undefined,
|
|
1668
|
-
regions,
|
|
1669
|
-
logger: baseCtx.logger,
|
|
1670
|
-
required: !!normalized.requiresRegion,
|
|
1671
|
-
region: project?.region,
|
|
1672
|
-
config: baseCtx.config ?? null,
|
|
1673
|
-
});
|
|
1674
|
-
if (region) {
|
|
1675
|
-
ctx.region = region;
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
await executeOrValidate(
|
|
1680
|
-
ctx as CommandContext,
|
|
1681
|
-
getFullCommandPath(cmd),
|
|
1682
|
-
subcommand.handler,
|
|
1683
|
-
!!subcommand.schema?.response,
|
|
1684
|
-
subcommand.webUrl
|
|
1685
|
-
);
|
|
1686
|
-
} catch (error) {
|
|
1687
|
-
if (isCLIValidationError(error)) {
|
|
1688
|
-
handleValidationError(error, getFullCommandPath(cmd), baseCtx);
|
|
1689
|
-
}
|
|
1690
|
-
handleProjectConfigError(
|
|
1691
|
-
error,
|
|
1692
|
-
normalized.requiresProject,
|
|
1693
|
-
baseCtx.logger,
|
|
1694
|
-
baseCtx.options.errorFormat
|
|
1695
|
-
);
|
|
1696
|
-
}
|
|
1697
|
-
} else {
|
|
1698
|
-
const ctx: Record<string, unknown> = {
|
|
1699
|
-
...baseCtx,
|
|
1700
|
-
config: baseCtx.config
|
|
1701
|
-
? {
|
|
1702
|
-
...baseCtx.config,
|
|
1703
|
-
name: baseCtx.config.name ?? defaultProfileName,
|
|
1704
|
-
auth: {
|
|
1705
|
-
api_key: auth.apiKey,
|
|
1706
|
-
user_id: auth.userId,
|
|
1707
|
-
expires: auth.expires.getTime(),
|
|
1708
|
-
},
|
|
1709
|
-
}
|
|
1710
|
-
: null,
|
|
1711
|
-
auth,
|
|
1712
|
-
};
|
|
1713
|
-
if (project || projectDir) {
|
|
1714
|
-
if (project) {
|
|
1715
|
-
ctx.project = project;
|
|
1716
|
-
}
|
|
1717
|
-
ctx.projectDir = projectDir;
|
|
1718
|
-
}
|
|
1719
|
-
if (normalized.requiresAPIClient) {
|
|
1720
|
-
// Recreate apiClient with auth credentials
|
|
1721
|
-
ctx.apiClient = createAPIClient(baseCtx, ctx.config as Config | null);
|
|
1722
|
-
}
|
|
1723
|
-
// Auto-select org when --confirm flag is used
|
|
1724
|
-
const autoSelectOrg2 = options.confirm === true;
|
|
1725
|
-
const hasPrefixedId = hasPrefixedResourceId(args as unknown[]);
|
|
1726
|
-
const prefixedOrgId = hasPrefixedId
|
|
1727
|
-
? await resolveOrgIdWithoutPrompt({
|
|
1728
|
-
options,
|
|
1729
|
-
config: (ctx.config as Config | null) ?? null,
|
|
1730
|
-
args: args as unknown[],
|
|
1731
|
-
})
|
|
1732
|
-
: undefined;
|
|
1733
|
-
if (normalized.requiresOrg) {
|
|
1734
|
-
ctx.orgId = hasPrefixedId
|
|
1735
|
-
? prefixedOrgId
|
|
1736
|
-
: await requireOrg(
|
|
1737
|
-
ctx as CommandContext & { apiClient: APIClientType },
|
|
1738
|
-
autoSelectOrg2
|
|
1739
|
-
);
|
|
1740
|
-
}
|
|
1741
|
-
// Skip org handling if --no-register is set (org only needed for registration)
|
|
1742
|
-
const skipOrg =
|
|
1743
|
-
normalized.optionalOrg &&
|
|
1744
|
-
!normalized.requiresOrg &&
|
|
1745
|
-
ctx.opts &&
|
|
1746
|
-
(ctx.opts as Record<string, unknown>).register === false;
|
|
1747
|
-
|
|
1748
|
-
if (normalized.optionalOrg && ctx.auth && !skipOrg) {
|
|
1749
|
-
ctx.orgId = hasPrefixedId
|
|
1750
|
-
? prefixedOrgId
|
|
1751
|
-
: await selectOptionalOrg(
|
|
1752
|
-
ctx as CommandContext & { apiClient: APIClientType },
|
|
1753
|
-
autoSelectOrg2
|
|
1754
|
-
);
|
|
1755
|
-
}
|
|
1756
|
-
// Skip region handling if --no-register is set (region only needed for registration)
|
|
1757
|
-
const skipRegion =
|
|
1758
|
-
normalized.optionalRegion &&
|
|
1759
|
-
!normalized.requiresRegion &&
|
|
1760
|
-
!normalized.requiresRegions &&
|
|
1761
|
-
ctx.opts &&
|
|
1762
|
-
(ctx.opts as Record<string, unknown>).register === false;
|
|
1763
|
-
|
|
1764
|
-
if (
|
|
1765
|
-
(normalized.requiresRegion ||
|
|
1766
|
-
normalized.optionalRegion ||
|
|
1767
|
-
normalized.requiresRegions) &&
|
|
1768
|
-
ctx.apiClient &&
|
|
1769
|
-
!skipRegion
|
|
1770
|
-
) {
|
|
1771
|
-
const apiClient: APIClientType = ctx.apiClient as APIClientType;
|
|
1772
|
-
const regions = await tui.spinner({
|
|
1773
|
-
message: 'Fetching cloud regions',
|
|
1774
|
-
clearOnSuccess: true,
|
|
1775
|
-
callback: async () => {
|
|
1776
|
-
return fetchRegionsWithCache(
|
|
1777
|
-
baseCtx.config?.name ?? defaultProfileName,
|
|
1778
|
-
apiClient,
|
|
1779
|
-
baseCtx.logger
|
|
1780
|
-
);
|
|
1781
|
-
},
|
|
1782
|
-
});
|
|
1783
|
-
if (normalized.requiresRegions) {
|
|
1784
|
-
ctx.regions = regions;
|
|
1785
|
-
}
|
|
1786
|
-
if (normalized.requiresRegion || normalized.optionalRegion) {
|
|
1787
|
-
const region = await resolveRegion({
|
|
1788
|
-
options: options as Record<string, unknown>,
|
|
1789
|
-
args: args as unknown[],
|
|
1790
|
-
regions,
|
|
1791
|
-
logger: baseCtx.logger,
|
|
1792
|
-
required: !!normalized.requiresRegion,
|
|
1793
|
-
region: project?.region,
|
|
1794
|
-
config: baseCtx.config ?? null,
|
|
1795
|
-
});
|
|
1796
|
-
if (region) {
|
|
1797
|
-
ctx.region = region;
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
}
|
|
1801
|
-
if (subcommand.handler) {
|
|
1802
|
-
const result = await subcommand.handler(ctx as CommandContext);
|
|
1803
|
-
// Render "View on the web" link after successful execution (not shown on errors)
|
|
1804
|
-
maybeRenderWebLink(ctx as CommandContext, subcommand.webUrl);
|
|
1805
|
-
|
|
1806
|
-
// If --json flag is set
|
|
1807
|
-
if (baseCtx.options.json) {
|
|
1808
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1809
|
-
const hasResponseSchema = !!(subcommand as any).schema?.response;
|
|
1810
|
-
|
|
1811
|
-
// If command has a response schema but returned nothing, that's an error
|
|
1812
|
-
if (hasResponseSchema && result === undefined) {
|
|
1813
|
-
const { createError, exitWithError, ErrorCode } = await import('./errors');
|
|
1814
|
-
exitWithError(
|
|
1815
|
-
createError(
|
|
1816
|
-
ErrorCode.INTERNAL_ERROR,
|
|
1817
|
-
`Command '${getFullCommandPath(cmd)}' declares a response schema but returned no data. This is a bug in the command implementation.`
|
|
1818
|
-
),
|
|
1819
|
-
baseCtx.logger,
|
|
1820
|
-
baseCtx.options.errorFormat
|
|
1821
|
-
);
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
// Output the result as JSON if we have data
|
|
1825
|
-
if (result !== undefined) {
|
|
1826
|
-
const { outputJSON } = await import('./output');
|
|
1827
|
-
outputJSON(result);
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
}
|
|
1831
|
-
}
|
|
1832
|
-
} else if (normalized.optionalAuth) {
|
|
1833
|
-
const continueText =
|
|
1834
|
-
typeof normalized.optionalAuth === 'string' ? normalized.optionalAuth : undefined;
|
|
1835
|
-
|
|
1836
|
-
// Create apiClient before optionalAuth since login command needs it
|
|
1837
|
-
if (normalized.requiresAPIClient) {
|
|
1838
|
-
(baseCtx as Record<string, unknown>).apiClient = createAPIClient(
|
|
1839
|
-
baseCtx,
|
|
1840
|
-
baseCtx.config ?? null
|
|
1841
|
-
);
|
|
1842
|
-
}
|
|
1843
|
-
|
|
1844
|
-
// Check if --confirm flag or --no-register flag is set to skip interactive prompts
|
|
1845
|
-
const skipPrompts = options.confirm === true || options.register === false;
|
|
1846
|
-
const auth = await optionalAuth(
|
|
1847
|
-
baseCtx as CommandContext<undefined>,
|
|
1848
|
-
continueText,
|
|
1849
|
-
skipPrompts
|
|
1850
|
-
);
|
|
1851
|
-
|
|
1852
|
-
if (subcommand.schema) {
|
|
1853
|
-
try {
|
|
1854
|
-
// Check if command uses stdin (don't auto-confirm if it does)
|
|
1855
|
-
const usesStdin = subcommand.tags?.includes('uses-stdin') ?? false;
|
|
1856
|
-
const input = await buildValidationInputAsync(
|
|
1857
|
-
subcommand.schema,
|
|
1858
|
-
args,
|
|
1859
|
-
options,
|
|
1860
|
-
{
|
|
1861
|
-
usesStdin,
|
|
1862
|
-
},
|
|
1863
|
-
baseCtx.options.input
|
|
1864
|
-
);
|
|
1865
|
-
const ctx: Record<string, unknown> = {
|
|
1866
|
-
...baseCtx,
|
|
1867
|
-
config: auth
|
|
1868
|
-
? {
|
|
1869
|
-
...(baseCtx.config ?? {}),
|
|
1870
|
-
auth: {
|
|
1871
|
-
api_key: auth.apiKey,
|
|
1872
|
-
user_id: auth.userId,
|
|
1873
|
-
expires: auth.expires.getTime(),
|
|
1874
|
-
},
|
|
1875
|
-
}
|
|
1876
|
-
: baseCtx.config,
|
|
1877
|
-
auth,
|
|
1878
|
-
};
|
|
1879
|
-
if (project || projectDir) {
|
|
1880
|
-
if (project) {
|
|
1881
|
-
ctx.project = project;
|
|
1882
|
-
}
|
|
1883
|
-
ctx.projectDir = projectDir;
|
|
1884
|
-
}
|
|
1885
|
-
if (subcommand.schema.args) {
|
|
1886
|
-
ctx.args = parseArgs(subcommand.schema.args, input.args);
|
|
1887
|
-
}
|
|
1888
|
-
if (subcommand.schema.options) {
|
|
1889
|
-
ctx.opts = parseOptions(subcommand.schema.options, input.options);
|
|
1890
|
-
}
|
|
1891
|
-
if (normalized.requiresAPIClient) {
|
|
1892
|
-
// Recreate apiClient with auth credentials
|
|
1893
|
-
ctx.apiClient = createAPIClient(baseCtx, ctx.config as Config | null);
|
|
1894
|
-
}
|
|
1895
|
-
baseCtx.logger.trace(
|
|
1896
|
-
'optionalAuth path: org=%s, region=%s, hasApiClient=%s, hasAuth=%s',
|
|
1897
|
-
normalized.optionalOrg,
|
|
1898
|
-
normalized.optionalRegion,
|
|
1899
|
-
!!ctx.apiClient,
|
|
1900
|
-
!!auth
|
|
1901
|
-
);
|
|
1902
|
-
// Auto-select org when --confirm flag is used
|
|
1903
|
-
const autoSelectOrg3 = options.confirm === true;
|
|
1904
|
-
const hasPrefixedId3 = hasPrefixedResourceId(
|
|
1905
|
-
ctx.args as Record<string, unknown> | undefined,
|
|
1906
|
-
ctx.opts as Record<string, unknown> | undefined
|
|
1907
|
-
);
|
|
1908
|
-
const prefixedOrgId3 = hasPrefixedId3
|
|
1909
|
-
? await resolveOrgIdWithoutPrompt({
|
|
1910
|
-
options,
|
|
1911
|
-
config: (ctx.config as Config | null) ?? null,
|
|
1912
|
-
args: ctx.args as Record<string, unknown> | undefined,
|
|
1913
|
-
opts: ctx.opts as Record<string, unknown> | undefined,
|
|
1914
|
-
})
|
|
1915
|
-
: undefined;
|
|
1916
|
-
if (normalized.requiresOrg && ctx.apiClient) {
|
|
1917
|
-
ctx.orgId = hasPrefixedId3
|
|
1918
|
-
? prefixedOrgId3
|
|
1919
|
-
: await requireOrg(
|
|
1920
|
-
ctx as CommandContext & { apiClient: APIClientType },
|
|
1921
|
-
autoSelectOrg3
|
|
1922
|
-
);
|
|
1923
|
-
}
|
|
1924
|
-
// Skip org handling if --no-register is set (org only needed for registration)
|
|
1925
|
-
const skipOrg =
|
|
1926
|
-
normalized.optionalOrg &&
|
|
1927
|
-
!normalized.requiresOrg &&
|
|
1928
|
-
ctx.opts &&
|
|
1929
|
-
(ctx.opts as Record<string, unknown>).register === false;
|
|
1930
|
-
|
|
1931
|
-
if (normalized.optionalOrg && ctx.apiClient && auth && !skipOrg) {
|
|
1932
|
-
ctx.orgId = hasPrefixedId3
|
|
1933
|
-
? prefixedOrgId3
|
|
1934
|
-
: await selectOptionalOrg(
|
|
1935
|
-
ctx as CommandContext & { apiClient?: APIClientType; auth?: AuthData },
|
|
1936
|
-
autoSelectOrg3
|
|
1937
|
-
);
|
|
1938
|
-
baseCtx.logger.trace('selected orgId: %s', ctx.orgId);
|
|
1939
|
-
}
|
|
1940
|
-
// Skip region handling if --no-register is set (region only needed for registration)
|
|
1941
|
-
const skipRegion =
|
|
1942
|
-
normalized.optionalRegion &&
|
|
1943
|
-
!normalized.requiresRegion &&
|
|
1944
|
-
ctx.opts &&
|
|
1945
|
-
(ctx.opts as Record<string, unknown>).register === false;
|
|
1946
|
-
|
|
1947
|
-
if (
|
|
1948
|
-
(normalized.requiresRegion || normalized.optionalRegion) &&
|
|
1949
|
-
ctx.apiClient &&
|
|
1950
|
-
auth &&
|
|
1951
|
-
!skipRegion
|
|
1952
|
-
) {
|
|
1953
|
-
const apiClient: APIClientType = ctx.apiClient as APIClientType;
|
|
1954
|
-
const regions = await tui.spinner({
|
|
1955
|
-
message: 'Fetching cloud regions',
|
|
1956
|
-
clearOnSuccess: true,
|
|
1957
|
-
callback: async () => {
|
|
1958
|
-
return fetchRegionsWithCache(
|
|
1959
|
-
baseCtx.config?.name ?? defaultProfileName,
|
|
1960
|
-
apiClient,
|
|
1961
|
-
baseCtx.logger
|
|
1962
|
-
);
|
|
1963
|
-
},
|
|
1964
|
-
});
|
|
1965
|
-
const region = await resolveRegion({
|
|
1966
|
-
options: options as Record<string, unknown>,
|
|
1967
|
-
args: ctx.args as Record<string, unknown> | undefined,
|
|
1968
|
-
regions,
|
|
1969
|
-
logger: baseCtx.logger,
|
|
1970
|
-
required: !!normalized.requiresRegion,
|
|
1971
|
-
region: project?.region,
|
|
1972
|
-
config: baseCtx.config ?? null,
|
|
1973
|
-
});
|
|
1974
|
-
if (region) {
|
|
1975
|
-
ctx.region = region;
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
await executeOrValidate(
|
|
1979
|
-
ctx as CommandContext,
|
|
1980
|
-
getFullCommandPath(cmd),
|
|
1981
|
-
subcommand.handler,
|
|
1982
|
-
!!subcommand.schema?.response,
|
|
1983
|
-
subcommand.webUrl
|
|
1984
|
-
);
|
|
1985
|
-
} catch (error) {
|
|
1986
|
-
if (isCLIValidationError(error)) {
|
|
1987
|
-
handleValidationError(error, getFullCommandPath(cmd), baseCtx);
|
|
1988
|
-
}
|
|
1989
|
-
handleProjectConfigError(
|
|
1990
|
-
error,
|
|
1991
|
-
normalized.requiresProject,
|
|
1992
|
-
baseCtx.logger,
|
|
1993
|
-
baseCtx.options.errorFormat
|
|
1994
|
-
);
|
|
1995
|
-
}
|
|
1996
|
-
} else {
|
|
1997
|
-
const ctx: Record<string, unknown> = {
|
|
1998
|
-
...baseCtx,
|
|
1999
|
-
config: auth
|
|
2000
|
-
? {
|
|
2001
|
-
...(baseCtx.config ?? {}),
|
|
2002
|
-
auth: {
|
|
2003
|
-
api_key: auth.apiKey,
|
|
2004
|
-
user_id: auth.userId,
|
|
2005
|
-
expires: auth.expires.getTime(),
|
|
2006
|
-
},
|
|
2007
|
-
}
|
|
2008
|
-
: baseCtx.config,
|
|
2009
|
-
auth,
|
|
2010
|
-
};
|
|
2011
|
-
if (project || projectDir) {
|
|
2012
|
-
if (project) {
|
|
2013
|
-
ctx.project = project;
|
|
2014
|
-
}
|
|
2015
|
-
ctx.projectDir = projectDir;
|
|
2016
|
-
}
|
|
2017
|
-
if (normalized.requiresAPIClient) {
|
|
2018
|
-
// Recreate apiClient with auth credentials if auth was provided
|
|
2019
|
-
ctx.apiClient = createAPIClient(baseCtx, ctx.config as Config | null);
|
|
2020
|
-
}
|
|
2021
|
-
// Auto-select org when --confirm flag is used
|
|
2022
|
-
const autoSelectOrg4 = options.confirm === true;
|
|
2023
|
-
const hasPrefixedId4 = hasPrefixedResourceId(args as unknown[]);
|
|
2024
|
-
const prefixedOrgId4 = hasPrefixedId4
|
|
2025
|
-
? await resolveOrgIdWithoutPrompt({
|
|
2026
|
-
options,
|
|
2027
|
-
config: (ctx.config as Config | null) ?? null,
|
|
2028
|
-
args: args as unknown[],
|
|
2029
|
-
})
|
|
2030
|
-
: undefined;
|
|
2031
|
-
if (normalized.requiresOrg && ctx.apiClient) {
|
|
2032
|
-
ctx.orgId = hasPrefixedId4
|
|
2033
|
-
? prefixedOrgId4
|
|
2034
|
-
: await requireOrg(
|
|
2035
|
-
ctx as CommandContext & { apiClient: APIClientType },
|
|
2036
|
-
autoSelectOrg4
|
|
2037
|
-
);
|
|
2038
|
-
}
|
|
2039
|
-
// Skip org handling if --no-register is set (org only needed for registration)
|
|
2040
|
-
// For non-schema commands, check options directly (Commander passes all options)
|
|
2041
|
-
const skipOrg =
|
|
2042
|
-
normalized.optionalOrg &&
|
|
2043
|
-
!normalized.requiresOrg &&
|
|
2044
|
-
(options as Record<string, unknown>).register === false;
|
|
2045
|
-
|
|
2046
|
-
if (normalized.optionalOrg && ctx.apiClient && !skipOrg) {
|
|
2047
|
-
ctx.orgId = hasPrefixedId4
|
|
2048
|
-
? prefixedOrgId4
|
|
2049
|
-
: await selectOptionalOrg(
|
|
2050
|
-
ctx as CommandContext & { apiClient?: APIClientType; auth?: AuthData },
|
|
2051
|
-
autoSelectOrg4
|
|
2052
|
-
);
|
|
2053
|
-
}
|
|
2054
|
-
// Skip region handling if --no-register is set (region only needed for registration)
|
|
2055
|
-
const skipRegion =
|
|
2056
|
-
normalized.optionalRegion &&
|
|
2057
|
-
!normalized.requiresRegion &&
|
|
2058
|
-
(options as Record<string, unknown>).register === false;
|
|
2059
|
-
|
|
2060
|
-
if (
|
|
2061
|
-
(normalized.requiresRegion || normalized.optionalRegion) &&
|
|
2062
|
-
ctx.apiClient &&
|
|
2063
|
-
!skipRegion
|
|
2064
|
-
) {
|
|
2065
|
-
const apiClient: APIClientType = ctx.apiClient as APIClientType;
|
|
2066
|
-
const regions = await tui.spinner({
|
|
2067
|
-
message: 'Fetching cloud regions',
|
|
2068
|
-
clearOnSuccess: true,
|
|
2069
|
-
callback: async () => {
|
|
2070
|
-
return fetchRegionsWithCache(
|
|
2071
|
-
baseCtx.config?.name ?? defaultProfileName,
|
|
2072
|
-
apiClient,
|
|
2073
|
-
baseCtx.logger
|
|
2074
|
-
);
|
|
2075
|
-
},
|
|
2076
|
-
});
|
|
2077
|
-
const region = await resolveRegion({
|
|
2078
|
-
options: options as Record<string, unknown>,
|
|
2079
|
-
args: args as unknown[],
|
|
2080
|
-
regions,
|
|
2081
|
-
logger: baseCtx.logger,
|
|
2082
|
-
required: !!normalized.requiresRegion,
|
|
2083
|
-
region: project?.region,
|
|
2084
|
-
config: baseCtx.config ?? null,
|
|
2085
|
-
});
|
|
2086
|
-
if (region) {
|
|
2087
|
-
ctx.region = region;
|
|
2088
|
-
}
|
|
2089
|
-
}
|
|
2090
|
-
if (subcommand.handler) {
|
|
2091
|
-
const result = await subcommand.handler(ctx as CommandContext);
|
|
2092
|
-
// Render "View on the web" link after successful execution (not shown on errors)
|
|
2093
|
-
maybeRenderWebLink(ctx as CommandContext, subcommand.webUrl);
|
|
2094
|
-
|
|
2095
|
-
// If --json flag is set
|
|
2096
|
-
if (baseCtx.options.json) {
|
|
2097
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2098
|
-
const hasResponseSchema = !!(subcommand as any).schema?.response;
|
|
2099
|
-
|
|
2100
|
-
// If command has a response schema but returned nothing, that's an error
|
|
2101
|
-
if (hasResponseSchema && result === undefined) {
|
|
2102
|
-
const { createError, exitWithError, ErrorCode } = await import('./errors');
|
|
2103
|
-
exitWithError(
|
|
2104
|
-
createError(
|
|
2105
|
-
ErrorCode.INTERNAL_ERROR,
|
|
2106
|
-
`Command '${getFullCommandPath(cmd)}' declares a response schema but returned no data. This is a bug in the command implementation.`
|
|
2107
|
-
),
|
|
2108
|
-
baseCtx.logger,
|
|
2109
|
-
baseCtx.options.errorFormat
|
|
2110
|
-
);
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
// Output the result as JSON if we have data
|
|
2114
|
-
if (result !== undefined) {
|
|
2115
|
-
const { outputJSON } = await import('./output');
|
|
2116
|
-
outputJSON(result);
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
} else {
|
|
2122
|
-
if (subcommand.schema) {
|
|
2123
|
-
try {
|
|
2124
|
-
// Check if command uses stdin (don't auto-confirm if it does)
|
|
2125
|
-
const usesStdin = subcommand.tags?.includes('uses-stdin') ?? false;
|
|
2126
|
-
const input = await buildValidationInputAsync(
|
|
2127
|
-
subcommand.schema,
|
|
2128
|
-
args,
|
|
2129
|
-
options,
|
|
2130
|
-
{
|
|
2131
|
-
usesStdin,
|
|
2132
|
-
},
|
|
2133
|
-
baseCtx.options.input
|
|
2134
|
-
);
|
|
2135
|
-
const ctx: Record<string, unknown> = {
|
|
2136
|
-
...baseCtx,
|
|
2137
|
-
};
|
|
2138
|
-
if (project || projectDir) {
|
|
2139
|
-
if (project) {
|
|
2140
|
-
ctx.project = project;
|
|
2141
|
-
}
|
|
2142
|
-
ctx.projectDir = projectDir;
|
|
2143
|
-
}
|
|
2144
|
-
if (subcommand.schema.args) {
|
|
2145
|
-
ctx.args = parseArgs(subcommand.schema.args, input.args);
|
|
2146
|
-
}
|
|
2147
|
-
if (subcommand.schema.options) {
|
|
2148
|
-
ctx.opts = parseOptions(subcommand.schema.options, input.options);
|
|
2149
|
-
}
|
|
2150
|
-
if (normalized.requiresAPIClient && !ctx.apiClient) {
|
|
2151
|
-
ctx.apiClient = createAPIClient(baseCtx, ctx.config as Config | null);
|
|
2152
|
-
}
|
|
2153
|
-
// Auto-select org when --confirm flag is used
|
|
2154
|
-
const autoSelectOrg5 = options.confirm === true;
|
|
2155
|
-
if (normalized.requiresOrg && ctx.apiClient) {
|
|
2156
|
-
ctx.orgId = await requireOrg(
|
|
2157
|
-
ctx as CommandContext & { apiClient: APIClientType },
|
|
2158
|
-
autoSelectOrg5
|
|
2159
|
-
);
|
|
2160
|
-
}
|
|
2161
|
-
if (normalized.optionalOrg && ctx.apiClient && ctx.auth) {
|
|
2162
|
-
ctx.orgId = await requireOrg(
|
|
2163
|
-
ctx as CommandContext & { apiClient: APIClientType },
|
|
2164
|
-
autoSelectOrg5
|
|
2165
|
-
);
|
|
2166
|
-
}
|
|
2167
|
-
await executeOrValidate(
|
|
2168
|
-
ctx as CommandContext,
|
|
2169
|
-
getFullCommandPath(cmd),
|
|
2170
|
-
subcommand.handler,
|
|
2171
|
-
!!subcommand.schema?.response,
|
|
2172
|
-
subcommand.webUrl
|
|
2173
|
-
);
|
|
2174
|
-
} catch (error) {
|
|
2175
|
-
if (isCLIValidationError(error)) {
|
|
2176
|
-
handleValidationError(error, getFullCommandPath(cmd), baseCtx);
|
|
2177
|
-
}
|
|
2178
|
-
handleProjectConfigError(
|
|
2179
|
-
error,
|
|
2180
|
-
normalized.requiresProject,
|
|
2181
|
-
baseCtx.logger,
|
|
2182
|
-
baseCtx.options.errorFormat
|
|
2183
|
-
);
|
|
2184
|
-
}
|
|
2185
|
-
} else {
|
|
2186
|
-
const ctx: Record<string, unknown> = {
|
|
2187
|
-
...baseCtx,
|
|
2188
|
-
};
|
|
2189
|
-
if (project || projectDir) {
|
|
2190
|
-
if (project) {
|
|
2191
|
-
ctx.project = project;
|
|
2192
|
-
}
|
|
2193
|
-
ctx.projectDir = projectDir;
|
|
2194
|
-
}
|
|
2195
|
-
if (normalized.requiresAPIClient && !ctx.apiClient) {
|
|
2196
|
-
ctx.apiClient = createAPIClient(baseCtx, ctx.config as Config | null);
|
|
2197
|
-
}
|
|
2198
|
-
// Auto-select org when --confirm flag is used
|
|
2199
|
-
const autoSelectOrg6 = options.confirm === true;
|
|
2200
|
-
if (normalized.requiresOrg && ctx.apiClient) {
|
|
2201
|
-
ctx.orgId = await requireOrg(
|
|
2202
|
-
ctx as CommandContext & { apiClient: APIClientType },
|
|
2203
|
-
autoSelectOrg6
|
|
2204
|
-
);
|
|
2205
|
-
}
|
|
2206
|
-
if (normalized.optionalOrg && ctx.apiClient && ctx.auth) {
|
|
2207
|
-
ctx.orgId = await requireOrg(
|
|
2208
|
-
ctx as CommandContext & { apiClient: APIClientType },
|
|
2209
|
-
autoSelectOrg6
|
|
2210
|
-
);
|
|
2211
|
-
}
|
|
2212
|
-
if ((normalized.requiresRegion || normalized.optionalRegion) && ctx.apiClient) {
|
|
2213
|
-
const apiClient: APIClientType = ctx.apiClient as APIClientType;
|
|
2214
|
-
const regions = await tui.spinner({
|
|
2215
|
-
message: 'Fetching cloud regions',
|
|
2216
|
-
clearOnSuccess: true,
|
|
2217
|
-
callback: async () => {
|
|
2218
|
-
return fetchRegionsWithCache(
|
|
2219
|
-
baseCtx.config?.name ?? defaultProfileName,
|
|
2220
|
-
apiClient,
|
|
2221
|
-
baseCtx.logger
|
|
2222
|
-
);
|
|
2223
|
-
},
|
|
2224
|
-
});
|
|
2225
|
-
const region = await resolveRegion({
|
|
2226
|
-
options: options as Record<string, unknown>,
|
|
2227
|
-
args: args as unknown[],
|
|
2228
|
-
regions,
|
|
2229
|
-
logger: baseCtx.logger,
|
|
2230
|
-
required: !!normalized.requiresRegion,
|
|
2231
|
-
region: project?.region,
|
|
2232
|
-
config: baseCtx.config ?? null,
|
|
2233
|
-
});
|
|
2234
|
-
if (region) {
|
|
2235
|
-
ctx.region = region;
|
|
2236
|
-
}
|
|
2237
|
-
}
|
|
2238
|
-
if (subcommand.handler) {
|
|
2239
|
-
const result = await subcommand.handler(ctx as CommandContext);
|
|
2240
|
-
// Render "View on the web" link after successful execution (not shown on errors)
|
|
2241
|
-
maybeRenderWebLink(ctx as CommandContext, subcommand.webUrl);
|
|
2242
|
-
|
|
2243
|
-
// If --json flag is set
|
|
2244
|
-
if (baseCtx.options.json) {
|
|
2245
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2246
|
-
const hasResponseSchema = !!(subcommand as any).schema?.response;
|
|
2247
|
-
|
|
2248
|
-
// If command has a response schema but returned nothing, that's an error
|
|
2249
|
-
if (hasResponseSchema && result === undefined) {
|
|
2250
|
-
const { createError, exitWithError, ErrorCode } = await import('./errors');
|
|
2251
|
-
exitWithError(
|
|
2252
|
-
createError(
|
|
2253
|
-
ErrorCode.INTERNAL_ERROR,
|
|
2254
|
-
`Command '${getFullCommandPath(cmd)}' declares a response schema but returned no data. This is a bug in the command implementation.`
|
|
2255
|
-
),
|
|
2256
|
-
baseCtx.logger,
|
|
2257
|
-
baseCtx.options.errorFormat
|
|
2258
|
-
);
|
|
2259
|
-
}
|
|
2260
|
-
|
|
2261
|
-
// Output the result as JSON if we have data
|
|
2262
|
-
if (result !== undefined) {
|
|
2263
|
-
const { outputJSON } = await import('./output');
|
|
2264
|
-
outputJSON(result);
|
|
2265
|
-
}
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
}
|
|
2269
|
-
}
|
|
2270
|
-
});
|
|
2271
|
-
}
|
|
2272
|
-
|
|
2273
|
-
export async function registerCommands(
|
|
2274
|
-
program: Command,
|
|
2275
|
-
commands: CommandDefinition[],
|
|
2276
|
-
baseCtx: CommandContext
|
|
2277
|
-
): Promise<void> {
|
|
2278
|
-
for (const cmdDef of commands) {
|
|
2279
|
-
if (cmdDef.subcommands) {
|
|
2280
|
-
const cmd = program
|
|
2281
|
-
.command(cmdDef.name, { hidden: cmdDef.hidden })
|
|
2282
|
-
.description(cmdDef.description);
|
|
2283
|
-
|
|
2284
|
-
cmd.helpOption('-h, --help [json]', 'Display help (with optional JSON output)');
|
|
2285
|
-
|
|
2286
|
-
if (cmdDef.aliases) {
|
|
2287
|
-
cmd.aliases(cmdDef.aliases);
|
|
2288
|
-
}
|
|
2289
|
-
|
|
2290
|
-
// Add examples to help text (skip in JSON mode)
|
|
2291
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2292
|
-
const examples = (cmdDef as any).examples as
|
|
2293
|
-
| Array<{ command: string; description: string }>
|
|
2294
|
-
| undefined;
|
|
2295
|
-
if (examples && examples.length > 0) {
|
|
2296
|
-
// Store examples for JSON help generation
|
|
2297
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2298
|
-
(cmd as any)._examples = examples;
|
|
2299
|
-
|
|
2300
|
-
// Add formatted examples to text help
|
|
2301
|
-
cmd.addHelpText('after', () => {
|
|
2302
|
-
// Skip examples in JSON mode
|
|
2303
|
-
const args = process.argv.slice(2);
|
|
2304
|
-
const helpIndex = args.findIndex((a) => a === '--help' || a === '-h');
|
|
2305
|
-
if (helpIndex !== -1 && args[helpIndex + 1] === 'json') {
|
|
2306
|
-
return '';
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
const maxLength = Math.max(...examples.map((ex) => ex.command.length));
|
|
2310
|
-
const formatted = examples.map((ex) => {
|
|
2311
|
-
const padding = ' '.repeat(maxLength - ex.command.length + 1);
|
|
2312
|
-
return ` ${tui.colorPrimary(ex.command)}${padding}${tui.muted('#')} ${tui.muted(ex.description)}`;
|
|
2313
|
-
});
|
|
2314
|
-
return `\n${tui.colorPrimary('\x1b[4mExamples:\x1b[24m')}\n` + formatted.join('\n');
|
|
2315
|
-
});
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
if (cmdDef.handler) {
|
|
2319
|
-
cmd.action(async () => {
|
|
2320
|
-
// Handle --describe mode: output command schema and exit
|
|
2321
|
-
if (baseCtx.options.describe) {
|
|
2322
|
-
const { extractCommandSchema } = await import('./schema-generator');
|
|
2323
|
-
const schema = extractCommandSchema(cmdDef);
|
|
2324
|
-
const { outputJSON } = await import('./output');
|
|
2325
|
-
outputJSON(schema);
|
|
2326
|
-
return;
|
|
2327
|
-
}
|
|
2328
|
-
|
|
2329
|
-
if (cmdDef.banner) {
|
|
2330
|
-
showBanner();
|
|
2331
|
-
}
|
|
2332
|
-
|
|
2333
|
-
const normalized = normalizeReqs(cmdDef);
|
|
2334
|
-
if (normalized.requiresAuth) {
|
|
2335
|
-
// Create apiClient before requireAuth since login command needs it
|
|
2336
|
-
if (normalized.requiresAPIClient) {
|
|
2337
|
-
(baseCtx as Record<string, unknown>).apiClient = createAPIClient(
|
|
2338
|
-
baseCtx,
|
|
2339
|
-
baseCtx.config ?? null
|
|
2340
|
-
);
|
|
2341
|
-
}
|
|
2342
|
-
|
|
2343
|
-
const auth = await requireAuth(baseCtx as CommandContext<undefined>);
|
|
2344
|
-
const ctx: Record<string, unknown> = {
|
|
2345
|
-
...baseCtx,
|
|
2346
|
-
config: baseCtx.config
|
|
2347
|
-
? {
|
|
2348
|
-
...baseCtx.config,
|
|
2349
|
-
name: baseCtx.config.name ?? defaultProfileName,
|
|
2350
|
-
auth: {
|
|
2351
|
-
api_key: auth.apiKey,
|
|
2352
|
-
user_id: auth.userId,
|
|
2353
|
-
expires: auth.expires.getTime(),
|
|
2354
|
-
},
|
|
2355
|
-
}
|
|
2356
|
-
: null,
|
|
2357
|
-
auth,
|
|
2358
|
-
};
|
|
2359
|
-
if (normalized.requiresAPIClient) {
|
|
2360
|
-
// Recreate apiClient with auth credentials
|
|
2361
|
-
ctx.apiClient = createAPIClient(baseCtx, ctx.config as Config | null);
|
|
2362
|
-
}
|
|
2363
|
-
if ((normalized.requiresRegion || normalized.optionalRegion) && ctx.apiClient) {
|
|
2364
|
-
const apiClient: APIClientType = ctx.apiClient as APIClientType;
|
|
2365
|
-
const regions = await tui.spinner({
|
|
2366
|
-
message: 'Fetching cloud regions',
|
|
2367
|
-
clearOnSuccess: true,
|
|
2368
|
-
callback: async () => {
|
|
2369
|
-
return fetchRegionsWithCache(
|
|
2370
|
-
baseCtx.config?.name ?? defaultProfileName,
|
|
2371
|
-
apiClient,
|
|
2372
|
-
baseCtx.logger
|
|
2373
|
-
);
|
|
2374
|
-
},
|
|
2375
|
-
});
|
|
2376
|
-
const region = await resolveRegion({
|
|
2377
|
-
options: baseCtx.options as unknown as Record<string, unknown>,
|
|
2378
|
-
regions,
|
|
2379
|
-
logger: baseCtx.logger,
|
|
2380
|
-
required: !!normalized.requiresRegion,
|
|
2381
|
-
config: baseCtx.config ?? null,
|
|
2382
|
-
});
|
|
2383
|
-
if (region) {
|
|
2384
|
-
ctx.region = region;
|
|
2385
|
-
}
|
|
2386
|
-
}
|
|
2387
|
-
await cmdDef.handler!(ctx as CommandContext);
|
|
2388
|
-
} else if (normalized.optionalAuth) {
|
|
2389
|
-
const continueText =
|
|
2390
|
-
typeof normalized.optionalAuth === 'string'
|
|
2391
|
-
? normalized.optionalAuth
|
|
2392
|
-
: undefined;
|
|
2393
|
-
|
|
2394
|
-
// Create apiClient before optionalAuth since login command needs it
|
|
2395
|
-
if (normalized.requiresAPIClient) {
|
|
2396
|
-
(baseCtx as Record<string, unknown>).apiClient = createAPIClient(
|
|
2397
|
-
baseCtx,
|
|
2398
|
-
baseCtx.config ?? null
|
|
2399
|
-
);
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
const auth = await optionalAuth(
|
|
2403
|
-
baseCtx as CommandContext<undefined>,
|
|
2404
|
-
continueText
|
|
2405
|
-
);
|
|
2406
|
-
const ctx: Record<string, unknown> = {
|
|
2407
|
-
...baseCtx,
|
|
2408
|
-
config: auth
|
|
2409
|
-
? baseCtx.config
|
|
2410
|
-
? {
|
|
2411
|
-
...baseCtx.config,
|
|
2412
|
-
auth: {
|
|
2413
|
-
api_key: auth.apiKey,
|
|
2414
|
-
user_id: auth.userId,
|
|
2415
|
-
expires: auth.expires.getTime(),
|
|
2416
|
-
},
|
|
2417
|
-
}
|
|
2418
|
-
: {
|
|
2419
|
-
auth: {
|
|
2420
|
-
api_key: auth.apiKey,
|
|
2421
|
-
user_id: auth.userId,
|
|
2422
|
-
expires: auth.expires.getTime(),
|
|
2423
|
-
},
|
|
2424
|
-
}
|
|
2425
|
-
: baseCtx.config,
|
|
2426
|
-
auth,
|
|
2427
|
-
};
|
|
2428
|
-
if (normalized.requiresAPIClient) {
|
|
2429
|
-
// Recreate apiClient with auth credentials if auth was provided
|
|
2430
|
-
ctx.apiClient = createAPIClient(baseCtx, ctx.config as Config | null);
|
|
2431
|
-
}
|
|
2432
|
-
if ((normalized.requiresRegion || normalized.optionalRegion) && ctx.apiClient) {
|
|
2433
|
-
const apiClient: APIClientType = ctx.apiClient as APIClientType;
|
|
2434
|
-
const regions = await tui.spinner({
|
|
2435
|
-
message: 'Fetching cloud regions',
|
|
2436
|
-
clearOnSuccess: true,
|
|
2437
|
-
callback: async () => {
|
|
2438
|
-
return fetchRegionsWithCache(
|
|
2439
|
-
baseCtx.config?.name ?? defaultProfileName,
|
|
2440
|
-
apiClient,
|
|
2441
|
-
baseCtx.logger
|
|
2442
|
-
);
|
|
2443
|
-
},
|
|
2444
|
-
});
|
|
2445
|
-
const region = await resolveRegion({
|
|
2446
|
-
options: baseCtx.options as unknown as Record<string, unknown>,
|
|
2447
|
-
regions,
|
|
2448
|
-
logger: baseCtx.logger,
|
|
2449
|
-
required: !!normalized.requiresRegion,
|
|
2450
|
-
config: baseCtx.config ?? null,
|
|
2451
|
-
});
|
|
2452
|
-
if (region) {
|
|
2453
|
-
ctx.region = region;
|
|
2454
|
-
}
|
|
2455
|
-
}
|
|
2456
|
-
await cmdDef.handler!(ctx as CommandContext);
|
|
2457
|
-
} else {
|
|
2458
|
-
const ctx: Record<string, unknown> = {
|
|
2459
|
-
...baseCtx,
|
|
2460
|
-
};
|
|
2461
|
-
if (normalized.requiresAPIClient && !(ctx as CommandContext).apiClient) {
|
|
2462
|
-
ctx.apiClient = createAPIClient(baseCtx, baseCtx.config);
|
|
2463
|
-
}
|
|
2464
|
-
if ((normalized.requiresRegion || normalized.optionalRegion) && ctx.apiClient) {
|
|
2465
|
-
const apiClient = ctx.apiClient as APIClientType;
|
|
2466
|
-
const regions = await tui.spinner({
|
|
2467
|
-
message: 'Fetching cloud regions',
|
|
2468
|
-
clearOnSuccess: true,
|
|
2469
|
-
callback: async () => {
|
|
2470
|
-
return fetchRegionsWithCache(
|
|
2471
|
-
baseCtx.config?.name ?? defaultProfileName,
|
|
2472
|
-
apiClient,
|
|
2473
|
-
baseCtx.logger
|
|
2474
|
-
);
|
|
2475
|
-
},
|
|
2476
|
-
});
|
|
2477
|
-
const region = await resolveRegion({
|
|
2478
|
-
options: baseCtx.options as unknown as Record<string, unknown>,
|
|
2479
|
-
regions,
|
|
2480
|
-
logger: baseCtx.logger,
|
|
2481
|
-
required: !!normalized.requiresRegion,
|
|
2482
|
-
config: baseCtx.config ?? null,
|
|
2483
|
-
});
|
|
2484
|
-
if (region) {
|
|
2485
|
-
ctx.region = region;
|
|
2486
|
-
}
|
|
2487
|
-
}
|
|
2488
|
-
await cmdDef.handler!(ctx as CommandContext);
|
|
2489
|
-
}
|
|
2490
|
-
});
|
|
2491
|
-
} else {
|
|
2492
|
-
cmd.action(() => cmd.help());
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
|
-
for (const sub of cmdDef.subcommands) {
|
|
2496
|
-
await registerSubcommand(cmd, sub, baseCtx);
|
|
2497
|
-
}
|
|
2498
|
-
|
|
2499
|
-
// Add a virtual 'help' subcommand for commands with subcommands
|
|
2500
|
-
cmd.command('help', { hidden: true })
|
|
2501
|
-
.description('Display help')
|
|
2502
|
-
.action(() => {
|
|
2503
|
-
cmd.help();
|
|
2504
|
-
});
|
|
2505
|
-
} else {
|
|
2506
|
-
await registerSubcommand(
|
|
2507
|
-
program,
|
|
2508
|
-
cmdDef as unknown as SubcommandDefinition,
|
|
2509
|
-
baseCtx,
|
|
2510
|
-
cmdDef.hidden
|
|
2511
|
-
);
|
|
2512
|
-
}
|
|
2513
|
-
}
|
|
2514
|
-
}
|