@grifhinz/logics-manager 2.5.0 → 2.5.1

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![CI](https://github.com/AlexAgo83/logics-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/AlexAgo83/logics-manager/actions/workflows/ci.yml)
4
4
  [![License](https://img.shields.io/github/license/AlexAgo83/logics-manager)](LICENSE)
5
- ![Version](https://img.shields.io/badge/version-v2.5.0-4C8BF5)
5
+ ![Version](https://img.shields.io/badge/version-v2.5.1-4C8BF5)
6
6
  ![VS Code](https://img.shields.io/badge/VS%20Code-1.86.0-007ACC?logo=visualstudiocode&logoColor=white)
7
7
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.3.3-3178C6?logo=typescript&logoColor=white)
8
8
  ![Vitest](https://img.shields.io/badge/Vitest-2.1.8-6E9F18?logo=vitest&logoColor=white)
@@ -230,13 +230,15 @@ npm install -g @grifhinz/logics-manager@latest
230
230
  If npm reports a successful update but `logics-manager --version` still shows an older version, another installation is earlier on `PATH`. Diagnose it with:
231
231
 
232
232
  ```bash
233
- command -v -a logics-manager
233
+ type -a logics-manager
234
+ whence -a logics-manager # zsh
235
+ pipx list
234
236
  npm prefix -g
235
237
  npm list -g @grifhinz/logics-manager --depth=0
236
238
  "$(npm prefix -g)/bin/logics-manager" --version
237
239
  ```
238
240
 
239
- If the direct npm binary shows the expected version, remove the older Python install or move the npm global `bin` directory earlier on `PATH`.
241
+ If the direct npm binary shows the expected version, remove the older Python install or move the npm global `bin` directory earlier on `PATH`. In zsh, run `rehash` or open a new terminal after changing installs so the shell forgets any cached command location.
240
242
 
241
243
  ## VS Code Extension
242
244
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.0
1
+ 2.5.1
@@ -195,15 +195,21 @@ def _find_executable_paths(command: str) -> list[str]:
195
195
  def _print_path_conflict_guidance(paths: list[str]) -> None:
196
196
  if len(paths) <= 1:
197
197
  return
198
+ path_lines = [f" - {path}" for path in paths]
198
199
  print(
199
200
  "\n".join(
200
201
  [
201
202
  "",
202
203
  "Multiple logics-manager executables are on PATH. If --version still shows an older release, an earlier install is taking precedence.",
204
+ "Detected executables:",
205
+ *path_lines,
203
206
  "Diagnose with:",
204
- " command -v -a logics-manager",
207
+ " type -a logics-manager",
208
+ " whence -a logics-manager # zsh",
205
209
  " pipx list",
206
210
  " npm list -g @grifhinz/logics-manager --depth=0",
211
+ "",
212
+ "If you recently changed installs in zsh, run `rehash` or open a new terminal before retrying.",
207
213
  ]
208
214
  )
209
215
  )
@@ -427,7 +427,7 @@ def _markdown_file_path(repo_root: Path, raw_path: str, allowed_dirs: tuple[str,
427
427
 
428
428
  def _run_command(repo_root: Path, args: list[str]) -> subprocess.CompletedProcess[str]:
429
429
  command = [sys.executable, "-m", "logics_manager", *args]
430
- result = subprocess.run(command, cwd=repo_root, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
430
+ result = subprocess.run(command, cwd=repo_root, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, env=_subprocess_env())
431
431
  if result.returncode != 0:
432
432
  raise McpToolError(
433
433
  "command_failed",
@@ -439,7 +439,7 @@ def _run_command(repo_root: Path, args: list[str]) -> subprocess.CompletedProces
439
439
 
440
440
  def _run_json_command(repo_root: Path, args: list[str]) -> dict[str, Any]:
441
441
  command = [sys.executable, "-m", "logics_manager", *args]
442
- result = subprocess.run(command, cwd=repo_root, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
442
+ result = subprocess.run(command, cwd=repo_root, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, env=_subprocess_env())
443
443
  payload = _json_from_stdout_or_none(result.stdout)
444
444
  if payload is None:
445
445
  raise McpToolError(
@@ -450,6 +450,14 @@ def _run_json_command(repo_root: Path, args: list[str]) -> dict[str, Any]:
450
450
  return payload
451
451
 
452
452
 
453
+ def _subprocess_env() -> dict[str, str]:
454
+ env = os.environ.copy()
455
+ source_root = str(Path(__file__).resolve().parents[1])
456
+ existing = env.get("PYTHONPATH")
457
+ env["PYTHONPATH"] = source_root if not existing else os.pathsep.join([source_root, existing])
458
+ return env
459
+
460
+
453
461
  def _json_from_stdout(stdout: str) -> dict[str, Any]:
454
462
  start = stdout.find("{")
455
463
  end = stdout.rfind("}")
@@ -14,6 +14,7 @@ from dataclasses import dataclass
14
14
  from datetime import datetime
15
15
  from http import HTTPStatus
16
16
  from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
17
+ from importlib import metadata
17
18
  from pathlib import Path
18
19
  from typing import Any
19
20
  from urllib.parse import parse_qs, quote, unquote, urlencode, urlparse
@@ -56,8 +57,14 @@ NODE_MERMAID_ROOT = REPO_ROOT / "node_modules" / "mermaid" / "dist"
56
57
 
57
58
  def _current_version() -> str:
58
59
  try:
59
- return (REPO_ROOT / "VERSION").read_text(encoding="utf-8").strip() or "0.0.0"
60
+ version = (REPO_ROOT / "VERSION").read_text(encoding="utf-8").strip()
60
61
  except OSError:
62
+ version = ""
63
+ if version:
64
+ return version
65
+ try:
66
+ return metadata.version("logics-manager")
67
+ except metadata.PackageNotFoundError:
61
68
  return "0.0.0"
62
69
 
63
70
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@grifhinz/logics-manager",
3
3
  "displayName": "Logics Orchestrator",
4
4
  "description": "Visual orchestration for Logics workflows inside VS Code.",
5
- "version": "2.5.0",
5
+ "version": "2.5.1",
6
6
  "publisher": "cdx-logics",
7
7
  "icon": "clients/shared-web/media/icon.png",
8
8
  "repository": {
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "logics-manager"
7
- version = "2.5.0"
7
+ version = "2.5.1"
8
8
  description = "Canonical Logics CLI"
9
9
  requires-python = ">=3.10"
10
10