Commit d510c4e
feat: add subscription validation to CLI authentication (SPEC-13 Phase 2)
Implements subscription validation for CLI cloud login flow to ensure
only users with active subscriptions can access cloud features.
Changes:
- Add SubscriptionRequiredError exception for 403 subscription errors
- Update login flow to verify subscription before enabling cloud mode
- Support both FastAPI nested and flat error response formats
- Add comprehensive test coverage (6 tests, all passing)
- Update documentation with subscription prerequisites
Error Handling:
- Clean, user-friendly error messages (no traceback)
- Subscribe URL prominently displayed
- Clear next steps for users
Validation:
- Tested with unauthorized user (blocked as expected)
- Tested with authorized user (full access granted)
- All tests passing, zero type errors
Related: SPEC-13 CLI Authentication with Subscription Validation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent fc38877 commit d510c4e
5 files changed
Lines changed: 1766 additions & 25 deletions
File tree
- docs
- specs
- src/basic_memory/cli/commands/cloud
- tests/cli
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
15 | 24 | | |
16 | 25 | | |
17 | 26 | | |
| |||
474 | 483 | | |
475 | 484 | | |
476 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
477 | 506 | | |
478 | 507 | | |
479 | 508 | | |
| |||
0 commit comments