🍉 Sync 2026-07-10 00:19:11

This commit is contained in:
github-actions[bot] committed 2026-07-10 00:19:11 +08:00
1 parent 3d0541ac96
commit c7da6d2a50
14 files changed
+196 -24

No files matched your search

+3 -3
View File
@@ -5,10 +5,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dae
PKG_VERSION:=2026.07.05
PKG_RELEASE:=14
PKG_VERSION:=2026.07.08
PKG_RELEASE:=15
PKG_SOURCE:=dae-src-2026.07.05-fa89ea7197a5.tar.gz
PKG_SOURCE:=dae-src-2026.07.08-ca25ef2aa396.tar.gz
PKG_SOURCE_URL:=https://github.com/kenzok8/openwrt-daede/releases/download/dae-src
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_HASH:=skip
+3 -3
View File
@@ -5,10 +5,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=daed
PKG_VERSION:=2026.07.05
PKG_RELEASE:=20
PKG_VERSION:=2026.07.08
PKG_RELEASE:=21
PKG_SOURCE:=daed-src-2026.07.05-23793fb2bd76.tar.gz
PKG_SOURCE:=daed-src-2026.07.08-71b818ad193b.tar.gz
PKG_SOURCE_URL:=https://github.com/kenzok8/openwrt-daede/releases/download/daed-src
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_HASH:=skip
+2 -2
View File
@@ -6,8 +6,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gowebdav
PKG_VERSION:=5.12.0
PKG_RELEASE:=15
PKG_VERSION:=5.13.0
PKG_RELEASE:=16
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/hacdias/webdav/tar.gz/v$(PKG_VERSION)?
+6
View File
@@ -42,6 +42,12 @@
- `.run` 安装器补齐运行依赖安装,避免精简固件缺少 GNU tar 时 Node.js `.tar.xz` 解压失败。
- `openclaw-env setup` 改为先完整解压验证 Node.js,再替换正式目录;安装失败时保留已有运行目录,避免重装失败清空 `/opt/openclaw`。
### 修复 Web 控制台连续对话
- 启动 Gateway 前自动修补 OpenClaw 2026.6.11 的 WebChat 会话初始化冲突,避免 Web 控制台第一条能回答、第二条报 `reply session initialization conflicted`。
- WebChat 会话不再因上一轮 assistant transcript 写入时间被误判为需要 rollover。
- 当同一 sessionId 的 WebChat 写入在用户消息追加后发生 revision 变化时,自动合并当前 session entry 后继续提交。
### 验证
- 通过 shell / Node / Lua 语法检查。
+1 -1
View File
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-openclaw
PKG_VERSION:=$(strip $(shell cat $(CURDIR)/VERSION 2>/dev/null || echo "1.0.0"))
PKG_RELEASE:=21
PKG_RELEASE:=22
PKG_MAINTAINER:=10000ge10000 <10000ge10000@users.noreply.github.com>
PKG_LICENSE:=GPL-3.0
+110 -8
View File
@@ -130,6 +130,83 @@ done
[ $patched -eq 1 ] && logger -t openclaw "iframe headers patched successfully"
}
patch_webchat_session_conflict() {
# OpenClaw 2026.6.11 的 Control UI / WebChat 在第二轮消息时可能触发:
# reply session initialization conflicted for agent:main:dashboard:...
# 根因是 WebChat 追加用户消息会先更新 session registry revision,
# 而 reply 初始化仍按旧 snapshot 做 guarded write;同时 dashboard 会话会被
# terminal transcript mtime 误判为需要 rollover。这里做最小运行时兼容补丁。
[ -x "$NODE_BIN" ] || return 0
local oc_entry oc_dir dist_dir
oc_entry=$(get_oc_entry)
[ -n "$oc_entry" ] || return 0
oc_dir=$(dirname "$oc_entry")
dist_dir="${oc_dir}/dist"
[ -d "$dist_dir" ] || return 0
local patch_output
patch_output=$(OC_DIST_DIR="$dist_dir" "$NODE_BIN" <<'NODE' 2>/tmp/openclaw-webchat-patch.err
const fs = require('fs');
const path = require('path');
const dist = process.env.OC_DIST_DIR;
let patched = 0;
function patchFile(file, transforms) {
let source;
try {
source = fs.readFileSync(file, 'utf8');
} catch {
return;
}
let next = source;
for (const [needle, replacement] of transforms) {
if (next.includes(replacement)) continue;
if (next.includes(needle)) next = next.replace(needle, replacement);
}
if (next !== source) {
fs.writeFileSync(file, next);
patched += 1;
}
}
for (const name of fs.readdirSync(dist)) {
const file = path.join(dist, name);
if (!name.startsWith('get-reply-') || !name.endsWith('.js')) continue;
patchFile(file, [[
'const terminalMainTranscriptNewerThanRegistry = !isSystemEvent && await hasTerminalMainSessionTranscriptNewerThanRegistry({',
'const terminalMainTranscriptNewerThanRegistry = !isSystemEvent && !(ctx.Provider === "webchat" || ctx.Surface === "webchat" || ctx.OriginatingChannel === "webchat") && await hasTerminalMainSessionTranscriptNewerThanRegistry({'
]]);
}
for (const name of fs.readdirSync(dist)) {
const file = path.join(dist, name);
if (!name.startsWith('session-accessor-') || !name.endsWith('.js')) continue;
patchFile(file, [[
`\t\tif (revision !== params.expectedRevision) return {\n\t\t\tok: false,\n\t\t\t...currentEntry ? { currentEntry } : {},\n\t\t\treason: "stale-snapshot",\n\t\t\trevision\n\t\t};`,
`\t\tlet sessionEntryInput = params.sessionEntry;\n\t\tif (revision !== params.expectedRevision) {\n\t\t\tconst currentSessionId = typeof currentEntry?.sessionId === "string" ? currentEntry.sessionId.trim() : "";\n\t\t\tconst nextSessionId = typeof params.sessionEntry?.sessionId === "string" ? params.sessionEntry.sessionId.trim() : "";\n\t\t\tif (currentSessionId && nextSessionId && currentSessionId === nextSessionId) sessionEntryInput = {\n\t\t\t\t...currentEntry,\n\t\t\t\t...params.sessionEntry\n\t\t\t};\n\t\t\telse return {\n\t\t\t\tok: false,\n\t\t\t\t...currentEntry ? { currentEntry } : {},\n\t\t\t\treason: "stale-snapshot",\n\t\t\t\trevision\n\t\t\t};\n\t\t}`
], [
`sessionEntry: params.sessionEntry\n\t\t}) : params.sessionEntry;`,
`sessionEntry: sessionEntryInput\n\t\t}) : sessionEntryInput;`
]]);
}
process.stdout.write(String(patched));
NODE
)
local rc=$?
local patched_count=""
[ -f /tmp/openclaw-webchat-patch.err ] && patched_count=$(cat /tmp/openclaw-webchat-patch.err 2>/dev/null)
if [ $rc -eq 0 ]; then
local out_count
out_count=$(OC_DIST_DIR="$dist_dir" "$NODE_BIN" -e "const fs=require('fs'),path=require('path');let ok=0;for(const n of fs.readdirSync(process.env.OC_DIST_DIR)){const f=path.join(process.env.OC_DIST_DIR,n);if(!n.endsWith('.js'))continue;const s=fs.readFileSync(f,'utf8');if(s.includes('ctx.Provider === \"webchat\"')||s.includes('let sessionEntryInput = params.sessionEntry'))ok++;}process.stdout.write(String(ok));" 2>/dev/null || echo "")
logger -t openclaw "WebChat 会话冲突兼容补丁已检查 (${out_count:-0} 个命中, 本次修改 ${patch_output:-0} 个文件)"
else
logger -t openclaw "WebChat 会话冲突兼容补丁失败: ${patched_count:-unknown error}"
fi
rm -f /tmp/openclaw-webchat-patch.err 2>/dev/null || true
return 0
}
sync_uci_to_json() {
# 将 UCI 配置同步到 openclaw.json,同时确保 token 双向同步
local port bind token json_token
@@ -588,8 +665,11 @@ fs.writeFileSync(f, JSON.stringify(d, null, 2));
# v2026.4.10: final permission fix before Gateway start
fix_openclaw_state_permissions 2>/dev/null || true
# Patch iframe 安全头,允许 LuCI 嵌入
patch_iframe_headers
# Patch iframe 安全头,允许 LuCI 嵌入
patch_iframe_headers
# Patch WebChat 二次发送会话初始化冲突
patch_webchat_session_conflict
# 将 UCI bind 映射到 openclaw gateway --bind 参数
local gw_bind="loopback"
@@ -681,7 +761,10 @@ chmod 700 "$node_compile_cache" 2>/dev/null || true
PATH="${NODE_BASE}/bin:${OC_GLOBAL}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
procd_set_param user openclaw
procd_set_param term_timeout 2
procd_set_param respawn 3600 1 5
# Gateway 的人工重载很常见,不能把 1 小时内的重启都计入 crash throttling。
# threshold=5 让正常运行超过 5 秒后的重载不累计失败;timeout=1 保持快速拉起;
# retry=-1 避免多次保存配置/扫码后 procd 停止 respawn。
procd_set_param respawn 5 1 -1
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param pidfile /var/run/openclaw.pid
@@ -810,8 +893,15 @@ restart_gateway() {
# 仅重启 Gateway 进程,通过 kill 触发 procd respawn
# 绝对不能调用 start_service,否则会重启 PTY 实例
local lock_dir="/tmp/openclaw-restart-gateway.lock"
if ! mkdir "$lock_dir" 2>/dev/null; then
logger -t openclaw "restart_gateway 已在执行,跳过重复请求"
return 0
fi
local port
port=$(uci -q get openclaw.main.port || echo "18789")
logger -t openclaw "restart_gateway: 正在重启 Gateway"
# v2026.3.14 优化: 快速终止并重启
# 1) 同时获取端口 PID 和 procd 管理的 PID
@@ -824,16 +914,27 @@ fi
gw_pid=$(ubus call service list '{"name":"openclaw"}' 2>/dev/null | \
jsonfilter -e '$.openclaw.instances.gateway.pid' 2>/dev/null) || true
# 2) 同时发送 SIGTERM 给所有相关进程
# 2) OpenClaw 支持 SIGUSR1 触发 in-process restart。
# 这比 SIGTERM/procd respawn 快很多,并能避免 stop 路径默认 25 秒 shutdown timeout。
# 注意要发给实际监听端口的 gateway 子进程,而不是 procd 记录的 node 父进程。
if [ -n "$port_pid" ] && kill -0 "$port_pid" 2>/dev/null; then
kill -USR1 "$port_pid" 2>/dev/null && {
logger -t openclaw "restart_gateway: 已通过 SIGUSR1 请求 Gateway 快速重载"
rmdir "$lock_dir" 2>/dev/null || true
return 0
}
fi
# 3) SIGUSR1 不可用时,回退到旧的 TERM + procd respawn 路径
[ -n "$port_pid" ] && kill "$port_pid" 2>/dev/null
[ -n "$gw_pid" ] && kill -0 "$gw_pid" 2>/dev/null && kill "$gw_pid" 2>/dev/null
# 3) 兜底: kill 所有残留进程
# 4) 兜底: kill 所有残留进程
for pid in $(pgrep -f "openclaw-gateway" 2>/dev/null) $(pgrep -f "openclaw.*gateway.*run" 2>/dev/null); do
kill "$pid" 2>/dev/null
done
# 4) 快速轮询等待端口释放 (200ms 间隔,最多 2 秒)
# 5) 快速轮询等待端口释放 (200ms 间隔,最多 2 秒)
local wait_count=0
while [ $wait_count -lt 10 ]; do
if command -v ss >/dev/null 2>&1; then
@@ -845,17 +946,18 @@ while [ $wait_count -lt 10 ]; do
wait_count=$((wait_count + 1))
done
# 5) 如果端口仍被占用,强制 SIGKILL
# 6) 如果端口仍被占用,强制 SIGKILL
if [ $wait_count -ge 10 ]; then
[ -n "$port_pid" ] && kill -9 "$port_pid" 2>/dev/null
usleep 300000 2>/dev/null || sleep 1
fi
# 6) 如果 procd 中没有 gateway 服务注册,调用 start
# 7) 如果 procd 中没有 gateway 服务注册,调用 start
if [ -z "$gw_pid" ]; then
/etc/init.d/openclaw start >/dev/null 2>&1
fi
# 如果 gw_pid 存在,procd respawn 会自动重启 gateway
rmdir "$lock_dir" 2>/dev/null || true
}
status_service() {
@@ -97,7 +97,14 @@ grep -q "Token 同步 (doctor 后): UCI -> JSON" root/etc/init.d/openclaw || fai
grep -q 'OPENCLAW_GATEWAY_TOKEN="$gw_token"' root/etc/init.d/openclaw || fail "gateway must receive token env fallback"
grep -q "clear_jiti_cache_on_start" root/etc/init.d/openclaw || fail "JITI cache cleanup must be opt-in to avoid slow startup"
grep -q "procd_set_param term_timeout 2" root/etc/init.d/openclaw || fail "procd term timeout must be bounded for faster restart"
grep -q "procd_set_param respawn 3600 1 5" root/etc/init.d/openclaw || fail "gateway respawn timeout must be short for faster restart_gateway"
grep -q "procd_set_param respawn 5 1 -1" root/etc/init.d/openclaw || fail "gateway respawn must avoid procd crash throttling during manual restart_gateway"
grep -q "openclaw-restart-gateway.lock" root/etc/init.d/openclaw || fail "restart_gateway must guard concurrent restart requests"
grep -q "kill -USR1" root/etc/init.d/openclaw || fail "restart_gateway must prefer OpenClaw SIGUSR1 in-process restart"
grep -q "SIGUSR1 请求 Gateway 快速重载" root/etc/init.d/openclaw || fail "restart_gateway SIGUSR1 fast reload log missing"
grep -q "patch_webchat_session_conflict" root/etc/init.d/openclaw || fail "WebChat session conflict patch helper missing"
grep -q 'ctx.Provider === "webchat"' root/etc/init.d/openclaw || fail "WebChat patch must skip terminal transcript rollover for webchat"
grep -q "let sessionEntryInput = params.sessionEntry" root/etc/init.d/openclaw || fail "WebChat patch must merge same-session stale guarded writes"
grep -q "WebChat 二次发送会话初始化冲突" root/etc/init.d/openclaw || fail "WebChat patch must run before gateway start"
grep -q 'openclaw.main.clear_jiti_cache_on_start' root/etc/init.d/openclaw || fail "JITI cleanup must be guarded by UCI flag"
grep -q "openclaw-node-compile-cache" root/etc/init.d/openclaw || fail "Node compile cache must be enabled for faster warm restarts"
grep -q 'NODE_COMPILE_CACHE="$node_compile_cache"' root/etc/init.d/openclaw || fail "gateway and pty must receive Node compile cache env"
+1 -1
View File
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall
PKG_VERSION:=26.7.1
PKG_RELEASE:=175
PKG_RELEASE:=176
PKG_PO_VERSION:=$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
@@ -32,10 +32,10 @@ if formvalue_proto then s.val["protocol"] = formvalue_proto end
local arg_select_proto = luci.http.formvalue("select_proto") or ""
local ss_method_list = {
"none", "plain", "aes-128-gcm", "aes-256-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "xchacha20-poly1305", "xchacha20-ietf-poly1305", "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305"
"aes-128-gcm", "aes-256-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "xchacha20-poly1305", "xchacha20-ietf-poly1305", "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305"
}
local security_list = { "none", "auto", "aes-128-gcm", "chacha20-poly1305", "zero" }
local security_list = { "auto", "aes-128-gcm", "chacha20-poly1305" }
local header_type_list = {
"none", "srtp", "utp", "wechat-video", "dtls", "wireguard", "dns"
@@ -24,7 +24,7 @@ local function _n(name)
end
local x_ss_method_list = {
"none", "plain", "aes-128-gcm", "aes-256-gcm", "chacha20-poly1305", "xchacha20-poly1305", "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305"
"aes-128-gcm", "aes-256-gcm", "chacha20-poly1305", "xchacha20-poly1305", "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305"
}
local header_type_list = {
@@ -1986,6 +1986,25 @@ header [data-indicator][data-style="active"] {
background-color: #6582a1;
}
/* Кнопки Hide/Show на Status > Overview (status/index.js, data-indicator="poll-status") */
.cbi-title [data-indicator="poll-status"] {
box-sizing: border-box !important;
height: 10px !important;
line-height: 8px !important;
padding: 0 5px !important;
font-size: 8px;
font-weight: bold;
background-color: transparent !important;
color: #757575 !important;
border: 1px solid currentColor;
border-radius: 3px;
text-shadow: none !important;
}
.cbi-title [data-indicator="poll-status"].notice {
color: var(--primary-color-high) !important;
}
/* LuCI specific items */
.hidden { display: none }
@@ -1986,6 +1986,25 @@ header [data-indicator][data-style="active"] {
background-color: #81c784;
}
/* Кнопки Hide/Show на Status > Overview (status/index.js, data-indicator="poll-status") */
.cbi-title [data-indicator="poll-status"] {
box-sizing: border-box !important;
height: 10px !important;
line-height: 8px !important;
padding: 0 5px !important;
font-size: 8px;
font-weight: bold;
background-color: transparent !important;
color: #757575 !important;
border: 1px solid currentColor;
border-radius: 3px;
text-shadow: none !important;
}
.cbi-title [data-indicator="poll-status"].notice {
color: #1b5e20 !important;
}
/* LuCI specific items */
.hidden { display: none }
@@ -1954,6 +1954,25 @@ header [data-indicator][data-style="active"] {
background-color: #df826f;
}
/* Кнопки Hide/Show на Status > Overview (status/index.js, data-indicator="poll-status") */
.cbi-title [data-indicator="poll-status"] {
box-sizing: border-box !important;
height: 10px !important;
line-height: 8px !important;
padding: 0 5px !important;
font-size: 8px;
font-weight: bold;
background-color: transparent !important;
color: #757575 !important;
border: 1px solid currentColor;
border-radius: 3px;
text-shadow: none !important;
}
.cbi-title [data-indicator="poll-status"].notice {
color: #df826f !important;
}
/* LuCI specific items */
.hidden { display: none }
+2 -2
View File
@@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=natflow
PKG_VERSION:=20260531
PKG_RELEASE:=38
PKG_RELEASE:=39
PKG_SOURCE:=$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/ptpt52/natflow.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=9f08f8385d8208dabd420736bd374efe3a22597c
PKG_SOURCE_VERSION:=5ba6726ce0a54bf198c470e4b7fc0c3387f85537
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Chen Minqiang <ptpt52@gmail.com>
PKG_LICENSE:=GPL-2.0