🤞 Sync 2026-08-31 03:15:28

This commit is contained in:
github-actions[bot]
2026-08-31 03:15:28 +08:00
parent 221a4bc6ae
commit a0412f91a9
5 changed files with 25 additions and 7 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ AGENTFLOW_HASH_aarch64:=938b5feca2fc942eca13b0e8c9df9ea6e7d45c0b0adba0b61f6a3da5
PKG_NAME:=agentflow
PKG_VERSION:=0.3.0
PKG_RELEASE:=2
PKG_RELEASE:=3
AGENTFLOW_DOWNLOAD:=agentflow-linux-$(AGENTFLOW_ARCH)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -62,8 +62,8 @@ define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/uci-defaults $(1)/etc/config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/agentflow $(1)/usr/bin/agentflow
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/uci-defaults $(1)/etc/config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/agentflow $(1)/usr/sbin/agentflow
$(INSTALL_BIN) ./files/agentflow.init $(1)/etc/init.d/agentflow
$(INSTALL_BIN) ./files/agentflow.uci-default $(1)/etc/uci-defaults/09-agentflow
$(INSTALL_CONF) ./files/agentflow.config $(1)/etc/config/agentflow
+4 -3
View File
@@ -14,6 +14,7 @@ set_mise_env() {
procd_set_param env \
"$@" \
MISE_INSTALLS_DIR="$data_dir/globalmise/mise-installs" \
MISE_GLOBAL_CONFIG_FILE="$data_dir/globalmise/mise-config/config.toml" \
MISE_DATA_DIR="$data_dir/globalmise/mise-data" \
MISE_CACHE_DIR="$data_dir/globalmise/mise-cache" \
MISE_STATE_DIR="$data_dir/globalmise/mise-state" \
@@ -27,15 +28,15 @@ start_service() {
config_foreach get_config agentflow
[ "$enabled" = 1 ] || return 1
[ -x /usr/bin/agentflow ] || {
logger -t agentflow "missing executable: /usr/bin/agentflow"
[ -x /usr/sbin/agentflow ] || {
logger -t agentflow "missing executable: /usr/sbin/agentflow"
return 1
}
mkdir -p "$data_dir" || return 1
logger -t agentflow "starting AgentFlow on $host:$port"
procd_open_instance
procd_set_param command /usr/bin/agentflow
procd_set_param command /usr/sbin/agentflow
set_mise_env \
"AGENT_FLOW_DATA=$data_dir/data" \
"AGENT_FLOW_HOST=$host" \
+1 -1
View File
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=AgentFlow
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_RELEASE:=2
LUCI_DEPENDS:=+agentflow +luci-compat
LUCI_MINIFY_CSS:=0
LUCI_MINIFY_JS:=0
@@ -17,6 +17,17 @@ local data_dir = s:option(Value, "data_dir", translate("Data directory"))
data_dir.rmempty = false
data_dir.description = translate("Required. AgentFlow stores its configuration, database and workspace data under this directory.")
function data_dir.validate(self, value, section)
value = (value or ""):match("^%s*(.-)%s*$")
if value == "" or value == "/" then
return nil, translate("Data directory cannot be empty.")
end
if not value:match("^/mnt/[^/]+/") then
return nil, translate("Please select a disk as the data directory.")
end
return value
end
local paths, default_path = agentflow_model.find_paths(blocks, home)
for _, val in pairs(paths) do
data_dir:value(val, val)
+6
View File
@@ -16,6 +16,9 @@ msgstr "正在获取数据……"
msgid "Data directory"
msgstr "数据目录"
msgid "Data directory cannot be empty."
msgstr "数据目录不能为空"
msgid "Enable"
msgstr "启用"
@@ -28,6 +31,9 @@ msgstr "监听端口"
msgid "Port for the AgentFlow HTTP server."
msgstr "AgentFlow HTTP 服务的端口号。"
msgid "Please select a disk as the data directory."
msgstr "请选择硬盘作为数据目录"
msgid "Required. AgentFlow stores its configuration, database and workspace data under this directory."
msgstr "必需。AgentFlow 在此目录中保存配置、数据库和工作区数据。"