Moves "pre-installed apps" from an env-var + npm-resolve model to a flag
on ApplicationRegistration. Admin registers an app once (via admin UI /
API), flips `autoInstallOnNewWorkspaces`, and the new-workspace hook +
backfill command install it everywhere. This mirrors how AppExchange,
GitHub Apps, and similar ecosystems distribute apps — registration is
the install intent, not a deployment-time config.
Removed:
- `PRE_INSTALLED_APPS` env var + `parsePreInstalledApps` util
- `PreInstalledAppsService.ensureRegistrationsExist` (CDN fetch,
manifest resolution, upsert-from-catalog at boot)
- `seedServerVariablesFromEnv` (server variables are managed per-
registration, same as any other app)
- `MarketplaceService.fetchLatestVersionFromRegistry` (dead code with
env-var path gone; addresses review feedback to fix the root cause
rather than branching the registry-fetch flow)
Added:
- `autoInstallOnNewWorkspaces` column on ApplicationRegistration
(fast instance migration, default false)
Also:
- Moves `app-billing/` from `application/` to `billing/` (per review
feedback — it's a billing submodule, not an application submodule)
- Drops obvious comments on the billing controller
- Documents why `unit` and `operationType` on ChargeDto are not
redundant (per review question)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>