@meridiona/meridian-darwin-arm64 1.26.1 → 1.26.2

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.26.1
1
+ 1.26.2
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.26.1",
3
+ "version": "1.26.2",
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": {
@@ -45,6 +45,7 @@ Commands:
45
45
  -n N Last N lines (default 100)
46
46
  doctor Run environment health checks (includes pipeline smoke)
47
47
  smoke Dry-run both LLM pipeline stages — no DB writes
48
+ migrate-db Apply pending database migrations (if UI shows schema errors)
48
49
  worklog-status Show today's PM worklogs (done/pending/drafted/posted + comments)
49
50
  [--day YYYY-MM-DD]
50
51
  config edit Open the repo-root .env in $EDITOR
@@ -605,6 +606,63 @@ _dev_ui_server() {
605
606
  fi
606
607
  }
607
608
 
609
+ cmd_migrate_db() {
610
+ local db="${HOME}/.meridian/meridian.db"
611
+
612
+ if [[ ! -f "${db}" ]]; then
613
+ err "database not found at ${db}"
614
+ exit 1
615
+ fi
616
+
617
+ info "Checking database schema…"
618
+ local has_claude_uuid
619
+ has_claude_uuid=$(sqlite3 "${db}" ".schema app_sessions" 2>/dev/null | grep -c "claude_session_uuid" || echo "0")
620
+
621
+ if [[ "${has_claude_uuid}" -gt 0 ]]; then
622
+ ok "database schema is up-to-date"
623
+ exit 0
624
+ fi
625
+
626
+ info "Database schema is incomplete — applying migrations…"
627
+ info "Stopping daemon (to prevent locks)…"
628
+ launchctl bootout "${GUI_TARGET}/${LABEL_DAEMON}" 2>/dev/null || true
629
+ sleep 2
630
+
631
+ local backup="${db}.backup.$(date +%s)"
632
+ info "Backing up database to ${backup}…"
633
+ cp "${db}" "${backup}"
634
+ ok "Backup created"
635
+
636
+ info "Running daemon to apply migrations (this may take 10-30 seconds)…"
637
+ local daemon_bin
638
+ daemon_bin="$(_daemon_bin)" || { err "daemon binary not found"; exit 1; }
639
+
640
+ # Run the daemon in the background; it will apply migrations on startup
641
+ set +e
642
+ timeout 60 "${daemon_bin}" >/dev/null 2>&1 &
643
+ local daemon_pid=$!
644
+ sleep 15 # Give it time to initialize and apply migrations
645
+ kill $daemon_pid 2>/dev/null || true
646
+ set -e
647
+
648
+ # Verify migrations applied
649
+ info "Verifying schema…"
650
+ has_claude_uuid=$(sqlite3 "${db}" ".schema app_sessions" 2>/dev/null | grep -c "claude_session_uuid" || echo "0")
651
+
652
+ if [[ "${has_claude_uuid}" -gt 0 ]]; then
653
+ ok "migrations applied successfully"
654
+ info "Restarting daemon…"
655
+ launchctl enable "${GUI_TARGET}/${LABEL_DAEMON}" 2>/dev/null || true
656
+ launchctl kickstart -k "${GUI_TARGET}/${LABEL_DAEMON}" 2>/dev/null || true
657
+ ok "Done. The UI should now work."
658
+ exit 0
659
+ else
660
+ err "migrations failed — database not updated"
661
+ info "To restore the backup: cp ${backup} ${db}"
662
+ exit 1
663
+ fi
664
+ }
665
+
608
666
  cmd_dev() {
609
667
  if ! _is_source_checkout; then
610
668
  err "'meridian dev' needs a source checkout (no Cargo.toml at ${REPO_ROOT})."
@@ -643,6 +701,7 @@ case "$CMD" in
643
701
  logs) cmd_logs "$@" ;;
644
702
  doctor) cmd_doctor "$@" ;;
645
703
  smoke) cmd_smoke "$@" ;;
704
+ migrate-db) cmd_migrate_db "$@" ;;
646
705
  config) cmd_config "$@" ;;
647
706
  dev) cmd_dev "$@" ;;
648
707
  uninstall) cmd_uninstall ;;
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "meridian-agents"
7
- version = "1.26.1"
7
+ version = "1.26.2"
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 CHANGED
Binary file