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

@@ -1,8 +1,5 @@
/**
* P1a route wrapper — `/approvals` → ApprovalsApp (bare mount, Desktop.tsx:462).
* D5: route registered for everyone; the NAV entry carries minBillingTier
* 'TEAMS' exactly as the dock entry does (dock-tiers.ts) — tier-hidden, not
* stripped (§1.1).
*/
import ApprovalsApp from '@/components/os/apps/ApprovalsApp';
import SurfaceBoundary from './SurfaceBoundary';

View File

@@ -1,13 +0,0 @@
/** PR7a route wrapper — `/payment-success` → PaymentSuccessApp (post-Stripe-Checkout
* landing; `checkout.ts:42` success_url). AppShell child: the user is back inside the
* app after the hosted redirect. */
import PaymentSuccessApp from '@/components/os/apps/PaymentSuccessApp';
import SurfaceBoundary from './SurfaceBoundary';
const PaymentSuccessRoute = () => (
<SurfaceBoundary appName="Payment">
<PaymentSuccessApp />
</SurfaceBoundary>
);
export default PaymentSuccessRoute;

View File

@@ -1,7 +1,7 @@
/**
* P1a route wrapper — `/team` → TeamGovernanceApp (bare mount, Desktop.tsx:466).
* Reserved (§1.1): renders the legacy app for TEAMS+; FREE/PRO never see the
* nav zone (filterByBillingTier parity). No new Team work (D5).
* Reserved (§1.1): no nav entry points here — team mode is not shipped
* (ADR-0003). No new Team work (D5).
*/
import TeamGovernanceApp from '@/components/os/apps/TeamGovernanceApp';
import SurfaceBoundary from './SurfaceBoundary';

View File

@@ -15,11 +15,11 @@ import { ChatSlot } from '@/components/os/ChatHost';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
// The warm-Hive 6-tab bar + `tasks` (deep-link-reachable, not shown in the bar
// The warm-Hive 5-tab bar + `tasks` (deep-link-reachable, not shown in the bar
// — the Overview "Up next" card routes to it). Dropped Research/Timeline/
// Settings fall through to the overview default instead of an empty panel.
const WS_TABS: readonly WorkspaceTabId[] = [
'overview', 'chat', 'memory', 'artifacts', 'files', 'team', 'tasks',
'overview', 'chat', 'memory', 'artifacts', 'files', 'tasks',
];
const WorkspaceRoute = () => {

View File

@@ -57,7 +57,5 @@ export { default as UsageRoute } from './UsageRoute';
export { default as BenchmarkRoute } from './BenchmarkRoute';
export { default as PlatformRoute } from './PlatformRoute';
export { default as WorkspacesRoute } from './WorkspacesRoute';
// PR7a — post-Stripe-Checkout landing (success_url; checkout.ts:42)
export { default as PaymentSuccessRoute } from './PaymentSuccessRoute';
// PR7b — pre-shell /auth route (sibling outside AppShell)
export { default as AuthRoute } from './AuthRoute';