Author SHA1 Message Date
arka-admin 61ed068e37 docs: remove source-build section (source not public) 2026-10-01 11:53:44 +03:00
arka-catalog-bot 0f02e79398 chore(catalog): refresh 2026-09-30 2026-10-01 02:00:02 +03:00
ixoblakp 05141af8fe feat(install): handle updates — stop old daemon, back up, install new version
- detect installed version via --version; skip when already up to date
- stop the running daemon and keep agent-arka.previous rollback copy on upgrade/downgrade
2026-10-01 00:04:56 +03:00
ixoblakp 57e627bad0 fix(install): friendly bash guard instead of cryptic pipefail error under sh 2026-09-30 23:54:48 +03:00
3 changed files with 47 additions and 11 deletions

No files matched your search

-10
View File
@@ -97,16 +97,6 @@ agent-arka doctor
Пароль вкладки Password — аварийный (`dashboard_user = operator`). Init печатает его один раз.
## Сборка из исходников (если нет пакета под вашу OS)
Репозиторий приватный. У кого есть доступ:
```bash
cargo install --git ssh://git@git.arka-ai.ru:4001/arka/agent-arka.git librefang-cli --bin agent-arka
agent-arka init --quick
agent-arka start
```
---
# Agent Arka — web UI and Windows desktop
+46
View File
@@ -11,6 +11,14 @@
# AGENT_ARKA_INIT 1 to run `agent-arka init --quick` when no config.toml exists (default: 1)
# LIBREFANG_* names for the same keys still work.
# Fail with a clear hint when piped into POSIX `sh` (dash) — this script needs
# bash (pipefail, [[ ]], indirect expansion). `curl … | bash`, not `| sh`.
if [ -z "${BASH_VERSION:-}" ]; then
echo "Agent Arka installer needs bash. Run:" >&2
echo " curl -fsSL https://git.arka-ai.ru/arka/public/raw/branch/main/agent-arka/install.sh | bash" >&2
exit 1
fi
set -euo pipefail
PUBLIC_API="${AGENT_ARKA_PUBLIC_API:-https://git.arka-ai.ru/api/v1}"
@@ -149,6 +157,19 @@ ensure_path() {
warn "Added ${bindir} to PATH in ${rc} (open a new shell, or: source ${rc})"
}
# Normalize a CalVer "YYYY.M.D" into a single sortable integer (YYYYMMDD pads).
ver_cmp_key() {
printf '%s' "$1" | awk -F. '{ printf "%04d%02d%02d", $1, $2, $3 }' 2>/dev/null || printf '%s' 0
}
# Installed version, or empty when there is no binary/detectable version.
installed_version() {
local bin="$1" out
[[ -x "$bin" ]] || return 1
out=$("$bin" --version 2>/dev/null | head -n 1) || return 1
printf '%s\n' "$out" | grep -oE '[0-9]{4}\.[0-9]+(\.[0-9]+)?' | tail -n 1
}
main() {
printf '%s\n' "${C_BOLD}Agent Arka${C_RESET} — web dashboard installer"
command -v curl >/dev/null 2>&1 || die "curl is required"
@@ -175,6 +196,31 @@ main() {
info "Latest: ${version}"
fi
# Update handling: detect an existing install and skip / stop / back it up.
local existing
existing=$(installed_version "${bindir}/agent-arka" 2>/dev/null || true)
if [[ -n "$existing" ]]; then
local ek tk
ek=$(ver_cmp_key "$existing")
tk=$(ver_cmp_key "$version")
if [[ "$ek" == "$tk" ]]; then
info "Already up to date: agent-arka ${existing} (target ${version})"
ensure_path "$bindir"
return 0
fi
if [[ "$ek" -gt "$tk" ]]; then
warn "Downgrading ${existing} -> ${version}"
else
info "Upgrading ${existing} -> ${version}"
fi
# Bring the running daemon down before replacing the binary.
if AGENT_ARKA_HOME="${HOME_DIR}" LIBREFANG_HOME="${HOME_DIR}" "${bindir}/agent-arka" stop >/dev/null 2>&1; then
ok "Stopped running agent-arka ${existing}"
fi
# Keep a rollback copy of the current binary.
cp -f "${bindir}/agent-arka" "${bindir}/agent-arka.previous" 2>/dev/null || true
fi
local tag="${TAG_PREFIX}${version}"
local asset="agent-arka-${version}-${PLATFORM}.tar.gz"
local url="${PUBLIC_DL}/${tag}/${asset}"
+1 -1
View File
@@ -1,5 +1,5 @@
{
"updated_at": "2026-09-29T23:00:01Z",
"updated_at": "2026-09-30T23:00:02Z",
"source": "https://api.arka-ai.ru/v1/models",
"raw_count": 216,
"chat_count": 110,