synap-git 1.2.1__tar.gz → 1.2.2__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.
Files changed (45) hide show
  1. {synap_git-1.2.1 → synap_git-1.2.2}/PKG-INFO +1 -1
  2. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/__init__.py +1 -1
  3. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/cli/main.py +34 -3
  4. {synap_git-1.2.1 → synap_git-1.2.2}/.gitignore +0 -0
  5. {synap_git-1.2.1 → synap_git-1.2.2}/.synap.example/README.md +0 -0
  6. {synap_git-1.2.1 → synap_git-1.2.2}/CHANGELOG.md +0 -0
  7. {synap_git-1.2.1 → synap_git-1.2.2}/LICENSE.md +0 -0
  8. {synap_git-1.2.1 → synap_git-1.2.2}/README.md +0 -0
  9. {synap_git-1.2.1 → synap_git-1.2.2}/pyproject.toml +0 -0
  10. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/api/__init__.py +0 -0
  11. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/api/app.py +0 -0
  12. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/api/static/index.html +0 -0
  13. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/cli/__init__.py +0 -0
  14. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/cli/__main__.py +0 -0
  15. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/config.py +0 -0
  16. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/diagnostics/__init__.py +0 -0
  17. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/diagnostics/logger.py +0 -0
  18. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/diagnostics/tracing.py +0 -0
  19. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/embeddings/__init__.py +0 -0
  20. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/git/__init__.py +0 -0
  21. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/git/state.py +0 -0
  22. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/indexer/__init__.py +0 -0
  23. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/indexer/daemon.py +0 -0
  24. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/indexer/engine.py +0 -0
  25. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/indexer/scanner.py +0 -0
  26. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/indexer/wiki.py +0 -0
  27. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/mcp/__init__.py +0 -0
  28. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/mcp/server.py +0 -0
  29. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/parser/__init__.py +0 -0
  30. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/parser/registry.py +0 -0
  31. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/provider/anthropic.py +0 -0
  32. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/provider/base.py +0 -0
  33. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/provider/factory.py +0 -0
  34. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/provider/gemini.py +0 -0
  35. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/provider/ollama.py +0 -0
  36. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/provider/openai.py +0 -0
  37. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/provider/openrouter.py +0 -0
  38. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/py.typed +0 -0
  39. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/retrieval/__init__.py +0 -0
  40. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/retrieval/engine.py +0 -0
  41. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/retrieval/memory.py +0 -0
  42. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/storage/__init__.py +0 -0
  43. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/storage/sqlite.py +0 -0
  44. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/utils/__init__.py +0 -0
  45. {synap_git-1.2.1 → synap_git-1.2.2}/src/synap_git/utils/serialization.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: synap-git
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: Persistent structural context infrastructure for AI coding agents.
5
5
  Project-URL: Homepage, https://github.com/saahilpal/synap-git
6
6
  Project-URL: Repository, https://github.com/saahilpal/synap-git
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "1.2.1"
5
+ __version__ = "1.2.2"
@@ -970,7 +970,24 @@ def update() -> None:
970
970
 
971
971
  console.print(f"Latest version on PyPI: [bold]{latest_version}[/bold]")
972
972
 
973
- if current_version == latest_version and install_method != "editable":
973
+ def is_newer(v_remote: str, v_local: str) -> bool:
974
+ try:
975
+ # Attempt to use packaging if available
976
+ from packaging.version import Version
977
+
978
+ return Version(v_remote) > Version(v_local)
979
+ except (ImportError, Exception):
980
+ # Fallback to simple semver tuple comparison
981
+ try:
982
+
983
+ def _to_tuple(v: str) -> tuple[int, ...]:
984
+ return tuple(int(x) for x in v.split(".") if x.isdigit())
985
+
986
+ return _to_tuple(v_remote) > _to_tuple(v_local)
987
+ except Exception:
988
+ return v_remote != v_local
989
+
990
+ if not is_newer(latest_version, current_version) and install_method != "editable":
974
991
  console.print("[green]✓ Synap is already up to date.[/green]")
975
992
  return
976
993
 
@@ -978,7 +995,11 @@ def update() -> None:
978
995
  console.print("\n[yellow]Editable installation detected. Updating via git pull...[/yellow]")
979
996
  try:
980
997
  subprocess.run(["git", "pull", "origin", "main"], check=True)
981
- subprocess.run([sys.executable, "-m", "pip", "install", "-e", "."], check=True)
998
+ # Try pip, then uv
999
+ try:
1000
+ subprocess.run([sys.executable, "-m", "pip", "install", "-e", "."], check=True)
1001
+ except Exception:
1002
+ subprocess.run(["uv", "pip", "install", "-e", "."], check=True)
982
1003
  console.print(
983
1004
  "[green]✓ Update successful (Git repository pulled and re-installed)[/green]"
984
1005
  )
@@ -1003,7 +1024,17 @@ def update() -> None:
1003
1024
  f"\n[yellow]Upgrading Synap to {latest_version} using: {' '.join(cmd)}...[/yellow]"
1004
1025
  )
1005
1026
  try:
1006
- subprocess.run(cmd, check=True)
1027
+ try:
1028
+ subprocess.run(cmd, check=True)
1029
+ except Exception as e:
1030
+ if install_method == "venv" or install_method == "pip":
1031
+ # Fallback to uv if pip fails/is missing
1032
+ console.print(
1033
+ "[yellow]Pip failed or missing. Attempting upgrade via uv...[/yellow]"
1034
+ )
1035
+ subprocess.run(["uv", "pip", "install", "--upgrade", "synap-git"], check=True)
1036
+ else:
1037
+ raise e
1007
1038
  console.print("[green]✓ Update successful[/green]")
1008
1039
  except Exception as e:
1009
1040
  console.print(f"[bold red]✗ Upgrade failed:[/bold red] {e}")
File without changes
File without changes
File without changes
File without changes
File without changes