everywhere.z
84539cabaa
Clarify Rule-DB caching and publishing documentation
2026-07-24 16:51:20 +08:00
everywhere.z
5c79ce678d
Document Nacos Rule-DB backend configuration and usage
2026-07-24 10:53:54 +08:00
everywhere.z
01489667cf
feat(rule-db): harden all backends for GA release
2026-07-24 01:37:53 +08:00
everywhere.z
42b9b5718e
feat(rule-db): add PostgreSQL and MongoDB backends
2026-07-23 19:38:02 +08:00
everywhere.z
b3dcf9c9b5
fix(rule-db-sql): harden sql backend for release
2026-07-21 10:58:52 +08:00
everywhere.z
75b8b216aa
docs(rule-db): rewrite guide to match implementation
...
The guide had drifted from the code in ways that would mislead or block users: config keys were flat (liteflow.rule-db.url) but the binding is nested (liteflow.rule-db.sql.url) and the flat form is silently ignored; the Redis example used a non-existent RedisRulePublisher facade (real entry point is RulePublisherFactory + RedisPublisherConfig); it described a Redis pub/sub push channel that does not exist (Redis uses seq polling + reconcile like SQL, poll default 3s not 30s); and Redis index keys are SETs (chain-ids/script-ids), not HASHes, with no notify key.
Also documents the now-shipped zk/etcd backends (quickstart, storage layout, config), the unified publisher API (expectedVersion optimistic lock, PublishResult, AutoCloseable lifecycle), and the /actuator/liteflow/ruledb observability endpoint.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 01:20:05 +08:00
everywhere.z
6bab5103a5
docs: add unified rule-db implementation plans
2026-07-13 00:19:34 +08:00
everywhere.z
051a7d55e5
docs: design unified rule-db backends and publisher
2026-07-13 00:00:45 +08:00
everywhere.z
a76dfc92b7
docs: fix Rule-DB release profile plan
2026-07-12 13:46:39 +08:00
everywhere.z
a30b5a3cc9
docs: update Rule-DB module paths
2026-07-12 13:38:23 +08:00
everywhere.z
dfa45a2140
docs: plan Rule-DB parent module relocation
2026-07-12 08:21:03 +08:00
everywhere.z
047f1284b2
docs: 设计 Rule-DB 独立父模块迁移
2026-07-12 08:17:01 +08:00
everywhere.z
e6ba5e2258
fix: 完善 Rule-DB 收敛与 metrics 采集
...
修复规则删除、脚本刷新、MD5 对账及 SQL 缺表校验,并补齐 Spring 应用名默认值。
增强 metrics 的异常隔离、Meter 复用与主子链维度,补充回归测试和文档,同时将 Rule-DB 发布版本标注修正为 2.16.1。
2026-07-11 23:39:40 +08:00
everywhere.z
b4232bd43f
docs(rule-db): 修正指南 5 处评审问题(md5 公式/脚本类型/报错文案/IDE 元数据/独立发布配置)
...
Important:
- §5.1/§6.2 content_md5 公式改为 MD5(el_data)(不含 route_data)和 MD5(script_data),对齐 SqlRulePublisher/RedisRulePublisher 的 SecureUtil.md5 实际算法
- §5.1 script_type 收敛为 NodeTypeEnum 的 4 种:script/boolean_script/switch_script/for_script,删除不存在的 while_script/break_script/iterator_script
Minor:
- §4 报错文案补全为 'rule-source and rule-db mode cannot be used together, please remove one of them'
- §2/CLAUDE.md 修正 IDE 元数据归属:仅 Spring Boot 两个 starter 含元数据,Solon 仅配置绑定
- §2 Step 3 补充非 Spring 环境需先初始化 liteflow.rule-db.* 配置才能调用 Publisher API 的说明
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 12:37:40 +08:00
everywhere.z
18c2c54fee
docs(rule-db): 使用指南 + CLAUDE.md 模块说明
...
新增 docs/liteflow-rule-db-guide.md(上手篇 + 参考篇,覆盖 10 节:定位、SQL/Redis
快速上手、配置参考表、SQL 三表/Redis 键结构、发布协议与直写规范、一致性收敛
三腿模型、内存与性能调优、降级语义、限制清单——含 Redis Cluster 不支持原子
发布等已知边界)。
CLAUDE.md 在「规则源插件」后新增「Rule-DB 模式插件」子节,说明 liteflow-rule-db-sql
/ liteflow-rule-db-redis 的存储权威源模型、RuleRepository SPI、rule-db.* 配置
命名空间、与 rule-source 互斥规则,并指向使用指南。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 12:28:45 +08:00
everywhere.z
fa32edb3c7
test(rule-db-redis): embedded-redis 端到端集成 + spec 补 changelog ZSet
...
新增 liteflow-testcase-el-rule-db-redis-springboot 测试模块,对 liteflow-rule-db-redis
插件做端到端验证:embedded-redis 拉起真实 redis 二进制 → RedisRulePublisher 经 Lua 原子发布
(HSET 内容 + HSET index + INCR seq + ZADD changelog + PUBLISH)→ FlowExecutor 惰性回源
RedisRuleRepository → 执行;发布新版本后 reconcileOnce/pollOnce 确定性收敛。
两个用例:
- testPublishExecuteAndConverge:chain 发布→执行→反转新版→pollOnce 收敛,断言步骤串翻转。
- testScriptPublishAndExecute:groovy 脚本+chain 发布→执行,断言脚本写入上下文。
embedded-redis 自带二进制在本机(macOS ARM)因缺 openssl 无法启动时,回退到 PATH 上的系统
redis-server;两者均为真实 redis 二进制,跑相同 Lua/cjson + pub/sub 路径,不削弱断言。
配置装配沿用计划1 Task8 的兜底:RuleDbRedisTestConfig 在 @PostConstruct 编程式注入
RuleDbConfig(address=redis://127.0.0.1:16379),先于 LiteflowExecutorInit 激活 rule-db 模式。
spec §6.2 补 changelog ZSET(score=seq)键结构行;§7 注明 Redis 发布为 Lua 原子五步
(内容+索引+seq+changelog+notify)。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 12:08:17 +08:00
everywhere.z
862b423c3f
feat(core): Rule-DB 变更同步与对账(轮询+订阅+对账兜底)
...
Task 5:多节点收敛层。
- RuleDbRuntime 新增 applyChange(惰性失效)/reconcile(全量对账),复用既有 invalidateChainCache/invalidateScriptCache 保持 DRY
- 新增 RuleDbSyncManager:seq 轮询主感知 + 可选订阅推送 + 周期全量对账;seq 断档自动转对账;advanceSeq CAS 单调推进
- init 末尾启动同步、destroy 停止
- RuleDbConvergeTest 三路收敛测试(poll/reconcile/seq-gap)直驱 pollOnce/reconcileOnce 保证确定性
- spec §8.4 增补惰性失效实现注记
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 01:09:53 +08:00
everywhere.z
71625ab51e
docs(plan): 补回计划1缺失的 Task 3(RuleDbRuntime)与 Task 4(有界缓存)
...
续写时这两节的标题被丢失,计划从 Task 2 直接跳到 Task 5。
task-brief 脚本提取失败时发现,现补全。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 00:31:39 +08:00
everywhere.z
5675bd7eb0
docs(plan): Rule-DB 实施计划 2(Redis 插件)与计划 3(starter 绑定+文档)
...
计划2:liteflow-rule-db-redis —— Redisson 连接自动识别、RedisRuleRepository(ZSet 变更日志+pub/sub)、
Lua 原子发布、embedded-redis 端到端测试;细化 Redis 键结构补 changelog ZSet。
计划3:Boot2/3、Boot4、Solon 三处 starter 绑定 liteflow.rule-db.* + metadata + 使用指南 + CLAUDE.md。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 18:50:10 +08:00
everywhere.z
1f5b87f00b
docs(plan): Rule-DB 模式实施计划(计划1:core 运行时 + SQL 插件)
...
8 个任务,TDD 步进:SPI 类型/配置 → InMemory 测试基建 → RuleDbRuntime 启动建索引与懒回源
→ 有界缓存与脚本引用计数淘汰 → 变更同步与对账兜底 → 降级容错 → SqlRuleRepository/DDL
→ SqlRulePublisher + H2 端到端。Redis 与 starter 绑定交接计划2/3。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 15:44:09 +08:00
everywhere.z
d58727fbc8
docs(spec): Rule-DB 模式设计——规则/脚本以存储引擎为权威源
...
新增 liteflow-rule-db-sql / liteflow-rule-db-redis 两个全新插件的设计文档:
core 侧 RuleRepository SPI + 常驻索引 + 有界缓存,变更序号协议 + 对账兜底
实现多节点最终一致收敛,JVM 内存占用与规则总量解耦。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 01:04:04 +08:00
everywhere.z
48c7613dd6
docs(metrics): 指南重构为上手篇+参考篇,新增 Prometheus/Grafana 集成资产
...
- 指南拆为「上手篇」(数据流图+概念铺垫+五分钟端到端跑通)与
「参考篇」(依赖/开关/指标目录/端点/分位/PromQL/性能),降低对
不熟悉 actuator/Prometheus 读者的门槛
- 新增 docs/metrics-integration/:开箱即用 docker-compose(Prometheus+
Grafana,自动挂载数据源与仪表盘)、prometheus.yml 抓取配置、
LiteFlow 概览仪表盘 JSON(6 面板:QPS/平均耗时/错误率/在途/Node 耗时/Slot)
- 附 actuator-metrics 特性的设计 spec 与实施 plan
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-29 23:53:49 +08:00
everywhere.z
2adf1943a3
docs: 新增 liteflow-metrics 使用指南
...
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-29 11:42:45 +08:00
everywhere.z
5b749ffd80
test(agent): 按 feature/platform 维度重组 react-agent 测试模块
...
将原先扁平的 connectivity/feature/unit/cmp 测试布局重构为按功能
(feature/*)和按供应商平台(platform/*)划分的独立目录,每个目录
自带隔离的测试资源(application.properties + flow.el.xml),并相应
更新 BaseAgentLiveTest、LiveTestEnv、LiveTestSupport 等支撑类与使用指南文档。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 23:55:42 +08:00
everywhere.z
49044d1b76
refactor(agent): drop fixed assistant identity line from default system prompt
...
移除 DEFAULT_SYSTEM_PROMPT 中固定的「你是 LiteFlow ReAct Agent 助手。」身份行,
并同步更新 react-agent guide 文档中的对应描述。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:33:27 +08:00
everywhere.z
e6d6a37869
docs(agent): refresh react-agent guide for skill tool DI and fix stale content
...
- Document that the framework always prepends DEFAULT_SYSTEM_PROMPT before the
component systemPrompt(), and its behavioral implications.
- Correct §7.6: skillBox.codeExecution() is enabled and bound to the conversation
workspace; add the related security note in §7.6 and §10.
- Update §7.4 for container-based DI of skill tools (no-arg ctor is only a
fallback) and native YAML inline-list tools; drop the dead SkillToolManifest
reference and add a troubleshooting row for instantiation failure.
- Add §5.6 covering the AgentSessionFactory SPI for custom persistence backends.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 19:29:59 +08:00
everywhere.z
0668ae6f35
docs(agent): add implementation plan for skill tools Spring DI
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 17:12:03 +08:00
everywhere.z
6152e34000
docs(agent): add design spec for skill tools Spring DI
...
通过 ContextAware SPI 从容器按类型引用已注册的 skill 工具 bean,
使其依赖注入生效;无容器/未注册时降级反射实例化。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 17:03:09 +08:00
everywhere.z
083bdfa0f2
feat(agent): track per-invocation chat usage across ReAct reasoning steps
...
Add ChatUsageTrackingHook that accumulates ChatUsage from every
PostReasoningEvent within a single process() call, expose it via
ReActAgentContext#getChatUsage(), and emit a per-step usage line in
ReActLoggingHook. The hook is cached on AgentSession and reset at the
start of each process() so the snapshot reflects the full invocation
(not just the last reasoning step).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 20:50:23 +08:00
everywhere.z
5c91e56bec
chore: update LiteFlow build after logging improvements
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 23:51:33 +08:00
everywhere.z
d72d04475b
docs(agent): clarify lifecycle and security caveats in react agent guide
...
Add notes on framework integration prerequisites, event listener
threading, build-time capability methods, session reuse semantics,
built-in tool risks, and two new troubleshooting entries.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 19:13:31 +08:00
everywhere.z
65a6213b72
feat(core): add generic flow event channel for streaming output
...
Introduce FlowEvent/FlowEventListener/FlowEventPublisher on the Slot so
callers can subscribe via ExecuteOption.eventListener and receive
incremental events while a chain is running. ReActAgentComponent wires
agentscope reasoning/tool_result/summary/result events into this channel
when a listener is registered, keeping the non-listener path as a plain
blocking call.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 16:24:10 +08:00
everywhere.z
9b227cf126
docs(agent): complete react agent skills guide
2026-05-10 22:31:09 +08:00
everywhere.z
7adfbe7f5f
docs(agent): plan react-agent skills support
2026-05-10 16:19:11 +08:00
everywhere.z
b9de094d33
docs(agent): design react-agent skills support
2026-05-10 16:12:43 +08:00
everywhere.z
ccebedc77e
docs(agent): update react-agent guide to dual-key (conversationId + agentKey) model
...
Reflect the session management refactor from single sessionId to
(conversationId, agentKey) dual-key: update all hook signatures to
parameterless style with ctx(), add curl/wget to shell whitelist,
and remove obsolete SlotAttachmentTest.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 15:57:51 +08:00
everywhere.z
29073e23c4
docs: add design spec and implementation plan for react-agent context refactor
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 15:01:45 +08:00
everywhere.z
c31e279560
refactor(agent): rename WORKSPACE_FILE to LOCAL_FILE for memory storage mode
...
该模式的 .agent-session 目录实际位于 workspace.root 之下、与各 session
的 workspace 子目录平级而非嵌套,旧名 WORKSPACE_FILE 容易误导为"存储在
某个 workspace 内部"。LOCAL_FILE 与 REDIS、MYSQL 同层级地描述后端类型,
更准确地反映实际行为。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 00:11:21 +08:00
everywhere.z
7fe12ed624
chore(agent): 补全 agent 配置 javadoc 与 spring 配置元数据,精简测试模块 pom
...
- 为 agent 配置类(AgentConfig/SessionConfig/ShellConfig/MemoryStorageConfig 等)补充中文 javadoc
- 在 spring-boot-starter / spring-boot4-starter 的 additional-spring-configuration-metadata.json 中补全 liteflow.agent.* 配置项,提供 IDE 配置提示
- 合并 testcase-el 中 react-agent 与 springboot4 的 profile,移除子模块冗余的 maven-compiler/surefire 配置
- 移除已不再使用的 AgentConfig / LiteflowConfigAgentField / Boot4AutoConfiguration 测试文件
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 23:25:07 +08:00
everywhere.z
f65d4264b9
docs(react-agent): 补充下游节点获取 Agent 结果的说明,扩展 react-agent 测试模块多平台用例
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 12:32:37 +08:00
everywhere.z
bfad0ece58
docs(react-agent): document default NanoId session and ReAct logging hook
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 11:59:56 +08:00
everywhere.z
61824d6956
feat(react-agent): add session factory infrastructure, memory storage config, and integration tests
...
- Add MemoryStorageConfig/MemoryStorageMode and per-backend configs (Redis, MySQL, workspace file)
- Add AgentSessionFactoryRegistry with NONE, JVM, WORKSPACE_FILE, REDIS, MYSQL implementations
- Add integration test suite with EL-orchestrated Spring Boot tests
- Remove per-module READMEs in favor of unified guide
- Update POMs, CLAUDE.md, AGENTS.md
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 19:12:29 +08:00
everywhere.z
0820f45032
docs(react-agent): rewrite usage guide based on current ModelSpec API
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 19:11:26 +08:00
everywhere.z
4285720428
docs(react-agent): add implementation plan for ModelSpec redesign
...
10-task TDD plan covering ModelSpec/CredentialResolver in core, the
four provider modules (openai/anthropic/gemini/dashscope), the
ReActAgentComponent abstract-method switch, and migration of test cmps.
2026-04-29 17:37:04 +08:00
everywhere.z
b63bc1a7f4
docs(react-agent): add design spec for ModelSpec API redesign
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 17:28:23 +08:00
everywhere.z
3751739b26
docs: 新增 liteflow-react-agent 模块实现计划
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 15:25:06 +08:00
everywhere.z
96f68c84fc
docs: 将 ReActAgent 配置融入 LiteflowConfig,apiKey 由抽象类自动提供
...
- ReActAgentProperties 改名为 AgentConfig,作为 LiteflowConfig.agent 字段
(Spring Boot 自动走 prefix=liteflow 装配,统一 LiteflowConfigGetter 访问)
- AgentConfig 等纯 POJO 放入 liteflow-core 新包 property.agent,
严格保证无 agentscope/第三方 SDK 依赖
- 抽象类新增 final agentConfig() 方法,用户不再需要 @Resource 注入配置
- 用户代码示例与执行流程同步更新
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 15:09:06 +08:00
everywhere.z
8333819ffe
docs: 修正 ReActAgentComponent 的 userPrompt 语义与 thinking 参数处置
...
- userMessage 更名为 userPrompt,并改为抽象方法(必须实现)
- 新增 §4.1 明确 thinking level 等模型高级参数由用户在 buildModel 内处理,
LiteFlow 不做统一抽象
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 14:39:04 +08:00
everywhere.z
f760ac2203
docs: 新增 liteflow-react-agent 模块设计稿
...
为 LiteFlow 集成 agentscope ReAct Agent 的 5 模块设计:
core + openai(含 DeepSeek/Kimi/GLM/MiniMax preset)+ anthropic + gemini + dashscope。
涵盖抽象类、session/workspace 隔离、shell 命令管控与配置结构。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 14:20:10 +08:00
bryan31
091c701347
更新项目主页,移除项目内的主页
2021-01-02 12:45:06 +08:00