Skip to content

feat(framework): --deploy actually ships via real deploy targets#170

Merged
suleimansh merged 1 commit into
mainfrom
suleimansh/feat/framework-real-deploy
Jul 3, 2026
Merged

feat(framework): --deploy actually ships via real deploy targets#170
suleimansh merged 1 commit into
mainfrom
suleimansh/feat/framework-real-deploy

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Follow-up to #166. framework --deploy <target> now ships the app instead of narrating a plan-only decision, by wiring the deploy targets that already exist in @gemstack/ai-autopilot.

  • --deploy cloudflare runs install/build/wrangler in the agent's workspace (SSR to Workers, SSG/SPA to Pages). It needs a host executor bound to that cwd because LocalRunner can't be reused here (it mkdtemps a fresh dir and deletes it on dispose) - so this adds hostExecutor.
  • --deploy dokploy is a fetch to a self-hosted instance (--dokploy-url + --dokploy-app required).
  • Any other --deploy <name> just narrates the decision, as before.

Creds come from the env (CLOUDFLARE_API_TOKEN / DOKPLOY_AUTH_TOKEN); the targets never throw on missing config, they report { deployed: false }. --fake stays plan-only and deterministic.

New pieces: hostExecutor, the deployWith step, runFramework({ deployTarget }), and the CLI flags. 34 tests, full-repo typecheck + build green; verified --help, the fake e2e, and the dokploy-misconfig error path. Live cloudflare/dokploy shipping is infra-gated (needs a token). Changeset included.

Wire ai-autopilot's cloudflareTarget/dokployTarget into the framework CLI so
--deploy cloudflare / --deploy dokploy execute the deploy, not just narrate a
plan-only decision.

- hostExecutor: a DeployExecutor that runs commands (wrangler) in the agent's
  host workspace (LocalRunner can't - it mkdtemps a fresh dir and deletes it)
- deployWith step: run a real DeployTarget against the decided plan
- runFramework: optional deployTarget executes the plan; else plan-only narrate
- CLI: --cf-project / --dokploy-url / --dokploy-app; dokploy config validated
- --fake stays plan-only and deterministic

Targets never throw on missing creds (report { deployed: false }). 34 tests;
--help + fake e2e + dokploy-misconfig verified.
@suleimansh suleimansh added enhancement New feature or request priority: medium Worth doing, not urgent labels Jul 3, 2026
@suleimansh suleimansh self-assigned this Jul 3, 2026
@suleimansh suleimansh merged commit 779b0da into main Jul 3, 2026
2 checks passed
@suleimansh suleimansh deleted the suleimansh/feat/framework-real-deploy branch July 3, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Worth doing, not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant