refactor: remove the billing tier model (P0.1)

The community edition has no monetization (ADR-0001). Remove the tier
model (packages/shared/src/tiers.ts), the requireTier middleware and every
tier gate, GET/PATCH /api/tier and the trial start, and the Stripe
integration, which depends on the tier model.

Personal features a tier used to limit are open to everyone: unlimited
workspaces and connectors, every embedding provider including LiteLLM,
per-workspace costs, Approvals. The workspace session cap is one constant
(100). Team and enterprise surfaces are hidden instead of unlocked (team
dock zone, Settings Team/Enterprise/Plan tabs, workspace Team tab);
cloud sync reports unavailable, as it did for free users.

The sidecar ignores the tier keys in config.json but does not delete them:
both editions may still share ~/.waggle.

Web billing UI is deleted: plan cards, upgrade and trial modals, payment
success route, the KVARK sales block, tier 403 handling.
This commit is contained in:
shumeiko.it
2026-10-15 19:31:50 +02:00
parent 369d8269c1
commit fe2eb0f648
117 changed files with 342 additions and 6424 deletions

View File

@@ -18,7 +18,6 @@ import { validateSkillMd } from '@waggle/sdk';
import { safeFetch, assertUrlAllowed, scanForInjection } from '@waggle/agent';
import { getKvarkConfig } from '../../kvark/kvark-config.js';
import { emitNotification } from './notifications.js';
import { requireTier } from '../../middleware/assert-tier.js';
import { loadMcpConfig, removeMcpServerEntry } from '../mcp-config.js';
import { enqueueHeldAction } from '../held-action-executor.js';
import { isMarketplaceBackgroundSyncDisabled } from '../marketplace-background-sync.js';
@@ -187,7 +186,7 @@ export async function marketplaceRoutes(fastify: FastifyInstance) {
// Returns enterprise packs that require KVARK. Only populated when
// KVARK credentials are configured in the vault.
fastify.get('/api/marketplace/enterprise-packs', { preHandler: [requireTier('ENTERPRISE')] }, async (request, reply) => {
fastify.get('/api/marketplace/enterprise-packs', async (request, reply) => {
const vault = fastify.vault;
const kvarkConfigured = vault ? getKvarkConfig(vault) !== null : false;