claude-self-reflect 2.4.1 → 2.4.2
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.
- package/.claude/agents/README.md +20 -3
- package/.claude/agents/open-source-maintainer.md +287 -11
- package/.claude/agents/reflect-tester.md +278 -0
- package/.env.example +29 -0
- package/Dockerfile.importer +13 -0
- package/Dockerfile.importer-isolated +20 -0
- package/Dockerfile.mcp-server +17 -0
- package/Dockerfile.streaming-importer +30 -0
- package/Dockerfile.watcher +53 -0
- package/README.md +15 -2
- package/docker-compose.yaml +98 -0
- package/installer/setup-wizard-docker.js +433 -0
- package/installer/setup-wizard.js +4 -1484
- package/mcp-server/run-mcp-docker.sh +5 -0
- package/mcp-server/src/server_v2.py +11 -7
- package/package.json +5 -1
- package/scripts/import-conversations-unified.py +16 -1
|
@@ -42,11 +42,11 @@ DECAY_SCALE_DAYS = float(os.getenv('DECAY_SCALE_DAYS', '90'))
|
|
|
42
42
|
# Initialize Voyage AI client
|
|
43
43
|
voyage_client = voyageai.Client(api_key=VOYAGE_API_KEY) if VOYAGE_API_KEY else None
|
|
44
44
|
|
|
45
|
-
# Debug environment loading
|
|
46
|
-
print(f"[DEBUG] Qdrant Native Decay Server v2.0.0")
|
|
47
|
-
print(f"[DEBUG] ENABLE_MEMORY_DECAY: {ENABLE_MEMORY_DECAY}")
|
|
48
|
-
print(f"[DEBUG] DECAY_WEIGHT: {DECAY_WEIGHT}")
|
|
49
|
-
print(f"[DEBUG] DECAY_SCALE_DAYS: {DECAY_SCALE_DAYS}")
|
|
45
|
+
# Debug environment loading (disabled for production)
|
|
46
|
+
# print(f"[DEBUG] Qdrant Native Decay Server v2.0.0")
|
|
47
|
+
# print(f"[DEBUG] ENABLE_MEMORY_DECAY: {ENABLE_MEMORY_DECAY}")
|
|
48
|
+
# print(f"[DEBUG] DECAY_WEIGHT: {DECAY_WEIGHT}")
|
|
49
|
+
# print(f"[DEBUG] DECAY_SCALE_DAYS: {DECAY_SCALE_DAYS}")
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
class SearchResult(BaseModel):
|
|
@@ -246,5 +246,9 @@ async def store_reflection(
|
|
|
246
246
|
return f"Failed to store reflection: {str(e)}"
|
|
247
247
|
|
|
248
248
|
|
|
249
|
-
# Debug output
|
|
250
|
-
print(f"[DEBUG] FastMCP server v2.0.0 created with native Qdrant decay")
|
|
249
|
+
# Debug output (disabled for production)
|
|
250
|
+
# print(f"[DEBUG] FastMCP server v2.0.0 created with native Qdrant decay")
|
|
251
|
+
|
|
252
|
+
# Run the server when executed as main module
|
|
253
|
+
if __name__ == "__main__":
|
|
254
|
+
mcp.run(transport="stdio", show_banner=False)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-self-reflect",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"description": "Give Claude perfect memory of all your conversations - Installation wizard for Python MCP server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
@@ -32,8 +32,12 @@
|
|
|
32
32
|
"mcp-server/src/**/*.py",
|
|
33
33
|
"mcp-server/pyproject.toml",
|
|
34
34
|
"mcp-server/run-mcp.sh",
|
|
35
|
+
"mcp-server/run-mcp-docker.sh",
|
|
35
36
|
"scripts/import-*.py",
|
|
36
37
|
".claude/agents/*.md",
|
|
38
|
+
"docker-compose.yaml",
|
|
39
|
+
"Dockerfile.*",
|
|
40
|
+
".env.example",
|
|
37
41
|
"README.md",
|
|
38
42
|
"LICENSE"
|
|
39
43
|
],
|
|
@@ -19,6 +19,12 @@ from qdrant_client.models import (
|
|
|
19
19
|
Filter, FieldCondition, MatchValue
|
|
20
20
|
)
|
|
21
21
|
|
|
22
|
+
from tenacity import (
|
|
23
|
+
retry,
|
|
24
|
+
stop_after_attempt,
|
|
25
|
+
wait_random_exponential,
|
|
26
|
+
)
|
|
27
|
+
|
|
22
28
|
# Configuration
|
|
23
29
|
QDRANT_URL = os.getenv("QDRANT_URL", "http://localhost:6333")
|
|
24
30
|
LOGS_DIR = os.getenv("LOGS_DIR", "/logs")
|
|
@@ -54,6 +60,15 @@ else:
|
|
|
54
60
|
# Initialize Qdrant client
|
|
55
61
|
client = QdrantClient(url=QDRANT_URL)
|
|
56
62
|
|
|
63
|
+
|
|
64
|
+
def log_retry_state(retry_state):
|
|
65
|
+
print(f"Retrying function '{retry_state.fn.__name__}' for the {retry_state.attempt_number} time.")
|
|
66
|
+
print(f"----> Waiting for {retry_state.next_action.sleep} seconds before next attempt.")
|
|
67
|
+
|
|
68
|
+
@retry(wait=wait_random_exponential(multiplier=2, min=30, max=120), stop=stop_after_attempt(6), before_sleep=log_retry_state)
|
|
69
|
+
def embed_with_backoff(**kwargs):
|
|
70
|
+
return voyage_client.embed(**kwargs)
|
|
71
|
+
|
|
57
72
|
def generate_embeddings(texts: List[str]) -> List[List[float]]:
|
|
58
73
|
"""Generate embeddings for a list of texts."""
|
|
59
74
|
if PREFER_LOCAL_EMBEDDINGS or not VOYAGE_API_KEY:
|
|
@@ -62,7 +77,7 @@ def generate_embeddings(texts: List[str]) -> List[List[float]]:
|
|
|
62
77
|
return [embedding.tolist() for embedding in embeddings]
|
|
63
78
|
else:
|
|
64
79
|
# Voyage AI embeddings
|
|
65
|
-
result =
|
|
80
|
+
result = embed_with_backoff(
|
|
66
81
|
texts=texts,
|
|
67
82
|
model="voyage-3-large",
|
|
68
83
|
input_type="document"
|