kailash 0.2.2__py3-none-any.whl → 0.3.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 +40 -39
- kailash/api/auth.py +26 -32
- kailash/api/custom_nodes.py +29 -29
- kailash/api/custom_nodes_secure.py +35 -35
- kailash/api/database.py +17 -17
- kailash/api/gateway.py +19 -19
- kailash/api/mcp_integration.py +24 -23
- kailash/api/studio.py +45 -45
- kailash/api/workflow_api.py +8 -8
- kailash/cli/commands.py +5 -8
- kailash/manifest.py +42 -42
- kailash/mcp/__init__.py +1 -1
- kailash/mcp/ai_registry_server.py +20 -20
- kailash/mcp/client.py +9 -11
- kailash/mcp/client_new.py +10 -10
- kailash/mcp/server.py +1 -2
- kailash/mcp/server_enhanced.py +449 -0
- kailash/mcp/servers/ai_registry.py +6 -6
- kailash/mcp/utils/__init__.py +31 -0
- kailash/mcp/utils/cache.py +267 -0
- kailash/mcp/utils/config.py +263 -0
- kailash/mcp/utils/formatters.py +293 -0
- kailash/mcp/utils/metrics.py +418 -0
- kailash/nodes/ai/agents.py +9 -9
- kailash/nodes/ai/ai_providers.py +33 -34
- kailash/nodes/ai/embedding_generator.py +31 -32
- kailash/nodes/ai/intelligent_agent_orchestrator.py +62 -66
- kailash/nodes/ai/iterative_llm_agent.py +48 -48
- kailash/nodes/ai/llm_agent.py +32 -33
- kailash/nodes/ai/models.py +13 -13
- kailash/nodes/ai/self_organizing.py +44 -44
- kailash/nodes/api/__init__.py +5 -0
- kailash/nodes/api/auth.py +11 -11
- kailash/nodes/api/graphql.py +13 -13
- kailash/nodes/api/http.py +19 -19
- kailash/nodes/api/monitoring.py +463 -0
- kailash/nodes/api/rate_limiting.py +9 -13
- kailash/nodes/api/rest.py +29 -29
- kailash/nodes/api/security.py +819 -0
- kailash/nodes/base.py +24 -26
- kailash/nodes/base_async.py +7 -7
- kailash/nodes/base_cycle_aware.py +12 -12
- kailash/nodes/base_with_acl.py +5 -5
- kailash/nodes/code/python.py +56 -55
- kailash/nodes/data/__init__.py +6 -0
- kailash/nodes/data/directory.py +6 -6
- kailash/nodes/data/event_generation.py +297 -0
- kailash/nodes/data/file_discovery.py +598 -0
- kailash/nodes/data/readers.py +8 -8
- kailash/nodes/data/retrieval.py +10 -10
- kailash/nodes/data/sharepoint_graph.py +17 -17
- kailash/nodes/data/sources.py +5 -5
- kailash/nodes/data/sql.py +13 -13
- kailash/nodes/data/streaming.py +25 -25
- kailash/nodes/data/vector_db.py +22 -22
- kailash/nodes/data/writers.py +7 -7
- kailash/nodes/logic/async_operations.py +17 -17
- kailash/nodes/logic/convergence.py +11 -11
- kailash/nodes/logic/loop.py +4 -4
- kailash/nodes/logic/operations.py +11 -11
- kailash/nodes/logic/workflow.py +8 -9
- kailash/nodes/mixins/mcp.py +17 -17
- kailash/nodes/mixins.py +8 -10
- kailash/nodes/transform/chunkers.py +3 -3
- kailash/nodes/transform/formatters.py +7 -7
- kailash/nodes/transform/processors.py +11 -11
- kailash/runtime/access_controlled.py +18 -18
- kailash/runtime/async_local.py +18 -20
- kailash/runtime/docker.py +24 -26
- kailash/runtime/local.py +55 -31
- kailash/runtime/parallel.py +25 -25
- kailash/runtime/parallel_cyclic.py +29 -29
- kailash/runtime/runner.py +6 -6
- kailash/runtime/testing.py +22 -22
- kailash/sdk_exceptions.py +0 -58
- kailash/security.py +14 -26
- kailash/tracking/manager.py +38 -38
- kailash/tracking/metrics_collector.py +15 -14
- kailash/tracking/models.py +53 -53
- kailash/tracking/storage/base.py +7 -17
- kailash/tracking/storage/database.py +22 -23
- kailash/tracking/storage/filesystem.py +38 -40
- kailash/utils/export.py +21 -21
- kailash/utils/templates.py +8 -9
- kailash/visualization/api.py +30 -34
- kailash/visualization/dashboard.py +17 -17
- kailash/visualization/performance.py +32 -19
- kailash/visualization/reports.py +30 -28
- kailash/workflow/builder.py +8 -8
- kailash/workflow/convergence.py +13 -12
- kailash/workflow/cycle_analyzer.py +38 -33
- kailash/workflow/cycle_builder.py +12 -12
- kailash/workflow/cycle_config.py +16 -15
- kailash/workflow/cycle_debugger.py +40 -40
- kailash/workflow/cycle_exceptions.py +29 -29
- kailash/workflow/cycle_profiler.py +21 -21
- kailash/workflow/cycle_state.py +20 -22
- kailash/workflow/cyclic_runner.py +45 -45
- kailash/workflow/graph.py +57 -45
- kailash/workflow/mermaid_visualizer.py +9 -11
- kailash/workflow/migration.py +22 -22
- kailash/workflow/mock_registry.py +6 -6
- kailash/workflow/runner.py +9 -9
- kailash/workflow/safety.py +12 -13
- kailash/workflow/state.py +8 -11
- kailash/workflow/templates.py +19 -19
- kailash/workflow/validation.py +14 -14
- kailash/workflow/visualization.py +32 -24
- kailash-0.3.1.dist-info/METADATA +476 -0
- kailash-0.3.1.dist-info/RECORD +136 -0
- kailash-0.2.2.dist-info/METADATA +0 -121
- kailash-0.2.2.dist-info/RECORD +0 -126
- {kailash-0.2.2.dist-info → kailash-0.3.1.dist-info}/WHEEL +0 -0
- {kailash-0.2.2.dist-info → kailash-0.3.1.dist-info}/entry_points.txt +0 -0
- {kailash-0.2.2.dist-info → kailash-0.3.1.dist-info}/licenses/LICENSE +0 -0
- {kailash-0.2.2.dist-info → kailash-0.3.1.dist-info}/top_level.txt +0 -0
kailash/nodes/api/rest.py
CHANGED
@@ -10,7 +10,7 @@ Key Components:
|
|
10
10
|
* Resource path builders and response handlers
|
11
11
|
"""
|
12
12
|
|
13
|
-
from typing import Any
|
13
|
+
from typing import Any
|
14
14
|
|
15
15
|
from kailash.nodes.api.http import AsyncHTTPRequestNode, HTTPRequestNode
|
16
16
|
from kailash.nodes.base import Node, NodeParameter, register_node
|
@@ -157,7 +157,7 @@ class RESTClientNode(Node):
|
|
157
157
|
super().__init__(**kwargs)
|
158
158
|
self.http_node = HTTPRequestNode(url="")
|
159
159
|
|
160
|
-
def get_parameters(self) ->
|
160
|
+
def get_parameters(self) -> dict[str, NodeParameter]:
|
161
161
|
"""Define the parameters this node accepts.
|
162
162
|
|
163
163
|
Returns:
|
@@ -297,7 +297,7 @@ class RESTClientNode(Node):
|
|
297
297
|
),
|
298
298
|
}
|
299
299
|
|
300
|
-
def get_output_schema(self) ->
|
300
|
+
def get_output_schema(self) -> dict[str, NodeParameter]:
|
301
301
|
"""Define the output schema for this node.
|
302
302
|
|
303
303
|
Returns:
|
@@ -334,8 +334,8 @@ class RESTClientNode(Node):
|
|
334
334
|
self,
|
335
335
|
base_url: str,
|
336
336
|
resource: str,
|
337
|
-
path_params:
|
338
|
-
version:
|
337
|
+
path_params: dict[str, Any],
|
338
|
+
version: str | None = None,
|
339
339
|
) -> str:
|
340
340
|
"""Build the full URL for a REST API request.
|
341
341
|
|
@@ -394,10 +394,10 @@ class RESTClientNode(Node):
|
|
394
394
|
|
395
395
|
def _handle_pagination(
|
396
396
|
self,
|
397
|
-
initial_response:
|
398
|
-
query_params:
|
399
|
-
pagination_params:
|
400
|
-
) ->
|
397
|
+
initial_response: dict[str, Any],
|
398
|
+
query_params: dict[str, Any],
|
399
|
+
pagination_params: dict[str, Any],
|
400
|
+
) -> list[Any]:
|
401
401
|
"""Handle pagination for REST API responses.
|
402
402
|
|
403
403
|
This method supports common pagination patterns:
|
@@ -469,7 +469,7 @@ class RESTClientNode(Node):
|
|
469
469
|
return all_items
|
470
470
|
|
471
471
|
def _get_nested_value(
|
472
|
-
self, obj:
|
472
|
+
self, obj: dict[str, Any], path: str, default: Any = None
|
473
473
|
) -> Any:
|
474
474
|
"""Get a nested value from a dictionary using a dot-separated path.
|
475
475
|
|
@@ -495,7 +495,7 @@ class RESTClientNode(Node):
|
|
495
495
|
|
496
496
|
return current
|
497
497
|
|
498
|
-
def run(self, **kwargs) ->
|
498
|
+
def run(self, **kwargs) -> dict[str, Any]:
|
499
499
|
"""Execute a REST API request.
|
500
500
|
|
501
501
|
Args:
|
@@ -671,8 +671,8 @@ class RESTClientNode(Node):
|
|
671
671
|
|
672
672
|
# Convenience methods for CRUD operations
|
673
673
|
def get(
|
674
|
-
self, base_url: str, resource: str, resource_id:
|
675
|
-
) ->
|
674
|
+
self, base_url: str, resource: str, resource_id: str | None = None, **kwargs
|
675
|
+
) -> dict[str, Any]:
|
676
676
|
"""GET a resource or list of resources.
|
677
677
|
|
678
678
|
Args:
|
@@ -703,8 +703,8 @@ class RESTClientNode(Node):
|
|
703
703
|
)
|
704
704
|
|
705
705
|
def create(
|
706
|
-
self, base_url: str, resource: str, data:
|
707
|
-
) ->
|
706
|
+
self, base_url: str, resource: str, data: dict[str, Any], **kwargs
|
707
|
+
) -> dict[str, Any]:
|
708
708
|
"""CREATE (POST) a new resource.
|
709
709
|
|
710
710
|
Args:
|
@@ -725,10 +725,10 @@ class RESTClientNode(Node):
|
|
725
725
|
base_url: str,
|
726
726
|
resource: str,
|
727
727
|
resource_id: str,
|
728
|
-
data:
|
728
|
+
data: dict[str, Any],
|
729
729
|
partial: bool = False,
|
730
730
|
**kwargs,
|
731
|
-
) ->
|
731
|
+
) -> dict[str, Any]:
|
732
732
|
"""UPDATE (PUT/PATCH) an existing resource.
|
733
733
|
|
734
734
|
Args:
|
@@ -756,7 +756,7 @@ class RESTClientNode(Node):
|
|
756
756
|
|
757
757
|
def delete(
|
758
758
|
self, base_url: str, resource: str, resource_id: str, **kwargs
|
759
|
-
) ->
|
759
|
+
) -> dict[str, Any]:
|
760
760
|
"""DELETE a resource.
|
761
761
|
|
762
762
|
Args:
|
@@ -779,7 +779,7 @@ class RESTClientNode(Node):
|
|
779
779
|
**kwargs,
|
780
780
|
)
|
781
781
|
|
782
|
-
def _extract_metadata(self, response:
|
782
|
+
def _extract_metadata(self, response: dict[str, Any]) -> dict[str, Any]:
|
783
783
|
"""Extract additional metadata from response.
|
784
784
|
|
785
785
|
Args:
|
@@ -811,8 +811,8 @@ class RESTClientNode(Node):
|
|
811
811
|
return metadata
|
812
812
|
|
813
813
|
def _extract_rate_limit_metadata(
|
814
|
-
self, headers:
|
815
|
-
) ->
|
814
|
+
self, headers: dict[str, str]
|
815
|
+
) -> dict[str, Any] | None:
|
816
816
|
"""Extract rate limiting information from response headers.
|
817
817
|
|
818
818
|
Args:
|
@@ -847,8 +847,8 @@ class RESTClientNode(Node):
|
|
847
847
|
return rate_limit if rate_limit else None
|
848
848
|
|
849
849
|
def _extract_pagination_metadata(
|
850
|
-
self, headers:
|
851
|
-
) ->
|
850
|
+
self, headers: dict[str, str], content: Any
|
851
|
+
) -> dict[str, Any] | None:
|
852
852
|
"""Extract pagination information from headers and response body.
|
853
853
|
|
854
854
|
Args:
|
@@ -892,7 +892,7 @@ class RESTClientNode(Node):
|
|
892
892
|
|
893
893
|
return pagination if pagination else None
|
894
894
|
|
895
|
-
def _parse_link_header(self, link_header: str) ->
|
895
|
+
def _parse_link_header(self, link_header: str) -> dict[str, str]:
|
896
896
|
"""Parse Link header for pagination URLs.
|
897
897
|
|
898
898
|
Args:
|
@@ -916,7 +916,7 @@ class RESTClientNode(Node):
|
|
916
916
|
|
917
917
|
return links
|
918
918
|
|
919
|
-
def _extract_links(self, content: Any) ->
|
919
|
+
def _extract_links(self, content: Any) -> dict[str, Any] | None:
|
920
920
|
"""Extract HATEOAS links from response content.
|
921
921
|
|
922
922
|
Args:
|
@@ -986,7 +986,7 @@ class AsyncRESTClientNode(AsyncNode):
|
|
986
986
|
self.http_node = AsyncHTTPRequestNode(**kwargs)
|
987
987
|
self.rest_node = RESTClientNode(**kwargs)
|
988
988
|
|
989
|
-
def get_parameters(self) ->
|
989
|
+
def get_parameters(self) -> dict[str, NodeParameter]:
|
990
990
|
"""Define the parameters this node accepts.
|
991
991
|
|
992
992
|
Returns:
|
@@ -995,7 +995,7 @@ class AsyncRESTClientNode(AsyncNode):
|
|
995
995
|
# Same parameters as the synchronous version
|
996
996
|
return self.rest_node.get_parameters()
|
997
997
|
|
998
|
-
def get_output_schema(self) ->
|
998
|
+
def get_output_schema(self) -> dict[str, NodeParameter]:
|
999
999
|
"""Define the output schema for this node.
|
1000
1000
|
|
1001
1001
|
Returns:
|
@@ -1004,7 +1004,7 @@ class AsyncRESTClientNode(AsyncNode):
|
|
1004
1004
|
# Same output schema as the synchronous version
|
1005
1005
|
return self.rest_node.get_output_schema()
|
1006
1006
|
|
1007
|
-
def run(self, **kwargs) ->
|
1007
|
+
def run(self, **kwargs) -> dict[str, Any]:
|
1008
1008
|
"""Synchronous version of the REST request, for compatibility.
|
1009
1009
|
|
1010
1010
|
This is implemented for compatibility but users should use the
|
@@ -1022,7 +1022,7 @@ class AsyncRESTClientNode(AsyncNode):
|
|
1022
1022
|
# Forward to the synchronous REST node
|
1023
1023
|
return self.rest_node.run(**kwargs)
|
1024
1024
|
|
1025
|
-
async def async_run(self, **kwargs) ->
|
1025
|
+
async def async_run(self, **kwargs) -> dict[str, Any]:
|
1026
1026
|
"""Execute a REST API request asynchronously.
|
1027
1027
|
|
1028
1028
|
Args:
|