karnel-termux 4.16.4 → 4.16.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.
@@ -1 +1 @@
1
- a752d0efbec23e962487065c86fd1b87d276f8dd
1
+ 8fe9d579a4a8d7fbcab5a8495b1bba025dc684a9
@@ -204,6 +204,9 @@ _install_specific_tools() {
204
204
  done
205
205
 
206
206
  for tool in "${tools[@]}"; do
207
+ # Accept the binary/command name (e.g. --agy) or display name as an
208
+ # alias for the canonical install flag (e.g. --antigravity-cli).
209
+ tool="$(_ai_tool_resolve "$tool")"
207
210
  local func_name="install_${tool//-/_}"
208
211
 
209
212
  if [[ -z "${_tool_binaries[$tool]+registered}" ]]; then
@@ -151,9 +151,34 @@ _ai_tool_registered() {
151
151
  return 1
152
152
  }
153
153
 
154
+ # Resolve a user token (install flag, binary name, or display name,
155
+ # case-insensitive) to the canonical registry id. Echoes the id and
156
+ # returns 0 when a match is found, otherwise echoes the token unchanged
157
+ # and returns 1.
158
+ _ai_tool_resolve() {
159
+ local token="$1" entry id name bins
160
+ for entry in "${AI_TOOLS_REGISTRY[@]}"; do
161
+ IFS=':' read -r id name bins <<< "$entry"
162
+ [[ "$id" == "$token" ]] && { echo "$id"; return 0; }
163
+ [[ "$name" == "$token" ]] && { echo "$id"; return 0; }
164
+ [[ "${name,,}" == "${token,,}" ]] && { echo "$id"; return 0; }
165
+ local IFS=',' b
166
+ for b in $bins; do
167
+ [[ "$b" == "$token" ]] && { echo "$id"; return 0; }
168
+ done
169
+ done
170
+ echo "$token"
171
+ return 1
172
+ }
173
+
154
174
  _run_ai_tool_action() {
155
175
  local action="$1"
156
176
  local id="$2"
177
+
178
+ # Accept the binary/command name (e.g. --agy) or display name as aliases
179
+ # for the canonical install flag (e.g. --antigravity-cli).
180
+ id="$(_ai_tool_resolve "$id")"
181
+
157
182
  local func_name="${action}_${id//-/_}"
158
183
 
159
184
  # A specific --<tool> was requested: skip nested interactive menus and
@@ -479,9 +479,15 @@ install_cactus() {
479
479
  log_info "Select installation method for Cactus:"
480
480
 
481
481
  local SELECTED_METHOD
482
- read_select "Installation method" SELECTED_METHOD \
483
- "glibc (recommended)" \
484
- "proot-distro (ubuntu container)"
482
+ if [[ "$CACTUS_EMULATE" == 1 ]]; then
483
+ read_select "Installation method" SELECTED_METHOD \
484
+ "proot-distro (ubuntu container)" \
485
+ "glibc (not recommended: engine SIGILLs on this CPU)"
486
+ else
487
+ read_select "Installation method" SELECTED_METHOD \
488
+ "glibc (recommended)" \
489
+ "proot-distro (ubuntu container)"
490
+ fi
485
491
 
486
492
  case "$SELECTED_METHOD" in
487
493
  *glibc*)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karnel-termux",
3
- "version": "4.16.4",
3
+ "version": "4.16.6",
4
4
  "description": "Modular Dev Environment for Termux — install languages, databases, AI agents, editors, and more with one command",
5
5
  "bin": {
6
6
  "karnel": "karnel/bin/karnel"