File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed
Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,10 @@ def __init__(
6868 self .name = name
6969 self ._workflow_grpc_options = workflow_grpc_options
7070
71- if pubsub is None or state is None or registry is None :
72- with DaprClient () as _client :
73- resp : GetMetadataResponse = _client .get_metadata ()
71+ with DaprClient () as _client :
72+ resp : GetMetadataResponse = _client .get_metadata ()
73+ self .appid = resp .application_id
74+ if pubsub is None or state is None or registry is None :
7475 components : Sequence [RegisteredComponents ] = resp .registered_components
7576 for component in components :
7677 if (
@@ -513,6 +514,7 @@ def register_agentic_system(
513514 payload ["agent" ] = {}
514515
515516 payload ["agent" ]["type" ] = type (self ).__name__
517+ payload ["agent" ]["appid" ] = self .appid
516518 payload .setdefault ("registered_at" , datetime .now (timezone .utc ).isoformat ())
517519
518520 if self ._pubsub is not None :
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ def get_metadata(self):
9191
9292 response = MagicMock ()
9393 response .registered_components = []
94+ response .application_id = "test-app-id"
9495 return response
9596
9697
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ def get_metadata(self):
5353
5454 response = MagicMock ()
5555 response .registered_components = []
56+ response .application_id = "test-app-id"
5657 return response
5758
5859 statestore .DaprClient = MockDaprClient
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ def get_metadata(self):
113113 """Mock get_metadata that returns empty metadata."""
114114 response = MagicMock ()
115115 response .registered_components = []
116+ response .application_id = "test-app-id"
116117 return response
117118
118119
You can’t perform that action at this time.
0 commit comments