licos-agent-runtime 0.2.7__tar.gz → 0.2.8__tar.gz
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.
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/PKG-INFO +1 -1
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/pyproject.toml +1 -1
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/workflow_canvas.py +1 -1
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/tests/test_workflow_protocol.py +34 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/.gitignore +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/__init__.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/__main__.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/agent_canvas.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/agent_config.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/app.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/attachments.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/context.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/errors.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/graph_loader.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/logging.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/openai.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/parser.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/payload.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/run_config.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/service.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/stream_protocol.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/stream_runner.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/telemetry.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/workflow_protocol.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/tests/test_agent_config.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/tests/test_context.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/tests/test_graph_loader.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/tests/test_parser.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/tests/test_payload.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/tests/test_service_stream_protocol.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/tests/test_stream_protocol.py +0 -0
- {licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/tests/test_stream_runner.py +0 -0
{licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/workflow_canvas.py
RENAMED
|
@@ -248,7 +248,7 @@ def _dependencies(metadata: dict[str, Any]) -> dict[str, Any]:
|
|
|
248
248
|
if isinstance(raw, dict):
|
|
249
249
|
return {key: value for key, value in raw.items() if value not in (None, "", [], {})}
|
|
250
250
|
result: dict[str, Any] = {}
|
|
251
|
-
llm_config = metadata.get("llm_config")
|
|
251
|
+
llm_config = metadata.get("llm_cfg") or metadata.get("llm_config")
|
|
252
252
|
if isinstance(llm_config, str) and llm_config.strip():
|
|
253
253
|
result["llm_config"] = [llm_config.strip()]
|
|
254
254
|
elif isinstance(llm_config, list):
|
|
@@ -94,6 +94,40 @@ class WorkflowProtocolTests(unittest.TestCase):
|
|
|
94
94
|
self.assertIn("#L", nodes[1]["script"]["content"])
|
|
95
95
|
self.assertEqual(nodes[2]["definition"]["inputs"]["properties"]["answer"]["type"], "string")
|
|
96
96
|
|
|
97
|
+
def test_workflow_canvas_maps_llm_cfg_to_llm_config_dependency(self):
|
|
98
|
+
def analyze_topic(state):
|
|
99
|
+
return {"answer": state.get("topic", "")}
|
|
100
|
+
|
|
101
|
+
class Node:
|
|
102
|
+
metadata = {
|
|
103
|
+
"title": "智能分析",
|
|
104
|
+
"type": "agent",
|
|
105
|
+
"llm_cfg": "config/analyze_topic_cfg.json",
|
|
106
|
+
}
|
|
107
|
+
data = analyze_topic
|
|
108
|
+
|
|
109
|
+
class RawGraph:
|
|
110
|
+
nodes = {"analyze_topic": Node()}
|
|
111
|
+
|
|
112
|
+
class Graph:
|
|
113
|
+
def get_graph(self):
|
|
114
|
+
return RawGraph()
|
|
115
|
+
|
|
116
|
+
class Service(GraphService):
|
|
117
|
+
def _get_graph(self, ctx=None):
|
|
118
|
+
del ctx
|
|
119
|
+
return Graph()
|
|
120
|
+
|
|
121
|
+
with patch("licos_agent_runtime.service.is_agent_project", return_value=False):
|
|
122
|
+
result = Service().agent_canvas()
|
|
123
|
+
|
|
124
|
+
nodes = json.loads(result["data"]["data"])["nodes"]
|
|
125
|
+
self.assertEqual(nodes[1]["type"], "agent")
|
|
126
|
+
self.assertEqual(
|
|
127
|
+
nodes[1]["definition"]["info"]["dependencies"]["llm_config"],
|
|
128
|
+
["config/analyze_topic_cfg.json"],
|
|
129
|
+
)
|
|
130
|
+
|
|
97
131
|
def test_run_node_executes_node_callable_directly(self):
|
|
98
132
|
def generate_answer(state):
|
|
99
133
|
return {"answer": state.get("topic", "")}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/agent_canvas.py
RENAMED
|
File without changes
|
{licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/agent_config.py
RENAMED
|
File without changes
|
|
File without changes
|
{licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/attachments.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/graph_loader.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/run_config.py
RENAMED
|
File without changes
|
|
File without changes
|
{licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/stream_protocol.py
RENAMED
|
File without changes
|
{licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/stream_runner.py
RENAMED
|
File without changes
|
{licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/telemetry.py
RENAMED
|
File without changes
|
{licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/src/licos_agent_runtime/workflow_protocol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{licos_agent_runtime-0.2.7 → licos_agent_runtime-0.2.8}/tests/test_service_stream_protocol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|