Commit Graph

2488 Commits

Author SHA1 Message Date
everywhere.z
6cf7faed41 chore: add ThinkingBlock import to ReActLoggingHook 2026-05-16 23:22:17 +08:00
everywhere.z
65cbb1ecd5 feat(agent): wire conversation workspace into skill code execution
Pass the ReAct agent context workspace directory through SkillBoxFactory
so SkillBox's code execution runs against the conversation workspace
instead of the process default.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 14:00:37 +08:00
everywhere.z
f70d4aa1c1 build(test): drop redundant surefire override for react agent tests
Remove the maven-surefire-plugin skipTests=false override in
liteflow-testcase-el-react-agent, leaving the test module to inherit
the parent configuration.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 19:13:44 +08:00
everywhere.z
daee30dad3 build(starter): expose liteflow.agent.skills config hints
Register liteflow.agent.skills.{enabled,path,strict} and the
openai-compatible / anthropic-compatible credential maps in the
additional-spring-configuration-metadata.json of both Spring Boot
starters so IDEs surface completion and type hints for these keys.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 19:13:39 +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
828a2d9099 test(agent): reorganize react agent test coverage 2026-05-13 23:31:07 +08:00
everywhere.z
2011d6898b test(agent): cover react-agent feature scenarios end-to-end
Add focused feature suites under react-agent test resources for
conversation/agentKey isolation, compatible-custom platform handshake,
managed shell mode, workspace file tools, skills loading, and a live
platform connectivity probe — each with its own EL chain, properties,
and prepare/record components.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 16:24:21 +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
dc5d328941 docs(agent): describe react agent skills 2026-05-10 22:23:13 +08:00
everywhere.z
d8fd7f6015 feat(agent): integrate skills with react agent component 2026-05-10 22:20:14 +08:00
everywhere.z
a3bf935c5c feat(agent): track loaded skills 2026-05-10 21:53:06 +08:00
everywhere.z
db4a099361 feat(agent): load skills into skill box 2026-05-10 21:34:13 +08:00
everywhere.z
18007cf855 test(agent): cover skill box factory behavior 2026-05-10 16:41:28 +08:00
everywhere.z
e950cc38f2 feat(agent): add skills configuration 2026-05-10 16:24:15 +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
3175af400d feat(agent): refactor session management to dual-key (conversationId + agentKey)
AgentSessionManager 从单一 sessionId 改为 (conversationId, agentKey) 双 key 架构:
同一 conversationId 下多个 agent 共享 workspace 目录但各自拥有独立的 AgentSession
和对话记忆。删除 NanoIdSessionIdGenerator(conversationId 生成职责上移到 core 层
的 ConversationIdGenerator)。新增 ReActAgentConversationContinuityTest 和
ReActAgentMultiAgentChainTest 覆盖对话连续性和多 agent 协作场景。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 15:01:39 +08:00
everywhere.z
a5735c3f4d feat(core): add ExecuteOption and ConversationIdGenerator to FlowExecutor
新增 ExecuteOption 统一入口,支持 requestId、conversationId、上下文等维度的自由组合,
避免 execute2RespWithXxx 系列方法命名爆炸。同时新增 ConversationIdGenerator 为
agent 对话连续性提供 NanoId 格式的 conversationId 生成能力。LiteflowResponse 增加
conversationId 字段用于返回给调用方。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 15:01:19 +08:00
everywhere.z
36d945fca2 test(react-agent): cover ctx() lifecycle invariants
- 验证 agent 缓存复用时 model 内 ctx() 取到当次 ctx 而非陈旧引用
- 验证不变量字段(conversationId/agentKey/workspaceDir)跨次一致

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 14:29:40 +08:00
everywhere.z
67a9b9bed7 refactor(react-agent): make all hooks parameterless via slot-bound ctx
- ReActAgentComponent 所有 hook 改为无参签名,新增 protected final ctx() 访问器
- ctx 通过 Slot.setAttachment 按 _react_agent_ctx_<nodeId> 挂载,process() finally 解绑
- 按 nodeId 隔离 attachment key,支持 WHEN 并发场景多个 agent 节点共享 slot
- 7 个测试 cmp 子类全部迁移到新签名
- StubModel 改为持有组件引用,运行时动态调 comp.ctx() 取当次 ctx

破坏性变更:所有 ReActAgentComponent 子类必须更新签名。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 14:22:43 +08:00
everywhere.z
4c1218f6cd feat(core): add generic attachment API to Slot
为后续 per-invocation 插件上下文挂载提供通用 KV 入口。
复用已有 metaDataMap,包含 set/get/has/remove 四个 public 方法。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 14:16:39 +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
39740b6f3d test: 添加 run_all_with_jdk17 测试运行配置
为 `liteflow-testcase-el` 模块添加使用 JDK 17 的 JUnit 测试运行配置。
2026-05-01 00:57:20 +08:00
everywhere.z
fe87db62fa test(springboot4): 添加 run_springboot4_with_jdk25 测试运行配置
为 `liteflow-testcase-el-springboot4` 模块添加使用 JDK 25 的 JUnit 测试运行配置。
2026-05-01 00:56:50 +08:00
everywhere.z
bda0d81719 fix(parser): 本地路径正则支持 + 字符
修复当项目路径包含 + 号(如 LiteFlow-JDK21+)时,FlowParserProvider
无法识别本地配置文件路径并抛出 ErrorSupportPathException 的问题。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 00:40:00 +08:00
everywhere.z
5777e4cb08 Merge branch 'dev' into sb4 2026-05-01 00:00:50 +08:00
everywhere.z
e2d012c8f6 测试用例运行配置 2026-05-01 00:00:24 +08:00
everywhere.z
2b16b193b0 Merge branch 'dev' into sb4 2026-04-30 23:56:00 +08:00
everywhere.z
2e92eb506d feat(springboot4): 新增 liteflow-spring-boot4-starter
适配 Spring Boot 4 / Spring 7 / JDK 17+ 的自动装配 starter:
- 提供 LiteflowProperty / LiteflowMonitorProperty 配置绑定
- LiteflowMainAutoConfiguration / LiteflowPropertyAutoConfiguration 通过 AutoConfiguration.imports 注册
- LiteflowExecutorInit 负责启动期初始化 FlowExecutor
- 根 pom 引入 springboot4.version=4.0.6,并将 release profile 拆分为 release-on-8 / release-on-17,新模块在 JDK 17+ profile 与 release-on-17 profile 中接入

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 23:55:09 +08:00
everywhere.z
ea3a8315e4 test(springboot4): 新增 liteflow-testcase-el-springboot4 测试模块
仿照 liteflow-testcase-el-springboot 模块,将全部测试用例迁移到 Spring Boot 4 / Spring 7 环境:
- 复制全部测试源码与资源;将 javax.annotation.Resource 迁移到 jakarta.annotation.Resource
- pom 中显式覆盖父 pom 锁定的 Spring 5/SB 2/旧 logback/旧 slf4j/旧 jakarta-annotation 1.3.5(仍为 javax 包)等版本
- 在 liteflow-testcase-el 父 pom 中通过 JDK 17+ profile 接入新模块

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 23:54:01 +08:00
everywhere.z
8284f5101a Merge remote-tracking branch 'origin/dev' into dev 2026-04-30 23:52:30 +08:00
everywhere.z
d27eb7041d liteflow react agent pom adjust 2026-04-30 23:52:19 +08:00
everywhere.z
13a235397c 测试用例运行配置 2026-04-30 23:50:49 +08:00
everywhere.z
ad6a40c0e9 build(graaljs): 通过 profile 适配 JDK 17+ 的 GraalJS 25.x
将 GraalJS 坐标提取为可覆盖属性,新增 graaljs-jdk17-plus profile,在 JDK 17+ 下自动切换到 org.graalvm.polyglot 25.0.2,兼容旧 JDK 仍使用 org.graalvm.js 22.0.0。
2026-04-30 14:27:58 +08:00
everywhere.z
192579ee8e feat(core): 支持无 chain 配置启动
放宽 DTD 与 JSON 解析对 chain 节点的强校验,允许 ruleSource 下未定义任何 chain 时正常启动;新增 NoChainELSpringbootTest 用例。
2026-04-30 14:27:49 +08:00
铂赛东
2feb4b636c !355 bug 修复 PercentageOfParallelExecutor 并行任务执行时可能出现的阻塞问题
Merge pull request !355 from luoyi/issues/IIYPFL
2026-04-30 05:49:01 +00: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
47095ddd40 test(react-agent): consolidate test suite to a Gemini integration test
Remove the per-platform model/factory/entry tests and the unit-style
tool/session/component tests; keep a single Spring Boot integration
test that exercises the full ReAct chain against Gemini.

The pruned tests were tightly coupled to the older ModelSpec/Builder
APIs and largely duplicated coverage now provided by the integration
flow plus the new logging hook visibility.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 11:49:39 +08:00
everywhere.z
9612800b4b feat(react-agent): log ReAct reason/act events with sessionId and config toggle
Subscribe to agentscope Pre/PostReasoningEvent, Pre/PostActingEvent
and ErrorEvent through a new ReActLoggingHook, surfacing the agent's
internal think-act loop in standard logs. Each line carries the
LiteFlow agent sessionId so concurrent sessions stay distinguishable.

ReActAgentComponent attaches the hook automatically alongside any
user-provided hooks. Toggle via liteflow.agent.logging.react-enabled
(default true) or override enableReActLogging() per component.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 11:49:27 +08:00
everywhere.z
5bd1850d99 fix(react-agent-gemini): align agentscope and google-genai versions with parent BOM
The module had hardcoded agentscope:1.0.9 and google-genai:1.0.0,
which conflicted with parent pom's 1.0.11/1.38.0 properties and
caused NoSuchMethodError on Part.thoughtSignature() at runtime.
Use the property placeholders so versions stay centrally managed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 11:49:17 +08:00
everywhere.z
a630e85a88 chore(react-agent-core): add missing NanoIdSessionIdGenerator source
Supplements 61824d695 which referenced this generator without
checking it in.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 11:49:10 +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
c612dfaf72 test(react-agent): migrate test cmps to ModelSpec API
Replaces buildModel(ctx) overrides with model(ctx) returning
DeepSeek/OpenAI/Anthropic/Gemini/DashScope spec instances.
Also updates TestAgent inner classes in ReActAgentComponentTest
and MemoryStoragePersistenceTest.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 18:30:21 +08:00
everywhere.z
ca9608f793 refactor(react-agent-core): switch abstract from buildModel to model
ReActAgentComponent now requires subclasses to override model(ctx)
returning a ModelSpec. The legacy buildModel(ctx) becomes a
non-abstract escape hatch with a default implementation delegating
to model(ctx).resolve(agentConfig()).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 18:25:22 +08:00