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:
@@ -310,9 +310,11 @@ describe('WorkspaceSessionManager — Phase A.1 concurrency invariants', () => {
|
||||
expect(statsB.frameCount).toBeGreaterThanOrEqual(1);
|
||||
});
|
||||
|
||||
it('composes the FREE cap, concurrent same-workspace planning isolation, bounded cache, and cleanup', async () => {
|
||||
it('composes the session cap, concurrent same-workspace planning isolation, bounded cache, and cleanup', async () => {
|
||||
const dataDir = fs.mkdtempSync(path.join(os.tmpdir(), 'waggle-solo-session-composition-'));
|
||||
const server = await buildLocalServer({ dataDir, tier: 'FREE' });
|
||||
const server = await buildLocalServer({ dataDir });
|
||||
// A small cap keeps the overflow check cheap; the sidecar default is MAX_WORKSPACE_SESSIONS.
|
||||
server.sessionManager.setMaxSessions(10);
|
||||
const workspaceId = server.agentState.activeWorkspaceId;
|
||||
expect(workspaceId).toBeTruthy();
|
||||
|
||||
@@ -440,7 +442,6 @@ describe('WorkspaceSessionManager — Phase A.1 concurrency invariants', () => {
|
||||
});
|
||||
|
||||
try {
|
||||
expect(server.localConfig.tier).toBe('FREE');
|
||||
expect(server.sessionManager.getMaxSessions()).toBe(10);
|
||||
expect(server.sessionManager.size).toBe(0);
|
||||
expect(server.mindCache.keys()).toEqual([workspaceId]);
|
||||
|
||||
Reference in New Issue
Block a user