niahere 0.2.3 → 0.2.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.
Files changed (2) hide show
  1. package/bin/nia +18 -1
  2. package/package.json +1 -1
package/bin/nia CHANGED
@@ -19,4 +19,21 @@ if ! command -v bun >/dev/null 2>&1; then
19
19
  exit 1
20
20
  fi
21
21
  fi
22
- exec bun "$(dirname "$0")/../src/cli/index.ts" "$@"
22
+
23
+ # Resolve the real path of this script (follows all symlinks)
24
+ REAL="$(realpath "$0" 2>/dev/null)" || REAL="$(perl -MCwd -e 'print Cwd::realpath($ARGV[0])' "$0" 2>/dev/null)" || REAL="$0"
25
+ # Go up from bin/ to package root
26
+ PACKAGE_DIR="$(dirname "$REAL")/.."
27
+ ENTRY="$PACKAGE_DIR/src/cli/index.ts"
28
+
29
+ if [ ! -f "$ENTRY" ]; then
30
+ # Fallback: try npm global root
31
+ ENTRY="$(npm root -g 2>/dev/null)/niahere/src/cli/index.ts"
32
+ fi
33
+
34
+ if [ ! -f "$ENTRY" ]; then
35
+ echo "Error: could not find niahere. Try: npm i -g niahere"
36
+ exit 1
37
+ fi
38
+
39
+ exec bun "$ENTRY" "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "niahere",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "A personal AI assistant daemon — scheduled jobs, chat across Telegram and Slack, persona system, and visual identity.",
5
5
  "type": "module",
6
6
  "scripts": {