kailash 0.5.0__py3-none-any.whl → 0.6.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/__init__.py +1 -1
- kailash/client/__init__.py +12 -0
- kailash/client/enhanced_client.py +306 -0
- kailash/core/actors/__init__.py +16 -0
- kailash/core/actors/adaptive_pool_controller.py +630 -0
- kailash/core/actors/connection_actor.py +566 -0
- kailash/core/actors/supervisor.py +364 -0
- kailash/core/ml/__init__.py +1 -0
- kailash/core/ml/query_patterns.py +544 -0
- kailash/core/monitoring/__init__.py +19 -0
- kailash/core/monitoring/connection_metrics.py +488 -0
- kailash/core/optimization/__init__.py +1 -0
- kailash/core/resilience/__init__.py +17 -0
- kailash/core/resilience/circuit_breaker.py +382 -0
- kailash/edge/__init__.py +16 -0
- kailash/edge/compliance.py +834 -0
- kailash/edge/discovery.py +659 -0
- kailash/edge/location.py +582 -0
- kailash/gateway/__init__.py +33 -0
- kailash/gateway/api.py +289 -0
- kailash/gateway/enhanced_gateway.py +357 -0
- kailash/gateway/resource_resolver.py +217 -0
- kailash/gateway/security.py +227 -0
- kailash/middleware/auth/access_control.py +6 -6
- kailash/middleware/auth/models.py +2 -2
- kailash/middleware/communication/ai_chat.py +7 -7
- kailash/middleware/communication/api_gateway.py +5 -15
- kailash/middleware/database/base_models.py +1 -7
- kailash/middleware/gateway/__init__.py +22 -0
- kailash/middleware/gateway/checkpoint_manager.py +398 -0
- kailash/middleware/gateway/deduplicator.py +382 -0
- kailash/middleware/gateway/durable_gateway.py +417 -0
- kailash/middleware/gateway/durable_request.py +498 -0
- kailash/middleware/gateway/event_store.py +499 -0
- kailash/middleware/mcp/enhanced_server.py +2 -2
- kailash/nodes/admin/permission_check.py +817 -33
- kailash/nodes/admin/role_management.py +1242 -108
- kailash/nodes/admin/schema_manager.py +438 -0
- kailash/nodes/admin/user_management.py +1124 -1582
- kailash/nodes/code/__init__.py +8 -1
- kailash/nodes/code/async_python.py +1035 -0
- kailash/nodes/code/python.py +1 -0
- kailash/nodes/data/async_sql.py +9 -3
- kailash/nodes/data/query_pipeline.py +641 -0
- kailash/nodes/data/query_router.py +895 -0
- kailash/nodes/data/sql.py +20 -11
- kailash/nodes/data/workflow_connection_pool.py +1071 -0
- kailash/nodes/monitoring/__init__.py +3 -5
- kailash/nodes/monitoring/connection_dashboard.py +822 -0
- kailash/nodes/rag/__init__.py +2 -7
- kailash/resources/__init__.py +40 -0
- kailash/resources/factory.py +533 -0
- kailash/resources/health.py +319 -0
- kailash/resources/reference.py +288 -0
- kailash/resources/registry.py +392 -0
- kailash/runtime/async_local.py +711 -302
- kailash/testing/__init__.py +34 -0
- kailash/testing/async_test_case.py +353 -0
- kailash/testing/async_utils.py +345 -0
- kailash/testing/fixtures.py +458 -0
- kailash/testing/mock_registry.py +495 -0
- kailash/workflow/__init__.py +8 -0
- kailash/workflow/async_builder.py +621 -0
- kailash/workflow/async_patterns.py +766 -0
- kailash/workflow/cyclic_runner.py +107 -16
- kailash/workflow/graph.py +7 -2
- kailash/workflow/resilience.py +11 -1
- {kailash-0.5.0.dist-info → kailash-0.6.1.dist-info}/METADATA +19 -4
- {kailash-0.5.0.dist-info → kailash-0.6.1.dist-info}/RECORD +74 -28
- {kailash-0.5.0.dist-info → kailash-0.6.1.dist-info}/WHEEL +0 -0
- {kailash-0.5.0.dist-info → kailash-0.6.1.dist-info}/entry_points.txt +0 -0
- {kailash-0.5.0.dist-info → kailash-0.6.1.dist-info}/licenses/LICENSE +0 -0
- {kailash-0.5.0.dist-info → kailash-0.6.1.dist-info}/top_level.txt +0 -0
kailash/nodes/data/sql.py
CHANGED
@@ -288,10 +288,10 @@ class SQLDatabaseNode(Node):
|
|
288
288
|
),
|
289
289
|
"parameters": NodeParameter(
|
290
290
|
name="parameters",
|
291
|
-
type=list
|
291
|
+
type=Any, # Allow both list and dict for parameters
|
292
292
|
required=False,
|
293
|
-
default=
|
294
|
-
description="Query parameters for parameterized queries",
|
293
|
+
default=None,
|
294
|
+
description="Query parameters for parameterized queries (list for positional, dict for named)",
|
295
295
|
),
|
296
296
|
"result_format": NodeParameter(
|
297
297
|
name="result_format",
|
@@ -367,7 +367,7 @@ class SQLDatabaseNode(Node):
|
|
367
367
|
"""
|
368
368
|
# Extract validated inputs
|
369
369
|
query = kwargs.get("query")
|
370
|
-
parameters = kwargs.get("parameters"
|
370
|
+
parameters = kwargs.get("parameters")
|
371
371
|
result_format = kwargs.get("result_format", "dict")
|
372
372
|
user_context = kwargs.get("user_context")
|
373
373
|
|
@@ -757,19 +757,28 @@ class SQLDatabaseNode(Node):
|
|
757
757
|
|
758
758
|
import re
|
759
759
|
|
760
|
-
# Remove potential passwords from error messages
|
760
|
+
# Remove potential passwords from error messages, but be more selective
|
761
761
|
patterns_to_mask = [
|
762
762
|
# Connection string passwords
|
763
763
|
(r"://[^:]+:[^@]+@", "://***:***@"),
|
764
|
-
#
|
765
|
-
(r"'[^']*'", "'***'"),
|
766
|
-
#
|
767
|
-
(
|
764
|
+
# Password fields in SQL (case insensitive)
|
765
|
+
(r"password\s*=\s*['\"][^'\"]*['\"]", "password='***'", re.IGNORECASE),
|
766
|
+
# API keys and tokens in SQL
|
767
|
+
(
|
768
|
+
r"(api_key|token|secret)\s*=\s*['\"][^'\"]*['\"]",
|
769
|
+
r"\1='***'",
|
770
|
+
re.IGNORECASE,
|
771
|
+
),
|
768
772
|
]
|
769
773
|
|
770
774
|
sanitized = error_message
|
771
|
-
for
|
772
|
-
|
775
|
+
for pattern_info in patterns_to_mask:
|
776
|
+
if len(pattern_info) == 3:
|
777
|
+
pattern, replacement, flags = pattern_info
|
778
|
+
sanitized = re.sub(pattern, replacement, sanitized, flags=flags)
|
779
|
+
else:
|
780
|
+
pattern, replacement = pattern_info
|
781
|
+
sanitized = re.sub(pattern, replacement, sanitized)
|
773
782
|
|
774
783
|
return sanitized
|
775
784
|
|