@meridiona/meridian-darwin-arm64 1.27.3 → 1.27.4

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.27.3
1
+ 1.27.4
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.27.3",
3
+ "version": "1.27.4",
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": {
@@ -21,9 +21,10 @@
21
21
 
22
22
  <key>ProgramArguments</key>
23
23
  <array>
24
- <string>/bin/sh</string>
25
- <string>-c</string>
26
- <string>exec {{SCREENPIPE_BIN}} record --disable-audio --use-pii-removal</string>
24
+ <string>{{SCREENPIPE_BIN}}</string>
25
+ <string>record</string>
26
+ <string>--disable-audio</string>
27
+ <string>--use-pii-removal</string>
27
28
  </array>
28
29
 
29
30
  <key>EnvironmentVariables</key>
@@ -33,7 +33,7 @@
33
33
  <key>EnvironmentVariables</key>
34
34
  <dict>
35
35
  <key>PATH</key>
36
- <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
36
+ <string>{{NODE_BIN_DIR}}/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
37
37
  <key>HOME</key>
38
38
  <string>{{HOME}}</string>
39
39
  <key>MERIDIAN_DB</key>
@@ -52,8 +52,8 @@ ENV_FILE="${REPO_ROOT}/.env"
52
52
  MERIDIAN_OO_AUTH=""
53
53
  MERIDIAN_OTLP_ENDPOINT=""
54
54
  if [[ -f "${ENV_FILE}" ]]; then
55
- MERIDIAN_OO_AUTH="$(grep -E '^MERIDIAN_OO_AUTH=' "${ENV_FILE}" | cut -d= -f2- | tr -d '[:space:]')" || true
56
- MERIDIAN_OTLP_ENDPOINT="$(grep -E '^MERIDIAN_OTLP_ENDPOINT=' "${ENV_FILE}" | cut -d= -f2- | tr -d '[:space:]')" || true
55
+ MERIDIAN_OO_AUTH="$(grep -E '^MERIDIAN_OO_AUTH=' "${ENV_FILE}" | cut -d= -f2- | tr -d '[:space:]' | sed "s/^['\"]//;s/['\"]$//")" || true
56
+ MERIDIAN_OTLP_ENDPOINT="$(grep -E '^MERIDIAN_OTLP_ENDPOINT=' "${ENV_FILE}" | cut -d= -f2- | tr -d '[:space:]' | sed "s/^['\"]//;s/['\"]$//")" || true
57
57
  fi
58
58
  if [[ -z "${MERIDIAN_OO_AUTH}" ]]; then
59
59
  echo " ⚠ MERIDIAN_OO_AUTH not set in <repo>/.env — OTLP export will be disabled"
@@ -246,6 +246,13 @@ configure_editor_accessibility() {
246
246
  # Insert the key after the first `{`. VS Code-family parsers are
247
247
  # JSONC-tolerant, so this preserves existing keys/comments/formatting.
248
248
  perl -0777 -i -pe 's/\{/\{\n\t"editor.accessibilitySupport": "on",/ unless $done++' "$settings"
249
+ # Sanity check: the key must appear in the file; if not, the regex
250
+ # found no `{` (unusual) or perl silently failed — restore backup.
251
+ if ! grep -q '"editor.accessibilitySupport"' "$settings" 2>/dev/null; then
252
+ warn "${ed}: settings.json edit failed — restoring backup"
253
+ cp "${settings}.meridian-bak" "$settings"
254
+ continue
255
+ fi
249
256
  fi
250
257
  ok "${ed}: enabled editor.accessibilitySupport = on"
251
258
  # The setting is read ONCE at editor boot. If the editor is running
@@ -287,7 +294,15 @@ fi
287
294
  command -v node >/dev/null 2>&1 || { info "Installing Node.js…"; brew install node; }
288
295
  PYTHON_BIN=""
289
296
  for p in python3.11 python3; do command -v "$p" >/dev/null 2>&1 && { PYTHON_BIN="$(command -v "$p")"; break; }; done
290
- [[ -n "${PYTHON_BIN}" ]] || { info "Installing Python 3.11…"; brew install python@3.11; PYTHON_BIN="$(command -v python3.11)"; }
297
+ if [[ -z "${PYTHON_BIN}" ]]; then
298
+ info "Installing Python 3.11…"
299
+ brew install python@3.11
300
+ # `command -v` may return empty in a non-interactive shell immediately after
301
+ # `brew install` because the formula's bin dir isn't in launchd's PATH yet.
302
+ # Resolve via `brew --prefix` which is always accurate.
303
+ PYTHON_BIN="$(brew --prefix python@3.11)/bin/python3.11"
304
+ [[ -x "${PYTHON_BIN}" ]] || PYTHON_BIN="$(command -v python3.11 2>/dev/null || true)"
305
+ fi
291
306
  # uv is the package/venv manager for Python services. Install via Homebrew (already
292
307
  # required by this installer) rather than the astral curl|sh installer.
293
308
  UV_BIN=""
@@ -296,7 +311,8 @@ if command -v uv >/dev/null 2>&1; then
296
311
  else
297
312
  info "Installing uv (Python package manager)…"
298
313
  brew install uv
299
- UV_BIN="$(command -v uv)"
314
+ UV_BIN="$(brew --prefix uv)/bin/uv"
315
+ [[ -x "${UV_BIN}" ]] || UV_BIN="$(command -v uv 2>/dev/null || true)"
300
316
  fi
301
317
  ok "node + python ($(${PYTHON_BIN} --version 2>&1)) + uv ($(${UV_BIN} --version 2>&1))"
302
318
 
@@ -558,7 +574,8 @@ elif [[ -d "${APP_ROOT}/ui" ]]; then
558
574
  ok "dashboard unchanged — reusing existing build"
559
575
  _ui_changed=0
560
576
  else
561
- err "Dashboard bundle missing: neither ui.tar.gz nor ui/ found in ${APP_ROOT}. Re-run the installer."
577
+ err "Dashboard bundle missing from ${APP_ROOT} — re-run the installer: curl -fsSL https://raw.githubusercontent.com/Meridiona/meridian/main/scripts/bootstrap.sh | bash"
578
+ exit 1
562
579
  fi
563
580
 
564
581
  # ── 6. Daemons — restart only what changed ───────────────────────────────────
@@ -579,10 +596,10 @@ _py_src_changed=1
579
596
  if [[ -f "${_PY_SRC_STAMP}" && "$(cat "${_PY_SRC_STAMP}")" == "${_py_src_hash}" ]]; then
580
597
  _py_src_changed=0
581
598
  fi
582
- echo "${_py_src_hash}" > "${_PY_SRC_STAMP}"
583
-
584
599
  if [[ "${_mlx_was_healthy}" -eq 1 && "${_venv_changed}" -eq 0 && "${_py_src_changed}" -eq 0 ]]; then
585
600
  ok "Python services unchanged — MLX server kept running"
601
+ # Stamp only when the server is confirmed healthy (skip case = already healthy).
602
+ echo "${_py_src_hash}" > "${_PY_SRC_STAMP}"
586
603
  else
587
604
  info "Installing MLX inference server launchd agent…"
588
605
  bash "${APP_ROOT}/services/scripts/install-mlx-server-daemon.sh" --port "${MLX_PORT}" || warn "MLX agent install failed"
@@ -591,7 +608,11 @@ else
591
608
  until curl -sf "http://127.0.0.1:${MLX_PORT}/health" >/dev/null 2>&1; do
592
609
  sleep 3; _w=$((_w+3)); [[ $_w -ge 300 ]] && { warn "MLX not ready after 300s — check: meridian logs mlx-server"; break; }
593
610
  done
594
- curl -sf "http://127.0.0.1:${MLX_PORT}/health" >/dev/null 2>&1 && ok "MLX server ready (${_w}s)"
611
+ # Only stamp after confirmed ready prevents stale stamp on a failed restart.
612
+ if curl -sf "http://127.0.0.1:${MLX_PORT}/health" >/dev/null 2>&1; then
613
+ ok "MLX server ready (${_w}s)"
614
+ echo "${_py_src_hash}" > "${_PY_SRC_STAMP}"
615
+ fi
595
616
  fi
596
617
 
597
618
  # Rust daemon: skip restart when binary is identical.
@@ -611,6 +632,8 @@ else
611
632
  fi
612
633
 
613
634
  # Persist component hashes for the next update's differential check.
635
+ # Write to a temp file and rename atomically so a crash mid-write never leaves
636
+ # a half-written or empty hash file (which would force a full reinstall).
614
637
  _final_ui_hash="${_new_ui_hash:-${_OLD_UI_HASH}}"
615
638
  {
616
639
  [[ -n "${_new_daemon_hash}" ]] && printf 'daemon_bin=%s\n' "${_new_daemon_hash}"
@@ -627,7 +650,7 @@ if [[ -f "${_skill_src}" ]]; then
627
650
  cp "${_skill_src}" "${_skill_dst}"
628
651
  ok "session-summary command → ~/.claude/commands/session-summary.md"
629
652
  else
630
- warn "session-summary skill not found in bundle (${_skill_src}) — skipping"
653
+ warn "session-summary skill not found in bundle — skipping (${_skill_src})"
631
654
  fi
632
655
 
633
656
  # Pipeline smoke test — verify both LLM stages return valid output (no DB writes).
@@ -34,6 +34,15 @@ if [[ -z "${NPM_BIN}" ]]; then
34
34
  echo "✗ npm not found in PATH — install Node.js 18+ and re-run" >&2
35
35
  exit 1
36
36
  fi
37
+ # Capture the node binary directory so launchd's restricted PATH includes it.
38
+ # `npm run start` invokes `next start` whose shebang resolves `node` via PATH;
39
+ # NVM / fnm / asdf install node outside /opt/homebrew and /usr/local, so the
40
+ # standard launchd PATH misses it. Injecting NODE_BIN_DIR fixes this.
41
+ NODE_BIN="$(command -v node 2>/dev/null || true)"
42
+ NODE_BIN_DIR_PREFIX=""
43
+ if [[ -n "${NODE_BIN}" ]]; then
44
+ NODE_BIN_DIR_PREFIX="$(dirname "${NODE_BIN}"):"
45
+ fi
37
46
 
38
47
  if [[ ! -d "${REPO_ROOT}/ui/.next" ]]; then
39
48
  echo "✗ ui/.next not found — run \`cd ui && npm ci && npm run build\` first" >&2
@@ -49,6 +58,7 @@ sed \
49
58
  -e "s|{{REPO_ROOT}}|${REPO_ROOT}|g" \
50
59
  -e "s|{{HOME}}|${HOME}|g" \
51
60
  -e "s|{{NPM_BIN}}|${NPM_BIN}|g" \
61
+ -e "s|{{NODE_BIN_DIR}}|${NODE_BIN_DIR_PREFIX}|g" \
52
62
  "${TEMPLATE}" > "${PLIST_DEST}"
53
63
 
54
64
  if ! plutil -lint "${PLIST_DEST}" >/dev/null; then
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "meridian-agents"
7
- version = "1.27.3"
7
+ version = "1.27.4"
8
8
  description = "Meridian agents — hermes task linking and Jira progress updates for meridian.db"
9
9
  requires-python = ">=3.11"
10
10
  authors = [{ name = "Meridiona" }]
package/ui.tar.gz ADDED
Binary file