idun-agent-engine 0.4.1__py3-none-any.whl → 0.4.2__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.
- idun_agent_engine/_version.py +1 -1
- idun_agent_engine/agent/adk/adk.py +2 -2
- idun_agent_engine/agent/haystack/__init__.py +0 -2
- idun_agent_engine/agent/haystack/haystack.py +9 -5
- idun_agent_engine/agent/langgraph/langgraph.py +10 -13
- idun_agent_engine/core/config_builder.py +26 -13
- idun_agent_engine/guardrails/guardrails_hub/guardrails_hub.py +52 -9
- idun_agent_engine/mcp/__init__.py +2 -2
- idun_agent_engine/mcp/helpers.py +11 -15
- idun_agent_engine/mcp/registry.py +5 -5
- idun_agent_engine/observability/base.py +11 -2
- idun_agent_engine/observability/gcp_trace/gcp_trace_handler.py +3 -1
- idun_agent_engine/observability/langfuse/langfuse_handler.py +1 -3
- idun_agent_engine/server/dependencies.py +7 -2
- idun_agent_engine/server/lifespan.py +2 -7
- idun_agent_engine/server/routers/agent.py +2 -1
- idun_agent_engine/server/routers/base.py +7 -5
- idun_agent_engine/telemetry/__init__.py +0 -1
- idun_agent_engine/telemetry/config.py +0 -1
- idun_agent_engine/telemetry/telemetry.py +3 -4
- idun_agent_engine/templates/correction.py +4 -7
- idun_agent_engine/templates/deep_research.py +1 -0
- idun_agent_engine/templates/translation.py +4 -4
- {idun_agent_engine-0.4.1.dist-info → idun_agent_engine-0.4.2.dist-info}/METADATA +1 -1
- {idun_agent_engine-0.4.1.dist-info → idun_agent_engine-0.4.2.dist-info}/RECORD +40 -43
- idun_platform_cli/groups/agent/package.py +1 -1
- idun_platform_cli/telemetry.py +2 -1
- idun_platform_cli/tui/schemas/create_agent.py +8 -4
- idun_platform_cli/tui/screens/create_agent.py +38 -12
- idun_platform_cli/tui/utils/config.py +1 -1
- idun_platform_cli/tui/validators/guardrails.py +8 -6
- idun_platform_cli/tui/validators/mcps.py +9 -6
- idun_platform_cli/tui/widgets/chat_widget.py +3 -1
- idun_platform_cli/tui/widgets/guardrails_widget.py +4 -4
- idun_platform_cli/tui/widgets/mcps_widget.py +112 -24
- idun_platform_cli/tui/widgets/memory_widget.py +0 -1
- idun_platform_cli/tui/widgets/observability_widget.py +2 -2
- idun_platform_cli/tui/widgets/serve_widget.py +2 -3
- idun_agent_engine/agent/haystack/haystack_model.py +0 -13
- idun_agent_engine/guardrails/guardrails_hub/utils.py +0 -1
- idun_agent_engine/server/routers/agui.py +0 -47
- {idun_agent_engine-0.4.1.dist-info → idun_agent_engine-0.4.2.dist-info}/WHEEL +0 -0
- {idun_agent_engine-0.4.1.dist-info → idun_agent_engine-0.4.2.dist-info}/entry_points.txt +0 -0
|
@@ -113,7 +113,6 @@ def _get_or_create_distinct_id() -> str | None:
|
|
|
113
113
|
- `IDUN_TELEMETRY_DISTINCT_ID` (if set)
|
|
114
114
|
- A UUID persisted to `<cache_dir>/idun/telemetry_user_id`
|
|
115
115
|
"""
|
|
116
|
-
|
|
117
116
|
raw = os.environ.get(_DISTINCT_ID_ENV)
|
|
118
117
|
if raw and raw.strip():
|
|
119
118
|
return raw.strip()
|
|
@@ -183,9 +182,10 @@ class IdunTelemetry:
|
|
|
183
182
|
self._distinct_id = _get_or_create_distinct_id()
|
|
184
183
|
return self._client
|
|
185
184
|
|
|
186
|
-
def capture(
|
|
185
|
+
def capture(
|
|
186
|
+
self, event: str, properties: dict[str, Any] | None = None
|
|
187
|
+
) -> Future[None] | None:
|
|
187
188
|
"""Capture an event asynchronously (best-effort)."""
|
|
188
|
-
|
|
189
189
|
if not self.enabled:
|
|
190
190
|
return None
|
|
191
191
|
|
|
@@ -220,7 +220,6 @@ class IdunTelemetry:
|
|
|
220
220
|
|
|
221
221
|
def shutdown(self, timeout_seconds: float = 1.0) -> None:
|
|
222
222
|
"""Best-effort flush/shutdown without blocking application shutdown."""
|
|
223
|
-
|
|
224
223
|
executor = self._executor
|
|
225
224
|
client = self._client
|
|
226
225
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Correction Agent Template."""
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import Annotated, Any, TypedDict
|
|
5
5
|
|
|
6
6
|
try:
|
|
7
7
|
from langchain.chat_models import init_chat_model
|
|
@@ -11,13 +11,13 @@ except ImportError:
|
|
|
11
11
|
except ImportError:
|
|
12
12
|
init_chat_model = None
|
|
13
13
|
|
|
14
|
-
from langchain_core.messages import
|
|
15
|
-
from langgraph.graph import
|
|
14
|
+
from langchain_core.messages import BaseMessage, SystemMessage
|
|
15
|
+
from langgraph.graph import END, START, StateGraph
|
|
16
16
|
from langgraph.graph.message import add_messages
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class State(TypedDict):
|
|
20
|
-
messages: Annotated[
|
|
20
|
+
messages: Annotated[list[BaseMessage], add_messages]
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
MODEL_NAME = os.getenv("CORRECTION_MODEL", "gemini-2.5-flash")
|
|
@@ -33,18 +33,15 @@ else:
|
|
|
33
33
|
print("Warning: init_chat_model not found in langchain.")
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
|
|
37
36
|
async def correct_text(state: State):
|
|
38
37
|
"""Correct the spelling, syntax, and grammar of the text."""
|
|
39
38
|
if not llm:
|
|
40
|
-
|
|
41
39
|
return {
|
|
42
40
|
"messages": [
|
|
43
41
|
SystemMessage(content="Error: Model not initialized. Check logs.")
|
|
44
42
|
]
|
|
45
43
|
}
|
|
46
44
|
|
|
47
|
-
|
|
48
45
|
prompt = (
|
|
49
46
|
f"You are a professional text corrector for {LANGUAGE}. "
|
|
50
47
|
f"Correct the spelling, syntax, grammar, and conjugation of the following text. "
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Translation Agent Template."""
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import Annotated, TypedDict
|
|
5
5
|
|
|
6
6
|
# Try importing init_chat_model, fallback if necessary
|
|
7
7
|
try:
|
|
@@ -12,14 +12,14 @@ except ImportError:
|
|
|
12
12
|
except ImportError:
|
|
13
13
|
init_chat_model = None
|
|
14
14
|
|
|
15
|
-
from langchain_core.messages import
|
|
16
|
-
from langgraph.graph import
|
|
15
|
+
from langchain_core.messages import BaseMessage, SystemMessage
|
|
16
|
+
from langgraph.graph import END, START, StateGraph
|
|
17
17
|
from langgraph.graph.message import add_messages
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
# Define the state
|
|
21
21
|
class State(TypedDict):
|
|
22
|
-
messages: Annotated[
|
|
22
|
+
messages: Annotated[list[BaseMessage], add_messages]
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
# Read configuration from environment variables
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: idun-agent-engine
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Python SDK and runtime to serve AI agents with FastAPI, LangGraph, and observability.
|
|
5
5
|
Project-URL: Homepage, https://github.com/geoffreyharrazi/idun-agent-platform
|
|
6
6
|
Project-URL: Repository, https://github.com/geoffreyharrazi/idun-agent-platform
|
|
@@ -1,64 +1,61 @@
|
|
|
1
1
|
idun_agent_engine/__init__.py,sha256=PhOL6foq5V0eXaoXw7xKUeCWXIWrOHrAFB8OuJnBqyM,550
|
|
2
|
-
idun_agent_engine/_version.py,sha256=
|
|
2
|
+
idun_agent_engine/_version.py,sha256=rHg5d6fgwIvzBZWjYtyruzXJK6jO7QljvyRBzdBlBBU,72
|
|
3
3
|
idun_agent_engine/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
idun_agent_engine/agent/__init__.py,sha256=foyOoRdI_04q1b6f2A5EXEpWSCKjZxpgWMWrKcsHNl8,220
|
|
5
5
|
idun_agent_engine/agent/base.py,sha256=c-3gljSHQpm6aY0JNDmXkaPtcW55rXdsI8Cgv9l4bCs,3294
|
|
6
6
|
idun_agent_engine/agent/adk/__init__.py,sha256=jLV2Z9qQGZtBpF_0pQI1FRCPJ_J1G3Z6cEAzHnQyuu4,83
|
|
7
|
-
idun_agent_engine/agent/adk/adk.py,sha256=
|
|
8
|
-
idun_agent_engine/agent/haystack/__init__.py,sha256=
|
|
9
|
-
idun_agent_engine/agent/haystack/haystack.py,sha256=
|
|
10
|
-
idun_agent_engine/agent/haystack/haystack_model.py,sha256=EtOYnsWRufcrQufTRMeB3V-rZVQqfnmwKwPsYGfZdCs,362
|
|
7
|
+
idun_agent_engine/agent/adk/adk.py,sha256=hljK87MJ5pfQWudbPhN4OpZxHXOXbZGLQA3mKaJ6dx4,11415
|
|
8
|
+
idun_agent_engine/agent/haystack/__init__.py,sha256=mfYFciVPKRXBxPhnpIy5qPJ8mUSyywUAxiFXFPTzEV4,104
|
|
9
|
+
idun_agent_engine/agent/haystack/haystack.py,sha256=nh86oGy7Q2mBbNdbvMfSYrtKLnNdXCI53S3SnzYp-J4,11039
|
|
11
10
|
idun_agent_engine/agent/haystack/utils.py,sha256=sKRoPhzZWFw1NPsYwCockafzMBCCq3lGOrndbNE_C3M,609
|
|
12
11
|
idun_agent_engine/agent/langgraph/__init__.py,sha256=CoBdkp9P4livdy5B0bvj9o7ftoqKmXEr9cZv4TZLncs,107
|
|
13
|
-
idun_agent_engine/agent/langgraph/langgraph.py,sha256=
|
|
12
|
+
idun_agent_engine/agent/langgraph/langgraph.py,sha256=s8mSm6exo69KBPIhCinRotS8v4DyMGQLG1nFL65rUbA,22871
|
|
14
13
|
idun_agent_engine/core/__init__.py,sha256=F0DMDlWcSWS_1dvh3xMbrdcVvZRHVnoAFFgREuSJfBI,408
|
|
15
14
|
idun_agent_engine/core/app_factory.py,sha256=2w4o7wV8FQCZdBTk3W7cS0vnmpUM_TdAmphFKHbL31w,2597
|
|
16
|
-
idun_agent_engine/core/config_builder.py,sha256=
|
|
15
|
+
idun_agent_engine/core/config_builder.py,sha256=5wbFNKLomw7aWEnfZ6iyljTwpFO_rdgw4c3CUzwLsW4,26221
|
|
17
16
|
idun_agent_engine/core/engine_config.py,sha256=IR8WhbenDstNSL7ORrUW8AnzgS3exFQxtwip66pFhcM,545
|
|
18
17
|
idun_agent_engine/core/server_runner.py,sha256=DwN5kHiKVvUJLw5iSkaxs2rKRaMgOwSUZmeUPSuDbf8,4899
|
|
19
18
|
idun_agent_engine/guardrails/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
19
|
idun_agent_engine/guardrails/base.py,sha256=rvi7gcuKK8-3GtGicWzMWYsKKv0g3LjGBI-FycxgKVU,814
|
|
21
20
|
idun_agent_engine/guardrails/guardrails_hub/__init__.py,sha256=MwWdgrM1dNzKwuS9ZEFw5Cin91JXh2PYlMma8yZFO7o,123
|
|
22
|
-
idun_agent_engine/guardrails/guardrails_hub/guardrails_hub.py,sha256=
|
|
23
|
-
idun_agent_engine/
|
|
24
|
-
idun_agent_engine/mcp/
|
|
25
|
-
idun_agent_engine/mcp/
|
|
26
|
-
idun_agent_engine/mcp/registry.py,sha256=8zt9o8MZmYKx55xb0E7n-qOCR_3m2-XGf7ToQEwHkTU,4229
|
|
21
|
+
idun_agent_engine/guardrails/guardrails_hub/guardrails_hub.py,sha256=3H3_1XLXfOB_hrv9cti6aX5CPUNBrV9eQPLwjGx8YN4,4918
|
|
22
|
+
idun_agent_engine/mcp/__init__.py,sha256=PsBUpfFvvgzJhCFeIH8215VrHiHLnBCrP4jfHGw1gmQ,501
|
|
23
|
+
idun_agent_engine/mcp/helpers.py,sha256=NMieZ6FSOaEpxeBLwUWvr-NYje1_AM3_h9LK7Sym6dk,6561
|
|
24
|
+
idun_agent_engine/mcp/registry.py,sha256=ncur1Zp_2bSZBdJRTI8wIq2Lt-fP0oyPHPJH4RnEaKs,4241
|
|
27
25
|
idun_agent_engine/observability/__init__.py,sha256=DCtK6b3xiX4dh0_8GBDOcSXQdcIJz2wTqqPa_ZFAES4,430
|
|
28
|
-
idun_agent_engine/observability/base.py,sha256=
|
|
26
|
+
idun_agent_engine/observability/base.py,sha256=Hst5dAxoJwPpiKw9p3MH79-AVZSNTciZ0hlq8K0rSFg,5686
|
|
29
27
|
idun_agent_engine/observability/gcp_logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
28
|
idun_agent_engine/observability/gcp_logging/gcp_logging_handler.py,sha256=cMUKfukmSZhIdO2v5oWkqI2_c6umtYqlhzflnOeoq6A,1685
|
|
31
29
|
idun_agent_engine/observability/gcp_trace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
|
-
idun_agent_engine/observability/gcp_trace/gcp_trace_handler.py,sha256=
|
|
30
|
+
idun_agent_engine/observability/gcp_trace/gcp_trace_handler.py,sha256=WMg8u161P-rIS1k8jZiNcRyxvxNE7MwEkktKqcOFWHQ,3920
|
|
33
31
|
idun_agent_engine/observability/langfuse/__init__.py,sha256=J8XcHV4aT1pF97k5EZiqrnYYPs9VjwfV5rUMihc5Pgk,128
|
|
34
|
-
idun_agent_engine/observability/langfuse/langfuse_handler.py,sha256=
|
|
32
|
+
idun_agent_engine/observability/langfuse/langfuse_handler.py,sha256=c9Rzu7SCiyWOPVDimqwMY1Swvp57rKf-RePtHs-zhkw,2765
|
|
35
33
|
idun_agent_engine/observability/phoenix/__init__.py,sha256=tEwJYijcvSGNhFW4QJmvBcTu1D0YVJkZRTmkNCGTteM,130
|
|
36
34
|
idun_agent_engine/observability/phoenix/phoenix_handler.py,sha256=lGqSq-L1vmoEhAr9rbWO3KlNX5HSgBhCKESHMdZ-AfY,2539
|
|
37
35
|
idun_agent_engine/observability/phoenix_local/__init__.py,sha256=m9dIw1GWGKAW4wP08jxA7j4yrOg0Nxq_08bwVh8YogE,146
|
|
38
36
|
idun_agent_engine/observability/phoenix_local/phoenix_local_handler.py,sha256=wjOZuMpAxdD5D33rzxycNEzFMunETpPnYjiHjbjz5GA,4252
|
|
39
37
|
idun_agent_engine/server/__init__.py,sha256=WaFektUsy37bNg2niAUy_TykzStukgWPnxC-t49CEwo,177
|
|
40
|
-
idun_agent_engine/server/dependencies.py,sha256=
|
|
41
|
-
idun_agent_engine/server/lifespan.py,sha256=
|
|
38
|
+
idun_agent_engine/server/dependencies.py,sha256=hRviN2YEf8tvTek2F7IUIp-JH7_V-ru-HKbCqLAox2o,2117
|
|
39
|
+
idun_agent_engine/server/lifespan.py,sha256=oXPDmCjNxCIQdrcZ_Q7bDx6mtndpLRI7VNeKEDIuQNw,4619
|
|
42
40
|
idun_agent_engine/server/server_config.py,sha256=RYA7Y0c5aRw_WXaX8svFUIEtTPqzn3o-WQRm2p52C6g,213
|
|
43
41
|
idun_agent_engine/server/routers/__init__.py,sha256=BgNzSVvHtGPGn5zhXhomwpKlDYBkeFi7xCbdcWVOgc8,102
|
|
44
|
-
idun_agent_engine/server/routers/agent.py,sha256=
|
|
45
|
-
idun_agent_engine/server/routers/
|
|
46
|
-
idun_agent_engine/
|
|
47
|
-
idun_agent_engine/telemetry/
|
|
48
|
-
idun_agent_engine/telemetry/
|
|
49
|
-
idun_agent_engine/telemetry/telemetry.py,sha256=g14ouZnSIV85A58HeAH5IlJ_IDKO_uYo7kFbWRo5PpI,7319
|
|
42
|
+
idun_agent_engine/server/routers/agent.py,sha256=QDqlR8P19ghLQrIFSd2w-c7iODXAv_P6bQ2AIYCWd7A,9182
|
|
43
|
+
idun_agent_engine/server/routers/base.py,sha256=5kZtPE0QAUZGlvsry2ygzz95IqdjvE2cFqGepD9TA6I,3763
|
|
44
|
+
idun_agent_engine/telemetry/__init__.py,sha256=jeKw2GMqqwoSh1sOxljVmVgP2BHObFYnZeNIF2NPwD8,518
|
|
45
|
+
idun_agent_engine/telemetry/config.py,sha256=JJhw3hysT_0HdbdyuOevD9WeEo4Eu4x0Y3sH5NWZvEY,844
|
|
46
|
+
idun_agent_engine/telemetry/telemetry.py,sha256=yOEExjFwhxvj5J6QW9cMeqFk6J6S0b1XlEb2Kni195o,7330
|
|
50
47
|
idun_agent_engine/templates/__init__.py,sha256=xxbJZXaX6VEm_UrqzAOQcuujpEji5yqYzwQfwiqig8o,31
|
|
51
|
-
idun_agent_engine/templates/correction.py,sha256=
|
|
52
|
-
idun_agent_engine/templates/deep_research.py,sha256=
|
|
53
|
-
idun_agent_engine/templates/translation.py,sha256=
|
|
48
|
+
idun_agent_engine/templates/correction.py,sha256=_NdgXLENpUhjT81CQI-gzH_yhGwbxSmBAo_VRFmBgQ0,1814
|
|
49
|
+
idun_agent_engine/templates/deep_research.py,sha256=x9BJucpkHzocxmCQ3--HrxjU8A1-StwL-2SVPcslTTI,1078
|
|
50
|
+
idun_agent_engine/templates/translation.py,sha256=bUEhhJuCpoON7PPi0yGE6f3SlZgXhN9WNwj1F9IyN9o,2143
|
|
54
51
|
idun_platform_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
52
|
idun_platform_cli/main.py,sha256=B7b1x0kgfuiAWGmSCFJeu_zkWiodJjOGu0nWuNAWM-k,299
|
|
56
|
-
idun_platform_cli/telemetry.py,sha256=
|
|
53
|
+
idun_platform_cli/telemetry.py,sha256=pSjnOXMbT2LuvNVPNCvBdYXRQG4EJbfrfiiC20NSIqk,1738
|
|
57
54
|
idun_platform_cli/groups/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
55
|
idun_platform_cli/groups/init.py,sha256=gBWU7tQ0v9aaPNSQXorKWrOkUc5YgJU06pzDC-qG97U,769
|
|
59
56
|
idun_platform_cli/groups/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
57
|
idun_platform_cli/groups/agent/main.py,sha256=QMGQi3JZ76SeFI3miIjVWpMt0L-hGz5FwxtTPQX4-Uw,301
|
|
61
|
-
idun_platform_cli/groups/agent/package.py,sha256=
|
|
58
|
+
idun_platform_cli/groups/agent/package.py,sha256=DjCUSEbPLnHbYkxpkumLb7jZytMWr5WuPDxgLCTcy-8,2614
|
|
62
59
|
idun_platform_cli/groups/agent/serve.py,sha256=ujCmJ3JsrjHkXvNwyB7V4poAaTxMQAPcIbRPDVybRQo,3947
|
|
63
60
|
idun_platform_cli/tui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
61
|
idun_platform_cli/tui/main.py,sha256=1gFEdbynBfiBLrZrKvNJN16Uc_3DOJl1spexRz38Q-E,3080
|
|
@@ -66,24 +63,24 @@ idun_platform_cli/tui/css/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
66
63
|
idun_platform_cli/tui/css/create_agent.py,sha256=ZyFNv6-EUTUaJ_817wh0KUvdu8rtuuPj9jTbigLfOR8,14050
|
|
67
64
|
idun_platform_cli/tui/css/main.py,sha256=gJ_kNb2lC2l99lq8NqtYU2imXAjUpxfiOaf1mNJr-Po,1134
|
|
68
65
|
idun_platform_cli/tui/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
69
|
-
idun_platform_cli/tui/schemas/create_agent.py,sha256=
|
|
66
|
+
idun_platform_cli/tui/schemas/create_agent.py,sha256=7aXTyf8boBr5xyLAf1O8rXsPca5LUqHz1GqKhOYwPsY,1714
|
|
70
67
|
idun_platform_cli/tui/screens/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
|
-
idun_platform_cli/tui/screens/create_agent.py,sha256=
|
|
68
|
+
idun_platform_cli/tui/screens/create_agent.py,sha256=0j-euLfosun7syXAjZYuoexoXmIzmlnZjNiKcoMWKvc,24473
|
|
72
69
|
idun_platform_cli/tui/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
73
|
-
idun_platform_cli/tui/utils/config.py,sha256=
|
|
70
|
+
idun_platform_cli/tui/utils/config.py,sha256=SIDJUfE7vzI3xGXnVPeD7CeTA1Bi6xtQStLvjDMwn50,7281
|
|
74
71
|
idun_platform_cli/tui/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
|
-
idun_platform_cli/tui/validators/guardrails.py,sha256=
|
|
76
|
-
idun_platform_cli/tui/validators/mcps.py,sha256=
|
|
72
|
+
idun_platform_cli/tui/validators/guardrails.py,sha256=E4KEVD0KV4gG9ZdlA591HA0seYY2xEDB3HeVPAxbH5E,3585
|
|
73
|
+
idun_platform_cli/tui/validators/mcps.py,sha256=r_YOxIWLPXVDXN9lwO1UvhvbTns7WrwmunO1zydttu4,2883
|
|
77
74
|
idun_platform_cli/tui/validators/observability.py,sha256=IWNuJg42eZUxjV-7v12kms7DpJsAs3FSSD5zLU5eKUc,2436
|
|
78
75
|
idun_platform_cli/tui/widgets/__init__.py,sha256=w8rQsUxqTtxuhpOPxCgl1pmv2vjCJseKNc1lhfMMkBM,521
|
|
79
|
-
idun_platform_cli/tui/widgets/chat_widget.py,sha256=
|
|
80
|
-
idun_platform_cli/tui/widgets/guardrails_widget.py,sha256=
|
|
76
|
+
idun_platform_cli/tui/widgets/chat_widget.py,sha256=hPWZSX2kwSGwFxWWW1TQ-HOvOa5Y3BjCJnj5WgOrVqY,5753
|
|
77
|
+
idun_platform_cli/tui/widgets/guardrails_widget.py,sha256=EzrZEaAyx7ViW7Vk-QLyu235b1jqauCoyvM9i3qsuGY,14553
|
|
81
78
|
idun_platform_cli/tui/widgets/identity_widget.py,sha256=LjpX-mgIinxJ5FzKBFz1HYbImwX7khpbetl86LsPnfw,9508
|
|
82
|
-
idun_platform_cli/tui/widgets/mcps_widget.py,sha256=
|
|
83
|
-
idun_platform_cli/tui/widgets/memory_widget.py,sha256=
|
|
84
|
-
idun_platform_cli/tui/widgets/observability_widget.py,sha256=
|
|
85
|
-
idun_platform_cli/tui/widgets/serve_widget.py,sha256=
|
|
86
|
-
idun_agent_engine-0.4.
|
|
87
|
-
idun_agent_engine-0.4.
|
|
88
|
-
idun_agent_engine-0.4.
|
|
89
|
-
idun_agent_engine-0.4.
|
|
79
|
+
idun_platform_cli/tui/widgets/mcps_widget.py,sha256=fXZzGbK7I4_yDFolvI3UbsR5yeKmW-sNz8STGKYk0E8,12125
|
|
80
|
+
idun_platform_cli/tui/widgets/memory_widget.py,sha256=QCJF6bd21s-QWdQY-UqqPtWZSIl-9xil6ul-a2r6vL0,6966
|
|
81
|
+
idun_platform_cli/tui/widgets/observability_widget.py,sha256=9ioS_BwOkW6NPtzJJa-S-mNUDOqP3QYYgTePcAun18s,14915
|
|
82
|
+
idun_platform_cli/tui/widgets/serve_widget.py,sha256=fSr75DuOxiXr0KbbEDAl0t5iOlDqMQLRiHdMCrENZdI,2728
|
|
83
|
+
idun_agent_engine-0.4.2.dist-info/METADATA,sha256=HrghAw_locsILEAp1BDj6D5SIq8xfFslUv6NndiLzx8,10870
|
|
84
|
+
idun_agent_engine-0.4.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
85
|
+
idun_agent_engine-0.4.2.dist-info/entry_points.txt,sha256=XG3oxlSOaCrYKT1oyhKa0Ag1iJPMZ-WF6gaV_mzIJW4,52
|
|
86
|
+
idun_agent_engine-0.4.2.dist-info/RECORD,,
|
|
@@ -38,7 +38,7 @@ def generate_dockerfile(dependency: Dependency) -> str:
|
|
|
38
38
|
return "" # Unreachable, but satisfies type checker
|
|
39
39
|
if dependency == Dependency.REQUIREMENT:
|
|
40
40
|
# TODO: use from file
|
|
41
|
-
requirements_dockerfile =
|
|
41
|
+
requirements_dockerfile = """FROM python:3.12-slim
|
|
42
42
|
RUN apt-get update && pip install uv
|
|
43
43
|
|
|
44
44
|
RUN uv pip install idun-agent-schema==0.3.1 --system
|
idun_platform_cli/telemetry.py
CHANGED
|
@@ -4,7 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import functools
|
|
6
6
|
import time
|
|
7
|
-
from
|
|
7
|
+
from collections.abc import Callable
|
|
8
|
+
from typing import Any, TypeVar
|
|
8
9
|
|
|
9
10
|
from idun_agent_engine.telemetry import get_telemetry, sanitize_telemetry_config
|
|
10
11
|
|
|
@@ -21,7 +21,7 @@ agent:
|
|
|
21
21
|
# we need to map the graph_definition, pipeline_definition, agent_definition fields based on framework
|
|
22
22
|
AGENT_SOURCE_KEY_MAPPING: dict[str, str] = dict(
|
|
23
23
|
{
|
|
24
|
-
"HAYSTACK": "
|
|
24
|
+
"HAYSTACK": "component_definition",
|
|
25
25
|
"LANGGRAPH": "graph_definition",
|
|
26
26
|
"ADK": "agent",
|
|
27
27
|
}
|
|
@@ -35,21 +35,25 @@ class TUIAgentConfig(BaseModel):
|
|
|
35
35
|
graph_definition: str
|
|
36
36
|
|
|
37
37
|
@field_validator("*", mode="after")
|
|
38
|
-
def validate_not_null(cls, value: str | Any | None) -> str:
|
|
38
|
+
def validate_not_null(cls, value: str | Any | None) -> str: # noqa: N805
|
|
39
39
|
if value is None or value == "":
|
|
40
40
|
raise ValueError("Cannot have empty fields!")
|
|
41
41
|
return value
|
|
42
42
|
|
|
43
43
|
def to_engine_config(self) -> dict[str, Any]:
|
|
44
|
+
sanitized_name = self.name.replace("-", "_").replace(" ", "_")
|
|
45
|
+
|
|
44
46
|
agent_config = {
|
|
45
|
-
"name": self.name,
|
|
47
|
+
"name": sanitized_name if self.framework == "ADK" else self.name,
|
|
46
48
|
AGENT_SOURCE_KEY_MAPPING[self.framework]: self.graph_definition,
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
if self.framework == "ADK":
|
|
50
|
-
agent_config["app_name"] =
|
|
52
|
+
agent_config["app_name"] = sanitized_name
|
|
51
53
|
agent_config["session_service"] = {"type": "in_memory"}
|
|
52
54
|
agent_config["memory_service"] = {"type": "in_memory"}
|
|
55
|
+
elif self.framework == "HAYSTACK":
|
|
56
|
+
agent_config["component_type"] = "pipeline"
|
|
53
57
|
|
|
54
58
|
return {
|
|
55
59
|
"server": {"api": {"port": self.port}},
|
|
@@ -7,7 +7,7 @@ from textual.app import ComposeResult
|
|
|
7
7
|
from textual.containers import Container, Horizontal, Vertical
|
|
8
8
|
from textual.reactive import reactive
|
|
9
9
|
from textual.screen import Screen
|
|
10
|
-
from textual.widgets import Button,
|
|
10
|
+
from textual.widgets import Button, Label, RichLog, Static
|
|
11
11
|
|
|
12
12
|
from idun_platform_cli.tui.css.create_agent import CREATE_AGENT_CSS
|
|
13
13
|
from idun_platform_cli.tui.schemas.create_agent import TUIAgentConfig
|
|
@@ -71,7 +71,11 @@ class CreateAgentScreen(Screen):
|
|
|
71
71
|
config = self.config_manager.load_config()
|
|
72
72
|
if config:
|
|
73
73
|
port = config.get("server", {}).get("api", {}).get("port", 8008)
|
|
74
|
-
pids =
|
|
74
|
+
pids = (
|
|
75
|
+
subprocess.check_output(["lsof", "-ti", f":{port}"], text=True)
|
|
76
|
+
.strip()
|
|
77
|
+
.split("\n")
|
|
78
|
+
)
|
|
75
79
|
for pid in pids:
|
|
76
80
|
if pid:
|
|
77
81
|
try:
|
|
@@ -254,7 +258,10 @@ class CreateAgentScreen(Screen):
|
|
|
254
258
|
yield serve
|
|
255
259
|
yield chat
|
|
256
260
|
|
|
257
|
-
footer = Static(
|
|
261
|
+
footer = Static(
|
|
262
|
+
"💡 Press Next to save section | Press Ctrl+Q to exit",
|
|
263
|
+
classes="custom-footer",
|
|
264
|
+
)
|
|
258
265
|
yield footer
|
|
259
266
|
|
|
260
267
|
def on_mount(self) -> None:
|
|
@@ -395,9 +402,7 @@ class CreateAgentScreen(Screen):
|
|
|
395
402
|
if data is not None:
|
|
396
403
|
success, msg = self.config_manager.save_partial("memory", data)
|
|
397
404
|
if not success:
|
|
398
|
-
self.notify(
|
|
399
|
-
"Memory configuration is invalid", severity="error"
|
|
400
|
-
)
|
|
405
|
+
self.notify("Memory configuration is invalid", severity="error")
|
|
401
406
|
return
|
|
402
407
|
self.validated_sections.add("memory")
|
|
403
408
|
self._update_nav_checkmark("memory")
|
|
@@ -447,14 +452,20 @@ class CreateAgentScreen(Screen):
|
|
|
447
452
|
|
|
448
453
|
validated_servers, msg = validate_mcp_servers(data)
|
|
449
454
|
if validated_servers is None:
|
|
450
|
-
self.notify(
|
|
455
|
+
self.notify(
|
|
456
|
+
"Error validating MCPs: make sure all fields are correct.",
|
|
457
|
+
severity="error",
|
|
458
|
+
)
|
|
451
459
|
return
|
|
452
460
|
|
|
453
461
|
success, save_msg = self.config_manager.save_partial(
|
|
454
462
|
"mcp_servers", validated_servers
|
|
455
463
|
)
|
|
456
464
|
if not success:
|
|
457
|
-
self.notify(
|
|
465
|
+
self.notify(
|
|
466
|
+
"Error saving MCPs: make sure all fields are correct.",
|
|
467
|
+
severity="error",
|
|
468
|
+
)
|
|
458
469
|
return
|
|
459
470
|
|
|
460
471
|
self.validated_sections.add("mcps")
|
|
@@ -510,9 +521,15 @@ class CreateAgentScreen(Screen):
|
|
|
510
521
|
["lsof", "-ti", f":{port}"],
|
|
511
522
|
capture_output=True,
|
|
512
523
|
text=True,
|
|
513
|
-
check=True
|
|
524
|
+
check=True,
|
|
525
|
+
)
|
|
526
|
+
pids = (
|
|
527
|
+
subprocess.check_output(
|
|
528
|
+
["lsof", "-ti", f":{port}"], text=True
|
|
529
|
+
)
|
|
530
|
+
.strip()
|
|
531
|
+
.split("\n")
|
|
514
532
|
)
|
|
515
|
-
pids = subprocess.check_output(["lsof", "-ti", f":{port}"], text=True).strip().split("\n")
|
|
516
533
|
for pid in pids:
|
|
517
534
|
if pid:
|
|
518
535
|
try:
|
|
@@ -563,7 +580,13 @@ class CreateAgentScreen(Screen):
|
|
|
563
580
|
|
|
564
581
|
try:
|
|
565
582
|
process = subprocess.Popen(
|
|
566
|
-
[
|
|
583
|
+
[
|
|
584
|
+
"idun",
|
|
585
|
+
"agent",
|
|
586
|
+
"serve",
|
|
587
|
+
"--source=file",
|
|
588
|
+
f"--path={config_path}",
|
|
589
|
+
],
|
|
567
590
|
stdout=subprocess.PIPE,
|
|
568
591
|
stderr=subprocess.STDOUT,
|
|
569
592
|
text=True,
|
|
@@ -585,7 +608,10 @@ class CreateAgentScreen(Screen):
|
|
|
585
608
|
self.run_worker(self._stream_logs(process), exclusive=True)
|
|
586
609
|
|
|
587
610
|
except Exception:
|
|
588
|
-
self.notify(
|
|
611
|
+
self.notify(
|
|
612
|
+
"Failed to start server. Check your configuration.",
|
|
613
|
+
severity="error",
|
|
614
|
+
)
|
|
589
615
|
|
|
590
616
|
async def _stream_logs(self, process) -> None:
|
|
591
617
|
import asyncio
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"""Guardrails validation logic."""
|
|
2
2
|
|
|
3
3
|
from idun_agent_schema.engine.guardrails_v2 import (
|
|
4
|
-
|
|
4
|
+
BanListConfig,
|
|
5
5
|
BiasCheckConfig,
|
|
6
|
-
ToxicLanguageConfig,
|
|
7
6
|
CompetitionCheckConfig,
|
|
8
|
-
BanListConfig,
|
|
9
7
|
DetectPIIConfig,
|
|
8
|
+
GuardrailConfigId,
|
|
9
|
+
ToxicLanguageConfig,
|
|
10
10
|
)
|
|
11
11
|
|
|
12
12
|
|
|
@@ -19,7 +19,7 @@ def validate_guardrail(guardrail_id: str, config: dict) -> tuple[any, str]:
|
|
|
19
19
|
config_id=GuardrailConfigId.BIAS_CHECK,
|
|
20
20
|
api_key=config.get("api_key", ""),
|
|
21
21
|
reject_message=config.get("reject_message", "Bias detected"),
|
|
22
|
-
threshold=threshold
|
|
22
|
+
threshold=threshold,
|
|
23
23
|
)
|
|
24
24
|
return validated, "ok"
|
|
25
25
|
|
|
@@ -28,8 +28,10 @@ def validate_guardrail(guardrail_id: str, config: dict) -> tuple[any, str]:
|
|
|
28
28
|
validated = ToxicLanguageConfig(
|
|
29
29
|
config_id=GuardrailConfigId.TOXIC_LANGUAGE,
|
|
30
30
|
api_key=config.get("api_key", ""),
|
|
31
|
-
reject_message=config.get(
|
|
32
|
-
|
|
31
|
+
reject_message=config.get(
|
|
32
|
+
"reject_message", "Toxic language detected"
|
|
33
|
+
),
|
|
34
|
+
threshold=threshold,
|
|
33
35
|
)
|
|
34
36
|
return validated, "ok"
|
|
35
37
|
|
|
@@ -30,12 +30,15 @@ def validate_mcp_servers(
|
|
|
30
30
|
None,
|
|
31
31
|
f"Server '{name}': command is required for stdio transport",
|
|
32
32
|
)
|
|
33
|
-
elif transport in [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
elif transport in [
|
|
34
|
+
"sse",
|
|
35
|
+
"streamable_http",
|
|
36
|
+
"websocket",
|
|
37
|
+
] and not server_data.get("url"):
|
|
38
|
+
return (
|
|
39
|
+
None,
|
|
40
|
+
f"Server '{name}': url is required for {transport} transport",
|
|
41
|
+
)
|
|
39
42
|
|
|
40
43
|
args = server_data.get("args", [])
|
|
41
44
|
if isinstance(args, str):
|
|
@@ -22,7 +22,9 @@ class ChatWidget(Widget):
|
|
|
22
22
|
with chat_container:
|
|
23
23
|
yield RichLog(id="chat_history", highlight=True, markup=True, wrap=True)
|
|
24
24
|
|
|
25
|
-
thinking_container = Horizontal(
|
|
25
|
+
thinking_container = Horizontal(
|
|
26
|
+
classes="chat-thinking-container", id="chat_thinking"
|
|
27
|
+
)
|
|
26
28
|
thinking_container.display = False
|
|
27
29
|
with thinking_container:
|
|
28
30
|
yield LoadingIndicator(id="chat_spinner")
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"""Guardrails configuration widget."""
|
|
2
2
|
|
|
3
|
+
from idun_agent_schema.engine.guardrails_v2 import GuardrailsV2
|
|
3
4
|
from textual.app import ComposeResult
|
|
4
|
-
from textual.containers import Horizontal, Vertical
|
|
5
|
-
from textual.widgets import Static, Input, Switch, RadioSet, RadioButton, TextArea
|
|
5
|
+
from textual.containers import Grid, Horizontal, Vertical
|
|
6
6
|
from textual.widget import Widget
|
|
7
|
+
from textual.widgets import Input, RadioButton, RadioSet, Static, Switch, TextArea
|
|
7
8
|
|
|
8
|
-
from idun_agent_schema.engine.guardrails_v2 import GuardrailsV2
|
|
9
9
|
from idun_platform_cli.tui.validators.guardrails import validate_guardrail
|
|
10
10
|
|
|
11
11
|
|
|
@@ -310,7 +310,7 @@ class GuardrailsWidget(Widget):
|
|
|
310
310
|
self.app.notify(
|
|
311
311
|
"Error validating Guardrails: make sure all fields are correct.",
|
|
312
312
|
severity="error",
|
|
313
|
-
timeout=10
|
|
313
|
+
timeout=10,
|
|
314
314
|
)
|
|
315
315
|
return None
|
|
316
316
|
|