@ddtcorex/dsh-maestro-supervisor 0.7.5 → 0.7.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddtcorex/dsh-maestro-supervisor",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "Supervisor daemon for DSH Web resilience — auto-detect crashes, rollback to LKG, report",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -15,7 +15,15 @@ marker="${DSH_SUPERVISOR_MARKER:-$HOME/.dsh/.supervisor/planned-restart}"
15
15
  # the script's own path — never a hard-coded location.
16
16
  dsh_home="${DSH_HOME:-$HOME/.dsh}"
17
17
  export SESSIONS_ROOT="${SESSIONS_ROOT:-$dsh_home/sessions}"
18
- PLUGIN_DIR="${DSH_SUPERVISOR_PLUGIN_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}"
18
+ # Resolve the script's real location first: when invoked through a symlinked
19
+ # skill path (e.g. ~/.agents/skills/dsh-safe-restart/...), BASH_SOURCE keeps the
20
+ # link and "../../.." lands in ~/.agents — breaking the session-health preflight
21
+ # import (lib/session-health.js). readlink -f recovers the package checkout.
22
+ SCRIPT_SRC="${BASH_SOURCE[0]}"
23
+ if resolved="$(readlink -f "$SCRIPT_SRC" 2>/dev/null)" && [ -n "$resolved" ]; then
24
+ SCRIPT_SRC="$resolved"
25
+ fi
26
+ PLUGIN_DIR="${DSH_SUPERVISOR_PLUGIN_DIR:-$(cd "$(dirname "$SCRIPT_SRC")/../../.." && pwd)}"
19
27
  confirmed=false
20
28
  dry_run=false
21
29
  auto_mode=false