@codexstar/pi-listen 1.0.5 → 1.0.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": "@codexstar/pi-listen",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Voice input, first-run onboarding, and side-channel BTW conversations for Pi",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -1,8 +1,17 @@
1
1
  #!/usr/bin/env bash
2
- set -euo pipefail
2
+ set -eo pipefail
3
3
 
4
- SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
5
- PACKAGE_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)"
4
+ # When piped from curl, BASH_SOURCE is empty — detect and handle gracefully
5
+ if [[ -n "${BASH_SOURCE[0]:-}" && "${BASH_SOURCE[0]}" != "bash" ]]; then
6
+ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
7
+ PACKAGE_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)"
8
+ else
9
+ SCRIPT_DIR=""
10
+ PACKAGE_ROOT=""
11
+ fi
12
+
13
+ # Enable nounset after handling BASH_SOURCE
14
+ set -u
6
15
 
7
16
  MODE="local"
8
17
  BACKEND="faster-whisper"
@@ -171,6 +180,12 @@ PY
171
180
  }
172
181
 
173
182
  smoke_test() {
183
+ if [[ -z "$PACKAGE_ROOT" ]]; then
184
+ log "Skipping daemon smoke test (running via curl pipe — daemon.py not available locally)"
185
+ log "Run '/voice test' inside pi to verify the full pipeline"
186
+ return 0
187
+ fi
188
+
174
189
  local backend model socket log_file err_file
175
190
  backend="$(selected_backend)"
176
191
  model="$(selected_model)"