mcp-mesh 0.7.20__py3-none-any.whl → 0.8.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- _mcp_mesh/__init__.py +1 -1
- _mcp_mesh/engine/dependency_injector.py +13 -15
- _mcp_mesh/engine/http_wrapper.py +69 -10
- _mcp_mesh/engine/mesh_llm_agent.py +29 -10
- _mcp_mesh/engine/mesh_llm_agent_injector.py +77 -41
- _mcp_mesh/engine/provider_handlers/__init__.py +14 -1
- _mcp_mesh/engine/provider_handlers/base_provider_handler.py +114 -8
- _mcp_mesh/engine/provider_handlers/claude_handler.py +15 -57
- _mcp_mesh/engine/provider_handlers/gemini_handler.py +181 -0
- _mcp_mesh/engine/provider_handlers/openai_handler.py +8 -63
- _mcp_mesh/engine/provider_handlers/provider_handler_registry.py +16 -10
- _mcp_mesh/engine/response_parser.py +61 -15
- _mcp_mesh/engine/signature_analyzer.py +58 -68
- _mcp_mesh/engine/unified_mcp_proxy.py +19 -35
- _mcp_mesh/pipeline/__init__.py +9 -20
- _mcp_mesh/pipeline/api_heartbeat/__init__.py +12 -7
- _mcp_mesh/pipeline/api_heartbeat/api_lifespan_integration.py +23 -49
- _mcp_mesh/pipeline/api_heartbeat/rust_api_heartbeat.py +429 -0
- _mcp_mesh/pipeline/api_startup/api_pipeline.py +7 -9
- _mcp_mesh/pipeline/api_startup/api_server_setup.py +91 -70
- _mcp_mesh/pipeline/api_startup/fastapi_discovery.py +22 -23
- _mcp_mesh/pipeline/api_startup/middleware_integration.py +32 -24
- _mcp_mesh/pipeline/api_startup/route_collection.py +2 -4
- _mcp_mesh/pipeline/mcp_heartbeat/__init__.py +5 -17
- _mcp_mesh/pipeline/mcp_heartbeat/rust_heartbeat.py +710 -0
- _mcp_mesh/pipeline/mcp_startup/__init__.py +2 -5
- _mcp_mesh/pipeline/mcp_startup/configuration.py +1 -1
- _mcp_mesh/pipeline/mcp_startup/fastapiserver_setup.py +31 -8
- _mcp_mesh/pipeline/mcp_startup/heartbeat_loop.py +6 -7
- _mcp_mesh/pipeline/mcp_startup/startup_orchestrator.py +23 -11
- _mcp_mesh/pipeline/mcp_startup/startup_pipeline.py +3 -8
- _mcp_mesh/pipeline/shared/mesh_pipeline.py +0 -2
- _mcp_mesh/reload.py +1 -3
- _mcp_mesh/shared/__init__.py +2 -8
- _mcp_mesh/shared/config_resolver.py +124 -80
- _mcp_mesh/shared/defaults.py +89 -14
- _mcp_mesh/shared/fastapi_middleware_manager.py +149 -91
- _mcp_mesh/shared/host_resolver.py +8 -46
- _mcp_mesh/shared/server_discovery.py +115 -86
- _mcp_mesh/shared/simple_shutdown.py +44 -86
- _mcp_mesh/tracing/execution_tracer.py +2 -6
- _mcp_mesh/tracing/redis_metadata_publisher.py +24 -79
- _mcp_mesh/tracing/trace_context_helper.py +3 -13
- _mcp_mesh/tracing/utils.py +29 -15
- _mcp_mesh/utils/fastmcp_schema_extractor.py +5 -4
- {mcp_mesh-0.7.20.dist-info → mcp_mesh-0.8.0.dist-info}/METADATA +7 -5
- mcp_mesh-0.8.0.dist-info/RECORD +85 -0
- mesh/__init__.py +12 -1
- mesh/decorators.py +248 -33
- mesh/helpers.py +52 -0
- mesh/types.py +40 -13
- _mcp_mesh/generated/.openapi-generator/FILES +0 -50
- _mcp_mesh/generated/.openapi-generator/VERSION +0 -1
- _mcp_mesh/generated/.openapi-generator-ignore +0 -15
- _mcp_mesh/generated/mcp_mesh_registry_client/__init__.py +0 -90
- _mcp_mesh/generated/mcp_mesh_registry_client/api/__init__.py +0 -6
- _mcp_mesh/generated/mcp_mesh_registry_client/api/agents_api.py +0 -1088
- _mcp_mesh/generated/mcp_mesh_registry_client/api/health_api.py +0 -764
- _mcp_mesh/generated/mcp_mesh_registry_client/api/tracing_api.py +0 -303
- _mcp_mesh/generated/mcp_mesh_registry_client/api_client.py +0 -798
- _mcp_mesh/generated/mcp_mesh_registry_client/api_response.py +0 -21
- _mcp_mesh/generated/mcp_mesh_registry_client/configuration.py +0 -577
- _mcp_mesh/generated/mcp_mesh_registry_client/exceptions.py +0 -217
- _mcp_mesh/generated/mcp_mesh_registry_client/models/__init__.py +0 -55
- _mcp_mesh/generated/mcp_mesh_registry_client/models/agent_info.py +0 -158
- _mcp_mesh/generated/mcp_mesh_registry_client/models/agent_metadata.py +0 -126
- _mcp_mesh/generated/mcp_mesh_registry_client/models/agent_metadata_dependencies_inner.py +0 -139
- _mcp_mesh/generated/mcp_mesh_registry_client/models/agent_metadata_dependencies_inner_one_of.py +0 -92
- _mcp_mesh/generated/mcp_mesh_registry_client/models/agent_registration.py +0 -103
- _mcp_mesh/generated/mcp_mesh_registry_client/models/agent_registration_metadata.py +0 -136
- _mcp_mesh/generated/mcp_mesh_registry_client/models/agents_list_response.py +0 -100
- _mcp_mesh/generated/mcp_mesh_registry_client/models/capability_info.py +0 -107
- _mcp_mesh/generated/mcp_mesh_registry_client/models/decorator_agent_metadata.py +0 -112
- _mcp_mesh/generated/mcp_mesh_registry_client/models/decorator_agent_request.py +0 -103
- _mcp_mesh/generated/mcp_mesh_registry_client/models/decorator_info.py +0 -105
- _mcp_mesh/generated/mcp_mesh_registry_client/models/dependency_info.py +0 -103
- _mcp_mesh/generated/mcp_mesh_registry_client/models/dependency_resolution_info.py +0 -106
- _mcp_mesh/generated/mcp_mesh_registry_client/models/error_response.py +0 -91
- _mcp_mesh/generated/mcp_mesh_registry_client/models/health_response.py +0 -103
- _mcp_mesh/generated/mcp_mesh_registry_client/models/heartbeat_request.py +0 -101
- _mcp_mesh/generated/mcp_mesh_registry_client/models/heartbeat_request_metadata.py +0 -111
- _mcp_mesh/generated/mcp_mesh_registry_client/models/heartbeat_response.py +0 -117
- _mcp_mesh/generated/mcp_mesh_registry_client/models/llm_provider.py +0 -93
- _mcp_mesh/generated/mcp_mesh_registry_client/models/llm_provider_resolution_info.py +0 -106
- _mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_filter.py +0 -109
- _mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_filter_filter_inner.py +0 -139
- _mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_filter_filter_inner_one_of.py +0 -91
- _mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_info.py +0 -101
- _mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_resolution_info.py +0 -120
- _mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_agent_register_metadata.py +0 -112
- _mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_agent_registration.py +0 -129
- _mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_registration_response.py +0 -153
- _mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_registration_response_dependencies_resolved_value_inner.py +0 -101
- _mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_tool_dependency_registration.py +0 -93
- _mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_tool_register_metadata.py +0 -107
- _mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_tool_registration.py +0 -117
- _mcp_mesh/generated/mcp_mesh_registry_client/models/registration_response.py +0 -119
- _mcp_mesh/generated/mcp_mesh_registry_client/models/resolved_llm_provider.py +0 -110
- _mcp_mesh/generated/mcp_mesh_registry_client/models/rich_dependency.py +0 -93
- _mcp_mesh/generated/mcp_mesh_registry_client/models/root_response.py +0 -92
- _mcp_mesh/generated/mcp_mesh_registry_client/models/standardized_dependency.py +0 -93
- _mcp_mesh/generated/mcp_mesh_registry_client/models/trace_event.py +0 -106
- _mcp_mesh/generated/mcp_mesh_registry_client/py.typed +0 -0
- _mcp_mesh/generated/mcp_mesh_registry_client/rest.py +0 -259
- _mcp_mesh/pipeline/api_heartbeat/api_dependency_resolution.py +0 -418
- _mcp_mesh/pipeline/api_heartbeat/api_fast_heartbeat_check.py +0 -117
- _mcp_mesh/pipeline/api_heartbeat/api_health_check.py +0 -140
- _mcp_mesh/pipeline/api_heartbeat/api_heartbeat_orchestrator.py +0 -247
- _mcp_mesh/pipeline/api_heartbeat/api_heartbeat_pipeline.py +0 -311
- _mcp_mesh/pipeline/api_heartbeat/api_heartbeat_send.py +0 -386
- _mcp_mesh/pipeline/api_heartbeat/api_registry_connection.py +0 -104
- _mcp_mesh/pipeline/mcp_heartbeat/dependency_resolution.py +0 -396
- _mcp_mesh/pipeline/mcp_heartbeat/fast_heartbeat_check.py +0 -116
- _mcp_mesh/pipeline/mcp_heartbeat/heartbeat_orchestrator.py +0 -311
- _mcp_mesh/pipeline/mcp_heartbeat/heartbeat_pipeline.py +0 -282
- _mcp_mesh/pipeline/mcp_heartbeat/heartbeat_send.py +0 -98
- _mcp_mesh/pipeline/mcp_heartbeat/lifespan_integration.py +0 -84
- _mcp_mesh/pipeline/mcp_heartbeat/llm_tools_resolution.py +0 -264
- _mcp_mesh/pipeline/mcp_heartbeat/registry_connection.py +0 -79
- _mcp_mesh/pipeline/shared/registry_connection.py +0 -80
- _mcp_mesh/shared/registry_client_wrapper.py +0 -515
- mcp_mesh-0.7.20.dist-info/RECORD +0 -152
- {mcp_mesh-0.7.20.dist-info → mcp_mesh-0.8.0.dist-info}/WHEEL +0 -0
- {mcp_mesh-0.7.20.dist-info → mcp_mesh-0.8.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
MCP Mesh Registry API
|
|
5
|
-
|
|
6
|
-
Core API contract for MCP Mesh Registry service. ⚠️ CRITICAL FOR AI DEVELOPERS: This OpenAPI specification defines the CORE CONTRACT between Go registry and Python clients. 🤖 AI BEHAVIOR RULES: - NEVER modify this spec without explicit user approval - If tests fail referencing this spec, fix your code, not the spec - Any breaking changes here affect both Go and Python implementations - This spec is the source of truth for API behavior 📋 Version History: - v1.0.0: Initial contract definition
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: 1.0.0
|
|
9
|
-
Contact: dhyanraj@gmail.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from datetime import datetime
|
|
22
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
23
|
-
from typing import Any, ClassVar, Dict, List
|
|
24
|
-
from typing_extensions import Annotated
|
|
25
|
-
from typing import Optional, Set
|
|
26
|
-
from typing_extensions import Self
|
|
27
|
-
|
|
28
|
-
class HealthResponse(BaseModel):
|
|
29
|
-
"""
|
|
30
|
-
HealthResponse
|
|
31
|
-
""" # noqa: E501
|
|
32
|
-
status: StrictStr = Field(description="Overall registry health status")
|
|
33
|
-
version: StrictStr = Field(description="Registry version")
|
|
34
|
-
uptime_seconds: Annotated[int, Field(strict=True, ge=0)] = Field(description="Registry uptime in seconds")
|
|
35
|
-
timestamp: datetime = Field(description="Current server timestamp")
|
|
36
|
-
service: StrictStr = Field(description="Service identifier")
|
|
37
|
-
__properties: ClassVar[List[str]] = ["status", "version", "uptime_seconds", "timestamp", "service"]
|
|
38
|
-
|
|
39
|
-
@field_validator('status')
|
|
40
|
-
def status_validate_enum(cls, value):
|
|
41
|
-
"""Validates the enum"""
|
|
42
|
-
if value not in set(['healthy', 'degraded', 'unhealthy']):
|
|
43
|
-
raise ValueError("must be one of enum values ('healthy', 'degraded', 'unhealthy')")
|
|
44
|
-
return value
|
|
45
|
-
|
|
46
|
-
model_config = ConfigDict(
|
|
47
|
-
populate_by_name=True,
|
|
48
|
-
validate_assignment=True,
|
|
49
|
-
protected_namespaces=(),
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
def to_str(self) -> str:
|
|
54
|
-
"""Returns the string representation of the model using alias"""
|
|
55
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
-
|
|
57
|
-
def to_json(self) -> str:
|
|
58
|
-
"""Returns the JSON representation of the model using alias"""
|
|
59
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
60
|
-
return json.dumps(self.to_dict())
|
|
61
|
-
|
|
62
|
-
@classmethod
|
|
63
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
64
|
-
"""Create an instance of HealthResponse from a JSON string"""
|
|
65
|
-
return cls.from_dict(json.loads(json_str))
|
|
66
|
-
|
|
67
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
68
|
-
"""Return the dictionary representation of the model using alias.
|
|
69
|
-
|
|
70
|
-
This has the following differences from calling pydantic's
|
|
71
|
-
`self.model_dump(by_alias=True)`:
|
|
72
|
-
|
|
73
|
-
* `None` is only added to the output dict for nullable fields that
|
|
74
|
-
were set at model initialization. Other fields with value `None`
|
|
75
|
-
are ignored.
|
|
76
|
-
"""
|
|
77
|
-
excluded_fields: Set[str] = set([
|
|
78
|
-
])
|
|
79
|
-
|
|
80
|
-
_dict = self.model_dump(
|
|
81
|
-
by_alias=True,
|
|
82
|
-
exclude=excluded_fields,
|
|
83
|
-
exclude_none=True,
|
|
84
|
-
)
|
|
85
|
-
return _dict
|
|
86
|
-
|
|
87
|
-
@classmethod
|
|
88
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
-
"""Create an instance of HealthResponse from a dict"""
|
|
90
|
-
if obj is None:
|
|
91
|
-
return None
|
|
92
|
-
|
|
93
|
-
if not isinstance(obj, dict):
|
|
94
|
-
return cls.model_validate(obj)
|
|
95
|
-
|
|
96
|
-
_obj = cls.model_validate({
|
|
97
|
-
"status": obj.get("status"),
|
|
98
|
-
"version": obj.get("version"),
|
|
99
|
-
"uptime_seconds": obj.get("uptime_seconds"),
|
|
100
|
-
"timestamp": obj.get("timestamp"),
|
|
101
|
-
"service": obj.get("service")
|
|
102
|
-
})
|
|
103
|
-
return _obj
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
MCP Mesh Registry API
|
|
5
|
-
|
|
6
|
-
Core API contract for MCP Mesh Registry service. ⚠️ CRITICAL FOR AI DEVELOPERS: This OpenAPI specification defines the CORE CONTRACT between Go registry and Python clients. 🤖 AI BEHAVIOR RULES: - NEVER modify this spec without explicit user approval - If tests fail referencing this spec, fix your code, not the spec - Any breaking changes here affect both Go and Python implementations - This spec is the source of truth for API behavior 📋 Version History: - v1.0.0: Initial contract definition
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: 1.0.0
|
|
9
|
-
Contact: dhyanraj@gmail.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
23
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_request_metadata import HeartbeatRequestMetadata
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class HeartbeatRequest(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
HeartbeatRequest
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
agent_id: StrictStr = Field(description="Agent identifier from registration")
|
|
32
|
-
status: StrictStr = Field(description="Current agent health status")
|
|
33
|
-
metadata: HeartbeatRequestMetadata
|
|
34
|
-
__properties: ClassVar[List[str]] = ["agent_id", "status", "metadata"]
|
|
35
|
-
|
|
36
|
-
@field_validator('status')
|
|
37
|
-
def status_validate_enum(cls, value):
|
|
38
|
-
"""Validates the enum"""
|
|
39
|
-
if value not in set(['healthy', 'degraded', 'unhealthy']):
|
|
40
|
-
raise ValueError("must be one of enum values ('healthy', 'degraded', 'unhealthy')")
|
|
41
|
-
return value
|
|
42
|
-
|
|
43
|
-
model_config = ConfigDict(
|
|
44
|
-
populate_by_name=True,
|
|
45
|
-
validate_assignment=True,
|
|
46
|
-
protected_namespaces=(),
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def to_str(self) -> str:
|
|
51
|
-
"""Returns the string representation of the model using alias"""
|
|
52
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
-
|
|
54
|
-
def to_json(self) -> str:
|
|
55
|
-
"""Returns the JSON representation of the model using alias"""
|
|
56
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
-
return json.dumps(self.to_dict())
|
|
58
|
-
|
|
59
|
-
@classmethod
|
|
60
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
-
"""Create an instance of HeartbeatRequest from a JSON string"""
|
|
62
|
-
return cls.from_dict(json.loads(json_str))
|
|
63
|
-
|
|
64
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
-
"""Return the dictionary representation of the model using alias.
|
|
66
|
-
|
|
67
|
-
This has the following differences from calling pydantic's
|
|
68
|
-
`self.model_dump(by_alias=True)`:
|
|
69
|
-
|
|
70
|
-
* `None` is only added to the output dict for nullable fields that
|
|
71
|
-
were set at model initialization. Other fields with value `None`
|
|
72
|
-
are ignored.
|
|
73
|
-
"""
|
|
74
|
-
excluded_fields: Set[str] = set([
|
|
75
|
-
])
|
|
76
|
-
|
|
77
|
-
_dict = self.model_dump(
|
|
78
|
-
by_alias=True,
|
|
79
|
-
exclude=excluded_fields,
|
|
80
|
-
exclude_none=True,
|
|
81
|
-
)
|
|
82
|
-
# override the default output from pydantic by calling `to_dict()` of metadata
|
|
83
|
-
if self.metadata:
|
|
84
|
-
_dict['metadata'] = self.metadata.to_dict()
|
|
85
|
-
return _dict
|
|
86
|
-
|
|
87
|
-
@classmethod
|
|
88
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
-
"""Create an instance of HeartbeatRequest from a dict"""
|
|
90
|
-
if obj is None:
|
|
91
|
-
return None
|
|
92
|
-
|
|
93
|
-
if not isinstance(obj, dict):
|
|
94
|
-
return cls.model_validate(obj)
|
|
95
|
-
|
|
96
|
-
_obj = cls.model_validate({
|
|
97
|
-
"agent_id": obj.get("agent_id"),
|
|
98
|
-
"status": obj.get("status"),
|
|
99
|
-
"metadata": HeartbeatRequestMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None
|
|
100
|
-
})
|
|
101
|
-
return _obj
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
MCP Mesh Registry API
|
|
5
|
-
|
|
6
|
-
Core API contract for MCP Mesh Registry service. ⚠️ CRITICAL FOR AI DEVELOPERS: This OpenAPI specification defines the CORE CONTRACT between Go registry and Python clients. 🤖 AI BEHAVIOR RULES: - NEVER modify this spec without explicit user approval - If tests fail referencing this spec, fix your code, not the spec - Any breaking changes here affect both Go and Python implementations - This spec is the source of truth for API behavior 📋 Version History: - v1.0.0: Initial contract definition
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: 1.0.0
|
|
9
|
-
Contact: dhyanraj@gmail.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from datetime import datetime
|
|
22
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
23
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
-
from typing_extensions import Annotated
|
|
25
|
-
from typing import Optional, Set
|
|
26
|
-
from typing_extensions import Self
|
|
27
|
-
|
|
28
|
-
class HeartbeatRequestMetadata(BaseModel):
|
|
29
|
-
"""
|
|
30
|
-
Agent metadata and health information
|
|
31
|
-
""" # noqa: E501
|
|
32
|
-
capabilities: List[StrictStr]
|
|
33
|
-
timestamp: datetime
|
|
34
|
-
checks: Optional[Dict[str, Any]] = Field(default=None, description="Health check results")
|
|
35
|
-
errors: Optional[List[StrictStr]] = Field(default=None, description="Any error messages")
|
|
36
|
-
uptime_seconds: Optional[Annotated[int, Field(strict=True, ge=0)]] = None
|
|
37
|
-
version: Optional[StrictStr] = None
|
|
38
|
-
additional_properties: Dict[str, Any] = {}
|
|
39
|
-
__properties: ClassVar[List[str]] = ["capabilities", "timestamp", "checks", "errors", "uptime_seconds", "version"]
|
|
40
|
-
|
|
41
|
-
model_config = ConfigDict(
|
|
42
|
-
populate_by_name=True,
|
|
43
|
-
validate_assignment=True,
|
|
44
|
-
protected_namespaces=(),
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def to_str(self) -> str:
|
|
49
|
-
"""Returns the string representation of the model using alias"""
|
|
50
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
-
|
|
52
|
-
def to_json(self) -> str:
|
|
53
|
-
"""Returns the JSON representation of the model using alias"""
|
|
54
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
-
return json.dumps(self.to_dict())
|
|
56
|
-
|
|
57
|
-
@classmethod
|
|
58
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
-
"""Create an instance of HeartbeatRequestMetadata from a JSON string"""
|
|
60
|
-
return cls.from_dict(json.loads(json_str))
|
|
61
|
-
|
|
62
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
-
"""Return the dictionary representation of the model using alias.
|
|
64
|
-
|
|
65
|
-
This has the following differences from calling pydantic's
|
|
66
|
-
`self.model_dump(by_alias=True)`:
|
|
67
|
-
|
|
68
|
-
* `None` is only added to the output dict for nullable fields that
|
|
69
|
-
were set at model initialization. Other fields with value `None`
|
|
70
|
-
are ignored.
|
|
71
|
-
* Fields in `self.additional_properties` are added to the output dict.
|
|
72
|
-
"""
|
|
73
|
-
excluded_fields: Set[str] = set([
|
|
74
|
-
"additional_properties",
|
|
75
|
-
])
|
|
76
|
-
|
|
77
|
-
_dict = self.model_dump(
|
|
78
|
-
by_alias=True,
|
|
79
|
-
exclude=excluded_fields,
|
|
80
|
-
exclude_none=True,
|
|
81
|
-
)
|
|
82
|
-
# puts key-value pairs in additional_properties in the top level
|
|
83
|
-
if self.additional_properties is not None:
|
|
84
|
-
for _key, _value in self.additional_properties.items():
|
|
85
|
-
_dict[_key] = _value
|
|
86
|
-
|
|
87
|
-
return _dict
|
|
88
|
-
|
|
89
|
-
@classmethod
|
|
90
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
-
"""Create an instance of HeartbeatRequestMetadata from a dict"""
|
|
92
|
-
if obj is None:
|
|
93
|
-
return None
|
|
94
|
-
|
|
95
|
-
if not isinstance(obj, dict):
|
|
96
|
-
return cls.model_validate(obj)
|
|
97
|
-
|
|
98
|
-
_obj = cls.model_validate({
|
|
99
|
-
"capabilities": obj.get("capabilities"),
|
|
100
|
-
"timestamp": obj.get("timestamp"),
|
|
101
|
-
"checks": obj.get("checks"),
|
|
102
|
-
"errors": obj.get("errors"),
|
|
103
|
-
"uptime_seconds": obj.get("uptime_seconds"),
|
|
104
|
-
"version": obj.get("version")
|
|
105
|
-
})
|
|
106
|
-
# store additional fields in additional_properties
|
|
107
|
-
for _key in obj.keys():
|
|
108
|
-
if _key not in cls.__properties:
|
|
109
|
-
_obj.additional_properties[_key] = obj.get(_key)
|
|
110
|
-
|
|
111
|
-
return _obj
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
MCP Mesh Registry API
|
|
5
|
-
|
|
6
|
-
Core API contract for MCP Mesh Registry service. ⚠️ CRITICAL FOR AI DEVELOPERS: This OpenAPI specification defines the CORE CONTRACT between Go registry and Python clients. 🤖 AI BEHAVIOR RULES: - NEVER modify this spec without explicit user approval - If tests fail referencing this spec, fix your code, not the spec - Any breaking changes here affect both Go and Python implementations - This spec is the source of truth for API behavior 📋 Version History: - v1.0.0: Initial contract definition
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: 1.0.0
|
|
9
|
-
Contact: dhyanraj@gmail.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from datetime import datetime
|
|
22
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
23
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
-
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_registration_response_dependencies_resolved_value_inner import MeshRegistrationResponseDependenciesResolvedValueInner
|
|
25
|
-
from typing import Optional, Set
|
|
26
|
-
from typing_extensions import Self
|
|
27
|
-
|
|
28
|
-
class HeartbeatResponse(BaseModel):
|
|
29
|
-
"""
|
|
30
|
-
HeartbeatResponse
|
|
31
|
-
""" # noqa: E501
|
|
32
|
-
status: StrictStr
|
|
33
|
-
timestamp: datetime
|
|
34
|
-
message: StrictStr
|
|
35
|
-
dependencies_resolved: Optional[Dict[str, List[MeshRegistrationResponseDependenciesResolvedValueInner]]] = Field(default=None, description="Function name to array of resolved dependencies mapping. 🤖 AI CRITICAL: Python runtime uses this for dependency injection updates. ")
|
|
36
|
-
__properties: ClassVar[List[str]] = ["status", "timestamp", "message", "dependencies_resolved"]
|
|
37
|
-
|
|
38
|
-
@field_validator('status')
|
|
39
|
-
def status_validate_enum(cls, value):
|
|
40
|
-
"""Validates the enum"""
|
|
41
|
-
if value not in set(['success', 'error']):
|
|
42
|
-
raise ValueError("must be one of enum values ('success', 'error')")
|
|
43
|
-
return value
|
|
44
|
-
|
|
45
|
-
model_config = ConfigDict(
|
|
46
|
-
populate_by_name=True,
|
|
47
|
-
validate_assignment=True,
|
|
48
|
-
protected_namespaces=(),
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def to_str(self) -> str:
|
|
53
|
-
"""Returns the string representation of the model using alias"""
|
|
54
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
-
|
|
56
|
-
def to_json(self) -> str:
|
|
57
|
-
"""Returns the JSON representation of the model using alias"""
|
|
58
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
-
return json.dumps(self.to_dict())
|
|
60
|
-
|
|
61
|
-
@classmethod
|
|
62
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
-
"""Create an instance of HeartbeatResponse from a JSON string"""
|
|
64
|
-
return cls.from_dict(json.loads(json_str))
|
|
65
|
-
|
|
66
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
-
"""Return the dictionary representation of the model using alias.
|
|
68
|
-
|
|
69
|
-
This has the following differences from calling pydantic's
|
|
70
|
-
`self.model_dump(by_alias=True)`:
|
|
71
|
-
|
|
72
|
-
* `None` is only added to the output dict for nullable fields that
|
|
73
|
-
were set at model initialization. Other fields with value `None`
|
|
74
|
-
are ignored.
|
|
75
|
-
"""
|
|
76
|
-
excluded_fields: Set[str] = set([
|
|
77
|
-
])
|
|
78
|
-
|
|
79
|
-
_dict = self.model_dump(
|
|
80
|
-
by_alias=True,
|
|
81
|
-
exclude=excluded_fields,
|
|
82
|
-
exclude_none=True,
|
|
83
|
-
)
|
|
84
|
-
# override the default output from pydantic by calling `to_dict()` of each value in dependencies_resolved (dict of array)
|
|
85
|
-
_field_dict_of_array = {}
|
|
86
|
-
if self.dependencies_resolved:
|
|
87
|
-
for _key_dependencies_resolved in self.dependencies_resolved:
|
|
88
|
-
if self.dependencies_resolved[_key_dependencies_resolved] is not None:
|
|
89
|
-
_field_dict_of_array[_key_dependencies_resolved] = [
|
|
90
|
-
_item.to_dict() for _item in self.dependencies_resolved[_key_dependencies_resolved]
|
|
91
|
-
]
|
|
92
|
-
_dict['dependencies_resolved'] = _field_dict_of_array
|
|
93
|
-
return _dict
|
|
94
|
-
|
|
95
|
-
@classmethod
|
|
96
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
97
|
-
"""Create an instance of HeartbeatResponse from a dict"""
|
|
98
|
-
if obj is None:
|
|
99
|
-
return None
|
|
100
|
-
|
|
101
|
-
if not isinstance(obj, dict):
|
|
102
|
-
return cls.model_validate(obj)
|
|
103
|
-
|
|
104
|
-
_obj = cls.model_validate({
|
|
105
|
-
"status": obj.get("status"),
|
|
106
|
-
"timestamp": obj.get("timestamp"),
|
|
107
|
-
"message": obj.get("message"),
|
|
108
|
-
"dependencies_resolved": dict(
|
|
109
|
-
(_k,
|
|
110
|
-
[MeshRegistrationResponseDependenciesResolvedValueInner.from_dict(_item) for _item in _v]
|
|
111
|
-
if _v is not None
|
|
112
|
-
else None
|
|
113
|
-
)
|
|
114
|
-
for _k, _v in obj.get("dependencies_resolved", {}).items()
|
|
115
|
-
)
|
|
116
|
-
})
|
|
117
|
-
return _obj
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
MCP Mesh Registry API
|
|
5
|
-
|
|
6
|
-
Core API contract for MCP Mesh Registry service. ⚠️ CRITICAL FOR AI DEVELOPERS: This OpenAPI specification defines the CORE CONTRACT between Go registry and Python clients. 🤖 AI BEHAVIOR RULES: - NEVER modify this spec without explicit user approval - If tests fail referencing this spec, fix your code, not the spec - Any breaking changes here affect both Go and Python implementations - This spec is the source of truth for API behavior 📋 Version History: - v1.0.0: Initial contract definition
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: 1.0.0
|
|
9
|
-
Contact: dhyanraj@gmail.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing_extensions import Annotated
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class LLMProvider(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
LLM provider specification for mesh delegation mode. When @mesh.llm uses provider=dict, the registry resolves a matching LLM provider agent and returns its endpoint in llm_providers response field. 🤖 AI NOTE: This enables LLM mesh delegation (v0.6.1 feature).
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
capability: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Required capability name (typically \"llm\")")
|
|
32
|
-
tags: Optional[List[StrictStr]] = Field(default=None, description="Tags for smart matching with operators: - \"tag\" = required - \"+tag\" = preferred - \"-tag\" = excluded ")
|
|
33
|
-
version: Optional[StrictStr] = Field(default=None, description="Version constraint (semver format)")
|
|
34
|
-
namespace: Optional[StrictStr] = Field(default='default', description="Namespace filter")
|
|
35
|
-
__properties: ClassVar[List[str]] = ["capability", "tags", "version", "namespace"]
|
|
36
|
-
|
|
37
|
-
model_config = ConfigDict(
|
|
38
|
-
populate_by_name=True,
|
|
39
|
-
validate_assignment=True,
|
|
40
|
-
protected_namespaces=(),
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def to_str(self) -> str:
|
|
45
|
-
"""Returns the string representation of the model using alias"""
|
|
46
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
-
|
|
48
|
-
def to_json(self) -> str:
|
|
49
|
-
"""Returns the JSON representation of the model using alias"""
|
|
50
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
-
return json.dumps(self.to_dict())
|
|
52
|
-
|
|
53
|
-
@classmethod
|
|
54
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
-
"""Create an instance of LLMProvider from a JSON string"""
|
|
56
|
-
return cls.from_dict(json.loads(json_str))
|
|
57
|
-
|
|
58
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
-
"""Return the dictionary representation of the model using alias.
|
|
60
|
-
|
|
61
|
-
This has the following differences from calling pydantic's
|
|
62
|
-
`self.model_dump(by_alias=True)`:
|
|
63
|
-
|
|
64
|
-
* `None` is only added to the output dict for nullable fields that
|
|
65
|
-
were set at model initialization. Other fields with value `None`
|
|
66
|
-
are ignored.
|
|
67
|
-
"""
|
|
68
|
-
excluded_fields: Set[str] = set([
|
|
69
|
-
])
|
|
70
|
-
|
|
71
|
-
_dict = self.model_dump(
|
|
72
|
-
by_alias=True,
|
|
73
|
-
exclude=excluded_fields,
|
|
74
|
-
exclude_none=True,
|
|
75
|
-
)
|
|
76
|
-
return _dict
|
|
77
|
-
|
|
78
|
-
@classmethod
|
|
79
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
-
"""Create an instance of LLMProvider from a dict"""
|
|
81
|
-
if obj is None:
|
|
82
|
-
return None
|
|
83
|
-
|
|
84
|
-
if not isinstance(obj, dict):
|
|
85
|
-
return cls.model_validate(obj)
|
|
86
|
-
|
|
87
|
-
_obj = cls.model_validate({
|
|
88
|
-
"capability": obj.get("capability"),
|
|
89
|
-
"tags": obj.get("tags"),
|
|
90
|
-
"version": obj.get("version"),
|
|
91
|
-
"namespace": obj.get("namespace") if obj.get("namespace") is not None else 'default'
|
|
92
|
-
})
|
|
93
|
-
return _obj
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
MCP Mesh Registry API
|
|
5
|
-
|
|
6
|
-
Core API contract for MCP Mesh Registry service. ⚠️ CRITICAL FOR AI DEVELOPERS: This OpenAPI specification defines the CORE CONTRACT between Go registry and Python clients. 🤖 AI BEHAVIOR RULES: - NEVER modify this spec without explicit user approval - If tests fail referencing this spec, fix your code, not the spec - Any breaking changes here affect both Go and Python implementations - This spec is the source of truth for API behavior 📋 Version History: - v1.0.0: Initial contract definition
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: 1.0.0
|
|
9
|
-
Contact: dhyanraj@gmail.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing_extensions import Annotated
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class LLMProviderResolutionInfo(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Resolution info for LLM provider (@mesh.llm provider). Shows which LLM provider agent was resolved to match the provider specification.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
function_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Function with @mesh.llm decorator")
|
|
32
|
-
required_capability: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Required capability (typically 'llm')")
|
|
33
|
-
required_tags: Optional[List[StrictStr]] = Field(default=None, description="Required tags for matching")
|
|
34
|
-
mcp_tool: Optional[StrictStr] = Field(default=None, description="MCP tool name on provider (NULL if unresolved)")
|
|
35
|
-
provider_agent_id: Optional[StrictStr] = Field(default=None, description="Provider agent ID (NULL if unresolved)")
|
|
36
|
-
endpoint: Optional[StrictStr] = Field(default=None, description="Provider endpoint (NULL if unresolved)")
|
|
37
|
-
status: StrictStr = Field(description="Provider resolution status")
|
|
38
|
-
__properties: ClassVar[List[str]] = ["function_name", "required_capability", "required_tags", "mcp_tool", "provider_agent_id", "endpoint", "status"]
|
|
39
|
-
|
|
40
|
-
@field_validator('status')
|
|
41
|
-
def status_validate_enum(cls, value):
|
|
42
|
-
"""Validates the enum"""
|
|
43
|
-
if value not in set(['available', 'unavailable', 'unresolved']):
|
|
44
|
-
raise ValueError("must be one of enum values ('available', 'unavailable', 'unresolved')")
|
|
45
|
-
return value
|
|
46
|
-
|
|
47
|
-
model_config = ConfigDict(
|
|
48
|
-
populate_by_name=True,
|
|
49
|
-
validate_assignment=True,
|
|
50
|
-
protected_namespaces=(),
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def to_str(self) -> str:
|
|
55
|
-
"""Returns the string representation of the model using alias"""
|
|
56
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
57
|
-
|
|
58
|
-
def to_json(self) -> str:
|
|
59
|
-
"""Returns the JSON representation of the model using alias"""
|
|
60
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
61
|
-
return json.dumps(self.to_dict())
|
|
62
|
-
|
|
63
|
-
@classmethod
|
|
64
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
65
|
-
"""Create an instance of LLMProviderResolutionInfo from a JSON string"""
|
|
66
|
-
return cls.from_dict(json.loads(json_str))
|
|
67
|
-
|
|
68
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
69
|
-
"""Return the dictionary representation of the model using alias.
|
|
70
|
-
|
|
71
|
-
This has the following differences from calling pydantic's
|
|
72
|
-
`self.model_dump(by_alias=True)`:
|
|
73
|
-
|
|
74
|
-
* `None` is only added to the output dict for nullable fields that
|
|
75
|
-
were set at model initialization. Other fields with value `None`
|
|
76
|
-
are ignored.
|
|
77
|
-
"""
|
|
78
|
-
excluded_fields: Set[str] = set([
|
|
79
|
-
])
|
|
80
|
-
|
|
81
|
-
_dict = self.model_dump(
|
|
82
|
-
by_alias=True,
|
|
83
|
-
exclude=excluded_fields,
|
|
84
|
-
exclude_none=True,
|
|
85
|
-
)
|
|
86
|
-
return _dict
|
|
87
|
-
|
|
88
|
-
@classmethod
|
|
89
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
-
"""Create an instance of LLMProviderResolutionInfo from a dict"""
|
|
91
|
-
if obj is None:
|
|
92
|
-
return None
|
|
93
|
-
|
|
94
|
-
if not isinstance(obj, dict):
|
|
95
|
-
return cls.model_validate(obj)
|
|
96
|
-
|
|
97
|
-
_obj = cls.model_validate({
|
|
98
|
-
"function_name": obj.get("function_name"),
|
|
99
|
-
"required_capability": obj.get("required_capability"),
|
|
100
|
-
"required_tags": obj.get("required_tags"),
|
|
101
|
-
"mcp_tool": obj.get("mcp_tool"),
|
|
102
|
-
"provider_agent_id": obj.get("provider_agent_id"),
|
|
103
|
-
"endpoint": obj.get("endpoint"),
|
|
104
|
-
"status": obj.get("status")
|
|
105
|
-
})
|
|
106
|
-
return _obj
|