claude-self-reflect 3.2.4 → 3.3.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/.claude/agents/claude-self-reflect-test.md +595 -528
- package/.claude/agents/reflection-specialist.md +59 -3
- package/README.md +14 -5
- package/mcp-server/run-mcp.sh +49 -5
- package/mcp-server/src/app_context.py +64 -0
- package/mcp-server/src/config.py +57 -0
- package/mcp-server/src/connection_pool.py +286 -0
- package/mcp-server/src/decay_manager.py +106 -0
- package/mcp-server/src/embedding_manager.py +64 -40
- package/mcp-server/src/embeddings_old.py +141 -0
- package/mcp-server/src/models.py +64 -0
- package/mcp-server/src/parallel_search.py +371 -0
- package/mcp-server/src/project_resolver.py +5 -0
- package/mcp-server/src/reflection_tools.py +206 -0
- package/mcp-server/src/rich_formatting.py +196 -0
- package/mcp-server/src/search_tools.py +826 -0
- package/mcp-server/src/server.py +127 -1720
- package/mcp-server/src/temporal_design.py +132 -0
- package/mcp-server/src/temporal_tools.py +597 -0
- package/mcp-server/src/temporal_utils.py +384 -0
- package/mcp-server/src/utils.py +150 -67
- package/package.json +10 -1
- package/scripts/add-timestamp-indexes.py +134 -0
- package/scripts/check-collections.py +29 -0
- package/scripts/debug-august-parsing.py +76 -0
- package/scripts/debug-import-single.py +91 -0
- package/scripts/debug-project-resolver.py +82 -0
- package/scripts/debug-temporal-tools.py +135 -0
- package/scripts/delta-metadata-update.py +547 -0
- package/scripts/import-conversations-unified.py +53 -2
- package/scripts/precompact-hook.sh +33 -0
- package/scripts/streaming-watcher.py +1443 -0
- package/scripts/utils.py +39 -0
package/scripts/utils.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Shared utilities for claude-self-reflect MCP server and scripts."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def normalize_project_name(project_path: str, _depth: int = 0) -> str:
|
|
7
|
+
"""
|
|
8
|
+
Simplified project name normalization for consistent hashing.
|
|
9
|
+
|
|
10
|
+
Examples:
|
|
11
|
+
'/Users/name/.claude/projects/-Users-name-projects-myproject' -> 'myproject'
|
|
12
|
+
'-Users-name-projects-myproject' -> 'myproject'
|
|
13
|
+
'/path/to/myproject' -> 'myproject'
|
|
14
|
+
'myproject' -> 'myproject'
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
project_path: Project path or name in any format
|
|
18
|
+
_depth: Internal recursion depth counter (for backwards compatibility)
|
|
19
|
+
|
|
20
|
+
Returns:
|
|
21
|
+
Normalized project name suitable for consistent hashing
|
|
22
|
+
"""
|
|
23
|
+
if not project_path:
|
|
24
|
+
return ""
|
|
25
|
+
|
|
26
|
+
path = Path(project_path.rstrip('/'))
|
|
27
|
+
|
|
28
|
+
# Extract the final directory name
|
|
29
|
+
final_component = path.name
|
|
30
|
+
|
|
31
|
+
# If it's Claude's dash-separated format, extract project name
|
|
32
|
+
if final_component.startswith('-') and 'projects' in final_component:
|
|
33
|
+
# Find the last occurrence of 'projects-' to handle edge cases
|
|
34
|
+
idx = final_component.rfind('projects-')
|
|
35
|
+
if idx != -1:
|
|
36
|
+
return final_component[idx + len('projects-'):]
|
|
37
|
+
|
|
38
|
+
# For regular paths, just return the directory name
|
|
39
|
+
return final_component if final_component else path.parent.name
|