kailash 0.1.5__py3-none-any.whl → 0.2.1__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.
- kailash/__init__.py +1 -1
- kailash/access_control.py +740 -0
- kailash/api/__main__.py +6 -0
- kailash/api/auth.py +668 -0
- kailash/api/custom_nodes.py +285 -0
- kailash/api/custom_nodes_secure.py +377 -0
- kailash/api/database.py +620 -0
- kailash/api/studio.py +915 -0
- kailash/api/studio_secure.py +893 -0
- kailash/mcp/__init__.py +53 -0
- kailash/mcp/__main__.py +13 -0
- kailash/mcp/ai_registry_server.py +712 -0
- kailash/mcp/client.py +447 -0
- kailash/mcp/client_new.py +334 -0
- kailash/mcp/server.py +293 -0
- kailash/mcp/server_new.py +336 -0
- kailash/mcp/servers/__init__.py +12 -0
- kailash/mcp/servers/ai_registry.py +289 -0
- kailash/nodes/__init__.py +4 -2
- kailash/nodes/ai/__init__.py +2 -0
- kailash/nodes/ai/a2a.py +714 -67
- kailash/nodes/ai/intelligent_agent_orchestrator.py +31 -37
- kailash/nodes/ai/iterative_llm_agent.py +1280 -0
- kailash/nodes/ai/llm_agent.py +324 -1
- kailash/nodes/ai/self_organizing.py +5 -6
- kailash/nodes/base.py +15 -2
- kailash/nodes/base_async.py +45 -0
- kailash/nodes/base_cycle_aware.py +374 -0
- kailash/nodes/base_with_acl.py +338 -0
- kailash/nodes/code/python.py +135 -27
- kailash/nodes/data/__init__.py +1 -2
- kailash/nodes/data/readers.py +16 -6
- kailash/nodes/data/sql.py +699 -256
- kailash/nodes/data/writers.py +16 -6
- kailash/nodes/logic/__init__.py +8 -0
- kailash/nodes/logic/convergence.py +642 -0
- kailash/nodes/logic/loop.py +153 -0
- kailash/nodes/logic/operations.py +187 -27
- kailash/nodes/mixins/__init__.py +11 -0
- kailash/nodes/mixins/mcp.py +228 -0
- kailash/nodes/mixins.py +387 -0
- kailash/runtime/__init__.py +2 -1
- kailash/runtime/access_controlled.py +458 -0
- kailash/runtime/local.py +106 -33
- kailash/runtime/parallel_cyclic.py +529 -0
- kailash/sdk_exceptions.py +90 -5
- kailash/security.py +845 -0
- kailash/tracking/manager.py +38 -15
- kailash/tracking/models.py +1 -1
- kailash/tracking/storage/filesystem.py +30 -2
- kailash/utils/__init__.py +8 -0
- kailash/workflow/__init__.py +18 -0
- kailash/workflow/convergence.py +270 -0
- kailash/workflow/cycle_analyzer.py +889 -0
- kailash/workflow/cycle_builder.py +579 -0
- kailash/workflow/cycle_config.py +725 -0
- kailash/workflow/cycle_debugger.py +860 -0
- kailash/workflow/cycle_exceptions.py +615 -0
- kailash/workflow/cycle_profiler.py +741 -0
- kailash/workflow/cycle_state.py +338 -0
- kailash/workflow/cyclic_runner.py +985 -0
- kailash/workflow/graph.py +500 -39
- kailash/workflow/migration.py +809 -0
- kailash/workflow/safety.py +365 -0
- kailash/workflow/templates.py +763 -0
- kailash/workflow/validation.py +751 -0
- {kailash-0.1.5.dist-info → kailash-0.2.1.dist-info}/METADATA +259 -12
- kailash-0.2.1.dist-info/RECORD +125 -0
- kailash/nodes/mcp/__init__.py +0 -11
- kailash/nodes/mcp/client.py +0 -554
- kailash/nodes/mcp/resource.py +0 -682
- kailash/nodes/mcp/server.py +0 -577
- kailash-0.1.5.dist-info/RECORD +0 -88
- {kailash-0.1.5.dist-info → kailash-0.2.1.dist-info}/WHEEL +0 -0
- {kailash-0.1.5.dist-info → kailash-0.2.1.dist-info}/entry_points.txt +0 -0
- {kailash-0.1.5.dist-info → kailash-0.2.1.dist-info}/licenses/LICENSE +0 -0
- {kailash-0.1.5.dist-info → kailash-0.2.1.dist-info}/top_level.txt +0 -0
kailash/mcp/__init__.py
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
"""Model Context Protocol (MCP) Service Layer.
|
2
|
+
|
3
|
+
This module provides MCP client and server functionality as services for the
|
4
|
+
Kailash SDK. MCP capabilities are integrated into LLM agents as built-in
|
5
|
+
features rather than standalone nodes, enabling seamless tool discovery,
|
6
|
+
resource access, and prompt templating.
|
7
|
+
|
8
|
+
Design Philosophy:
|
9
|
+
Provides non-intrusive MCP integration that enhances node capabilities
|
10
|
+
without changing the core workflow execution model. MCP services operate
|
11
|
+
as background capabilities that nodes can leverage transparently.
|
12
|
+
|
13
|
+
Key Components:
|
14
|
+
- MCPClient: Connects to MCP servers for tool and resource access
|
15
|
+
- MCPServer: Base framework for creating custom MCP servers
|
16
|
+
- SimpleMCPServer: Quick server creation for basic use cases
|
17
|
+
|
18
|
+
Upstream Dependencies:
|
19
|
+
- Official Anthropic MCP Python SDK for protocol implementation
|
20
|
+
- FastMCP framework for server creation and management
|
21
|
+
- AsyncIO for asynchronous server/client communication
|
22
|
+
|
23
|
+
Downstream Consumers:
|
24
|
+
- LLMAgentNode for AI model tool integration
|
25
|
+
- Workflow nodes requiring external tool access
|
26
|
+
- Custom nodes needing MCP server capabilities
|
27
|
+
|
28
|
+
Examples:
|
29
|
+
Basic MCP client usage:
|
30
|
+
|
31
|
+
>>> from kailash.mcp import MCPClient
|
32
|
+
>>> client = MCPClient()
|
33
|
+
>>> tools = await client.discover_tools(server_config)
|
34
|
+
>>> result = await client.call_tool(server_config, "search", {"query": "AI"})
|
35
|
+
|
36
|
+
Simple MCP server creation:
|
37
|
+
|
38
|
+
>>> from kailash.mcp import SimpleMCPServer
|
39
|
+
>>> server = SimpleMCPServer("my-tools")
|
40
|
+
>>> @server.tool()
|
41
|
+
... def calculate(a: int, b: int) -> int:
|
42
|
+
... return a + b
|
43
|
+
>>> server.start()
|
44
|
+
"""
|
45
|
+
|
46
|
+
from .client import MCPClient
|
47
|
+
from .server import MCPServer, SimpleMCPServer
|
48
|
+
|
49
|
+
__all__ = [
|
50
|
+
"MCPClient",
|
51
|
+
"MCPServer",
|
52
|
+
"SimpleMCPServer",
|
53
|
+
]
|
kailash/mcp/__main__.py
ADDED