cortex-local 2.0.8__tar.gz → 2.0.10__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cortex-local
3
- Version: 2.0.8
3
+ Version: 2.0.10
4
4
  Summary: Local semantic search MCP server — notes + code, embedded Qdrant, fastembed
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: click>=8.0.0
@@ -81,7 +81,21 @@ def _resolve_import(source_file: str, imp: str, all_files: set, ext: str):
81
81
  imp = target + imp[len(alias):]
82
82
  break
83
83
 
84
- if imp.startswith("."):
84
+ if imp.startswith(".") and ext == ".py":
85
+ dots = len(imp) - len(imp.lstrip("."))
86
+ module = imp[dots:].replace(".", "/")
87
+ base = Path(source_file).parent
88
+ for _ in range(dots - 1):
89
+ base = base.parent
90
+ candidate = (base / module).as_posix().lstrip("/") if module else base.as_posix().lstrip("/")
91
+ if candidate + ".py" in all_files:
92
+ return candidate + ".py"
93
+ if candidate + "/__init__.py" in all_files:
94
+ return candidate + "/__init__.py"
95
+ if candidate in all_files:
96
+ return candidate
97
+ return None
98
+ elif imp.startswith("."):
85
99
  base = Path(source_file).parent
86
100
  candidate = (base / imp).as_posix().lstrip("/")
87
101
  for try_ext in (ext, ".ts", ".tsx", ".js", ".jsx", ".svelte"):
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cortex-local"
7
- version = "2.0.8"
7
+ version = "2.0.10"
8
8
  description = "Local semantic search MCP server — notes + code, embedded Qdrant, fastembed"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
File without changes