-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdebug_test.py
More file actions
45 lines (38 loc) · 1.13 KB
/
debug_test.py
File metadata and controls
45 lines (38 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python3
import json
import subprocess
import sys
def test_record_insight():
"""Test recording an insight via MCP"""
# Create MCP request
request = {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "hippo_record_insight",
"arguments": {
"content": "Debug test insight to check metadata system",
"importance": 0.8,
"situation": ["debug test", "metadata verification"]
}
}
}
# Send request to server
try:
result = subprocess.run(
["hippo-server", "--memory-dir", "/Users/nikomat/.hippo"],
input=json.dumps(request),
text=True,
capture_output=True,
timeout=10
)
print("STDOUT:", result.stdout)
print("STDERR:", result.stderr)
print("Return code:", result.returncode)
except subprocess.TimeoutExpired:
print("Server timed out")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
test_record_insight()