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:
@@ -53,6 +53,7 @@ describe('Fleet Routes', () => {
|
||||
it('returns empty array when session manager has no active sessions', async () => {
|
||||
const mockManager = {
|
||||
getActive: () => [],
|
||||
getMaxSessions: () => 100,
|
||||
};
|
||||
server = createTestServer(mockManager);
|
||||
const res = await server.inject({ method: 'GET', url: '/api/fleet' });
|
||||
@@ -61,7 +62,7 @@ describe('Fleet Routes', () => {
|
||||
const body = res.json();
|
||||
expect(body.sessions).toEqual([]);
|
||||
expect(body.count).toBe(0);
|
||||
expect(body.maxSessions).toBe(10); // FREE (Solo) session cap — raised from 3 in the 2026-07-05 Solo-vs-Team migration
|
||||
expect(body.maxSessions).toBe(100); // reported from the session manager
|
||||
});
|
||||
|
||||
it('returns agent status when sessions exist', async () => {
|
||||
@@ -83,6 +84,7 @@ describe('Fleet Routes', () => {
|
||||
lastActivity: now - 60000,
|
||||
},
|
||||
],
|
||||
getMaxSessions: () => 100,
|
||||
};
|
||||
server = createTestServer(mockManager);
|
||||
const res = await server.inject({ method: 'GET', url: '/api/fleet' });
|
||||
@@ -90,7 +92,7 @@ describe('Fleet Routes', () => {
|
||||
expect(res.statusCode).toBe(200);
|
||||
const body = res.json();
|
||||
expect(body.count).toBe(2);
|
||||
expect(body.maxSessions).toBe(10); // FREE (Solo) session cap — raised from 3 in the 2026-07-05 Solo-vs-Team migration
|
||||
expect(body.maxSessions).toBe(100); // reported from the session manager
|
||||
expect(body.sessions).toHaveLength(2);
|
||||
|
||||
// First session
|
||||
|
||||
Reference in New Issue
Block a user