```
feat(agent): 添加对持久化子智能体的支持并增强委派管理 添加了持久化子智能体的完整生命周期管理功能,包括创建、更新、删除和查询API接口。 新增了子智能体的JSON-RPC通信协议支持,实现了远程调用和任务管理功能。 同时增强了委派管理器的功能: - 添加了对本地委派、插件委派和本地回退的开关控制 - 实现了持久化子智能体任务的自动检测和本地执行保护 - 增加了对不同委派类型的权限验证机制 修改了智能体注册表以支持插件智能体的条件性包含,并更新了工具注册逻辑以支持可选工具。 BREAKING CHANGE: 委派管理器的构造函数签名已更改,添加了新的控制参数。 ```
This commit is contained in:
@ -190,6 +190,8 @@ export const useChatStore = create<ChatStore>((set) => ({
|
||||
? 'run_started'
|
||||
: event.type === 'process_run_progress'
|
||||
? 'run_progress'
|
||||
: event.type === 'process_run_message'
|
||||
? 'run_message'
|
||||
: event.type === 'process_run_status'
|
||||
? 'run_status'
|
||||
: event.type === 'process_run_artifact'
|
||||
@ -207,6 +209,7 @@ export const useChatStore = create<ChatStore>((set) => ({
|
||||
? event.summary
|
||||
: undefined,
|
||||
status: 'status' in event ? event.status : undefined,
|
||||
message_role: 'message_role' in event ? event.message_role : undefined,
|
||||
metadata: 'metadata' in event ? event.metadata : undefined,
|
||||
created_at: event.created_at,
|
||||
});
|
||||
@ -225,7 +228,6 @@ export const useChatStore = create<ChatStore>((set) => ({
|
||||
started_at: event.created_at,
|
||||
metadata: event.metadata,
|
||||
});
|
||||
nextSelectedRunId = event.run_id;
|
||||
}
|
||||
|
||||
if (event.type === 'process_run_status') {
|
||||
@ -257,6 +259,20 @@ export const useChatStore = create<ChatStore>((set) => ({
|
||||
});
|
||||
}
|
||||
|
||||
if (event.type === 'process_run_message') {
|
||||
const current = nextRuns.find((item) => item.run_id === event.run_id);
|
||||
nextRuns = upsertRun(nextRuns, {
|
||||
run_id: event.run_id,
|
||||
parent_run_id: current?.parent_run_id ?? event.parent_run_id ?? null,
|
||||
actor_type: event.actor_type,
|
||||
actor_id: event.actor_id,
|
||||
actor_name: event.actor_name,
|
||||
title: current?.title || event.actor_name,
|
||||
status: current?.status || 'running',
|
||||
started_at: current?.started_at || event.created_at,
|
||||
});
|
||||
}
|
||||
|
||||
if (event.type === 'process_run_artifact') {
|
||||
nextArtifacts = upsertArtifact(nextArtifacts, {
|
||||
artifact_id: `${event.run_id}:${event.created_at}:${event.title}`,
|
||||
@ -273,7 +289,6 @@ export const useChatStore = create<ChatStore>((set) => ({
|
||||
metadata: event.metadata,
|
||||
created_at: event.created_at,
|
||||
});
|
||||
nextSelectedRunId = event.run_id;
|
||||
}
|
||||
|
||||
if (event.type === 'process_run_finished') {
|
||||
|
||||
Reference in New Issue
Block a user