apps/route: AI trip planner on MapView — tool broker + local/cloud agent dispatch, nav session + simulated drive, layers/theme state, DDG image search, trip history, tilt-shift DOF layer (linear circle-of-confusion: level = log2 of radius, constant growth rate, tilt raises only the ceiling; tilt-shift on by default). Platform: Cx geo location API (macOS/iOS/Android/web) + permission plumbing, memory watchdog, headless build cfg. Map: nav layer M0 API, landcover drape, bridge dz. Geodata: 250m dual-radar compositor (radar_volume) + KNMI sync. Docs for the route/glass/blur/shiny work. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
27 lines
1.1 KiB
Bash
Executable file
27 lines
1.1 KiB
Bash
Executable file
#!/bin/zsh
|
|
|
|
set -euo pipefail
|
|
|
|
REAL_XCRUN=/usr/bin/xcrun
|
|
METAL_BIN=/private/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.7003.10.6SAP8k/Metal.xctoolchain/usr/bin/metal
|
|
MODULE_CACHE=/tmp/mlx-metal-module-cache
|
|
LOG_FILE=/tmp/mlx-xcrun.log
|
|
|
|
args=("$@")
|
|
print -r -- "${(j: :)args}" >> "$LOG_FILE"
|
|
|
|
if (( ${#args[@]} >= 3 )) && [[ "${args[1]}" == "-sdk" || "${args[1]}" == "--sdk" ]] && [[ "${args[3]}" == "metal" ]]; then
|
|
metal_args=("${args[4,-1]}")
|
|
if (( ${#metal_args[@]} == 1 )) && [[ "${metal_args[1]}" == *" "* ]]; then
|
|
metal_args=(${=metal_args[1]})
|
|
fi
|
|
metal_arg_string="${(j: :)metal_args}"
|
|
if [[ "$metal_arg_string" == *" -E "* || "$metal_arg_string" == "-E "* || "$metal_arg_string" == *" -E" ]] && [[ "$metal_arg_string" == *" -P "* || "$metal_arg_string" == "-P "* || "$metal_arg_string" == *" -P" ]] && [[ "${metal_args[-1]}" == "-" ]]; then
|
|
print '400'
|
|
exit 0
|
|
fi
|
|
mkdir -p "$MODULE_CACHE"
|
|
exec "$METAL_BIN" -fmodules-cache-path="$MODULE_CACHE" "${metal_args[@]}"
|
|
fi
|
|
|
|
exec "$REAL_XCRUN" "$@"
|