Skip to content

[Feature] 修复开发者反馈的系列问题#15

Merged
canfuu merged 11 commits intomainfrom
feature/upgrade_feature
Jan 15, 2026
Merged

[Feature] 修复开发者反馈的系列问题#15
canfuu merged 11 commits intomainfrom
feature/upgrade_feature

Conversation

@canfuu
Copy link
Collaborator

@canfuu canfuu commented Jan 15, 2026

  1. Trigger现在会启动新的沙箱运行计划任务了
  2. 提供了Agent阶段的概念,现在允许Hook定义不同的Codeact运行阶段
  3. mcp定义的方式做了修改

canfuu and others added 11 commits January 13, 2026 14:01
此次重构将`TriggerExecutor`中的代码执行部分改用`GraalCodeExecutor`处理,并移除了原有的`CodeExecutionEnvironment`等相关类。这样不仅减少了代码冗余,还提升了整体的一致性和安全性。
更新多个子模块及父项目的pom.xml中的版本号,从0.1.0升级到0.1.1-SNAPSHOT,以便进行后续开发迭代。
# Conflicts:
#	assistant-agent-autoconfigure/pom.xml
#	assistant-agent-common/pom.xml
#	assistant-agent-core/pom.xml
#	assistant-agent-evaluation/pom.xml
#	assistant-agent-extensions/pom.xml
#	assistant-agent-prompt-builder/pom.xml
#	assistant-agent-start/pom.xml
#	pom.xml
…a/AssistantAgent into feature/upgrade_feature
Copilot AI review requested due to automatic review settings January 15, 2026 11:45
@canfuu canfuu enabled auto-merge January 15, 2026 11:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces several enhancements to the assistant-agent system as version 0.1.2, addressing developer feedback. The changes enable triggers to run in isolated sandboxes, introduce an agent phase concept for better hook management, and improve MCP tool definition flexibility.

Changes:

  • Added trigger sandbox execution capability with session snapshot support and executor framework
  • Introduced AgentPhase system (REACT, CODEACT, ALL) with @HookPhases annotation for granular hook control
  • Enhanced MCP dynamic tool factory with McpServerAwareToolCallback interface for flexible server-aware tool definitions

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pom.xml (root + 7 modules) Version bump from 0.1.1 to 0.1.2
CodeactAgentConfig.java Updated system prompt documentation to describe React/Codeact phases
SessionSnapshot.java New model for storing session context for trigger execution
SessionSnapshotRepository.java New SPI for session snapshot persistence
InMemorySessionSnapshotRepository.java In-memory implementation of session snapshot storage
TriggerExecutionResult.java New model capturing trigger execution outcomes
TriggerDefinition.java Added fields for abandon function, function code snapshot, and confirmation settings
TriggerExecutor.java Core executor implementing trigger execution in isolated sandbox using GraalCodeExecutor
TriggerExecutionCallback.java Functional interface decoupling scheduling from execution
TriggerProperties.java Added execution config for IO, native access, and timeout settings
TriggerAutoConfiguration.java Wired up executor, snapshot repository, and execution callback
ExecutionBackend.java Added setExecutionCallback method with default implementation
SpringSchedulerExecutionBackend.java Integrated execution callback for actual trigger logic execution
AgentPhase.java New enum defining REACT, CODEACT, and ALL phases
HookPhases.java Annotation for declaring hook applicability to agent phases
HookPhaseUtils.java Utility class for filtering and grouping hooks by phase
AfterAgentLearningHook.java Added @HookPhases(AgentPhase.REACT) annotation
FastIntentReactHook.java Added @HookPhases(AgentPhase.REACT) annotation
McpServerAwareToolCallback.java New interface for server-aware MCP tool callbacks
McpDynamicToolFactory.java Enhanced to support McpServerAwareToolCallback interface

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +114 to +115
Collections.emptyList(), // ToolCallback列表
null, // OverAllState
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline comments use Chinese characters which may cause issues in some development environments. Consider using English comments for better compatibility, or ensure the project's character encoding is consistently set to UTF-8.

Copilot uses AI. Check for mistakes.
* 执行超时时间(毫秒),0表示不限制
*/
private long executionTimeout = 0;
private long executionTimeout = 30000;
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default execution timeout was changed from 0 (unlimited) to 30000ms (30 seconds). This is a breaking change in default behavior. Consider documenting this change in a migration guide or changelog, as existing triggers that take longer than 30 seconds will now fail unless explicitly configured.

Suggested change
private long executionTimeout = 30000;
private long executionTimeout = 0;

Copilot uses AI. Check for mistakes.
2. write_condition_code: 编写触发器条件判断函数(返回bool值)
3. execute_code: 执行已编写的函数
4. search/reply/notification: 可在代码中调用的辅助工具
4. 其它工具: 可以在思考过后调用的其他工具
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent punctuation style. Line 82 uses Chinese colon ':' while the original line used English colon. For consistency with lines 79-81 which use English colons, this should also use an English colon.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@AQing-527 AQing-527 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@canfuu canfuu merged commit 8e558c0 into main Jan 15, 2026
7 checks passed
@canfuu canfuu deleted the feature/upgrade_feature branch January 15, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants