cap-sdk-python 2.0.1__tar.gz → 2.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/PKG-INFO +4 -4
  2. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/README.md +2 -2
  3. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/cap/client.py +1 -1
  4. {cap_sdk_python-2.0.1/cap/pb/cortex → cap_sdk_python-2.0.2/cap/pb/coretex}/agent/v1/alert_pb2.py +7 -7
  5. {cap_sdk_python-2.0.1/cap/pb/cortex → cap_sdk_python-2.0.2/cap/pb/coretex}/agent/v1/alert_pb2_grpc.py +1 -1
  6. cap_sdk_python-2.0.2/cap/pb/coretex/agent/v1/buspacket_pb2.py +41 -0
  7. {cap_sdk_python-2.0.1/cap/pb/cortex → cap_sdk_python-2.0.2/cap/pb/coretex}/agent/v1/buspacket_pb2_grpc.py +1 -1
  8. cap_sdk_python-2.0.2/cap/pb/coretex/agent/v1/heartbeat_pb2.py +41 -0
  9. {cap_sdk_python-2.0.1/cap/pb/cortex → cap_sdk_python-2.0.2/cap/pb/coretex}/agent/v1/heartbeat_pb2_grpc.py +1 -1
  10. cap_sdk_python-2.0.2/cap/pb/coretex/agent/v1/job_pb2.py +55 -0
  11. {cap_sdk_python-2.0.1/cap/pb/cortex → cap_sdk_python-2.0.2/cap/pb/coretex}/agent/v1/job_pb2_grpc.py +1 -1
  12. cap_sdk_python-2.0.2/cap/pb/coretex/agent/v1/safety_pb2.py +48 -0
  13. {cap_sdk_python-2.0.1/cap/pb/cortex → cap_sdk_python-2.0.2/cap/pb/coretex}/agent/v1/safety_pb2_grpc.py +12 -12
  14. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/cap/worker.py +1 -1
  15. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/cap_sdk_python.egg-info/PKG-INFO +4 -4
  16. cap_sdk_python-2.0.2/cap_sdk_python.egg-info/SOURCES.txt +26 -0
  17. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/pyproject.toml +2 -2
  18. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/tests/test_sdk.py +3 -3
  19. cap_sdk_python-2.0.1/cap/pb/cortex/agent/v1/buspacket_pb2.py +0 -41
  20. cap_sdk_python-2.0.1/cap/pb/cortex/agent/v1/heartbeat_pb2.py +0 -41
  21. cap_sdk_python-2.0.1/cap/pb/cortex/agent/v1/job_pb2.py +0 -55
  22. cap_sdk_python-2.0.1/cap/pb/cortex/agent/v1/safety_pb2.py +0 -48
  23. cap_sdk_python-2.0.1/cap_sdk_python.egg-info/SOURCES.txt +0 -26
  24. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/cap/__init__.py +0 -0
  25. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/cap/bus.py +0 -0
  26. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/cap/pb/__init__.py +0 -0
  27. {cap_sdk_python-2.0.1/cap/pb/cortex → cap_sdk_python-2.0.2/cap/pb/coretex}/__init__.py +0 -0
  28. {cap_sdk_python-2.0.1/cap/pb/cortex → cap_sdk_python-2.0.2/cap/pb/coretex}/agent/__init__.py +0 -0
  29. {cap_sdk_python-2.0.1/cap/pb/cortex → cap_sdk_python-2.0.2/cap/pb/coretex}/agent/v1/__init__.py +0 -0
  30. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/cap_sdk_python.egg-info/dependency_links.txt +0 -0
  31. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/cap_sdk_python.egg-info/requires.txt +0 -0
  32. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/cap_sdk_python.egg-info/top_level.txt +0 -0
  33. {cap_sdk_python-2.0.1 → cap_sdk_python-2.0.2}/setup.cfg +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cap-sdk-python
3
- Version: 2.0.1
4
- Summary: CAP (Cortex Agent Protocol) Python SDK
3
+ Version: 2.0.2
4
+ Summary: CAP (coretex Agent Protocol) Python SDK
5
5
  Project-URL: Homepage, https://github.com/coretexos/cap
6
6
  Requires-Python: >=3.9
7
7
  Description-Content-Type: text/markdown
@@ -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/cortex/agent/v1/*.proto
23
+ ../../proto/coretex/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.cortex.agent.v1 import job_pb2
36
+ from cap.pb.coretex.agent.v1 import job_pb2
37
37
 
38
38
  async def handle(req: job_pb2.JobRequest):
39
39
  return job_pb2.JobResult(
@@ -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/cortex/agent/v1/*.proto
12
+ ../../proto/coretex/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.cortex.agent.v1 import job_pb2
25
+ from cap.pb.coretex.agent.v1 import job_pb2
26
26
 
27
27
  async def handle(req: job_pb2.JobRequest):
28
28
  return job_pb2.JobResult(
@@ -1,6 +1,6 @@
1
1
  import nats
2
2
  from google.protobuf import timestamp_pb2
3
- from cap.pb.cortex.agent.v1 import buspacket_pb2
3
+ from cap.pb.coretex.agent.v1 import buspacket_pb2
4
4
  from cryptography.hazmat.primitives.asymmetric import ec
5
5
  from cryptography.hazmat.primitives import hashes
6
6
  import hashlib
@@ -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: cortex/agent/v1/alert.proto
4
+ # source: coretex/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
- 'cortex/agent/v1/alert.proto'
18
+ 'coretex/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\x1b\x63ortex/agent/v1/alert.proto\x12\x0f\x63ortex.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\x82\x01\n\x16\x61i.cortex.cap.agent.v1P\x01Z.github.com/coretexos/cap/v2/go/cortex/agent/v1\xaa\x02\x0f\x43ortex.Agent.V1\xca\x02\x0f\x43ortex\\Agent\\V1\xea\x02\x11\x43ortex::Agent::V1b\x06proto3')
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x63oretex/agent/v1/alert.proto\x12\x10\x63oretex.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\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
28
 
29
29
  _globals = globals()
30
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cortex.agent.v1.alert_pb2', _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'coretex.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\026ai.cortex.cap.agent.v1P\001Z.github.com/coretexos/cap/v2/go/cortex/agent/v1\252\002\017Cortex.Agent.V1\312\002\017Cortex\\Agent\\V1\352\002\021Cortex::Agent::V1'
35
- _globals['_SYSTEMALERT']._serialized_start=48
36
- _globals['_SYSTEMALERT']._serialized_end=126
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['_SYSTEMALERT']._serialized_start=50
36
+ _globals['_SYSTEMALERT']._serialized_end=128
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 cortex/agent/v1/alert_pb2_grpc.py depends on'
20
+ + ' but the generated code in coretex/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: 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)
@@ -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 cortex/agent/v1/buspacket_pb2_grpc.py depends on'
20
+ + ' but the generated code in coretex/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: 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)
@@ -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 cortex/agent/v1/heartbeat_pb2_grpc.py depends on'
20
+ + ' but the generated code in coretex/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,55 @@
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)
@@ -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 cortex/agent/v1/job_pb2_grpc.py depends on'
20
+ + ' but the generated code in coretex/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,48 @@
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\"\xd0\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\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=538
39
+ _globals['_DECISIONTYPE']._serialized_end=693
40
+ _globals['_POLICYCHECKREQUEST']._serialized_start=80
41
+ _globals['_POLICYCHECKREQUEST']._serialized_end=416
42
+ _globals['_POLICYCHECKREQUEST_LABELSENTRY']._serialized_start=371
43
+ _globals['_POLICYCHECKREQUEST_LABELSENTRY']._serialized_end=416
44
+ _globals['_POLICYCHECKRESPONSE']._serialized_start=418
45
+ _globals['_POLICYCHECKRESPONSE']._serialized_end=535
46
+ _globals['_SAFETYKERNEL']._serialized_start=695
47
+ _globals['_SAFETYKERNEL']._serialized_end=795
48
+ # @@protoc_insertion_point(module_scope)
@@ -3,7 +3,7 @@
3
3
  import grpc
4
4
  import warnings
5
5
 
6
- from cortex.agent.v1 import safety_pb2 as cortex_dot_agent_dot_v1_dot_safety__pb2
6
+ from coretex.agent.v1 import safety_pb2 as coretex_dot_agent_dot_v1_dot_safety__pb2
7
7
 
8
8
  GRPC_GENERATED_VERSION = '1.76.0'
9
9
  GRPC_VERSION = grpc.__version__
@@ -18,7 +18,7 @@ except ImportError:
18
18
  if _version_not_supported:
19
19
  raise RuntimeError(
20
20
  f'The grpc package installed is at version {GRPC_VERSION},'
21
- + ' but the generated code in cortex/agent/v1/safety_pb2_grpc.py depends on'
21
+ + ' but the generated code in coretex/agent/v1/safety_pb2_grpc.py depends on'
22
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -36,9 +36,9 @@ class SafetyKernelStub(object):
36
36
  channel: A grpc.Channel.
37
37
  """
38
38
  self.Check = channel.unary_unary(
39
- '/cortex.agent.v1.SafetyKernel/Check',
40
- request_serializer=cortex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
41
- response_deserializer=cortex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
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
42
  _registered_method=True)
43
43
 
44
44
 
@@ -57,14 +57,14 @@ def add_SafetyKernelServicer_to_server(servicer, server):
57
57
  rpc_method_handlers = {
58
58
  'Check': grpc.unary_unary_rpc_method_handler(
59
59
  servicer.Check,
60
- request_deserializer=cortex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.FromString,
61
- response_serializer=cortex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.SerializeToString,
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
62
  ),
63
63
  }
64
64
  generic_handler = grpc.method_handlers_generic_handler(
65
- 'cortex.agent.v1.SafetyKernel', rpc_method_handlers)
65
+ 'coretex.agent.v1.SafetyKernel', rpc_method_handlers)
66
66
  server.add_generic_rpc_handlers((generic_handler,))
67
- server.add_registered_method_handlers('cortex.agent.v1.SafetyKernel', rpc_method_handlers)
67
+ server.add_registered_method_handlers('coretex.agent.v1.SafetyKernel', rpc_method_handlers)
68
68
 
69
69
 
70
70
  # This class is part of an EXPERIMENTAL API.
@@ -86,9 +86,9 @@ class SafetyKernel(object):
86
86
  return grpc.experimental.unary_unary(
87
87
  request,
88
88
  target,
89
- '/cortex.agent.v1.SafetyKernel/Check',
90
- cortex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckRequest.SerializeToString,
91
- cortex_dot_agent_dot_v1_dot_safety__pb2.PolicyCheckResponse.FromString,
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
92
  options,
93
93
  channel_credentials,
94
94
  insecure,
@@ -3,7 +3,7 @@ from typing import Callable, Awaitable, Dict
3
3
 
4
4
  import nats
5
5
  from google.protobuf import timestamp_pb2
6
- from cap.pb.cortex.agent.v1 import buspacket_pb2, job_pb2
6
+ from cap.pb.coretex.agent.v1 import buspacket_pb2, job_pb2
7
7
  from cryptography.hazmat.primitives.asymmetric import ec
8
8
  from cryptography.hazmat.primitives import hashes
9
9
  import hashlib
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cap-sdk-python
3
- Version: 2.0.1
4
- Summary: CAP (Cortex Agent Protocol) Python SDK
3
+ Version: 2.0.2
4
+ Summary: CAP (coretex Agent Protocol) Python SDK
5
5
  Project-URL: Homepage, https://github.com/coretexos/cap
6
6
  Requires-Python: >=3.9
7
7
  Description-Content-Type: text/markdown
@@ -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/cortex/agent/v1/*.proto
23
+ ../../proto/coretex/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.cortex.agent.v1 import job_pb2
36
+ from cap.pb.coretex.agent.v1 import job_pb2
37
37
 
38
38
  async def handle(req: job_pb2.JobRequest):
39
39
  return job_pb2.JobResult(
@@ -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/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
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cap-sdk-python"
7
- version = "2.0.1"
8
- description = "CAP (Cortex Agent Protocol) Python SDK"
7
+ version = "2.0.2"
8
+ description = "CAP (coretex Agent Protocol) Python SDK"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
11
11
  dependencies = [
@@ -6,13 +6,13 @@ from typing import Callable, Awaitable, Dict
6
6
 
7
7
  # Avoid loading duplicate generated stubs from both /python and sdk/python/cap/pb.
8
8
  sys.path = [p for p in sys.path if not p.rstrip("/").endswith("python")]
9
- # Ensure generated modules under sdk/python/cap/pb are discoverable for `cortex.agent.v1.*`.
9
+ # Ensure generated modules under sdk/python/cap/pb are discoverable for `coretex.agent.v1.*`.
10
10
  sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "cap", "pb")))
11
11
 
12
12
  from cryptography.hazmat.primitives.asymmetric import ec
13
13
  from cryptography.hazmat.primitives import hashes
14
14
 
15
- from cap.pb.cortex.agent.v1 import job_pb2
15
+ from cap.pb.coretex.agent.v1 import job_pb2
16
16
  from cap import client
17
17
  from cap import worker
18
18
 
@@ -84,7 +84,7 @@ class TestSDK(unittest.TestCase):
84
84
  self.assertEqual(subj, worker.SUBJECT_RESULT)
85
85
 
86
86
  # Verify the signature of the result
87
- from cap.pb.cortex.agent.v1 import buspacket_pb2
87
+ from cap.pb.coretex.agent.v1 import buspacket_pb2
88
88
  import hashlib
89
89
  result_packet = buspacket_pb2.BusPacket()
90
90
  result_packet.ParseFromString(data)
@@ -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: cortex/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
- 'cortex/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 cortex.agent.v1 import job_pb2 as cortex_dot_agent_dot_v1_dot_job__pb2
27
- from cortex.agent.v1 import heartbeat_pb2 as cortex_dot_agent_dot_v1_dot_heartbeat__pb2
28
- from cortex.agent.v1 import alert_pb2 as cortex_dot_agent_dot_v1_dot_alert__pb2
29
-
30
-
31
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x63ortex/agent/v1/buspacket.proto\x12\x0f\x63ortex.agent.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x19\x63ortex/agent/v1/job.proto\x1a\x1f\x63ortex/agent/v1/heartbeat.proto\x1a\x1b\x63ortex/agent/v1/alert.proto\"\xde\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\x32\n\x0bjob_request\x18\n \x01(\x0b\x32\x1b.cortex.agent.v1.JobRequestH\x00\x12\x30\n\njob_result\x18\x0b \x01(\x0b\x32\x1a.cortex.agent.v1.JobResultH\x00\x12/\n\theartbeat\x18\x0c \x01(\x0b\x32\x1a.cortex.agent.v1.HeartbeatH\x00\x12-\n\x05\x61lert\x18\r \x01(\x0b\x32\x1c.cortex.agent.v1.SystemAlertH\x00\x12\x11\n\tsignature\x18\x0e \x01(\x0c\x42\t\n\x07payloadB\x82\x01\n\x16\x61i.cortex.cap.agent.v1P\x01Z.github.com/coretexos/cap/v2/go/cortex/agent/v1\xaa\x02\x0f\x43ortex.Agent.V1\xca\x02\x0f\x43ortex\\Agent\\V1\xea\x02\x11\x43ortex::Agent::V1b\x06proto3')
32
-
33
- _globals = globals()
34
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
35
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cortex.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\026ai.cortex.cap.agent.v1P\001Z.github.com/coretexos/cap/v2/go/cortex/agent/v1\252\002\017Cortex.Agent.V1\312\002\017Cortex\\Agent\\V1\352\002\021Cortex::Agent::V1'
39
- _globals['_BUSPACKET']._serialized_start=175
40
- _globals['_BUSPACKET']._serialized_end=525
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: cortex/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
- 'cortex/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\x63ortex/agent/v1/heartbeat.proto\x12\x0f\x63ortex.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&.cortex.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\x82\x01\n\x16\x61i.cortex.cap.agent.v1P\x01Z.github.com/coretexos/cap/v2/go/cortex/agent/v1\xaa\x02\x0f\x43ortex.Agent.V1\xca\x02\x0f\x43ortex\\Agent\\V1\xea\x02\x11\x43ortex::Agent::V1b\x06proto3')
28
-
29
- _globals = globals()
30
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cortex.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\026ai.cortex.cap.agent.v1P\001Z.github.com/coretexos/cap/v2/go/cortex/agent/v1\252\002\017Cortex.Agent.V1\312\002\017Cortex\\Agent\\V1\352\002\021Cortex::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)
@@ -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: cortex/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
- 'cortex/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\x63ortex/agent/v1/job.proto\x12\x0f\x63ortex.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\"\xa6\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.cortex.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$.cortex.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.cortex.agent.v1.ContextHints\x12\'\n\x06\x62udget\x18\x0c \x01(\x0b\x32\x17.cortex.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\'.cortex.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\"\xaf\x01\n\tJobResult\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12*\n\x06status\x18\x02 \x01(\x0e\x32\x1a.cortex.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\x82\x01\n\x16\x61i.cortex.cap.agent.v1P\x01Z.github.com/coretexos/cap/v2/go/cortex/agent/v1\xaa\x02\x0f\x43ortex.Agent.V1\xca\x02\x0f\x43ortex\\Agent\\V1\xea\x02\x11\x43ortex::Agent::V1b\x06proto3')
28
-
29
- _globals = globals()
30
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cortex.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\026ai.cortex.cap.agent.v1P\001Z.github.com/coretexos/cap/v2/go/cortex/agent/v1\252\002\017Cortex.Agent.V1\312\002\017Cortex\\Agent\\V1\352\002\021Cortex::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=997
40
- _globals['_JOBPRIORITY']._serialized_end=1121
41
- _globals['_JOBSTATUS']._serialized_start=1124
42
- _globals['_JOBSTATUS']._serialized_end=1386
43
- _globals['_CONTEXTHINTS']._serialized_start=46
44
- _globals['_CONTEXTHINTS']._serialized_end=154
45
- _globals['_BUDGET']._serialized_start=156
46
- _globals['_BUDGET']._serialized_end=264
47
- _globals['_JOBREQUEST']._serialized_start=267
48
- _globals['_JOBREQUEST']._serialized_end=817
49
- _globals['_JOBREQUEST_ENVENTRY']._serialized_start=728
50
- _globals['_JOBREQUEST_ENVENTRY']._serialized_end=770
51
- _globals['_JOBREQUEST_LABELSENTRY']._serialized_start=772
52
- _globals['_JOBREQUEST_LABELSENTRY']._serialized_end=817
53
- _globals['_JOBRESULT']._serialized_start=820
54
- _globals['_JOBRESULT']._serialized_end=995
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: cortex/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
- 'cortex/agent/v1/safety.proto'
19
- )
20
- # @@protoc_insertion_point(imports)
21
-
22
- _sym_db = _symbol_database.Default()
23
-
24
-
25
- from cortex.agent.v1 import job_pb2 as cortex_dot_agent_dot_v1_dot_job__pb2
26
-
27
-
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x63ortex/agent/v1/safety.proto\x12\x0f\x63ortex.agent.v1\x1a\x19\x63ortex/agent/v1/job.proto\"\xcd\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\x1c.cortex.agent.v1.JobPriority\x12\x16\n\x0e\x65stimated_cost\x18\x05 \x01(\x01\x12\'\n\x06\x62udget\x18\x06 \x01(\x0b\x32\x17.cortex.agent.v1.Budget\x12\x14\n\x0cprincipal_id\x18\x07 \x01(\t\x12?\n\x06labels\x18\x08 \x03(\x0b\x32/.cortex.agent.v1.PolicyCheckRequest.LabelsEntry\x12\x11\n\tmemory_id\x18\t \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"t\n\x13PolicyCheckResponse\x12/\n\x08\x64\x65\x63ision\x18\x01 \x01(\x0e\x32\x1d.cortex.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\x62\n\x0cSafetyKernel\x12R\n\x05\x43heck\x12#.cortex.agent.v1.PolicyCheckRequest\x1a$.cortex.agent.v1.PolicyCheckResponseB\x82\x01\n\x16\x61i.cortex.cap.agent.v1P\x01Z.github.com/coretexos/cap/v2/go/cortex/agent/v1\xaa\x02\x0f\x43ortex.Agent.V1\xca\x02\x0f\x43ortex\\Agent\\V1\xea\x02\x11\x43ortex::Agent::V1b\x06proto3')
29
-
30
- _globals = globals()
31
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cortex.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\026ai.cortex.cap.agent.v1P\001Z.github.com/coretexos/cap/v2/go/cortex/agent/v1\252\002\017Cortex.Agent.V1\312\002\017Cortex\\Agent\\V1\352\002\021Cortex::Agent::V1'
36
- _globals['_POLICYCHECKREQUEST_LABELSENTRY']._loaded_options = None
37
- _globals['_POLICYCHECKREQUEST_LABELSENTRY']._serialized_options = b'8\001'
38
- _globals['_DECISIONTYPE']._serialized_start=531
39
- _globals['_DECISIONTYPE']._serialized_end=686
40
- _globals['_POLICYCHECKREQUEST']._serialized_start=77
41
- _globals['_POLICYCHECKREQUEST']._serialized_end=410
42
- _globals['_POLICYCHECKREQUEST_LABELSENTRY']._serialized_start=365
43
- _globals['_POLICYCHECKREQUEST_LABELSENTRY']._serialized_end=410
44
- _globals['_POLICYCHECKRESPONSE']._serialized_start=412
45
- _globals['_POLICYCHECKRESPONSE']._serialized_end=528
46
- _globals['_SAFETYKERNEL']._serialized_start=688
47
- _globals['_SAFETYKERNEL']._serialized_end=786
48
- # @@protoc_insertion_point(module_scope)
@@ -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/cortex/__init__.py
9
- cap/pb/cortex/agent/__init__.py
10
- cap/pb/cortex/agent/v1/__init__.py
11
- cap/pb/cortex/agent/v1/alert_pb2.py
12
- cap/pb/cortex/agent/v1/alert_pb2_grpc.py
13
- cap/pb/cortex/agent/v1/buspacket_pb2.py
14
- cap/pb/cortex/agent/v1/buspacket_pb2_grpc.py
15
- cap/pb/cortex/agent/v1/heartbeat_pb2.py
16
- cap/pb/cortex/agent/v1/heartbeat_pb2_grpc.py
17
- cap/pb/cortex/agent/v1/job_pb2.py
18
- cap/pb/cortex/agent/v1/job_pb2_grpc.py
19
- cap/pb/cortex/agent/v1/safety_pb2.py
20
- cap/pb/cortex/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