Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DSGWJQ/Feagent
/ functions
Functions
13,770 in github.com/DSGWJQ/Feagent
⨍
Functions
13,770
◇
Types & classes
3,506
↳
Endpoints
127
↓ 4 callers
Method
_parse_events
(self, content: str)
tests/integration/api/test_conversation_stream_api.py:350
↓ 4 callers
Method
_parse_llm_response
解析LLM响应 参数: response_content: LLM返回的原始内容 返回: 解析后的分类结果字典 异常: ValueError: 响应格式错误时抛出
src/application/use_cases/classify_task.py:190
↓ 4 callers
Method
_parse_sse_events
Parse SSE events from response text
tests/integration/api/test_workflow_execution_error_classification.py:93
↓ 4 callers
Method
_publish_event
发布事件(同时兼容 async/sync EventBus 实现)。
src/domain/services/save_request_orchestrator.py:146
↓ 4 callers
Method
_publish_notification_event
发布通知事件(P0-2 Fix) 通知事件特点: 1. 后台异步发布 2. 被追踪以防止丢失 3. 不阻塞主流程 适用场景:SaveRequest、进度通知等非关键事件 参数:
src/domain/agents/conversation_agent_state.py:237
↓ 4 callers
Method
_publish_progress_event
发布进度事件(内部辅助方法) 将事件发布失败视为非关键错误,不阻塞主流程执行。 参数: workflow_id: 工作流ID node_id: 节点ID status: 执行状态
src/domain/agents/workflow_agent.py:2112
↓ 4 callers
Function
_read_json
(path: Path)
web/tests/e2e/scripts/collect-metrics.py:37
↓ 4 callers
Method
_record_to_dict
将版本记录转换为字典 参数: record: 版本记录 返回: 字典格式
src/domain/services/node_version_manager.py:287
↓ 4 callers
Function
_safe_int
(value: Any, default: int = 0)
src/interfaces/api/routes/workflows.py:1069
↓ 4 callers
Function
_safe_list
(value: Any)
src/interfaces/api/routes/workflows.py:1089
↓ 4 callers
Function
_seed_created_run
(db: Session, *, workflow_id: str)
tests/integration/api/workflows/test_validated_decision_run_events_replay_e2e.py:78
↓ 4 callers
Method
_to_entity
将ORM模型转换为领域实体 为什么需要这个方法? - ORM模型是数据库表映射(Infrastructure层) - 领域实体是业务逻辑载体(Domain层) - 两者职责不同,需要转换 转换策略:
src/infrastructure/database/repositories/user_repository.py:59
↓ 4 callers
Method
_to_entity
将 ORM 模型转换为领域实体 参数: model: ScheduledWorkflowModel ORM 模型 返回: ScheduledWorkflow 领域实体
src/infrastructure/database/repositories/scheduled_workflow_repository.py:36
↓ 4 callers
Method
_to_entity
将 ORM 模型转换为领域实体 为什么需要这个方法? - ORM 模型是数据库表映射(Infrastructure 层) - 领域实体是业务逻辑载体(Domain 层) - 两者职责不同,需要转换 转换策略:
src/infrastructure/database/repositories/task_repository.py:77
↓ 4 callers
Method
_transition_locked
状态转换(锁内版本,不发布事件,P0-2 Optimization) 此方法必须在 _state_lock 内调用,用于消除原子性空窗。 调用者负责在释放锁后发布 StateChangedEvent。 参数: new_sta
src/domain/agents/conversation_agent_state.py:281
↓ 4 callers
Method
_transition_to
状态转换
src/domain/services/circuit_breaker.py:200
↓ 4 callers
Method
_truncate
截断文本 参数: text: 原始文本 max_length: 最大长度 返回: 截断后的文本
src/domain/services/context_compressor.py:604
↓ 4 callers
Function
_utc_now_iso
()
web/tests/e2e/scripts/collect-metrics.py:33
↓ 4 callers
Method
_validate_file_node
对FILE节点进行安全校验,失败时抛出PermissionError并发布失败事件。
src/domain/agents/workflow_agent.py:493
↓ 4 callers
Method
_validate_required_field
验证必需字段 参数: data: 配置字典 field: 字段名 抛出: ToolConfigValidationError: 当字段缺失时
src/domain/services/tool_config_loader.py:432
↓ 4 callers
Method
_validate_transition
验证状态转换是否合法 参数: current_status: 当前状态 target_status: 目标状态 异常: LifecycleTransitionError: 如果转换不合法
src/domain/services/knowledge_note_lifecycle.py:236
↓ 4 callers
Method
acquire
获取锁 参数: blocking: 是否阻塞等待 timeout: 超时时间 返回: True 如果成功获取,False 否则
src/domain/services/concurrent_execution_manager.py:39
↓ 4 callers
Method
add
添加日志到缓冲区
src/domain/services/logging_metrics.py:216
↓ 4 callers
Method
add_child_to_parent
向父节点添加子节点 参数: parent_id: 父节点ID child_type: 子节点类型 child_config: 子节点配置 child_id: 可选的子节点ID
src/domain/services/node_hierarchy_service.py:190
↓ 4 callers
Function
add_fixed_move_from_candidates
( candidates: list[Path], dst: Path, reason: str, )
scripts/organize_project_files.py:672
↓ 4 callers
Method
add_goal
添加目标 参数: goal: 要添加的目标
src/domain/services/goal_decomposer.py:301
↓ 4 callers
Method
add_node
添加节点 参数: node_id: 节点ID node_type: 节点类型 position: 位置 config: 配置
src/domain/services/bidirectional_sync.py:111
↓ 4 callers
Method
add_node_with_monitoring
添加节点并监控 Args: workflow_id: 工作流 ID node: 节点定义 Returns: 添加结果
src/domain/services/dynamic_node_monitoring.py:542
↓ 4 callers
Method
add_rule
添加告警规则 参数: name: 规则名称 condition: 条件函数 severity: 告警级别 message: 告警消息
src/domain/services/monitoring.py:508
↓ 4 callers
Method
add_supervision_strategy
添加监督策略(委托到 SupervisionFacade) 注册一个新的监督策略到策略库。 参数: name: 策略名称 trigger_conditions: 触发条件列表 (如 ["bias", "harmful
src/domain/agents/coordinator_agent.py:3539
↓ 4 callers
Method
add_tag
添加标签 参数: tag: 标签名称
src/domain/services/knowledge_note.py:118
↓ 4 callers
Method
ainvoke
(self, *_args, **_kwargs)
tests/unit/domain/services/test_workflow_chat_service_enhanced_modifications.py:20
↓ 4 callers
Method
analyze
执行分析 参数: input: 统一分析请求 返回: 统一分析结果
src/domain/services/supervision/protocols.py:243
↓ 4 callers
Method
analyze
执行文本扫描 参数: input: 统一分析请求 (kind 必须为 "text") 返回: 统一分析结果
src/domain/services/supervision/protocols.py:290
↓ 4 callers
Method
apply_user_response
应用用户响应更新恢复计划 参数: plan: 原恢复计划 response: 用户响应 返回: 更新后的恢复计划
src/domain/agents/error_handling.py:639
↓ 4 callers
Method
assign_variant
分配变体
src/domain/services/coordinator_runbook.py:539
↓ 4 callers
Method
attempt_node_creation
尝试创建节点,失败时自动恢复 Args: workflow_id: 工作流 ID node_definition: 节点定义 Returns: 创建结果
src/domain/services/dynamic_node_monitoring.py:351
↓ 4 callers
Method
build_enum_validation_rule
构建字段枚举值验证规则 参数: decision_type: 决策类型 field_enums: 字段枚举映射 {字段名: 允许的值列表} 返回: Rule: 验证规则
src/domain/services/safety_guard/payload_rule_builder.py:219
↓ 4 callers
Method
cancel
取消执行
src/domain/services/sub_agent_scheduler.py:299
↓ 4 callers
Method
cancel_timeout_slots
取消超时槽位 返回: 被取消的槽位列表
src/domain/services/tool_concurrency_controller.py:504
↓ 4 callers
Method
check
检查规则是否触发 参数: context: 上下文数据 返回: 触发时返回 SupervisionInfo,否则返回 None
src/domain/services/supervision_module.py:142
↓ 4 callers
Method
check_all
综合检查 参数: text: 输入文本 返回: 综合检查结果
src/domain/services/supervision/conversation.py:221
↓ 4 callers
Method
check_and_record_message
检查并记录消息 ID(用于去重) 参数: message_id: 消息 ID 返回: True 如果是新消息,False 如果是重复消息
src/infrastructure/websocket/canvas_sync.py:607
↓ 4 callers
Method
check_compatibility
检查两个 Schema 是否兼容 判断输出 Schema 是否能满足输入 Schema 的要求。 参数: output_schema: 上游节点的输出 Schema input_schema: 下游节点的输入 Sch
src/domain/services/schema_inference.py:250
↓ 4 callers
Method
check_deviation
检查偏离 参数: session_id: 会话ID agent_actions: agent 的行动列表 返回: 偏离告警 (如果检测到偏离) 或 None
src/domain/services/knowledge_coordinator_integration.py:178
↓ 4 callers
Method
clear
清空所有记录
src/domain/services/tool_knowledge_store.py:392
↓ 4 callers
Method
complete
标记完成
src/domain/services/log_analysis.py:138
↓ 4 callers
Method
complete
补全摘要 参数: summary_info: 原始摘要信息 返回: 补全后的摘要信息
src/domain/services/summary_strategy.py:501
↓ 4 callers
Method
complete_with_error
因错误完成发射 发送错误消息并关闭 emitter。 参数: error_message: 错误消息
src/domain/services/conversation_flow_emitter.py:434
↓ 4 callers
Method
compose
组合多个模块 参数: modules: 要组合的模块名称列表 variables: 所有模块使用的变量 separator: 模块之间的分隔符 返回: 组合后的完整提示
src/domain/services/prompt_template_system.py:378
↓ 4 callers
Method
configure_api_domains
配置API域名白名单规则 参数: whitelist: 允许访问的域名白名单 blacklist: 禁止访问的域名黑名单 allowed_schemes: 允许的URL scheme集合
src/domain/services/safety_guard/core.py:110
↓ 4 callers
Function
count_message_tokens
计算消息列表的 token 数(快捷函数) 参数: messages: 消息列表 provider: 提供商名称(默认 openai) model: 模型名称(默认 gpt-4) 返回: token 数
src/infrastructure/lc_adapters/token_counter.py:202
↓ 4 callers
Function
count_text_tokens
计算文本的 token 数(快捷函数) 参数: text: 文本内容 provider: 提供商名称(默认 openai) model: 模型名称(默认 gpt-4) 返回: token 数
src/infrastructure/lc_adapters/token_counter.py:221
↓ 4 callers
Method
create
创建 LLMProvider 的工厂方法 参数: name: 提供商标识 display_name: 显示名称 api_base: API 基础 URL api_key: API 密钥(
src/domain/entities/llm_provider.py:57
↓ 4 callers
Method
create_base
创建“基底 workflow”(用于 chat-create 等链路)。 设计目标: - 满足聚合根不变式(至少一个节点) - 默认形状最小且可扩展(KISS) - 统一默认数据结构,避免散落硬编码(DRY)
src/domain/entities/workflow.py:127
↓ 4 callers
Method
create_deepseek
创建 DeepSeek 提供商(预定义配置) 参数: api_key: DeepSeek API 密钥 返回: 配置好的 DeepSeek LLMProvider
src/domain/entities/llm_provider.py:120
↓ 4 callers
Function
create_default_container_executor
创建默认容器执行器。 Architecture Note: Domain 层不直接 import Infrastructure/Interface。默认实现由外部注入工厂提供; 若未注册,则退化为仅使用 Sandbox 的执行器(保持可执行性)。
src/domain/agents/workflow_agent.py:75
↓ 4 callers
Method
create_experiment
创建 A/B 测试实验(代理到 ExperimentOrchestrator)
src/domain/agents/coordinator_agent.py:3579
↓ 4 callers
Method
create_global_context
创建全局上下文 参数: user_id: 用户ID user_preferences: 用户偏好 system_config: 系统配置 global_goals: 全局目标
src/domain/services/context_bridge.py:423
↓ 4 callers
Method
create_hierarchy_from_plan
从规划创建层级结构 参数: plan: 规划字典,包含 groups 列表 返回: 创建的分组节点列表
src/domain/agents/workflow_agent.py:2959
↓ 4 callers
Method
create_injection_context
创建注入上下文 参数: issue_type: 问题类型 severity: 严重性 message: 消息 action: 动作 返回: 上下
src/domain/services/supervision/conversation.py:252
↓ 4 callers
Method
create_knowledge
创建知识条目 参数: title: 标题 content: 内容 category: 类别 tags: 标签列表(可选) metadata: 元数据(可选)
src/domain/agents/coordinator_agent.py:3265
↓ 4 callers
Method
create_nodes_batch
批量创建节点 参数: node_definitions: 节点定义列表 返回: (节点名称, 节点) 元组列表
src/domain/agents/workflow_agent.py:2635
↓ 4 callers
Method
create_parent_node
创建父节点并添加子节点 参数: name: 父节点名称 children_configs: 子节点配置列表 node_id: 可选的节点ID 返回: 创建的父节点
src/domain/services/node_hierarchy_service.py:128
↓ 4 callers
Method
create_plan
创建执行计划 参数: workflow: 工作流定义 返回: 优化的执行计划
src/domain/services/performance_optimizer.py:362
↓ 4 callers
Method
create_response
创建 SSE StreamingResponse 参数: headers: 额外的响应头 返回: StreamingResponse 对象
src/interfaces/api/services/sse_emitter_handler.py:247
↓ 4 callers
Method
create_result_package
创建结果包 Args: context_package_id: 关联的上下文包 ID agent_id: Agent ID output_data: 输出数据 stat
src/domain/services/subagent_context_bridge.py:371
↓ 4 callers
Method
create_session_context
创建会话上下文 参数: session_id: 会话ID global_context: 全局上下文 返回: 创建的会话上下文
src/domain/services/context_bridge.py:450
↓ 4 callers
Method
create_test
创建 A/B 测试
src/domain/services/coordinator_runbook.py:506
↓ 4 callers
Method
dequeue
出队
src/domain/services/management_modules.py:205
↓ 4 callers
Method
dequeue
出队
src/domain/services/management_modules.py:231
↓ 4 callers
Method
elapsed_time
获取已用时间(秒)
src/domain/services/tool_concurrency_controller.py:93
↓ 4 callers
Method
emit_final_response
发送最终响应 参数: content: 响应内容 metadata: 元数据
src/domain/services/conversation_flow_emitter.py:350
↓ 4 callers
Method
enqueue
入队
src/domain/services/management_modules.py:201
↓ 4 callers
Method
evaluate
评估所有规则 参数: metrics: 当前指标 返回: 触发的告警列表
src/domain/services/monitoring.py:531
↓ 4 callers
Method
evaluate
评估所有启用的规则 遍历所有启用的规则,检查条件是否满足。 参数: context: 评估上下文 返回: 违规列表
src/domain/services/enhanced_rule_repository.py:317
↓ 4 callers
Method
evaluate_condition_node
评估条件节点的表达式并返回布尔结果 此方法用于执行CONDITION类型节点的条件判断逻辑,支持从多层上下文中 获取变量(节点输出、工作流变量、全局变量),并使用安全的表达式求值器 进行条件判断。 评估流程: 1.
src/domain/agents/workflow_agent.py:3619
↓ 4 callers
Method
execute
执行通知节点 参数: node: 节点实体 inputs: 输入数据(来自前驱节点) context: 执行上下文 返回: 通知结果
src/infrastructure/executors/notification_executor.py:48
↓ 4 callers
Method
execute
执行干预 参数: violation: 策略违规 返回: 执行结果
src/domain/services/supervision_strategy.py:876
↓ 4 callers
Method
execute
执行通用节点 参数: generic_node: 要执行的通用节点 inputs: 外部输入 返回: 执行结果(经过输出映射)
src/domain/services/generic_node.py:431
↓ 4 callers
Method
execute
并发执行多个工作流 参数: input_data: 输入数据 返回: 执行结果列表 抛出: NotFoundError: 工作流不存在
src/application/use_cases/execute_concurrent_workflows.py:57
↓ 4 callers
Method
execute
( self, task: dict[str, Any], context: dict[str, Any] )
tests/unit/domain/services/test_sub_agent_scheduler.py:109
↓ 4 callers
Method
execute_procedure
执行操作流程
src/domain/services/coordinator_runbook.py:934
↓ 4 callers
Method
execute_streaming
执行工作流(流式) 实现 WorkflowExecutorPort.execute_streaming 接口 注意:由于 session 生命周期需要跨越整个流式执行, 这里不使用 contextmanager,而是手动管理 session。
src/interfaces/api/services/workflow_executor_adapter.py:119
↓ 4 callers
Method
execute_with_recovery
执行代码,失败时恢复状态 Args: workflow_id: 工作流 ID node_id: 节点 ID code: 要执行的代码 Returns: 执行结果
src/domain/services/dynamic_node_monitoring.py:406
↓ 4 callers
Method
execute_workflow_with_recovery
执行工作流,失败时恢复 Args: workflow_id: 工作流 ID fail_at_node: 模拟在此节点失败 Returns: 执行结果
src/domain/services/dynamic_node_monitoring.py:458
↓ 4 callers
Method
execute_workflow_with_results
执行整个工作流并返回结构化结果 返回: 工作流执行结果
src/domain/agents/workflow_agent.py:1237
↓ 4 callers
Method
expand
展开节点 返回: self,支持链式调用
src/domain/services/generic_node.py:192
↓ 4 callers
Method
expand
展开节点,显示子节点
src/domain/agents/node_definition.py:302
↓ 4 callers
Method
extract_user_preferences
提取用户偏好 参数: traces: 任务追踪列表 返回: 用户偏好字典
src/domain/services/log_analysis.py:753
↓ 4 callers
Method
filter_by_source
按来源过滤日志 参数: source: 日志来源 返回: 匹配的日志列表
src/domain/services/unified_log_collector.py:141
↓ 4 callers
Method
find_all
查找所有 Tool 返回: Tool 列表(可能为空)
src/domain/ports/tool_repository.py:75
↓ 4 callers
Method
find_by_category
按分类查找工具 参数: category: 工具分类 返回: 该分类下的工具列表
src/domain/services/tool_engine.py:556
↓ 4 callers
Method
find_by_category
(self, category: str)
tests/unit/domain/agents/test_coordinator_context_service.py:41
↓ 4 callers
Method
find_by_id
按 ID 查找 Run (不存在返回 None)
src/infrastructure/database/repositories/run_repository.py:203
↓ 4 callers
Method
find_by_run_id
根据 Run ID 查找所有 Task 业务语义: - 查询某个 Run 的所有执行步骤 - 如果没有 Task,返回空列表(不抛异常) - 按创建时间倒序排列(最新的在前) - 返回完整的 Task 聚合(包括 Ta
src/domain/ports/task_repository.py:139
↓ 4 callers
Method
find_by_task_type
按任务类型查找解法 参数: task_type: 任务类型 返回: 匹配的解法列表
src/domain/services/knowledge_maintenance.py:875
↓ 4 callers
Function
finishWithError
(errorMessage: string)
web/src/features/workflows/pages/WorkflowEditorPage.tsx:84
↓ 4 callers
Method
flush
刷新缓冲区
src/domain/services/logging_metrics.py:583
↓ 4 callers
Method
format_progress_for_sse
格式化进度事件为 SSE 消息 参数: event: ExecutionProgressEvent 实例 返回: SSE 格式的消息字符串
src/domain/agents/conversation_agent.py:891
← previous
next →
1,001–1,100 of 13,770, ranked by callers