@meridiona/meridian-darwin-arm64 1.34.3 → 1.34.5

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/VERSION CHANGED
@@ -1 +1 @@
1
- 1.34.3
1
+ 1.34.5
package/bin/meridian CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meridiona/meridian-darwin-arm64",
3
- "version": "1.34.3",
3
+ "version": "1.34.5",
4
4
  "description": "Prebuilt Meridian app for macOS arm64 (daemon binary + dashboard + Python services). Installed via @meridiona/meridian.",
5
5
  "homepage": "https://github.com/Meridiona/meridian",
6
6
  "repository": {
@@ -42,12 +42,32 @@ fi
42
42
  # found when screenpipe is a native binary (Homebrew) rather than the npm shim.
43
43
  STAGED_BIN="${HOME}/.meridian/bin/screenpipe"
44
44
 
45
- # Prefer the already-staged stable binary (written by install-from-bundle.sh).
46
- # On a standalone re-run of this script (e.g. `meridian repair`) resolve the
47
- # real Mach-O from the npm tree and stage it so the launchd plist is immune to
48
- # nvm version changes — the npm shim path under ~/.nvm is version-specific and
49
- # breaks silently when the user runs `nvm use` or upgrades Node.
50
- if [[ -x "${STAGED_BIN}" ]] && file "${STAGED_BIN}" 2>/dev/null | grep -q "Mach-O"; then
45
+ # Determine the binary path to write into the plist.
46
+ #
47
+ # Priority order chosen to avoid invalidating existing TCC grants:
48
+ #
49
+ # 1. Existing plist path is still a valid Mach-O keep it.
50
+ # macOS TCC grants are per absolute path. Changing the path silently
51
+ # revokes the grant and breaks screenpipe on the next start. Preserve
52
+ # the old path on updates so working installs stay working.
53
+ #
54
+ # 2. Already-staged stable binary exists → use it.
55
+ # Covers fresh installs and repairs where no old plist exists.
56
+ #
57
+ # 3. Resolve the real Mach-O from the npm tree → stage it → use it.
58
+ # Handles new installs where neither a plist nor a staged binary exists.
59
+ # nvm users get a version-specific path under ~/.nvm that breaks on
60
+ # `nvm use` or Node upgrades, so we always copy to the stable
61
+ # ~/.meridian/bin/screenpipe location.
62
+ _old_plist_bin=""
63
+ if [[ -f "${PLIST_DEST}" ]]; then
64
+ _old_plist_bin="$(plutil -extract ProgramArguments.0 raw "${PLIST_DEST}" 2>/dev/null || true)"
65
+ fi
66
+
67
+ if [[ -n "${_old_plist_bin}" ]] && [[ -x "${_old_plist_bin}" ]] && file "${_old_plist_bin}" 2>/dev/null | grep -q "Mach-O"; then
68
+ SCREENPIPE_BIN="${_old_plist_bin}"
69
+ echo "→ keeping existing screenpipe binary (preserves TCC grant): ${SCREENPIPE_BIN}"
70
+ elif [[ -x "${STAGED_BIN}" ]] && file "${STAGED_BIN}" 2>/dev/null | grep -q "Mach-O"; then
51
71
  SCREENPIPE_BIN="${STAGED_BIN}"
52
72
  echo "→ using staged screenpipe binary: ${SCREENPIPE_BIN}"
53
73
  else
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "meridian-agents"
7
- version = "1.34.3"
7
+ version = "1.34.5"
8
8
  description = "Meridian agents — MLX classifier server and Jira worklog synthesis for meridian.db"
9
9
  requires-python = ">=3.11"
10
10
  authors = [{ name = "Meridiona" }]
@@ -23,29 +23,34 @@
23
23
  <key>WorkingDirectory</key>
24
24
  <string>{{REPO_ROOT}}/services</string>
25
25
 
26
- <!-- Use the base Python binary directly (not the venv wrapper script) so
27
- Python never reads pyvenv.cfg which triggers EPERM from launchd on
28
- macOS 15 even at Standard ProcessType. PYTHONPATH gives the venv's
29
- site-packages without triggering venv-detection. -->
26
+ <!-- uv resolves the managed Python and activates the venv before exec.
27
+ UV_PROJECT_ENVIRONMENT points to services/.venv (prepared by
28
+ setup-services.sh for dev, or install-from-bundle.sh for npm installs).
29
+ --no-sync skips lockfile resolution at daemon startup. -->
30
30
  <key>ProgramArguments</key>
31
31
  <array>
32
- <string>{{BASE_PYTHON}}</string>
32
+ <string>{{UV_BIN}}</string>
33
+ <string>run</string>
34
+ <string>--no-sync</string>
35
+ <string>--project</string>
36
+ <string>{{REPO_ROOT}}/services</string>
37
+ <string>python</string>
33
38
  <string>-m</string>
34
39
  <string>agents.server</string>
35
- <string>--backend</string>
36
- <string>mlx</string>
37
40
  <string>--port</string>
38
41
  <string>{{MLX_SERVER_PORT}}</string>
39
42
  </array>
40
43
 
41
44
  <key>EnvironmentVariables</key>
42
45
  <dict>
46
+ <key>HOME</key>
47
+ <string>{{HOME}}</string>
48
+ <key>UV_PROJECT_ENVIRONMENT</key>
49
+ <string>{{SERVICES_VENV}}</string>
43
50
  <key>MERIDIAN_DB</key>
44
51
  <string>{{HOME}}/.meridian/meridian.db</string>
45
52
  <key>PYTHONUNBUFFERED</key>
46
53
  <string>1</string>
47
- <key>PYTHONPATH</key>
48
- <string>{{SITE_PACKAGES}}</string>
49
54
  <key>MLX_SERVER_PORT</key>
50
55
  <string>{{MLX_SERVER_PORT}}</string>
51
56
  <key>MERIDIAN_OO_AUTH</key>
@@ -40,42 +40,29 @@ if [[ ! -f "${TEMPLATE}" ]]; then
40
40
  exit 1
41
41
  fi
42
42
 
43
- VENV="${SERVICES_DIR}/.venv"
44
- VENV_CFG="${VENV}/pyvenv.cfg"
45
- if [[ ! -f "${VENV_CFG}" ]]; then
46
- echo "✗ venv not found at ${VENV}" >&2
47
- echo " Run: bash scripts/setup-services.sh --mlx" >&2
43
+ # Find the uv binary.
44
+ UV_BIN=""
45
+ for _uv_candidate in "${HOME}/.local/bin/uv" /opt/homebrew/bin/uv /usr/local/bin/uv; do
46
+ if [[ -x "${_uv_candidate}" ]]; then UV_BIN="${_uv_candidate}"; break; fi
47
+ done
48
+ [[ -z "${UV_BIN}" ]] && UV_BIN="$(command -v uv 2>/dev/null || true)"
49
+ if [[ -z "${UV_BIN}" ]]; then
50
+ echo "✗ uv not found. Run: bash scripts/setup-services.sh --mlx" >&2
48
51
  exit 1
49
52
  fi
50
53
 
51
- # Resolve the base Python from pyvenv.cfg so we invoke it directly rather
52
- # than through the venv wrapper. The wrapper shebang causes Python to read
53
- # pyvenv.cfg at startup, which EPERM-fails when launchd launches the process
54
- # on macOS 15 (launchd inherits no TCC Documents permission).
55
- #
56
- # pyvenv.cfg format differs by creator:
57
- # python -m venv → "executable = /path/to/python3.11"
58
- # uv sync → "home = /path/to/bin" (no `executable` key)
59
- # Try `executable` first, fall back to `home` + python3.11/python3/python.
60
- # `|| true` prevents set -e from exiting when grep finds no match (exit 1).
61
- BASE_PYTHON=$(grep '^executable' "${VENV_CFG}" 2>/dev/null | awk '{print $3}' || true)
62
- if [[ -z "${BASE_PYTHON}" || ! -x "${BASE_PYTHON}" ]]; then
63
- _home=$(grep '^home ' "${VENV_CFG}" 2>/dev/null | awk '{print $3}' || true)
64
- if [[ -n "${_home}" ]]; then
65
- for _py in python3.11 python3 python; do
66
- if [[ -x "${_home}/${_py}" ]]; then BASE_PYTHON="${_home}/${_py}"; break; fi
67
- done
68
- fi
69
- fi
70
- if [[ ! -x "${BASE_PYTHON}" ]]; then
71
- echo "✗ base Python not found (checked pyvenv.cfg executable + home keys in ${VENV_CFG})" >&2
72
- exit 1
73
- fi
54
+ # The venv always lives at services/.venv inside the repo for dev installs,
55
+ # inside ~/.meridian/app/services/ for npm installs (managed by install-from-bundle.sh).
56
+ SERVICES_VENV="${SERVICES_DIR}/.venv"
74
57
 
75
- # venv site-packages directory (PYTHONPATH replaces venv activation).
76
- SITE_PACKAGES=$(ls -d "${VENV}/lib/python"*/site-packages 2>/dev/null | head -1)
77
- if [[ -z "${SITE_PACKAGES}" ]]; then
78
- echo " site-packages not found under ${VENV}/lib/" >&2
58
+ if [[ ! -d "${SERVICES_VENV}" ]]; then
59
+ if [[ "${SERVICES_DIR}" == "${HOME}/.meridian/"* ]]; then
60
+ echo "✗ venv not found at ${SERVICES_VENV}" >&2
61
+ echo " npm install appears incomplete reinstall via: meridian update" >&2
62
+ exit 1
63
+ fi
64
+ echo "✗ venv not found at ${SERVICES_VENV}" >&2
65
+ echo " Run: bash scripts/setup-services.sh --mlx" >&2
79
66
  exit 1
80
67
  fi
81
68
 
@@ -99,8 +86,8 @@ sed \
99
86
  -e "s|{{REPO_ROOT}}|${REPO_ROOT}|g" \
100
87
  -e "s|{{HOME}}|${HOME}|g" \
101
88
  -e "s|{{MLX_SERVER_PORT}}|${MLX_SERVER_PORT}|g" \
102
- -e "s|{{BASE_PYTHON}}|${BASE_PYTHON}|g" \
103
- -e "s|{{SITE_PACKAGES}}|${SITE_PACKAGES}|g" \
89
+ -e "s|{{UV_BIN}}|${UV_BIN}|g" \
90
+ -e "s|{{SERVICES_VENV}}|${SERVICES_VENV}|g" \
104
91
  -e "s|{{MERIDIAN_OO_AUTH}}|${MERIDIAN_OO_AUTH}|g" \
105
92
  -e "s|{{MERIDIAN_OTLP_ENDPOINT}}|${MERIDIAN_OTLP_ENDPOINT}|g" \
106
93
  "${TEMPLATE}" > "${PLIST_DEST}"
package/ui.tar.gz CHANGED
Binary file