|
|
@@ -29,6 +29,8 @@ type Options struct {
|
|
|
|
|
|
// 操作记录
|
|
|
OperationRecord *OperationRecord `protobuf:"bytes,2,opt,name=operation_record,json=operationRecord,proto3" json:"operation_record"`
|
|
|
+ // mcp 配置
|
|
|
+ McpOptions *McpOptions `protobuf:"bytes,3,opt,name=mcp_options,json=mcpOptions,proto3" json:"mcp_options"`
|
|
|
}
|
|
|
|
|
|
func (x *Options) Reset() {
|
|
|
@@ -70,6 +72,13 @@ func (x *Options) GetOperationRecord() *OperationRecord {
|
|
|
return &OperationRecord{}
|
|
|
}
|
|
|
|
|
|
+func (x *Options) GetMcpOptions() *McpOptions {
|
|
|
+ if x != nil && x.McpOptions != nil {
|
|
|
+ return x.McpOptions
|
|
|
+ }
|
|
|
+ return &McpOptions{}
|
|
|
+}
|
|
|
+
|
|
|
// 操作记录
|
|
|
type OperationRecord struct {
|
|
|
state protoimpl.MessageState
|
|
|
@@ -119,6 +128,54 @@ func (x *OperationRecord) GetEnabled() bool {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
+type McpOptions struct {
|
|
|
+ state protoimpl.MessageState
|
|
|
+ sizeCache protoimpl.SizeCache
|
|
|
+ unknownFields protoimpl.UnknownFields
|
|
|
+
|
|
|
+ // 是否生成mcp
|
|
|
+ Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
|
|
|
+}
|
|
|
+
|
|
|
+func (x *McpOptions) Reset() {
|
|
|
+ *x = McpOptions{}
|
|
|
+ if protoimpl.UnsafeEnabled {
|
|
|
+ mi := &file_kuban_api_annotations_proto_msgTypes[2]
|
|
|
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
+ ms.StoreMessageInfo(mi)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *McpOptions) String() string {
|
|
|
+ return protoimpl.X.MessageStringOf(x)
|
|
|
+}
|
|
|
+
|
|
|
+func (*McpOptions) ProtoMessage() {}
|
|
|
+
|
|
|
+func (x *McpOptions) ProtoReflect() protoreflect.Message {
|
|
|
+ mi := &file_kuban_api_annotations_proto_msgTypes[2]
|
|
|
+ if protoimpl.UnsafeEnabled && x != nil {
|
|
|
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
+ if ms.LoadMessageInfo() == nil {
|
|
|
+ ms.StoreMessageInfo(mi)
|
|
|
+ }
|
|
|
+ return ms
|
|
|
+ }
|
|
|
+ return mi.MessageOf(x)
|
|
|
+}
|
|
|
+
|
|
|
+// Deprecated: Use McpOptions.ProtoReflect.Descriptor instead.
|
|
|
+func (*McpOptions) Descriptor() ([]byte, []int) {
|
|
|
+ return file_kuban_api_annotations_proto_rawDescGZIP(), []int{2}
|
|
|
+}
|
|
|
+
|
|
|
+func (x *McpOptions) GetEnabled() bool {
|
|
|
+ if x != nil {
|
|
|
+ return x.Enabled
|
|
|
+ }
|
|
|
+ return false
|
|
|
+}
|
|
|
+
|
|
|
var file_kuban_api_annotations_proto_extTypes = []protoimpl.ExtensionInfo{
|
|
|
{
|
|
|
ExtendedType: (*descriptorpb.MethodOptions)(nil),
|
|
|
@@ -143,25 +200,31 @@ var file_kuban_api_annotations_proto_rawDesc = []byte{
|
|
|
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6b,
|
|
|
0x75, 0x62, 0x61, 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
|
|
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
|
|
|
- 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x50, 0x0a, 0x07, 0x4f, 0x70,
|
|
|
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x45, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
|
|
|
- 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
|
|
- 0x1a, 0x2e, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x65, 0x72,
|
|
|
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0f, 0x6f, 0x70, 0x65,
|
|
|
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x2b, 0x0a, 0x0f,
|
|
|
- 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12,
|
|
|
- 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
|
|
|
- 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x4d, 0x0a, 0x07, 0x6f, 0x70, 0x74,
|
|
|
- 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
|
|
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74,
|
|
|
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6b, 0x75,
|
|
|
- 0x62, 0x61, 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
|
|
|
- 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x2e,
|
|
|
- 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65,
|
|
|
- 0x72, 0x2f, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x6b, 0x75, 0x62, 0x61,
|
|
|
- 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
|
|
- 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70,
|
|
|
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
|
+ 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x07, 0x4f,
|
|
|
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x45, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
|
|
|
+ 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
|
|
+ 0x32, 0x1a, 0x2e, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x65,
|
|
|
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0f, 0x6f, 0x70,
|
|
|
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x36, 0x0a,
|
|
|
+ 0x0b, 0x6d, 0x63, 0x70, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01,
|
|
|
+ 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d,
|
|
|
+ 0x63, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x6d, 0x63, 0x70, 0x4f, 0x70,
|
|
|
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2b, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
|
|
|
+ 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62,
|
|
|
+ 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c,
|
|
|
+ 0x65, 0x64, 0x22, 0x26, 0x0a, 0x0a, 0x4d, 0x63, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
|
|
+ 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
|
+ 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x4d, 0x0a, 0x07, 0x6f, 0x70,
|
|
|
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
|
|
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70,
|
|
|
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6b,
|
|
|
+ 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
|
|
+ 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74,
|
|
|
+ 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76,
|
|
|
+ 0x65, 0x72, 0x2f, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x6b, 0x75, 0x62,
|
|
|
+ 0x61, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
|
|
|
+ 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06,
|
|
|
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
|
}
|
|
|
|
|
|
var (
|
|
|
@@ -176,21 +239,23 @@ func file_kuban_api_annotations_proto_rawDescGZIP() []byte {
|
|
|
return file_kuban_api_annotations_proto_rawDescData
|
|
|
}
|
|
|
|
|
|
-var file_kuban_api_annotations_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
|
+var file_kuban_api_annotations_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
|
var file_kuban_api_annotations_proto_goTypes = []interface{}{
|
|
|
(*Options)(nil), // 0: kuban.api.Options
|
|
|
(*OperationRecord)(nil), // 1: kuban.api.OperationRecord
|
|
|
- (*descriptorpb.MethodOptions)(nil), // 2: google.protobuf.MethodOptions
|
|
|
+ (*McpOptions)(nil), // 2: kuban.api.McpOptions
|
|
|
+ (*descriptorpb.MethodOptions)(nil), // 3: google.protobuf.MethodOptions
|
|
|
}
|
|
|
var file_kuban_api_annotations_proto_depIdxs = []int32{
|
|
|
1, // 0: kuban.api.Options.operation_record:type_name -> kuban.api.OperationRecord
|
|
|
- 2, // 1: kuban.api.options:extendee -> google.protobuf.MethodOptions
|
|
|
- 0, // 2: kuban.api.options:type_name -> kuban.api.Options
|
|
|
- 3, // [3:3] is the sub-list for method output_type
|
|
|
- 3, // [3:3] is the sub-list for method input_type
|
|
|
- 2, // [2:3] is the sub-list for extension type_name
|
|
|
- 1, // [1:2] is the sub-list for extension extendee
|
|
|
- 0, // [0:1] is the sub-list for field type_name
|
|
|
+ 2, // 1: kuban.api.Options.mcp_options:type_name -> kuban.api.McpOptions
|
|
|
+ 3, // 2: kuban.api.options:extendee -> google.protobuf.MethodOptions
|
|
|
+ 0, // 3: kuban.api.options:type_name -> kuban.api.Options
|
|
|
+ 4, // [4:4] is the sub-list for method output_type
|
|
|
+ 4, // [4:4] is the sub-list for method input_type
|
|
|
+ 3, // [3:4] is the sub-list for extension type_name
|
|
|
+ 2, // [2:3] is the sub-list for extension extendee
|
|
|
+ 0, // [0:2] is the sub-list for field type_name
|
|
|
}
|
|
|
|
|
|
func init() { file_kuban_api_annotations_proto_init() }
|
|
|
@@ -223,6 +288,18 @@ func file_kuban_api_annotations_proto_init() {
|
|
|
return nil
|
|
|
}
|
|
|
}
|
|
|
+ file_kuban_api_annotations_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
|
+ switch v := v.(*McpOptions); i {
|
|
|
+ case 0:
|
|
|
+ return &v.state
|
|
|
+ case 1:
|
|
|
+ return &v.sizeCache
|
|
|
+ case 2:
|
|
|
+ return &v.unknownFields
|
|
|
+ default:
|
|
|
+ return nil
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
type x struct{}
|
|
|
out := protoimpl.TypeBuilder{
|
|
|
@@ -230,7 +307,7 @@ func file_kuban_api_annotations_proto_init() {
|
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
|
RawDescriptor: file_kuban_api_annotations_proto_rawDesc,
|
|
|
NumEnums: 0,
|
|
|
- NumMessages: 2,
|
|
|
+ NumMessages: 3,
|
|
|
NumExtensions: 1,
|
|
|
NumServices: 0,
|
|
|
},
|