mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-22 18:08:04 +00:00
v0.7.2: 根目录清理 + Agent 心跳重构 + 内嵌 ONNX 模型
- 根目录清理: branding/docs/knowledge -> assets/, package/tools/deploy -> deploy/ - meta.go: Version 0.7.2, SDKCompatibleVersion 语义改为最高兼容 - Makefile: 版本回退 0.7.2 - registry.go: 系统提示词改用 meta.Version 格式化 - Agent 心跳: reorgGraph 拆分为三个独立循环(archive/merge/review),各自可配间隔 - GraphDB: 新增 sentences 表 + 关系句子溯源 + ClearSentenceID + CleanupOrphanedSentences - Knowledge: 支持词嵌入向量化器 - NLP 四阶段流水线: Parse -> Extract -> Verify -> Fuse + SentenceRef - 移除远程 HTTP 解析器(remote_parser.go) - 新增内嵌 ONNX 模型(vocab + dep_parser.onnx): +build onnxruntime: 全量 ONNX Runtime 推理 !build onnxruntime: 内嵌词表规则式降级解析器 - config: core.agent.onnx_model_path 替代 dep_parser_url
This commit is contained in:
18
deploy/packaging/linux/deb/control-client
Normal file
18
deploy/packaging/linux/deb/control-client
Normal file
@ -0,0 +1,18 @@
|
||||
Package: homeagent-client
|
||||
Version: VERSION_PLACEHOLDER
|
||||
Architecture: ARCH_PLACEHOLDER
|
||||
Maintainer: HomeAgent Team <team@homeagent.ai>
|
||||
Installed-Size: INSTALLED_SIZE_PLACEHOLDER
|
||||
Depends: libc6 (>= 2.28)
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Homepage: https://github.com/trueagent/HomeAgent
|
||||
Description: HomeAgent Client (CLI + GUI, no daemon)
|
||||
HomeAgent is a personal AI home assistant that integrates
|
||||
large language models with system automation.
|
||||
.
|
||||
This package includes the client components:
|
||||
- waiter: command-line client
|
||||
- homeagent-gui: desktop graphical interface
|
||||
.
|
||||
This variant connects to a remote HomeAgent server.
|
||||
17
deploy/packaging/linux/deb/control-full
Normal file
17
deploy/packaging/linux/deb/control-full
Normal file
@ -0,0 +1,17 @@
|
||||
Package: homeagent-full
|
||||
Version: VERSION_PLACEHOLDER
|
||||
Architecture: ARCH_PLACEHOLDER
|
||||
Maintainer: HomeAgent Team <team@homeagent.ai>
|
||||
Installed-Size: INSTALLED_SIZE_PLACEHOLDER
|
||||
Depends: libc6 (>= 2.28)
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Homepage: https://github.com/trueagent/HomeAgent
|
||||
Description: HomeAgent Full Installation (Daemon + CLI + GUI)
|
||||
HomeAgent is a personal AI home assistant that integrates
|
||||
large language models with system automation.
|
||||
.
|
||||
This package includes the full suite:
|
||||
- homed: the core daemon (background service)
|
||||
- waiter: command-line client
|
||||
- homeagent-gui: desktop graphical interface
|
||||
16
deploy/packaging/linux/deb/control-server
Normal file
16
deploy/packaging/linux/deb/control-server
Normal file
@ -0,0 +1,16 @@
|
||||
Package: homeagent-server
|
||||
Version: VERSION_PLACEHOLDER
|
||||
Architecture: ARCH_PLACEHOLDER
|
||||
Maintainer: HomeAgent Team <team@homeagent.ai>
|
||||
Installed-Size: INSTALLED_SIZE_PLACEHOLDER
|
||||
Depends: libc6 (>= 2.28)
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Homepage: https://github.com/trueagent/HomeAgent
|
||||
Description: HomeAgent Server (Daemon + CLI, no GUI)
|
||||
HomeAgent is a personal AI home assistant that integrates
|
||||
large language models with system automation.
|
||||
.
|
||||
This package includes the server components:
|
||||
- homed: the core daemon (background service)
|
||||
- waiter: command-line client
|
||||
32
deploy/packaging/linux/deb/postinst
Normal file
32
deploy/packaging/linux/deb/postinst
Normal file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
SERVICE_NAME="homeagent"
|
||||
SERVICE_FILE="/lib/systemd/system/${SERVICE_NAME}.service"
|
||||
HOMED_BIN="/usr/bin/homed"
|
||||
DATA_DIR="/var/lib/homeagent"
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
if [ -f "$HOMED_BIN" ]; then
|
||||
mkdir -p "$DATA_DIR"
|
||||
|
||||
# 初始化凭据和数据库
|
||||
if [ -x /usr/lib/homeagent/setup.sh ]; then
|
||||
HOMEAGENT_DATA="$DATA_DIR" /usr/lib/homeagent/setup.sh || true
|
||||
fi
|
||||
|
||||
# 注册 systemd 服务
|
||||
if [ -f "$SERVICE_FILE" ]; then
|
||||
systemctl daemon-reload 2>/dev/null || true
|
||||
systemctl enable "$SERVICE_NAME" 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
19
deploy/packaging/linux/deb/prerm
Normal file
19
deploy/packaging/linux/deb/prerm
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
SERVICE_NAME="homeagent"
|
||||
|
||||
case "$1" in
|
||||
remove|deconfigure)
|
||||
if command -v systemctl >/dev/null 2>&1; then
|
||||
systemctl stop "$SERVICE_NAME" 2>/dev/null || true
|
||||
systemctl disable "$SERVICE_NAME" 2>/dev/null || true
|
||||
fi
|
||||
;;
|
||||
upgrade)
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
111
deploy/packaging/linux/homeagent.spec
Normal file
111
deploy/packaging/linux/homeagent.spec
Normal file
@ -0,0 +1,111 @@
|
||||
# HomeAgent RPM Spec
|
||||
# Build: rpmbuild -ba homeagent.spec
|
||||
#
|
||||
# Define variant at build time:
|
||||
# rpmbuild -ba --define "variant full" homeagent.spec
|
||||
# rpmbuild -ba --define "variant server" homeagent.spec
|
||||
# rpmbuild -ba --define "variant client" homeagent.spec
|
||||
|
||||
%define _prefix /usr
|
||||
%define _bindir %{_prefix}/bin
|
||||
%define _unitdir %{_prefix}/lib/systemd/system
|
||||
%define _datadir %{_prefix}/share/homeagent
|
||||
%define _varlibdir /var/lib/homeagent
|
||||
|
||||
%if %{undefined variant}
|
||||
%define variant full
|
||||
%endif
|
||||
|
||||
Name: homeagent-%{variant}
|
||||
Version: %{_version}
|
||||
Release: 1%{?dist}
|
||||
Summary: HomeAgent - Personal AI Home Assistant
|
||||
License: Proprietary
|
||||
URL: https://github.com/trueagent/HomeAgent
|
||||
Group: System Environment/Daemons
|
||||
BuildArch: %{_arch}
|
||||
|
||||
%if "%{variant}" == "full" || "%{variant}" == "server"
|
||||
Requires: systemd
|
||||
%endif
|
||||
%if "%{variant}" == "full"
|
||||
Requires: libX11, libxcb, libdrm, mesa-libGL, nss, nspr, atk, at-spi2-atk, cairo, cups-libs, pango, gtk3
|
||||
%endif
|
||||
%if "%{variant}" == "client"
|
||||
Requires: libX11, libxcb, libdrm, mesa-libGL, nss, nspr, atk, at-spi2-atk, cairo, cups-libs, pango, gtk3
|
||||
%endif
|
||||
|
||||
%description
|
||||
HomeAgent is a personal AI home assistant that integrates large language
|
||||
models with system automation.
|
||||
|
||||
%if "%{variant}" == "full"
|
||||
This package includes the full suite: homed (daemon), waiter (CLI),
|
||||
and homeagent-gui (desktop GUI).
|
||||
%else
|
||||
%if "%{variant}" == "server"
|
||||
This package includes the server components: homed (daemon) and waiter (CLI).
|
||||
%else
|
||||
%if "%{variant}" == "client"
|
||||
This package includes the client components: waiter (CLI) and
|
||||
homeagent-gui (desktop GUI). Connects to a remote HomeAgent server.
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
mkdir -p %{buildroot}%{_varlibdir}
|
||||
|
||||
%if "%{variant}" == "full" || "%{variant}" == "server"
|
||||
install -m 755 %{_sourcedir}/homed %{buildroot}%{_bindir}/homed
|
||||
install -m 644 %{_sourcedir}/homeagent.service %{buildroot}%{_unitdir}/homeagent.service
|
||||
%endif
|
||||
|
||||
%if "%{variant}" == "full" || "%{variant}" == "client"
|
||||
install -m 755 %{_sourcedir}/waiter %{buildroot}%{_bindir}/waiter
|
||||
%endif
|
||||
|
||||
%if "%{variant}" == "full" || "%{variant}" == "client"
|
||||
mkdir -p %{buildroot}%{_datadir}/homeagent-gui
|
||||
cp -r %{_sourcedir}/homeagent-gui-linux-*/* %{buildroot}%{_datadir}/homeagent-gui/
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
%if "%{variant}" == "full" || "%{variant}" == "server"
|
||||
%{_bindir}/homed
|
||||
%{_unitdir}/homeagent.service
|
||||
%dir %{_varlibdir}
|
||||
%endif
|
||||
|
||||
%if "%{variant}" == "full" || "%{variant}" == "client"
|
||||
%{_bindir}/waiter
|
||||
%endif
|
||||
|
||||
%if "%{variant}" == "full" || "%{variant}" == "client"
|
||||
%dir %{_datadir}/homeagent-gui
|
||||
%{_datadir}/homeagent-gui/*
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if "%{variant}" == "full" || "%{variant}" == "server"
|
||||
mkdir -p %{_varlibdir}
|
||||
%systemd_post homeagent.service
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%if "%{variant}" == "full" || "%{variant}" == "server"
|
||||
%systemd_preun homeagent.service
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if "%{variant}" == "full" || "%{variant}" == "server"
|
||||
%systemd_postun_with_restart homeagent.service
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jul 20 2026 HomeAgent Team <team@homeagent.ai> - %{version}-1
|
||||
- Initial Linux packaging
|
||||
63
deploy/packaging/linux/setup.sh
Normal file
63
deploy/packaging/linux/setup.sh
Normal file
@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env bash
|
||||
# HomeAgent 首次初始化脚本
|
||||
# 在安装后执行,生成凭据并初始化数据库
|
||||
set -e
|
||||
|
||||
DATA_DIR="${HOMEAGENT_DATA:-/var/lib/homeagent}"
|
||||
CRED_FILE="${DATA_DIR}/credentials.txt"
|
||||
CONFIG_DB="${DATA_DIR}/config.db"
|
||||
WAITER_CONF="${DATA_DIR}/waiter.yaml"
|
||||
INITCONFIG_BIN="/usr/bin/initconfig"
|
||||
|
||||
# 如果已经初始化过,跳过
|
||||
if [ -f "$CONFIG_DB" ] && [ -f "$CRED_FILE" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mkdir -p "$DATA_DIR"
|
||||
|
||||
# 生成随机凭据
|
||||
API_KEY=$(cat /proc/sys/kernel/random/uuid 2>/dev/null | tr -d '-' || echo "homeagent$(date +%s)")
|
||||
WEBUI_USER="${WEBUI_USER:-admin}"
|
||||
WEBUI_PASS="${WEBUI_PASS:-$(openssl rand -hex 12 2>/dev/null || echo "homeagent")}"
|
||||
|
||||
# 初始化数据库
|
||||
if [ -x "$INITCONFIG_BIN" ]; then
|
||||
"$INITCONFIG_BIN" \
|
||||
-data "$DATA_DIR" \
|
||||
-username "$WEBUI_USER" \
|
||||
-password "$WEBUI_PASS" \
|
||||
-apikey "$API_KEY" 2>/dev/null
|
||||
fi
|
||||
|
||||
# 保存凭据
|
||||
cat > "$CRED_FILE" << CRED
|
||||
===================================
|
||||
HomeAgent 初始配置信息
|
||||
请妥善保管,安装后仅此一份
|
||||
===================================
|
||||
WebUI 地址: http://localhost:8080
|
||||
API Key: ${API_KEY}
|
||||
WebUI 用户名: ${WEBUI_USER}
|
||||
WebUI 密码: ${WEBUI_PASS}
|
||||
CLI Socket: ${DATA_DIR}/cli.sock
|
||||
===================================
|
||||
CRED
|
||||
chmod 600 "$CRED_FILE"
|
||||
|
||||
# 配置 waiter CLI
|
||||
cat > "$WAITER_CONF" << WAITER
|
||||
socket: "${DATA_DIR}/cli.sock"
|
||||
api_key: ${API_KEY}
|
||||
default: local
|
||||
connections:
|
||||
- name: local
|
||||
socket: "${DATA_DIR}/cli.sock"
|
||||
api_key: ${API_KEY}
|
||||
WAITER
|
||||
|
||||
echo ""
|
||||
echo "============================================"
|
||||
echo " HomeAgent 初始化完成"
|
||||
echo "============================================"
|
||||
cat "$CRED_FILE"
|
||||
Reference in New Issue
Block a user