Skip to content

armgit / ax

Public Imported from GitHub
0

Agent Executor (AX) is Google's open agentic orchestration runtime

Go

Rename EventLogService to ConversationService (#307)

Jaana Dogan3243d7ceafa9
diff --git a/cmd/ax/fork.go b/cmd/ax/fork.go
index 3db2368..d82da34 100644
--- a/cmd/ax/fork.go
+++ b/cmd/ax/fork.go
@@ -81,9 +81,9 @@ func runFork(cmd *cobra.Command, args []string) error {
}
defer conn.Close()
- client := proto.NewEventLogServiceClient(conn)
+ client := proto.NewConversationServiceClient(conn)
- resp, err := client.ForkConversation(ctx, &proto.ForkRequest{
+ resp, err := client.ForkConversation(ctx, &proto.ForkConversationRequest{
SrcConversationId: forkSourceConversation,
SrcSeq: forkSourceSeq,
DestConversationId: forkDestConversation,
diff --git a/cmd/axepp/main.go b/cmd/axepp/main.go
index 77d7dfb..106b6bc 100644
--- a/cmd/axepp/main.go
+++ b/cmd/axepp/main.go
@@ -130,11 +130,11 @@ func (s *authServer) Check(ctx context.Context, req *authv3.CheckRequest) (*auth
case "/ax.ControllerService/Exec":
var execReq proto.ExecRequest
return route(ctx, s.sc, body, &execReq, path, func() string { return execReq.GetConversationId() })
- case "/ax.EventLogService/DeleteConversation":
- var delReq proto.DeleteRequest
+ case "/ax.ConversationService/DeleteConversation":
+ var delReq proto.DeleteConversationRequest
return route(ctx, s.sc, body, &delReq, path, func() string { return delReq.GetConversationId() })
- case "/ax.EventLogService/ForkConversation":
- var forkReq proto.ForkRequest
+ case "/ax.ConversationService/ForkConversation":
+ var forkReq proto.ForkConversationRequest
return route(ctx, s.sc, body, &forkReq, path, func() string { return forkReq.GetDestConversationId() })
}
diff --git a/internal/server/server.go b/internal/server/server.go
index a512e9a..4b5cca4 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -36,7 +36,7 @@ import (
// Server implements the AXService gRPC service.
type Server struct {
proto.UnimplementedControllerServiceServer
- proto.UnimplementedEventLogServiceServer
+ proto.UnimplementedConversationServiceServer
controller *controller.Controller
grpcServer *grpc.Server
@@ -62,7 +62,7 @@ func (s *Server) Exec(req *proto.ExecRequest, stream grpc.ServerStreamingServer[
return err
}
-func (s *Server) ForkConversation(ctx context.Context, req *proto.ForkRequest) (*proto.ForkResponse, error) {
+func (s *Server) ForkConversation(ctx context.Context, req *proto.ForkConversationRequest) (*proto.ForkConversationResponse, error) {
if req.SrcConversationId == "" {
return nil, status.Errorf(codes.InvalidArgument, "src_conversation_id is required")
}
@@ -80,10 +80,10 @@ func (s *Server) ForkConversation(ctx context.Context, req *proto.ForkRequest) (
return nil, status.Errorf(codes.Internal, "failed to fork conversation: %v", err)
}
go suspendActor(destID) // TODO(jbd): Move to an interceptor.
- return &proto.ForkResponse{ConversationId: destID}, nil
+ return &proto.ForkConversationResponse{ConversationId: destID}, nil
}
-func (s *Server) DeleteConversation(ctx context.Context, req *proto.DeleteRequest) (*proto.DeleteResponse, error) {
+func (s *Server) DeleteConversation(ctx context.Context, req *proto.DeleteConversationRequest) (*proto.DeleteConversationResponse, error) {
if req.ConversationId == "" {
return nil, status.Errorf(codes.InvalidArgument, "conversation_id is required")
}
@@ -91,7 +91,7 @@ func (s *Server) DeleteConversation(ctx context.Context, req *proto.DeleteReques
return nil, status.Errorf(codes.Internal, "failed to delete conversation: %v", err)
}
go suspendActor(req.ConversationId) // TODO(jbd): Move to an interceptor.
- return &proto.DeleteResponse{}, nil
+ return &proto.DeleteConversationResponse{}, nil
}
// Serve starts the gRPC server on the specified address.
@@ -103,7 +103,7 @@ func (s *Server) Serve(address string, opts ...grpc.ServerOption) error {
s.grpcServer = grpc.NewServer(opts...)
proto.RegisterControllerServiceServer(s.grpcServer, s)
- proto.RegisterEventLogServiceServer(s.grpcServer, s)
+ proto.RegisterConversationServiceServer(s.grpcServer, s)
// Register standard gRPC Health Check server
hs := health.NewServer()
diff --git a/internal/server/server_ate.go b/internal/server/server_ate.go
index d5640be..9574528 100644
--- a/internal/server/server_ate.go
+++ b/internal/server/server_ate.go
@@ -73,6 +73,9 @@ func createATEClient() any {
func suspendActor(actorID string) {
client := createATEClient()
+ if client == nil {
+ return
+ }
c := client.(*ate.Client)
defer c.Close()
diff --git a/internal/server/server_test.go b/internal/server/server_test.go
index 5b82dd6..db99fb7 100644
--- a/internal/server/server_test.go
+++ b/internal/server/server_test.go
@@ -64,7 +64,7 @@ func TestServer_Fork(t *testing.T) {
s := New(c)
- resp, err := s.ForkConversation(ctx, &proto.ForkRequest{
+ resp, err := s.ForkConversation(ctx, &proto.ForkConversationRequest{
SrcConversationId: srcCID,
DestConversationId: destCID,
})
@@ -120,7 +120,7 @@ func TestServer_Fork_RequiresDestID(t *testing.T) {
s := New(c)
- if _, err := s.ForkConversation(ctx, &proto.ForkRequest{
+ if _, err := s.ForkConversation(ctx, &proto.ForkConversationRequest{
SrcConversationId: srcCID,
// DestConversationId intentionally left empty.
}); err == nil {
diff --git a/proto/ax.pb.go b/proto/ax.pb.go
index 0987a78..76f76d1 100644
--- a/proto/ax.pb.go
+++ b/proto/ax.pb.go
@@ -801,27 +801,27 @@ func (x *ExecResponse) GetSeq() int32 {
return 0
}
-type DeleteRequest struct {
+type DeleteConversationRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
-func (x *DeleteRequest) Reset() {
- *x = DeleteRequest{}
+func (x *DeleteConversationRequest) Reset() {
+ *x = DeleteConversationRequest{}
mi := &file_proto_ax_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
-func (x *DeleteRequest) String() string {
+func (x *DeleteConversationRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DeleteRequest) ProtoMessage() {}
+func (*DeleteConversationRequest) ProtoMessage() {}
-func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
+func (x *DeleteConversationRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_ax_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -833,38 +833,38 @@ func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
-func (*DeleteRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use DeleteConversationRequest.ProtoReflect.Descriptor instead.
+func (*DeleteConversationRequest) Descriptor() ([]byte, []int) {
return file_proto_ax_proto_rawDescGZIP(), []int{11}
}
-func (x *DeleteRequest) GetConversationId() string {
+func (x *DeleteConversationRequest) GetConversationId() string {
if x != nil {
return x.ConversationId
}
return ""
}
-type DeleteResponse struct {
+type DeleteConversationResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
-func (x *DeleteResponse) Reset() {
- *x = DeleteResponse{}
+func (x *DeleteConversationResponse) Reset() {
+ *x = DeleteConversationResponse{}
mi := &file_proto_ax_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
-func (x *DeleteResponse) String() string {
+func (x *DeleteConversationResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DeleteResponse) ProtoMessage() {}
+func (*DeleteConversationResponse) ProtoMessage() {}
-func (x *DeleteResponse) ProtoReflect() protoreflect.Message {
+func (x *DeleteConversationResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_ax_proto_msgTypes[12]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -876,18 +876,18 @@ func (x *DeleteResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
-func (*DeleteResponse) Descriptor() ([]byte, []int) {
+// Deprecated: Use DeleteConversationResponse.ProtoReflect.Descriptor instead.
+func (*DeleteConversationResponse) Descriptor() ([]byte, []int) {
return file_proto_ax_proto_rawDescGZIP(), []int{12}
}
-type ForkRequest struct {
+type ForkConversationRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Required: The source conversation ID to fork from.
SrcConversationId string `protobuf:"bytes,1,opt,name=src_conversation_id,json=srcConversationId,proto3" json:"src_conversation_id,omitempty"`
// Optional: The sequence number to fork from.
// Defaults to the latest sequence if not set or set to 0.
- SrcSeq int32 `protobuf:"varint,2,opt,name=src_seq,json=srcSeq,proto3" json:"src_seq,omitempty"`
+ SrcSeq int32 `protobuf:"varint,2,opt,name=src_seq,json=srcSeq,proto3" json:"src_seq,omitempty"` // TODO(jbd): Replace this with snapshot_id.
// Optional: The destination conversation ID.
// Generates a new UUID if not provided.
DestConversationId string `protobuf:"bytes,3,opt,name=dest_conversation_id,json=destConversationId,proto3" json:"dest_conversation_id,omitempty"`
@@ -895,20 +895,20 @@ type ForkRequest struct {
sizeCache protoimpl.SizeCache
}
-func (x *ForkRequest) Reset() {
- *x = ForkRequest{}
+func (x *ForkConversationRequest) Reset() {
+ *x = ForkConversationRequest{}
mi := &file_proto_ax_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
-func (x *ForkRequest) String() string {
+func (x *ForkConversationRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ForkRequest) ProtoMessage() {}
+func (*ForkConversationRequest) ProtoMessage() {}
-func (x *ForkRequest) ProtoReflect() protoreflect.Message {
+func (x *ForkConversationRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_ax_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -920,53 +920,53 @@ func (x *ForkRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ForkRequest.ProtoReflect.Descriptor instead.
-func (*ForkRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use ForkConversationRequest.ProtoReflect.Descriptor instead.
+func (*ForkConversationRequest) Descriptor() ([]byte, []int) {
return file_proto_ax_proto_rawDescGZIP(), []int{13}
}
-func (x *ForkRequest) GetSrcConversationId() string {
+func (x *ForkConversationRequest) GetSrcConversationId() string {
if x != nil {
return x.SrcConversationId
}
return ""
}
-func (x *ForkRequest) GetSrcSeq() int32 {
+func (x *ForkConversationRequest) GetSrcSeq() int32 {
if x != nil {
return x.SrcSeq
}
return 0
}
-func (x *ForkRequest) GetDestConversationId() string {
+func (x *ForkConversationRequest) GetDestConversationId() string {
if x != nil {
return x.DestConversationId
}
return ""
}
-type ForkResponse struct {
+type ForkConversationResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` // The ID of the new conversation
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
-func (x *ForkResponse) Reset() {
- *x = ForkResponse{}
+func (x *ForkConversationResponse) Reset() {
+ *x = ForkConversationResponse{}
mi := &file_proto_ax_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
-func (x *ForkResponse) String() string {
+func (x *ForkConversationResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ForkResponse) ProtoMessage() {}
+func (*ForkConversationResponse) ProtoMessage() {}
-func (x *ForkResponse) ProtoReflect() protoreflect.Message {
+func (x *ForkConversationResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_ax_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -978,12 +978,12 @@ func (x *ForkResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ForkResponse.ProtoReflect.Descriptor instead.
-func (*ForkResponse) Descriptor() ([]byte, []int) {
+// Deprecated: Use ForkConversationResponse.ProtoReflect.Descriptor instead.
+func (*ForkConversationResponse) Descriptor() ([]byte, []int) {
return file_proto_ax_proto_rawDescGZIP(), []int{14}
}
-func (x *ForkResponse) GetConversationId() string {
+func (x *ForkConversationResponse) GetConversationId() string {
if x != nil {
return x.ConversationId
}
@@ -1041,15 +1041,15 @@ const file_proto_ax_proto_rawDesc = "" +
"\fagent_config\x18\x05 \x01(\fR\vagentConfig\"G\n" +
"\fExecResponse\x12%\n" +
"\aoutputs\x18\x01 \x03(\v2\v.ax.MessageR\aoutputs\x12\x10\n" +
- "\x03seq\x18\x02 \x01(\x05R\x03seq\"8\n" +
- "\rDeleteRequest\x12'\n" +
- "\x0fconversation_id\x18\x01 \x01(\tR\x0econversationId\"\x10\n" +
- "\x0eDeleteResponse\"\x88\x01\n" +
- "\vForkRequest\x12.\n" +
+ "\x03seq\x18\x02 \x01(\x05R\x03seq\"D\n" +
+ "\x19DeleteConversationRequest\x12'\n" +
+ "\x0fconversation_id\x18\x01 \x01(\tR\x0econversationId\"\x1c\n" +
+ "\x1aDeleteConversationResponse\"\x94\x01\n" +
+ "\x17ForkConversationRequest\x12.\n" +
"\x13src_conversation_id\x18\x01 \x01(\tR\x11srcConversationId\x12\x17\n" +
"\asrc_seq\x18\x02 \x01(\x05R\x06srcSeq\x120\n" +
- "\x14dest_conversation_id\x18\x03 \x01(\tR\x12destConversationId\"7\n" +
- "\fForkResponse\x12'\n" +
+ "\x14dest_conversation_id\x18\x03 \x01(\tR\x12destConversationId\"C\n" +
+ "\x18ForkConversationResponse\x12'\n" +
"\x0fconversation_id\x18\x01 \x01(\tR\x0econversationId*X\n" +
"\x05State\x12\x15\n" +
"\x11STATE_UNSPECIFIED\x10\x00\x12\x11\n" +
@@ -1060,10 +1060,10 @@ const file_proto_ax_proto_rawDesc = "" +
"\aConnect\x12\x10.ax.AgentMessage\x1a\x10.ax.AgentMessage(\x010\x01\x12>\n" +
"\vHealthCheck\x12\x16.ax.HealthCheckRequest\x1a\x17.ax.HealthCheckResponse2@\n" +
"\x11ControllerService\x12+\n" +
- "\x04Exec\x12\x0f.ax.ExecRequest\x1a\x10.ax.ExecResponse0\x012\x85\x01\n" +
- "\x0fEventLogService\x12;\n" +
- "\x12DeleteConversation\x12\x11.ax.DeleteRequest\x1a\x12.ax.DeleteResponse\x125\n" +
- "\x10ForkConversation\x12\x0f.ax.ForkRequest\x1a\x10.ax.ForkResponseB\x1cZ\x1agithub.com/google/ax/protob\x06proto3"
+ "\x04Exec\x12\x0f.ax.ExecRequest\x1a\x10.ax.ExecResponse0\x012\xb9\x01\n" +
+ "\x13ConversationService\x12S\n" +
+ "\x12DeleteConversation\x12\x1d.ax.DeleteConversationRequest\x1a\x1e.ax.DeleteConversationResponse\x12M\n" +
+ "\x10ForkConversation\x12\x1b.ax.ForkConversationRequest\x1a\x1c.ax.ForkConversationResponseB\x1cZ\x1agithub.com/google/ax/protob\x06proto3"
var (
file_proto_ax_proto_rawDescOnce sync.Once
@@ -1080,24 +1080,24 @@ func file_proto_ax_proto_rawDescGZIP() []byte {
var file_proto_ax_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_proto_ax_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_proto_ax_proto_goTypes = []any{
- (State)(0), // 0: ax.State
- (*AgentStart)(nil), // 1: ax.AgentStart
- (*AgentOutputs)(nil), // 2: ax.AgentOutputs
- (*AgentEnd)(nil), // 3: ax.AgentEnd
- (*AgentMessage)(nil), // 4: ax.AgentMessage
- (*Message)(nil), // 5: ax.Message
- (*ConversationEvent)(nil), // 6: ax.ConversationEvent
- (*ExecutionEvent)(nil), // 7: ax.ExecutionEvent
- (*HealthCheckRequest)(nil), // 8: ax.HealthCheckRequest
- (*HealthCheckResponse)(nil), // 9: ax.HealthCheckResponse
- (*ExecRequest)(nil), // 10: ax.ExecRequest
- (*ExecResponse)(nil), // 11: ax.ExecResponse
- (*DeleteRequest)(nil), // 12: ax.DeleteRequest
- (*DeleteResponse)(nil), // 13: ax.DeleteResponse
- (*ForkRequest)(nil), // 14: ax.ForkRequest
- (*ForkResponse)(nil), // 15: ax.ForkResponse
- (*Content)(nil), // 16: ax.Content
- (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp
+ (State)(0), // 0: ax.State
+ (*AgentStart)(nil), // 1: ax.AgentStart
+ (*AgentOutputs)(nil), // 2: ax.AgentOutputs
+ (*AgentEnd)(nil), // 3: ax.AgentEnd
+ (*AgentMessage)(nil), // 4: ax.AgentMessage
+ (*Message)(nil), // 5: ax.Message
+ (*ConversationEvent)(nil), // 6: ax.ConversationEvent
+ (*ExecutionEvent)(nil), // 7: ax.ExecutionEvent
+ (*HealthCheckRequest)(nil), // 8: ax.HealthCheckRequest
+ (*HealthCheckResponse)(nil), // 9: ax.HealthCheckResponse
+ (*ExecRequest)(nil), // 10: ax.ExecRequest
+ (*ExecResponse)(nil), // 11: ax.ExecResponse
+ (*DeleteConversationRequest)(nil), // 12: ax.DeleteConversationRequest
+ (*DeleteConversationResponse)(nil), // 13: ax.DeleteConversationResponse
+ (*ForkConversationRequest)(nil), // 14: ax.ForkConversationRequest
+ (*ForkConversationResponse)(nil), // 15: ax.ForkConversationResponse
+ (*Content)(nil), // 16: ax.Content
+ (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp
}
var file_proto_ax_proto_depIdxs = []int32{
5, // 0: ax.AgentStart.messages:type_name -> ax.Message
@@ -1117,13 +1117,13 @@ var file_proto_ax_proto_depIdxs = []int32{
4, // 14: ax.AgentService.Connect:input_type -> ax.AgentMessage
8, // 15: ax.AgentService.HealthCheck:input_type -> ax.HealthCheckRequest
10, // 16: ax.ControllerService.Exec:input_type -> ax.ExecRequest
- 12, // 17: ax.EventLogService.DeleteConversation:input_type -> ax.DeleteRequest
- 14, // 18: ax.EventLogService.ForkConversation:input_type -> ax.ForkRequest
+ 12, // 17: ax.ConversationService.DeleteConversation:input_type -> ax.DeleteConversationRequest
+ 14, // 18: ax.ConversationService.ForkConversation:input_type -> ax.ForkConversationRequest
4, // 19: ax.AgentService.Connect:output_type -> ax.AgentMessage
9, // 20: ax.AgentService.HealthCheck:output_type -> ax.HealthCheckResponse
11, // 21: ax.ControllerService.Exec:output_type -> ax.ExecResponse
- 13, // 22: ax.EventLogService.DeleteConversation:output_type -> ax.DeleteResponse
- 15, // 23: ax.EventLogService.ForkConversation:output_type -> ax.ForkResponse
+ 13, // 22: ax.ConversationService.DeleteConversation:output_type -> ax.DeleteConversationResponse
+ 15, // 23: ax.ConversationService.ForkConversation:output_type -> ax.ForkConversationResponse
19, // [19:24] is the sub-list for method output_type
14, // [14:19] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
diff --git a/proto/ax.proto b/proto/ax.proto
index b6e9702..fa76238 100644
--- a/proto/ax.proto
+++ b/proto/ax.proto
@@ -134,39 +134,35 @@ service ControllerService {
rpc Exec(ExecRequest) returns (stream ExecResponse);
}
-message DeleteRequest {
+message DeleteConversationRequest {
string conversation_id = 1;
}
-message DeleteResponse {}
+message DeleteConversationResponse {}
-message ForkRequest {
+message ForkConversationRequest {
// Required: The source conversation ID to fork from.
string src_conversation_id = 1;
// Optional: The sequence number to fork from.
// Defaults to the latest sequence if not set or set to 0.
- int32 src_seq = 2;
+ int32 src_seq = 2; // TODO(jbd): Replace this with snapshot_id.
// Optional: The destination conversation ID.
// Generates a new UUID if not provided.
string dest_conversation_id = 3;
}
-message ForkResponse {
+message ForkConversationResponse {
string conversation_id = 1; // The ID of the new conversation
+
+ // TODO(jbd): Remove conversation_id, and return error if
+ // dest_conversation_id already exists.
}
-service EventLogService {
+service ConversationService {
// Deletes conversational events and all event log resources
// for its children executions.
- rpc DeleteConversation(DeleteRequest) returns (DeleteResponse);
+ rpc DeleteConversation(DeleteConversationRequest) returns (DeleteConversationResponse);
// Fork forks an event log from a specific conversation.
- rpc ForkConversation(ForkRequest) returns (ForkResponse);
+ rpc ForkConversation(ForkConversationRequest) returns (ForkConversationResponse);
}
-
-// TODO(jbd): Merge EventLogService into ControllerService.
-// Rename DeleteRequest and DeleteResponse to DeleteConversationRequest
-// and DeleteConversationResponse.
-// Rename ForkRequest and ForkResponse to ForkConversationRequest
-// and ForkConversation Response.
-// Remove conversation_id from ForkResponse.
diff --git a/proto/ax_grpc.pb.go b/proto/ax_grpc.pb.go
index 79f46ba..c3724e6 100644
--- a/proto/ax_grpc.pb.go
+++ b/proto/ax_grpc.pb.go
@@ -297,145 +297,145 @@ var ControllerService_ServiceDesc = grpc.ServiceDesc{
}
const (
- EventLogService_DeleteConversation_FullMethodName = "/ax.EventLogService/DeleteConversation"
- EventLogService_ForkConversation_FullMethodName = "/ax.EventLogService/ForkConversation"
+ ConversationService_DeleteConversation_FullMethodName = "/ax.ConversationService/DeleteConversation"
+ ConversationService_ForkConversation_FullMethodName = "/ax.ConversationService/ForkConversation"
)
-// EventLogServiceClient is the client API for EventLogService service.
+// ConversationServiceClient is the client API for ConversationService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
-type EventLogServiceClient interface {
+type ConversationServiceClient interface {
// Deletes conversational events and all event log resources
// for its children executions.
- DeleteConversation(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
+ DeleteConversation(ctx context.Context, in *DeleteConversationRequest, opts ...grpc.CallOption) (*DeleteConversationResponse, error)
// Fork forks an event log from a specific conversation.
- ForkConversation(ctx context.Context, in *ForkRequest, opts ...grpc.CallOption) (*ForkResponse, error)
+ ForkConversation(ctx context.Context, in *ForkConversationRequest, opts ...grpc.CallOption) (*ForkConversationResponse, error)
}
-type eventLogServiceClient struct {
+type conversationServiceClient struct {
cc grpc.ClientConnInterface
}
-func NewEventLogServiceClient(cc grpc.ClientConnInterface) EventLogServiceClient {
- return &eventLogServiceClient{cc}
+func NewConversationServiceClient(cc grpc.ClientConnInterface) ConversationServiceClient {
+ return &conversationServiceClient{cc}
}
-func (c *eventLogServiceClient) DeleteConversation(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
+func (c *conversationServiceClient) DeleteConversation(ctx context.Context, in *DeleteConversationRequest, opts ...grpc.CallOption) (*DeleteConversationResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(DeleteResponse)
- err := c.cc.Invoke(ctx, EventLogService_DeleteConversation_FullMethodName, in, out, cOpts...)
+ out := new(DeleteConversationResponse)
+ err := c.cc.Invoke(ctx, ConversationService_DeleteConversation_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *eventLogServiceClient) ForkConversation(ctx context.Context, in *ForkRequest, opts ...grpc.CallOption) (*ForkResponse, error) {
+func (c *conversationServiceClient) ForkConversation(ctx context.Context, in *ForkConversationRequest, opts ...grpc.CallOption) (*ForkConversationResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(ForkResponse)
- err := c.cc.Invoke(ctx, EventLogService_ForkConversation_FullMethodName, in, out, cOpts...)
+ out := new(ForkConversationResponse)
+ err := c.cc.Invoke(ctx, ConversationService_ForkConversation_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
-// EventLogServiceServer is the server API for EventLogService service.
-// All implementations must embed UnimplementedEventLogServiceServer
+// ConversationServiceServer is the server API for ConversationService service.
+// All implementations must embed UnimplementedConversationServiceServer
// for forward compatibility.
-type EventLogServiceServer interface {
+type ConversationServiceServer interface {
// Deletes conversational events and all event log resources
// for its children executions.
- DeleteConversation(context.Context, *DeleteRequest) (*DeleteResponse, error)
+ DeleteConversation(context.Context, *DeleteConversationRequest) (*DeleteConversationResponse, error)
// Fork forks an event log from a specific conversation.
- ForkConversation(context.Context, *ForkRequest) (*ForkResponse, error)
- mustEmbedUnimplementedEventLogServiceServer()
+ ForkConversation(context.Context, *ForkConversationRequest) (*ForkConversationResponse, error)
+ mustEmbedUnimplementedConversationServiceServer()
}
-// UnimplementedEventLogServiceServer must be embedded to have
+// UnimplementedConversationServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
-type UnimplementedEventLogServiceServer struct{}
+type UnimplementedConversationServiceServer struct{}
-func (UnimplementedEventLogServiceServer) DeleteConversation(context.Context, *DeleteRequest) (*DeleteResponse, error) {
+func (UnimplementedConversationServiceServer) DeleteConversation(context.Context, *DeleteConversationRequest) (*DeleteConversationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteConversation not implemented")
}
-func (UnimplementedEventLogServiceServer) ForkConversation(context.Context, *ForkRequest) (*ForkResponse, error) {
+func (UnimplementedConversationServiceServer) ForkConversation(context.Context, *ForkConversationRequest) (*ForkConversationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ForkConversation not implemented")
}
-func (UnimplementedEventLogServiceServer) mustEmbedUnimplementedEventLogServiceServer() {}
-func (UnimplementedEventLogServiceServer) testEmbeddedByValue() {}
+func (UnimplementedConversationServiceServer) mustEmbedUnimplementedConversationServiceServer() {}
+func (UnimplementedConversationServiceServer) testEmbeddedByValue() {}
-// UnsafeEventLogServiceServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to EventLogServiceServer will
+// UnsafeConversationServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to ConversationServiceServer will
// result in compilation errors.
-type UnsafeEventLogServiceServer interface {
- mustEmbedUnimplementedEventLogServiceServer()
+type UnsafeConversationServiceServer interface {
+ mustEmbedUnimplementedConversationServiceServer()
}
-func RegisterEventLogServiceServer(s grpc.ServiceRegistrar, srv EventLogServiceServer) {
- // If the following call pancis, it indicates UnimplementedEventLogServiceServer was
+func RegisterConversationServiceServer(s grpc.ServiceRegistrar, srv ConversationServiceServer) {
+ // If the following call pancis, it indicates UnimplementedConversationServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
- s.RegisterService(&EventLogService_ServiceDesc, srv)
+ s.RegisterService(&ConversationService_ServiceDesc, srv)
}
-func _EventLogService_DeleteConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteRequest)
+func _ConversationService_DeleteConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteConversationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(EventLogServiceServer).DeleteConversation(ctx, in)
+ return srv.(ConversationServiceServer).DeleteConversation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: EventLogService_DeleteConversation_FullMethodName,
+ FullMethod: ConversationService_DeleteConversation_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(EventLogServiceServer).DeleteConversation(ctx, req.(*DeleteRequest))
+ return srv.(ConversationServiceServer).DeleteConversation(ctx, req.(*DeleteConversationRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _EventLogService_ForkConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ForkRequest)
+func _ConversationService_ForkConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ForkConversationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(EventLogServiceServer).ForkConversation(ctx, in)
+ return srv.(ConversationServiceServer).ForkConversation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: EventLogService_ForkConversation_FullMethodName,
+ FullMethod: ConversationService_ForkConversation_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(EventLogServiceServer).ForkConversation(ctx, req.(*ForkRequest))
+ return srv.(ConversationServiceServer).ForkConversation(ctx, req.(*ForkConversationRequest))
}
return interceptor(ctx, in, info, handler)
}
-// EventLogService_ServiceDesc is the grpc.ServiceDesc for EventLogService service.
+// ConversationService_ServiceDesc is the grpc.ServiceDesc for ConversationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
-var EventLogService_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "ax.EventLogService",
- HandlerType: (*EventLogServiceServer)(nil),
+var ConversationService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "ax.ConversationService",
+ HandlerType: (*ConversationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "DeleteConversation",
- Handler: _EventLogService_DeleteConversation_Handler,
+ Handler: _ConversationService_DeleteConversation_Handler,
},
{
MethodName: "ForkConversation",
- Handler: _EventLogService_ForkConversation_Handler,
+ Handler: _ConversationService_ForkConversation_Handler,
},
},
Streams: []grpc.StreamDesc{},