Expose only approved Agent RPC methods
This commit is contained in:
@@ -114,6 +114,7 @@
|
||||
- Agent RPC 客户端入口:删除没有现行调用者的旧 `Client`/`DialFromFiles` 包装及仅针对该包装的测试;当前命令仍通过部署提供的双向 TLS 配置建立 gRPC 连接,原证书信任、SAN 和握手回归测试保持不变。旧服务端业务 RPC 与 Proto 仍待后续清理。
|
||||
- Agent 会话持久边界:将会话代际使用的私有原子落盘函数从旧执行日志模块移入独立会话日志文件;原有目录同步、写失败报错和重启代际栅栏测试继续通过。旧执行日志及业务 RPC 尚未删除;此次只移动源码,不修改现存 Agent 恢复文件。
|
||||
- Agent 旧执行状态屏障:批准的 Mock Agent 启动时若发现旧执行日志,立即拒绝启动并明确要求人工处置;隔离测试先复现了原先允许启动的问题,再证明旧日志字节不变、新会话状态未写入。此屏障不迁移、不清理存量文件;没有检查或处置真实环境中的旧记录。
|
||||
- Agent Proto 唯一服务面:新增服务方法集合测试先确认旧 RPC 仍可被服务描述符发现,随后将 `AgentControlService` 收敛为状态/激活、获批执行与控制、加载版本及录音/结果八个方法;重新生成 Go 类型、核验七项来源哈希,并同步改写当前 Proto 错误与恢复说明。旧消息定义、旧服务端实现及专属测试尚待清理,不能把本批当作 P07 完成或真实 Agent 联调。
|
||||
|
||||
## 验收台账
|
||||
|
||||
|
||||
+111
-141
@@ -5305,23 +5305,13 @@ const file_agent_agent_proto_rawDesc = "" +
|
||||
"\x1cFACT_KIND_TRANSCRIPT_UPDATED\x10\x04\x12\x1f\n" +
|
||||
"\x1bFACT_KIND_TRANSCRIPT_FAILED\x10\x05\x12\x1d\n" +
|
||||
"\x19FACT_KIND_CONTACT_OPT_OUT\x10\x06\x12 \n" +
|
||||
"\x1cFACT_KIND_RECORDING_PROGRESS\x10\a2\xf4\v\n" +
|
||||
"\x1cFACT_KIND_RECORDING_PROGRESS\x10\a2\xc6\x05\n" +
|
||||
"\x13AgentControlService\x12M\n" +
|
||||
"\x0eGetAgentStatus\x12\x1c.agent.GetAgentStatusRequest\x1a\x1d.agent.GetAgentStatusResponse\x12J\n" +
|
||||
"\rActivateAgent\x12\x1b.agent.ActivateAgentRequest\x1a\x1c.agent.ActivateAgentResponse\x12G\n" +
|
||||
"\fGetBootstrap\x12\x1a.agent.GetBootstrapRequest\x1a\x1b.agent.GetBootstrapResponse\x12V\n" +
|
||||
"\x11SetAdmissionState\x12\x1f.agent.SetAdmissionStateRequest\x1a .agent.SetAdmissionStateResponse\x128\n" +
|
||||
"\aExecute\x12\x15.agent.ExecuteRequest\x1a\x16.agent.ExecuteResponse\x12V\n" +
|
||||
"\x11ExecuteAuthorized\x12\x1f.agent.ExecuteAuthorizedRequest\x1a .agent.ExecuteAuthorizedResponse\x12P\n" +
|
||||
"\rActivateAgent\x12\x1b.agent.ActivateAgentRequest\x1a\x1c.agent.ActivateAgentResponse\x12P\n" +
|
||||
"\x0fExecuteApproved\x12\x1d.agent.ExecuteApprovedRequest\x1a\x1e.agent.ExecuteApprovedResponse\x12k\n" +
|
||||
"\x18ApplyApprovedTaskControl\x12&.agent.ApplyApprovedTaskControlRequest\x1a'.agent.ApplyApprovedTaskControlResponse\x12G\n" +
|
||||
"\fGetLoadedSIP\x12\x1a.agent.GetLoadedSIPRequest\x1a\x1b.agent.GetLoadedSIPResponse\x12Y\n" +
|
||||
"\x12GetExecutionPermit\x12 .agent.GetExecutionPermitRequest\x1a!.agent.GetExecutionPermitResponse\x12S\n" +
|
||||
"\x10ApplyTaskControl\x12\x1e.agent.ApplyTaskControlRequest\x1a\x1f.agent.ApplyTaskControlResponse\x12M\n" +
|
||||
"\x0eQueryExecution\x12\x1c.agent.QueryExecutionRequest\x1a\x1d.agent.QueryExecutionResponse\x12_\n" +
|
||||
"\x14ReportExecutionEvent\x12\".agent.ReportExecutionEventRequest\x1a#.agent.ReportExecutionEventResponse\x12J\n" +
|
||||
"\rRequestUpload\x12\x1b.agent.RequestUploadRequest\x1a\x1c.agent.RequestUploadResponse\x12M\n" +
|
||||
"\x0eCompleteUpload\x12\x1c.agent.CompleteUploadRequest\x1a\x1d.agent.CompleteUploadResponse\x12e\n" +
|
||||
"\fGetLoadedSIP\x12\x1a.agent.GetLoadedSIPRequest\x1a\x1b.agent.GetLoadedSIPResponse\x12e\n" +
|
||||
"\x16RequestRecordingUpload\x12$.agent.RequestRecordingUploadRequest\x1a%.agent.RequestRecordingUploadResponse\x12P\n" +
|
||||
"\x0fReportCallEnded\x12\x1d.agent.ReportCallEndedRequest\x1a\x1e.agent.ReportCallEndedResponse\x12S\n" +
|
||||
"\x10ReportCallResult\x12\x1e.agent.ReportCallResultRequest\x1a\x1f.agent.ReportCallResultResponseB-Z+git.ipao.vip/rogee/go-sip/gen/agent;agentpbb\x06proto3"
|
||||
@@ -5410,134 +5400,114 @@ var file_agent_agent_proto_goTypes = []any{
|
||||
nil, // 66: agent.GetLoadedSIPResponse.TrunkRevisionEntry
|
||||
}
|
||||
var file_agent_agent_proto_depIdxs = []int32{
|
||||
1, // 0: agent.Failure.code:type_name -> agent.FailureCode
|
||||
11, // 1: agent.OperationReceipt.meta:type_name -> agent.ResponseMeta
|
||||
0, // 2: agent.OperationReceipt.result:type_name -> agent.ResultCode
|
||||
12, // 3: agent.OperationReceipt.failure:type_name -> agent.Failure
|
||||
3, // 4: agent.AgentStatus.admission_state:type_name -> agent.AdmissionState
|
||||
15, // 5: agent.AgentStatus.capabilities:type_name -> agent.Capability
|
||||
16, // 6: agent.AgentStatus.resources:type_name -> agent.ResourceSample
|
||||
17, // 7: agent.AgentStatus.applied_configs:type_name -> agent.AppliedConfig
|
||||
7, // 8: agent.AssetDescriptor.kind:type_name -> agent.AssetKind
|
||||
10, // 9: agent.GetAgentStatusRequest.meta:type_name -> agent.RequestMeta
|
||||
14, // 10: agent.GetAgentStatusRequest.target:type_name -> agent.AgentBinding
|
||||
11, // 11: agent.GetAgentStatusResponse.meta:type_name -> agent.ResponseMeta
|
||||
18, // 12: agent.GetAgentStatusResponse.status:type_name -> agent.AgentStatus
|
||||
12, // 13: agent.GetAgentStatusResponse.failure:type_name -> agent.Failure
|
||||
10, // 14: agent.ActivateAgentRequest.meta:type_name -> agent.RequestMeta
|
||||
14, // 15: agent.ActivateAgentRequest.binding:type_name -> agent.AgentBinding
|
||||
11, // 16: agent.ActivateAgentResponse.meta:type_name -> agent.ResponseMeta
|
||||
2, // 17: agent.ActivateAgentResponse.state:type_name -> agent.ActivationState
|
||||
19, // 18: agent.ActivateAgentResponse.session:type_name -> agent.Session
|
||||
12, // 19: agent.ActivateAgentResponse.failure:type_name -> agent.Failure
|
||||
10, // 20: agent.GetBootstrapRequest.meta:type_name -> agent.RequestMeta
|
||||
11, // 21: agent.GetBootstrapResponse.meta:type_name -> agent.ResponseMeta
|
||||
2, // 22: agent.GetBootstrapResponse.state:type_name -> agent.ActivationState
|
||||
20, // 23: agent.GetBootstrapResponse.runtime_configs:type_name -> agent.ConfigReference
|
||||
21, // 24: agent.GetBootstrapResponse.upload_policy:type_name -> agent.UploadPolicy
|
||||
12, // 25: agent.GetBootstrapResponse.failure:type_name -> agent.Failure
|
||||
10, // 26: agent.SetAdmissionStateRequest.meta:type_name -> agent.RequestMeta
|
||||
14, // 27: agent.SetAdmissionStateRequest.target:type_name -> agent.AgentBinding
|
||||
3, // 28: agent.SetAdmissionStateRequest.state:type_name -> agent.AdmissionState
|
||||
13, // 29: agent.SetAdmissionStateResponse.receipt:type_name -> agent.OperationReceipt
|
||||
10, // 30: agent.ExecuteRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 31: agent.ExecuteRequest.binding:type_name -> agent.ExecutionBinding
|
||||
13, // 32: agent.ExecuteResponse.receipt:type_name -> agent.OperationReceipt
|
||||
6, // 33: agent.ExecuteResponse.state:type_name -> agent.ExecutionState
|
||||
10, // 34: agent.ExecuteAuthorizedRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 35: agent.ExecuteAuthorizedRequest.binding:type_name -> agent.ExecutionBinding
|
||||
13, // 36: agent.ExecuteAuthorizedResponse.receipt:type_name -> agent.OperationReceipt
|
||||
6, // 37: agent.ExecuteAuthorizedResponse.state:type_name -> agent.ExecutionState
|
||||
10, // 38: agent.ExecuteApprovedRequest.meta:type_name -> agent.RequestMeta
|
||||
10, // 39: agent.GetLoadedSIPRequest.meta:type_name -> agent.RequestMeta
|
||||
66, // 40: agent.GetLoadedSIPResponse.trunk_revision:type_name -> agent.GetLoadedSIPResponse.TrunkRevisionEntry
|
||||
10, // 41: agent.GetExecutionPermitRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 42: agent.GetExecutionPermitRequest.binding:type_name -> agent.ExecutionBinding
|
||||
13, // 43: agent.GetExecutionPermitResponse.receipt:type_name -> agent.OperationReceipt
|
||||
42, // 44: agent.GetExecutionPermitResponse.permit:type_name -> agent.ExecutionPermit
|
||||
10, // 45: agent.ApplyTaskControlRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 46: agent.ApplyTaskControlRequest.binding:type_name -> agent.ExecutionBinding
|
||||
4, // 47: agent.ApplyTaskControlRequest.action:type_name -> agent.ControlAction
|
||||
5, // 48: agent.ApplyTaskControlRequest.active_call_policy:type_name -> agent.ActiveCallPolicy
|
||||
13, // 49: agent.ApplyTaskControlResponse.receipt:type_name -> agent.OperationReceipt
|
||||
6, // 50: agent.ApplyTaskControlResponse.state:type_name -> agent.ExecutionState
|
||||
10, // 51: agent.ApplyApprovedTaskControlRequest.meta:type_name -> agent.RequestMeta
|
||||
4, // 52: agent.ApplyApprovedTaskControlRequest.action:type_name -> agent.ControlAction
|
||||
5, // 53: agent.ApplyApprovedTaskControlRequest.active_call_policy:type_name -> agent.ActiveCallPolicy
|
||||
10, // 54: agent.QueryExecutionRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 55: agent.QueryExecutionRequest.binding:type_name -> agent.ExecutionBinding
|
||||
22, // 56: agent.ExecutionSnapshot.binding:type_name -> agent.ExecutionBinding
|
||||
6, // 57: agent.ExecutionSnapshot.state:type_name -> agent.ExecutionState
|
||||
23, // 58: agent.ExecutionSnapshot.assets:type_name -> agent.AssetDescriptor
|
||||
11, // 59: agent.QueryExecutionResponse.meta:type_name -> agent.ResponseMeta
|
||||
49, // 60: agent.QueryExecutionResponse.snapshot:type_name -> agent.ExecutionSnapshot
|
||||
12, // 61: agent.QueryExecutionResponse.failure:type_name -> agent.Failure
|
||||
22, // 62: agent.ExecutionFact.binding:type_name -> agent.ExecutionBinding
|
||||
9, // 63: agent.ExecutionFact.kind:type_name -> agent.FactKind
|
||||
10, // 64: agent.ReportExecutionEventRequest.meta:type_name -> agent.RequestMeta
|
||||
51, // 65: agent.ReportExecutionEventRequest.fact:type_name -> agent.ExecutionFact
|
||||
13, // 66: agent.ReportExecutionEventResponse.receipt:type_name -> agent.OperationReceipt
|
||||
10, // 67: agent.RequestUploadRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 68: agent.RequestUploadRequest.binding:type_name -> agent.ExecutionBinding
|
||||
23, // 69: agent.RequestUploadRequest.asset:type_name -> agent.AssetDescriptor
|
||||
24, // 70: agent.UploadGrant.headers:type_name -> agent.Header
|
||||
13, // 71: agent.RequestUploadResponse.receipt:type_name -> agent.OperationReceipt
|
||||
55, // 72: agent.RequestUploadResponse.grant:type_name -> agent.UploadGrant
|
||||
8, // 73: agent.RequestUploadResponse.state:type_name -> agent.UploadState
|
||||
10, // 74: agent.CompleteUploadRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 75: agent.CompleteUploadRequest.binding:type_name -> agent.ExecutionBinding
|
||||
23, // 76: agent.CompleteUploadRequest.asset:type_name -> agent.AssetDescriptor
|
||||
13, // 77: agent.CompleteUploadResponse.receipt:type_name -> agent.OperationReceipt
|
||||
8, // 78: agent.CompleteUploadResponse.state:type_name -> agent.UploadState
|
||||
10, // 79: agent.RequestRecordingUploadRequest.meta:type_name -> agent.RequestMeta
|
||||
23, // 80: agent.RequestRecordingUploadRequest.asset:type_name -> agent.AssetDescriptor
|
||||
55, // 81: agent.RequestRecordingUploadResponse.grant:type_name -> agent.UploadGrant
|
||||
10, // 82: agent.ReportCallEndedRequest.meta:type_name -> agent.RequestMeta
|
||||
13, // 83: agent.ReportCallEndedResponse.receipt:type_name -> agent.OperationReceipt
|
||||
10, // 84: agent.ReportCallResultRequest.meta:type_name -> agent.RequestMeta
|
||||
63, // 85: agent.ReportCallResultRequest.upload:type_name -> agent.UploadObservation
|
||||
13, // 86: agent.ReportCallResultResponse.receipt:type_name -> agent.OperationReceipt
|
||||
25, // 87: agent.AgentControlService.GetAgentStatus:input_type -> agent.GetAgentStatusRequest
|
||||
27, // 88: agent.AgentControlService.ActivateAgent:input_type -> agent.ActivateAgentRequest
|
||||
29, // 89: agent.AgentControlService.GetBootstrap:input_type -> agent.GetBootstrapRequest
|
||||
31, // 90: agent.AgentControlService.SetAdmissionState:input_type -> agent.SetAdmissionStateRequest
|
||||
33, // 91: agent.AgentControlService.Execute:input_type -> agent.ExecuteRequest
|
||||
35, // 92: agent.AgentControlService.ExecuteAuthorized:input_type -> agent.ExecuteAuthorizedRequest
|
||||
37, // 93: agent.AgentControlService.ExecuteApproved:input_type -> agent.ExecuteApprovedRequest
|
||||
46, // 94: agent.AgentControlService.ApplyApprovedTaskControl:input_type -> agent.ApplyApprovedTaskControlRequest
|
||||
39, // 95: agent.AgentControlService.GetLoadedSIP:input_type -> agent.GetLoadedSIPRequest
|
||||
41, // 96: agent.AgentControlService.GetExecutionPermit:input_type -> agent.GetExecutionPermitRequest
|
||||
44, // 97: agent.AgentControlService.ApplyTaskControl:input_type -> agent.ApplyTaskControlRequest
|
||||
48, // 98: agent.AgentControlService.QueryExecution:input_type -> agent.QueryExecutionRequest
|
||||
52, // 99: agent.AgentControlService.ReportExecutionEvent:input_type -> agent.ReportExecutionEventRequest
|
||||
54, // 100: agent.AgentControlService.RequestUpload:input_type -> agent.RequestUploadRequest
|
||||
57, // 101: agent.AgentControlService.CompleteUpload:input_type -> agent.CompleteUploadRequest
|
||||
59, // 102: agent.AgentControlService.RequestRecordingUpload:input_type -> agent.RequestRecordingUploadRequest
|
||||
61, // 103: agent.AgentControlService.ReportCallEnded:input_type -> agent.ReportCallEndedRequest
|
||||
64, // 104: agent.AgentControlService.ReportCallResult:input_type -> agent.ReportCallResultRequest
|
||||
26, // 105: agent.AgentControlService.GetAgentStatus:output_type -> agent.GetAgentStatusResponse
|
||||
28, // 106: agent.AgentControlService.ActivateAgent:output_type -> agent.ActivateAgentResponse
|
||||
30, // 107: agent.AgentControlService.GetBootstrap:output_type -> agent.GetBootstrapResponse
|
||||
32, // 108: agent.AgentControlService.SetAdmissionState:output_type -> agent.SetAdmissionStateResponse
|
||||
34, // 109: agent.AgentControlService.Execute:output_type -> agent.ExecuteResponse
|
||||
36, // 110: agent.AgentControlService.ExecuteAuthorized:output_type -> agent.ExecuteAuthorizedResponse
|
||||
38, // 111: agent.AgentControlService.ExecuteApproved:output_type -> agent.ExecuteApprovedResponse
|
||||
47, // 112: agent.AgentControlService.ApplyApprovedTaskControl:output_type -> agent.ApplyApprovedTaskControlResponse
|
||||
40, // 113: agent.AgentControlService.GetLoadedSIP:output_type -> agent.GetLoadedSIPResponse
|
||||
43, // 114: agent.AgentControlService.GetExecutionPermit:output_type -> agent.GetExecutionPermitResponse
|
||||
45, // 115: agent.AgentControlService.ApplyTaskControl:output_type -> agent.ApplyTaskControlResponse
|
||||
50, // 116: agent.AgentControlService.QueryExecution:output_type -> agent.QueryExecutionResponse
|
||||
53, // 117: agent.AgentControlService.ReportExecutionEvent:output_type -> agent.ReportExecutionEventResponse
|
||||
56, // 118: agent.AgentControlService.RequestUpload:output_type -> agent.RequestUploadResponse
|
||||
58, // 119: agent.AgentControlService.CompleteUpload:output_type -> agent.CompleteUploadResponse
|
||||
60, // 120: agent.AgentControlService.RequestRecordingUpload:output_type -> agent.RequestRecordingUploadResponse
|
||||
62, // 121: agent.AgentControlService.ReportCallEnded:output_type -> agent.ReportCallEndedResponse
|
||||
65, // 122: agent.AgentControlService.ReportCallResult:output_type -> agent.ReportCallResultResponse
|
||||
105, // [105:123] is the sub-list for method output_type
|
||||
87, // [87:105] is the sub-list for method input_type
|
||||
87, // [87:87] is the sub-list for extension type_name
|
||||
87, // [87:87] is the sub-list for extension extendee
|
||||
0, // [0:87] is the sub-list for field type_name
|
||||
1, // 0: agent.Failure.code:type_name -> agent.FailureCode
|
||||
11, // 1: agent.OperationReceipt.meta:type_name -> agent.ResponseMeta
|
||||
0, // 2: agent.OperationReceipt.result:type_name -> agent.ResultCode
|
||||
12, // 3: agent.OperationReceipt.failure:type_name -> agent.Failure
|
||||
3, // 4: agent.AgentStatus.admission_state:type_name -> agent.AdmissionState
|
||||
15, // 5: agent.AgentStatus.capabilities:type_name -> agent.Capability
|
||||
16, // 6: agent.AgentStatus.resources:type_name -> agent.ResourceSample
|
||||
17, // 7: agent.AgentStatus.applied_configs:type_name -> agent.AppliedConfig
|
||||
7, // 8: agent.AssetDescriptor.kind:type_name -> agent.AssetKind
|
||||
10, // 9: agent.GetAgentStatusRequest.meta:type_name -> agent.RequestMeta
|
||||
14, // 10: agent.GetAgentStatusRequest.target:type_name -> agent.AgentBinding
|
||||
11, // 11: agent.GetAgentStatusResponse.meta:type_name -> agent.ResponseMeta
|
||||
18, // 12: agent.GetAgentStatusResponse.status:type_name -> agent.AgentStatus
|
||||
12, // 13: agent.GetAgentStatusResponse.failure:type_name -> agent.Failure
|
||||
10, // 14: agent.ActivateAgentRequest.meta:type_name -> agent.RequestMeta
|
||||
14, // 15: agent.ActivateAgentRequest.binding:type_name -> agent.AgentBinding
|
||||
11, // 16: agent.ActivateAgentResponse.meta:type_name -> agent.ResponseMeta
|
||||
2, // 17: agent.ActivateAgentResponse.state:type_name -> agent.ActivationState
|
||||
19, // 18: agent.ActivateAgentResponse.session:type_name -> agent.Session
|
||||
12, // 19: agent.ActivateAgentResponse.failure:type_name -> agent.Failure
|
||||
10, // 20: agent.GetBootstrapRequest.meta:type_name -> agent.RequestMeta
|
||||
11, // 21: agent.GetBootstrapResponse.meta:type_name -> agent.ResponseMeta
|
||||
2, // 22: agent.GetBootstrapResponse.state:type_name -> agent.ActivationState
|
||||
20, // 23: agent.GetBootstrapResponse.runtime_configs:type_name -> agent.ConfigReference
|
||||
21, // 24: agent.GetBootstrapResponse.upload_policy:type_name -> agent.UploadPolicy
|
||||
12, // 25: agent.GetBootstrapResponse.failure:type_name -> agent.Failure
|
||||
10, // 26: agent.SetAdmissionStateRequest.meta:type_name -> agent.RequestMeta
|
||||
14, // 27: agent.SetAdmissionStateRequest.target:type_name -> agent.AgentBinding
|
||||
3, // 28: agent.SetAdmissionStateRequest.state:type_name -> agent.AdmissionState
|
||||
13, // 29: agent.SetAdmissionStateResponse.receipt:type_name -> agent.OperationReceipt
|
||||
10, // 30: agent.ExecuteRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 31: agent.ExecuteRequest.binding:type_name -> agent.ExecutionBinding
|
||||
13, // 32: agent.ExecuteResponse.receipt:type_name -> agent.OperationReceipt
|
||||
6, // 33: agent.ExecuteResponse.state:type_name -> agent.ExecutionState
|
||||
10, // 34: agent.ExecuteAuthorizedRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 35: agent.ExecuteAuthorizedRequest.binding:type_name -> agent.ExecutionBinding
|
||||
13, // 36: agent.ExecuteAuthorizedResponse.receipt:type_name -> agent.OperationReceipt
|
||||
6, // 37: agent.ExecuteAuthorizedResponse.state:type_name -> agent.ExecutionState
|
||||
10, // 38: agent.ExecuteApprovedRequest.meta:type_name -> agent.RequestMeta
|
||||
10, // 39: agent.GetLoadedSIPRequest.meta:type_name -> agent.RequestMeta
|
||||
66, // 40: agent.GetLoadedSIPResponse.trunk_revision:type_name -> agent.GetLoadedSIPResponse.TrunkRevisionEntry
|
||||
10, // 41: agent.GetExecutionPermitRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 42: agent.GetExecutionPermitRequest.binding:type_name -> agent.ExecutionBinding
|
||||
13, // 43: agent.GetExecutionPermitResponse.receipt:type_name -> agent.OperationReceipt
|
||||
42, // 44: agent.GetExecutionPermitResponse.permit:type_name -> agent.ExecutionPermit
|
||||
10, // 45: agent.ApplyTaskControlRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 46: agent.ApplyTaskControlRequest.binding:type_name -> agent.ExecutionBinding
|
||||
4, // 47: agent.ApplyTaskControlRequest.action:type_name -> agent.ControlAction
|
||||
5, // 48: agent.ApplyTaskControlRequest.active_call_policy:type_name -> agent.ActiveCallPolicy
|
||||
13, // 49: agent.ApplyTaskControlResponse.receipt:type_name -> agent.OperationReceipt
|
||||
6, // 50: agent.ApplyTaskControlResponse.state:type_name -> agent.ExecutionState
|
||||
10, // 51: agent.ApplyApprovedTaskControlRequest.meta:type_name -> agent.RequestMeta
|
||||
4, // 52: agent.ApplyApprovedTaskControlRequest.action:type_name -> agent.ControlAction
|
||||
5, // 53: agent.ApplyApprovedTaskControlRequest.active_call_policy:type_name -> agent.ActiveCallPolicy
|
||||
10, // 54: agent.QueryExecutionRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 55: agent.QueryExecutionRequest.binding:type_name -> agent.ExecutionBinding
|
||||
22, // 56: agent.ExecutionSnapshot.binding:type_name -> agent.ExecutionBinding
|
||||
6, // 57: agent.ExecutionSnapshot.state:type_name -> agent.ExecutionState
|
||||
23, // 58: agent.ExecutionSnapshot.assets:type_name -> agent.AssetDescriptor
|
||||
11, // 59: agent.QueryExecutionResponse.meta:type_name -> agent.ResponseMeta
|
||||
49, // 60: agent.QueryExecutionResponse.snapshot:type_name -> agent.ExecutionSnapshot
|
||||
12, // 61: agent.QueryExecutionResponse.failure:type_name -> agent.Failure
|
||||
22, // 62: agent.ExecutionFact.binding:type_name -> agent.ExecutionBinding
|
||||
9, // 63: agent.ExecutionFact.kind:type_name -> agent.FactKind
|
||||
10, // 64: agent.ReportExecutionEventRequest.meta:type_name -> agent.RequestMeta
|
||||
51, // 65: agent.ReportExecutionEventRequest.fact:type_name -> agent.ExecutionFact
|
||||
13, // 66: agent.ReportExecutionEventResponse.receipt:type_name -> agent.OperationReceipt
|
||||
10, // 67: agent.RequestUploadRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 68: agent.RequestUploadRequest.binding:type_name -> agent.ExecutionBinding
|
||||
23, // 69: agent.RequestUploadRequest.asset:type_name -> agent.AssetDescriptor
|
||||
24, // 70: agent.UploadGrant.headers:type_name -> agent.Header
|
||||
13, // 71: agent.RequestUploadResponse.receipt:type_name -> agent.OperationReceipt
|
||||
55, // 72: agent.RequestUploadResponse.grant:type_name -> agent.UploadGrant
|
||||
8, // 73: agent.RequestUploadResponse.state:type_name -> agent.UploadState
|
||||
10, // 74: agent.CompleteUploadRequest.meta:type_name -> agent.RequestMeta
|
||||
22, // 75: agent.CompleteUploadRequest.binding:type_name -> agent.ExecutionBinding
|
||||
23, // 76: agent.CompleteUploadRequest.asset:type_name -> agent.AssetDescriptor
|
||||
13, // 77: agent.CompleteUploadResponse.receipt:type_name -> agent.OperationReceipt
|
||||
8, // 78: agent.CompleteUploadResponse.state:type_name -> agent.UploadState
|
||||
10, // 79: agent.RequestRecordingUploadRequest.meta:type_name -> agent.RequestMeta
|
||||
23, // 80: agent.RequestRecordingUploadRequest.asset:type_name -> agent.AssetDescriptor
|
||||
55, // 81: agent.RequestRecordingUploadResponse.grant:type_name -> agent.UploadGrant
|
||||
10, // 82: agent.ReportCallEndedRequest.meta:type_name -> agent.RequestMeta
|
||||
13, // 83: agent.ReportCallEndedResponse.receipt:type_name -> agent.OperationReceipt
|
||||
10, // 84: agent.ReportCallResultRequest.meta:type_name -> agent.RequestMeta
|
||||
63, // 85: agent.ReportCallResultRequest.upload:type_name -> agent.UploadObservation
|
||||
13, // 86: agent.ReportCallResultResponse.receipt:type_name -> agent.OperationReceipt
|
||||
25, // 87: agent.AgentControlService.GetAgentStatus:input_type -> agent.GetAgentStatusRequest
|
||||
27, // 88: agent.AgentControlService.ActivateAgent:input_type -> agent.ActivateAgentRequest
|
||||
37, // 89: agent.AgentControlService.ExecuteApproved:input_type -> agent.ExecuteApprovedRequest
|
||||
46, // 90: agent.AgentControlService.ApplyApprovedTaskControl:input_type -> agent.ApplyApprovedTaskControlRequest
|
||||
39, // 91: agent.AgentControlService.GetLoadedSIP:input_type -> agent.GetLoadedSIPRequest
|
||||
59, // 92: agent.AgentControlService.RequestRecordingUpload:input_type -> agent.RequestRecordingUploadRequest
|
||||
61, // 93: agent.AgentControlService.ReportCallEnded:input_type -> agent.ReportCallEndedRequest
|
||||
64, // 94: agent.AgentControlService.ReportCallResult:input_type -> agent.ReportCallResultRequest
|
||||
26, // 95: agent.AgentControlService.GetAgentStatus:output_type -> agent.GetAgentStatusResponse
|
||||
28, // 96: agent.AgentControlService.ActivateAgent:output_type -> agent.ActivateAgentResponse
|
||||
38, // 97: agent.AgentControlService.ExecuteApproved:output_type -> agent.ExecuteApprovedResponse
|
||||
47, // 98: agent.AgentControlService.ApplyApprovedTaskControl:output_type -> agent.ApplyApprovedTaskControlResponse
|
||||
40, // 99: agent.AgentControlService.GetLoadedSIP:output_type -> agent.GetLoadedSIPResponse
|
||||
60, // 100: agent.AgentControlService.RequestRecordingUpload:output_type -> agent.RequestRecordingUploadResponse
|
||||
62, // 101: agent.AgentControlService.ReportCallEnded:output_type -> agent.ReportCallEndedResponse
|
||||
65, // 102: agent.AgentControlService.ReportCallResult:output_type -> agent.ReportCallResultResponse
|
||||
95, // [95:103] is the sub-list for method output_type
|
||||
87, // [87:95] is the sub-list for method input_type
|
||||
87, // [87:87] is the sub-list for extension type_name
|
||||
87, // [87:87] is the sub-list for extension extendee
|
||||
0, // [0:87] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_agent_agent_proto_init() }
|
||||
|
||||
@@ -21,19 +21,9 @@ const _ = grpc.SupportPackageIsVersion9
|
||||
const (
|
||||
AgentControlService_GetAgentStatus_FullMethodName = "/agent.AgentControlService/GetAgentStatus"
|
||||
AgentControlService_ActivateAgent_FullMethodName = "/agent.AgentControlService/ActivateAgent"
|
||||
AgentControlService_GetBootstrap_FullMethodName = "/agent.AgentControlService/GetBootstrap"
|
||||
AgentControlService_SetAdmissionState_FullMethodName = "/agent.AgentControlService/SetAdmissionState"
|
||||
AgentControlService_Execute_FullMethodName = "/agent.AgentControlService/Execute"
|
||||
AgentControlService_ExecuteAuthorized_FullMethodName = "/agent.AgentControlService/ExecuteAuthorized"
|
||||
AgentControlService_ExecuteApproved_FullMethodName = "/agent.AgentControlService/ExecuteApproved"
|
||||
AgentControlService_ApplyApprovedTaskControl_FullMethodName = "/agent.AgentControlService/ApplyApprovedTaskControl"
|
||||
AgentControlService_GetLoadedSIP_FullMethodName = "/agent.AgentControlService/GetLoadedSIP"
|
||||
AgentControlService_GetExecutionPermit_FullMethodName = "/agent.AgentControlService/GetExecutionPermit"
|
||||
AgentControlService_ApplyTaskControl_FullMethodName = "/agent.AgentControlService/ApplyTaskControl"
|
||||
AgentControlService_QueryExecution_FullMethodName = "/agent.AgentControlService/QueryExecution"
|
||||
AgentControlService_ReportExecutionEvent_FullMethodName = "/agent.AgentControlService/ReportExecutionEvent"
|
||||
AgentControlService_RequestUpload_FullMethodName = "/agent.AgentControlService/RequestUpload"
|
||||
AgentControlService_CompleteUpload_FullMethodName = "/agent.AgentControlService/CompleteUpload"
|
||||
AgentControlService_RequestRecordingUpload_FullMethodName = "/agent.AgentControlService/RequestRecordingUpload"
|
||||
AgentControlService_ReportCallEnded_FullMethodName = "/agent.AgentControlService/ReportCallEnded"
|
||||
AgentControlService_ReportCallResult_FullMethodName = "/agent.AgentControlService/ReportCallResult"
|
||||
@@ -49,20 +39,9 @@ const (
|
||||
type AgentControlServiceClient interface {
|
||||
GetAgentStatus(ctx context.Context, in *GetAgentStatusRequest, opts ...grpc.CallOption) (*GetAgentStatusResponse, error)
|
||||
ActivateAgent(ctx context.Context, in *ActivateAgentRequest, opts ...grpc.CallOption) (*ActivateAgentResponse, error)
|
||||
GetBootstrap(ctx context.Context, in *GetBootstrapRequest, opts ...grpc.CallOption) (*GetBootstrapResponse, error)
|
||||
SetAdmissionState(ctx context.Context, in *SetAdmissionStateRequest, opts ...grpc.CallOption) (*SetAdmissionStateResponse, error)
|
||||
Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
|
||||
// Local P1 Mock: accepts a Dispatcher-authorized, immutable dial decision.
|
||||
ExecuteAuthorized(ctx context.Context, in *ExecuteAuthorizedRequest, opts ...grpc.CallOption) (*ExecuteAuthorizedResponse, error)
|
||||
ExecuteApproved(ctx context.Context, in *ExecuteApprovedRequest, opts ...grpc.CallOption) (*ExecuteApprovedResponse, error)
|
||||
ApplyApprovedTaskControl(ctx context.Context, in *ApplyApprovedTaskControlRequest, opts ...grpc.CallOption) (*ApplyApprovedTaskControlResponse, error)
|
||||
GetLoadedSIP(ctx context.Context, in *GetLoadedSIPRequest, opts ...grpc.CallOption) (*GetLoadedSIPResponse, error)
|
||||
GetExecutionPermit(ctx context.Context, in *GetExecutionPermitRequest, opts ...grpc.CallOption) (*GetExecutionPermitResponse, error)
|
||||
ApplyTaskControl(ctx context.Context, in *ApplyTaskControlRequest, opts ...grpc.CallOption) (*ApplyTaskControlResponse, error)
|
||||
QueryExecution(ctx context.Context, in *QueryExecutionRequest, opts ...grpc.CallOption) (*QueryExecutionResponse, error)
|
||||
ReportExecutionEvent(ctx context.Context, in *ReportExecutionEventRequest, opts ...grpc.CallOption) (*ReportExecutionEventResponse, error)
|
||||
RequestUpload(ctx context.Context, in *RequestUploadRequest, opts ...grpc.CallOption) (*RequestUploadResponse, error)
|
||||
CompleteUpload(ctx context.Context, in *CompleteUploadRequest, opts ...grpc.CallOption) (*CompleteUploadResponse, error)
|
||||
// Agent requests a fresh bounded token explicitly; the Dispatcher owns the original target.
|
||||
RequestRecordingUpload(ctx context.Context, in *RequestRecordingUploadRequest, opts ...grpc.CallOption) (*RequestRecordingUploadResponse, error)
|
||||
ReportCallEnded(ctx context.Context, in *ReportCallEndedRequest, opts ...grpc.CallOption) (*ReportCallEndedResponse, error)
|
||||
@@ -97,46 +76,6 @@ func (c *agentControlServiceClient) ActivateAgent(ctx context.Context, in *Activ
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) GetBootstrap(ctx context.Context, in *GetBootstrapRequest, opts ...grpc.CallOption) (*GetBootstrapResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetBootstrapResponse)
|
||||
err := c.cc.Invoke(ctx, AgentControlService_GetBootstrap_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) SetAdmissionState(ctx context.Context, in *SetAdmissionStateRequest, opts ...grpc.CallOption) (*SetAdmissionStateResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SetAdmissionStateResponse)
|
||||
err := c.cc.Invoke(ctx, AgentControlService_SetAdmissionState_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExecuteResponse)
|
||||
err := c.cc.Invoke(ctx, AgentControlService_Execute_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) ExecuteAuthorized(ctx context.Context, in *ExecuteAuthorizedRequest, opts ...grpc.CallOption) (*ExecuteAuthorizedResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExecuteAuthorizedResponse)
|
||||
err := c.cc.Invoke(ctx, AgentControlService_ExecuteAuthorized_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) ExecuteApproved(ctx context.Context, in *ExecuteApprovedRequest, opts ...grpc.CallOption) (*ExecuteApprovedResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExecuteApprovedResponse)
|
||||
@@ -167,66 +106,6 @@ func (c *agentControlServiceClient) GetLoadedSIP(ctx context.Context, in *GetLoa
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) GetExecutionPermit(ctx context.Context, in *GetExecutionPermitRequest, opts ...grpc.CallOption) (*GetExecutionPermitResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetExecutionPermitResponse)
|
||||
err := c.cc.Invoke(ctx, AgentControlService_GetExecutionPermit_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) ApplyTaskControl(ctx context.Context, in *ApplyTaskControlRequest, opts ...grpc.CallOption) (*ApplyTaskControlResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ApplyTaskControlResponse)
|
||||
err := c.cc.Invoke(ctx, AgentControlService_ApplyTaskControl_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) QueryExecution(ctx context.Context, in *QueryExecutionRequest, opts ...grpc.CallOption) (*QueryExecutionResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryExecutionResponse)
|
||||
err := c.cc.Invoke(ctx, AgentControlService_QueryExecution_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) ReportExecutionEvent(ctx context.Context, in *ReportExecutionEventRequest, opts ...grpc.CallOption) (*ReportExecutionEventResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ReportExecutionEventResponse)
|
||||
err := c.cc.Invoke(ctx, AgentControlService_ReportExecutionEvent_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) RequestUpload(ctx context.Context, in *RequestUploadRequest, opts ...grpc.CallOption) (*RequestUploadResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RequestUploadResponse)
|
||||
err := c.cc.Invoke(ctx, AgentControlService_RequestUpload_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) CompleteUpload(ctx context.Context, in *CompleteUploadRequest, opts ...grpc.CallOption) (*CompleteUploadResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CompleteUploadResponse)
|
||||
err := c.cc.Invoke(ctx, AgentControlService_CompleteUpload_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agentControlServiceClient) RequestRecordingUpload(ctx context.Context, in *RequestRecordingUploadRequest, opts ...grpc.CallOption) (*RequestRecordingUploadResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RequestRecordingUploadResponse)
|
||||
@@ -267,20 +146,9 @@ func (c *agentControlServiceClient) ReportCallResult(ctx context.Context, in *Re
|
||||
type AgentControlServiceServer interface {
|
||||
GetAgentStatus(context.Context, *GetAgentStatusRequest) (*GetAgentStatusResponse, error)
|
||||
ActivateAgent(context.Context, *ActivateAgentRequest) (*ActivateAgentResponse, error)
|
||||
GetBootstrap(context.Context, *GetBootstrapRequest) (*GetBootstrapResponse, error)
|
||||
SetAdmissionState(context.Context, *SetAdmissionStateRequest) (*SetAdmissionStateResponse, error)
|
||||
Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
|
||||
// Local P1 Mock: accepts a Dispatcher-authorized, immutable dial decision.
|
||||
ExecuteAuthorized(context.Context, *ExecuteAuthorizedRequest) (*ExecuteAuthorizedResponse, error)
|
||||
ExecuteApproved(context.Context, *ExecuteApprovedRequest) (*ExecuteApprovedResponse, error)
|
||||
ApplyApprovedTaskControl(context.Context, *ApplyApprovedTaskControlRequest) (*ApplyApprovedTaskControlResponse, error)
|
||||
GetLoadedSIP(context.Context, *GetLoadedSIPRequest) (*GetLoadedSIPResponse, error)
|
||||
GetExecutionPermit(context.Context, *GetExecutionPermitRequest) (*GetExecutionPermitResponse, error)
|
||||
ApplyTaskControl(context.Context, *ApplyTaskControlRequest) (*ApplyTaskControlResponse, error)
|
||||
QueryExecution(context.Context, *QueryExecutionRequest) (*QueryExecutionResponse, error)
|
||||
ReportExecutionEvent(context.Context, *ReportExecutionEventRequest) (*ReportExecutionEventResponse, error)
|
||||
RequestUpload(context.Context, *RequestUploadRequest) (*RequestUploadResponse, error)
|
||||
CompleteUpload(context.Context, *CompleteUploadRequest) (*CompleteUploadResponse, error)
|
||||
// Agent requests a fresh bounded token explicitly; the Dispatcher owns the original target.
|
||||
RequestRecordingUpload(context.Context, *RequestRecordingUploadRequest) (*RequestRecordingUploadResponse, error)
|
||||
ReportCallEnded(context.Context, *ReportCallEndedRequest) (*ReportCallEndedResponse, error)
|
||||
@@ -301,18 +169,6 @@ func (UnimplementedAgentControlServiceServer) GetAgentStatus(context.Context, *G
|
||||
func (UnimplementedAgentControlServiceServer) ActivateAgent(context.Context, *ActivateAgentRequest) (*ActivateAgentResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ActivateAgent not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) GetBootstrap(context.Context, *GetBootstrapRequest) (*GetBootstrapResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetBootstrap not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) SetAdmissionState(context.Context, *SetAdmissionStateRequest) (*SetAdmissionStateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetAdmissionState not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) ExecuteAuthorized(context.Context, *ExecuteAuthorizedRequest) (*ExecuteAuthorizedResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ExecuteAuthorized not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) ExecuteApproved(context.Context, *ExecuteApprovedRequest) (*ExecuteApprovedResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ExecuteApproved not implemented")
|
||||
}
|
||||
@@ -322,24 +178,6 @@ func (UnimplementedAgentControlServiceServer) ApplyApprovedTaskControl(context.C
|
||||
func (UnimplementedAgentControlServiceServer) GetLoadedSIP(context.Context, *GetLoadedSIPRequest) (*GetLoadedSIPResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetLoadedSIP not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) GetExecutionPermit(context.Context, *GetExecutionPermitRequest) (*GetExecutionPermitResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetExecutionPermit not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) ApplyTaskControl(context.Context, *ApplyTaskControlRequest) (*ApplyTaskControlResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ApplyTaskControl not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) QueryExecution(context.Context, *QueryExecutionRequest) (*QueryExecutionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryExecution not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) ReportExecutionEvent(context.Context, *ReportExecutionEventRequest) (*ReportExecutionEventResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ReportExecutionEvent not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) RequestUpload(context.Context, *RequestUploadRequest) (*RequestUploadResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RequestUpload not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) CompleteUpload(context.Context, *CompleteUploadRequest) (*CompleteUploadResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CompleteUpload not implemented")
|
||||
}
|
||||
func (UnimplementedAgentControlServiceServer) RequestRecordingUpload(context.Context, *RequestRecordingUploadRequest) (*RequestRecordingUploadResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RequestRecordingUpload not implemented")
|
||||
}
|
||||
@@ -406,78 +244,6 @@ func _AgentControlService_ActivateAgent_Handler(srv interface{}, ctx context.Con
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_GetBootstrap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetBootstrapRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentControlServiceServer).GetBootstrap(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentControlService_GetBootstrap_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentControlServiceServer).GetBootstrap(ctx, req.(*GetBootstrapRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_SetAdmissionState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetAdmissionStateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentControlServiceServer).SetAdmissionState(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentControlService_SetAdmissionState_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentControlServiceServer).SetAdmissionState(ctx, req.(*SetAdmissionStateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExecuteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentControlServiceServer).Execute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentControlService_Execute_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentControlServiceServer).Execute(ctx, req.(*ExecuteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_ExecuteAuthorized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExecuteAuthorizedRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentControlServiceServer).ExecuteAuthorized(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentControlService_ExecuteAuthorized_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentControlServiceServer).ExecuteAuthorized(ctx, req.(*ExecuteAuthorizedRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_ExecuteApproved_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExecuteApprovedRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -532,114 +298,6 @@ func _AgentControlService_GetLoadedSIP_Handler(srv interface{}, ctx context.Cont
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_GetExecutionPermit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetExecutionPermitRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentControlServiceServer).GetExecutionPermit(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentControlService_GetExecutionPermit_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentControlServiceServer).GetExecutionPermit(ctx, req.(*GetExecutionPermitRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_ApplyTaskControl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ApplyTaskControlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentControlServiceServer).ApplyTaskControl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentControlService_ApplyTaskControl_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentControlServiceServer).ApplyTaskControl(ctx, req.(*ApplyTaskControlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_QueryExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryExecutionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentControlServiceServer).QueryExecution(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentControlService_QueryExecution_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentControlServiceServer).QueryExecution(ctx, req.(*QueryExecutionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_ReportExecutionEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ReportExecutionEventRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentControlServiceServer).ReportExecutionEvent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentControlService_ReportExecutionEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentControlServiceServer).ReportExecutionEvent(ctx, req.(*ReportExecutionEventRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_RequestUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RequestUploadRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentControlServiceServer).RequestUpload(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentControlService_RequestUpload_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentControlServiceServer).RequestUpload(ctx, req.(*RequestUploadRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_CompleteUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CompleteUploadRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgentControlServiceServer).CompleteUpload(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: AgentControlService_CompleteUpload_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgentControlServiceServer).CompleteUpload(ctx, req.(*CompleteUploadRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _AgentControlService_RequestRecordingUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RequestRecordingUploadRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -709,22 +367,6 @@ var AgentControlService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "ActivateAgent",
|
||||
Handler: _AgentControlService_ActivateAgent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetBootstrap",
|
||||
Handler: _AgentControlService_GetBootstrap_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetAdmissionState",
|
||||
Handler: _AgentControlService_SetAdmissionState_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Execute",
|
||||
Handler: _AgentControlService_Execute_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ExecuteAuthorized",
|
||||
Handler: _AgentControlService_ExecuteAuthorized_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ExecuteApproved",
|
||||
Handler: _AgentControlService_ExecuteApproved_Handler,
|
||||
@@ -737,30 +379,6 @@ var AgentControlService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GetLoadedSIP",
|
||||
Handler: _AgentControlService_GetLoadedSIP_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetExecutionPermit",
|
||||
Handler: _AgentControlService_GetExecutionPermit_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ApplyTaskControl",
|
||||
Handler: _AgentControlService_ApplyTaskControl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryExecution",
|
||||
Handler: _AgentControlService_QueryExecution_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ReportExecutionEvent",
|
||||
Handler: _AgentControlService_ReportExecutionEvent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RequestUpload",
|
||||
Handler: _AgentControlService_RequestUpload_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CompleteUpload",
|
||||
Handler: _AgentControlService_CompleteUpload_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RequestRecordingUpload",
|
||||
Handler: _AgentControlService_RequestRecordingUpload_Handler,
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package rpc
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
agentpb "git.ipao.vip/rogee/go-sip/gen/agent"
|
||||
)
|
||||
|
||||
func TestAgentControlServiceOnlyExposesApprovedMethods(t *testing.T) {
|
||||
var got []string
|
||||
for _, method := range agentpb.AgentControlService_ServiceDesc.Methods {
|
||||
got = append(got, method.MethodName)
|
||||
}
|
||||
want := []string{
|
||||
"GetAgentStatus", "ActivateAgent",
|
||||
"ExecuteApproved", "ApplyApprovedTaskControl", "GetLoadedSIP",
|
||||
"RequestRecordingUpload", "ReportCallEnded", "ReportCallResult",
|
||||
}
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
t.Fatalf("Agent gRPC method surface = %v, want %v", got, want)
|
||||
}
|
||||
}
|
||||
+57
-98
@@ -1,107 +1,66 @@
|
||||
# W02 error, idempotency, and fencing contract
|
||||
# Agent RPC errors, fencing, and recovery
|
||||
|
||||
This document belongs to the current Agent gRPC contract. The package name is
|
||||
not a protocol version; `RequestMeta.protocol_version` remains meaningful. It
|
||||
does not change the SaaS/MQ contract.
|
||||
This document describes only the methods exposed by the current
|
||||
`AgentControlService`. The package name is not a protocol version;
|
||||
`RequestMeta.protocol_version=agent.v1` remains a wire-protocol value. This
|
||||
contract does not change SaaS/MQ commands, ownership, or application receipts.
|
||||
|
||||
## Transport and domain errors
|
||||
## Error rules
|
||||
|
||||
Handlers return normal gRPC status codes and, when a response message exists,
|
||||
put the stable `FailureCode` in `Failure.code` as well:
|
||||
| gRPC status | Required caller behavior |
|
||||
| --- | --- |
|
||||
| `InvalidArgument` | Correct the request; do not replay it unchanged. |
|
||||
| `Unauthenticated` | Re-establish the verified mTLS/active session before more work. |
|
||||
| `PermissionDenied` | Stop; no self-reported identity or unapproved peer is accepted. |
|
||||
| `FailedPrecondition` | Keep admission closed until the missing state, approval, or loaded SIP revision is resolved. |
|
||||
| `Aborted` / `AlreadyExists` | Preserve the original execution identity; conflicting content must not originate another call. |
|
||||
| `ResourceExhausted` | Wait for an explicitly confirmed resource release; unknown calls still occupy resources. |
|
||||
| `Unavailable` / `DeadlineExceeded` | Treat the result as unknown. Do not originate, upload, or issue a new call identity in response to a lost RPC reply. |
|
||||
| `NotFound` | Do not invent a substitute task, call, recording, or upload grant. |
|
||||
|
||||
| `FailureCode` | gRPC status | Retry rule |
|
||||
| --- | --- | --- |
|
||||
| `INVALID_ARGUMENT` | `InvalidArgument` | Fix the request; never retry unchanged |
|
||||
| `UNAUTHENTICATED` | `Unauthenticated` | Re-establish mTLS/session; do not replay business work |
|
||||
| `PERMISSION_DENIED` | `PermissionDenied` | Stop; require a new authorization |
|
||||
| `FAILED_PRECONDITION` | `FailedPrecondition` | Refresh state/barrier, then use the original operation ID only if allowed |
|
||||
| `ABORTED` | `Aborted` | Re-read the CAS revision; do not assume the operation applied |
|
||||
| `RESOURCE_EXHAUSTED` | `ResourceExhausted` | Wait for durable quota/resource release |
|
||||
| `UNAVAILABLE` | `Unavailable` | Reconnect and reconcile the original operation before any retry |
|
||||
| `DEADLINE_EXCEEDED` | `DeadlineExceeded` | Result is unknown unless a durable receipt exists |
|
||||
| `NOT_FOUND` | `NotFound` | Do not create a substitute execution |
|
||||
| `ALREADY_EXISTS` | `AlreadyExists` | Read the existing operation/result; do not create a second one |
|
||||
A successful transport response does not prove SaaS application receipt. An
|
||||
accepted execution means only that the Agent reached its specified durable
|
||||
acceptance boundary; terminal state, recording upload, and result delivery
|
||||
require separate evidence.
|
||||
|
||||
A transport success is not an application receipt. `RESULT_CODE_ACCEPTED` means
|
||||
that the receiving side durably recorded the request; `APPLIED` requires the
|
||||
specified state transition and barrier evidence.
|
||||
## Active session and execution
|
||||
|
||||
## Idempotency keys
|
||||
- `GetAgentStatus` is a pre-activation probe. `ActivateAgent` binds the
|
||||
Dispatcher identity to the deployed Agent/Cell, boot ID, epoch and a durable
|
||||
session generation. Every approved mutation is checked against the latest
|
||||
verified peer and unexpired session; a new boot does not inherit old
|
||||
authorization. A missing or corrupt session journal fails closed.
|
||||
- Approved Mock Agent startup refuses a pre-existing legacy execution journal
|
||||
without deleting or converting it. Its disposition requires explicit
|
||||
operator review; it must not be silently ignored during a switch.
|
||||
- `GetLoadedSIP` reports observed revisions; an absent, stale or mismatched
|
||||
revision closes admission. A Mock report is not Asterisk loading evidence.
|
||||
- `ExecuteApproved` binds the original call identity to a frozen authorized
|
||||
task, selected trunk, SIP revision, AI configuration and exclusive deadline.
|
||||
The Agent does not recalculate outbound business rules or replace missing
|
||||
values with defaults. Before invoking the Mock call adapter it records the
|
||||
execution outcome needed to prevent a second originate. A lost reply or
|
||||
unknown outcome cannot trigger automatic redial or another call ID.
|
||||
- `ApplyApprovedTaskControl` is task-scoped: pause and stop close local
|
||||
admission before registered calls drain or hang up. Stop is terminal for
|
||||
the same task ID. It has no external command ID, revision CAS, or hidden
|
||||
control deduplication; an explicit redelivery is processed under the
|
||||
current task barrier. Failure or timeout never reopens admission by itself.
|
||||
|
||||
For execution and other durably deduplicated mutations,
|
||||
`RequestMeta.idempotency_key` is scoped by
|
||||
`(agent_id, operation_id, idempotency_key)` and the durable operation record
|
||||
also stores the request content digest. The current task-level
|
||||
`ApplyApprovedTaskControl` is an exception: it may omit the key, has no control
|
||||
command ID or revision CAS, and processes every delivery. Reusing a key with different
|
||||
content returns `ABORTED`/`RESULT_CODE_CONFLICT`; it never overwrites the first
|
||||
request.
|
||||
## Recording and final result
|
||||
|
||||
- `ActivateAgent`: `activation_operation_id` is the idempotency key. A repeated
|
||||
identical request returns the same session generation and credential metadata.
|
||||
- `SetAdmissionState`: `barrier_id` plus the expected admission generation is
|
||||
persisted. A replay cannot move the generation twice.
|
||||
- `Execute`: the execution binding and permit ID are the deduplication identity.
|
||||
An unknown result is reconciled with `QueryExecution`; it is never retried as
|
||||
a new originate.
|
||||
- `ExecuteAuthorized` (`agent-authorized-origination.v0.1`, isolated Mock only):
|
||||
the Dispatcher first persists one `issued` or `refused` decision per execution.
|
||||
The Agent durably records `UNKNOWN` **before** invoking the mock adapter;
|
||||
identical operation replays return the stored receipt, changed content or a
|
||||
second operation for the same execution is a conflict. A lost reply or mock
|
||||
adapter failure requires `QueryExecution`, never another originate or a new
|
||||
execution ID. An expired Dispatcher-issued deadline cannot invoke the adapter.
|
||||
- `GetExecutionPermit`: the reservation, binding, expected revision and
|
||||
idempotency key are persisted. A permit is not issued after the reservation is
|
||||
released or fenced.
|
||||
- `ApplyTaskControl`: `(execution_id, expected_task_revision, action,
|
||||
idempotency_key)` is CAS-checked. `STOP` is terminal; `PAUSE` may be resumed
|
||||
only by a new authorized request.
|
||||
- `ApplyApprovedTaskControl`: the active Dispatcher session and numeric
|
||||
tenant/task identity are checked. It closes local admission before hangup
|
||||
or drain and succeeds only after registered active calls end. The main
|
||||
approved-call runner must register those calls before live use. A timeout keeps the
|
||||
barrier closed; explicit redelivery applies again, with no control dedup.
|
||||
- `ReportExecutionEvent`: `(fact_id, content_sha256)` is the durable fact key.
|
||||
An identical duplicate returns the original receipt; a digest mismatch is a
|
||||
conflict.
|
||||
- `RequestUpload`/`CompleteUpload`: `upload_id` and the asset checksum are
|
||||
retained. Completion is returned only after the `recording.uploaded` fact is
|
||||
durably queued; a local PUT success alone is not `recording.uploaded`.
|
||||
- `RequestRecordingUpload` issues a restricted, short-lived target for the
|
||||
original recording. The Agent makes an explicit request for a new grant
|
||||
after expiry; there is no automatic token renewal, SaaS upload session, or
|
||||
second PUT after an unknown upload outcome.
|
||||
- `ReportCallEnded` can release confirmed-ended execution capacity without
|
||||
waiting for OSS or MQ delivery. Unknown call termination remains occupied.
|
||||
- `ReportCallResult` reports the one final result and, when present, original
|
||||
recording metadata and checksum. The Dispatcher persists facts and a shared
|
||||
result-queue outbox before acknowledging. Repeated delivery keeps the
|
||||
original message identity and cannot upload the recording again. Publisher
|
||||
confirmation proves only queue admission, not SaaS application receipt.
|
||||
|
||||
Read-only methods may be retried, but callers still preserve the original
|
||||
request and trace identity: `GetAgentStatus`, `GetBootstrap`, and
|
||||
`QueryExecution`.
|
||||
|
||||
## Fencing and session rules
|
||||
|
||||
1. The Dispatcher creates a new opaque `dispatcher_epoch` when its active
|
||||
instance changes. The Agent accepts mutations only for the active epoch.
|
||||
2. The Agent identity is the mTLS certificate plus the Dispatcher-approved
|
||||
`(agent_id, cell_id, boot_id, session_generation)` binding. Self-reported
|
||||
identity or endpoint values are not authorization.
|
||||
3. A newer boot or session generation fences older requests. The old request
|
||||
returns `UNAUTHENTICATED` or `ABORTED` and cannot release an unknown lease.
|
||||
4. The existing `Execute` permit contains the dispatcher epoch, session
|
||||
generation, reservation and `fencing_token`; the Agent checks them before
|
||||
that legacy path. The separate Mock-only `ExecuteAuthorized` path requires
|
||||
an active session and the Dispatcher-issued exclusive deadline, without a
|
||||
second business-policy calculation or an implicit permit/fallback. Its
|
||||
mixed/real execution is disabled pending separate authorization.
|
||||
5. Admission close/drain is a prerequisite barrier. `SetAdmissionState` and
|
||||
the execution-bound `ApplyTaskControl` require their expected
|
||||
generation/revision. The task-level `ApplyApprovedTaskControl` instead
|
||||
checks the active Dispatcher session and keeps its local stop irreversible;
|
||||
Dispatcher durable task state remains authoritative.
|
||||
6. When the result of a mutation is unknown, the caller first queries the
|
||||
original operation/execution and records `UNKNOWN` if evidence is absent.
|
||||
No new execution ID or new permit is invented for recovery.
|
||||
|
||||
## Upload boundary
|
||||
|
||||
The Agent receives a restricted `UploadGrant` and uploads directly to the
|
||||
approved OSS target. The Dispatcher never receives audio bytes. The Agent
|
||||
reports only asset metadata/checksum through `CompleteUpload`; the Dispatcher
|
||||
reliably queues the original `recording.uploaded` fact in MQ. This project does
|
||||
not request a SaaS upload session, wait for `verified`, or invent an OSS ID;
|
||||
MQ publisher confirmation is not SaaS application receipt.
|
||||
Secrets, temporary tokens, raw snapshots, complete audio, and full dialogue
|
||||
must not be written to logs or long-term acceptance evidence. Local TLS/Mock
|
||||
checks do not establish real supplier or Asterisk compatibility.
|
||||
|
||||
+31
-37
@@ -1,47 +1,41 @@
|
||||
# Agent Unary gRPC contract
|
||||
|
||||
This directory is the project-owned W02 protocol baseline, created from the
|
||||
confirmed R01–R03/R05/R07–R13 responsibilities in `docs/contracts/通信与事件数据交互_v0.1.md`
|
||||
and the crash/authorization rules in `docs/architecture/G0开发准备与契约冻结提案_v0.1.md`.
|
||||
`proto/agent/agent.proto` is the project-owned Agent/Dispatcher protocol. It is
|
||||
not the SaaS/MQ contract and is not evidence of external supplier acceptance.
|
||||
Both processes use Unary gRPC over mutually authenticated TLS; no audio bytes
|
||||
or SaaS business requests are carried over these RPCs.
|
||||
|
||||
- Transport is Unary gRPC over mTLS; no internal MQ, bidirectional audio stream,
|
||||
or HTTP call-execution callback is introduced.
|
||||
- The protocol carries control, authorization, facts, metadata and restricted
|
||||
upload grants. It never carries recording/audio bytes.
|
||||
- `call_execute_json` and `payload_json` preserve the approved external JSON
|
||||
bytes; this Proto does not create a second external SaaS Schema.
|
||||
- `ExecuteAuthorized` carries the project-local
|
||||
`agent-authorized-origination.v0.1` decision. The Dispatcher persists a
|
||||
one-shot issued/refused decision after checking task × selected-line policy;
|
||||
the Agent checks only active session identity and the Dispatcher-issued
|
||||
exclusive deadline. This method is enabled only with an explicit isolated Mock
|
||||
adapter, which sends **no SIP**. Dispatcher V3 mixed/real startup rejects this
|
||||
path; neither the existing `Execute` method nor MQ provides a fallback.
|
||||
- `ApplyApprovedTaskControl` applies a task-level control for the authenticated
|
||||
Dispatcher and numeric tenant. Pause/stop first close Agent admission, then
|
||||
hang up or drain registered active calls before returning success; stop cannot
|
||||
resume. The approved-call runner must register active calls before this RPC
|
||||
can protect a live process; that main-entry integration is still pending.
|
||||
It does not use an execution binding, command ID, revision CAS, or control
|
||||
message deduplication. The Dispatcher remains the durable task authority.
|
||||
- `accepted` is durable receipt only; `applied`, terminal state and verified
|
||||
asset facts require later evidence.
|
||||
- IDs, epochs, boot/session generations, operation IDs and explicit idempotency
|
||||
keys are retained for idempotency, fencing and unknown-result reconciliation.
|
||||
- `ERRORS.md` is the companion error/CAS/fencing contract; it defines when a
|
||||
response is only accepted and when a caller must reconcile instead of retrying.
|
||||
`AgentControlService` exposes only these methods:
|
||||
|
||||
Generation is deterministic with the pinned local tools:
|
||||
- `GetAgentStatus` and `ActivateAgent` probe a deployed Agent and establish its
|
||||
active Dispatcher-bound session. Boot ID, epoch, generation, peer certificate
|
||||
and approved identity fence stale or self-reported callers.
|
||||
- `GetLoadedSIP` reads the Agent's observed trunk revisions. A Mock observation
|
||||
is not proof that Asterisk actually loaded the configuration.
|
||||
- `ExecuteApproved` receives a frozen task/SIP/AI decision and exclusive dial
|
||||
deadline. The Agent checks the session and signed execution boundary, not
|
||||
the Dispatcher's outbound business policy. Unknown execution is never
|
||||
originated again just because an RPC response was lost.
|
||||
- `ApplyApprovedTaskControl` closes task admission before draining or hanging
|
||||
up active calls. Pause, resume and stop carry no external command ID or
|
||||
revision CAS; stop is irreversible for the same task identity.
|
||||
- `RequestRecordingUpload`, `ReportCallEnded` and `ReportCallResult` request a
|
||||
bounded upload grant, release a confirmed-ended call and deliver its one
|
||||
final result. The Agent uploads directly to OSS. The RPC never transfers
|
||||
the recording bytes or reports SaaS application receipt.
|
||||
|
||||
Task and provider snapshots can contain credentials. Do not log or persist raw
|
||||
request bodies. `RequestMeta.protocol_version=agent.v1` is a meaningful wire
|
||||
protocol value, not an implementation-generation label; field numbers are not
|
||||
reused. Errors, unknown outcomes and recovery boundaries are in `ERRORS.md`.
|
||||
|
||||
Generate and verify using the pinned local tools:
|
||||
|
||||
```sh
|
||||
buf lint
|
||||
buf breaking --against '.git#branch=HEAD'
|
||||
buf generate
|
||||
sh scripts/check-proto.sh
|
||||
```
|
||||
|
||||
The Proto/Go package has no implementation-generation suffix. The existing
|
||||
`protocol_version` metadata (`agent.v1`) remains the meaningful wire-protocol
|
||||
version; field numbers are never reused. Production mTLS credentials and
|
||||
endpoints are deployment inputs, not repository contents. `ERRORS.md` and the
|
||||
Proto are released together; a field or semantic change requires a new
|
||||
compatibility review.
|
||||
The currently registered Agent command supports isolated Mock only. The local
|
||||
mTLS and Mock tests do not establish real Asterisk, OSS, AI or SaaS acceptance.
|
||||
|
||||
@@ -10,20 +10,9 @@ option go_package = "git.ipao.vip/rogee/go-sip/gen/agent;agentpb";
|
||||
service AgentControlService {
|
||||
rpc GetAgentStatus(GetAgentStatusRequest) returns (GetAgentStatusResponse);
|
||||
rpc ActivateAgent(ActivateAgentRequest) returns (ActivateAgentResponse);
|
||||
rpc GetBootstrap(GetBootstrapRequest) returns (GetBootstrapResponse);
|
||||
rpc SetAdmissionState(SetAdmissionStateRequest) returns (SetAdmissionStateResponse);
|
||||
rpc Execute(ExecuteRequest) returns (ExecuteResponse);
|
||||
// Local P1 Mock: accepts a Dispatcher-authorized, immutable dial decision.
|
||||
rpc ExecuteAuthorized(ExecuteAuthorizedRequest) returns (ExecuteAuthorizedResponse);
|
||||
rpc ExecuteApproved(ExecuteApprovedRequest) returns (ExecuteApprovedResponse);
|
||||
rpc ApplyApprovedTaskControl(ApplyApprovedTaskControlRequest) returns (ApplyApprovedTaskControlResponse);
|
||||
rpc GetLoadedSIP(GetLoadedSIPRequest) returns (GetLoadedSIPResponse);
|
||||
rpc GetExecutionPermit(GetExecutionPermitRequest) returns (GetExecutionPermitResponse);
|
||||
rpc ApplyTaskControl(ApplyTaskControlRequest) returns (ApplyTaskControlResponse);
|
||||
rpc QueryExecution(QueryExecutionRequest) returns (QueryExecutionResponse);
|
||||
rpc ReportExecutionEvent(ReportExecutionEventRequest) returns (ReportExecutionEventResponse);
|
||||
rpc RequestUpload(RequestUploadRequest) returns (RequestUploadResponse);
|
||||
rpc CompleteUpload(CompleteUploadRequest) returns (CompleteUploadResponse);
|
||||
// Agent requests a fresh bounded token explicitly; the Dispatcher owns the original target.
|
||||
rpc RequestRecordingUpload(RequestRecordingUploadRequest) returns (RequestRecordingUploadResponse);
|
||||
rpc ReportCallEnded(ReportCallEndedRequest) returns (ReportCallEndedResponse);
|
||||
|
||||
+10
-10
@@ -24,28 +24,28 @@
|
||||
},
|
||||
{
|
||||
"path": "proto/ERRORS.md",
|
||||
"bytes": 6480,
|
||||
"sha256": "de53827d39324b55563ef05bbdbfde1287c0996a2690c4c030fd7415535d6339"
|
||||
"bytes": 4160,
|
||||
"sha256": "04bcaa5a821fcdee25f5eeed61b1609541493b072d0a327c5c2b518fde15910f"
|
||||
},
|
||||
{
|
||||
"path": "proto/README.md",
|
||||
"bytes": 2711,
|
||||
"sha256": "ffb72390ff42fb9f99d6586c4d965cfd47c1d1954af1115ac8c5e5d1ba640408"
|
||||
"bytes": 2108,
|
||||
"sha256": "93996346bd3b32546b50bf061db1f3c0d0641c4f9941a76ee96ead099c1764aa"
|
||||
},
|
||||
{
|
||||
"path": "proto/agent/agent.proto",
|
||||
"bytes": 15257,
|
||||
"sha256": "fa8dcfa2066182fce2b1020e637e3e111d1fdcb4bca2cc7e64d702db2394918e"
|
||||
"bytes": 14375,
|
||||
"sha256": "f9a721c8d2bc560ed07ec6deedd7ebc080b248069d2e657f7a906405e1cb1e4f"
|
||||
},
|
||||
{
|
||||
"path": "gen/agent/agent.pb.go",
|
||||
"bytes": 186479,
|
||||
"sha256": "c0151d146338e470e6ae5bb4a62b646c89e8b096bfeb9caf7d782338cd40b711"
|
||||
"bytes": 183338,
|
||||
"sha256": "a5b86b1f8e9a8866bb99bb67747a82107064985c730aee70c33fa9b6c0e23341"
|
||||
},
|
||||
{
|
||||
"path": "gen/agent/agent_grpc.pb.go",
|
||||
"bytes": 36276,
|
||||
"sha256": "8c06bac8622c3ee9f34503ed3cf1c408bb368d8687b5164c0e1e9c548273fce5"
|
||||
"bytes": 18310,
|
||||
"sha256": "8aba17a4840f41d6766e21da75f2cb994613c596014e346a75e46006d15115d5"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user