(self)
| 209 | raise WorkflowExecutionError(error_msg, node_id=node_id) |
| 210 | |
| 211 | def _get_execution_context(self) -> ExecutionContext: |
| 212 | if self.__execution_context is None: |
| 213 | global_state = dict(self.runtime_context.global_state) |
| 214 | global_state.setdefault("attachment_store", self.attachment_store) |
| 215 | prompt_service = self._ensure_human_prompt_service() |
| 216 | global_state.setdefault("human_prompt", prompt_service) |
| 217 | self.__execution_context = ExecutionContext( |
| 218 | tool_manager=self.tool_manager, |
| 219 | function_manager=self.function_manager, |
| 220 | log_manager=self.log_manager, |
| 221 | memory_managers=self.agent_memory_managers, |
| 222 | thinking_managers=self.thinking_managers, |
| 223 | token_tracker=self.token_tracker, |
| 224 | global_state=global_state, |
| 225 | workspace_hook=self.runtime_context.workspace_hook, |
| 226 | human_prompt_service=prompt_service, |
| 227 | cancel_event=self._cancel_event, |
| 228 | ) |
| 229 | return self.__execution_context |
| 230 | |
| 231 | def _build_node_executors(self) -> None: |
| 232 | """Build node executors using strategy pattern.""" |
no test coverage detected