Repository navigation
Mise: no forced release-age 0; SSE4.2 agent skip; keep OpenClaw CLI #11514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: quattro
Are you sure you want to change the base?
Changes from 7 commits
4ca1fac
5cccd33
276c2cf
cf2508e
58daba3
58617fd
59942cf
c763921
c00f1dd
5a8b170
05e060d
3a17cbe
6a3827d
b429cb6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| #!/bin/bash | ||
|
|
||
| # omarchy:summary=Returns true when the CPU has SSE4.2 and POPCNT, or is not x86_64. | ||
|
|
||
| # Bun's linux-x64 target needs SSE4.2 and POPCNT. x86-64-v1 CPUs (Core 2 Duo, | ||
| # first-gen Atom, …) install the natives then SIGILL. ARM/aarch64 — including | ||
| # Apple Silicon and Asahi — uses a different build and should still install. | ||
| # | ||
| # OMARCHY_CPUINFO and OMARCHY_ARCH override /proc/cpuinfo and uname for tests. | ||
|
|
||
| cpuinfo=${OMARCHY_CPUINFO:-/proc/cpuinfo} | ||
| arch=${OMARCHY_ARCH:-} | ||
|
|
||
| cpu_has_bun_x64_flags() { | ||
| local flags=$1 | ||
|
|
||
| [[ " $flags " == *" sse4_2 "* && " $flags " == *" popcnt "* ]] | ||
| } | ||
|
|
||
| if [[ -z $arch && -r $cpuinfo ]]; then | ||
| if grep -q '^flags[[:space:]]*:' "$cpuinfo"; then | ||
| arch=x86_64 | ||
| elif grep -qiE '^(features|cpu architecture)[[:space:]]*:' "$cpuinfo"; then | ||
| arch=aarch64 | ||
| fi | ||
| fi | ||
|
|
||
| if [[ -z $arch ]]; then | ||
| arch=$(uname -m) | ||
| fi | ||
|
|
||
| case $arch in | ||
| aarch64 | arm64) | ||
| exit 0 | ||
| ;; | ||
| esac | ||
|
|
||
| flags="" | ||
| if [[ -r $cpuinfo ]]; then | ||
| flags=$(awk -F: '/^flags[[:space:]]*:/{print $2; exit}' "$cpuinfo") | ||
| fi | ||
|
|
||
| if [[ -z $flags ]] && command -v lscpu >/dev/null; then | ||
| flags=$(lscpu 2>/dev/null | awk -F: '/^Flags:/{print $2; exit}') | ||
| fi | ||
|
|
||
| cpu_has_bun_x64_flags "$flags" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/bin/bash | ||
|
|
||
| # omarchy:summary=Install a Bun linux-x64 agent when the CPU can run it. | ||
| # omarchy:args=<package> [command-name [bin-name]] | ||
| # omarchy:hidden=true | ||
|
|
||
| # Claude and Pi ship Bun linux-x64 natives that SIGILL without SSE4.2/POPCNT. | ||
| # Skip (don't install) on incompatible x86; ARM/aarch64 still installs. | ||
|
|
||
| if [[ -z $1 ]]; then | ||
| echo "Usage: omarchy-mise-install-bun <package> [command-name [bin-name]]" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if omarchy-hw-cpu-sse4_2; then | ||
| omarchy-mise-install "$@" | ||
| else | ||
| echo "Skipping $1: this CPU lacks SSE4.2/POPCNT, which Bun's linux-x64 builds need" | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #!/bin/bash | ||
|
|
||
| # omarchy:summary=True when OpenClaw is already available (package or PATH) | ||
| # omarchy:hidden=true | ||
|
|
||
| # The Install > AI entry used to key only on the pacman package. A newer | ||
| # OpenClaw installed outside the package (npm, a manual build) still puts | ||
| # `openclaw` on PATH and may already be running a gateway. Re-offering the | ||
| # package in that state can put an older /usr/bin/openclaw ahead of the | ||
| # working one and break a migrated state database. | ||
|
|
||
| if omarchy-pkg-present openclaw 2>/dev/null; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| if command -v openclaw >/dev/null 2>&1; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| exit 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,13 +20,13 @@ if gum confirm "Are you sure you want to remove all preinstalled web apps, TUI w | |
| # Cursor's own installer links ~/.local/bin/cursor-agent as well, so only | ||
| # the mise wrapper omarchy-mise-install wrote is a preinstall. | ||
| if [[ -f ~/.local/bin/cursor-agent && ! -L ~/.local/bin/cursor-agent ]] && | ||
| grep -Eq '^mise use -g .*"cursor-agent"' ~/.local/bin/cursor-agent; then | ||
| grep -Eq '(^mise use -g .*"cursor-agent"|^exec mise x "cursor-agent" -- "cursor-agent" "\$@"$)' ~/.local/bin/cursor-agent; then | ||
| rm -f ~/.local/bin/cursor-agent | ||
| fi | ||
|
|
||
| # Preserve a user-managed Muse launcher at the same path. | ||
| if [[ -f ~/.local/bin/muse && ! -L ~/.local/bin/muse ]] && | ||
| grep -Eq '^mise use -g .*"http:muse\[' ~/.local/bin/muse; then | ||
| grep -Eq '^(mise use -g .*"http:muse\[|exec mise x "http:muse\[)' ~/.local/bin/muse; then | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If a user-maintained Muse launcher contains a line beginning Knowledge Base Used: Migration framework |
||
| rm -f ~/.local/bin/muse | ||
| fi | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| echo "Stop mise wrappers from rewriting global config on every run" | ||
|
|
||
| # Wrappers used to call `mise use -g` before every exec. That mutates global | ||
| # mise state and races when a caller times out mid-install (#11886). | ||
| # omarchy-mise-install now pins once at install time and writes an exec-only | ||
| # wrapper; rewrite any still-mutating wrappers through it. | ||
|
|
||
| bin_dir="$HOME/.local/bin" | ||
| [[ -d $bin_dir ]] || exit 0 | ||
|
|
||
| for wrapper in "$bin_dir"/*; do | ||
| [[ -f $wrapper && ! -L $wrapper && -r $wrapper ]] || continue | ||
|
|
||
| # ~/.local/bin also holds real binaries; skip anything that is not a short | ||
| # shell wrapper. Prefer portable size checks over GNU stat -c. | ||
| size=$(wc -c <"$wrapper" | tr -d ' ') | ||
| (( size <= 1024 )) || continue | ||
|
|
||
| contents=$(<"$wrapper") | ||
|
|
||
| # Only rewrite wrappers that still mutate global config on each run. | ||
| grep -q '^mise use -g' <<<"$contents" || continue | ||
|
|
||
| package=$(sed -n -E \ | ||
| -e 's/^mise use -g --quiet "([^"]+)"( \|\| exit 1)?$/\1/p' \ | ||
| -e 's/^mise use -g "([^"]+)"( \|\| exit 1)?$/\1/p' \ | ||
| <<<"$contents" | head -n1) | ||
| bin=$(sed -n -E \ | ||
| -e 's/^exec mise x ".*" -- "([^"]+)" "\$@"$/\1/p' \ | ||
| -e 's/^exec mise exec ".*" -- "([^"]+)" "\$@"$/\1/p' \ | ||
| -e 's/^exec "([^"]+)" "\$@"$/\1/p' \ | ||
| <<<"$contents" | head -n1) | ||
|
|
||
| [[ -n $package && -n $bin ]] || continue | ||
|
|
||
| omarchy-mise-install "$package" "${wrapper##*/}" "$bin" | ||
|
greptile-apps[bot] marked this conversation as resolved.
Resolved
|
||
| done | ||
Uh oh!
There was an error while loading. Please reload this page.