divi 0.0.1.dev7__tar.gz → 0.0.1.dev9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/Makefile +3 -4
  2. divi-0.0.1.dev9/PKG-INFO +15 -0
  3. divi-0.0.1.dev9/core/proto/core.pb.go +74 -0
  4. {divi-0.0.1.dev7/divi/proto/core/v1/go → divi-0.0.1.dev9/core/proto}/core_grpc.pb.go +5 -5
  5. divi-0.0.1.dev9/core/proto/health.pb.go +215 -0
  6. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/divi/__init__.py +1 -1
  7. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/divi/core/run.py +2 -3
  8. divi-0.0.1.dev9/divi/proto/core.proto +12 -0
  9. divi-0.0.1.dev7/divi/proto/core/v1/health_check_request_pb2.py → divi-0.0.1.dev9/divi/proto/core_pb2.py +8 -7
  10. divi-0.0.1.dev9/divi/proto/core_pb2.pyi +5 -0
  11. {divi-0.0.1.dev7/divi/proto/core/v1 → divi-0.0.1.dev9/divi/proto}/core_pb2_grpc.py +12 -13
  12. divi-0.0.1.dev9/divi/proto/health.proto +12 -0
  13. divi-0.0.1.dev7/divi/proto/core/v1/health_check_response_pb2.py → divi-0.0.1.dev9/divi/proto/health_pb2.py +9 -7
  14. divi-0.0.1.dev7/divi/proto/core/v1/health_check_response_pb2.pyi → divi-0.0.1.dev9/divi/proto/health_pb2.pyi +6 -0
  15. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/hatch.toml +3 -0
  16. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/pyproject.toml +3 -8
  17. divi-0.0.1.dev9/scripts/hatch_build.py +47 -0
  18. divi-0.0.1.dev9/scripts/proto_build.py +53 -0
  19. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/uv.lock +57 -2
  20. divi-0.0.1.dev7/PKG-INFO +0 -33
  21. divi-0.0.1.dev7/core/proto/core.pb.go +0 -83
  22. divi-0.0.1.dev7/core/proto/core_grpc.pb.go +0 -125
  23. divi-0.0.1.dev7/core/proto/health_check_request.pb.go +0 -147
  24. divi-0.0.1.dev7/core/proto/health_check_response.pb.go +0 -156
  25. divi-0.0.1.dev7/divi/proto/core/v1/core.proto +0 -13
  26. divi-0.0.1.dev7/divi/proto/core/v1/core_pb2.py +0 -39
  27. divi-0.0.1.dev7/divi/proto/core/v1/core_pb2.pyi +0 -6
  28. divi-0.0.1.dev7/divi/proto/core/v1/go/core.pb.go +0 -83
  29. divi-0.0.1.dev7/divi/proto/core/v1/go/health_check_request.pb.go +0 -147
  30. divi-0.0.1.dev7/divi/proto/core/v1/go/health_check_response.pb.go +0 -156
  31. divi-0.0.1.dev7/divi/proto/core/v1/health_check_request.proto +0 -7
  32. divi-0.0.1.dev7/divi/proto/core/v1/health_check_request_pb2.pyi +0 -11
  33. divi-0.0.1.dev7/divi/proto/core/v1/health_check_request_pb2_grpc.py +0 -24
  34. divi-0.0.1.dev7/divi/proto/core/v1/health_check_response.proto +0 -10
  35. divi-0.0.1.dev7/divi/proto/core/v1/health_check_response_pb2_grpc.py +0 -24
  36. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/.gitignore +0 -0
  37. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/LICENSE +0 -0
  38. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/README.md +0 -0
  39. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/apps/README.md +0 -0
  40. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/core/README.md +0 -0
  41. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/core/go.mod +0 -0
  42. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/core/go.sum +0 -0
  43. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/core/main.go +0 -0
  44. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/divi/core/__init__.py +0 -0
  45. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/divi/core/finish.py +0 -0
  46. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/divi/core/init.py +0 -0
  47. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/divi/utils.py +0 -0
  48. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/docs/README.md +0 -0
  49. {divi-0.0.1.dev7 → divi-0.0.1.dev9/docs}/package_readme.md +0 -0
  50. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/go.work +0 -0
  51. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/go.work.sum +0 -0
  52. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/packages/README.md +0 -0
  53. {divi-0.0.1.dev7 → divi-0.0.1.dev9}/scripts/README.md +0 -0
@@ -3,16 +3,15 @@ all: build
3
3
  protobuf:
4
4
  protoc --go_out=. --go_opt=paths=source_relative \
5
5
  --go-grpc_out=. --go-grpc_opt=paths=source_relative \
6
- divi/proto/core/v1/health_check_response.proto
6
+ divi/proto/health_check_response.proto
7
7
 
8
- mv divi/proto/core/v1/*.go divi/proto/core/v1/go/
9
- cp divi/proto/core/v1/go/* core/proto/
8
+ mv divi/proto/v1/*.go core/proto/
10
9
 
11
10
  python3 -m grpc_tools.protoc -Idivi/proto=divi/proto \
12
11
  --python_out=. \
13
12
  --pyi_out=. \
14
13
  --grpc_python_out=. \
15
- divi/proto/core/v1/health_check_response.proto
14
+ divi/proto/health_check_response.proto
16
15
 
17
16
  build:
18
17
  cd core && go build -o ../divi/bin/core main.go
@@ -0,0 +1,15 @@
1
+ Metadata-Version: 2.4
2
+ Name: divi
3
+ Version: 0.0.1.dev9
4
+ Summary: The Agent Platform for Observability & Evaluation
5
+ License-File: LICENSE
6
+ Requires-Python: >=3.11
7
+ Requires-Dist: grpcio>=1.69.0
8
+ Requires-Dist: protobuf>=5.29.3
9
+ Description-Content-Type: text/markdown
10
+
11
+ # Divine Agent
12
+
13
+ Agent Platform for Observability • Evaluation • Playground
14
+
15
+ > The project is still in the development stage. 😇
@@ -0,0 +1,74 @@
1
+ // Code generated by protoc-gen-go. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-go v1.33.0
4
+ // protoc v5.29.0
5
+ // source: divi/proto/core.proto
6
+
7
+ package proto
8
+
9
+ import (
10
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12
+ reflect "reflect"
13
+ )
14
+
15
+ const (
16
+ // Verify that this generated code is sufficiently up-to-date.
17
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
19
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20
+ )
21
+
22
+ var File_divi_proto_core_proto protoreflect.FileDescriptor
23
+
24
+ var file_divi_proto_core_proto_rawDesc = []byte{
25
+ 0x0a, 0x15, 0x64, 0x69, 0x76, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x72,
26
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x17, 0x64,
27
+ 0x69, 0x76, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68,
28
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x46, 0x0a, 0x04, 0x43, 0x6f, 0x72, 0x65, 0x12, 0x3e,
29
+ 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48,
30
+ 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
31
+ 0x74, 0x1a, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43,
32
+ 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0c,
33
+ 0x5a, 0x0a, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72,
34
+ 0x6f, 0x74, 0x6f, 0x33,
35
+ }
36
+
37
+ var file_divi_proto_core_proto_goTypes = []interface{}{
38
+ (*HealthCheckRequest)(nil), // 0: core.HealthCheckRequest
39
+ (*HealthCheckResponse)(nil), // 1: core.HealthCheckResponse
40
+ }
41
+ var file_divi_proto_core_proto_depIdxs = []int32{
42
+ 0, // 0: core.Core.Check:input_type -> core.HealthCheckRequest
43
+ 1, // 1: core.Core.Check:output_type -> core.HealthCheckResponse
44
+ 1, // [1:2] is the sub-list for method output_type
45
+ 0, // [0:1] is the sub-list for method input_type
46
+ 0, // [0:0] is the sub-list for extension type_name
47
+ 0, // [0:0] is the sub-list for extension extendee
48
+ 0, // [0:0] is the sub-list for field type_name
49
+ }
50
+
51
+ func init() { file_divi_proto_core_proto_init() }
52
+ func file_divi_proto_core_proto_init() {
53
+ if File_divi_proto_core_proto != nil {
54
+ return
55
+ }
56
+ file_divi_proto_health_proto_init()
57
+ type x struct{}
58
+ out := protoimpl.TypeBuilder{
59
+ File: protoimpl.DescBuilder{
60
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
61
+ RawDescriptor: file_divi_proto_core_proto_rawDesc,
62
+ NumEnums: 0,
63
+ NumMessages: 0,
64
+ NumExtensions: 0,
65
+ NumServices: 1,
66
+ },
67
+ GoTypes: file_divi_proto_core_proto_goTypes,
68
+ DependencyIndexes: file_divi_proto_core_proto_depIdxs,
69
+ }.Build()
70
+ File_divi_proto_core_proto = out.File
71
+ file_divi_proto_core_proto_rawDesc = nil
72
+ file_divi_proto_core_proto_goTypes = nil
73
+ file_divi_proto_core_proto_depIdxs = nil
74
+ }
@@ -1,8 +1,8 @@
1
1
  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2
2
  // versions:
3
3
  // - protoc-gen-go-grpc v1.5.1
4
- // - protoc v4.23.4
5
- // source: divi/proto/core/v1/core.proto
4
+ // - protoc v5.29.0
5
+ // source: divi/proto/core.proto
6
6
 
7
7
  package proto
8
8
 
@@ -19,7 +19,7 @@ import (
19
19
  const _ = grpc.SupportPackageIsVersion9
20
20
 
21
21
  const (
22
- Core_Check_FullMethodName = "/core.v1.Core/Check"
22
+ Core_Check_FullMethodName = "/core.Core/Check"
23
23
  )
24
24
 
25
25
  // CoreClient is the client API for Core service.
@@ -112,7 +112,7 @@ func _Core_Check_Handler(srv interface{}, ctx context.Context, dec func(interfac
112
112
  // It's only intended for direct use with grpc.RegisterService,
113
113
  // and not to be introspected or modified (even as a copy)
114
114
  var Core_ServiceDesc = grpc.ServiceDesc{
115
- ServiceName: "core.v1.Core",
115
+ ServiceName: "core.Core",
116
116
  HandlerType: (*CoreServer)(nil),
117
117
  Methods: []grpc.MethodDesc{
118
118
  {
@@ -121,5 +121,5 @@ var Core_ServiceDesc = grpc.ServiceDesc{
121
121
  },
122
122
  },
123
123
  Streams: []grpc.StreamDesc{},
124
- Metadata: "divi/proto/core/v1/core.proto",
124
+ Metadata: "divi/proto/core.proto",
125
125
  }
@@ -0,0 +1,215 @@
1
+ // Code generated by protoc-gen-go. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-go v1.33.0
4
+ // protoc v5.29.0
5
+ // source: divi/proto/health.proto
6
+
7
+ package proto
8
+
9
+ import (
10
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12
+ reflect "reflect"
13
+ sync "sync"
14
+ )
15
+
16
+ const (
17
+ // Verify that this generated code is sufficiently up-to-date.
18
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
19
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
20
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
21
+ )
22
+
23
+ type HealthCheckRequest struct {
24
+ state protoimpl.MessageState
25
+ sizeCache protoimpl.SizeCache
26
+ unknownFields protoimpl.UnknownFields
27
+
28
+ Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
29
+ }
30
+
31
+ func (x *HealthCheckRequest) Reset() {
32
+ *x = HealthCheckRequest{}
33
+ if protoimpl.UnsafeEnabled {
34
+ mi := &file_divi_proto_health_proto_msgTypes[0]
35
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
36
+ ms.StoreMessageInfo(mi)
37
+ }
38
+ }
39
+
40
+ func (x *HealthCheckRequest) String() string {
41
+ return protoimpl.X.MessageStringOf(x)
42
+ }
43
+
44
+ func (*HealthCheckRequest) ProtoMessage() {}
45
+
46
+ func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message {
47
+ mi := &file_divi_proto_health_proto_msgTypes[0]
48
+ if protoimpl.UnsafeEnabled && x != nil {
49
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
50
+ if ms.LoadMessageInfo() == nil {
51
+ ms.StoreMessageInfo(mi)
52
+ }
53
+ return ms
54
+ }
55
+ return mi.MessageOf(x)
56
+ }
57
+
58
+ // Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
59
+ func (*HealthCheckRequest) Descriptor() ([]byte, []int) {
60
+ return file_divi_proto_health_proto_rawDescGZIP(), []int{0}
61
+ }
62
+
63
+ func (x *HealthCheckRequest) GetVersion() string {
64
+ if x != nil {
65
+ return x.Version
66
+ }
67
+ return ""
68
+ }
69
+
70
+ type HealthCheckResponse struct {
71
+ state protoimpl.MessageState
72
+ sizeCache protoimpl.SizeCache
73
+ unknownFields protoimpl.UnknownFields
74
+
75
+ Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
76
+ Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
77
+ }
78
+
79
+ func (x *HealthCheckResponse) Reset() {
80
+ *x = HealthCheckResponse{}
81
+ if protoimpl.UnsafeEnabled {
82
+ mi := &file_divi_proto_health_proto_msgTypes[1]
83
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
84
+ ms.StoreMessageInfo(mi)
85
+ }
86
+ }
87
+
88
+ func (x *HealthCheckResponse) String() string {
89
+ return protoimpl.X.MessageStringOf(x)
90
+ }
91
+
92
+ func (*HealthCheckResponse) ProtoMessage() {}
93
+
94
+ func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message {
95
+ mi := &file_divi_proto_health_proto_msgTypes[1]
96
+ if protoimpl.UnsafeEnabled && x != nil {
97
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
98
+ if ms.LoadMessageInfo() == nil {
99
+ ms.StoreMessageInfo(mi)
100
+ }
101
+ return ms
102
+ }
103
+ return mi.MessageOf(x)
104
+ }
105
+
106
+ // Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
107
+ func (*HealthCheckResponse) Descriptor() ([]byte, []int) {
108
+ return file_divi_proto_health_proto_rawDescGZIP(), []int{1}
109
+ }
110
+
111
+ func (x *HealthCheckResponse) GetStatus() bool {
112
+ if x != nil {
113
+ return x.Status
114
+ }
115
+ return false
116
+ }
117
+
118
+ func (x *HealthCheckResponse) GetMessage() string {
119
+ if x != nil {
120
+ return x.Message
121
+ }
122
+ return ""
123
+ }
124
+
125
+ var File_divi_proto_health_proto protoreflect.FileDescriptor
126
+
127
+ var file_divi_proto_health_proto_rawDesc = []byte{
128
+ 0x0a, 0x17, 0x64, 0x69, 0x76, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x61,
129
+ 0x6c, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x63, 0x6f, 0x72, 0x65, 0x22,
130
+ 0x2e, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
131
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
132
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22,
133
+ 0x47, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
134
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
135
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18,
136
+ 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
137
+ 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x0c, 0x5a, 0x0a, 0x63, 0x6f, 0x72, 0x65,
138
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
139
+ }
140
+
141
+ var (
142
+ file_divi_proto_health_proto_rawDescOnce sync.Once
143
+ file_divi_proto_health_proto_rawDescData = file_divi_proto_health_proto_rawDesc
144
+ )
145
+
146
+ func file_divi_proto_health_proto_rawDescGZIP() []byte {
147
+ file_divi_proto_health_proto_rawDescOnce.Do(func() {
148
+ file_divi_proto_health_proto_rawDescData = protoimpl.X.CompressGZIP(file_divi_proto_health_proto_rawDescData)
149
+ })
150
+ return file_divi_proto_health_proto_rawDescData
151
+ }
152
+
153
+ var file_divi_proto_health_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
154
+ var file_divi_proto_health_proto_goTypes = []interface{}{
155
+ (*HealthCheckRequest)(nil), // 0: core.HealthCheckRequest
156
+ (*HealthCheckResponse)(nil), // 1: core.HealthCheckResponse
157
+ }
158
+ var file_divi_proto_health_proto_depIdxs = []int32{
159
+ 0, // [0:0] is the sub-list for method output_type
160
+ 0, // [0:0] is the sub-list for method input_type
161
+ 0, // [0:0] is the sub-list for extension type_name
162
+ 0, // [0:0] is the sub-list for extension extendee
163
+ 0, // [0:0] is the sub-list for field type_name
164
+ }
165
+
166
+ func init() { file_divi_proto_health_proto_init() }
167
+ func file_divi_proto_health_proto_init() {
168
+ if File_divi_proto_health_proto != nil {
169
+ return
170
+ }
171
+ if !protoimpl.UnsafeEnabled {
172
+ file_divi_proto_health_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
173
+ switch v := v.(*HealthCheckRequest); i {
174
+ case 0:
175
+ return &v.state
176
+ case 1:
177
+ return &v.sizeCache
178
+ case 2:
179
+ return &v.unknownFields
180
+ default:
181
+ return nil
182
+ }
183
+ }
184
+ file_divi_proto_health_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
185
+ switch v := v.(*HealthCheckResponse); i {
186
+ case 0:
187
+ return &v.state
188
+ case 1:
189
+ return &v.sizeCache
190
+ case 2:
191
+ return &v.unknownFields
192
+ default:
193
+ return nil
194
+ }
195
+ }
196
+ }
197
+ type x struct{}
198
+ out := protoimpl.TypeBuilder{
199
+ File: protoimpl.DescBuilder{
200
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
201
+ RawDescriptor: file_divi_proto_health_proto_rawDesc,
202
+ NumEnums: 0,
203
+ NumMessages: 2,
204
+ NumExtensions: 0,
205
+ NumServices: 0,
206
+ },
207
+ GoTypes: file_divi_proto_health_proto_goTypes,
208
+ DependencyIndexes: file_divi_proto_health_proto_depIdxs,
209
+ MessageInfos: file_divi_proto_health_proto_msgTypes,
210
+ }.Build()
211
+ File_divi_proto_health_proto = out.File
212
+ file_divi_proto_health_proto_rawDesc = nil
213
+ file_divi_proto_health_proto_goTypes = nil
214
+ file_divi_proto_health_proto_depIdxs = nil
215
+ }
@@ -5,5 +5,5 @@ from . import proto
5
5
  name: str = "divi"
6
6
  run: Optional[Run] = None
7
7
 
8
- __version__ = "0.0.1.dev7"
8
+ __version__ = "0.0.1.dev9"
9
9
  __all__ = ["init", "finish", "proto"]
@@ -5,9 +5,8 @@ from typing import List, Optional, Callable
5
5
 
6
6
  import divi
7
7
 
8
- from divi.proto.core.v1.core_pb2_grpc import CoreStub
9
- from divi.proto.core.v1.health_check_request_pb2 import HealthCheckRequest
10
- from divi.proto.core.v1.health_check_response_pb2 import HealthCheckResponse
8
+ from divi.proto.core_pb2_grpc import CoreStub
9
+ from divi.proto.health_pb2 import HealthCheckRequest, HealthCheckResponse
11
10
 
12
11
 
13
12
  class Run:
@@ -0,0 +1,12 @@
1
+ syntax = "proto3";
2
+
3
+ package core;
4
+
5
+ import "divi/proto/health.proto";
6
+
7
+ option go_package = "core/proto";
8
+
9
+ // Health is a service that implements health check.
10
+ service Core {
11
+ rpc Check(HealthCheckRequest) returns (HealthCheckResponse) {}
12
+ }
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: divi/proto/core/v1/health_check_request.proto
4
+ # source: divi/proto/core.proto
5
5
  # Protobuf Python Version: 5.29.0
6
6
  """Generated protocol buffer code."""
7
7
  from google.protobuf import descriptor as _descriptor
@@ -15,23 +15,24 @@ _runtime_version.ValidateProtobufRuntimeVersion(
15
15
  29,
16
16
  0,
17
17
  '',
18
- 'divi/proto/core/v1/health_check_request.proto'
18
+ 'divi/proto/core.proto'
19
19
  )
20
20
  # @@protoc_insertion_point(imports)
21
21
 
22
22
  _sym_db = _symbol_database.Default()
23
23
 
24
24
 
25
+ from divi.proto import health_pb2 as divi_dot_proto_dot_health__pb2
25
26
 
26
27
 
27
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-divi/proto/core/v1/health_check_request.proto\x12\x07\x63ore.v1\"%\n\x12HealthCheckRequest\x12\x0f\n\x07version\x18\x01 \x01(\tB2Z0github.com/KaikaikaiFang/divine-agent/core/protob\x06proto3')
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x64ivi/proto/core.proto\x12\x04\x63ore\x1a\x17\x64ivi/proto/health.proto2F\n\x04\x43ore\x12>\n\x05\x43heck\x12\x18.core.HealthCheckRequest\x1a\x19.core.HealthCheckResponse\"\x00\x42\x0cZ\ncore/protob\x06proto3')
28
29
 
29
30
  _globals = globals()
30
31
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'divi.proto.core.v1.health_check_request_pb2', _globals)
32
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'divi.proto.core_pb2', _globals)
32
33
  if not _descriptor._USE_C_DESCRIPTORS:
33
34
  _globals['DESCRIPTOR']._loaded_options = None
34
- _globals['DESCRIPTOR']._serialized_options = b'Z0github.com/KaikaikaiFang/divine-agent/core/proto'
35
- _globals['_HEALTHCHECKREQUEST']._serialized_start=58
36
- _globals['_HEALTHCHECKREQUEST']._serialized_end=95
35
+ _globals['DESCRIPTOR']._serialized_options = b'Z\ncore/proto'
36
+ _globals['_CORE']._serialized_start=56
37
+ _globals['_CORE']._serialized_end=126
37
38
  # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,5 @@
1
+ from divi.proto import health_pb2 as _health_pb2
2
+ from google.protobuf import descriptor as _descriptor
3
+ from typing import ClassVar as _ClassVar
4
+
5
+ DESCRIPTOR: _descriptor.FileDescriptor
@@ -3,8 +3,7 @@
3
3
  import grpc
4
4
  import warnings
5
5
 
6
- from divi.proto.core.v1 import health_check_request_pb2 as divi_dot_proto_dot_core_dot_v1_dot_health__check__request__pb2
7
- from divi.proto.core.v1 import health_check_response_pb2 as divi_dot_proto_dot_core_dot_v1_dot_health__check__response__pb2
6
+ from divi.proto import health_pb2 as divi_dot_proto_dot_health__pb2
8
7
 
9
8
  GRPC_GENERATED_VERSION = '1.69.0'
10
9
  GRPC_VERSION = grpc.__version__
@@ -19,7 +18,7 @@ except ImportError:
19
18
  if _version_not_supported:
20
19
  raise RuntimeError(
21
20
  f'The grpc package installed is at version {GRPC_VERSION},'
22
- + f' but the generated code in divi/proto/core/v1/core_pb2_grpc.py depends on'
21
+ + f' but the generated code in divi/proto/core_pb2_grpc.py depends on'
23
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
24
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -37,9 +36,9 @@ class CoreStub(object):
37
36
  channel: A grpc.Channel.
38
37
  """
39
38
  self.Check = channel.unary_unary(
40
- '/core.v1.Core/Check',
41
- request_serializer=divi_dot_proto_dot_core_dot_v1_dot_health__check__request__pb2.HealthCheckRequest.SerializeToString,
42
- response_deserializer=divi_dot_proto_dot_core_dot_v1_dot_health__check__response__pb2.HealthCheckResponse.FromString,
39
+ '/core.Core/Check',
40
+ request_serializer=divi_dot_proto_dot_health__pb2.HealthCheckRequest.SerializeToString,
41
+ response_deserializer=divi_dot_proto_dot_health__pb2.HealthCheckResponse.FromString,
43
42
  _registered_method=True)
44
43
 
45
44
 
@@ -58,14 +57,14 @@ def add_CoreServicer_to_server(servicer, server):
58
57
  rpc_method_handlers = {
59
58
  'Check': grpc.unary_unary_rpc_method_handler(
60
59
  servicer.Check,
61
- request_deserializer=divi_dot_proto_dot_core_dot_v1_dot_health__check__request__pb2.HealthCheckRequest.FromString,
62
- response_serializer=divi_dot_proto_dot_core_dot_v1_dot_health__check__response__pb2.HealthCheckResponse.SerializeToString,
60
+ request_deserializer=divi_dot_proto_dot_health__pb2.HealthCheckRequest.FromString,
61
+ response_serializer=divi_dot_proto_dot_health__pb2.HealthCheckResponse.SerializeToString,
63
62
  ),
64
63
  }
65
64
  generic_handler = grpc.method_handlers_generic_handler(
66
- 'core.v1.Core', rpc_method_handlers)
65
+ 'core.Core', rpc_method_handlers)
67
66
  server.add_generic_rpc_handlers((generic_handler,))
68
- server.add_registered_method_handlers('core.v1.Core', rpc_method_handlers)
67
+ server.add_registered_method_handlers('core.Core', rpc_method_handlers)
69
68
 
70
69
 
71
70
  # This class is part of an EXPERIMENTAL API.
@@ -87,9 +86,9 @@ class Core(object):
87
86
  return grpc.experimental.unary_unary(
88
87
  request,
89
88
  target,
90
- '/core.v1.Core/Check',
91
- divi_dot_proto_dot_core_dot_v1_dot_health__check__request__pb2.HealthCheckRequest.SerializeToString,
92
- divi_dot_proto_dot_core_dot_v1_dot_health__check__response__pb2.HealthCheckResponse.FromString,
89
+ '/core.Core/Check',
90
+ divi_dot_proto_dot_health__pb2.HealthCheckRequest.SerializeToString,
91
+ divi_dot_proto_dot_health__pb2.HealthCheckResponse.FromString,
93
92
  options,
94
93
  channel_credentials,
95
94
  insecure,
@@ -0,0 +1,12 @@
1
+ syntax = "proto3";
2
+
3
+ package core;
4
+
5
+ option go_package = "core/proto";
6
+
7
+ message HealthCheckRequest { string version = 1; }
8
+
9
+ message HealthCheckResponse {
10
+ bool status = 1;
11
+ string message = 2;
12
+ }
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: divi/proto/core/v1/health_check_response.proto
4
+ # source: divi/proto/health.proto
5
5
  # Protobuf Python Version: 5.29.0
6
6
  """Generated protocol buffer code."""
7
7
  from google.protobuf import descriptor as _descriptor
@@ -15,7 +15,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
15
15
  29,
16
16
  0,
17
17
  '',
18
- 'divi/proto/core/v1/health_check_response.proto'
18
+ 'divi/proto/health.proto'
19
19
  )
20
20
  # @@protoc_insertion_point(imports)
21
21
 
@@ -24,14 +24,16 @@ _sym_db = _symbol_database.Default()
24
24
 
25
25
 
26
26
 
27
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.divi/proto/core/v1/health_check_response.proto\x12\x07\x63ore.v1\"6\n\x13HealthCheckResponse\x12\x0e\n\x06status\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\tB2Z0github.com/KaikaikaiFang/divine-agent/core/protob\x06proto3')
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x64ivi/proto/health.proto\x12\x04\x63ore\"%\n\x12HealthCheckRequest\x12\x0f\n\x07version\x18\x01 \x01(\t\"6\n\x13HealthCheckResponse\x12\x0e\n\x06status\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\tB\x0cZ\ncore/protob\x06proto3')
28
28
 
29
29
  _globals = globals()
30
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'divi.proto.core.v1.health_check_response_pb2', _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'divi.proto.health_pb2', _globals)
32
32
  if not _descriptor._USE_C_DESCRIPTORS:
33
33
  _globals['DESCRIPTOR']._loaded_options = None
34
- _globals['DESCRIPTOR']._serialized_options = b'Z0github.com/KaikaikaiFang/divine-agent/core/proto'
35
- _globals['_HEALTHCHECKRESPONSE']._serialized_start=59
36
- _globals['_HEALTHCHECKRESPONSE']._serialized_end=113
34
+ _globals['DESCRIPTOR']._serialized_options = b'Z\ncore/proto'
35
+ _globals['_HEALTHCHECKREQUEST']._serialized_start=33
36
+ _globals['_HEALTHCHECKREQUEST']._serialized_end=70
37
+ _globals['_HEALTHCHECKRESPONSE']._serialized_start=72
38
+ _globals['_HEALTHCHECKRESPONSE']._serialized_end=126
37
39
  # @@protoc_insertion_point(module_scope)
@@ -4,6 +4,12 @@ from typing import ClassVar as _ClassVar, Optional as _Optional
4
4
 
5
5
  DESCRIPTOR: _descriptor.FileDescriptor
6
6
 
7
+ class HealthCheckRequest(_message.Message):
8
+ __slots__ = ("version",)
9
+ VERSION_FIELD_NUMBER: _ClassVar[int]
10
+ version: str
11
+ def __init__(self, version: _Optional[str] = ...) -> None: ...
12
+
7
13
  class HealthCheckResponse(_message.Message):
8
14
  __slots__ = ("status", "message")
9
15
  STATUS_FIELD_NUMBER: _ClassVar[int]
@@ -4,3 +4,6 @@ path = "divi/__init__.py"
4
4
  [build.targets.wheel]
5
5
  exclude = ["divi/proto/core/v1/go"]
6
6
  artifacts = ["divi/bin"]
7
+
8
+ [build.targets.wheel.hooks.custom]
9
+ path = "scripts/hatch_build.py"
@@ -2,21 +2,16 @@
2
2
  name = "divi"
3
3
  dynamic = ["version"]
4
4
  description = "The Agent Platform for Observability & Evaluation"
5
- readme = "README.md"
5
+ readme = "docs/package_readme.md"
6
6
  requires-python = ">=3.11"
7
- dependencies = [
8
- "grpcio>=1.69.0",
9
- "protobuf>=5.29.3",
10
- ]
7
+ dependencies = ["grpcio>=1.69.0", "protobuf>=5.29.3"]
11
8
 
12
9
  [build-system]
13
10
  requires = ["hatchling"]
14
11
  build-backend = "hatchling.build"
15
12
 
16
13
  [dependency-groups]
17
- dev = [
18
- "grpcio-tools>=1.69.0",
19
- ]
14
+ dev = ["grpcio-tools>=1.69.0", "hatchling>=1.27.0"]
20
15
 
21
16
  [tool.pyright]
22
17
  venvPath = "."
@@ -0,0 +1,47 @@
1
+ import re
2
+ import sysconfig
3
+
4
+ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
5
+
6
+
7
+ class CustomBuildHook(BuildHookInterface):
8
+ def initialize(self, version, build_data):
9
+ build_data["tag"] = f"py3-none-{self._get_platform_tag()}"
10
+ build_data["pure_python"] = False
11
+
12
+ def _get_platform_tag(self) -> str:
13
+ """Returns the platform tag for the current platform."""
14
+ # Replace dots, spaces and dashes with underscores following
15
+ # https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#platform-tag
16
+ platform_tag = re.sub("[-. ]", "_", sysconfig.get_platform())
17
+
18
+ # On macOS versions >=11, pip expects the minor version to be 0:
19
+ # https://github.com/pypa/packaging/issues/435
20
+ #
21
+ # You can see the list of tags that pip would support on your machine
22
+ # using `pip debug --verbose`. On my macOS, get_platform() returns
23
+ # 14.1, but `pip debug --verbose` reports only these py3 tags with 14:
24
+ #
25
+ # * py3-none-macosx_14_0_arm64
26
+ # * py3-none-macosx_14_0_universal2
27
+ #
28
+ # We do this remapping here because otherwise, it's possible for `pip wheel`
29
+ # to successfully produce a wheel that you then cannot `pip install` on the
30
+ # same machine.
31
+ macos_match = re.fullmatch(r"macosx_(\d+_\d+)_(\w+)", platform_tag)
32
+ if macos_match:
33
+ major, _ = macos_match.group(1).split("_")
34
+ if int(major) >= 11:
35
+ arch = macos_match.group(2)
36
+ platform_tag = f"macosx_{major}_0_{arch}"
37
+
38
+ return self._to_compatibility_tag(platform_tag)
39
+
40
+ def _to_compatibility_tag(self, platform_tag: str) -> str:
41
+ """Converts a platform tag to a compatibility tag."""
42
+ # os: linux -> manylinux1
43
+ parts = platform_tag.split("_")
44
+ os = parts[0]
45
+ if os == "linux":
46
+ parts[0] = "manylinux1"
47
+ return "_".join(parts)