mirror of
https://github.com/langgenius/dify.git
synced 2026-06-12 19:28:01 +08:00
The agent-composer candidates endpoints returned hardcoded empty arrays; node_id and tenant were ignored. Now: - workflow variant: previous_node_outputs computed from the draft workflow graph (WorkflowGraphTopology extracted from agent_v2 validators into core/workflow/graph_topology.py + new upstream_node_ids BFS). Output enumeration matches the Node Output Inspector: start variables + recorded sys.* are static, Agent v2 upstream nodes use their binding's effective declared outputs, all other kinds infer from the latest draft-run variables (inferred: true). Entries are emitted in the stored WorkflowPreviousNodeOutputRef shape (selector/node_id/output/name + display extras) so a selected candidate writes back into the config verbatim. human_contacts = the binding's configured node_job items (0522: defined only). - soul variant (both variants): skills_files / cli_tools(enabled) / knowledge_datasets (enriched via DatasetService, dangling marked missing for the placeholder UX) / human_contacts from the agent's current soul config; dify_tools from BuiltinToolManageService.list_builtin_tools (same source as the tool selector; daemon outage degrades to an empty list, never a 500). - per-list cap 200 + response-level truncated flag; all queries tenant-scoped; empty config returns empty lists. - controllers pass tenant_id/user_id/node_id (with_current_tenant_id + with_current_user_id). Design: Confluence 490012681 §3. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>