clsplusplus 7.0.0__tar.gz → 7.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/PKG-INFO +91 -17
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/README.md +88 -16
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/pyproject.toml +19 -2
- clsplusplus-7.2.4/src/clsplusplus/abuse_guard.py +486 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/api.py +1861 -164
- clsplusplus-7.2.4/src/clsplusplus/api_usage_analytics.py +237 -0
- clsplusplus-7.2.4/src/clsplusplus/config.py +355 -0
- clsplusplus-7.2.4/src/clsplusplus/cost_forecast.py +381 -0
- clsplusplus-7.2.4/src/clsplusplus/debug_console.py +194 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/demo_llm_calls.py +45 -9
- clsplusplus-7.2.4/src/clsplusplus/email_service.py +262 -0
- clsplusplus-7.2.4/src/clsplusplus/funnel_routes.py +95 -0
- clsplusplus-7.2.4/src/clsplusplus/geo.py +179 -0
- clsplusplus-7.2.4/src/clsplusplus/health_metrics.py +303 -0
- clsplusplus-7.2.4/src/clsplusplus/homepage_autopromote.py +293 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/local_routes.py +62 -52
- clsplusplus-7.2.4/src/clsplusplus/main.py +39 -0
- clsplusplus-7.2.4/src/clsplusplus/mcp_http.py +235 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/mcp_server.py +5 -1
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/memory_phase.py +17 -1
- clsplusplus-7.2.4/src/clsplusplus/metering_v2/__init__.py +51 -0
- clsplusplus-7.2.4/src/clsplusplus/metering_v2/__main__.py +32 -0
- clsplusplus-7.2.4/src/clsplusplus/metering_v2/billing.py +189 -0
- clsplusplus-7.2.4/src/clsplusplus/metering_v2/healthcheck.py +381 -0
- clsplusplus-7.2.4/src/clsplusplus/metering_v2/notifier.py +171 -0
- clsplusplus-7.2.4/src/clsplusplus/metering_v2/pricing.py +103 -0
- clsplusplus-7.2.4/src/clsplusplus/metering_v2/reconciler.py +291 -0
- clsplusplus-7.2.4/src/clsplusplus/metering_v2/schema.py +58 -0
- clsplusplus-7.2.4/src/clsplusplus/metering_v2/writer.py +176 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/metrics.py +50 -0
- clsplusplus-7.2.4/src/clsplusplus/middleware.py +628 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/models.py +13 -0
- clsplusplus-7.2.4/src/clsplusplus/oauth_server.py +444 -0
- clsplusplus-7.2.4/src/clsplusplus/pricing.py +284 -0
- clsplusplus-7.2.4/src/clsplusplus/pricing_models.py +204 -0
- clsplusplus-7.2.4/src/clsplusplus/pricing_store.py +209 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/prompt_log.py +9 -3
- clsplusplus-7.2.4/src/clsplusplus/rate_limit.py +112 -0
- clsplusplus-7.2.4/src/clsplusplus/razorpay_service.py +392 -0
- clsplusplus-7.2.4/src/clsplusplus/resilience.py +430 -0
- clsplusplus-7.2.4/src/clsplusplus/stores/chat_session_store.py +167 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/stores/integration_store.py +65 -2
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/stores/l0_working_buffer.py +3 -0
- clsplusplus-7.2.4/src/clsplusplus/stores/oauth_store.py +253 -0
- clsplusplus-7.2.4/src/clsplusplus/stores/user_store.py +771 -0
- clsplusplus-7.2.4/src/clsplusplus/stores/waitlist_store.py +259 -0
- clsplusplus-7.2.4/src/clsplusplus/stores/web_events_store.py +218 -0
- clsplusplus-7.2.4/src/clsplusplus/subscription_watchdog.py +118 -0
- clsplusplus-7.2.4/src/clsplusplus/tier_resolver.py +127 -0
- clsplusplus-7.2.4/src/clsplusplus/tiers.py +188 -0
- clsplusplus-7.2.4/src/clsplusplus/usage.py +231 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/user_embeddings.py +4 -1
- clsplusplus-7.2.4/src/clsplusplus/user_pulse.py +233 -0
- clsplusplus-7.2.4/src/clsplusplus/user_service.py +670 -0
- clsplusplus-7.2.4/src/clsplusplus/waitlist_service.py +489 -0
- clsplusplus-7.2.4/src/clsplusplus/weblab.py +103 -0
- clsplusplus-7.2.4/src/clsplusplus/weblab_watcher.py +158 -0
- clsplusplus-7.2.4/src/clsplusplus/window_limits.py +151 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus.egg-info/PKG-INFO +91 -17
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus.egg-info/SOURCES.txt +68 -1
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus.egg-info/entry_points.txt +1 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus.egg-info/requires.txt +2 -0
- clsplusplus-7.2.4/tests/test_abuse_guard.py +465 -0
- clsplusplus-7.2.4/tests/test_admin_seed.py +40 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_api.py +4 -1
- clsplusplus-7.2.4/tests/test_api_usage_analytics.py +270 -0
- clsplusplus-7.2.4/tests/test_auth_me_api_key.py +198 -0
- clsplusplus-7.2.4/tests/test_billing_e2e.py +220 -0
- clsplusplus-7.2.4/tests/test_burst_hardening.py +296 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_config.py +6 -1
- clsplusplus-7.2.4/tests/test_cost_forecast.py +201 -0
- clsplusplus-7.2.4/tests/test_debug_console.py +79 -0
- clsplusplus-7.2.4/tests/test_feedback_github.py +90 -0
- clsplusplus-7.2.4/tests/test_free_tier_lifecycle.py +270 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_full_api_coverage.py +3 -2
- clsplusplus-7.2.4/tests/test_funnel_metrics.py +315 -0
- clsplusplus-7.2.4/tests/test_geo_gating.py +210 -0
- clsplusplus-7.2.4/tests/test_health_metrics.py +226 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_integration_service.py +181 -0
- clsplusplus-7.2.4/tests/test_mcp_connect.py +168 -0
- clsplusplus-7.2.4/tests/test_mcp_oauth.py +692 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_memory_phase.py +9 -2
- clsplusplus-7.2.4/tests/test_memory_write_no_schema_garbage.py +94 -0
- clsplusplus-7.2.4/tests/test_metering_v2_healthcheck.py +378 -0
- clsplusplus-7.2.4/tests/test_metering_v2_notifier.py +198 -0
- clsplusplus-7.2.4/tests/test_metering_v2_pricing.py +186 -0
- clsplusplus-7.2.4/tests/test_metering_v2_reconciler.py +277 -0
- clsplusplus-7.2.4/tests/test_metering_v2_schema.py +203 -0
- clsplusplus-7.2.4/tests/test_metering_v2_writer.py +257 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_middleware.py +5 -4
- clsplusplus-7.2.4/tests/test_overage_billing.py +267 -0
- clsplusplus-7.2.4/tests/test_pricing.py +327 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_razorpay_billing.py +87 -5
- clsplusplus-7.2.4/tests/test_razorpay_subscription_webhooks.py +283 -0
- clsplusplus-7.2.4/tests/test_resilience.py +367 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_security.py +6 -4
- clsplusplus-7.2.4/tests/test_subscription_watchdog.py +161 -0
- clsplusplus-7.2.4/tests/test_tier_resolver.py +174 -0
- clsplusplus-7.2.4/tests/test_tiers.py +375 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_usage.py +74 -1
- clsplusplus-7.2.4/tests/test_user_auth.py +764 -0
- clsplusplus-7.2.4/tests/test_user_pulse.py +424 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_user_stories.py +2 -1
- clsplusplus-7.2.4/tests/test_waitlist.py +822 -0
- clsplusplus-7.2.4/tests/test_weblab.py +201 -0
- clsplusplus-7.2.4/tests/test_window_limits.py +386 -0
- clsplusplus-7.0.0/src/clsplusplus/config.py +0 -125
- clsplusplus-7.0.0/src/clsplusplus/main.py +0 -21
- clsplusplus-7.0.0/src/clsplusplus/middleware.py +0 -344
- clsplusplus-7.0.0/src/clsplusplus/rate_limit.py +0 -53
- clsplusplus-7.0.0/src/clsplusplus/razorpay_service.py +0 -153
- clsplusplus-7.0.0/src/clsplusplus/stores/user_store.py +0 -255
- clsplusplus-7.0.0/src/clsplusplus/tiers.py +0 -109
- clsplusplus-7.0.0/src/clsplusplus/usage.py +0 -130
- clsplusplus-7.0.0/src/clsplusplus/user_service.py +0 -257
- clsplusplus-7.0.0/tests/test_tiers.py +0 -211
- clsplusplus-7.0.0/tests/test_user_auth.py +0 -292
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/LICENSE +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/setup.cfg +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/__init__.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/auth.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/cli.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/client.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/cost_model.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/demo_llm.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/demo_local.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/embeddings.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/idempotency.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/integration_service.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/jwt_utils.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/memory_cycle.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/memory_service.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/namespace_resolver.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/permissions.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/plasticity.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/rbac_service.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/reconsolidation.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/sleep_cycle.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/stores/__init__.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/stores/base.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/stores/l1_indexing_store.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/stores/l2_schema_graph.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/stores/l3_deep_recess.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/stores/l3_postgres.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/stores/rbac_store.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/stripe_service.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/temporal.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/test_suite.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/topical_resonance.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/tracer.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus/webhook_dispatcher.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus.egg-info/dependency_links.txt +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/src/clsplusplus.egg-info/top_level.txt +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_admin.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_api_comprehensive.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_api_endpoints.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_auth.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_client_sdk.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_cross_llm_memory.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_demo_llm.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_embeddings.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_extension_integration.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_extension_ui.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_idempotency.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_memory_cycle.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_memory_service.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_models.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_performance.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_plasticity.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_prototype_e2e.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_rate_limit.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_reconsolidation.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_regression.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_sleep_cycle.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_stores.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_user_embeddings.py +0 -0
- {clsplusplus-7.0.0 → clsplusplus-7.2.4}/tests/test_webhook_dispatcher.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clsplusplus
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.2.4
|
|
4
4
|
Summary: Brain-inspired, model-agnostic persistent memory for LLMs. Learn, recall, forget — like a brain. Works with OpenAI, Claude, Gemini, Llama.
|
|
5
5
|
Author-email: AlphaForge AI Labs <contact@alphaforge.ai>
|
|
6
6
|
Maintainer-email: Rajamohan Jabbala <contact@alphaforge.ai>
|
|
@@ -51,14 +51,17 @@ Requires-Dist: stripe>=7.0.0; extra == "server"
|
|
|
51
51
|
Requires-Dist: razorpay>=1.4.0; extra == "server"
|
|
52
52
|
Requires-Dist: minio>=7.2.0; extra == "server"
|
|
53
53
|
Requires-Dist: pyarrow>=14.0.0; extra == "server"
|
|
54
|
+
Requires-Dist: posthog>=3.5.0; extra == "server"
|
|
54
55
|
Provides-Extra: dev
|
|
55
56
|
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
56
57
|
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
57
58
|
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
58
59
|
Requires-Dist: pytest-timeout>=2.2.0; extra == "dev"
|
|
59
60
|
Requires-Dist: httpx>=0.26.0; extra == "dev"
|
|
61
|
+
Requires-Dist: locust>=2.20.0; extra == "dev"
|
|
60
62
|
Dynamic: license-file
|
|
61
63
|
|
|
64
|
+
<!-- mcp-name: io.github.rajamohan1950/cls-memory -->
|
|
62
65
|
<p align="center">
|
|
63
66
|
<img src="https://img.shields.io/badge/CLS%2B%2B-Memory%20for%20LLMs-6366f1?style=for-the-badge&logo=github" alt="CLS++" />
|
|
64
67
|
</p>
|
|
@@ -80,7 +83,7 @@ Dynamic: license-file
|
|
|
80
83
|
<a href="https://pypi.org/project/clsplusplus/"><img src="https://img.shields.io/pypi/v/clsplusplus?style=flat-square&label=PyPI&color=6366f1" alt="PyPI" /></a>
|
|
81
84
|
<a href="https://www.npmjs.com/package/clsplusplus"><img src="https://img.shields.io/npm/v/clsplusplus?style=flat-square&label=npm&color=cb3837" alt="npm" /></a>
|
|
82
85
|
<a href="https://pypi.org/project/clsplusplus/"><img src="https://img.shields.io/pypi/pyversions/clsplusplus?style=flat-square" alt="Python" /></a>
|
|
83
|
-
<a href="https://www.clsplusplus.com/docs"><img src="https://img.shields.io/badge/API-Live-22c55e?style=flat-square" alt="API" /></a>
|
|
86
|
+
<a href="https://www.clsplusplus.com/docs"><img src="https://img.shields.io/badge/API-Live%20at%20www.clsplusplus.com-22c55e?style=flat-square" alt="API" /></a>
|
|
84
87
|
<a href="https://github.com/rajamohan1950/CLSplusplus/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue?style=flat-square" alt="License" /></a>
|
|
85
88
|
<a href="https://github.com/rajamohan1950/CLSplusplus"><img src="https://img.shields.io/badge/Patent-Oct%202025-blue?style=flat-square" alt="Patent" /></a>
|
|
86
89
|
</p>
|
|
@@ -200,28 +203,49 @@ uvicorn clsplusplus.api:create_app --factory --host 0.0.0.0 --port 8080
|
|
|
200
203
|
|
|
201
204
|
## Try It Live
|
|
202
205
|
|
|
203
|
-
**[Try the demo](https://clsplusplus.
|
|
206
|
+
**[Try the demo](https://www.clsplusplus.com)** — Tell Claude something, ask OpenAI. Same memory. No sign-up.
|
|
207
|
+
|
|
208
|
+
The Chrome extension (Web Store, v6.0.1) captures user messages from
|
|
209
|
+
ChatGPT, Claude, and Gemini chat pages automatically and feeds them through
|
|
210
|
+
the same memory pipeline. Host permissions: `chatgpt.com`,
|
|
211
|
+
`chat.openai.com`, `claude.ai`, `gemini.google.com`. The Link Account popup
|
|
212
|
+
differentiates 401 / 403 / network / unknown errors so you know whether the
|
|
213
|
+
key is wrong, the account is unlinked, or the server is unreachable.
|
|
204
214
|
|
|
205
215
|
---
|
|
206
216
|
|
|
207
217
|
## Architecture
|
|
208
218
|
|
|
209
219
|
```
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
│
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
Browser (extension/capture.js) Any LLM client (SDK / REST)
|
|
221
|
+
↓ ↓
|
|
222
|
+
↓ www.clsplusplus.com (Vercel, Next.js)
|
|
223
|
+
↓ │ rewrites /api/v1/*, /api/admin/*
|
|
224
|
+
↓ ▼
|
|
225
|
+
└──────────────► Render-hosted FastAPI (clsplusplus-api)
|
|
226
|
+
│ middleware: auth, rate limit, abuse-guard
|
|
227
|
+
▼
|
|
228
|
+
┌─────────────────────────────────────────┐
|
|
229
|
+
│ CLS++ Core Service │
|
|
230
|
+
│ L0: Redis working buffer │ ← Prefrontal cortex
|
|
231
|
+
│ L1: PostgreSQL+pgvector episodic │ ← Hippocampus
|
|
232
|
+
│ L2: Schema graph (crystallized) │ ← Neocortex
|
|
233
|
+
│ L3: Deep archive │ ← Thalamus
|
|
234
|
+
│ PhaseMemoryEngine (gas→liquid→ │
|
|
235
|
+
│ solid→glass, auto tier-compression) │
|
|
236
|
+
│ SleepOrchestrator (replay + REM) │
|
|
237
|
+
│ ReconsolidationGate (belief revision) │
|
|
238
|
+
│ Weblab (PostHog flags + auto-rollback)│
|
|
239
|
+
│ Pricing control plane (memory-stored) │
|
|
240
|
+
└─────────────────────────────────────────┘
|
|
223
241
|
```
|
|
224
242
|
|
|
243
|
+
Every user message captured in the extension and every SDK `learn()` call
|
|
244
|
+
lands in L0, is promoted through the phase engine by the same thermodynamic
|
|
245
|
+
rules, and is persisted to L1 in the background. There is no separate
|
|
246
|
+
"explicit store" path — capture is continuous, tier compression is
|
|
247
|
+
automatic.
|
|
248
|
+
|
|
225
249
|
---
|
|
226
250
|
|
|
227
251
|
## SaaS Mode (Memory-as-a-Service)
|
|
@@ -233,10 +257,29 @@ export CLS_API_KEYS=cls_live_xxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
233
257
|
export CLS_REQUIRE_API_KEY=true
|
|
234
258
|
export CLS_RATE_LIMIT_REQUESTS=100
|
|
235
259
|
export CLS_RATE_LIMIT_WINDOW_SECONDS=60
|
|
260
|
+
|
|
261
|
+
# Abuse-guard (env-tunable; defaults shown)
|
|
262
|
+
export CLS_ABUSE_AUTHFAIL_THRESHOLD=60 # auth failures per IP per window
|
|
263
|
+
export CLS_ABUSE_AUTHFAIL_WINDOW_SECONDS=600 # 10 minutes
|
|
264
|
+
export CLS_ABUSE_WHITELIST_IPS= # comma-separated operator IPs
|
|
236
265
|
```
|
|
237
266
|
|
|
267
|
+
Requests carrying a valid API key are exempt from auth-fail flood counting
|
|
268
|
+
(see `src/clsplusplus/abuse_guard.py`).
|
|
269
|
+
|
|
238
270
|
Product endpoints: `POST /v1/memories/encode`, `POST /v1/memories/retrieve`, `DELETE /v1/memories/forget`, `GET /v1/health/score`. See [SaaS docs](docs/SAAS_MEMORY_AS_SERVICE.md).
|
|
239
271
|
|
|
272
|
+
### Pricing
|
|
273
|
+
|
|
274
|
+
CLS++ launched in India and bills in **INR via Razorpay (UPI / QR)** — not
|
|
275
|
+
USD, not Stripe. Tiers: **Pro ₹299**, **Business ₹999**, **Enterprise
|
|
276
|
+
₹4,999**. The pricing control plane lives inside the CLS++ memory layer
|
|
277
|
+
itself (reserved namespace `__cls_pricing__`) and is operator-tunable at
|
|
278
|
+
runtime via `POST /admin/pricing/config`. The default config — currency,
|
|
279
|
+
margin floor/target, infra spend, dynamic-demand toggle — is seeded by
|
|
280
|
+
`src/clsplusplus/pricing_store.py` on first read. `GET /v1/pricing` is a
|
|
281
|
+
public, abuse-exempt endpoint.
|
|
282
|
+
|
|
240
283
|
---
|
|
241
284
|
|
|
242
285
|
## Deployment
|
|
@@ -269,11 +312,42 @@ Product endpoints: `POST /v1/memories/encode`, `POST /v1/memories/retrieve`, `DE
|
|
|
269
312
|
|
|
270
313
|
- [x] Four stores (L0–L3) + Plasticity Engine
|
|
271
314
|
- [x] Write/Read API + Python SDK
|
|
272
|
-
- [x] Docker Compose + Render deploy
|
|
315
|
+
- [x] Docker Compose + Render deploy (Dockerfile ships `/app/scripts/` for operator tooling)
|
|
273
316
|
- [x] Sleep cycle orchestrator
|
|
274
317
|
- [x] Reconsolidation gate
|
|
275
318
|
- [x] API key auth + rate limiting
|
|
276
319
|
- [x] SaaS product endpoints
|
|
320
|
+
- [x] Chrome extension (v6.0.1) capturing ChatGPT / Claude / Gemini
|
|
321
|
+
- [x] Abuse-guard with env-tunable thresholds and operator IP whitelist
|
|
322
|
+
- [x] PostHog Weblab — staged rollouts with auto-rollback (5xx > 2% or p95 > 3s)
|
|
323
|
+
- [x] INR pricing (Razorpay / UPI) with memory-resident control plane
|
|
324
|
+
|
|
325
|
+
## Recent Architectural Decisions
|
|
326
|
+
|
|
327
|
+
- **Auto-crystallization gated OFF by default.** The Landauer
|
|
328
|
+
liquid→solid pipeline produced low-quality `[Schema: subject]` token-soup
|
|
329
|
+
entries that leaked into user-visible memory lists. Re-enable per process
|
|
330
|
+
with `CLS_ENABLE_AUTO_CRYSTALLIZATION=1`. Melting still runs so existing
|
|
331
|
+
schemas drain out. See `src/clsplusplus/memory_phase.py`.
|
|
332
|
+
- **Pricing lives in the memory layer.** Operator-tunable config (margin
|
|
333
|
+
floor/target, infra cost, dynamic-demand toggle) and the bucketed demand
|
|
334
|
+
history are stored as two fixed-id documents in namespace
|
|
335
|
+
`__cls_pricing__`, not in env vars.
|
|
336
|
+
- **Frontend ↔ backend topology.** The Next.js frontend on Vercel
|
|
337
|
+
(`www.clsplusplus.com`) rewrites `/api/v1/*` and `/api/admin/*` to the
|
|
338
|
+
Render-hosted FastAPI. The bare onrender.com host is the internal
|
|
339
|
+
upstream target — not the public surface.
|
|
340
|
+
- **Integration ownership.** `POST /v1/integrations` injects
|
|
341
|
+
`owner_email` from the JWT-authed user; non-admin override returns 403.
|
|
342
|
+
A backfill script handles legacy NULL rows.
|
|
343
|
+
|
|
344
|
+
## Operator Runbooks
|
|
345
|
+
|
|
346
|
+
See [docs/RUNBOOKS.md](docs/RUNBOOKS.md) and
|
|
347
|
+
[docs/LAUNCH_RUNBOOK.md](docs/LAUNCH_RUNBOOK.md) for incident response,
|
|
348
|
+
deploy procedures, and the abuse-guard / weblab dashboards. The
|
|
349
|
+
container ships operator scripts at `/app/scripts/` (see
|
|
350
|
+
`scripts/admin_doctor.py`, `scripts/backfill_integration_owner_email.py`).
|
|
277
351
|
|
|
278
352
|
---
|
|
279
353
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- mcp-name: io.github.rajamohan1950/cls-memory -->
|
|
1
2
|
<p align="center">
|
|
2
3
|
<img src="https://img.shields.io/badge/CLS%2B%2B-Memory%20for%20LLMs-6366f1?style=for-the-badge&logo=github" alt="CLS++" />
|
|
3
4
|
</p>
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
<a href="https://pypi.org/project/clsplusplus/"><img src="https://img.shields.io/pypi/v/clsplusplus?style=flat-square&label=PyPI&color=6366f1" alt="PyPI" /></a>
|
|
20
21
|
<a href="https://www.npmjs.com/package/clsplusplus"><img src="https://img.shields.io/npm/v/clsplusplus?style=flat-square&label=npm&color=cb3837" alt="npm" /></a>
|
|
21
22
|
<a href="https://pypi.org/project/clsplusplus/"><img src="https://img.shields.io/pypi/pyversions/clsplusplus?style=flat-square" alt="Python" /></a>
|
|
22
|
-
<a href="https://www.clsplusplus.com/docs"><img src="https://img.shields.io/badge/API-Live-22c55e?style=flat-square" alt="API" /></a>
|
|
23
|
+
<a href="https://www.clsplusplus.com/docs"><img src="https://img.shields.io/badge/API-Live%20at%20www.clsplusplus.com-22c55e?style=flat-square" alt="API" /></a>
|
|
23
24
|
<a href="https://github.com/rajamohan1950/CLSplusplus/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue?style=flat-square" alt="License" /></a>
|
|
24
25
|
<a href="https://github.com/rajamohan1950/CLSplusplus"><img src="https://img.shields.io/badge/Patent-Oct%202025-blue?style=flat-square" alt="Patent" /></a>
|
|
25
26
|
</p>
|
|
@@ -139,28 +140,49 @@ uvicorn clsplusplus.api:create_app --factory --host 0.0.0.0 --port 8080
|
|
|
139
140
|
|
|
140
141
|
## Try It Live
|
|
141
142
|
|
|
142
|
-
**[Try the demo](https://clsplusplus.
|
|
143
|
+
**[Try the demo](https://www.clsplusplus.com)** — Tell Claude something, ask OpenAI. Same memory. No sign-up.
|
|
144
|
+
|
|
145
|
+
The Chrome extension (Web Store, v6.0.1) captures user messages from
|
|
146
|
+
ChatGPT, Claude, and Gemini chat pages automatically and feeds them through
|
|
147
|
+
the same memory pipeline. Host permissions: `chatgpt.com`,
|
|
148
|
+
`chat.openai.com`, `claude.ai`, `gemini.google.com`. The Link Account popup
|
|
149
|
+
differentiates 401 / 403 / network / unknown errors so you know whether the
|
|
150
|
+
key is wrong, the account is unlinked, or the server is unreachable.
|
|
143
151
|
|
|
144
152
|
---
|
|
145
153
|
|
|
146
154
|
## Architecture
|
|
147
155
|
|
|
148
156
|
```
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
│
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
Browser (extension/capture.js) Any LLM client (SDK / REST)
|
|
158
|
+
↓ ↓
|
|
159
|
+
↓ www.clsplusplus.com (Vercel, Next.js)
|
|
160
|
+
↓ │ rewrites /api/v1/*, /api/admin/*
|
|
161
|
+
↓ ▼
|
|
162
|
+
└──────────────► Render-hosted FastAPI (clsplusplus-api)
|
|
163
|
+
│ middleware: auth, rate limit, abuse-guard
|
|
164
|
+
▼
|
|
165
|
+
┌─────────────────────────────────────────┐
|
|
166
|
+
│ CLS++ Core Service │
|
|
167
|
+
│ L0: Redis working buffer │ ← Prefrontal cortex
|
|
168
|
+
│ L1: PostgreSQL+pgvector episodic │ ← Hippocampus
|
|
169
|
+
│ L2: Schema graph (crystallized) │ ← Neocortex
|
|
170
|
+
│ L3: Deep archive │ ← Thalamus
|
|
171
|
+
│ PhaseMemoryEngine (gas→liquid→ │
|
|
172
|
+
│ solid→glass, auto tier-compression) │
|
|
173
|
+
│ SleepOrchestrator (replay + REM) │
|
|
174
|
+
│ ReconsolidationGate (belief revision) │
|
|
175
|
+
│ Weblab (PostHog flags + auto-rollback)│
|
|
176
|
+
│ Pricing control plane (memory-stored) │
|
|
177
|
+
└─────────────────────────────────────────┘
|
|
162
178
|
```
|
|
163
179
|
|
|
180
|
+
Every user message captured in the extension and every SDK `learn()` call
|
|
181
|
+
lands in L0, is promoted through the phase engine by the same thermodynamic
|
|
182
|
+
rules, and is persisted to L1 in the background. There is no separate
|
|
183
|
+
"explicit store" path — capture is continuous, tier compression is
|
|
184
|
+
automatic.
|
|
185
|
+
|
|
164
186
|
---
|
|
165
187
|
|
|
166
188
|
## SaaS Mode (Memory-as-a-Service)
|
|
@@ -172,10 +194,29 @@ export CLS_API_KEYS=cls_live_xxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
172
194
|
export CLS_REQUIRE_API_KEY=true
|
|
173
195
|
export CLS_RATE_LIMIT_REQUESTS=100
|
|
174
196
|
export CLS_RATE_LIMIT_WINDOW_SECONDS=60
|
|
197
|
+
|
|
198
|
+
# Abuse-guard (env-tunable; defaults shown)
|
|
199
|
+
export CLS_ABUSE_AUTHFAIL_THRESHOLD=60 # auth failures per IP per window
|
|
200
|
+
export CLS_ABUSE_AUTHFAIL_WINDOW_SECONDS=600 # 10 minutes
|
|
201
|
+
export CLS_ABUSE_WHITELIST_IPS= # comma-separated operator IPs
|
|
175
202
|
```
|
|
176
203
|
|
|
204
|
+
Requests carrying a valid API key are exempt from auth-fail flood counting
|
|
205
|
+
(see `src/clsplusplus/abuse_guard.py`).
|
|
206
|
+
|
|
177
207
|
Product endpoints: `POST /v1/memories/encode`, `POST /v1/memories/retrieve`, `DELETE /v1/memories/forget`, `GET /v1/health/score`. See [SaaS docs](docs/SAAS_MEMORY_AS_SERVICE.md).
|
|
178
208
|
|
|
209
|
+
### Pricing
|
|
210
|
+
|
|
211
|
+
CLS++ launched in India and bills in **INR via Razorpay (UPI / QR)** — not
|
|
212
|
+
USD, not Stripe. Tiers: **Pro ₹299**, **Business ₹999**, **Enterprise
|
|
213
|
+
₹4,999**. The pricing control plane lives inside the CLS++ memory layer
|
|
214
|
+
itself (reserved namespace `__cls_pricing__`) and is operator-tunable at
|
|
215
|
+
runtime via `POST /admin/pricing/config`. The default config — currency,
|
|
216
|
+
margin floor/target, infra spend, dynamic-demand toggle — is seeded by
|
|
217
|
+
`src/clsplusplus/pricing_store.py` on first read. `GET /v1/pricing` is a
|
|
218
|
+
public, abuse-exempt endpoint.
|
|
219
|
+
|
|
179
220
|
---
|
|
180
221
|
|
|
181
222
|
## Deployment
|
|
@@ -208,11 +249,42 @@ Product endpoints: `POST /v1/memories/encode`, `POST /v1/memories/retrieve`, `DE
|
|
|
208
249
|
|
|
209
250
|
- [x] Four stores (L0–L3) + Plasticity Engine
|
|
210
251
|
- [x] Write/Read API + Python SDK
|
|
211
|
-
- [x] Docker Compose + Render deploy
|
|
252
|
+
- [x] Docker Compose + Render deploy (Dockerfile ships `/app/scripts/` for operator tooling)
|
|
212
253
|
- [x] Sleep cycle orchestrator
|
|
213
254
|
- [x] Reconsolidation gate
|
|
214
255
|
- [x] API key auth + rate limiting
|
|
215
256
|
- [x] SaaS product endpoints
|
|
257
|
+
- [x] Chrome extension (v6.0.1) capturing ChatGPT / Claude / Gemini
|
|
258
|
+
- [x] Abuse-guard with env-tunable thresholds and operator IP whitelist
|
|
259
|
+
- [x] PostHog Weblab — staged rollouts with auto-rollback (5xx > 2% or p95 > 3s)
|
|
260
|
+
- [x] INR pricing (Razorpay / UPI) with memory-resident control plane
|
|
261
|
+
|
|
262
|
+
## Recent Architectural Decisions
|
|
263
|
+
|
|
264
|
+
- **Auto-crystallization gated OFF by default.** The Landauer
|
|
265
|
+
liquid→solid pipeline produced low-quality `[Schema: subject]` token-soup
|
|
266
|
+
entries that leaked into user-visible memory lists. Re-enable per process
|
|
267
|
+
with `CLS_ENABLE_AUTO_CRYSTALLIZATION=1`. Melting still runs so existing
|
|
268
|
+
schemas drain out. See `src/clsplusplus/memory_phase.py`.
|
|
269
|
+
- **Pricing lives in the memory layer.** Operator-tunable config (margin
|
|
270
|
+
floor/target, infra cost, dynamic-demand toggle) and the bucketed demand
|
|
271
|
+
history are stored as two fixed-id documents in namespace
|
|
272
|
+
`__cls_pricing__`, not in env vars.
|
|
273
|
+
- **Frontend ↔ backend topology.** The Next.js frontend on Vercel
|
|
274
|
+
(`www.clsplusplus.com`) rewrites `/api/v1/*` and `/api/admin/*` to the
|
|
275
|
+
Render-hosted FastAPI. The bare onrender.com host is the internal
|
|
276
|
+
upstream target — not the public surface.
|
|
277
|
+
- **Integration ownership.** `POST /v1/integrations` injects
|
|
278
|
+
`owner_email` from the JWT-authed user; non-admin override returns 403.
|
|
279
|
+
A backfill script handles legacy NULL rows.
|
|
280
|
+
|
|
281
|
+
## Operator Runbooks
|
|
282
|
+
|
|
283
|
+
See [docs/RUNBOOKS.md](docs/RUNBOOKS.md) and
|
|
284
|
+
[docs/LAUNCH_RUNBOOK.md](docs/LAUNCH_RUNBOOK.md) for incident response,
|
|
285
|
+
deploy procedures, and the abuse-guard / weblab dashboards. The
|
|
286
|
+
container ships operator scripts at `/app/scripts/` (see
|
|
287
|
+
`scripts/admin_doctor.py`, `scripts/backfill_integration_owner_email.py`).
|
|
216
288
|
|
|
217
289
|
---
|
|
218
290
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "clsplusplus"
|
|
7
|
-
version = "7.
|
|
7
|
+
version = "7.2.4"
|
|
8
8
|
description = "Brain-inspired, model-agnostic persistent memory for LLMs. Learn, recall, forget — like a brain. Works with OpenAI, Claude, Gemini, Llama."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -61,6 +61,7 @@ server = [
|
|
|
61
61
|
"razorpay>=1.4.0",
|
|
62
62
|
"minio>=7.2.0",
|
|
63
63
|
"pyarrow>=14.0.0",
|
|
64
|
+
"posthog>=3.5.0",
|
|
64
65
|
]
|
|
65
66
|
dev = [
|
|
66
67
|
"pytest>=7.4.0",
|
|
@@ -68,10 +69,12 @@ dev = [
|
|
|
68
69
|
"pytest-cov>=4.1.0",
|
|
69
70
|
"pytest-timeout>=2.2.0",
|
|
70
71
|
"httpx>=0.26.0",
|
|
72
|
+
"locust>=2.20.0",
|
|
71
73
|
]
|
|
72
74
|
|
|
73
75
|
[project.scripts]
|
|
74
76
|
cls = "clsplusplus.cli:main"
|
|
77
|
+
cls-mcp = "clsplusplus.mcp_server:main"
|
|
75
78
|
|
|
76
79
|
[project.urls]
|
|
77
80
|
Homepage = "https://github.com/rajamohan1950/CLSplusplus"
|
|
@@ -90,8 +93,22 @@ where = ["src"]
|
|
|
90
93
|
asyncio_mode = "auto"
|
|
91
94
|
testpaths = ["tests"]
|
|
92
95
|
pythonpath = ["src"]
|
|
96
|
+
# Test category markers — every new test should carry at least one.
|
|
97
|
+
# The old suite (tests/test_*.py) is implicitly "unit" unless otherwise marked.
|
|
93
98
|
markers = [
|
|
94
|
-
"slow:
|
|
99
|
+
"slow: long-running tests — excluded from default run",
|
|
100
|
+
"unit: pure function/module tests, no network, no database",
|
|
101
|
+
"regression: guards against specific previously-fixed bugs",
|
|
102
|
+
"functional: end-to-end against a running API + Postgres + Redis",
|
|
103
|
+
"smoke: minimal liveness checks — server up, basic routes respond",
|
|
104
|
+
"sanity: shallow correctness checks on critical contracts",
|
|
105
|
+
"performance: measures latency/throughput with assertions on bounds",
|
|
106
|
+
"load: sustained high concurrency over time",
|
|
107
|
+
"stress: pushes beyond expected capacity to find breaking point",
|
|
108
|
+
"dip: sustained-load ramp-down test; looks for leak / degradation",
|
|
109
|
+
"whitebox: uses internal module imports and private state",
|
|
110
|
+
"blackbox: exercises only the public HTTP surface",
|
|
111
|
+
"beta: curated user-journey scenarios that mimic real customer use",
|
|
95
112
|
]
|
|
96
113
|
filterwarnings = [
|
|
97
114
|
"ignore::DeprecationWarning",
|