Files
AIDRCLI_AAM_PROTO/AIDR/AgentActionAudit.proto
T
q00505699 559e59ae7b 【问题单号 Defect】202608101429
【修改说明 Modification】AIDR Protobuf初始版本提交。
【修改人 Modifier】qiaonaiqiang 00505699
【评审人 Reviewer】micro 00184944
2026-08-10 14:30:00 +08:00

86 lines
3.1 KiB
Protocol Buffer

syntax = "proto3";
package AgentActionAudit;
import "AIDR/AgentIdentify.proto";
import "AIDR/MCPRemoteToolType2ID.proto";
import "google/protobuf/timestamp.proto";
// AI Agent 同步服务,AIDR-CLI ---> AAM同步AI Agent动作信息。
service AIAgentActionSyncService {
// 单个新增/删除
rpc AIAgentActionSyncOper(AIAgentActionEventReq) returns (AIAgentActionEventRsp);
// 批量操作
rpc AIAgentSyncOperBatch(AIAgentActionEventReqBatch)returns(AIAgentActionEventRsp);
}
message AIAgentActionEventBase {
//标准时间:UTC时间戳(秒+纳秒)
google.protobuf.Timestamp event_time = 1;
enum AIAgentActionType {
ACTION_TYPE_UNUSE = 0;
ACTION_TYPE_LLM_CALL = 1; // POC不需要支持
ACTION_TYPE_REMOTE_TOOL = 2; // POC当前仅支持这一种
ACTION_TYPE_LOCAL_TOOL = 3; // POC不需要支持
}
AIAgentActionType action_type = 2;
oneof data {
AIAgentActionRemoteTool remote_tool = 3; // POC当前仅支持这一种
AIAgentActionLocalTool local_tool = 4; // POC不需要支持
AIAgentActionLLMCall llm_call = 5; // POC不需要支持
}
}
// AI Agent识别粒度:MAC用户名+终端+AI Agent类别,AIDR-CLI尽力而为,提供终端+AI Agent类型
// 不支持版本信息,例如, Claude Code v1.1和Claude Code v1.2 agent name均为Claude Code
// 不支持多实例信息,例如,不同的安装位置,不同的进程等
message AIAgentActionEventReq {
uint64 msg_id = 1;
AIAgentIdentify.AIAgentKey key = 2;
AIAgentActionEventBase evt = 3;
}
// 操作返回结果
message AIAgentActionEventRsp {
int32 code = 1; // 0成功,非0错误码
string msg = 2; // 提示信息
uint64 msg_id = 3; // 消息ID关联字段
}
message AIAgentActionEventReqBatch {
uint64 msg_id = 1; // 消息;
AIAgentIdentify.AIAgentKey key = 2;
repeated AIAgentActionEventBase evt_list = 3;
}
message AIAgentActionRemoteTool {
string mcp_oper = 1; //MCP协议动作
McpRemoteToolIdentify.MCPServerName ser_name = 2;
McpRemoteToolIdentify.ToolsName tool_name = 3; // 工具访问名称
optional string tool_param = 4; // 工具访问的参数不需要
optional string mcp_result = 5; // MCP协议结果
}
message AIAgentActionLocalTool {
McpRemoteToolIdentify.ToolsName tool_name = 1; // 工具访问名称
optional string tool_param = 2; // 工具访问的参数不需要
}
message AIAgentActionLLMCall {
LLMServerName name = 1; // LLM调用资源
optional string prompt = 2; // 提示词
// 粒度需要继续扩充
}
message LLMServerName {
enum LLMServerNameType{
LLM_SERVER_NAME_TYPE_UNUSE = 0;
LLM_SERVER_NAME_TYPE_IPV4 = 1;
LLM_SERVER_NAME_TYPE_IPV6 = 2;
LLM_SERVER_NAME_TYPE_DNS_NAME = 3;
}
LLMServerNameType name_type = 1; // LLM Server 名字类型
string name_str = 2;
uint32 ser_port = 3; // LLM Server 服务端口
string model_name = 4; // LLM Server 使用的模型名称
// 粒度按需求继续可以继续扩充
}