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
set_knowledge_store
设置知识库存储 参数: store: ToolKnowledgeStore 实例
src/domain/services/tool_engine.py:802
↓ 4 callers
Method
set_state
设置执行状态 参数: state: 状态值 (pending/running/completed/failed)
src/domain/services/context_manager.py:178
↓ 4 callers
Function
setupHookReturn
(overrides: Partial<ReturnType<typeof createDefaultHookReturn>> = {})
web/src/shared/components/__tests__/WorkflowAIChat.test.tsx:33
↓ 4 callers
Method
spawn_subtask
在隔离环境中执行子任务 创建隔离的执行上下文,执行子任务,返回结果。 子任务的修改不会影响主上下文。 参数: subtask: 子任务定义 executor: 执行器(实现 SubTaskExecut
src/domain/agents/conversation_engine.py:679
↓ 4 callers
Method
stop_monitoring
停止工作流状态监控 Phase 35.5: 委托给 WorkflowStateMonitor Phase 35.5.1: 写回 base_state 以支持状态恢复
src/domain/agents/coordinator_agent.py:2295
↓ 4 callers
Method
stop_reflection_listening
停止监听反思事件 Phase 35.4: 委托到 ReflectionContextManager
src/domain/agents/coordinator_agent.py:2556
↓ 4 callers
Method
substitute_variables
替换模板中的变量 Args: template: 模板字符串 variables: 变量字典 default_value: 缺失变量的默认值 Returns:
src/domain/services/scenario_prompt_system.py:635
↓ 4 callers
Function
summarizeWorkflow
(workflow: WorkflowResponse)
web/tests/e2e/fullreal/ux-wf-201-real-llm.spec.ts:396
↓ 4 callers
Method
sync_edge_created
同步边创建 参数: workflow_id: 工作流ID edge_id: 边ID source_id: 源节点ID target_id: 目标节点ID
src/infrastructure/websocket/canvas_sync.py:755
↓ 4 callers
Method
to_messages
将差异转换为 WebSocket 消息列表 参数: workflow_id: 工作流 ID 返回: 消息列表
src/infrastructure/websocket/canvas_sync.py:157
↓ 4 callers
Method
to_prompt_format
转换为提示词格式 返回可直接插入上下文的格式化字符串。
src/domain/services/context_injection.py:110
↓ 4 callers
Method
unregister_session
注销会话 参数: session_id: 会话ID
src/domain/agents/agent_channel.py:162
↓ 4 callers
Method
unsubscribe
Unsubscribe from an event type.
src/domain/agents/conversation_agent_protocols.py:39
↓ 4 callers
Method
update_config
更新节点配置 用于编辑节点属性时更新配置 参数: config: 新的配置
src/domain/entities/node.py:98
↓ 4 callers
Method
update_document
更新文档
src/domain/knowledge_base/ports/knowledge_repository.py:52
↓ 4 callers
Method
update_status
更新请求状态 参数: request_id: 请求 ID status: 新状态
src/domain/services/save_request_channel.py:490
↓ 4 callers
Method
update_status_if_current
条件更新状态 (乐观并发控制 / Compare-And-Swap) 仅当当前数据库中的状态等于 current_status 时,才更新为 target_status。 用于解决并发场景下的状态竞态问题 (TOCTOU)。 Args:
src/domain/ports/run_repository.py:136
↓ 4 callers
Function
useAgents
(params?: AgentListParams)
web/src/shared/hooks/useAgents.ts:60
↓ 4 callers
Function
useWorkflowAI
({ workflowId, onApplyWorkflow, onPreviewWorkflow, }: UseWorkflowAIOptions)
web/src/hooks/useWorkflowAI.ts:35
↓ 4 callers
Function
useWorkflowInteraction
()
web/src/features/workflows/contexts/WorkflowInteractionContext.tsx:16
↓ 4 callers
Method
validate_against_template
对比模板验证
src/domain/services/prompt_stability_monitor.py:598
↓ 4 callers
Method
validate_decision
(self, _decision)
tests/unit/domain/agents/test_conversation_agent_emitter_integration.py:330
↓ 4 callers
Method
validate_output_alignment
验证输出与模式定义对齐 参数: node_def: 节点定义 output: 实际输出 返回: 验证结果
src/domain/services/self_describing_node_validator.py:329
↓ 4 callers
Function
validate_result_package
验证结果包 Args: package: 待验证的结果包 Returns: (is_valid, errors) 元组
src/domain/services/subagent_context_bridge.py:137
↓ 4 callers
Method
validate_syntax
验证模板语法 参数: template: 模板字符串 返回: 验证结果
src/domain/services/prompt_template_system.py:509
↓ 4 callers
Method
validate_with_logging
执行验证并记录审批日志 参数: node_def: 节点定义 inputs: 实际输入(可选) require_sandbox: 是否强制要求沙箱 返回: 验证结果
src/domain/services/self_describing_node_validator.py:449
↓ 4 callers
Method
validate_workflow
验证工作流 参数: workflow_definition: 工作流定义 返回: 验证结果
src/domain/services/intervention/workflow_modifier.py:162
↓ 4 callers
Method
wait_all
等待所有任务完成 参数: timeout: 超时时间(秒) 返回: True 如果所有任务都完成,False 如果超时
src/domain/services/concurrent_execution_manager.py:301
↓ 3 callers
Method
_add_entry
添加日志条目
src/domain/services/resource_lifecycle.py:475
↓ 3 callers
Method
_add_event
添加事件到日志
src/domain/services/result_memory_integration.py:508
↓ 3 callers
Method
_add_log
添加日志 参数: request_id: 请求 ID entry: 日志条目
src/domain/services/save_request_receipt.py:635
↓ 3 callers
Method
_assert_error_classification_fields
Assert error classification fields are present and correct
tests/integration/api/test_workflow_execution_error_classification.py:106
↓ 3 callers
Function
_assert_path_absent
(paths: dict, path: str)
tests/integration/api/workflows/test_route_guardrails.py:40
↓ 3 callers
Method
_build_system_prompt
构造系统提示词(包含历史上下文和RAG上下文) 参数: workflow: 当前工作流 rag_context: RAG检索到的上下文(可选) 返回: 系统提示词
src/domain/services/workflow_chat_service_enhanced.py:554
↓ 3 callers
Method
_calculate_tfidf_scores
计算每条消息的 TF-IDF 分数 TF-IDF = TF(词频) × IDF(逆文档频率) - TF: 词在文档中出现的频率 - IDF: log(总文档数 / 包含该词的文档数) Args:
src/infrastructure/memory/tfidf_compressor.py:118
↓ 3 callers
Method
_classify_by_keywords_fallback
关键词匹配回退方案 参数: input_data: 分类输入数据 返回: ClassifyTaskOutput 分类结果
src/application/use_cases/classify_task.py:167
↓ 3 callers
Function
_cleanup_failed_creation
()
src/interfaces/api/routes/workflows.py:966
↓ 3 callers
Method
_compress_truncate
截断策略压缩
src/domain/services/context_protocol.py:636
↓ 3 callers
Method
_compression_callback
压缩回调(集成到 ReflectionContextManager)
src/domain/agents/coordinator_agent.py:652
↓ 3 callers
Method
_count_tokens
计算文本的token数量
scripts/ingest_docs.py:95
↓ 3 callers
Method
_estimate_package_tokens
估算整个包的 Token 数
src/domain/services/context_protocol.py:600
↓ 3 callers
Method
_execute_node
执行单个节点
src/domain/services/workflow_dependency_graph.py:494
↓ 3 callers
Method
_extract_next_actions
提取下一步行动 参数: raw_data: 原始数据 返回: 下一步行动列表
src/domain/services/context_compressor.py:569
↓ 3 callers
Function
_filter_events
Filter events by type from event bus log
tests/unit/domain/agents/test_workflow_agent_node_execution.py:61
↓ 3 callers
Method
_generate_id
生成节点ID
src/domain/services/node_hierarchy_service.py:122
↓ 3 callers
Method
_get_allowed_functions
根据模式返回可调用函数白名单 参数: mode: 求值模式(safe/advanced) 返回: 函数名到函数对象的映射
src/domain/services/expression_evaluator.py:643
↓ 3 callers
Method
_handle_human_node_request
发布人机交互事件并返回挂起状态。
src/domain/agents/workflow_agent.py:531
↓ 3 callers
Function
_is_protected
(rules: Rules, root: Path, path: Path)
scripts/organize_project_files.py:123
↓ 3 callers
Method
_normalize_timestamp
将时间戳统一为可排序的字符串 参数: value: 时间戳(可能是 datetime 对象或字符串) 返回: ISO格式的时间字符串(用于排序) 注意: - datetime
src/domain/services/unified_log_integration.py:312
↓ 3 callers
Function
_now_stamp
()
scripts/organize_project_files.py:52
↓ 3 callers
Function
_parse_sse_events
(text: str)
tests/integration/auth/test_github_oauth_integration.py:45
↓ 3 callers
Method
_publish_event
发布事件
src/domain/services/resource_lifecycle.py:647
↓ 3 callers
Method
_record_decision
记录决策到历史 参数: decision: Decision 对象 返回: 决策对象(与输入相同)
src/domain/agents/conversation_agent_react_core.py:782
↓ 3 callers
Method
_record_decision_async
记录决策到历史(异步staged版本,P0-2 Phase 2) 使用staged机制暂存决策记录,批量提交以减少锁获取次数。 参数: action: 行动字典 返回: 决策对象
src/domain/agents/conversation_agent_react_core.py:802
↓ 3 callers
Method
_record_execution
记录执行结果到知识库 参数: result: 执行结果 context: 执行上下文 params: 调用参数
src/domain/services/tool_engine.py:997
↓ 3 callers
Method
_record_log
记录传递日志
src/domain/services/context_bridge_enhanced.py:333
↓ 3 callers
Method
_run_in_sandbox
在沙箱中运行代码
src/domain/services/self_describing_node.py:548
↓ 3 callers
Method
_safe_complete
(self, emitter: ConversationFlowEmitter)
src/application/services/conversation_turn_orchestrator.py:232
↓ 3 callers
Method
_safe_emit
( self, *, session_id: str, message: str, emitter: ConversationFlowEmi
src/application/services/conversation_turn_orchestrator.py:216
↓ 3 callers
Method
_send_email
发送邮件通知 参数: config: 节点配置 subject: 邮件主题 message: 邮件内容 返回: 通知结果
src/infrastructure/executors/notification_executor.py:125
↓ 3 callers
Function
_session_factory
(test_engine)
tests/unit/infrastructure/executors/test_tool_node_executor.py:32
↓ 3 callers
Method
_should_execute_node
判断节点是否应该执行 逻辑: - 如果没有入边,则执行(起始节点) - 如果有入边,至少一条边的条件满足才执行 - 如果边没有condition,视为True(无条件执行) 参数: node_
src/domain/agents/workflow_agent.py:1482
↓ 3 callers
Method
_to_entity
将 ORM 模型转换为领域实体(聚合根) 为什么需要这个方法? - ORM 模型是数据库表映射(Infrastructure 层) - 领域实体是业务逻辑载体(Domain 层) - 两者职责不同,需要转换 转换策略
src/infrastructure/database/repositories/workflow_repository.py:73
↓ 3 callers
Method
_to_entity
将 ORM 模型转换为领域实体 为什么需要这个方法? - ORM 模型是数据库表映射(Infrastructure 层) - 领域实体是业务逻辑载体(Domain 层) - 两者职责不同,需要转换 转换策略:
src/infrastructure/database/repositories/agent_repository.py:64
↓ 3 callers
Method
_validate_resources
验证 resources
src/domain/services/parent_node_schema.py:662
↓ 3 callers
Method
add_alert_rule
添加告警规则 参数: name: 规则名称 rule_type: 规则类型 (threshold/pattern/rate) severity: 严重性 (info/warning/critical)
src/domain/agents/coordinator_agent.py:3385
↓ 3 callers
Method
add_document_chunks
添加文档块到ChromaDB
src/infrastructure/knowledge_base/chroma_retriever_service.py:393
↓ 3 callers
Method
add_issue
添加问题
src/domain/services/supervision/models.py:38
↓ 3 callers
Method
add_log_alert_rule
添加基于日志级别的告警规则
src/domain/services/management_modules.py:1151
↓ 3 callers
Method
add_message
添加消息到历史
src/infrastructure/lc_adapters/workflow/react_orchestrator.py:76
↓ 3 callers
Method
add_message_simple
添加消息到对话历史(context_bridge兼容接口) 参数: role: 消息角色(user/assistant/system) content: 消息内容 说明: 自动添加timest
src/domain/entities/session_context.py:255
↓ 3 callers
Method
add_payload_range_validation_rule
添加 payload 字段值范围验证规则 P1-1步骤4-5: 直接委托给 RuleEngineFacade 参数: decision_type: 决策类型 field_ranges: 字段范围映射 {字段路径: {
src/domain/agents/coordinator_agent.py:2105
↓ 3 callers
Method
add_payload_required_fields_rule
添加 Payload 必填字段规则 参数: decision_type: 决策类型 required_fields: 必填字段列表 rule_id: 规则ID(可选) 返回:
src/domain/services/rule_engine_facade.py:426
↓ 3 callers
Method
analyze_intent_distribution
分析意图分布 参数: traces: 任务追踪列表 返回: 意图分布字典
src/domain/services/log_analysis.py:661
↓ 3 callers
Function
analyze_parallel_opportunities
分析并行执行机会 识别哪些节点可以并行执行。 Args: nodes: 节点列表 edges: 边列表 Returns: 并行分析结果
src/domain/agents/conversation_agent_enhanced.py:171
↓ 3 callers
Method
analyze_workflow_usage
分析工作流使用情况 参数: traces: 任务追踪列表 返回: 工作流使用统计
src/domain/services/log_analysis.py:691
↓ 3 callers
Method
approve_change
审批通过版本变更 Args: record_id: 变更记录ID approver: 审批人 comment: 审批意见 Returns: VersionChangeR
src/domain/services/prompt_version_manager.py:425
↓ 3 callers
Method
calculate_cost
计算 LLM 调用成本 参数: provider: LLM 提供商 model: 模型名称 prompt_tokens: 提示词 token 数 completion_tokens: 完
src/domain/entities/llm_usage.py:137
↓ 3 callers
Method
calculate_usage_ratio
计算上下文使用率 参数: used_tokens: 已使用的 token 数 返回: 使用率(0-1 之间,超过 1 表示超限)
src/infrastructure/lc_adapters/token_counter.py:162
↓ 3 callers
Method
can_escalate
判断是否可以升级到目标级别 参数: current: 当前级别 target: 目标级别 返回: 是否可以升级
src/domain/services/intervention/models.py:61
↓ 3 callers
Method
can_fulfill
检查是否可以满足资源请求
src/domain/services/management_modules.py:126
↓ 3 callers
Method
can_schedule
判断是否可以调度
src/domain/services/management_modules.py:258
↓ 3 callers
Function
cancel
()
web/src/features/workflows/e2e/workflow-execution.test.tsx:32
↓ 3 callers
Method
cancel
取消 SSE 流 设置取消标志并触发清理。
src/interfaces/api/services/sse_emitter_handler.py:160
↓ 3 callers
Method
check_alignment
检查行动是否与目标对齐 参数: goal: 目标描述 action_description: 行动描述 keywords: 可选的关键词列表 context: 可选的上下文
src/domain/services/rule_generator.py:136
↓ 3 callers
Method
check_health
检查整体系统健康状态
src/domain/services/dynamic_node_monitoring.py:591
↓ 3 callers
Method
check_metrics_health
检查指标收集健康状态
src/domain/services/dynamic_node_monitoring.py:623
↓ 3 callers
Method
chunk_document
( self, content: str, chunk_size: int = 1000, chunk_overlap: int = 200, )
src/interfaces/api/dependencies/rag.py:238
↓ 3 callers
Method
classify_intent
分类用户意图(Phase 14 新增) 参数: user_input: 用户输入 context: 上下文信息 返回: 意图分类结果字典,包含: - intent: 意
src/domain/agents/conversation_agent.py:158
↓ 3 callers
Method
collapse
折叠节点,隐藏子节点
src/domain/agents/node_definition.py:306
↓ 3 callers
Method
collect
采集系统指标
src/domain/services/logging_metrics.py:679
↓ 3 callers
Method
compare
比较两个快照
src/domain/services/coordinator_runbook.py:199
↓ 3 callers
Method
complete
完成实验
src/domain/services/ab_testing_system.py:135
↓ 3 callers
Method
complete_recovery
完成恢复 参数: success: 是否成功 result: 结果 返回: 最终对话状态
src/domain/agents/error_handling.py:762
↓ 3 callers
Method
compress_summary
压缩执行总结 参数: summary: ExecutionSummary 实例 返回: PowerCompressedContext
src/domain/services/power_compressor.py:307
↓ 3 callers
Method
conclude_test
结束 A/B 测试
src/domain/services/coordinator_runbook.py:585
↓ 3 callers
Method
count
统计用户总数 返回: int: 用户总数
src/infrastructure/database/repositories/user_repository.py:262
↓ 3 callers
Method
count_documents_by_workflow
统计指定工作流的文档数量
src/domain/knowledge_base/ports/knowledge_repository.py:93
↓ 3 callers
Method
count_text
计算文本的 token 数 参数: text: 文本内容 返回: token 数
src/infrastructure/lc_adapters/token_counter.py:143
↓ 3 callers
Function
createSseReadableStream
(chunks: string[], intervalMs = 0)
web/src/features/workflows/e2e/workflow-execution.test.tsx:16
← previous
next →
1,201–1,300 of 13,770, ranked by callers