openshell 0.0.28__py3-none-macosx_13_0_arm64.whl

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.
openshell/__init__.py ADDED
@@ -0,0 +1,40 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """OpenShell - Agent execution and management SDK."""
5
+
6
+ from __future__ import annotations
7
+
8
+ from .sandbox import (
9
+ ClusterInferenceConfig,
10
+ ExecChunk,
11
+ ExecResult,
12
+ InferenceRouteClient,
13
+ Sandbox,
14
+ SandboxClient,
15
+ SandboxError,
16
+ SandboxRef,
17
+ SandboxSession,
18
+ TlsConfig,
19
+ )
20
+
21
+ try:
22
+ from importlib.metadata import version
23
+
24
+ __version__ = version("openshell")
25
+ except Exception:
26
+ __version__ = "0.0.0"
27
+
28
+ __all__ = [
29
+ "ClusterInferenceConfig",
30
+ "ExecChunk",
31
+ "ExecResult",
32
+ "InferenceRouteClient",
33
+ "Sandbox",
34
+ "SandboxClient",
35
+ "SandboxError",
36
+ "SandboxRef",
37
+ "SandboxSession",
38
+ "TlsConfig",
39
+ "__version__",
40
+ ]
File without changes
@@ -0,0 +1,74 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: datamodel.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'datamodel.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
26
+ from . import sandbox_pb2 as sandbox__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0f\x64\x61tamodel.proto\x12\x16openshell.datamodel.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\rsandbox.proto\"\x8c\x02\n\x07Sandbox\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\tnamespace\x18\x03 \x01(\t\x12\x31\n\x04spec\x18\x04 \x01(\x0b\x32#.openshell.datamodel.v1.SandboxSpec\x12\x35\n\x06status\x18\x05 \x01(\x0b\x32%.openshell.datamodel.v1.SandboxStatus\x12\x33\n\x05phase\x18\x06 \x01(\x0e\x32$.openshell.datamodel.v1.SandboxPhase\x12\x15\n\rcreated_at_ms\x18\x07 \x01(\x03\x12\x1e\n\x16\x63urrent_policy_version\x18\x08 \x01(\r\"\xaf\x02\n\x0bSandboxSpec\x12\x11\n\tlog_level\x18\x01 \x01(\t\x12I\n\x0b\x65nvironment\x18\x05 \x03(\x0b\x32\x34.openshell.datamodel.v1.SandboxSpec.EnvironmentEntry\x12\x39\n\x08template\x18\x06 \x01(\x0b\x32\'.openshell.datamodel.v1.SandboxTemplate\x12\x33\n\x06policy\x18\x07 \x01(\x0b\x32#.openshell.sandbox.v1.SandboxPolicy\x12\x11\n\tproviders\x18\x08 \x03(\t\x12\x0b\n\x03gpu\x18\t \x01(\x08\x1a\x32\n\x10\x45nvironmentEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb1\x04\n\x0fSandboxTemplate\x12\r\n\x05image\x18\x01 \x01(\t\x12\x1a\n\x12runtime_class_name\x18\x02 \x01(\t\x12\x14\n\x0c\x61gent_socket\x18\x03 \x01(\t\x12\x43\n\x06labels\x18\x04 \x03(\x0b\x32\x33.openshell.datamodel.v1.SandboxTemplate.LabelsEntry\x12M\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x38.openshell.datamodel.v1.SandboxTemplate.AnnotationsEntry\x12M\n\x0b\x65nvironment\x18\x06 \x03(\x0b\x32\x38.openshell.datamodel.v1.SandboxTemplate.EnvironmentEntry\x12*\n\tresources\x18\x07 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x37\n\x16volume_claim_templates\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x45nvironmentEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9c\x01\n\rSandboxStatus\x12\x14\n\x0csandbox_name\x18\x01 \x01(\t\x12\x11\n\tagent_pod\x18\x02 \x01(\t\x12\x10\n\x08\x61gent_fd\x18\x03 \x01(\t\x12\x12\n\nsandbox_fd\x18\x04 \x01(\t\x12<\n\nconditions\x18\x05 \x03(\x0b\x32(.openshell.datamodel.v1.SandboxCondition\"o\n\x10SandboxCondition\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0e\n\x06status\x18\x02 \x01(\t\x12\x0e\n\x06reason\x18\x03 \x01(\t\x12\x0f\n\x07message\x18\x04 \x01(\t\x12\x1c\n\x14last_transition_time\x18\x05 \x01(\t\"\x9b\x02\n\x08Provider\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x46\n\x0b\x63redentials\x18\x04 \x03(\x0b\x32\x31.openshell.datamodel.v1.Provider.CredentialsEntry\x12<\n\x06\x63onfig\x18\x05 \x03(\x0b\x32,.openshell.datamodel.v1.Provider.ConfigEntry\x1a\x32\n\x10\x43redentialsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0b\x43onfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01*\xb6\x01\n\x0cSandboxPhase\x12\x1d\n\x19SANDBOX_PHASE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aSANDBOX_PHASE_PROVISIONING\x10\x01\x12\x17\n\x13SANDBOX_PHASE_READY\x10\x02\x12\x17\n\x13SANDBOX_PHASE_ERROR\x10\x03\x12\x1a\n\x16SANDBOX_PHASE_DELETING\x10\x04\x12\x19\n\x15SANDBOX_PHASE_UNKNOWN\x10\x05\x62\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'datamodel_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ DESCRIPTOR._loaded_options = None
36
+ _globals['_SANDBOXSPEC_ENVIRONMENTENTRY']._loaded_options = None
37
+ _globals['_SANDBOXSPEC_ENVIRONMENTENTRY']._serialized_options = b'8\001'
38
+ _globals['_SANDBOXTEMPLATE_LABELSENTRY']._loaded_options = None
39
+ _globals['_SANDBOXTEMPLATE_LABELSENTRY']._serialized_options = b'8\001'
40
+ _globals['_SANDBOXTEMPLATE_ANNOTATIONSENTRY']._loaded_options = None
41
+ _globals['_SANDBOXTEMPLATE_ANNOTATIONSENTRY']._serialized_options = b'8\001'
42
+ _globals['_SANDBOXTEMPLATE_ENVIRONMENTENTRY']._loaded_options = None
43
+ _globals['_SANDBOXTEMPLATE_ENVIRONMENTENTRY']._serialized_options = b'8\001'
44
+ _globals['_PROVIDER_CREDENTIALSENTRY']._loaded_options = None
45
+ _globals['_PROVIDER_CREDENTIALSENTRY']._serialized_options = b'8\001'
46
+ _globals['_PROVIDER_CONFIGENTRY']._loaded_options = None
47
+ _globals['_PROVIDER_CONFIGENTRY']._serialized_options = b'8\001'
48
+ _globals['_SANDBOXPHASE']._serialized_start=1788
49
+ _globals['_SANDBOXPHASE']._serialized_end=1970
50
+ _globals['_SANDBOX']._serialized_start=89
51
+ _globals['_SANDBOX']._serialized_end=357
52
+ _globals['_SANDBOXSPEC']._serialized_start=360
53
+ _globals['_SANDBOXSPEC']._serialized_end=663
54
+ _globals['_SANDBOXSPEC_ENVIRONMENTENTRY']._serialized_start=613
55
+ _globals['_SANDBOXSPEC_ENVIRONMENTENTRY']._serialized_end=663
56
+ _globals['_SANDBOXTEMPLATE']._serialized_start=666
57
+ _globals['_SANDBOXTEMPLATE']._serialized_end=1227
58
+ _globals['_SANDBOXTEMPLATE_LABELSENTRY']._serialized_start=1078
59
+ _globals['_SANDBOXTEMPLATE_LABELSENTRY']._serialized_end=1123
60
+ _globals['_SANDBOXTEMPLATE_ANNOTATIONSENTRY']._serialized_start=1125
61
+ _globals['_SANDBOXTEMPLATE_ANNOTATIONSENTRY']._serialized_end=1175
62
+ _globals['_SANDBOXTEMPLATE_ENVIRONMENTENTRY']._serialized_start=613
63
+ _globals['_SANDBOXTEMPLATE_ENVIRONMENTENTRY']._serialized_end=663
64
+ _globals['_SANDBOXSTATUS']._serialized_start=1230
65
+ _globals['_SANDBOXSTATUS']._serialized_end=1386
66
+ _globals['_SANDBOXCONDITION']._serialized_start=1388
67
+ _globals['_SANDBOXCONDITION']._serialized_end=1499
68
+ _globals['_PROVIDER']._serialized_start=1502
69
+ _globals['_PROVIDER']._serialized_end=1785
70
+ _globals['_PROVIDER_CREDENTIALSENTRY']._serialized_start=1688
71
+ _globals['_PROVIDER_CREDENTIALSENTRY']._serialized_end=1738
72
+ _globals['_PROVIDER_CONFIGENTRY']._serialized_start=1740
73
+ _globals['_PROVIDER_CONFIGENTRY']._serialized_end=1785
74
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,165 @@
1
+ from google.protobuf import struct_pb2 as _struct_pb2
2
+ import sandbox_pb2 as _sandbox_pb2
3
+ from google.protobuf.internal import containers as _containers
4
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
8
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
9
+
10
+ DESCRIPTOR: _descriptor.FileDescriptor
11
+
12
+ class SandboxPhase(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
13
+ __slots__ = ()
14
+ SANDBOX_PHASE_UNSPECIFIED: _ClassVar[SandboxPhase]
15
+ SANDBOX_PHASE_PROVISIONING: _ClassVar[SandboxPhase]
16
+ SANDBOX_PHASE_READY: _ClassVar[SandboxPhase]
17
+ SANDBOX_PHASE_ERROR: _ClassVar[SandboxPhase]
18
+ SANDBOX_PHASE_DELETING: _ClassVar[SandboxPhase]
19
+ SANDBOX_PHASE_UNKNOWN: _ClassVar[SandboxPhase]
20
+ SANDBOX_PHASE_UNSPECIFIED: SandboxPhase
21
+ SANDBOX_PHASE_PROVISIONING: SandboxPhase
22
+ SANDBOX_PHASE_READY: SandboxPhase
23
+ SANDBOX_PHASE_ERROR: SandboxPhase
24
+ SANDBOX_PHASE_DELETING: SandboxPhase
25
+ SANDBOX_PHASE_UNKNOWN: SandboxPhase
26
+
27
+ class Sandbox(_message.Message):
28
+ __slots__ = ("id", "name", "namespace", "spec", "status", "phase", "created_at_ms", "current_policy_version")
29
+ ID_FIELD_NUMBER: _ClassVar[int]
30
+ NAME_FIELD_NUMBER: _ClassVar[int]
31
+ NAMESPACE_FIELD_NUMBER: _ClassVar[int]
32
+ SPEC_FIELD_NUMBER: _ClassVar[int]
33
+ STATUS_FIELD_NUMBER: _ClassVar[int]
34
+ PHASE_FIELD_NUMBER: _ClassVar[int]
35
+ CREATED_AT_MS_FIELD_NUMBER: _ClassVar[int]
36
+ CURRENT_POLICY_VERSION_FIELD_NUMBER: _ClassVar[int]
37
+ id: str
38
+ name: str
39
+ namespace: str
40
+ spec: SandboxSpec
41
+ status: SandboxStatus
42
+ phase: SandboxPhase
43
+ created_at_ms: int
44
+ current_policy_version: int
45
+ def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., namespace: _Optional[str] = ..., spec: _Optional[_Union[SandboxSpec, _Mapping]] = ..., status: _Optional[_Union[SandboxStatus, _Mapping]] = ..., phase: _Optional[_Union[SandboxPhase, str]] = ..., created_at_ms: _Optional[int] = ..., current_policy_version: _Optional[int] = ...) -> None: ...
46
+
47
+ class SandboxSpec(_message.Message):
48
+ __slots__ = ("log_level", "environment", "template", "policy", "providers", "gpu")
49
+ class EnvironmentEntry(_message.Message):
50
+ __slots__ = ("key", "value")
51
+ KEY_FIELD_NUMBER: _ClassVar[int]
52
+ VALUE_FIELD_NUMBER: _ClassVar[int]
53
+ key: str
54
+ value: str
55
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
56
+ LOG_LEVEL_FIELD_NUMBER: _ClassVar[int]
57
+ ENVIRONMENT_FIELD_NUMBER: _ClassVar[int]
58
+ TEMPLATE_FIELD_NUMBER: _ClassVar[int]
59
+ POLICY_FIELD_NUMBER: _ClassVar[int]
60
+ PROVIDERS_FIELD_NUMBER: _ClassVar[int]
61
+ GPU_FIELD_NUMBER: _ClassVar[int]
62
+ log_level: str
63
+ environment: _containers.ScalarMap[str, str]
64
+ template: SandboxTemplate
65
+ policy: _sandbox_pb2.SandboxPolicy
66
+ providers: _containers.RepeatedScalarFieldContainer[str]
67
+ gpu: bool
68
+ def __init__(self, log_level: _Optional[str] = ..., environment: _Optional[_Mapping[str, str]] = ..., template: _Optional[_Union[SandboxTemplate, _Mapping]] = ..., policy: _Optional[_Union[_sandbox_pb2.SandboxPolicy, _Mapping]] = ..., providers: _Optional[_Iterable[str]] = ..., gpu: bool = ...) -> None: ...
69
+
70
+ class SandboxTemplate(_message.Message):
71
+ __slots__ = ("image", "runtime_class_name", "agent_socket", "labels", "annotations", "environment", "resources", "volume_claim_templates")
72
+ class LabelsEntry(_message.Message):
73
+ __slots__ = ("key", "value")
74
+ KEY_FIELD_NUMBER: _ClassVar[int]
75
+ VALUE_FIELD_NUMBER: _ClassVar[int]
76
+ key: str
77
+ value: str
78
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
79
+ class AnnotationsEntry(_message.Message):
80
+ __slots__ = ("key", "value")
81
+ KEY_FIELD_NUMBER: _ClassVar[int]
82
+ VALUE_FIELD_NUMBER: _ClassVar[int]
83
+ key: str
84
+ value: str
85
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
86
+ class EnvironmentEntry(_message.Message):
87
+ __slots__ = ("key", "value")
88
+ KEY_FIELD_NUMBER: _ClassVar[int]
89
+ VALUE_FIELD_NUMBER: _ClassVar[int]
90
+ key: str
91
+ value: str
92
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
93
+ IMAGE_FIELD_NUMBER: _ClassVar[int]
94
+ RUNTIME_CLASS_NAME_FIELD_NUMBER: _ClassVar[int]
95
+ AGENT_SOCKET_FIELD_NUMBER: _ClassVar[int]
96
+ LABELS_FIELD_NUMBER: _ClassVar[int]
97
+ ANNOTATIONS_FIELD_NUMBER: _ClassVar[int]
98
+ ENVIRONMENT_FIELD_NUMBER: _ClassVar[int]
99
+ RESOURCES_FIELD_NUMBER: _ClassVar[int]
100
+ VOLUME_CLAIM_TEMPLATES_FIELD_NUMBER: _ClassVar[int]
101
+ image: str
102
+ runtime_class_name: str
103
+ agent_socket: str
104
+ labels: _containers.ScalarMap[str, str]
105
+ annotations: _containers.ScalarMap[str, str]
106
+ environment: _containers.ScalarMap[str, str]
107
+ resources: _struct_pb2.Struct
108
+ volume_claim_templates: _struct_pb2.Struct
109
+ def __init__(self, image: _Optional[str] = ..., runtime_class_name: _Optional[str] = ..., agent_socket: _Optional[str] = ..., labels: _Optional[_Mapping[str, str]] = ..., annotations: _Optional[_Mapping[str, str]] = ..., environment: _Optional[_Mapping[str, str]] = ..., resources: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., volume_claim_templates: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
110
+
111
+ class SandboxStatus(_message.Message):
112
+ __slots__ = ("sandbox_name", "agent_pod", "agent_fd", "sandbox_fd", "conditions")
113
+ SANDBOX_NAME_FIELD_NUMBER: _ClassVar[int]
114
+ AGENT_POD_FIELD_NUMBER: _ClassVar[int]
115
+ AGENT_FD_FIELD_NUMBER: _ClassVar[int]
116
+ SANDBOX_FD_FIELD_NUMBER: _ClassVar[int]
117
+ CONDITIONS_FIELD_NUMBER: _ClassVar[int]
118
+ sandbox_name: str
119
+ agent_pod: str
120
+ agent_fd: str
121
+ sandbox_fd: str
122
+ conditions: _containers.RepeatedCompositeFieldContainer[SandboxCondition]
123
+ def __init__(self, sandbox_name: _Optional[str] = ..., agent_pod: _Optional[str] = ..., agent_fd: _Optional[str] = ..., sandbox_fd: _Optional[str] = ..., conditions: _Optional[_Iterable[_Union[SandboxCondition, _Mapping]]] = ...) -> None: ...
124
+
125
+ class SandboxCondition(_message.Message):
126
+ __slots__ = ("type", "status", "reason", "message", "last_transition_time")
127
+ TYPE_FIELD_NUMBER: _ClassVar[int]
128
+ STATUS_FIELD_NUMBER: _ClassVar[int]
129
+ REASON_FIELD_NUMBER: _ClassVar[int]
130
+ MESSAGE_FIELD_NUMBER: _ClassVar[int]
131
+ LAST_TRANSITION_TIME_FIELD_NUMBER: _ClassVar[int]
132
+ type: str
133
+ status: str
134
+ reason: str
135
+ message: str
136
+ last_transition_time: str
137
+ def __init__(self, type: _Optional[str] = ..., status: _Optional[str] = ..., reason: _Optional[str] = ..., message: _Optional[str] = ..., last_transition_time: _Optional[str] = ...) -> None: ...
138
+
139
+ class Provider(_message.Message):
140
+ __slots__ = ("id", "name", "type", "credentials", "config")
141
+ class CredentialsEntry(_message.Message):
142
+ __slots__ = ("key", "value")
143
+ KEY_FIELD_NUMBER: _ClassVar[int]
144
+ VALUE_FIELD_NUMBER: _ClassVar[int]
145
+ key: str
146
+ value: str
147
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
148
+ class ConfigEntry(_message.Message):
149
+ __slots__ = ("key", "value")
150
+ KEY_FIELD_NUMBER: _ClassVar[int]
151
+ VALUE_FIELD_NUMBER: _ClassVar[int]
152
+ key: str
153
+ value: str
154
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
155
+ ID_FIELD_NUMBER: _ClassVar[int]
156
+ NAME_FIELD_NUMBER: _ClassVar[int]
157
+ TYPE_FIELD_NUMBER: _ClassVar[int]
158
+ CREDENTIALS_FIELD_NUMBER: _ClassVar[int]
159
+ CONFIG_FIELD_NUMBER: _ClassVar[int]
160
+ id: str
161
+ name: str
162
+ type: str
163
+ credentials: _containers.ScalarMap[str, str]
164
+ config: _containers.ScalarMap[str, str]
165
+ def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., type: _Optional[str] = ..., credentials: _Optional[_Mapping[str, str]] = ..., config: _Optional[_Mapping[str, str]] = ...) -> None: ...
@@ -0,0 +1,24 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+
7
+ GRPC_GENERATED_VERSION = '1.78.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + ' but the generated code in datamodel_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )
@@ -0,0 +1,56 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: inference.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'inference.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0finference.proto\x12\x16openshell.inference.v1\"W\n\x16\x43lusterInferenceConfig\x12\x15\n\rprovider_name\x18\x01 \x01(\t\x12\x10\n\x08model_id\x18\x02 \x01(\t\x12\x14\n\x0ctimeout_secs\x18\x03 \x01(\x04\"{\n\x0eInferenceRoute\x12\n\n\x02id\x18\x01 \x01(\t\x12>\n\x06\x63onfig\x18\x02 \x01(\x0b\x32..openshell.inference.v1.ClusterInferenceConfig\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\x04\"\x92\x01\n\x1aSetClusterInferenceRequest\x12\x15\n\rprovider_name\x18\x01 \x01(\t\x12\x10\n\x08model_id\x18\x02 \x01(\t\x12\x12\n\nroute_name\x18\x03 \x01(\t\x12\x0e\n\x06verify\x18\x04 \x01(\x08\x12\x11\n\tno_verify\x18\x05 \x01(\x08\x12\x14\n\x0ctimeout_secs\x18\x06 \x01(\x04\"2\n\x11ValidatedEndpoint\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x10\n\x08protocol\x18\x02 \x01(\t\"\xe7\x01\n\x1bSetClusterInferenceResponse\x12\x15\n\rprovider_name\x18\x01 \x01(\t\x12\x10\n\x08model_id\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x04\x12\x12\n\nroute_name\x18\x04 \x01(\t\x12\x1c\n\x14validation_performed\x18\x05 \x01(\x08\x12\x46\n\x13validated_endpoints\x18\x06 \x03(\x0b\x32).openshell.inference.v1.ValidatedEndpoint\x12\x14\n\x0ctimeout_secs\x18\x07 \x01(\x04\"0\n\x1aGetClusterInferenceRequest\x12\x12\n\nroute_name\x18\x01 \x01(\t\"\x81\x01\n\x1bGetClusterInferenceResponse\x12\x15\n\rprovider_name\x18\x01 \x01(\t\x12\x10\n\x08model_id\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\x04\x12\x12\n\nroute_name\x18\x04 \x01(\t\x12\x14\n\x0ctimeout_secs\x18\x05 \x01(\x04\"\x1b\n\x19GetInferenceBundleRequest\"\x92\x01\n\rResolvedRoute\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08\x62\x61se_url\x18\x02 \x01(\t\x12\x11\n\tprotocols\x18\x03 \x03(\t\x12\x0f\n\x07\x61pi_key\x18\x04 \x01(\t\x12\x10\n\x08model_id\x18\x05 \x01(\t\x12\x15\n\rprovider_type\x18\x06 \x01(\t\x12\x14\n\x0ctimeout_secs\x18\x07 \x01(\x04\"~\n\x1aGetInferenceBundleResponse\x12\x35\n\x06routes\x18\x01 \x03(\x0b\x32%.openshell.inference.v1.ResolvedRoute\x12\x10\n\x08revision\x18\x02 \x01(\t\x12\x17\n\x0fgenerated_at_ms\x18\x03 \x01(\x03\x32\x88\x03\n\tInference\x12{\n\x12GetInferenceBundle\x12\x31.openshell.inference.v1.GetInferenceBundleRequest\x1a\x32.openshell.inference.v1.GetInferenceBundleResponse\x12~\n\x13SetClusterInference\x12\x32.openshell.inference.v1.SetClusterInferenceRequest\x1a\x33.openshell.inference.v1.SetClusterInferenceResponse\x12~\n\x13GetClusterInference\x12\x32.openshell.inference.v1.GetClusterInferenceRequest\x1a\x33.openshell.inference.v1.GetClusterInferenceResponseb\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'inference_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ DESCRIPTOR._loaded_options = None
34
+ _globals['_CLUSTERINFERENCECONFIG']._serialized_start=43
35
+ _globals['_CLUSTERINFERENCECONFIG']._serialized_end=130
36
+ _globals['_INFERENCEROUTE']._serialized_start=132
37
+ _globals['_INFERENCEROUTE']._serialized_end=255
38
+ _globals['_SETCLUSTERINFERENCEREQUEST']._serialized_start=258
39
+ _globals['_SETCLUSTERINFERENCEREQUEST']._serialized_end=404
40
+ _globals['_VALIDATEDENDPOINT']._serialized_start=406
41
+ _globals['_VALIDATEDENDPOINT']._serialized_end=456
42
+ _globals['_SETCLUSTERINFERENCERESPONSE']._serialized_start=459
43
+ _globals['_SETCLUSTERINFERENCERESPONSE']._serialized_end=690
44
+ _globals['_GETCLUSTERINFERENCEREQUEST']._serialized_start=692
45
+ _globals['_GETCLUSTERINFERENCEREQUEST']._serialized_end=740
46
+ _globals['_GETCLUSTERINFERENCERESPONSE']._serialized_start=743
47
+ _globals['_GETCLUSTERINFERENCERESPONSE']._serialized_end=872
48
+ _globals['_GETINFERENCEBUNDLEREQUEST']._serialized_start=874
49
+ _globals['_GETINFERENCEBUNDLEREQUEST']._serialized_end=901
50
+ _globals['_RESOLVEDROUTE']._serialized_start=904
51
+ _globals['_RESOLVEDROUTE']._serialized_end=1050
52
+ _globals['_GETINFERENCEBUNDLERESPONSE']._serialized_start=1052
53
+ _globals['_GETINFERENCEBUNDLERESPONSE']._serialized_end=1178
54
+ _globals['_INFERENCE']._serialized_start=1181
55
+ _globals['_INFERENCE']._serialized_end=1573
56
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,123 @@
1
+ from google.protobuf.internal import containers as _containers
2
+ from google.protobuf import descriptor as _descriptor
3
+ from google.protobuf import message as _message
4
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
5
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
6
+
7
+ DESCRIPTOR: _descriptor.FileDescriptor
8
+
9
+ class ClusterInferenceConfig(_message.Message):
10
+ __slots__ = ("provider_name", "model_id", "timeout_secs")
11
+ PROVIDER_NAME_FIELD_NUMBER: _ClassVar[int]
12
+ MODEL_ID_FIELD_NUMBER: _ClassVar[int]
13
+ TIMEOUT_SECS_FIELD_NUMBER: _ClassVar[int]
14
+ provider_name: str
15
+ model_id: str
16
+ timeout_secs: int
17
+ def __init__(self, provider_name: _Optional[str] = ..., model_id: _Optional[str] = ..., timeout_secs: _Optional[int] = ...) -> None: ...
18
+
19
+ class InferenceRoute(_message.Message):
20
+ __slots__ = ("id", "config", "name", "version")
21
+ ID_FIELD_NUMBER: _ClassVar[int]
22
+ CONFIG_FIELD_NUMBER: _ClassVar[int]
23
+ NAME_FIELD_NUMBER: _ClassVar[int]
24
+ VERSION_FIELD_NUMBER: _ClassVar[int]
25
+ id: str
26
+ config: ClusterInferenceConfig
27
+ name: str
28
+ version: int
29
+ def __init__(self, id: _Optional[str] = ..., config: _Optional[_Union[ClusterInferenceConfig, _Mapping]] = ..., name: _Optional[str] = ..., version: _Optional[int] = ...) -> None: ...
30
+
31
+ class SetClusterInferenceRequest(_message.Message):
32
+ __slots__ = ("provider_name", "model_id", "route_name", "verify", "no_verify", "timeout_secs")
33
+ PROVIDER_NAME_FIELD_NUMBER: _ClassVar[int]
34
+ MODEL_ID_FIELD_NUMBER: _ClassVar[int]
35
+ ROUTE_NAME_FIELD_NUMBER: _ClassVar[int]
36
+ VERIFY_FIELD_NUMBER: _ClassVar[int]
37
+ NO_VERIFY_FIELD_NUMBER: _ClassVar[int]
38
+ TIMEOUT_SECS_FIELD_NUMBER: _ClassVar[int]
39
+ provider_name: str
40
+ model_id: str
41
+ route_name: str
42
+ verify: bool
43
+ no_verify: bool
44
+ timeout_secs: int
45
+ def __init__(self, provider_name: _Optional[str] = ..., model_id: _Optional[str] = ..., route_name: _Optional[str] = ..., verify: bool = ..., no_verify: bool = ..., timeout_secs: _Optional[int] = ...) -> None: ...
46
+
47
+ class ValidatedEndpoint(_message.Message):
48
+ __slots__ = ("url", "protocol")
49
+ URL_FIELD_NUMBER: _ClassVar[int]
50
+ PROTOCOL_FIELD_NUMBER: _ClassVar[int]
51
+ url: str
52
+ protocol: str
53
+ def __init__(self, url: _Optional[str] = ..., protocol: _Optional[str] = ...) -> None: ...
54
+
55
+ class SetClusterInferenceResponse(_message.Message):
56
+ __slots__ = ("provider_name", "model_id", "version", "route_name", "validation_performed", "validated_endpoints", "timeout_secs")
57
+ PROVIDER_NAME_FIELD_NUMBER: _ClassVar[int]
58
+ MODEL_ID_FIELD_NUMBER: _ClassVar[int]
59
+ VERSION_FIELD_NUMBER: _ClassVar[int]
60
+ ROUTE_NAME_FIELD_NUMBER: _ClassVar[int]
61
+ VALIDATION_PERFORMED_FIELD_NUMBER: _ClassVar[int]
62
+ VALIDATED_ENDPOINTS_FIELD_NUMBER: _ClassVar[int]
63
+ TIMEOUT_SECS_FIELD_NUMBER: _ClassVar[int]
64
+ provider_name: str
65
+ model_id: str
66
+ version: int
67
+ route_name: str
68
+ validation_performed: bool
69
+ validated_endpoints: _containers.RepeatedCompositeFieldContainer[ValidatedEndpoint]
70
+ timeout_secs: int
71
+ def __init__(self, provider_name: _Optional[str] = ..., model_id: _Optional[str] = ..., version: _Optional[int] = ..., route_name: _Optional[str] = ..., validation_performed: bool = ..., validated_endpoints: _Optional[_Iterable[_Union[ValidatedEndpoint, _Mapping]]] = ..., timeout_secs: _Optional[int] = ...) -> None: ...
72
+
73
+ class GetClusterInferenceRequest(_message.Message):
74
+ __slots__ = ("route_name",)
75
+ ROUTE_NAME_FIELD_NUMBER: _ClassVar[int]
76
+ route_name: str
77
+ def __init__(self, route_name: _Optional[str] = ...) -> None: ...
78
+
79
+ class GetClusterInferenceResponse(_message.Message):
80
+ __slots__ = ("provider_name", "model_id", "version", "route_name", "timeout_secs")
81
+ PROVIDER_NAME_FIELD_NUMBER: _ClassVar[int]
82
+ MODEL_ID_FIELD_NUMBER: _ClassVar[int]
83
+ VERSION_FIELD_NUMBER: _ClassVar[int]
84
+ ROUTE_NAME_FIELD_NUMBER: _ClassVar[int]
85
+ TIMEOUT_SECS_FIELD_NUMBER: _ClassVar[int]
86
+ provider_name: str
87
+ model_id: str
88
+ version: int
89
+ route_name: str
90
+ timeout_secs: int
91
+ def __init__(self, provider_name: _Optional[str] = ..., model_id: _Optional[str] = ..., version: _Optional[int] = ..., route_name: _Optional[str] = ..., timeout_secs: _Optional[int] = ...) -> None: ...
92
+
93
+ class GetInferenceBundleRequest(_message.Message):
94
+ __slots__ = ()
95
+ def __init__(self) -> None: ...
96
+
97
+ class ResolvedRoute(_message.Message):
98
+ __slots__ = ("name", "base_url", "protocols", "api_key", "model_id", "provider_type", "timeout_secs")
99
+ NAME_FIELD_NUMBER: _ClassVar[int]
100
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
101
+ PROTOCOLS_FIELD_NUMBER: _ClassVar[int]
102
+ API_KEY_FIELD_NUMBER: _ClassVar[int]
103
+ MODEL_ID_FIELD_NUMBER: _ClassVar[int]
104
+ PROVIDER_TYPE_FIELD_NUMBER: _ClassVar[int]
105
+ TIMEOUT_SECS_FIELD_NUMBER: _ClassVar[int]
106
+ name: str
107
+ base_url: str
108
+ protocols: _containers.RepeatedScalarFieldContainer[str]
109
+ api_key: str
110
+ model_id: str
111
+ provider_type: str
112
+ timeout_secs: int
113
+ def __init__(self, name: _Optional[str] = ..., base_url: _Optional[str] = ..., protocols: _Optional[_Iterable[str]] = ..., api_key: _Optional[str] = ..., model_id: _Optional[str] = ..., provider_type: _Optional[str] = ..., timeout_secs: _Optional[int] = ...) -> None: ...
114
+
115
+ class GetInferenceBundleResponse(_message.Message):
116
+ __slots__ = ("routes", "revision", "generated_at_ms")
117
+ ROUTES_FIELD_NUMBER: _ClassVar[int]
118
+ REVISION_FIELD_NUMBER: _ClassVar[int]
119
+ GENERATED_AT_MS_FIELD_NUMBER: _ClassVar[int]
120
+ routes: _containers.RepeatedCompositeFieldContainer[ResolvedRoute]
121
+ revision: str
122
+ generated_at_ms: int
123
+ def __init__(self, routes: _Optional[_Iterable[_Union[ResolvedRoute, _Mapping]]] = ..., revision: _Optional[str] = ..., generated_at_ms: _Optional[int] = ...) -> None: ...