claude-memory-agent 2.0.0
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/.env.example +107 -0
- package/README.md +200 -0
- package/agent_card.py +512 -0
- package/bin/cli.js +181 -0
- package/bin/postinstall.js +216 -0
- package/config.py +104 -0
- package/dashboard.html +2689 -0
- package/hooks/README.md +196 -0
- package/hooks/__pycache__/auto-detect-response.cpython-312.pyc +0 -0
- package/hooks/__pycache__/auto_capture.cpython-312.pyc +0 -0
- package/hooks/__pycache__/session_end.cpython-312.pyc +0 -0
- package/hooks/__pycache__/session_start.cpython-312.pyc +0 -0
- package/hooks/auto-detect-response.py +348 -0
- package/hooks/auto_capture.py +255 -0
- package/hooks/detect-correction.py +173 -0
- package/hooks/grounding-hook.py +348 -0
- package/hooks/log-tool-use.py +234 -0
- package/hooks/log-user-request.py +208 -0
- package/hooks/pre-tool-decision.py +218 -0
- package/hooks/problem-detector.py +343 -0
- package/hooks/session_end.py +192 -0
- package/hooks/session_start.py +227 -0
- package/install.py +887 -0
- package/main.py +2859 -0
- package/manager.py +997 -0
- package/package.json +55 -0
- package/requirements.txt +8 -0
- package/run_server.py +136 -0
- package/services/__init__.py +50 -0
- package/services/__pycache__/__init__.cpython-312.pyc +0 -0
- package/services/__pycache__/agent_registry.cpython-312.pyc +0 -0
- package/services/__pycache__/auth.cpython-312.pyc +0 -0
- package/services/__pycache__/auto_inject.cpython-312.pyc +0 -0
- package/services/__pycache__/claude_md_sync.cpython-312.pyc +0 -0
- package/services/__pycache__/cleanup.cpython-312.pyc +0 -0
- package/services/__pycache__/compaction_flush.cpython-312.pyc +0 -0
- package/services/__pycache__/confidence.cpython-312.pyc +0 -0
- package/services/__pycache__/daily_log.cpython-312.pyc +0 -0
- package/services/__pycache__/database.cpython-312.pyc +0 -0
- package/services/__pycache__/embeddings.cpython-312.pyc +0 -0
- package/services/__pycache__/insights.cpython-312.pyc +0 -0
- package/services/__pycache__/llm_analyzer.cpython-312.pyc +0 -0
- package/services/__pycache__/memory_md_sync.cpython-312.pyc +0 -0
- package/services/__pycache__/retry_queue.cpython-312.pyc +0 -0
- package/services/__pycache__/timeline.cpython-312.pyc +0 -0
- package/services/__pycache__/vector_index.cpython-312.pyc +0 -0
- package/services/__pycache__/websocket.cpython-312.pyc +0 -0
- package/services/agent_registry.py +753 -0
- package/services/auth.py +331 -0
- package/services/auto_inject.py +250 -0
- package/services/claude_md_sync.py +275 -0
- package/services/cleanup.py +667 -0
- package/services/compaction_flush.py +447 -0
- package/services/confidence.py +301 -0
- package/services/daily_log.py +333 -0
- package/services/database.py +2485 -0
- package/services/embeddings.py +358 -0
- package/services/insights.py +632 -0
- package/services/llm_analyzer.py +595 -0
- package/services/memory_md_sync.py +409 -0
- package/services/retry_queue.py +453 -0
- package/services/timeline.py +579 -0
- package/services/vector_index.py +398 -0
- package/services/websocket.py +257 -0
- package/skills/__init__.py +6 -0
- package/skills/__pycache__/__init__.cpython-312.pyc +0 -0
- package/skills/__pycache__/admin.cpython-312.pyc +0 -0
- package/skills/__pycache__/checkpoint.cpython-312.pyc +0 -0
- package/skills/__pycache__/claude_md.cpython-312.pyc +0 -0
- package/skills/__pycache__/cleanup.cpython-312.pyc +0 -0
- package/skills/__pycache__/grounding.cpython-312.pyc +0 -0
- package/skills/__pycache__/insights.cpython-312.pyc +0 -0
- package/skills/__pycache__/natural_language.cpython-312.pyc +0 -0
- package/skills/__pycache__/retrieve.cpython-312.pyc +0 -0
- package/skills/__pycache__/search.cpython-312.pyc +0 -0
- package/skills/__pycache__/state.cpython-312.pyc +0 -0
- package/skills/__pycache__/store.cpython-312.pyc +0 -0
- package/skills/__pycache__/summarize.cpython-312.pyc +0 -0
- package/skills/__pycache__/timeline.cpython-312.pyc +0 -0
- package/skills/__pycache__/verification.cpython-312.pyc +0 -0
- package/skills/admin.py +469 -0
- package/skills/checkpoint.py +198 -0
- package/skills/claude_md.py +363 -0
- package/skills/cleanup.py +241 -0
- package/skills/grounding.py +801 -0
- package/skills/insights.py +231 -0
- package/skills/natural_language.py +277 -0
- package/skills/retrieve.py +67 -0
- package/skills/search.py +213 -0
- package/skills/state.py +182 -0
- package/skills/store.py +179 -0
- package/skills/summarize.py +588 -0
- package/skills/timeline.py +387 -0
- package/skills/verification.py +391 -0
- package/start_daemon.py +155 -0
- package/test_automation.py +221 -0
- package/test_complete.py +338 -0
- package/test_full.py +322 -0
- package/update_system.py +817 -0
- package/verify_db.py +134 -0
package/verify_db.py
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Quick database verification tool - run this to see what's stored."""
|
|
3
|
+
import sqlite3
|
|
4
|
+
import json
|
|
5
|
+
from datetime import datetime
|
|
6
|
+
|
|
7
|
+
DB_PATH = "memories.db"
|
|
8
|
+
|
|
9
|
+
def main():
|
|
10
|
+
conn = sqlite3.connect(DB_PATH)
|
|
11
|
+
conn.row_factory = sqlite3.Row
|
|
12
|
+
|
|
13
|
+
print("\n" + "="*60)
|
|
14
|
+
print(" CLAUDE MEMORY - DATABASE VERIFICATION")
|
|
15
|
+
print("="*60)
|
|
16
|
+
|
|
17
|
+
# Agent configs
|
|
18
|
+
print("\n[AGENT CONFIGURATIONS]")
|
|
19
|
+
print("-" * 40)
|
|
20
|
+
cursor = conn.execute("""
|
|
21
|
+
SELECT project_path, agent_id, enabled, updated_at
|
|
22
|
+
FROM project_agent_config
|
|
23
|
+
ORDER BY updated_at DESC
|
|
24
|
+
LIMIT 10
|
|
25
|
+
""")
|
|
26
|
+
rows = cursor.fetchall()
|
|
27
|
+
if rows:
|
|
28
|
+
for row in rows:
|
|
29
|
+
project = row["project_path"].split("\\")[-1] if "\\" in row["project_path"] else row["project_path"].split("/")[-1]
|
|
30
|
+
status = "ON" if row["enabled"] else "OFF"
|
|
31
|
+
print(f" [{status:3}] {row['agent_id']:<30} | {project}")
|
|
32
|
+
print(f" Updated: {row['updated_at']}")
|
|
33
|
+
else:
|
|
34
|
+
print(" No configurations yet - toggle an agent in the dashboard!")
|
|
35
|
+
|
|
36
|
+
# MCP configs
|
|
37
|
+
print("\n[MCP CONFIGURATIONS]")
|
|
38
|
+
print("-" * 40)
|
|
39
|
+
cursor = conn.execute("""
|
|
40
|
+
SELECT project_path, mcp_id, enabled, updated_at
|
|
41
|
+
FROM project_mcp_config
|
|
42
|
+
ORDER BY updated_at DESC
|
|
43
|
+
LIMIT 10
|
|
44
|
+
""")
|
|
45
|
+
rows = cursor.fetchall()
|
|
46
|
+
if rows:
|
|
47
|
+
for row in rows:
|
|
48
|
+
project = row["project_path"].split("\\")[-1] if "\\" in row["project_path"] else row["project_path"].split("/")[-1]
|
|
49
|
+
status = "ON" if row["enabled"] else "OFF"
|
|
50
|
+
print(f" [{status:3}] {row['mcp_id']:<30} | {project}")
|
|
51
|
+
else:
|
|
52
|
+
print(" No MCP configurations yet")
|
|
53
|
+
|
|
54
|
+
# Hook configs
|
|
55
|
+
print("\n[HOOK CONFIGURATIONS]")
|
|
56
|
+
print("-" * 40)
|
|
57
|
+
cursor = conn.execute("""
|
|
58
|
+
SELECT project_path, hook_id, enabled, updated_at
|
|
59
|
+
FROM project_hook_config
|
|
60
|
+
ORDER BY updated_at DESC
|
|
61
|
+
LIMIT 10
|
|
62
|
+
""")
|
|
63
|
+
rows = cursor.fetchall()
|
|
64
|
+
if rows:
|
|
65
|
+
for row in rows:
|
|
66
|
+
project = row["project_path"].split("\\")[-1] if "\\" in row["project_path"] else row["project_path"].split("/")[-1]
|
|
67
|
+
status = "ON" if row["enabled"] else "OFF"
|
|
68
|
+
print(f" [{status:3}] {row['hook_id']:<30} | {project}")
|
|
69
|
+
else:
|
|
70
|
+
print(" No hook configurations yet")
|
|
71
|
+
|
|
72
|
+
# Timeline events
|
|
73
|
+
print("\n[RECENT TIMELINE EVENTS]")
|
|
74
|
+
print("-" * 40)
|
|
75
|
+
cursor = conn.execute("""
|
|
76
|
+
SELECT event_type, summary, session_id, created_at, is_anchor
|
|
77
|
+
FROM timeline_events
|
|
78
|
+
ORDER BY created_at DESC
|
|
79
|
+
LIMIT 15
|
|
80
|
+
""")
|
|
81
|
+
rows = cursor.fetchall()
|
|
82
|
+
if rows:
|
|
83
|
+
for row in rows:
|
|
84
|
+
anchor = " [ANCHOR]" if row["is_anchor"] else ""
|
|
85
|
+
print(f" [{row['event_type']:<12}] {row['summary'][:50]}...{anchor}")
|
|
86
|
+
print(f" {row['created_at']}")
|
|
87
|
+
else:
|
|
88
|
+
print(" No timeline events yet")
|
|
89
|
+
|
|
90
|
+
# Anchors only
|
|
91
|
+
print("\n[ANCHORS (VERIFIED FACTS)]")
|
|
92
|
+
print("-" * 40)
|
|
93
|
+
cursor = conn.execute("""
|
|
94
|
+
SELECT summary, details, created_at
|
|
95
|
+
FROM timeline_events
|
|
96
|
+
WHERE is_anchor = 1
|
|
97
|
+
ORDER BY created_at DESC
|
|
98
|
+
LIMIT 10
|
|
99
|
+
""")
|
|
100
|
+
rows = cursor.fetchall()
|
|
101
|
+
if rows:
|
|
102
|
+
for row in rows:
|
|
103
|
+
print(f" * {row['summary']}")
|
|
104
|
+
if row['details']:
|
|
105
|
+
print(f" Details: {row['details'][:60]}...")
|
|
106
|
+
else:
|
|
107
|
+
print(" No anchors set yet")
|
|
108
|
+
|
|
109
|
+
# Stats
|
|
110
|
+
print("\n[STATISTICS]")
|
|
111
|
+
print("-" * 40)
|
|
112
|
+
cursor = conn.execute("SELECT COUNT(*) as c FROM memories")
|
|
113
|
+
print(f" Total Memories: {cursor.fetchone()['c']}")
|
|
114
|
+
|
|
115
|
+
cursor = conn.execute("SELECT COUNT(*) as c FROM timeline_events")
|
|
116
|
+
print(f" Timeline Events: {cursor.fetchone()['c']}")
|
|
117
|
+
|
|
118
|
+
cursor = conn.execute("SELECT COUNT(*) as c FROM project_agent_config")
|
|
119
|
+
print(f" Agent Configs: {cursor.fetchone()['c']}")
|
|
120
|
+
|
|
121
|
+
cursor = conn.execute("SELECT COUNT(*) as c FROM session_state")
|
|
122
|
+
print(f" Sessions: {cursor.fetchone()['c']}")
|
|
123
|
+
|
|
124
|
+
cursor = conn.execute("SELECT COUNT(*) as c FROM checkpoints")
|
|
125
|
+
print(f" Checkpoints: {cursor.fetchone()['c']}")
|
|
126
|
+
|
|
127
|
+
print("\n" + "="*60)
|
|
128
|
+
print(" Run this again after toggling something in the dashboard!")
|
|
129
|
+
print("="*60 + "\n")
|
|
130
|
+
|
|
131
|
+
conn.close()
|
|
132
|
+
|
|
133
|
+
if __name__ == "__main__":
|
|
134
|
+
main()
|