karnel-termux 4.16.0 → 4.16.3
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/README.md +4 -2
- package/docs/CHANGELOG.md +16 -0
- package/docs/README.md +4 -0
- package/install.sh +0 -0
- package/karnel/bin/karnel +0 -0
- package/karnel/cli/commands/agent.sh +9 -0
- package/karnel/cli/commands/help.sh +0 -0
- package/karnel/tools/ai/all.sh +0 -0
- package/karnel/tools/ai/antigravity-cli/install.sh +0 -0
- package/karnel/tools/ai/cactus/install.sh +26 -14
- package/karnel/tools/ai/claude-code/install.sh +0 -0
- package/karnel/tools/ai/cline/bin/cline +0 -0
- package/karnel/tools/ai/cline/install.sh +0 -0
- package/karnel/tools/ai/codebuff/bin/codebuff +0 -0
- package/karnel/tools/ai/codebuff/install.sh +0 -0
- package/karnel/tools/ai/codegraph/install.sh +0 -0
- package/karnel/tools/ai/codex/install.sh +0 -0
- package/karnel/tools/ai/command-code/install.sh +0 -0
- package/karnel/tools/ai/copilot-termux/install.sh +0 -0
- package/karnel/tools/ai/crush/install.sh +0 -0
- package/karnel/tools/ai/ctx7/install.sh +0 -0
- package/karnel/tools/ai/engram/install.sh +0 -0
- package/karnel/tools/ai/gemini-cli/install.sh +0 -0
- package/karnel/tools/ai/gentle-ai/install.sh +0 -0
- package/karnel/tools/ai/gga/install.sh +0 -0
- package/karnel/tools/ai/gga/termux.patch +0 -0
- package/karnel/tools/ai/hermes-agent/install.sh +0 -0
- package/karnel/tools/ai/kilocode-cli/install.sh +0 -0
- package/karnel/tools/ai/kimchi-code/install.sh +0 -0
- package/karnel/tools/ai/kimi-code/install.sh +0 -0
- package/karnel/tools/ai/kiro/install.sh +0 -0
- package/karnel/tools/ai/mimocode/install.sh +0 -0
- package/karnel/tools/ai/minimax-cli/install.sh +0 -0
- package/karnel/tools/ai/mistral-vibe/install.sh +0 -0
- package/karnel/tools/ai/odysseus/install.sh +0 -0
- package/karnel/tools/ai/ollama/install.sh +0 -0
- package/karnel/tools/ai/omni-route/install.sh +0 -0
- package/karnel/tools/ai/openclaude/install.sh +0 -0
- package/karnel/tools/ai/openclaw/install.sh +0 -0
- package/karnel/tools/ai/opencode/install.sh +0 -0
- package/karnel/tools/ai/openspec/install.sh +0 -0
- package/karnel/tools/ai/pi/install.sh +0 -0
- package/karnel/tools/ai/qwen-code/install.sh +0 -0
- package/karnel/tools/auto/n8n/install.sh +0 -0
- package/karnel/tools/db/mariadb/install.sh +0 -0
- package/karnel/tools/db/mongodb/install.sh +0 -0
- package/karnel/tools/db/postgresql/install.sh +0 -0
- package/karnel/tools/db/redis/install.sh +0 -0
- package/karnel/tools/db/sqlite/install.sh +0 -0
- package/karnel/tools/deploy/netlify/install.sh +0 -0
- package/karnel/tools/deploy/railway/install.sh +0 -0
- package/karnel/tools/deploy/vercel/install.sh +0 -0
- package/karnel/tools/dev/bat/install.sh +0 -0
- package/karnel/tools/dev/bc/install.sh +0 -0
- package/karnel/tools/dev/cloudflared/install.sh +0 -0
- package/karnel/tools/dev/curl/install.sh +0 -0
- package/karnel/tools/dev/fzf/install.sh +0 -0
- package/karnel/tools/dev/gh/install.sh +0 -0
- package/karnel/tools/dev/html2text/install.sh +0 -0
- package/karnel/tools/dev/imagemagick/install.sh +0 -0
- package/karnel/tools/dev/jq/install.sh +0 -0
- package/karnel/tools/dev/lsd/install.sh +0 -0
- package/karnel/tools/dev/make/install.sh +0 -0
- package/karnel/tools/dev/ncurses/install.sh +0 -0
- package/karnel/tools/dev/openssh/install.sh +0 -0
- package/karnel/tools/dev/proot/install.sh +0 -0
- package/karnel/tools/dev/shfmt/install.sh +0 -0
- package/karnel/tools/dev/snyk/install.sh +0 -0
- package/karnel/tools/dev/tmate/install.sh +0 -0
- package/karnel/tools/dev/tmux/install.sh +0 -0
- package/karnel/tools/dev/translate/install.sh +0 -0
- package/karnel/tools/dev/tree/install.sh +0 -0
- package/karnel/tools/dev/udocker/install.sh +0 -0
- package/karnel/tools/dev/wget/install.sh +0 -0
- package/karnel/tools/editor/code-server/install.sh +0 -0
- package/karnel/tools/editor/neovim/install.sh +0 -0
- package/karnel/tools/editor/nvchad/install.sh +0 -0
- package/karnel/tools/games/arcade/install.sh +0 -0
- package/karnel/tools/games/buzz/install.sh +0 -0
- package/karnel/tools/games/ctfgod/install.sh +0 -0
- package/karnel/tools/games/detective/install.sh +0 -0
- package/karnel/tools/games/pet-friends/install.sh +0 -0
- package/karnel/tools/games/tamagotchi/install.sh +0 -0
- package/karnel/tools/lang/bun/bin/bunx +0 -0
- package/karnel/tools/lang/bun/install.sh +0 -0
- package/karnel/tools/lang/clang/install.sh +0 -0
- package/karnel/tools/lang/golang/install.sh +0 -0
- package/karnel/tools/lang/nodejs/install.sh +0 -0
- package/karnel/tools/lang/perl/install.sh +0 -0
- package/karnel/tools/lang/php/install.sh +0 -0
- package/karnel/tools/lang/python/install.sh +0 -0
- package/karnel/tools/lang/rust/install.sh +0 -0
- package/karnel/tools/network/dark/install.sh +0 -0
- package/karnel/tools/network/dedsec-network/install.sh +0 -0
- package/karnel/tools/npm/live-server/install.sh +0 -0
- package/karnel/tools/npm/localtunnel/install.sh +0 -0
- package/karnel/tools/npm/markserv/install.sh +0 -0
- package/karnel/tools/npm/ncu/install.sh +0 -0
- package/karnel/tools/npm/nestjs/install.sh +0 -0
- package/karnel/tools/npm/ngrok/install.sh +0 -0
- package/karnel/tools/npm/prettier/install.sh +0 -0
- package/karnel/tools/npm/psqlformat/install.sh +0 -0
- package/karnel/tools/npm/turbopack/install.sh +0 -0
- package/karnel/tools/npm/typescript/install.sh +0 -0
- package/karnel/tools/npm/vercel/install.sh +0 -0
- package/karnel/tools/osint/robin/common.sh +0 -0
- package/karnel/tools/osint/robin/install.sh +0 -0
- package/karnel/tools/security/aircrack-ng/install.sh +0 -0
- package/karnel/tools/security/amass/install.sh +0 -0
- package/karnel/tools/security/binwalk/install.sh +0 -0
- package/karnel/tools/security/burpsuite/install.sh +0 -0
- package/karnel/tools/security/dirb/install.sh +0 -0
- package/karnel/tools/security/dnsrecon/install.sh +0 -0
- package/karnel/tools/security/enum4linux/install.sh +0 -0
- package/karnel/tools/security/exiftool/install.sh +0 -0
- package/karnel/tools/security/ffuf/install.sh +0 -0
- package/karnel/tools/security/foremost/install.sh +0 -0
- package/karnel/tools/security/gobuster/install.sh +0 -0
- package/karnel/tools/security/hashcat/install.sh +0 -0
- package/karnel/tools/security/hydra/install.sh +0 -0
- package/karnel/tools/security/john/install.sh +0 -0
- package/karnel/tools/security/masscan/install.sh +0 -0
- package/karnel/tools/security/metasploit/install.sh +0 -0
- package/karnel/tools/security/netcat/install.sh +0 -0
- package/karnel/tools/security/nikto/install.sh +0 -0
- package/karnel/tools/security/nmap/install.sh +0 -0
- package/karnel/tools/security/smbclient/install.sh +0 -0
- package/karnel/tools/security/sqlmap/install.sh +0 -0
- package/karnel/tools/security/steghide/install.sh +0 -0
- package/karnel/tools/security/subfinder/install.sh +0 -0
- package/karnel/tools/security/tcpdump/install.sh +0 -0
- package/karnel/tools/security/theharvester/install.sh +0 -0
- package/karnel/tools/security/wafw00f/install.sh +0 -0
- package/karnel/tools/security/whatweb/install.sh +0 -0
- package/karnel/tools/security/whois/install.sh +0 -0
- package/karnel/tools/security/wpscan/install.sh +0 -0
- package/karnel/tools/security/zap/install.sh +0 -0
- package/karnel/tools/shell/better-npm/install.sh +0 -0
- package/karnel/tools/shell/fzf-tab/install.sh +0 -0
- package/karnel/tools/shell/history-substring/install.sh +0 -0
- package/karnel/tools/shell/powerlevel10k/install.sh +0 -0
- package/karnel/tools/shell/you-should-use/install.sh +0 -0
- package/karnel/tools/shell/zsh-autopair/install.sh +0 -0
- package/karnel/tools/shell/zsh-autosuggestions/install.sh +0 -0
- package/karnel/tools/shell/zsh-completions/install.sh +0 -0
- package/karnel/tools/shell/zsh-defer/install.sh +0 -0
- package/karnel/tools/shell/zsh-syntax-highlighting/install.sh +0 -0
- package/karnel/tools/ui/banner/install.sh +0 -0
- package/karnel/tools/ui/cursor/install.sh +0 -0
- package/karnel/tools/ui/extra-keys/install.sh +0 -0
- package/karnel/tools/ui/font/install.sh +0 -0
- package/karnel/tools/utils/applaunch/applaunch.py +0 -0
- package/karnel/tools/utils/applaunch/install.sh +0 -0
- package/karnel/tools/utils/fconv/fconv.py +0 -0
- package/karnel/tools/utils/fconv/install.sh +0 -0
- package/karnel/tools/utils/filecheck/filecheck.py +0 -0
- package/karnel/tools/utils/filecheck/install.sh +0 -0
- package/karnel/tools/utils/httptmux/install.sh +0 -0
- package/karnel/tools/utils/notes/install.sh +0 -0
- package/karnel/tools/utils/notes/notes.py +0 -0
- package/karnel/tools/utils/passman/install.sh +0 -0
- package/karnel/tools/utils/passman/passman.py +0 -0
- package/karnel/tools/utils/qrcode/install.sh +0 -0
- package/karnel/tools/utils/qrcode/qrcode.py +0 -0
- package/karnel/tools/utils/splash/install.sh +0 -0
- package/karnel/tools/utils/splash/splash.py +0 -0
- package/karnel/tools/utils/treex/install.sh +0 -0
- package/karnel/tools/utils/treex/treex.py +0 -0
- package/karnel/tools/utils/websites/install.sh +0 -0
- package/karnel/tools/utils/websites/websites.py +0 -0
- package/karnel/tools/utils/zork/install.sh +0 -0
- package/karnel/tools/utils/zork/zork.sh +0 -0
- package/karnel/utils/agent_actions.sh +22 -5
- package/karnel/utils/agent_llm.sh +15 -2
- package/package.json +3 -2
- package/karnel/RELEASE_COMMIT +0 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://github.com/israelmarques1024-dotcom/karnel-termux">
|
|
11
|
-
<img src="https://img.shields.io/badge/version-4.16.
|
|
11
|
+
<img src="https://img.shields.io/badge/version-4.16.1-0078D4?style=for-the-badge" alt="Version">
|
|
12
12
|
</a>
|
|
13
13
|
<a href="https://www.npmjs.com/package/karnel-termux">
|
|
14
14
|
<img src="https://img.shields.io/npm/v/karnel-termux?style=for-the-badge&logo=npm&color=cb3837" alt="npm">
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
|
|
37
37
|
Created by **Israel Marques**.
|
|
38
38
|
|
|
39
|
+
Core agent contributions by **devcorex**.
|
|
40
|
+
|
|
39
41
|
- **43 AI tools** — Claude, Gemini, OpenCode, Cactus, Hugging Face, Ollama, KeelCode, Goose, Factory Droid and more
|
|
40
42
|
- **8 languages** — Node.js, Python, Go, Rust, C/C++, PHP, Perl, Bun
|
|
41
43
|
- **5 databases** — PostgreSQL, MariaDB, SQLite, MongoDB, Redis
|
|
@@ -62,7 +64,7 @@ Created by **Israel Marques**.
|
|
|
62
64
|
### Via checksummed GitHub release (recommended)
|
|
63
65
|
|
|
64
66
|
```bash
|
|
65
|
-
version=4.16.
|
|
67
|
+
version=4.16.1
|
|
66
68
|
tmpdir=$(mktemp -d) && trap 'rm -rf "$tmpdir"' EXIT
|
|
67
69
|
base="https://github.com/israelmarques1024-dotcom/karnel-termux/releases/download/v$version"
|
|
68
70
|
curl -fsSL "$base/karnel-termux-install.sh" -o "$tmpdir/karnel-termux-install.sh"
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Documentation Changelog
|
|
2
2
|
|
|
3
|
+
## 4.16.1 - 2026-08-22
|
|
4
|
+
|
|
5
|
+
- `karnel agent ask/run`: when the model endpoint is unreachable and Cactus is
|
|
6
|
+
not installed, the agent now says so explicitly and offers to install Cactus
|
|
7
|
+
on the spot (`karnel install ai --cactus`) instead of printing a generic
|
|
8
|
+
"start your server" hint that referenced a binary the user did not have.
|
|
9
|
+
- Cactus glibc installer: fresh installs are now pinned to the tested
|
|
10
|
+
`cactus-compute` version (2.0.1) — the previous unpinned spec silently pulled
|
|
11
|
+
2.1.x with a ~1.5 GB torch/CUDA dependency chain; updates keep the
|
|
12
|
+
`>=2,<3` range used by the proot path.
|
|
13
|
+
- Cactus glibc installer: pip output is now streamed live (and mirrored to the
|
|
14
|
+
install log) instead of being hidden behind an indeterminate spinner, which
|
|
15
|
+
made multi-minute downloads look frozen.
|
|
16
|
+
- Credits: devcorex credited as a core agent contributor in `karnel agent`
|
|
17
|
+
help/REPL screens and project READMEs.
|
|
18
|
+
|
|
3
19
|
## 4.16.0 - 2026-08-20
|
|
4
20
|
|
|
5
21
|
- Rebranded fully to Karnel: removed every remaining reference to DevCoreX and
|
package/docs/README.md
CHANGED
|
@@ -29,3 +29,7 @@ With a single CLI (`karnel`), you can install and manage 43 AI tools, 8 language
|
|
|
29
29
|
- **[Supabase CLI](./cli/README.md#supabase--remote-project-helpers)** — `karnel supabase` remote-project helpers
|
|
30
30
|
- **[Architecture](./ARCHITECTURE.md)** — Project structure, module system, import mechanism
|
|
31
31
|
- **[Changelog](./CHANGELOG.md)** — Version history, bug fixes, known issues
|
|
32
|
+
|
|
33
|
+
## Credits
|
|
34
|
+
|
|
35
|
+
Created by **Israel Marques**. Core agent contributions by **devcorex**.
|
package/install.sh
CHANGED
|
File without changes
|
package/karnel/bin/karnel
CHANGED
|
File without changes
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
# and DESCRIBES. bash EXECUTES. In the REPLs (and -p prompts on a
|
|
14
14
|
# TTY) typing `@query` opens an fzf picker to attach a file's
|
|
15
15
|
# contents to your message.
|
|
16
|
+
#
|
|
17
|
+
# Credits:
|
|
18
|
+
# devcorex — core agent contributor
|
|
16
19
|
# ============================================================
|
|
17
20
|
|
|
18
21
|
import "@/utils/log"
|
|
@@ -28,6 +31,8 @@ agent_help() {
|
|
|
28
31
|
echo
|
|
29
32
|
box "Karnel Agent — Local AI Assistant & Task Agent"
|
|
30
33
|
echo
|
|
34
|
+
printf " ${D_GRAY}credits: devcorex — core agent${D_NC}\n"
|
|
35
|
+
echo
|
|
31
36
|
log_info "Usage: karnel agent <ask|run|config> [options]"
|
|
32
37
|
echo
|
|
33
38
|
separator_section "Subcommands"
|
|
@@ -552,6 +557,8 @@ agent_ask_repl() {
|
|
|
552
557
|
agent_banner
|
|
553
558
|
separator_section "Karnel Agent — Ask"
|
|
554
559
|
echo
|
|
560
|
+
printf " ${D_GRAY}credits: devcorex — core agent${D_NC}\n"
|
|
561
|
+
echo
|
|
555
562
|
agent_status_line
|
|
556
563
|
echo
|
|
557
564
|
list_item "Type ${D_CYAN}/help${D_NC} to see all commands"
|
|
@@ -667,6 +674,8 @@ agent_run_repl() {
|
|
|
667
674
|
agent_banner
|
|
668
675
|
separator_section "Karnel Agent — Run ($([[ $AGENT_PLAN_MODE == 1 ]] && echo 'PLAN · read-only' || echo 'BUILD mode'))"
|
|
669
676
|
echo
|
|
677
|
+
printf " ${D_GRAY}credits: devcorex — core agent${D_NC}\n"
|
|
678
|
+
echo
|
|
670
679
|
agent_status_line
|
|
671
680
|
echo
|
|
672
681
|
list_item "Type ${D_CYAN}/help${D_NC} to see all commands"
|
|
File without changes
|
package/karnel/tools/ai/all.sh
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -188,7 +188,10 @@ _cactus_write_wrapper() {
|
|
|
188
188
|
cat >"$temporary" <<EOF
|
|
189
189
|
#!$PREFIX/bin/bash
|
|
190
190
|
# Karnel-managed Cactus wrapper (qemu-aarch64 emulation)
|
|
191
|
-
|
|
191
|
+
# The server loads the engine via ctypes inside the python process, so the
|
|
192
|
+
# whole interpreter must run under qemu-aarch64; CACTUS_EMULATE=1 makes the
|
|
193
|
+
# CLI wrap native subprocess children (bin/run) with qemu as well.
|
|
194
|
+
exec proot-distro login --shared-tmp ubuntu -- env CACTUS_EMULATE=1 qemu-aarch64 -cpu max -L / $CACTUS_CONTAINER_DIR/venv/bin/python -m cactus "\$@"
|
|
192
195
|
EOF
|
|
193
196
|
else
|
|
194
197
|
cat >"$temporary" <<EOF
|
|
@@ -245,12 +248,16 @@ _cactus_cli_install_deps_native() {
|
|
|
245
248
|
}
|
|
246
249
|
|
|
247
250
|
_cactus_cli_install_pip_glibc_impl() {
|
|
251
|
+
local pkg_spec="cactus-compute==${CACTUS_VERSION}"
|
|
248
252
|
local install_args=""
|
|
249
253
|
if [ "${1:-install}" = "update" ]; then
|
|
254
|
+
pkg_spec='cactus-compute>=2,<3'
|
|
250
255
|
install_args="--upgrade"
|
|
251
256
|
fi
|
|
252
257
|
|
|
253
|
-
|
|
258
|
+
_cactus_cli_glibc_run -m pip install $install_args "$pkg_spec" 2>&1 | tee -a "$CACTUS_CLI_LOG_FILE"
|
|
259
|
+
local pip_rc=${PIPESTATUS[0]}
|
|
260
|
+
if (( pip_rc != 0 )); then
|
|
254
261
|
log_error "Failed to install Cactus Engine CLI"
|
|
255
262
|
return 1
|
|
256
263
|
fi
|
|
@@ -261,8 +268,10 @@ _cactus_cli_install_pip_glibc_impl() {
|
|
|
261
268
|
}
|
|
262
269
|
|
|
263
270
|
_cactus_cli_install_pip_glibc() {
|
|
264
|
-
log_info "This downloads the Cactus Engine wheel (~
|
|
265
|
-
|
|
271
|
+
log_info "This downloads the Cactus Engine wheel (~26 MB) plus dependencies (torch, numpy, fastapi...) — it can take several minutes; progress is shown below"
|
|
272
|
+
log_info "Full log: ${D_CYAN}$CACTUS_CLI_LOG_FILE${D_NC}"
|
|
273
|
+
echo
|
|
274
|
+
_cactus_cli_install_pip_glibc_impl "$@"
|
|
266
275
|
}
|
|
267
276
|
|
|
268
277
|
_cactus_cli_post_install_glibc() {
|
|
@@ -321,7 +330,7 @@ _cactus_cli_verify_impl() {
|
|
|
321
330
|
}
|
|
322
331
|
|
|
323
332
|
_cactus_cli_verify_glibc() {
|
|
324
|
-
loading "Verifying Cactus Engine CLI" _cactus_cli_verify_impl
|
|
333
|
+
loading "Verifying Cactus Engine CLI (first engine load, may take a few minutes)" _cactus_cli_verify_impl
|
|
325
334
|
}
|
|
326
335
|
|
|
327
336
|
_cactus_cli_create_glibc_wrapper() {
|
|
@@ -330,12 +339,18 @@ _cactus_cli_create_glibc_wrapper() {
|
|
|
330
339
|
log_error "Wrapper template not found at $wrapper_src"
|
|
331
340
|
return 1
|
|
332
341
|
fi
|
|
333
|
-
|
|
342
|
+
sed "1s|^#!.*|#!$PREFIX/bin/bash|" "$wrapper_src" >"$PREFIX/bin/cactus"
|
|
334
343
|
chmod +x "$PREFIX/bin/cactus"
|
|
335
344
|
return 0
|
|
336
345
|
}
|
|
337
346
|
|
|
338
347
|
_cactus_cli_install_native() {
|
|
348
|
+
if ! _cactus_cpu_supported; then
|
|
349
|
+
log_error "This CPU lacks ARMv8.1 features (LSE/fp16/dotprod) required by the native Cactus engine — it would crash with Illegal instruction"
|
|
350
|
+
list_item "Re-run ${D_CYAN}karnel install ai --cactus${D_NC} and choose ${D_CYAN}proot-distro (ubuntu container)${D_NC}"
|
|
351
|
+
list_item "That method runs under qemu-aarch64 emulation: functional but very slow on this CPU"
|
|
352
|
+
return 1
|
|
353
|
+
fi
|
|
339
354
|
_cactus_cli_install_deps_native || return 1
|
|
340
355
|
_cactus_cli_install_pip_glibc || return 1
|
|
341
356
|
_cactus_cli_verify_glibc || return 1
|
|
@@ -364,7 +379,7 @@ _cactus_cli_create_proot_wrapper() {
|
|
|
364
379
|
log_error "Wrapper template not found at $wrapper_src"
|
|
365
380
|
return 1
|
|
366
381
|
fi
|
|
367
|
-
|
|
382
|
+
sed "1s|^#!.*|#!$PREFIX/bin/bash|" "$wrapper_src" >"$PREFIX/bin/cactus"
|
|
368
383
|
chmod +x "$PREFIX/bin/cactus"
|
|
369
384
|
return 0
|
|
370
385
|
}
|
|
@@ -390,7 +405,7 @@ _cactus_cli_installed_version() {
|
|
|
390
405
|
fi
|
|
391
406
|
|
|
392
407
|
if [ "$method" = "proot" ]; then
|
|
393
|
-
_spin_capture "Detecting version" bash -c 'proot-distro login --shared-tmp ubuntu --
|
|
408
|
+
_spin_capture "Detecting version" bash -c 'proot-distro login --shared-tmp ubuntu -- /opt/karnel/cactus/venv/bin/python -c "from importlib.metadata import version; print(version(\"cactus-compute\"))" 2>/dev/null'
|
|
394
409
|
else
|
|
395
410
|
_spin_capture "Detecting version" bash -c 'printf "%s\n" "from importlib.metadata import version; print(version(\"cactus-compute\"))" | glibc-runner -s "$PREFIX/glibc/bin/python" - 2>/dev/null'
|
|
396
411
|
fi
|
|
@@ -403,14 +418,11 @@ _cactus_update_native() {
|
|
|
403
418
|
fi
|
|
404
419
|
|
|
405
420
|
if [ "$method" = "proot" ]; then
|
|
406
|
-
|
|
421
|
+
_cactus_ensure_ubuntu || return 1
|
|
422
|
+
if ! _install_cactus_inside_ubuntu || ! _cactus_apply_emulation_patch || ! _cactus_write_wrapper || ! _cactus_validate; then
|
|
407
423
|
log_error "Failed to update Cactus Engine CLI"
|
|
408
424
|
return 1
|
|
409
425
|
fi
|
|
410
|
-
if ! timeout 300 proot-distro login --shared-tmp ubuntu -- python3 -c "import cactus" &>>"$CACTUS_CLI_LOG_FILE"; then
|
|
411
|
-
log_error "Cactus Engine CLI updated but the native engine failed to load"
|
|
412
|
-
return 1
|
|
413
|
-
fi
|
|
414
426
|
log_success "Cactus Engine CLI (proot-distro) updated"
|
|
415
427
|
return 0
|
|
416
428
|
fi
|
|
@@ -428,7 +440,7 @@ _cactus_uninstall_native() {
|
|
|
428
440
|
fi
|
|
429
441
|
|
|
430
442
|
if [ "$method" = "proot" ]; then
|
|
431
|
-
|
|
443
|
+
proot-distro login ubuntu -- rm -rf /opt/karnel/cactus &>>"$CACTUS_CLI_LOG_FILE"
|
|
432
444
|
rm -f "$PREFIX/bin/cactus"
|
|
433
445
|
rm -rf "$CACTUS_DATA_DIR"
|
|
434
446
|
log_success "Cactus Engine CLI (proot-distro) uninstalled"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1142,9 +1142,26 @@ agent_server_ensure() {
|
|
|
1142
1142
|
return 0
|
|
1143
1143
|
fi
|
|
1144
1144
|
if ! command -v cactus &>/dev/null; then
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1145
|
+
echo
|
|
1146
|
+
log_warn "Cactus (the local model server) is not installed"
|
|
1147
|
+
list_item "Install: ${D_CYAN}karnel install ai --cactus${D_NC}"
|
|
1148
|
+
echo
|
|
1149
|
+
if agent_confirm "Install Cactus now?" _agent_install_cactus; then
|
|
1150
|
+
import "@/tools/ai/cactus/install"
|
|
1151
|
+
install_cactus
|
|
1152
|
+
local _cactus_rc=$?
|
|
1153
|
+
if (( _cactus_rc == 0 || _cactus_rc == 2 )); then
|
|
1154
|
+
log_success "Cactus installed — starting the model server…"
|
|
1155
|
+
else
|
|
1156
|
+
log_error "Cactus installation failed — try again later:"
|
|
1157
|
+
list_item "${D_CYAN}karnel install ai --cactus${D_NC}"
|
|
1158
|
+
list_item "Log: ${D_CYAN}$KARNEL_CACHE/install_ai.log${D_NC}"
|
|
1159
|
+
return 1
|
|
1160
|
+
fi
|
|
1161
|
+
else
|
|
1162
|
+
list_item "When it is installed, the server starts automatically"
|
|
1163
|
+
return 1
|
|
1164
|
+
fi
|
|
1148
1165
|
fi
|
|
1149
1166
|
echo
|
|
1150
1167
|
log_info "Starting the Cactus model server in the background…"
|
|
@@ -1189,7 +1206,7 @@ agent_server_stop() {
|
|
|
1189
1206
|
agent_confirm() {
|
|
1190
1207
|
local prompt="$1" var="$2" _val
|
|
1191
1208
|
while true; do
|
|
1192
|
-
printf ' %
|
|
1209
|
+
printf ' %b%b [%b]%b\n' "$D_YELLOW" "$prompt" "${D_GREEN}y${GRAY}/${D_RED}n${NC}" "$NC" >&2
|
|
1193
1210
|
printf ' > ' >&2
|
|
1194
1211
|
read -rn1 _val
|
|
1195
1212
|
echo >&2
|
|
@@ -1202,7 +1219,7 @@ agent_confirm() {
|
|
|
1202
1219
|
read -r "$var" <<<"n"
|
|
1203
1220
|
return 1
|
|
1204
1221
|
;;
|
|
1205
|
-
*) printf ' %
|
|
1222
|
+
*) printf ' %b✖%b Reply y or n\n' "$RED" "$NC" >&2 ;;
|
|
1206
1223
|
esac
|
|
1207
1224
|
done
|
|
1208
1225
|
}
|
|
@@ -121,8 +121,21 @@ agent_models_url() {
|
|
|
121
121
|
agent_check_server() {
|
|
122
122
|
local models
|
|
123
123
|
models=$(curl -fsS -m 6 "$(agent_models_url)" 2>/dev/null) || {
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
if agent_server_running; then
|
|
125
|
+
log_warn "The model server is starting — first run downloads the model (${D_CYAN}this can take several minutes${D_NC})"
|
|
126
|
+
list_item "Watch progress: ${D_CYAN}tail -f $AGENT_SERVER_LOG${D_NC}"
|
|
127
|
+
list_item "It will answer automatically once ${D_CYAN}$AGENT_ENDPOINT${D_NC} is up"
|
|
128
|
+
elif pgrep -f "cactus.* serve|cactus.launcher.py serve" &>/dev/null; then
|
|
129
|
+
log_warn "A Cactus server process is running but ${D_CYAN}$AGENT_ENDPOINT${D_NC} is not answering yet — it may still be downloading or loading the model"
|
|
130
|
+
list_item "Watch progress: ${D_CYAN}tail -f $AGENT_SERVER_LOG${D_NC}"
|
|
131
|
+
elif ! command -v cactus &>/dev/null; then
|
|
132
|
+
log_warn "Cannot reach endpoint: ${D_CYAN}$AGENT_ENDPOINT${D_NC} — Cactus is not installed"
|
|
133
|
+
list_item "Install it: ${D_CYAN}karnel install ai --cactus${D_NC}"
|
|
134
|
+
list_item "Or point to a running server: ${D_CYAN}karnel agent config endpoint <url>${D_NC}"
|
|
135
|
+
else
|
|
136
|
+
log_warn "Cannot reach endpoint: ${D_CYAN}$AGENT_ENDPOINT${D_NC}"
|
|
137
|
+
list_item "Start your server, e.g.: ${D_CYAN}$AGENT_SERVER_CMD${D_NC}"
|
|
138
|
+
fi
|
|
126
139
|
return 1
|
|
127
140
|
}
|
|
128
141
|
if command -v jq &>/dev/null && echo "$models" | jq -e '.data' &>/dev/null; then
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "karnel-termux",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.3",
|
|
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"
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
],
|
|
40
40
|
"author": "israel marques",
|
|
41
41
|
"contributors": [
|
|
42
|
-
"israel marques"
|
|
42
|
+
"israel marques",
|
|
43
|
+
"devcorex"
|
|
43
44
|
],
|
|
44
45
|
"license": "MIT",
|
|
45
46
|
"bugs": {
|
package/karnel/RELEASE_COMMIT
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b96d4c7cb3e38a356ca310c3e9d8de39aea605ca
|