cap-sdk-python 2.0.6__tar.gz → 2.0.11__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.
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/PKG-INFO +6 -6
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/README.md +3 -3
- cap_sdk_python-2.0.11/cap/__init__.py +30 -0
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/cap/client.py +1 -1
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/cap/pb/__init__.py +1 -1
- {cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/agent/v1/alert_pb2.py +7 -7
- {cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/agent/v1/alert_pb2_grpc.py +1 -1
- cap_sdk_python-2.0.11/cap/pb/cordum/agent/v1/buspacket_pb2.py +41 -0
- {cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/agent/v1/buspacket_pb2_grpc.py +1 -1
- cap_sdk_python-2.0.11/cap/pb/cordum/agent/v1/heartbeat_pb2.py +41 -0
- {cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/agent/v1/heartbeat_pb2_grpc.py +1 -1
- cap_sdk_python-2.0.11/cap/pb/cordum/agent/v1/job_pb2.py +67 -0
- {cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/agent/v1/job_pb2_grpc.py +1 -1
- cap_sdk_python-2.0.11/cap/pb/cordum/agent/v1/safety_pb2.py +62 -0
- cap_sdk_python-2.0.11/cap/pb/cordum/agent/v1/safety_pb2_grpc.py +272 -0
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/cap/worker.py +1 -1
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/cap_sdk_python.egg-info/PKG-INFO +6 -6
- cap_sdk_python-2.0.11/cap_sdk_python.egg-info/SOURCES.txt +26 -0
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/pyproject.toml +3 -3
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/tests/test_sdk.py +2 -2
- cap_sdk_python-2.0.6/cap/__init__.py +0 -5
- cap_sdk_python-2.0.6/cap/pb/coretex/agent/v1/buspacket_pb2.py +0 -41
- cap_sdk_python-2.0.6/cap/pb/coretex/agent/v1/heartbeat_pb2.py +0 -41
- cap_sdk_python-2.0.6/cap/pb/coretex/agent/v1/job_pb2.py +0 -55
- cap_sdk_python-2.0.6/cap/pb/coretex/agent/v1/safety_pb2.py +0 -48
- cap_sdk_python-2.0.6/cap/pb/coretex/agent/v1/safety_pb2_grpc.py +0 -100
- cap_sdk_python-2.0.6/cap_sdk_python.egg-info/SOURCES.txt +0 -26
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/cap/bus.py +0 -0
- {cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/__init__.py +0 -0
- {cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/agent/__init__.py +0 -0
- {cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/agent/v1/__init__.py +0 -0
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/cap_sdk_python.egg-info/dependency_links.txt +0 -0
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/cap_sdk_python.egg-info/requires.txt +0 -0
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/cap_sdk_python.egg-info/top_level.txt +0 -0
- {cap_sdk_python-2.0.6 → cap_sdk_python-2.0.11}/setup.cfg +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cap-sdk-python
|
|
3
|
-
Version: 2.0.
|
|
4
|
-
Summary: CAP (
|
|
5
|
-
Project-URL: Homepage, https://github.com/
|
|
3
|
+
Version: 2.0.11
|
|
4
|
+
Summary: CAP (Cordum Agent Protocol) Python SDK
|
|
5
|
+
Project-URL: Homepage, https://github.com/cordum-io/cap
|
|
6
6
|
Requires-Python: >=3.9
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Requires-Dist: protobuf>=4.25.0
|
|
@@ -20,7 +20,7 @@ Asyncio-first SDK with NATS helpers for CAP workers and clients.
|
|
|
20
20
|
-I../../proto \
|
|
21
21
|
--python_out=./cap/pb \
|
|
22
22
|
--grpc_python_out=./cap/pb \
|
|
23
|
-
../../proto/
|
|
23
|
+
../../proto/cordum/agent/v1/*.proto
|
|
24
24
|
```
|
|
25
25
|
(Or run `./tools/make_protos.sh` from repo root with `CAP_RUN_PY=1` and copy `/python` into `sdk/python/cap/pb` if you want vendored stubs.)
|
|
26
26
|
|
|
@@ -33,7 +33,7 @@ Asyncio-first SDK with NATS helpers for CAP workers and clients.
|
|
|
33
33
|
```python
|
|
34
34
|
import asyncio
|
|
35
35
|
from cap import worker
|
|
36
|
-
from cap.pb.
|
|
36
|
+
from cap.pb.cordum.agent.v1 import job_pb2
|
|
37
37
|
|
|
38
38
|
async def handle(req: job_pb2.JobRequest):
|
|
39
39
|
return job_pb2.JobResult(
|
|
@@ -51,7 +51,7 @@ Asyncio-first SDK with NATS helpers for CAP workers and clients.
|
|
|
51
51
|
import asyncio
|
|
52
52
|
from cryptography.hazmat.primitives.asymmetric import ec
|
|
53
53
|
from cap import client
|
|
54
|
-
from cap.pb.
|
|
54
|
+
from cap.pb.cordum.agent.v1 import job_pb2
|
|
55
55
|
import nats
|
|
56
56
|
|
|
57
57
|
async def main():
|
|
@@ -9,7 +9,7 @@ Asyncio-first SDK with NATS helpers for CAP workers and clients.
|
|
|
9
9
|
-I../../proto \
|
|
10
10
|
--python_out=./cap/pb \
|
|
11
11
|
--grpc_python_out=./cap/pb \
|
|
12
|
-
../../proto/
|
|
12
|
+
../../proto/cordum/agent/v1/*.proto
|
|
13
13
|
```
|
|
14
14
|
(Or run `./tools/make_protos.sh` from repo root with `CAP_RUN_PY=1` and copy `/python` into `sdk/python/cap/pb` if you want vendored stubs.)
|
|
15
15
|
|
|
@@ -22,7 +22,7 @@ Asyncio-first SDK with NATS helpers for CAP workers and clients.
|
|
|
22
22
|
```python
|
|
23
23
|
import asyncio
|
|
24
24
|
from cap import worker
|
|
25
|
-
from cap.pb.
|
|
25
|
+
from cap.pb.cordum.agent.v1 import job_pb2
|
|
26
26
|
|
|
27
27
|
async def handle(req: job_pb2.JobRequest):
|
|
28
28
|
return job_pb2.JobResult(
|
|
@@ -40,7 +40,7 @@ Asyncio-first SDK with NATS helpers for CAP workers and clients.
|
|
|
40
40
|
import asyncio
|
|
41
41
|
from cryptography.hazmat.primitives.asymmetric import ec
|
|
42
42
|
from cap import client
|
|
43
|
-
from cap.pb.
|
|
43
|
+
from cap.pb.cordum.agent.v1 import job_pb2
|
|
44
44
|
import nats
|
|
45
45
|
|
|
46
46
|
async def main():
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import types
|
|
3
|
+
|
|
4
|
+
try:
|
|
5
|
+
from google.protobuf import runtime_version as _runtime_version # noqa: F401
|
|
6
|
+
except Exception:
|
|
7
|
+
try:
|
|
8
|
+
import google.protobuf as _protobuf
|
|
9
|
+
except Exception:
|
|
10
|
+
_protobuf = None
|
|
11
|
+
|
|
12
|
+
_shim = types.SimpleNamespace()
|
|
13
|
+
|
|
14
|
+
class _Domain:
|
|
15
|
+
PUBLIC = 0
|
|
16
|
+
|
|
17
|
+
def _validate(*_args, **_kwargs):
|
|
18
|
+
return None
|
|
19
|
+
|
|
20
|
+
_shim.Domain = _Domain
|
|
21
|
+
_shim.ValidateProtobufRuntimeVersion = _validate
|
|
22
|
+
sys.modules["google.protobuf.runtime_version"] = _shim
|
|
23
|
+
if _protobuf is not None:
|
|
24
|
+
setattr(_protobuf, "runtime_version", _shim)
|
|
25
|
+
|
|
26
|
+
from .client import submit_job
|
|
27
|
+
from .worker import run_worker
|
|
28
|
+
from .bus import connect_nats
|
|
29
|
+
|
|
30
|
+
__all__ = ["submit_job", "run_worker", "connect_nats"]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from google.protobuf import timestamp_pb2
|
|
2
|
-
from cap.pb.
|
|
2
|
+
from cap.pb.cordum.agent.v1 import buspacket_pb2
|
|
3
3
|
from cryptography.hazmat.primitives.asymmetric import ec
|
|
4
4
|
from cryptography.hazmat.primitives import hashes
|
|
5
5
|
from typing import Optional
|
{cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/agent/v1/alert_pb2.py
RENAMED
|
@@ -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:
|
|
4
|
+
# source: cordum/agent/v1/alert.proto
|
|
5
5
|
# Protobuf Python Version: 6.31.1
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
@@ -15,7 +15,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
|
15
15
|
31,
|
|
16
16
|
1,
|
|
17
17
|
'',
|
|
18
|
-
'
|
|
18
|
+
'cordum/agent/v1/alert.proto'
|
|
19
19
|
)
|
|
20
20
|
# @@protoc_insertion_point(imports)
|
|
21
21
|
|
|
@@ -24,14 +24,14 @@ _sym_db = _symbol_database.Default()
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x63ordum/agent/v1/alert.proto\x12\x0f\x63ordum.agent.v1\"N\n\x0bSystemAlert\x12\r\n\x05level\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x11\n\tcomponent\x18\x03 \x01(\t\x12\x0c\n\x04\x63ode\x18\x04 \x01(\tB\x7f\n\x16io.cordum.cap.agent.v1P\x01Z+github.com/cordum-io/cap/v2/cordum/agent/v1\xaa\x02\x0f\x43ordum.Agent.V1\xca\x02\x0f\x63ordum\\Agent\\V1\xea\x02\x11\x43ordum::Agent::V1b\x06proto3')
|
|
28
28
|
|
|
29
29
|
_globals = globals()
|
|
30
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, '
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cordum.agent.v1.alert_pb2', _globals)
|
|
32
32
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
33
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
-
_globals['DESCRIPTOR']._serialized_options = b'\n\
|
|
35
|
-
_globals['_SYSTEMALERT']._serialized_start=
|
|
36
|
-
_globals['_SYSTEMALERT']._serialized_end=
|
|
34
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\026io.cordum.cap.agent.v1P\001Z+github.com/cordum-io/cap/v2/cordum/agent/v1\252\002\017Cordum.Agent.V1\312\002\017cordum\\Agent\\V1\352\002\021Cordum::Agent::V1'
|
|
35
|
+
_globals['_SYSTEMALERT']._serialized_start=48
|
|
36
|
+
_globals['_SYSTEMALERT']._serialized_end=126
|
|
37
37
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -17,7 +17,7 @@ except ImportError:
|
|
|
17
17
|
if _version_not_supported:
|
|
18
18
|
raise RuntimeError(
|
|
19
19
|
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
-
+ ' but the generated code in
|
|
20
|
+
+ ' but the generated code in cordum/agent/v1/alert_pb2_grpc.py depends on'
|
|
21
21
|
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
22
|
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
23
|
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: cordum/agent/v1/buspacket.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
|
+
'cordum/agent/v1/buspacket.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
26
|
+
from cordum.agent.v1 import job_pb2 as cordum_dot_agent_dot_v1_dot_job__pb2
|
|
27
|
+
from cordum.agent.v1 import heartbeat_pb2 as cordum_dot_agent_dot_v1_dot_heartbeat__pb2
|
|
28
|
+
from cordum.agent.v1 import alert_pb2 as cordum_dot_agent_dot_v1_dot_alert__pb2
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x63ordum/agent/v1/buspacket.proto\x12\x0f\x63ordum.agent.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x19\x63ordum/agent/v1/job.proto\x1a\x1f\x63ordum/agent/v1/heartbeat.proto\x1a\x1b\x63ordum/agent/v1/alert.proto\"\xc6\x03\n\tBusPacket\x12\x10\n\x08trace_id\x18\x01 \x01(\t\x12\x11\n\tsender_id\x18\x02 \x01(\t\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10protocol_version\x18\x04 \x01(\x05\x12\x32\n\x0bjob_request\x18\n \x01(\x0b\x32\x1b.cordum.agent.v1.JobRequestH\x00\x12\x30\n\njob_result\x18\x0b \x01(\x0b\x32\x1a.cordum.agent.v1.JobResultH\x00\x12/\n\theartbeat\x18\x0c \x01(\x0b\x32\x1a.cordum.agent.v1.HeartbeatH\x00\x12-\n\x05\x61lert\x18\r \x01(\x0b\x32\x1c.cordum.agent.v1.SystemAlertH\x00\x12\x34\n\x0cjob_progress\x18\x0f \x01(\x0b\x32\x1c.cordum.agent.v1.JobProgressH\x00\x12\x30\n\njob_cancel\x18\x10 \x01(\x0b\x32\x1a.cordum.agent.v1.JobCancelH\x00\x12\x11\n\tsignature\x18\x0e \x01(\x0c\x42\t\n\x07payloadB\x7f\n\x16io.cordum.cap.agent.v1P\x01Z+github.com/cordum-io/cap/v2/cordum/agent/v1\xaa\x02\x0f\x43ordum.Agent.V1\xca\x02\x0f\x63ordum\\Agent\\V1\xea\x02\x11\x43ordum::Agent::V1b\x06proto3')
|
|
32
|
+
|
|
33
|
+
_globals = globals()
|
|
34
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
35
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cordum.agent.v1.buspacket_pb2', _globals)
|
|
36
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
37
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
38
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\026io.cordum.cap.agent.v1P\001Z+github.com/cordum-io/cap/v2/cordum/agent/v1\252\002\017Cordum.Agent.V1\312\002\017cordum\\Agent\\V1\352\002\021Cordum::Agent::V1'
|
|
39
|
+
_globals['_BUSPACKET']._serialized_start=175
|
|
40
|
+
_globals['_BUSPACKET']._serialized_end=629
|
|
41
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -17,7 +17,7 @@ except ImportError:
|
|
|
17
17
|
if _version_not_supported:
|
|
18
18
|
raise RuntimeError(
|
|
19
19
|
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
-
+ ' but the generated code in
|
|
20
|
+
+ ' but the generated code in cordum/agent/v1/buspacket_pb2_grpc.py depends on'
|
|
21
21
|
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
22
|
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
23
|
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: cordum/agent/v1/heartbeat.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
|
+
'cordum/agent/v1/heartbeat.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\x1f\x63ordum/agent/v1/heartbeat.proto\x12\x0f\x63ordum.agent.v1\"\xa2\x02\n\tHeartbeat\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x10\n\x08\x63pu_load\x18\x04 \x01(\x02\x12\x17\n\x0fgpu_utilization\x18\x05 \x01(\x02\x12\x13\n\x0b\x61\x63tive_jobs\x18\x06 \x01(\x05\x12\x14\n\x0c\x63\x61pabilities\x18\x07 \x03(\t\x12\x0c\n\x04pool\x18\x0b \x01(\t\x12\x19\n\x11max_parallel_jobs\x18\x0c \x01(\x05\x12\x36\n\x06labels\x18\r \x03(\x0b\x32&.cordum.agent.v1.Heartbeat.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x7f\n\x16io.cordum.cap.agent.v1P\x01Z+github.com/cordum-io/cap/v2/cordum/agent/v1\xaa\x02\x0f\x43ordum.Agent.V1\xca\x02\x0f\x63ordum\\Agent\\V1\xea\x02\x11\x43ordum::Agent::V1b\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cordum.agent.v1.heartbeat_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\026io.cordum.cap.agent.v1P\001Z+github.com/cordum-io/cap/v2/cordum/agent/v1\252\002\017Cordum.Agent.V1\312\002\017cordum\\Agent\\V1\352\002\021Cordum::Agent::V1'
|
|
35
|
+
_globals['_HEARTBEAT_LABELSENTRY']._loaded_options = None
|
|
36
|
+
_globals['_HEARTBEAT_LABELSENTRY']._serialized_options = b'8\001'
|
|
37
|
+
_globals['_HEARTBEAT']._serialized_start=53
|
|
38
|
+
_globals['_HEARTBEAT']._serialized_end=343
|
|
39
|
+
_globals['_HEARTBEAT_LABELSENTRY']._serialized_start=298
|
|
40
|
+
_globals['_HEARTBEAT_LABELSENTRY']._serialized_end=343
|
|
41
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -17,7 +17,7 @@ except ImportError:
|
|
|
17
17
|
if _version_not_supported:
|
|
18
18
|
raise RuntimeError(
|
|
19
19
|
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
-
+ ' but the generated code in
|
|
20
|
+
+ ' but the generated code in cordum/agent/v1/heartbeat_pb2_grpc.py depends on'
|
|
21
21
|
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
22
|
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
23
|
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: cordum/agent/v1/job.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
|
+
'cordum/agent/v1/job.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\x19\x63ordum/agent/v1/job.proto\x12\x0f\x63ordum.agent.v1\"l\n\x0c\x43ontextHints\x12\x18\n\x10max_input_tokens\x18\x01 \x01(\x05\x12\x1b\n\x13\x61llow_summarization\x18\x02 \x01(\x08\x12\x17\n\x0f\x61llow_retrieval\x18\x03 \x01(\x08\x12\x0c\n\x04tags\x18\x04 \x03(\t\"l\n\x06\x42udget\x12\x18\n\x10max_input_tokens\x18\x01 \x01(\x03\x12\x19\n\x11max_output_tokens\x18\x02 \x01(\x03\x12\x18\n\x10max_total_tokens\x18\x03 \x01(\x03\x12\x13\n\x0b\x64\x65\x61\x64line_ms\x18\x04 \x01(\x03\"\xae\x02\n\x0bJobMetadata\x12\x11\n\ttenant_id\x18\x01 \x01(\t\x12\x10\n\x08\x61\x63tor_id\x18\x02 \x01(\t\x12.\n\nactor_type\x18\x03 \x01(\x0e\x32\x1a.cordum.agent.v1.ActorType\x12\x17\n\x0fidempotency_key\x18\x04 \x01(\t\x12\x12\n\ncapability\x18\x05 \x01(\t\x12\x11\n\trisk_tags\x18\x06 \x03(\t\x12\x10\n\x08requires\x18\x07 \x03(\t\x12\x0f\n\x07pack_id\x18\x08 \x01(\t\x12\x38\n\x06labels\x18\t \x03(\x0b\x32(.cordum.agent.v1.JobMetadata.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xd2\x04\n\nJobRequest\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12.\n\x08priority\x18\x03 \x01(\x0e\x32\x1c.cordum.agent.v1.JobPriority\x12\x13\n\x0b\x63ontext_ptr\x18\x04 \x01(\t\x12\x12\n\nadapter_id\x18\x05 \x01(\t\x12\x31\n\x03\x65nv\x18\x06 \x03(\x0b\x32$.cordum.agent.v1.JobRequest.EnvEntry\x12\x15\n\rparent_job_id\x18\x07 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x08 \x01(\t\x12\x12\n\nstep_index\x18\t \x01(\x05\x12\x11\n\tmemory_id\x18\n \x01(\t\x12\x34\n\rcontext_hints\x18\x0b \x01(\x0b\x32\x1d.cordum.agent.v1.ContextHints\x12\'\n\x06\x62udget\x18\x0c \x01(\x0b\x32\x17.cordum.agent.v1.Budget\x12\x11\n\ttenant_id\x18\r \x01(\t\x12\x14\n\x0cprincipal_id\x18\x0e \x01(\t\x12\x37\n\x06labels\x18\x0f \x03(\x0b\x32\'.cordum.agent.v1.JobRequest.LabelsEntry\x12*\n\x04meta\x18\x10 \x01(\x0b\x32\x1c.cordum.agent.v1.JobMetadata\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xc6\x01\n\tJobResult\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12*\n\x06status\x18\x02 \x01(\x0e\x32\x1a.cordum.agent.v1.JobStatus\x12\x12\n\nresult_ptr\x18\x03 \x01(\t\x12\x11\n\tworker_id\x18\x04 \x01(\t\x12\x14\n\x0c\x65xecution_ms\x18\x05 \x01(\x03\x12\x12\n\nerror_code\x18\x06 \x01(\t\x12\x15\n\rerror_message\x18\x07 \x01(\t\x12\x15\n\rartifact_ptrs\x18\x08 \x03(\t\"\xa7\x01\n\x0bJobProgress\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x0f\n\x07step_id\x18\x02 \x01(\t\x12\x0f\n\x07percent\x18\x03 \x01(\x05\x12\x0f\n\x07message\x18\x04 \x01(\t\x12\x12\n\nresult_ptr\x18\x05 \x01(\t\x12\x15\n\rartifact_ptrs\x18\x06 \x03(\t\x12*\n\x06status\x18\x07 \x01(\x0e\x32\x1a.cordum.agent.v1.JobStatus\"A\n\tJobCancel\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x14\n\x0crequested_by\x18\x03 \x01(\t*|\n\x0bJobPriority\x12\x1c\n\x18JOB_PRIORITY_UNSPECIFIED\x10\x00\x12\x1c\n\x18JOB_PRIORITY_INTERACTIVE\x10\x01\x12\x16\n\x12JOB_PRIORITY_BATCH\x10\x02\x12\x19\n\x15JOB_PRIORITY_CRITICAL\x10\x03*\x86\x02\n\tJobStatus\x12\x1a\n\x16JOB_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12JOB_STATUS_PENDING\x10\x01\x12\x18\n\x14JOB_STATUS_SCHEDULED\x10\x02\x12\x19\n\x15JOB_STATUS_DISPATCHED\x10\x03\x12\x16\n\x12JOB_STATUS_RUNNING\x10\x04\x12\x18\n\x14JOB_STATUS_SUCCEEDED\x10\x05\x12\x15\n\x11JOB_STATUS_FAILED\x10\x06\x12\x18\n\x14JOB_STATUS_CANCELLED\x10\x07\x12\x15\n\x11JOB_STATUS_DENIED\x10\x08\x12\x16\n\x12JOB_STATUS_TIMEOUT\x10\t*U\n\tActorType\x12\x1a\n\x16\x41\x43TOR_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41\x43TOR_TYPE_HUMAN\x10\x01\x12\x16\n\x12\x41\x43TOR_TYPE_SERVICE\x10\x02\x42\x7f\n\x16io.cordum.cap.agent.v1P\x01Z+github.com/cordum-io/cap/v2/cordum/agent/v1\xaa\x02\x0f\x43ordum.Agent.V1\xca\x02\x0f\x63ordum\\Agent\\V1\xea\x02\x11\x43ordum::Agent::V1b\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cordum.agent.v1.job_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\026io.cordum.cap.agent.v1P\001Z+github.com/cordum-io/cap/v2/cordum/agent/v1\252\002\017Cordum.Agent.V1\312\002\017cordum\\Agent\\V1\352\002\021Cordum::Agent::V1'
|
|
35
|
+
_globals['_JOBMETADATA_LABELSENTRY']._loaded_options = None
|
|
36
|
+
_globals['_JOBMETADATA_LABELSENTRY']._serialized_options = b'8\001'
|
|
37
|
+
_globals['_JOBREQUEST_ENVENTRY']._loaded_options = None
|
|
38
|
+
_globals['_JOBREQUEST_ENVENTRY']._serialized_options = b'8\001'
|
|
39
|
+
_globals['_JOBREQUEST_LABELSENTRY']._loaded_options = None
|
|
40
|
+
_globals['_JOBREQUEST_LABELSENTRY']._serialized_options = b'8\001'
|
|
41
|
+
_globals['_JOBPRIORITY']._serialized_start=1606
|
|
42
|
+
_globals['_JOBPRIORITY']._serialized_end=1730
|
|
43
|
+
_globals['_JOBSTATUS']._serialized_start=1733
|
|
44
|
+
_globals['_JOBSTATUS']._serialized_end=1995
|
|
45
|
+
_globals['_ACTORTYPE']._serialized_start=1997
|
|
46
|
+
_globals['_ACTORTYPE']._serialized_end=2082
|
|
47
|
+
_globals['_CONTEXTHINTS']._serialized_start=46
|
|
48
|
+
_globals['_CONTEXTHINTS']._serialized_end=154
|
|
49
|
+
_globals['_BUDGET']._serialized_start=156
|
|
50
|
+
_globals['_BUDGET']._serialized_end=264
|
|
51
|
+
_globals['_JOBMETADATA']._serialized_start=267
|
|
52
|
+
_globals['_JOBMETADATA']._serialized_end=569
|
|
53
|
+
_globals['_JOBMETADATA_LABELSENTRY']._serialized_start=524
|
|
54
|
+
_globals['_JOBMETADATA_LABELSENTRY']._serialized_end=569
|
|
55
|
+
_globals['_JOBREQUEST']._serialized_start=572
|
|
56
|
+
_globals['_JOBREQUEST']._serialized_end=1166
|
|
57
|
+
_globals['_JOBREQUEST_ENVENTRY']._serialized_start=1077
|
|
58
|
+
_globals['_JOBREQUEST_ENVENTRY']._serialized_end=1119
|
|
59
|
+
_globals['_JOBREQUEST_LABELSENTRY']._serialized_start=524
|
|
60
|
+
_globals['_JOBREQUEST_LABELSENTRY']._serialized_end=569
|
|
61
|
+
_globals['_JOBRESULT']._serialized_start=1169
|
|
62
|
+
_globals['_JOBRESULT']._serialized_end=1367
|
|
63
|
+
_globals['_JOBPROGRESS']._serialized_start=1370
|
|
64
|
+
_globals['_JOBPROGRESS']._serialized_end=1537
|
|
65
|
+
_globals['_JOBCANCEL']._serialized_start=1539
|
|
66
|
+
_globals['_JOBCANCEL']._serialized_end=1604
|
|
67
|
+
# @@protoc_insertion_point(module_scope)
|
{cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/agent/v1/job_pb2_grpc.py
RENAMED
|
@@ -17,7 +17,7 @@ except ImportError:
|
|
|
17
17
|
if _version_not_supported:
|
|
18
18
|
raise RuntimeError(
|
|
19
19
|
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
-
+ ' but the generated code in
|
|
20
|
+
+ ' but the generated code in cordum/agent/v1/job_pb2_grpc.py depends on'
|
|
21
21
|
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
22
|
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
23
|
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: cordum/agent/v1/safety.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
|
+
'cordum/agent/v1/safety.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from cordum.agent.v1 import job_pb2 as cordum_dot_agent_dot_v1_dot_job__pb2
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x63ordum/agent/v1/safety.proto\x12\x0f\x63ordum.agent.v1\x1a\x19\x63ordum/agent/v1/job.proto\"\x93\x03\n\x12PolicyCheckRequest\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12\x0e\n\x06tenant\x18\x03 \x01(\t\x12.\n\x08priority\x18\x04 \x01(\x0e\x32\x1c.cordum.agent.v1.JobPriority\x12\x16\n\x0e\x65stimated_cost\x18\x05 \x01(\x01\x12\'\n\x06\x62udget\x18\x06 \x01(\x0b\x32\x17.cordum.agent.v1.Budget\x12\x14\n\x0cprincipal_id\x18\x07 \x01(\t\x12?\n\x06labels\x18\x08 \x03(\x0b\x32/.cordum.agent.v1.PolicyCheckRequest.LabelsEntry\x12\x11\n\tmemory_id\x18\t \x01(\t\x12\x18\n\x10\x65\x66\x66\x65\x63tive_config\x18\n \x01(\x0c\x12*\n\x04meta\x18\x0b \x01(\x0b\x32\x1c.cordum.agent.v1.JobMetadata\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"y\n\x11\x42udgetConstraints\x12\x16\n\x0emax_runtime_ms\x18\x01 \x01(\x03\x12\x13\n\x0bmax_retries\x18\x02 \x01(\x05\x12\x1a\n\x12max_artifact_bytes\x18\x03 \x01(\x03\x12\x1b\n\x13max_concurrent_jobs\x18\x04 \x01(\x05\"j\n\x0eSandboxProfile\x12\x10\n\x08isolated\x18\x01 \x01(\x08\x12\x19\n\x11network_allowlist\x18\x02 \x03(\t\x12\x14\n\x0c\x66s_read_only\x18\x03 \x03(\t\x12\x15\n\rfs_read_write\x18\x04 \x03(\t\"G\n\x14ToolchainConstraints\x12\x15\n\rallowed_tools\x18\x01 \x03(\t\x12\x18\n\x10\x61llowed_commands\x18\x02 \x03(\t\"P\n\x0f\x44iffConstraints\x12\x11\n\tmax_files\x18\x01 \x01(\x05\x12\x11\n\tmax_lines\x18\x02 \x01(\x05\x12\x17\n\x0f\x64\x65ny_path_globs\x18\x03 \x03(\t\"\xfd\x01\n\x11PolicyConstraints\x12\x33\n\x07\x62udgets\x18\x01 \x01(\x0b\x32\".cordum.agent.v1.BudgetConstraints\x12\x30\n\x07sandbox\x18\x02 \x01(\x0b\x32\x1f.cordum.agent.v1.SandboxProfile\x12\x38\n\ttoolchain\x18\x03 \x01(\x0b\x32%.cordum.agent.v1.ToolchainConstraints\x12.\n\x04\x64iff\x18\x04 \x01(\x0b\x32 .cordum.agent.v1.DiffConstraints\x12\x17\n\x0fredaction_level\x18\x05 \x01(\t\"\x88\x02\n\x13PolicyCheckResponse\x12/\n\x08\x64\x65\x63ision\x18\x01 \x01(\x0e\x32\x1d.cordum.agent.v1.DecisionType\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x1c\n\x14redacted_context_ptr\x18\x03 \x01(\t\x12\x17\n\x0fpolicy_snapshot\x18\x04 \x01(\t\x12\x0f\n\x07rule_id\x18\x05 \x01(\t\x12\x37\n\x0b\x63onstraints\x18\x06 \x01(\x0b\x32\".cordum.agent.v1.PolicyConstraints\x12\x19\n\x11\x61pproval_required\x18\x07 \x01(\x08\x12\x14\n\x0c\x61pproval_ref\x18\x08 \x01(\t\"\x16\n\x14ListSnapshotsRequest\"*\n\x15ListSnapshotsResponse\x12\x11\n\tsnapshots\x18\x01 \x03(\t*\xc5\x01\n\x0c\x44\x65\x63isionType\x12\x1d\n\x19\x44\x45\x43ISION_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13\x44\x45\x43ISION_TYPE_ALLOW\x10\x01\x12\x16\n\x12\x44\x45\x43ISION_TYPE_DENY\x10\x02\x12\x1f\n\x1b\x44\x45\x43ISION_TYPE_REQUIRE_HUMAN\x10\x03\x12\x1a\n\x16\x44\x45\x43ISION_TYPE_THROTTLE\x10\x04\x12(\n$DECISION_TYPE_ALLOW_WITH_CONSTRAINTS\x10\x05\x32\xc6\x03\n\x0cSafetyKernel\x12R\n\x05\x43heck\x12#.cordum.agent.v1.PolicyCheckRequest\x1a$.cordum.agent.v1.PolicyCheckResponse\x12U\n\x08\x45valuate\x12#.cordum.agent.v1.PolicyCheckRequest\x1a$.cordum.agent.v1.PolicyCheckResponse\x12T\n\x07\x45xplain\x12#.cordum.agent.v1.PolicyCheckRequest\x1a$.cordum.agent.v1.PolicyCheckResponse\x12U\n\x08Simulate\x12#.cordum.agent.v1.PolicyCheckRequest\x1a$.cordum.agent.v1.PolicyCheckResponse\x12^\n\rListSnapshots\x12%.cordum.agent.v1.ListSnapshotsRequest\x1a&.cordum.agent.v1.ListSnapshotsResponseB\x7f\n\x16io.cordum.cap.agent.v1P\x01Z+github.com/cordum-io/cap/v2/cordum/agent/v1\xaa\x02\x0f\x43ordum.Agent.V1\xca\x02\x0f\x63ordum\\Agent\\V1\xea\x02\x11\x43ordum::Agent::V1b\x06proto3')
|
|
29
|
+
|
|
30
|
+
_globals = globals()
|
|
31
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
32
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cordum.agent.v1.safety_pb2', _globals)
|
|
33
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
34
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
35
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\026io.cordum.cap.agent.v1P\001Z+github.com/cordum-io/cap/v2/cordum/agent/v1\252\002\017Cordum.Agent.V1\312\002\017cordum\\Agent\\V1\352\002\021Cordum::Agent::V1'
|
|
36
|
+
_globals['_POLICYCHECKREQUEST_LABELSENTRY']._loaded_options = None
|
|
37
|
+
_globals['_POLICYCHECKREQUEST_LABELSENTRY']._serialized_options = b'8\001'
|
|
38
|
+
_globals['_DECISIONTYPE']._serialized_start=1460
|
|
39
|
+
_globals['_DECISIONTYPE']._serialized_end=1657
|
|
40
|
+
_globals['_POLICYCHECKREQUEST']._serialized_start=77
|
|
41
|
+
_globals['_POLICYCHECKREQUEST']._serialized_end=480
|
|
42
|
+
_globals['_POLICYCHECKREQUEST_LABELSENTRY']._serialized_start=435
|
|
43
|
+
_globals['_POLICYCHECKREQUEST_LABELSENTRY']._serialized_end=480
|
|
44
|
+
_globals['_BUDGETCONSTRAINTS']._serialized_start=482
|
|
45
|
+
_globals['_BUDGETCONSTRAINTS']._serialized_end=603
|
|
46
|
+
_globals['_SANDBOXPROFILE']._serialized_start=605
|
|
47
|
+
_globals['_SANDBOXPROFILE']._serialized_end=711
|
|
48
|
+
_globals['_TOOLCHAINCONSTRAINTS']._serialized_start=713
|
|
49
|
+
_globals['_TOOLCHAINCONSTRAINTS']._serialized_end=784
|
|
50
|
+
_globals['_DIFFCONSTRAINTS']._serialized_start=786
|
|
51
|
+
_globals['_DIFFCONSTRAINTS']._serialized_end=866
|
|
52
|
+
_globals['_POLICYCONSTRAINTS']._serialized_start=869
|
|
53
|
+
_globals['_POLICYCONSTRAINTS']._serialized_end=1122
|
|
54
|
+
_globals['_POLICYCHECKRESPONSE']._serialized_start=1125
|
|
55
|
+
_globals['_POLICYCHECKRESPONSE']._serialized_end=1389
|
|
56
|
+
_globals['_LISTSNAPSHOTSREQUEST']._serialized_start=1391
|
|
57
|
+
_globals['_LISTSNAPSHOTSREQUEST']._serialized_end=1413
|
|
58
|
+
_globals['_LISTSNAPSHOTSRESPONSE']._serialized_start=1415
|
|
59
|
+
_globals['_LISTSNAPSHOTSRESPONSE']._serialized_end=1457
|
|
60
|
+
_globals['_SAFETYKERNEL']._serialized_start=1660
|
|
61
|
+
_globals['_SAFETYKERNEL']._serialized_end=2114
|
|
62
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,272 @@
|
|
|
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
|
+
from cordum.agent.v1 import safety_pb2 as cordum_dot_agent_dot_v1_dot_safety__pb2
|
|
7
|
+
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.76.0'
|
|
9
|
+
GRPC_VERSION = grpc.__version__
|
|
10
|
+
_version_not_supported = False
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from grpc._utilities import first_version_is_lower
|
|
14
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
15
|
+
except ImportError:
|
|
16
|
+
_version_not_supported = True
|
|
17
|
+
|
|
18
|
+
if _version_not_supported:
|
|
19
|
+
raise RuntimeError(
|
|
20
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
21
|
+
+ ' but the generated code in cordum/agent/v1/safety_pb2_grpc.py depends on'
|
|
22
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
23
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
24
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class SafetyKernelStub(object):
|
|
29
|
+
"""SafetyKernel defines the policy decision service.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
def __init__(self, channel):
|
|
33
|
+
"""Constructor.
|
|
34
|
+
|
|
35
|
+
Args:
|
|
36
|
+
channel: A grpc.Channel.
|
|
37
|
+
"""
|
|
38
|
+
self.Check = channel.unary_unary(
|
|
39
|
+
'/cordum.agent.v1.SafetyKernel/Check',
|
|
40
|
+
request_serializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
|
|
41
|
+
response_deserializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
|
|
42
|
+
_registered_method=True)
|
|
43
|
+
self.Evaluate = channel.unary_unary(
|
|
44
|
+
'/cordum.agent.v1.SafetyKernel/Evaluate',
|
|
45
|
+
request_serializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
|
|
46
|
+
response_deserializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
|
|
47
|
+
_registered_method=True)
|
|
48
|
+
self.Explain = channel.unary_unary(
|
|
49
|
+
'/cordum.agent.v1.SafetyKernel/Explain',
|
|
50
|
+
request_serializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
|
|
51
|
+
response_deserializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
|
|
52
|
+
_registered_method=True)
|
|
53
|
+
self.Simulate = channel.unary_unary(
|
|
54
|
+
'/cordum.agent.v1.SafetyKernel/Simulate',
|
|
55
|
+
request_serializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
|
|
56
|
+
response_deserializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
|
|
57
|
+
_registered_method=True)
|
|
58
|
+
self.ListSnapshots = channel.unary_unary(
|
|
59
|
+
'/cordum.agent.v1.SafetyKernel/ListSnapshots',
|
|
60
|
+
request_serializer=cordum_dot_agent_dot_v1_dot_safety__pb2.ListSnapshotsRequest.SerializeToString,
|
|
61
|
+
response_deserializer=cordum_dot_agent_dot_v1_dot_safety__pb2.ListSnapshotsResponse.FromString,
|
|
62
|
+
_registered_method=True)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class SafetyKernelServicer(object):
|
|
66
|
+
"""SafetyKernel defines the policy decision service.
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
def Check(self, request, context):
|
|
70
|
+
"""Missing associated documentation comment in .proto file."""
|
|
71
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
72
|
+
context.set_details('Method not implemented!')
|
|
73
|
+
raise NotImplementedError('Method not implemented!')
|
|
74
|
+
|
|
75
|
+
def Evaluate(self, request, context):
|
|
76
|
+
"""Missing associated documentation comment in .proto file."""
|
|
77
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
78
|
+
context.set_details('Method not implemented!')
|
|
79
|
+
raise NotImplementedError('Method not implemented!')
|
|
80
|
+
|
|
81
|
+
def Explain(self, request, context):
|
|
82
|
+
"""Missing associated documentation comment in .proto file."""
|
|
83
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
84
|
+
context.set_details('Method not implemented!')
|
|
85
|
+
raise NotImplementedError('Method not implemented!')
|
|
86
|
+
|
|
87
|
+
def Simulate(self, request, context):
|
|
88
|
+
"""Missing associated documentation comment in .proto file."""
|
|
89
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
90
|
+
context.set_details('Method not implemented!')
|
|
91
|
+
raise NotImplementedError('Method not implemented!')
|
|
92
|
+
|
|
93
|
+
def ListSnapshots(self, request, context):
|
|
94
|
+
"""Missing associated documentation comment in .proto file."""
|
|
95
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
96
|
+
context.set_details('Method not implemented!')
|
|
97
|
+
raise NotImplementedError('Method not implemented!')
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def add_SafetyKernelServicer_to_server(servicer, server):
|
|
101
|
+
rpc_method_handlers = {
|
|
102
|
+
'Check': grpc.unary_unary_rpc_method_handler(
|
|
103
|
+
servicer.Check,
|
|
104
|
+
request_deserializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.FromString,
|
|
105
|
+
response_serializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.SerializeToString,
|
|
106
|
+
),
|
|
107
|
+
'Evaluate': grpc.unary_unary_rpc_method_handler(
|
|
108
|
+
servicer.Evaluate,
|
|
109
|
+
request_deserializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.FromString,
|
|
110
|
+
response_serializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.SerializeToString,
|
|
111
|
+
),
|
|
112
|
+
'Explain': grpc.unary_unary_rpc_method_handler(
|
|
113
|
+
servicer.Explain,
|
|
114
|
+
request_deserializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.FromString,
|
|
115
|
+
response_serializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.SerializeToString,
|
|
116
|
+
),
|
|
117
|
+
'Simulate': grpc.unary_unary_rpc_method_handler(
|
|
118
|
+
servicer.Simulate,
|
|
119
|
+
request_deserializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.FromString,
|
|
120
|
+
response_serializer=cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.SerializeToString,
|
|
121
|
+
),
|
|
122
|
+
'ListSnapshots': grpc.unary_unary_rpc_method_handler(
|
|
123
|
+
servicer.ListSnapshots,
|
|
124
|
+
request_deserializer=cordum_dot_agent_dot_v1_dot_safety__pb2.ListSnapshotsRequest.FromString,
|
|
125
|
+
response_serializer=cordum_dot_agent_dot_v1_dot_safety__pb2.ListSnapshotsResponse.SerializeToString,
|
|
126
|
+
),
|
|
127
|
+
}
|
|
128
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
129
|
+
'cordum.agent.v1.SafetyKernel', rpc_method_handlers)
|
|
130
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
131
|
+
server.add_registered_method_handlers('cordum.agent.v1.SafetyKernel', rpc_method_handlers)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
# This class is part of an EXPERIMENTAL API.
|
|
135
|
+
class SafetyKernel(object):
|
|
136
|
+
"""SafetyKernel defines the policy decision service.
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
@staticmethod
|
|
140
|
+
def Check(request,
|
|
141
|
+
target,
|
|
142
|
+
options=(),
|
|
143
|
+
channel_credentials=None,
|
|
144
|
+
call_credentials=None,
|
|
145
|
+
insecure=False,
|
|
146
|
+
compression=None,
|
|
147
|
+
wait_for_ready=None,
|
|
148
|
+
timeout=None,
|
|
149
|
+
metadata=None):
|
|
150
|
+
return grpc.experimental.unary_unary(
|
|
151
|
+
request,
|
|
152
|
+
target,
|
|
153
|
+
'/cordum.agent.v1.SafetyKernel/Check',
|
|
154
|
+
cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
|
|
155
|
+
cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
|
|
156
|
+
options,
|
|
157
|
+
channel_credentials,
|
|
158
|
+
insecure,
|
|
159
|
+
call_credentials,
|
|
160
|
+
compression,
|
|
161
|
+
wait_for_ready,
|
|
162
|
+
timeout,
|
|
163
|
+
metadata,
|
|
164
|
+
_registered_method=True)
|
|
165
|
+
|
|
166
|
+
@staticmethod
|
|
167
|
+
def Evaluate(request,
|
|
168
|
+
target,
|
|
169
|
+
options=(),
|
|
170
|
+
channel_credentials=None,
|
|
171
|
+
call_credentials=None,
|
|
172
|
+
insecure=False,
|
|
173
|
+
compression=None,
|
|
174
|
+
wait_for_ready=None,
|
|
175
|
+
timeout=None,
|
|
176
|
+
metadata=None):
|
|
177
|
+
return grpc.experimental.unary_unary(
|
|
178
|
+
request,
|
|
179
|
+
target,
|
|
180
|
+
'/cordum.agent.v1.SafetyKernel/Evaluate',
|
|
181
|
+
cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
|
|
182
|
+
cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
|
|
183
|
+
options,
|
|
184
|
+
channel_credentials,
|
|
185
|
+
insecure,
|
|
186
|
+
call_credentials,
|
|
187
|
+
compression,
|
|
188
|
+
wait_for_ready,
|
|
189
|
+
timeout,
|
|
190
|
+
metadata,
|
|
191
|
+
_registered_method=True)
|
|
192
|
+
|
|
193
|
+
@staticmethod
|
|
194
|
+
def Explain(request,
|
|
195
|
+
target,
|
|
196
|
+
options=(),
|
|
197
|
+
channel_credentials=None,
|
|
198
|
+
call_credentials=None,
|
|
199
|
+
insecure=False,
|
|
200
|
+
compression=None,
|
|
201
|
+
wait_for_ready=None,
|
|
202
|
+
timeout=None,
|
|
203
|
+
metadata=None):
|
|
204
|
+
return grpc.experimental.unary_unary(
|
|
205
|
+
request,
|
|
206
|
+
target,
|
|
207
|
+
'/cordum.agent.v1.SafetyKernel/Explain',
|
|
208
|
+
cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
|
|
209
|
+
cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
|
|
210
|
+
options,
|
|
211
|
+
channel_credentials,
|
|
212
|
+
insecure,
|
|
213
|
+
call_credentials,
|
|
214
|
+
compression,
|
|
215
|
+
wait_for_ready,
|
|
216
|
+
timeout,
|
|
217
|
+
metadata,
|
|
218
|
+
_registered_method=True)
|
|
219
|
+
|
|
220
|
+
@staticmethod
|
|
221
|
+
def Simulate(request,
|
|
222
|
+
target,
|
|
223
|
+
options=(),
|
|
224
|
+
channel_credentials=None,
|
|
225
|
+
call_credentials=None,
|
|
226
|
+
insecure=False,
|
|
227
|
+
compression=None,
|
|
228
|
+
wait_for_ready=None,
|
|
229
|
+
timeout=None,
|
|
230
|
+
metadata=None):
|
|
231
|
+
return grpc.experimental.unary_unary(
|
|
232
|
+
request,
|
|
233
|
+
target,
|
|
234
|
+
'/cordum.agent.v1.SafetyKernel/Simulate',
|
|
235
|
+
cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
|
|
236
|
+
cordum_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
|
|
237
|
+
options,
|
|
238
|
+
channel_credentials,
|
|
239
|
+
insecure,
|
|
240
|
+
call_credentials,
|
|
241
|
+
compression,
|
|
242
|
+
wait_for_ready,
|
|
243
|
+
timeout,
|
|
244
|
+
metadata,
|
|
245
|
+
_registered_method=True)
|
|
246
|
+
|
|
247
|
+
@staticmethod
|
|
248
|
+
def ListSnapshots(request,
|
|
249
|
+
target,
|
|
250
|
+
options=(),
|
|
251
|
+
channel_credentials=None,
|
|
252
|
+
call_credentials=None,
|
|
253
|
+
insecure=False,
|
|
254
|
+
compression=None,
|
|
255
|
+
wait_for_ready=None,
|
|
256
|
+
timeout=None,
|
|
257
|
+
metadata=None):
|
|
258
|
+
return grpc.experimental.unary_unary(
|
|
259
|
+
request,
|
|
260
|
+
target,
|
|
261
|
+
'/cordum.agent.v1.SafetyKernel/ListSnapshots',
|
|
262
|
+
cordum_dot_agent_dot_v1_dot_safety__pb2.ListSnapshotsRequest.SerializeToString,
|
|
263
|
+
cordum_dot_agent_dot_v1_dot_safety__pb2.ListSnapshotsResponse.FromString,
|
|
264
|
+
options,
|
|
265
|
+
channel_credentials,
|
|
266
|
+
insecure,
|
|
267
|
+
call_credentials,
|
|
268
|
+
compression,
|
|
269
|
+
wait_for_ready,
|
|
270
|
+
timeout,
|
|
271
|
+
metadata,
|
|
272
|
+
_registered_method=True)
|
|
@@ -2,7 +2,7 @@ import asyncio
|
|
|
2
2
|
from typing import Callable, Awaitable, Dict
|
|
3
3
|
|
|
4
4
|
from google.protobuf import timestamp_pb2
|
|
5
|
-
from cap.pb.
|
|
5
|
+
from cap.pb.cordum.agent.v1 import buspacket_pb2, job_pb2
|
|
6
6
|
from cryptography.hazmat.primitives.asymmetric import ec
|
|
7
7
|
from cryptography.hazmat.primitives import hashes
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cap-sdk-python
|
|
3
|
-
Version: 2.0.
|
|
4
|
-
Summary: CAP (
|
|
5
|
-
Project-URL: Homepage, https://github.com/
|
|
3
|
+
Version: 2.0.11
|
|
4
|
+
Summary: CAP (Cordum Agent Protocol) Python SDK
|
|
5
|
+
Project-URL: Homepage, https://github.com/cordum-io/cap
|
|
6
6
|
Requires-Python: >=3.9
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Requires-Dist: protobuf>=4.25.0
|
|
@@ -20,7 +20,7 @@ Asyncio-first SDK with NATS helpers for CAP workers and clients.
|
|
|
20
20
|
-I../../proto \
|
|
21
21
|
--python_out=./cap/pb \
|
|
22
22
|
--grpc_python_out=./cap/pb \
|
|
23
|
-
../../proto/
|
|
23
|
+
../../proto/cordum/agent/v1/*.proto
|
|
24
24
|
```
|
|
25
25
|
(Or run `./tools/make_protos.sh` from repo root with `CAP_RUN_PY=1` and copy `/python` into `sdk/python/cap/pb` if you want vendored stubs.)
|
|
26
26
|
|
|
@@ -33,7 +33,7 @@ Asyncio-first SDK with NATS helpers for CAP workers and clients.
|
|
|
33
33
|
```python
|
|
34
34
|
import asyncio
|
|
35
35
|
from cap import worker
|
|
36
|
-
from cap.pb.
|
|
36
|
+
from cap.pb.cordum.agent.v1 import job_pb2
|
|
37
37
|
|
|
38
38
|
async def handle(req: job_pb2.JobRequest):
|
|
39
39
|
return job_pb2.JobResult(
|
|
@@ -51,7 +51,7 @@ Asyncio-first SDK with NATS helpers for CAP workers and clients.
|
|
|
51
51
|
import asyncio
|
|
52
52
|
from cryptography.hazmat.primitives.asymmetric import ec
|
|
53
53
|
from cap import client
|
|
54
|
-
from cap.pb.
|
|
54
|
+
from cap.pb.cordum.agent.v1 import job_pb2
|
|
55
55
|
import nats
|
|
56
56
|
|
|
57
57
|
async def main():
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
cap/__init__.py
|
|
4
|
+
cap/bus.py
|
|
5
|
+
cap/client.py
|
|
6
|
+
cap/worker.py
|
|
7
|
+
cap/pb/__init__.py
|
|
8
|
+
cap/pb/cordum/__init__.py
|
|
9
|
+
cap/pb/cordum/agent/__init__.py
|
|
10
|
+
cap/pb/cordum/agent/v1/__init__.py
|
|
11
|
+
cap/pb/cordum/agent/v1/alert_pb2.py
|
|
12
|
+
cap/pb/cordum/agent/v1/alert_pb2_grpc.py
|
|
13
|
+
cap/pb/cordum/agent/v1/buspacket_pb2.py
|
|
14
|
+
cap/pb/cordum/agent/v1/buspacket_pb2_grpc.py
|
|
15
|
+
cap/pb/cordum/agent/v1/heartbeat_pb2.py
|
|
16
|
+
cap/pb/cordum/agent/v1/heartbeat_pb2_grpc.py
|
|
17
|
+
cap/pb/cordum/agent/v1/job_pb2.py
|
|
18
|
+
cap/pb/cordum/agent/v1/job_pb2_grpc.py
|
|
19
|
+
cap/pb/cordum/agent/v1/safety_pb2.py
|
|
20
|
+
cap/pb/cordum/agent/v1/safety_pb2_grpc.py
|
|
21
|
+
cap_sdk_python.egg-info/PKG-INFO
|
|
22
|
+
cap_sdk_python.egg-info/SOURCES.txt
|
|
23
|
+
cap_sdk_python.egg-info/dependency_links.txt
|
|
24
|
+
cap_sdk_python.egg-info/requires.txt
|
|
25
|
+
cap_sdk_python.egg-info/top_level.txt
|
|
26
|
+
tests/test_sdk.py
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cap-sdk-python"
|
|
7
|
-
version = "2.0.
|
|
8
|
-
description = "CAP (
|
|
7
|
+
version = "2.0.11"
|
|
8
|
+
description = "CAP (Cordum Agent Protocol) Python SDK"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
dependencies = [
|
|
@@ -15,7 +15,7 @@ dependencies = [
|
|
|
15
15
|
]
|
|
16
16
|
|
|
17
17
|
[project.urls]
|
|
18
|
-
Homepage = "https://github.com/
|
|
18
|
+
Homepage = "https://github.com/cordum-io/cap"
|
|
19
19
|
|
|
20
20
|
[tool.setuptools.packages.find]
|
|
21
21
|
where = ["."]
|
|
@@ -16,7 +16,7 @@ sys.path.append(os.path.join(_sdk_root, "cap", "pb"))
|
|
|
16
16
|
from cryptography.hazmat.primitives.asymmetric import ec
|
|
17
17
|
from cryptography.hazmat.primitives import hashes
|
|
18
18
|
|
|
19
|
-
from cap.pb.
|
|
19
|
+
from cap.pb.cordum.agent.v1 import job_pb2
|
|
20
20
|
from cap import client
|
|
21
21
|
from cap import worker
|
|
22
22
|
|
|
@@ -88,7 +88,7 @@ class TestSDK(unittest.TestCase):
|
|
|
88
88
|
self.assertEqual(subj, worker.SUBJECT_RESULT)
|
|
89
89
|
|
|
90
90
|
# Verify the signature of the result
|
|
91
|
-
from cap.pb.
|
|
91
|
+
from cap.pb.cordum.agent.v1 import buspacket_pb2
|
|
92
92
|
result_packet = buspacket_pb2.BusPacket()
|
|
93
93
|
result_packet.ParseFromString(data)
|
|
94
94
|
signature = result_packet.signature
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
-
# source: coretex/agent/v1/buspacket.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
|
-
'coretex/agent/v1/buspacket.proto'
|
|
19
|
-
)
|
|
20
|
-
# @@protoc_insertion_point(imports)
|
|
21
|
-
|
|
22
|
-
_sym_db = _symbol_database.Default()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
26
|
-
from coretex.agent.v1 import job_pb2 as coretex_dot_agent_dot_v1_dot_job__pb2
|
|
27
|
-
from coretex.agent.v1 import heartbeat_pb2 as coretex_dot_agent_dot_v1_dot_heartbeat__pb2
|
|
28
|
-
from coretex.agent.v1 import alert_pb2 as coretex_dot_agent_dot_v1_dot_alert__pb2
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n coretex/agent/v1/buspacket.proto\x12\x10\x63oretex.agent.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1a\x63oretex/agent/v1/job.proto\x1a coretex/agent/v1/heartbeat.proto\x1a\x1c\x63oretex/agent/v1/alert.proto\"\xe2\x02\n\tBusPacket\x12\x10\n\x08trace_id\x18\x01 \x01(\t\x12\x11\n\tsender_id\x18\x02 \x01(\t\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10protocol_version\x18\x04 \x01(\x05\x12\x33\n\x0bjob_request\x18\n \x01(\x0b\x32\x1c.coretex.agent.v1.JobRequestH\x00\x12\x31\n\njob_result\x18\x0b \x01(\x0b\x32\x1b.coretex.agent.v1.JobResultH\x00\x12\x30\n\theartbeat\x18\x0c \x01(\x0b\x32\x1b.coretex.agent.v1.HeartbeatH\x00\x12.\n\x05\x61lert\x18\r \x01(\x0b\x32\x1d.coretex.agent.v1.SystemAlertH\x00\x12\x11\n\tsignature\x18\x0e \x01(\x0c\x42\t\n\x07payloadB\x87\x01\n\x17\x61i.coretex.cap.agent.v1P\x01Z/github.com/coretexos/cap/v2/go/coretex/agent/v1\xaa\x02\x10\x63oretex.Agent.V1\xca\x02\x10\x63oretex\\Agent\\V1\xea\x02\x12\x63oretex::Agent::V1b\x06proto3')
|
|
32
|
-
|
|
33
|
-
_globals = globals()
|
|
34
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
35
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'coretex.agent.v1.buspacket_pb2', _globals)
|
|
36
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
|
37
|
-
_globals['DESCRIPTOR']._loaded_options = None
|
|
38
|
-
_globals['DESCRIPTOR']._serialized_options = b'\n\027ai.coretex.cap.agent.v1P\001Z/github.com/coretexos/cap/v2/go/coretex/agent/v1\252\002\020coretex.Agent.V1\312\002\020coretex\\Agent\\V1\352\002\022coretex::Agent::V1'
|
|
39
|
-
_globals['_BUSPACKET']._serialized_start=180
|
|
40
|
-
_globals['_BUSPACKET']._serialized_end=534
|
|
41
|
-
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
-
# source: coretex/agent/v1/heartbeat.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
|
-
'coretex/agent/v1/heartbeat.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 coretex/agent/v1/heartbeat.proto\x12\x10\x63oretex.agent.v1\"\xa3\x02\n\tHeartbeat\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\x0e\n\x06region\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x10\n\x08\x63pu_load\x18\x04 \x01(\x02\x12\x17\n\x0fgpu_utilization\x18\x05 \x01(\x02\x12\x13\n\x0b\x61\x63tive_jobs\x18\x06 \x01(\x05\x12\x14\n\x0c\x63\x61pabilities\x18\x07 \x03(\t\x12\x0c\n\x04pool\x18\x0b \x01(\t\x12\x19\n\x11max_parallel_jobs\x18\x0c \x01(\x05\x12\x37\n\x06labels\x18\r \x03(\x0b\x32\'.coretex.agent.v1.Heartbeat.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x87\x01\n\x17\x61i.coretex.cap.agent.v1P\x01Z/github.com/coretexos/cap/v2/go/coretex/agent/v1\xaa\x02\x10\x63oretex.Agent.V1\xca\x02\x10\x63oretex\\Agent\\V1\xea\x02\x12\x63oretex::Agent::V1b\x06proto3')
|
|
28
|
-
|
|
29
|
-
_globals = globals()
|
|
30
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'coretex.agent.v1.heartbeat_pb2', _globals)
|
|
32
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
-
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
-
_globals['DESCRIPTOR']._serialized_options = b'\n\027ai.coretex.cap.agent.v1P\001Z/github.com/coretexos/cap/v2/go/coretex/agent/v1\252\002\020coretex.Agent.V1\312\002\020coretex\\Agent\\V1\352\002\022coretex::Agent::V1'
|
|
35
|
-
_globals['_HEARTBEAT_LABELSENTRY']._loaded_options = None
|
|
36
|
-
_globals['_HEARTBEAT_LABELSENTRY']._serialized_options = b'8\001'
|
|
37
|
-
_globals['_HEARTBEAT']._serialized_start=55
|
|
38
|
-
_globals['_HEARTBEAT']._serialized_end=346
|
|
39
|
-
_globals['_HEARTBEAT_LABELSENTRY']._serialized_start=301
|
|
40
|
-
_globals['_HEARTBEAT_LABELSENTRY']._serialized_end=346
|
|
41
|
-
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
-
# source: coretex/agent/v1/job.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
|
-
'coretex/agent/v1/job.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\x1a\x63oretex/agent/v1/job.proto\x12\x10\x63oretex.agent.v1\"l\n\x0c\x43ontextHints\x12\x18\n\x10max_input_tokens\x18\x01 \x01(\x05\x12\x1b\n\x13\x61llow_summarization\x18\x02 \x01(\x08\x12\x17\n\x0f\x61llow_retrieval\x18\x03 \x01(\x08\x12\x0c\n\x04tags\x18\x04 \x03(\t\"l\n\x06\x42udget\x12\x18\n\x10max_input_tokens\x18\x01 \x01(\x03\x12\x19\n\x11max_output_tokens\x18\x02 \x01(\x03\x12\x18\n\x10max_total_tokens\x18\x03 \x01(\x03\x12\x13\n\x0b\x64\x65\x61\x64line_ms\x18\x04 \x01(\x03\"\xab\x04\n\nJobRequest\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12/\n\x08priority\x18\x03 \x01(\x0e\x32\x1d.coretex.agent.v1.JobPriority\x12\x13\n\x0b\x63ontext_ptr\x18\x04 \x01(\t\x12\x12\n\nadapter_id\x18\x05 \x01(\t\x12\x32\n\x03\x65nv\x18\x06 \x03(\x0b\x32%.coretex.agent.v1.JobRequest.EnvEntry\x12\x15\n\rparent_job_id\x18\x07 \x01(\t\x12\x13\n\x0bworkflow_id\x18\x08 \x01(\t\x12\x12\n\nstep_index\x18\t \x01(\x05\x12\x11\n\tmemory_id\x18\n \x01(\t\x12\x35\n\rcontext_hints\x18\x0b \x01(\x0b\x32\x1e.coretex.agent.v1.ContextHints\x12(\n\x06\x62udget\x18\x0c \x01(\x0b\x32\x18.coretex.agent.v1.Budget\x12\x11\n\ttenant_id\x18\r \x01(\t\x12\x14\n\x0cprincipal_id\x18\x0e \x01(\t\x12\x38\n\x06labels\x18\x0f \x03(\x0b\x32(.coretex.agent.v1.JobRequest.LabelsEntry\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb0\x01\n\tJobResult\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12+\n\x06status\x18\x02 \x01(\x0e\x32\x1b.coretex.agent.v1.JobStatus\x12\x12\n\nresult_ptr\x18\x03 \x01(\t\x12\x11\n\tworker_id\x18\x04 \x01(\t\x12\x14\n\x0c\x65xecution_ms\x18\x05 \x01(\x03\x12\x12\n\nerror_code\x18\x06 \x01(\t\x12\x15\n\rerror_message\x18\x07 \x01(\t*|\n\x0bJobPriority\x12\x1c\n\x18JOB_PRIORITY_UNSPECIFIED\x10\x00\x12\x1c\n\x18JOB_PRIORITY_INTERACTIVE\x10\x01\x12\x16\n\x12JOB_PRIORITY_BATCH\x10\x02\x12\x19\n\x15JOB_PRIORITY_CRITICAL\x10\x03*\x86\x02\n\tJobStatus\x12\x1a\n\x16JOB_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12JOB_STATUS_PENDING\x10\x01\x12\x18\n\x14JOB_STATUS_SCHEDULED\x10\x02\x12\x19\n\x15JOB_STATUS_DISPATCHED\x10\x03\x12\x16\n\x12JOB_STATUS_RUNNING\x10\x04\x12\x18\n\x14JOB_STATUS_SUCCEEDED\x10\x05\x12\x15\n\x11JOB_STATUS_FAILED\x10\x06\x12\x18\n\x14JOB_STATUS_CANCELLED\x10\x07\x12\x15\n\x11JOB_STATUS_DENIED\x10\x08\x12\x16\n\x12JOB_STATUS_TIMEOUT\x10\tB\x87\x01\n\x17\x61i.coretex.cap.agent.v1P\x01Z/github.com/coretexos/cap/v2/go/coretex/agent/v1\xaa\x02\x10\x63oretex.Agent.V1\xca\x02\x10\x63oretex\\Agent\\V1\xea\x02\x12\x63oretex::Agent::V1b\x06proto3')
|
|
28
|
-
|
|
29
|
-
_globals = globals()
|
|
30
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'coretex.agent.v1.job_pb2', _globals)
|
|
32
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
-
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
-
_globals['DESCRIPTOR']._serialized_options = b'\n\027ai.coretex.cap.agent.v1P\001Z/github.com/coretexos/cap/v2/go/coretex/agent/v1\252\002\020coretex.Agent.V1\312\002\020coretex\\Agent\\V1\352\002\022coretex::Agent::V1'
|
|
35
|
-
_globals['_JOBREQUEST_ENVENTRY']._loaded_options = None
|
|
36
|
-
_globals['_JOBREQUEST_ENVENTRY']._serialized_options = b'8\001'
|
|
37
|
-
_globals['_JOBREQUEST_LABELSENTRY']._loaded_options = None
|
|
38
|
-
_globals['_JOBREQUEST_LABELSENTRY']._serialized_options = b'8\001'
|
|
39
|
-
_globals['_JOBPRIORITY']._serialized_start=1005
|
|
40
|
-
_globals['_JOBPRIORITY']._serialized_end=1129
|
|
41
|
-
_globals['_JOBSTATUS']._serialized_start=1132
|
|
42
|
-
_globals['_JOBSTATUS']._serialized_end=1394
|
|
43
|
-
_globals['_CONTEXTHINTS']._serialized_start=48
|
|
44
|
-
_globals['_CONTEXTHINTS']._serialized_end=156
|
|
45
|
-
_globals['_BUDGET']._serialized_start=158
|
|
46
|
-
_globals['_BUDGET']._serialized_end=266
|
|
47
|
-
_globals['_JOBREQUEST']._serialized_start=269
|
|
48
|
-
_globals['_JOBREQUEST']._serialized_end=824
|
|
49
|
-
_globals['_JOBREQUEST_ENVENTRY']._serialized_start=735
|
|
50
|
-
_globals['_JOBREQUEST_ENVENTRY']._serialized_end=777
|
|
51
|
-
_globals['_JOBREQUEST_LABELSENTRY']._serialized_start=779
|
|
52
|
-
_globals['_JOBREQUEST_LABELSENTRY']._serialized_end=824
|
|
53
|
-
_globals['_JOBRESULT']._serialized_start=827
|
|
54
|
-
_globals['_JOBRESULT']._serialized_end=1003
|
|
55
|
-
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
-
# source: coretex/agent/v1/safety.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
|
-
'coretex/agent/v1/safety.proto'
|
|
19
|
-
)
|
|
20
|
-
# @@protoc_insertion_point(imports)
|
|
21
|
-
|
|
22
|
-
_sym_db = _symbol_database.Default()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
from coretex.agent.v1 import job_pb2 as coretex_dot_agent_dot_v1_dot_job__pb2
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x63oretex/agent/v1/safety.proto\x12\x10\x63oretex.agent.v1\x1a\x1a\x63oretex/agent/v1/job.proto\"\xea\x02\n\x12PolicyCheckRequest\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\x12\x0e\n\x06tenant\x18\x03 \x01(\t\x12/\n\x08priority\x18\x04 \x01(\x0e\x32\x1d.coretex.agent.v1.JobPriority\x12\x16\n\x0e\x65stimated_cost\x18\x05 \x01(\x01\x12(\n\x06\x62udget\x18\x06 \x01(\x0b\x32\x18.coretex.agent.v1.Budget\x12\x14\n\x0cprincipal_id\x18\x07 \x01(\t\x12@\n\x06labels\x18\x08 \x03(\x0b\x32\x30.coretex.agent.v1.PolicyCheckRequest.LabelsEntry\x12\x11\n\tmemory_id\x18\t \x01(\t\x12\x18\n\x10\x65\x66\x66\x65\x63tive_config\x18\n \x01(\x0c\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"u\n\x13PolicyCheckResponse\x12\x30\n\x08\x64\x65\x63ision\x18\x01 \x01(\x0e\x32\x1e.coretex.agent.v1.DecisionType\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x1c\n\x14redacted_context_ptr\x18\x03 \x01(\t*\x9b\x01\n\x0c\x44\x65\x63isionType\x12\x1d\n\x19\x44\x45\x43ISION_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13\x44\x45\x43ISION_TYPE_ALLOW\x10\x01\x12\x16\n\x12\x44\x45\x43ISION_TYPE_DENY\x10\x02\x12\x1f\n\x1b\x44\x45\x43ISION_TYPE_REQUIRE_HUMAN\x10\x03\x12\x1a\n\x16\x44\x45\x43ISION_TYPE_THROTTLE\x10\x04\x32\x64\n\x0cSafetyKernel\x12T\n\x05\x43heck\x12$.coretex.agent.v1.PolicyCheckRequest\x1a%.coretex.agent.v1.PolicyCheckResponseB\x87\x01\n\x17\x61i.coretex.cap.agent.v1P\x01Z/github.com/coretexos/cap/v2/go/coretex/agent/v1\xaa\x02\x10\x63oretex.Agent.V1\xca\x02\x10\x63oretex\\Agent\\V1\xea\x02\x12\x63oretex::Agent::V1b\x06proto3')
|
|
29
|
-
|
|
30
|
-
_globals = globals()
|
|
31
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
32
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'coretex.agent.v1.safety_pb2', _globals)
|
|
33
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
|
34
|
-
_globals['DESCRIPTOR']._loaded_options = None
|
|
35
|
-
_globals['DESCRIPTOR']._serialized_options = b'\n\027ai.coretex.cap.agent.v1P\001Z/github.com/coretexos/cap/v2/go/coretex/agent/v1\252\002\020coretex.Agent.V1\312\002\020coretex\\Agent\\V1\352\002\022coretex::Agent::V1'
|
|
36
|
-
_globals['_POLICYCHECKREQUEST_LABELSENTRY']._loaded_options = None
|
|
37
|
-
_globals['_POLICYCHECKREQUEST_LABELSENTRY']._serialized_options = b'8\001'
|
|
38
|
-
_globals['_DECISIONTYPE']._serialized_start=564
|
|
39
|
-
_globals['_DECISIONTYPE']._serialized_end=719
|
|
40
|
-
_globals['_POLICYCHECKREQUEST']._serialized_start=80
|
|
41
|
-
_globals['_POLICYCHECKREQUEST']._serialized_end=442
|
|
42
|
-
_globals['_POLICYCHECKREQUEST_LABELSENTRY']._serialized_start=397
|
|
43
|
-
_globals['_POLICYCHECKREQUEST_LABELSENTRY']._serialized_end=442
|
|
44
|
-
_globals['_POLICYCHECKRESPONSE']._serialized_start=444
|
|
45
|
-
_globals['_POLICYCHECKRESPONSE']._serialized_end=561
|
|
46
|
-
_globals['_SAFETYKERNEL']._serialized_start=721
|
|
47
|
-
_globals['_SAFETYKERNEL']._serialized_end=821
|
|
48
|
-
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,100 +0,0 @@
|
|
|
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
|
-
from coretex.agent.v1 import safety_pb2 as coretex_dot_agent_dot_v1_dot_safety__pb2
|
|
7
|
-
|
|
8
|
-
GRPC_GENERATED_VERSION = '1.76.0'
|
|
9
|
-
GRPC_VERSION = grpc.__version__
|
|
10
|
-
_version_not_supported = False
|
|
11
|
-
|
|
12
|
-
try:
|
|
13
|
-
from grpc._utilities import first_version_is_lower
|
|
14
|
-
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
15
|
-
except ImportError:
|
|
16
|
-
_version_not_supported = True
|
|
17
|
-
|
|
18
|
-
if _version_not_supported:
|
|
19
|
-
raise RuntimeError(
|
|
20
|
-
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
21
|
-
+ ' but the generated code in coretex/agent/v1/safety_pb2_grpc.py depends on'
|
|
22
|
-
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
23
|
-
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
24
|
-
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class SafetyKernelStub(object):
|
|
29
|
-
"""SafetyKernel defines the policy decision service.
|
|
30
|
-
"""
|
|
31
|
-
|
|
32
|
-
def __init__(self, channel):
|
|
33
|
-
"""Constructor.
|
|
34
|
-
|
|
35
|
-
Args:
|
|
36
|
-
channel: A grpc.Channel.
|
|
37
|
-
"""
|
|
38
|
-
self.Check = channel.unary_unary(
|
|
39
|
-
'/coretex.agent.v1.SafetyKernel/Check',
|
|
40
|
-
request_serializer=coretex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
|
|
41
|
-
response_deserializer=coretex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
|
|
42
|
-
_registered_method=True)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
class SafetyKernelServicer(object):
|
|
46
|
-
"""SafetyKernel defines the policy decision service.
|
|
47
|
-
"""
|
|
48
|
-
|
|
49
|
-
def Check(self, request, context):
|
|
50
|
-
"""Missing associated documentation comment in .proto file."""
|
|
51
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
52
|
-
context.set_details('Method not implemented!')
|
|
53
|
-
raise NotImplementedError('Method not implemented!')
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
def add_SafetyKernelServicer_to_server(servicer, server):
|
|
57
|
-
rpc_method_handlers = {
|
|
58
|
-
'Check': grpc.unary_unary_rpc_method_handler(
|
|
59
|
-
servicer.Check,
|
|
60
|
-
request_deserializer=coretex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.FromString,
|
|
61
|
-
response_serializer=coretex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.SerializeToString,
|
|
62
|
-
),
|
|
63
|
-
}
|
|
64
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
|
65
|
-
'coretex.agent.v1.SafetyKernel', rpc_method_handlers)
|
|
66
|
-
server.add_generic_rpc_handlers((generic_handler,))
|
|
67
|
-
server.add_registered_method_handlers('coretex.agent.v1.SafetyKernel', rpc_method_handlers)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
# This class is part of an EXPERIMENTAL API.
|
|
71
|
-
class SafetyKernel(object):
|
|
72
|
-
"""SafetyKernel defines the policy decision service.
|
|
73
|
-
"""
|
|
74
|
-
|
|
75
|
-
@staticmethod
|
|
76
|
-
def Check(request,
|
|
77
|
-
target,
|
|
78
|
-
options=(),
|
|
79
|
-
channel_credentials=None,
|
|
80
|
-
call_credentials=None,
|
|
81
|
-
insecure=False,
|
|
82
|
-
compression=None,
|
|
83
|
-
wait_for_ready=None,
|
|
84
|
-
timeout=None,
|
|
85
|
-
metadata=None):
|
|
86
|
-
return grpc.experimental.unary_unary(
|
|
87
|
-
request,
|
|
88
|
-
target,
|
|
89
|
-
'/coretex.agent.v1.SafetyKernel/Check',
|
|
90
|
-
coretex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
|
|
91
|
-
coretex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
|
|
92
|
-
options,
|
|
93
|
-
channel_credentials,
|
|
94
|
-
insecure,
|
|
95
|
-
call_credentials,
|
|
96
|
-
compression,
|
|
97
|
-
wait_for_ready,
|
|
98
|
-
timeout,
|
|
99
|
-
metadata,
|
|
100
|
-
_registered_method=True)
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
README.md
|
|
2
|
-
pyproject.toml
|
|
3
|
-
cap/__init__.py
|
|
4
|
-
cap/bus.py
|
|
5
|
-
cap/client.py
|
|
6
|
-
cap/worker.py
|
|
7
|
-
cap/pb/__init__.py
|
|
8
|
-
cap/pb/coretex/__init__.py
|
|
9
|
-
cap/pb/coretex/agent/__init__.py
|
|
10
|
-
cap/pb/coretex/agent/v1/__init__.py
|
|
11
|
-
cap/pb/coretex/agent/v1/alert_pb2.py
|
|
12
|
-
cap/pb/coretex/agent/v1/alert_pb2_grpc.py
|
|
13
|
-
cap/pb/coretex/agent/v1/buspacket_pb2.py
|
|
14
|
-
cap/pb/coretex/agent/v1/buspacket_pb2_grpc.py
|
|
15
|
-
cap/pb/coretex/agent/v1/heartbeat_pb2.py
|
|
16
|
-
cap/pb/coretex/agent/v1/heartbeat_pb2_grpc.py
|
|
17
|
-
cap/pb/coretex/agent/v1/job_pb2.py
|
|
18
|
-
cap/pb/coretex/agent/v1/job_pb2_grpc.py
|
|
19
|
-
cap/pb/coretex/agent/v1/safety_pb2.py
|
|
20
|
-
cap/pb/coretex/agent/v1/safety_pb2_grpc.py
|
|
21
|
-
cap_sdk_python.egg-info/PKG-INFO
|
|
22
|
-
cap_sdk_python.egg-info/SOURCES.txt
|
|
23
|
-
cap_sdk_python.egg-info/dependency_links.txt
|
|
24
|
-
cap_sdk_python.egg-info/requires.txt
|
|
25
|
-
cap_sdk_python.egg-info/top_level.txt
|
|
26
|
-
tests/test_sdk.py
|
|
File without changes
|
|
File without changes
|
{cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/agent/__init__.py
RENAMED
|
File without changes
|
{cap_sdk_python-2.0.6/cap/pb/coretex → cap_sdk_python-2.0.11/cap/pb/cordum}/agent/v1/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|