From 2f34d3d9c0a009f5864bb26d17cb24b4c9533ebc Mon Sep 17 00:00:00 2001 From: Kaien Date: Mon, 6 Jul 2026 00:59:55 +0300 Subject: [PATCH] feat: add DeleteMemory and memory correction poll RPCs --- memory.pb.go | 727 +++++++++++++++++++++++++++++++++++++++++++--- memory.proto | 82 ++++++ memory_grpc.pb.go | 214 +++++++++++++- 3 files changed, 978 insertions(+), 45 deletions(-) diff --git a/memory.pb.go b/memory.pb.go index 28fe179..2aa3677 100644 --- a/memory.pb.go +++ b/memory.pb.go @@ -1032,6 +1032,591 @@ func (x *BulkRefreshResponse) GetBatchCount() int32 { return 0 } +// DeleteMemoryRequest запрос на удаление воспоминания +type DeleteMemoryRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + MemoryId int64 `protobuf:"varint,1,opt,name=memory_id,json=memoryId,proto3" json:"memory_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMemoryRequest) Reset() { + *x = DeleteMemoryRequest{} + mi := &file_memory_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMemoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMemoryRequest) ProtoMessage() {} + +func (x *DeleteMemoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_memory_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMemoryRequest.ProtoReflect.Descriptor instead. +func (*DeleteMemoryRequest) Descriptor() ([]byte, []int) { + return file_memory_proto_rawDescGZIP(), []int{15} +} + +func (x *DeleteMemoryRequest) GetMemoryId() int64 { + if x != nil { + return x.MemoryId + } + return 0 +} + +// DeleteMemoryResponse ответ на удаление воспоминания +type DeleteMemoryResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteMemoryResponse) Reset() { + *x = DeleteMemoryResponse{} + mi := &file_memory_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteMemoryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMemoryResponse) ProtoMessage() {} + +func (x *DeleteMemoryResponse) ProtoReflect() protoreflect.Message { + mi := &file_memory_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMemoryResponse.ProtoReflect.Descriptor instead. +func (*DeleteMemoryResponse) Descriptor() ([]byte, []int) { + return file_memory_proto_rawDescGZIP(), []int{16} +} + +func (x *DeleteMemoryResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *DeleteMemoryResponse) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +// GetMemoriesForReviewRequest запрос воспоминаний для опроса-проверки. +// Возвращает воспоминания с наименьшим confidence, которые давно не проверялись, +// и сразу помечает их как отправленные на проверку (last_polled_at). +type GetMemoriesForReviewRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + CooldownDays int32 `protobuf:"varint,2,opt,name=cooldown_days,json=cooldownDays,proto3" json:"cooldown_days,omitempty"` // Не возвращать воспоминания, проверенные менее N дней назад (по умолчанию 14) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMemoriesForReviewRequest) Reset() { + *x = GetMemoriesForReviewRequest{} + mi := &file_memory_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMemoriesForReviewRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMemoriesForReviewRequest) ProtoMessage() {} + +func (x *GetMemoriesForReviewRequest) ProtoReflect() protoreflect.Message { + mi := &file_memory_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMemoriesForReviewRequest.ProtoReflect.Descriptor instead. +func (*GetMemoriesForReviewRequest) Descriptor() ([]byte, []int) { + return file_memory_proto_rawDescGZIP(), []int{17} +} + +func (x *GetMemoriesForReviewRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *GetMemoriesForReviewRequest) GetCooldownDays() int32 { + if x != nil { + return x.CooldownDays + } + return 0 +} + +// GetMemoriesForReviewResponse ответ с воспоминаниями для проверки +type GetMemoriesForReviewResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Memories []*Memory `protobuf:"bytes,1,rep,name=memories,proto3" json:"memories,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetMemoriesForReviewResponse) Reset() { + *x = GetMemoriesForReviewResponse{} + mi := &file_memory_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMemoriesForReviewResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMemoriesForReviewResponse) ProtoMessage() {} + +func (x *GetMemoriesForReviewResponse) ProtoReflect() protoreflect.Message { + mi := &file_memory_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMemoriesForReviewResponse.ProtoReflect.Descriptor instead. +func (*GetMemoriesForReviewResponse) Descriptor() ([]byte, []int) { + return file_memory_proto_rawDescGZIP(), []int{18} +} + +func (x *GetMemoriesForReviewResponse) GetMemories() []*Memory { + if x != nil { + return x.Memories + } + return nil +} + +// MemoryPoll представляет отправленный в чат опрос-проверку памяти +type MemoryPoll struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + ChatId int64 `protobuf:"varint,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + MessageId int64 `protobuf:"varint,3,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` + MemoryIds []int64 `protobuf:"varint,4,rep,packed,name=memory_ids,json=memoryIds,proto3" json:"memory_ids,omitempty"` // Порядок соответствует вариантам опроса + EvaluateAfter int64 `protobuf:"varint,5,opt,name=evaluate_after,json=evaluateAfter,proto3" json:"evaluate_after,omitempty"` // Unix time, когда пора подводить итоги + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemoryPoll) Reset() { + *x = MemoryPoll{} + mi := &file_memory_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemoryPoll) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoryPoll) ProtoMessage() {} + +func (x *MemoryPoll) ProtoReflect() protoreflect.Message { + mi := &file_memory_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemoryPoll.ProtoReflect.Descriptor instead. +func (*MemoryPoll) Descriptor() ([]byte, []int) { + return file_memory_proto_rawDescGZIP(), []int{19} +} + +func (x *MemoryPoll) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *MemoryPoll) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +func (x *MemoryPoll) GetMessageId() int64 { + if x != nil { + return x.MessageId + } + return 0 +} + +func (x *MemoryPoll) GetMemoryIds() []int64 { + if x != nil { + return x.MemoryIds + } + return nil +} + +func (x *MemoryPoll) GetEvaluateAfter() int64 { + if x != nil { + return x.EvaluateAfter + } + return 0 +} + +// RegisterMemoryPollRequest запрос на регистрацию отправленного опроса +type RegisterMemoryPollRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChatId int64 `protobuf:"varint,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + MessageId int64 `protobuf:"varint,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` + MemoryIds []int64 `protobuf:"varint,3,rep,packed,name=memory_ids,json=memoryIds,proto3" json:"memory_ids,omitempty"` + EvaluateAfter int64 `protobuf:"varint,4,opt,name=evaluate_after,json=evaluateAfter,proto3" json:"evaluate_after,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterMemoryPollRequest) Reset() { + *x = RegisterMemoryPollRequest{} + mi := &file_memory_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterMemoryPollRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterMemoryPollRequest) ProtoMessage() {} + +func (x *RegisterMemoryPollRequest) ProtoReflect() protoreflect.Message { + mi := &file_memory_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterMemoryPollRequest.ProtoReflect.Descriptor instead. +func (*RegisterMemoryPollRequest) Descriptor() ([]byte, []int) { + return file_memory_proto_rawDescGZIP(), []int{20} +} + +func (x *RegisterMemoryPollRequest) GetChatId() int64 { + if x != nil { + return x.ChatId + } + return 0 +} + +func (x *RegisterMemoryPollRequest) GetMessageId() int64 { + if x != nil { + return x.MessageId + } + return 0 +} + +func (x *RegisterMemoryPollRequest) GetMemoryIds() []int64 { + if x != nil { + return x.MemoryIds + } + return nil +} + +func (x *RegisterMemoryPollRequest) GetEvaluateAfter() int64 { + if x != nil { + return x.EvaluateAfter + } + return 0 +} + +// RegisterMemoryPollResponse ответ на регистрацию опроса +type RegisterMemoryPollResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + PollId int64 `protobuf:"varint,3,opt,name=poll_id,json=pollId,proto3" json:"poll_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterMemoryPollResponse) Reset() { + *x = RegisterMemoryPollResponse{} + mi := &file_memory_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterMemoryPollResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterMemoryPollResponse) ProtoMessage() {} + +func (x *RegisterMemoryPollResponse) ProtoReflect() protoreflect.Message { + mi := &file_memory_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterMemoryPollResponse.ProtoReflect.Descriptor instead. +func (*RegisterMemoryPollResponse) Descriptor() ([]byte, []int) { + return file_memory_proto_rawDescGZIP(), []int{21} +} + +func (x *RegisterMemoryPollResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *RegisterMemoryPollResponse) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +func (x *RegisterMemoryPollResponse) GetPollId() int64 { + if x != nil { + return x.PollId + } + return 0 +} + +// ListPendingMemoryPollsRequest запрос незавершённых опросов +type ListPendingMemoryPollsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPendingMemoryPollsRequest) Reset() { + *x = ListPendingMemoryPollsRequest{} + mi := &file_memory_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPendingMemoryPollsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPendingMemoryPollsRequest) ProtoMessage() {} + +func (x *ListPendingMemoryPollsRequest) ProtoReflect() protoreflect.Message { + mi := &file_memory_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPendingMemoryPollsRequest.ProtoReflect.Descriptor instead. +func (*ListPendingMemoryPollsRequest) Descriptor() ([]byte, []int) { + return file_memory_proto_rawDescGZIP(), []int{22} +} + +// ListPendingMemoryPollsResponse ответ с незавершёнными опросами +type ListPendingMemoryPollsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Polls []*MemoryPoll `protobuf:"bytes,1,rep,name=polls,proto3" json:"polls,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPendingMemoryPollsResponse) Reset() { + *x = ListPendingMemoryPollsResponse{} + mi := &file_memory_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPendingMemoryPollsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPendingMemoryPollsResponse) ProtoMessage() {} + +func (x *ListPendingMemoryPollsResponse) ProtoReflect() protoreflect.Message { + mi := &file_memory_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPendingMemoryPollsResponse.ProtoReflect.Descriptor instead. +func (*ListPendingMemoryPollsResponse) Descriptor() ([]byte, []int) { + return file_memory_proto_rawDescGZIP(), []int{23} +} + +func (x *ListPendingMemoryPollsResponse) GetPolls() []*MemoryPoll { + if x != nil { + return x.Polls + } + return nil +} + +// CompleteMemoryPollRequest запрос на завершение опроса +type CompleteMemoryPollRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PollId int64 `protobuf:"varint,1,opt,name=poll_id,json=pollId,proto3" json:"poll_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CompleteMemoryPollRequest) Reset() { + *x = CompleteMemoryPollRequest{} + mi := &file_memory_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CompleteMemoryPollRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompleteMemoryPollRequest) ProtoMessage() {} + +func (x *CompleteMemoryPollRequest) ProtoReflect() protoreflect.Message { + mi := &file_memory_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompleteMemoryPollRequest.ProtoReflect.Descriptor instead. +func (*CompleteMemoryPollRequest) Descriptor() ([]byte, []int) { + return file_memory_proto_rawDescGZIP(), []int{24} +} + +func (x *CompleteMemoryPollRequest) GetPollId() int64 { + if x != nil { + return x.PollId + } + return 0 +} + +// CompleteMemoryPollResponse ответ на завершение опроса +type CompleteMemoryPollResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CompleteMemoryPollResponse) Reset() { + *x = CompleteMemoryPollResponse{} + mi := &file_memory_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CompleteMemoryPollResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompleteMemoryPollResponse) ProtoMessage() {} + +func (x *CompleteMemoryPollResponse) ProtoReflect() protoreflect.Message { + mi := &file_memory_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompleteMemoryPollResponse.ProtoReflect.Descriptor instead. +func (*CompleteMemoryPollResponse) Descriptor() ([]byte, []int) { + return file_memory_proto_rawDescGZIP(), []int{25} +} + +func (x *CompleteMemoryPollResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *CompleteMemoryPollResponse) GetError() string { + if x != nil { + return x.Error + } + return "" +} + var File_memory_proto protoreflect.FileDescriptor const file_memory_proto_rawDesc = "" + @@ -1117,14 +1702,57 @@ const file_memory_proto_rawDesc = "" + "\x12messages_processed\x18\x03 \x01(\x05R\x11messagesProcessed\x12'\n" + "\x0ffacts_extracted\x18\x04 \x01(\x05R\x0efactsExtracted\x12\x1f\n" + "\vbatch_count\x18\x05 \x01(\x05R\n" + - "batchCount2\xba\x04\n" + + "batchCount\"2\n" + + "\x13DeleteMemoryRequest\x12\x1b\n" + + "\tmemory_id\x18\x01 \x01(\x03R\bmemoryId\"F\n" + + "\x14DeleteMemoryResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" + + "\x05error\x18\x02 \x01(\tR\x05error\"X\n" + + "\x1bGetMemoriesForReviewRequest\x12\x14\n" + + "\x05limit\x18\x01 \x01(\x05R\x05limit\x12#\n" + + "\rcooldown_days\x18\x02 \x01(\x05R\fcooldownDays\"J\n" + + "\x1cGetMemoriesForReviewResponse\x12*\n" + + "\bmemories\x18\x01 \x03(\v2\x0e.memory.MemoryR\bmemories\"\x9a\x01\n" + + "\n" + + "MemoryPoll\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x17\n" + + "\achat_id\x18\x02 \x01(\x03R\x06chatId\x12\x1d\n" + + "\n" + + "message_id\x18\x03 \x01(\x03R\tmessageId\x12\x1d\n" + + "\n" + + "memory_ids\x18\x04 \x03(\x03R\tmemoryIds\x12%\n" + + "\x0eevaluate_after\x18\x05 \x01(\x03R\revaluateAfter\"\x99\x01\n" + + "\x19RegisterMemoryPollRequest\x12\x17\n" + + "\achat_id\x18\x01 \x01(\x03R\x06chatId\x12\x1d\n" + + "\n" + + "message_id\x18\x02 \x01(\x03R\tmessageId\x12\x1d\n" + + "\n" + + "memory_ids\x18\x03 \x03(\x03R\tmemoryIds\x12%\n" + + "\x0eevaluate_after\x18\x04 \x01(\x03R\revaluateAfter\"e\n" + + "\x1aRegisterMemoryPollResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" + + "\x05error\x18\x02 \x01(\tR\x05error\x12\x17\n" + + "\apoll_id\x18\x03 \x01(\x03R\x06pollId\"\x1f\n" + + "\x1dListPendingMemoryPollsRequest\"J\n" + + "\x1eListPendingMemoryPollsResponse\x12(\n" + + "\x05polls\x18\x01 \x03(\v2\x12.memory.MemoryPollR\x05polls\"4\n" + + "\x19CompleteMemoryPollRequest\x12\x17\n" + + "\apoll_id\x18\x01 \x01(\x03R\x06pollId\"L\n" + + "\x1aCompleteMemoryPollResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" + + "\x05error\x18\x02 \x01(\tR\x05error2\x8b\b\n" + "\rMemoryService\x12F\n" + "\vStoreMemory\x12\x1a.memory.StoreMemoryRequest\x1a\x1b.memory.StoreMemoryResponse\x12F\n" + "\vGetMemories\x12\x1a.memory.GetMemoriesRequest\x1a\x1b.memory.GetMemoriesResponse\x12O\n" + "\x0eProcessMessage\x12\x1d.memory.ProcessMessageRequest\x1a\x1e.memory.ProcessMessageResponse\x12^\n" + "\x13GetRelevantMemories\x12\".memory.GetRelevantMemoriesRequest\x1a#.memory.GetRelevantMemoriesResponse\x12X\n" + "\x11GetMemoriesByUser\x12 .memory.GetMemoriesByUserRequest\x1a!.memory.GetMemoriesByUserResponse\x12F\n" + - "\vBulkRefresh\x12\x1a.memory.BulkRefreshRequest\x1a\x1b.memory.BulkRefreshResponse\x12F\n" + + "\vBulkRefresh\x12\x1a.memory.BulkRefreshRequest\x1a\x1b.memory.BulkRefreshResponse\x12I\n" + + "\fDeleteMemory\x12\x1b.memory.DeleteMemoryRequest\x1a\x1c.memory.DeleteMemoryResponse\x12a\n" + + "\x14GetMemoriesForReview\x12#.memory.GetMemoriesForReviewRequest\x1a$.memory.GetMemoriesForReviewResponse\x12[\n" + + "\x12RegisterMemoryPoll\x12!.memory.RegisterMemoryPollRequest\x1a\".memory.RegisterMemoryPollResponse\x12g\n" + + "\x16ListPendingMemoryPolls\x12%.memory.ListPendingMemoryPollsRequest\x1a&.memory.ListPendingMemoryPollsResponse\x12[\n" + + "\x12CompleteMemoryPoll\x12!.memory.CompleteMemoryPollRequest\x1a\".memory.CompleteMemoryPollResponse\x12F\n" + "\vHealthCheck\x12\x1a.memory.HealthCheckRequest\x1a\x1b.memory.HealthCheckResponseB*Z(git.be.kaien.ru/l-ai/l-ai-memories/protob\x06proto3" var ( @@ -1139,47 +1767,70 @@ func file_memory_proto_rawDescGZIP() []byte { return file_memory_proto_rawDescData } -var file_memory_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_memory_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_memory_proto_goTypes = []any{ - (*Memory)(nil), // 0: memory.Memory - (*StoreMemoryRequest)(nil), // 1: memory.StoreMemoryRequest - (*StoreMemoryResponse)(nil), // 2: memory.StoreMemoryResponse - (*GetMemoriesRequest)(nil), // 3: memory.GetMemoriesRequest - (*GetMemoriesResponse)(nil), // 4: memory.GetMemoriesResponse - (*ProcessMessageRequest)(nil), // 5: memory.ProcessMessageRequest - (*ProcessMessageResponse)(nil), // 6: memory.ProcessMessageResponse - (*HealthCheckRequest)(nil), // 7: memory.HealthCheckRequest - (*HealthCheckResponse)(nil), // 8: memory.HealthCheckResponse - (*GetRelevantMemoriesRequest)(nil), // 9: memory.GetRelevantMemoriesRequest - (*GetRelevantMemoriesResponse)(nil), // 10: memory.GetRelevantMemoriesResponse - (*GetMemoriesByUserRequest)(nil), // 11: memory.GetMemoriesByUserRequest - (*GetMemoriesByUserResponse)(nil), // 12: memory.GetMemoriesByUserResponse - (*BulkRefreshRequest)(nil), // 13: memory.BulkRefreshRequest - (*BulkRefreshResponse)(nil), // 14: memory.BulkRefreshResponse + (*Memory)(nil), // 0: memory.Memory + (*StoreMemoryRequest)(nil), // 1: memory.StoreMemoryRequest + (*StoreMemoryResponse)(nil), // 2: memory.StoreMemoryResponse + (*GetMemoriesRequest)(nil), // 3: memory.GetMemoriesRequest + (*GetMemoriesResponse)(nil), // 4: memory.GetMemoriesResponse + (*ProcessMessageRequest)(nil), // 5: memory.ProcessMessageRequest + (*ProcessMessageResponse)(nil), // 6: memory.ProcessMessageResponse + (*HealthCheckRequest)(nil), // 7: memory.HealthCheckRequest + (*HealthCheckResponse)(nil), // 8: memory.HealthCheckResponse + (*GetRelevantMemoriesRequest)(nil), // 9: memory.GetRelevantMemoriesRequest + (*GetRelevantMemoriesResponse)(nil), // 10: memory.GetRelevantMemoriesResponse + (*GetMemoriesByUserRequest)(nil), // 11: memory.GetMemoriesByUserRequest + (*GetMemoriesByUserResponse)(nil), // 12: memory.GetMemoriesByUserResponse + (*BulkRefreshRequest)(nil), // 13: memory.BulkRefreshRequest + (*BulkRefreshResponse)(nil), // 14: memory.BulkRefreshResponse + (*DeleteMemoryRequest)(nil), // 15: memory.DeleteMemoryRequest + (*DeleteMemoryResponse)(nil), // 16: memory.DeleteMemoryResponse + (*GetMemoriesForReviewRequest)(nil), // 17: memory.GetMemoriesForReviewRequest + (*GetMemoriesForReviewResponse)(nil), // 18: memory.GetMemoriesForReviewResponse + (*MemoryPoll)(nil), // 19: memory.MemoryPoll + (*RegisterMemoryPollRequest)(nil), // 20: memory.RegisterMemoryPollRequest + (*RegisterMemoryPollResponse)(nil), // 21: memory.RegisterMemoryPollResponse + (*ListPendingMemoryPollsRequest)(nil), // 22: memory.ListPendingMemoryPollsRequest + (*ListPendingMemoryPollsResponse)(nil), // 23: memory.ListPendingMemoryPollsResponse + (*CompleteMemoryPollRequest)(nil), // 24: memory.CompleteMemoryPollRequest + (*CompleteMemoryPollResponse)(nil), // 25: memory.CompleteMemoryPollResponse } var file_memory_proto_depIdxs = []int32{ 0, // 0: memory.GetMemoriesResponse.memories:type_name -> memory.Memory 0, // 1: memory.GetRelevantMemoriesResponse.memories:type_name -> memory.Memory 0, // 2: memory.GetMemoriesByUserResponse.memories:type_name -> memory.Memory - 1, // 3: memory.MemoryService.StoreMemory:input_type -> memory.StoreMemoryRequest - 3, // 4: memory.MemoryService.GetMemories:input_type -> memory.GetMemoriesRequest - 5, // 5: memory.MemoryService.ProcessMessage:input_type -> memory.ProcessMessageRequest - 9, // 6: memory.MemoryService.GetRelevantMemories:input_type -> memory.GetRelevantMemoriesRequest - 11, // 7: memory.MemoryService.GetMemoriesByUser:input_type -> memory.GetMemoriesByUserRequest - 13, // 8: memory.MemoryService.BulkRefresh:input_type -> memory.BulkRefreshRequest - 7, // 9: memory.MemoryService.HealthCheck:input_type -> memory.HealthCheckRequest - 2, // 10: memory.MemoryService.StoreMemory:output_type -> memory.StoreMemoryResponse - 4, // 11: memory.MemoryService.GetMemories:output_type -> memory.GetMemoriesResponse - 6, // 12: memory.MemoryService.ProcessMessage:output_type -> memory.ProcessMessageResponse - 10, // 13: memory.MemoryService.GetRelevantMemories:output_type -> memory.GetRelevantMemoriesResponse - 12, // 14: memory.MemoryService.GetMemoriesByUser:output_type -> memory.GetMemoriesByUserResponse - 14, // 15: memory.MemoryService.BulkRefresh:output_type -> memory.BulkRefreshResponse - 8, // 16: memory.MemoryService.HealthCheck:output_type -> memory.HealthCheckResponse - 10, // [10:17] is the sub-list for method output_type - 3, // [3:10] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 0, // 3: memory.GetMemoriesForReviewResponse.memories:type_name -> memory.Memory + 19, // 4: memory.ListPendingMemoryPollsResponse.polls:type_name -> memory.MemoryPoll + 1, // 5: memory.MemoryService.StoreMemory:input_type -> memory.StoreMemoryRequest + 3, // 6: memory.MemoryService.GetMemories:input_type -> memory.GetMemoriesRequest + 5, // 7: memory.MemoryService.ProcessMessage:input_type -> memory.ProcessMessageRequest + 9, // 8: memory.MemoryService.GetRelevantMemories:input_type -> memory.GetRelevantMemoriesRequest + 11, // 9: memory.MemoryService.GetMemoriesByUser:input_type -> memory.GetMemoriesByUserRequest + 13, // 10: memory.MemoryService.BulkRefresh:input_type -> memory.BulkRefreshRequest + 15, // 11: memory.MemoryService.DeleteMemory:input_type -> memory.DeleteMemoryRequest + 17, // 12: memory.MemoryService.GetMemoriesForReview:input_type -> memory.GetMemoriesForReviewRequest + 20, // 13: memory.MemoryService.RegisterMemoryPoll:input_type -> memory.RegisterMemoryPollRequest + 22, // 14: memory.MemoryService.ListPendingMemoryPolls:input_type -> memory.ListPendingMemoryPollsRequest + 24, // 15: memory.MemoryService.CompleteMemoryPoll:input_type -> memory.CompleteMemoryPollRequest + 7, // 16: memory.MemoryService.HealthCheck:input_type -> memory.HealthCheckRequest + 2, // 17: memory.MemoryService.StoreMemory:output_type -> memory.StoreMemoryResponse + 4, // 18: memory.MemoryService.GetMemories:output_type -> memory.GetMemoriesResponse + 6, // 19: memory.MemoryService.ProcessMessage:output_type -> memory.ProcessMessageResponse + 10, // 20: memory.MemoryService.GetRelevantMemories:output_type -> memory.GetRelevantMemoriesResponse + 12, // 21: memory.MemoryService.GetMemoriesByUser:output_type -> memory.GetMemoriesByUserResponse + 14, // 22: memory.MemoryService.BulkRefresh:output_type -> memory.BulkRefreshResponse + 16, // 23: memory.MemoryService.DeleteMemory:output_type -> memory.DeleteMemoryResponse + 18, // 24: memory.MemoryService.GetMemoriesForReview:output_type -> memory.GetMemoriesForReviewResponse + 21, // 25: memory.MemoryService.RegisterMemoryPoll:output_type -> memory.RegisterMemoryPollResponse + 23, // 26: memory.MemoryService.ListPendingMemoryPolls:output_type -> memory.ListPendingMemoryPollsResponse + 25, // 27: memory.MemoryService.CompleteMemoryPoll:output_type -> memory.CompleteMemoryPollResponse + 8, // 28: memory.MemoryService.HealthCheck:output_type -> memory.HealthCheckResponse + 17, // [17:29] is the sub-list for method output_type + 5, // [5:17] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_memory_proto_init() } @@ -1193,7 +1844,7 @@ func file_memory_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_memory_proto_rawDesc), len(file_memory_proto_rawDesc)), NumEnums: 0, - NumMessages: 15, + NumMessages: 26, NumExtensions: 0, NumServices: 1, }, diff --git a/memory.proto b/memory.proto index 521afd7..9f10389 100644 --- a/memory.proto +++ b/memory.proto @@ -120,6 +120,73 @@ message BulkRefreshResponse { int32 batch_count = 5; } +// DeleteMemoryRequest запрос на удаление воспоминания +message DeleteMemoryRequest { + int64 memory_id = 1; +} + +// DeleteMemoryResponse ответ на удаление воспоминания +message DeleteMemoryResponse { + bool success = 1; + string error = 2; +} + +// GetMemoriesForReviewRequest запрос воспоминаний для опроса-проверки. +// Возвращает воспоминания с наименьшим confidence, которые давно не проверялись, +// и сразу помечает их как отправленные на проверку (last_polled_at). +message GetMemoriesForReviewRequest { + int32 limit = 1; + int32 cooldown_days = 2; // Не возвращать воспоминания, проверенные менее N дней назад (по умолчанию 14) +} + +// GetMemoriesForReviewResponse ответ с воспоминаниями для проверки +message GetMemoriesForReviewResponse { + repeated Memory memories = 1; +} + +// MemoryPoll представляет отправленный в чат опрос-проверку памяти +message MemoryPoll { + int64 id = 1; + int64 chat_id = 2; + int64 message_id = 3; + repeated int64 memory_ids = 4; // Порядок соответствует вариантам опроса + int64 evaluate_after = 5; // Unix time, когда пора подводить итоги +} + +// RegisterMemoryPollRequest запрос на регистрацию отправленного опроса +message RegisterMemoryPollRequest { + int64 chat_id = 1; + int64 message_id = 2; + repeated int64 memory_ids = 3; + int64 evaluate_after = 4; +} + +// RegisterMemoryPollResponse ответ на регистрацию опроса +message RegisterMemoryPollResponse { + bool success = 1; + string error = 2; + int64 poll_id = 3; +} + +// ListPendingMemoryPollsRequest запрос незавершённых опросов +message ListPendingMemoryPollsRequest {} + +// ListPendingMemoryPollsResponse ответ с незавершёнными опросами +message ListPendingMemoryPollsResponse { + repeated MemoryPoll polls = 1; +} + +// CompleteMemoryPollRequest запрос на завершение опроса +message CompleteMemoryPollRequest { + int64 poll_id = 1; +} + +// CompleteMemoryPollResponse ответ на завершение опроса +message CompleteMemoryPollResponse { + bool success = 1; + string error = 2; +} + // MemoryService - сервис для работы с памятью service MemoryService { // StoreMemory сохраняет воспоминание @@ -140,6 +207,21 @@ service MemoryService { // BulkRefresh обрабатывает множество сообщений для извлечения фактов rpc BulkRefresh(BulkRefreshRequest) returns (BulkRefreshResponse); + // DeleteMemory удаляет воспоминание по ID + rpc DeleteMemory(DeleteMemoryRequest) returns (DeleteMemoryResponse); + + // GetMemoriesForReview возвращает воспоминания для опроса-проверки + rpc GetMemoriesForReview(GetMemoriesForReviewRequest) returns (GetMemoriesForReviewResponse); + + // RegisterMemoryPoll регистрирует отправленный опрос-проверку + rpc RegisterMemoryPoll(RegisterMemoryPollRequest) returns (RegisterMemoryPollResponse); + + // ListPendingMemoryPolls возвращает незавершённые опросы + rpc ListPendingMemoryPolls(ListPendingMemoryPollsRequest) returns (ListPendingMemoryPollsResponse); + + // CompleteMemoryPoll помечает опрос завершённым + rpc CompleteMemoryPoll(CompleteMemoryPollRequest) returns (CompleteMemoryPollResponse); + // HealthCheck проверяет здоровье сервиса rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse); } diff --git a/memory_grpc.pb.go b/memory_grpc.pb.go index fc63de1..315c395 100644 --- a/memory_grpc.pb.go +++ b/memory_grpc.pb.go @@ -19,13 +19,18 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - MemoryService_StoreMemory_FullMethodName = "/memory.MemoryService/StoreMemory" - MemoryService_GetMemories_FullMethodName = "/memory.MemoryService/GetMemories" - MemoryService_ProcessMessage_FullMethodName = "/memory.MemoryService/ProcessMessage" - MemoryService_GetRelevantMemories_FullMethodName = "/memory.MemoryService/GetRelevantMemories" - MemoryService_GetMemoriesByUser_FullMethodName = "/memory.MemoryService/GetMemoriesByUser" - MemoryService_BulkRefresh_FullMethodName = "/memory.MemoryService/BulkRefresh" - MemoryService_HealthCheck_FullMethodName = "/memory.MemoryService/HealthCheck" + MemoryService_StoreMemory_FullMethodName = "/memory.MemoryService/StoreMemory" + MemoryService_GetMemories_FullMethodName = "/memory.MemoryService/GetMemories" + MemoryService_ProcessMessage_FullMethodName = "/memory.MemoryService/ProcessMessage" + MemoryService_GetRelevantMemories_FullMethodName = "/memory.MemoryService/GetRelevantMemories" + MemoryService_GetMemoriesByUser_FullMethodName = "/memory.MemoryService/GetMemoriesByUser" + MemoryService_BulkRefresh_FullMethodName = "/memory.MemoryService/BulkRefresh" + MemoryService_DeleteMemory_FullMethodName = "/memory.MemoryService/DeleteMemory" + MemoryService_GetMemoriesForReview_FullMethodName = "/memory.MemoryService/GetMemoriesForReview" + MemoryService_RegisterMemoryPoll_FullMethodName = "/memory.MemoryService/RegisterMemoryPoll" + MemoryService_ListPendingMemoryPolls_FullMethodName = "/memory.MemoryService/ListPendingMemoryPolls" + MemoryService_CompleteMemoryPoll_FullMethodName = "/memory.MemoryService/CompleteMemoryPoll" + MemoryService_HealthCheck_FullMethodName = "/memory.MemoryService/HealthCheck" ) // MemoryServiceClient is the client API for MemoryService service. @@ -46,6 +51,16 @@ type MemoryServiceClient interface { GetMemoriesByUser(ctx context.Context, in *GetMemoriesByUserRequest, opts ...grpc.CallOption) (*GetMemoriesByUserResponse, error) // BulkRefresh обрабатывает множество сообщений для извлечения фактов BulkRefresh(ctx context.Context, in *BulkRefreshRequest, opts ...grpc.CallOption) (*BulkRefreshResponse, error) + // DeleteMemory удаляет воспоминание по ID + DeleteMemory(ctx context.Context, in *DeleteMemoryRequest, opts ...grpc.CallOption) (*DeleteMemoryResponse, error) + // GetMemoriesForReview возвращает воспоминания для опроса-проверки + GetMemoriesForReview(ctx context.Context, in *GetMemoriesForReviewRequest, opts ...grpc.CallOption) (*GetMemoriesForReviewResponse, error) + // RegisterMemoryPoll регистрирует отправленный опрос-проверку + RegisterMemoryPoll(ctx context.Context, in *RegisterMemoryPollRequest, opts ...grpc.CallOption) (*RegisterMemoryPollResponse, error) + // ListPendingMemoryPolls возвращает незавершённые опросы + ListPendingMemoryPolls(ctx context.Context, in *ListPendingMemoryPollsRequest, opts ...grpc.CallOption) (*ListPendingMemoryPollsResponse, error) + // CompleteMemoryPoll помечает опрос завершённым + CompleteMemoryPoll(ctx context.Context, in *CompleteMemoryPollRequest, opts ...grpc.CallOption) (*CompleteMemoryPollResponse, error) // HealthCheck проверяет здоровье сервиса HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) } @@ -118,6 +133,56 @@ func (c *memoryServiceClient) BulkRefresh(ctx context.Context, in *BulkRefreshRe return out, nil } +func (c *memoryServiceClient) DeleteMemory(ctx context.Context, in *DeleteMemoryRequest, opts ...grpc.CallOption) (*DeleteMemoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteMemoryResponse) + err := c.cc.Invoke(ctx, MemoryService_DeleteMemory_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *memoryServiceClient) GetMemoriesForReview(ctx context.Context, in *GetMemoriesForReviewRequest, opts ...grpc.CallOption) (*GetMemoriesForReviewResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetMemoriesForReviewResponse) + err := c.cc.Invoke(ctx, MemoryService_GetMemoriesForReview_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *memoryServiceClient) RegisterMemoryPoll(ctx context.Context, in *RegisterMemoryPollRequest, opts ...grpc.CallOption) (*RegisterMemoryPollResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RegisterMemoryPollResponse) + err := c.cc.Invoke(ctx, MemoryService_RegisterMemoryPoll_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *memoryServiceClient) ListPendingMemoryPolls(ctx context.Context, in *ListPendingMemoryPollsRequest, opts ...grpc.CallOption) (*ListPendingMemoryPollsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPendingMemoryPollsResponse) + err := c.cc.Invoke(ctx, MemoryService_ListPendingMemoryPolls_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *memoryServiceClient) CompleteMemoryPoll(ctx context.Context, in *CompleteMemoryPollRequest, opts ...grpc.CallOption) (*CompleteMemoryPollResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CompleteMemoryPollResponse) + err := c.cc.Invoke(ctx, MemoryService_CompleteMemoryPoll_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *memoryServiceClient) HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(HealthCheckResponse) @@ -146,6 +211,16 @@ type MemoryServiceServer interface { GetMemoriesByUser(context.Context, *GetMemoriesByUserRequest) (*GetMemoriesByUserResponse, error) // BulkRefresh обрабатывает множество сообщений для извлечения фактов BulkRefresh(context.Context, *BulkRefreshRequest) (*BulkRefreshResponse, error) + // DeleteMemory удаляет воспоминание по ID + DeleteMemory(context.Context, *DeleteMemoryRequest) (*DeleteMemoryResponse, error) + // GetMemoriesForReview возвращает воспоминания для опроса-проверки + GetMemoriesForReview(context.Context, *GetMemoriesForReviewRequest) (*GetMemoriesForReviewResponse, error) + // RegisterMemoryPoll регистрирует отправленный опрос-проверку + RegisterMemoryPoll(context.Context, *RegisterMemoryPollRequest) (*RegisterMemoryPollResponse, error) + // ListPendingMemoryPolls возвращает незавершённые опросы + ListPendingMemoryPolls(context.Context, *ListPendingMemoryPollsRequest) (*ListPendingMemoryPollsResponse, error) + // CompleteMemoryPoll помечает опрос завершённым + CompleteMemoryPoll(context.Context, *CompleteMemoryPollRequest) (*CompleteMemoryPollResponse, error) // HealthCheck проверяет здоровье сервиса HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) mustEmbedUnimplementedMemoryServiceServer() @@ -176,6 +251,21 @@ func (UnimplementedMemoryServiceServer) GetMemoriesByUser(context.Context, *GetM func (UnimplementedMemoryServiceServer) BulkRefresh(context.Context, *BulkRefreshRequest) (*BulkRefreshResponse, error) { return nil, status.Error(codes.Unimplemented, "method BulkRefresh not implemented") } +func (UnimplementedMemoryServiceServer) DeleteMemory(context.Context, *DeleteMemoryRequest) (*DeleteMemoryResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteMemory not implemented") +} +func (UnimplementedMemoryServiceServer) GetMemoriesForReview(context.Context, *GetMemoriesForReviewRequest) (*GetMemoriesForReviewResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetMemoriesForReview not implemented") +} +func (UnimplementedMemoryServiceServer) RegisterMemoryPoll(context.Context, *RegisterMemoryPollRequest) (*RegisterMemoryPollResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RegisterMemoryPoll not implemented") +} +func (UnimplementedMemoryServiceServer) ListPendingMemoryPolls(context.Context, *ListPendingMemoryPollsRequest) (*ListPendingMemoryPollsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListPendingMemoryPolls not implemented") +} +func (UnimplementedMemoryServiceServer) CompleteMemoryPoll(context.Context, *CompleteMemoryPollRequest) (*CompleteMemoryPollResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CompleteMemoryPoll not implemented") +} func (UnimplementedMemoryServiceServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) { return nil, status.Error(codes.Unimplemented, "method HealthCheck not implemented") } @@ -308,6 +398,96 @@ func _MemoryService_BulkRefresh_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _MemoryService_DeleteMemory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteMemoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MemoryServiceServer).DeleteMemory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MemoryService_DeleteMemory_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MemoryServiceServer).DeleteMemory(ctx, req.(*DeleteMemoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MemoryService_GetMemoriesForReview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMemoriesForReviewRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MemoryServiceServer).GetMemoriesForReview(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MemoryService_GetMemoriesForReview_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MemoryServiceServer).GetMemoriesForReview(ctx, req.(*GetMemoriesForReviewRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MemoryService_RegisterMemoryPoll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterMemoryPollRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MemoryServiceServer).RegisterMemoryPoll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MemoryService_RegisterMemoryPoll_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MemoryServiceServer).RegisterMemoryPoll(ctx, req.(*RegisterMemoryPollRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MemoryService_ListPendingMemoryPolls_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPendingMemoryPollsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MemoryServiceServer).ListPendingMemoryPolls(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MemoryService_ListPendingMemoryPolls_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MemoryServiceServer).ListPendingMemoryPolls(ctx, req.(*ListPendingMemoryPollsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MemoryService_CompleteMemoryPoll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CompleteMemoryPollRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MemoryServiceServer).CompleteMemoryPoll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MemoryService_CompleteMemoryPoll_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MemoryServiceServer).CompleteMemoryPoll(ctx, req.(*CompleteMemoryPollRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _MemoryService_HealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(HealthCheckRequest) if err := dec(in); err != nil { @@ -357,6 +537,26 @@ var MemoryService_ServiceDesc = grpc.ServiceDesc{ MethodName: "BulkRefresh", Handler: _MemoryService_BulkRefresh_Handler, }, + { + MethodName: "DeleteMemory", + Handler: _MemoryService_DeleteMemory_Handler, + }, + { + MethodName: "GetMemoriesForReview", + Handler: _MemoryService_GetMemoriesForReview_Handler, + }, + { + MethodName: "RegisterMemoryPoll", + Handler: _MemoryService_RegisterMemoryPoll_Handler, + }, + { + MethodName: "ListPendingMemoryPolls", + Handler: _MemoryService_ListPendingMemoryPolls_Handler, + }, + { + MethodName: "CompleteMemoryPoll", + Handler: _MemoryService_CompleteMemoryPoll_Handler, + }, { MethodName: "HealthCheck", Handler: _MemoryService_HealthCheck_Handler,