claude-recall 0.8.6 → 0.8.7
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.
|
@@ -47,8 +47,8 @@ def should_require_search(tool_name: str, tool_input: Dict[str, Any]) -> bool:
|
|
|
47
47
|
def check_recent_search(session_id: str) -> bool:
|
|
48
48
|
"""Check if memory search was performed recently in this session."""
|
|
49
49
|
if not session_id:
|
|
50
|
-
# No session ID
|
|
51
|
-
return
|
|
50
|
+
# No session ID - strict mode: block execution
|
|
51
|
+
return False
|
|
52
52
|
|
|
53
53
|
try:
|
|
54
54
|
# Call claude-recall CLI to check recent tool usage
|
|
@@ -60,15 +60,15 @@ def check_recent_search(session_id: str) -> bool:
|
|
|
60
60
|
)
|
|
61
61
|
|
|
62
62
|
if result.returncode != 0:
|
|
63
|
-
# Command failed
|
|
64
|
-
return
|
|
63
|
+
# Command failed - strict mode: block execution
|
|
64
|
+
return False
|
|
65
65
|
|
|
66
66
|
# Check if mcp__claude-recall__search was called recently
|
|
67
67
|
return 'mcp__claude-recall__search' in result.stdout
|
|
68
68
|
|
|
69
69
|
except (subprocess.TimeoutExpired, FileNotFoundError, Exception):
|
|
70
|
-
#
|
|
71
|
-
return
|
|
70
|
+
# Check failed - strict mode: block execution
|
|
71
|
+
return False
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
def generate_search_query(tool_name: str, tool_input: Dict[str, Any]) -> str:
|
package/.claude/settings.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-recall",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"description": "Persistent memory for Claude Code with fire-and-forget PubNub architecture, automatic capture, failure learning, and project scoping via MCP server",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
package/scripts/postinstall.js
CHANGED
|
@@ -121,6 +121,7 @@ try {
|
|
|
121
121
|
// Copy hook scripts from package
|
|
122
122
|
const packageHooksDir = path.join(__dirname, '../.claude/hooks');
|
|
123
123
|
const hookScripts = [
|
|
124
|
+
'pre_tool_search_enforcer.py',
|
|
124
125
|
'pubnub_pre_tool_hook.py',
|
|
125
126
|
'pubnub_prompt_hook.py'
|
|
126
127
|
];
|
|
@@ -152,8 +153,12 @@ try {
|
|
|
152
153
|
settings.hooks = {
|
|
153
154
|
PreToolUse: [
|
|
154
155
|
{
|
|
155
|
-
matcher: "Write|Edit
|
|
156
|
+
matcher: "Write|Edit",
|
|
156
157
|
hooks: [
|
|
158
|
+
{
|
|
159
|
+
type: "command",
|
|
160
|
+
command: "python3 .claude/hooks/pre_tool_search_enforcer.py"
|
|
161
|
+
},
|
|
157
162
|
{
|
|
158
163
|
type: "command",
|
|
159
164
|
command: "python3 .claude/hooks/pubnub_pre_tool_hook.py"
|
|
@@ -174,9 +179,9 @@ try {
|
|
|
174
179
|
};
|
|
175
180
|
|
|
176
181
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
177
|
-
console.log('✅ Configured
|
|
178
|
-
console.log(' → PreToolUse:
|
|
179
|
-
console.log(' → UserPromptSubmit:
|
|
182
|
+
console.log('✅ Configured hooks in .claude/settings.json');
|
|
183
|
+
console.log(' → PreToolUse: Enforces memory search before Write/Edit');
|
|
184
|
+
console.log(' → UserPromptSubmit: Captures prompts for preference extraction');
|
|
180
185
|
}
|
|
181
186
|
}
|
|
182
187
|
} catch (error) {
|