diff infinite_canvas/run_orchestration_dev.sh @ 282:6bd4a3990696 default tip

Add cross-platform canvas orchestration and typed composer Enable native ARM dependencies, macOS Copilot orchestration, portable service supervision, CPU dictation, and a shared N-key speak-or-type composer. Co-authored-by: Copilot <[email protected]> Copilot-Session: f68442b1-fa8f-46a0-9689-81710613bbd4
author MrJuneJune <me@mrjunejune.com>
date Thu, 20 Aug 2026 20:45:25 -0700
parents 49e9e591c9bb
children
line wrap: on
line diff
--- a/infinite_canvas/run_orchestration_dev.sh	Tue Aug 18 22:18:15 2026 -0700
+++ b/infinite_canvas/run_orchestration_dev.sh	Thu Aug 20 20:45:25 2026 -0700
@@ -4,6 +4,13 @@
 RUNFILES_ROOT="${RUNFILES_DIR:-$0.runfiles}"
 export RUNFILES_DIR="$RUNFILES_ROOT"
 
+resolve_path() {
+  local path="$1"
+  local directory
+  directory="$(cd "$(dirname "$path")" && pwd -P)"
+  printf '%s/%s\n' "$directory" "$(basename "$path")"
+}
+
 find_runfile() {
   local pattern="$1"
   local path
@@ -12,7 +19,21 @@
     echo "Could not locate orchestration runtime file: $pattern" >&2
     exit 1
   fi
-  realpath "$path"
+  resolve_path "$path"
+}
+
+find_runfile_any() {
+  local pattern
+  local path
+  for pattern in "$@"; do
+    path="$(find -L "$RUNFILES_ROOT" -path "$pattern" -print -quit)"
+    if [[ -n "$path" ]]; then
+      resolve_path "$path"
+      return 0
+    fi
+  done
+  echo "Could not locate orchestration runtime file" >&2
+  exit 1
 }
 
 find_config() {
@@ -24,7 +45,7 @@
     [[ "$candidate" != /mrjunejune/.config ]] || continue
     [[ "$candidate" != /.config/mrjunejune/.config ]] || continue
     if [[ -f "$candidate" ]]; then
-      realpath "$candidate"
+      resolve_path "$candidate"
       return 0
     fi
   done
@@ -59,13 +80,15 @@
 
 dictation="$(find_runfile '*/dictation/server')"
 dictation_bin="$(find_runfile '*/dictation/dictation_bin')"
-canvas="$(find_runfile '*/infinite_canvas/dev_linux')"
+canvas="$(find_runfile_any \
+  '*/infinite_canvas/dev_linux' \
+  '*/infinite_canvas/dev_bin')"
 sidecar_launcher="$(find_runfile '*/mrjunejune/inference_sidecar_launcher.sh')"
 sidecar_zip="$(find_runfile '*/mrjunejune/inference/copilot_sidecar.zip')"
 litellm_zip="$(find_runfile '*/mrjunejune/inference/litellm_proxy.zip')"
 litellm_config="$(find_runfile '*/mrjunejune/inference/litellm_config.yaml')"
-copilot_cli="$(find_runfile '*copilot_cli_linux_x86_64/copilot')"
-python="$(find_runfile '*python_3_11_x86_64-unknown-linux-gnu/bin/python3')"
+copilot_cli="$(find_runfile '*copilot_cli_*/copilot')"
+python="$(find_runfile '*python_3_11*/bin/python3')"
 
 config_file="$(find_config || true)"
 if [[ -z "$config_file" ]]; then
@@ -100,7 +123,7 @@
   local status=$?
   trap - EXIT INT TERM
   for pid in "${service_pids[@]}"; do
-    kill -- "-$pid" 2>/dev/null || kill "$pid" 2>/dev/null || true
+    kill "$pid" 2>/dev/null || true
   done
   for pid in "${service_pids[@]}"; do
     wait "$pid" 2>/dev/null || true
@@ -116,13 +139,13 @@
 export XDG_CACHE_HOME="$cache_root"
 export DICTATION_MODEL_DIR="${DICTATION_MODEL_DIR:-$HOME/.cache/zenbu/faster-whisper-small}"
 export LITELLM_MASTER_KEY
-setsid "$python" "$litellm_zip" \
+"$python" "$litellm_zip" \
   --config "$litellm_config" \
   --host "$litellm_host" \
   --port "$litellm_port" &
 service_pids+=("$!")
 
-setsid "$dictation" "$dictation_bin" server &
+"$dictation" "$dictation_bin" server &
 service_pids+=("$!")
 
 for _ in {1..150}; do