MCPcopy Create free account

hub / github.com/DSGWJQ/Feagent / functions

Functions13,770 in github.com/DSGWJQ/Feagent

↓ 3 callersFunctionrender_template
渲染简单模板 支持 {{variable}} 语法 参数: template: 模板字符串 variables: 变量字典 返回: 渲染后的字符串
src/domain/services/ai_node_executors.py:65
↓ 3 callersMethodrequest
(self, *, method: str, url: str, headers: dict[str, str], json: Any)
tests/integration/test_workflow_engine_templating_http_stub.py:45
↓ 3 callersMethodrequest_subagent_spawn_async
请求生成子Agent(异步版本,P0-2 Fix) 关键保证: 1. SpawnSubAgentEvent被await发布(协调者必须看到) 2. 如果wait_for_result,状态转换发生在事件发布之后 参数:
src/domain/agents/conversation_agent.py:732
↓ 3 callersMethodresolve_reference
解析引用 参数: ref: 引用 ID 返回: 引用的 Schema 字典 异常: InvalidSchemaError: 引用不存在
src/domain/services/parent_node_schema.py:405
↓ 3 callersMethodrestart
重启 Agent 参数: agent_id: Agent ID reason: 重启原因 返回: LifecycleResult: 操作结果
src/domain/services/resource_lifecycle.py:842
↓ 3 callersMethodretrieve_context
检索查询上下文 参数: query_context: 查询上下文 返回: 检索到的上下文
src/application/services/rag_service.py:65
↓ 3 callersMethodretrieve_knowledge
按查询检索知识(委托) 参数: query: 查询文本 workflow_id: 工作流ID(可选,用于过滤和缓存) top_k: 返回结果数量 返回: Knowled
src/domain/agents/coordinator_agent.py:2823
↓ 3 callersMethodrun
运行引擎主循环 异步生成器,yield 事件流。 参数: user_input: 用户输入 Yields: EngineEvent: 引擎事件
src/domain/agents/conversation_engine.py:274
↓ 3 callersFunctionsafe_eval
安全执行表达式 参数: expression: 要执行的表达式 variables: 变量字典 返回: 表达式结果
src/domain/services/advanced_executors.py:68
↓ 3 callersMethodsave_document_chunk
保存文档分块
src/domain/knowledge_base/ports/knowledge_repository.py:62
↓ 3 callersMethodsearch_by_symptom
按症状搜索案例
src/domain/services/coordinator_runbook.py:867
↓ 3 callersMethodset_context_data
设置上下文数据
src/domain/services/coordinator_runbook.py:694
↓ 3 callersFunctionset_event_bus
设置全局 EventBus 单例(由 main.py lifespan 调用) Args: event_bus: 应用级 EventBus 实例
src/interfaces/api/dependencies/agents.py:27
↓ 3 callersMethodset_event_callback
设置事件回调函数 用于 SSE 流式返回执行状态 参数: callback: 回调函数,接收事件类型和数据
src/domain/services/workflow_executor.py:31
↓ 3 callersMethodset_input_mapping
设置输入映射 参数: mapping: 输入映射 {外部字段: 内部节点.字段}
src/domain/services/generic_node.py:254
↓ 3 callersMethodset_notification_callback
设置通知回调
src/domain/services/dynamic_node_monitoring.py:661
↓ 3 callersMethodset_output
设置输出值 参数: key: 输出key value: 输出值
src/domain/services/context_manager.py:191
↓ 3 callersMethodset_output_mapping
设置输出映射 参数: mapping: 输出映射 {外部字段: 内部节点.字段}
src/domain/services/generic_node.py:266
↓ 3 callersMethodset_scenario
设置当前场景 Args: scenario: 场景提示词实例
src/domain/services/scenario_prompt_system.py:480
↓ 3 callersMethodset_scenario
设置当前场景 Args: scenario: 场景提示词实例
src/domain/services/scenario_prompt_system.py:859
↓ 3 callersMethodset_threshold
设置阈值
src/domain/services/supervision_strategy.py:505
↓ 3 callersFunctionshlex_quote
(s: str)
scripts/organize_project_files.py:483
↓ 3 callersMethodshould_rollback
检查是否需要回滚
src/domain/services/ab_testing_system.py:744
↓ 3 callersMethodstart
开始监听简单消息事件 订阅 SimpleMessageEvent,将消息记录到 message_log。 如果已经在监听,则不重复订阅(幂等操作)。 异常: ValueError: event_bus 为 None 时抛出
src/domain/services/message_log_listener.py:82
↓ 3 callersMethodstart_experiment
启动实验 参数: experiment_id: 实验ID 返回: 是否成功启动
src/domain/services/experiment_orchestrator.py:156
↓ 3 callersMethodstart_experiment
启动实验(代理到 ExperimentOrchestrator)
src/domain/agents/coordinator_agent.py:3617
↓ 3 callersMethodstart_monitoring
启动实时监控 参数: workflow_id: 工作流ID 返回: 监控会话ID
src/domain/services/supervision_strategy.py:570
↓ 3 callersMethodstop_container_execution_listening
停止容器执行事件监听 取消所有事件订阅,复位监听状态。
src/domain/services/container_execution_monitor.py:112
↓ 3 callersMethodstop_listening
停止子Agent事件监听
src/domain/services/subagent_orchestrator.py:123
↓ 3 callersMethodsubmit_prompt_change
提交提示词变更申请(代理到 Facade)
src/domain/agents/coordinator_agent.py:2017
↓ 3 callersMethodsubscribe
订阅事件类型
tests/unit/domain/services/test_save_request_channel.py:34
↓ 3 callersMethodsuggest_language
根据描述建议编程语言 参数: description: 任务描述 返回: 建议的语言
src/domain/services/node_code_generator.py:731
↓ 3 callersMethodsummarize
摘要上下文数据 参数: data: 要摘要的数据 max_tokens: 最大token数 返回: 摘要结果 异常: SummarizationErr
src/domain/services/context_bridge.py:327
↓ 3 callersMethodsync_edge_created
同步边创建 参数: workflow_id: 工作流ID edge_id: 边ID source_id: 源节点ID target_id: 目标节点ID
src/domain/services/canvas_synchronizer.py:264
↓ 3 callersMethodsync_node_updated
同步节点更新 参数: workflow_id: 工作流ID node_id: 节点ID changes: 变更内容
src/infrastructure/websocket/canvas_sync.py:712
↓ 3 callersMethodsync_workflow_completed
同步工作流完成 参数: workflow_id: 工作流ID status: 状态 outputs: 输出结果
src/infrastructure/websocket/canvas_sync.py:830
↓ 3 callersMethodthink
思考,生成推理内容
src/domain/agents/conversation_agent.py:99
↓ 3 callersMethodto_canvas_data
转换为画布数据 返回: 画布渲染所需的数据结构
src/domain/services/generic_node.py:363
↓ 3 callersMethodto_dict
转换为字典
src/domain/services/log_analysis.py:83
↓ 3 callersMethodto_dict
Convert Workflow entity to public dict format. Args: workflow: Domain Workflow entity Returns: Dict with fro
src/application/services/workflow_public_mapper.py:30
↓ 3 callersMethodto_dict_list
序列化为字典列表 返回: 字典列表
src/domain/services/knowledge_reference.py:203
↓ 3 callersMethodto_human_readable
生成人类可读的摘要文本 返回: 格式化的摘要文本
src/domain/agents/execution_summary.py:285
↓ 3 callersMethodto_sse
转换为 SSE 格式
src/domain/services/stream_message_formatter.py:93
↓ 3 callersMethodto_yaml
序列化为 YAML 字符串 返回: YAML 格式字符串
src/domain/agents/node_definition.py:1017
↓ 3 callersMethodtoggle_collapsed
切换折叠状态
src/domain/agents/node_definition.py:310
↓ 3 callersMethodtransition_to_async
状态转换(异步版本,P0-2 Fix) 保证: 1. _state修改受_state_lock保护 2. StateChangedEvent按顺序await发布 参数: new_state: 目标状态
src/domain/agents/conversation_agent_state.py:341
↓ 3 callersMethodunregister
注销工具 参数: name: 工具名称 返回: 被移除的工具或 None
src/domain/services/tool_engine.py:619
↓ 3 callersMethodupdate
更新知识条目 只更新提供的字段,未提供的字段保持不变。 参数: entry_id: 条目 ID title: 新标题(可选) content: 新内容(可选) cate
src/domain/services/knowledge_manager.py:177
↓ 3 callersMethodupdate_confidence
更新置信度(限制在 0-1 范围内)
src/domain/services/knowledge_maintenance.py:141
↓ 3 callersMethodupdate_context_metrics
更新上下文指标
src/domain/services/resource_lifecycle.py:339
↓ 3 callersMethodupdate_load
更新负载指标
src/domain/services/management_modules.py:337
↓ 3 callersMethodupdate_login_time
更新最后登录时间 业务方法:每次用户登录时调用
src/domain/entities/user.py:120
↓ 3 callersMethodupdate_metrics
更新运行指标
src/domain/services/resource_lifecycle.py:128
↓ 3 callersMethodupdate_note_content
更新笔记内容 只允许修改 draft 或 pending_user 状态的笔记。 已批准的笔记不可修改。 参数: note: 笔记实例 new_content: 新内容 异常:
src/domain/services/knowledge_note_lifecycle.py:133
↓ 3 callersMethodupdate_profile
更新用户资料 业务方法:允许用户更新部分信息 Args: name: 新的用户姓名 avatar_url: 新的头像URL
src/domain/entities/user.py:128
↓ 3 callersFunctionuseAgent
(id: string)
web/src/shared/hooks/useAgents.ts:79
↓ 3 callersFunctionuseCreateAgent
()
web/src/shared/hooks/useAgents.ts:113
↓ 3 callersFunctionuseRunReplay
(options: UseRunReplayOptions)
web/src/hooks/useRunReplay.ts:21
↓ 3 callersMethodvalidate_all
执行完整验证 依次执行: 1. 必需字段验证 2. 输入对齐验证(如果提供了 inputs) 3. 沙箱许可验证 参数: node_def: 节点定义 inputs:
src/domain/services/self_describing_node_validator.py:410
↓ 3 callersMethodvalidate_output
验证输出数据 参数: output_data: 输出数据字典 返回: 错误消息列表(空列表表示验证通过)
src/domain/agents/node_definition.py:1194
↓ 3 callersFunctionvalidate_package
验证上下文包 Args: package: 待验证的上下文包 Returns: (is_valid, errors) 元组
src/domain/services/context_protocol.py:226
↓ 3 callersMethodvalidate_params_or_raise
验证工具调用参数,失败时抛出异常 参数: tool_name: 工具名称 params: 调用参数 返回: 验证后的参数(包含默认值) 抛出: Too
src/domain/services/tool_engine.py:727
↓ 3 callersMethodwarning
警告日志
src/domain/services/subagent_context_bridge.py:218
↓ 3 callersMethodwire_children
为父节点的子节点创建连线 参数: parent_node: 父节点定义 返回: 子节点间的边列表
src/domain/services/workflow_dependency_graph.py:188
↓ 3 callersMethodwrite_violation
写入违规记录 参数: session_id: 会话 ID result: 保存结果 返回: 知识条目 ID 或 None
src/domain/services/save_request_receipt.py:380
↓ 2 callersMethod_add_to_scheduler
将定时工作流添加到调度器。
src/domain/services/workflow_scheduler.py:86
↓ 2 callersFunction_audit_langgraph_rollback_once
()
src/application/services/workflow_execution_facade.py:31
↓ 2 callersMethod_audit_run_persistence_rollback
Audit when rollback flag disables run persistence and legacy execution is used.
src/interfaces/api/services/workflow_executor_adapter.py:83
↓ 2 callersFunction_build_app
( *, test_engine, container: ApiContainer, coordinator: object, )
tests/integration/api/workflows/test_execute_stream_validation_gate.py:109
↓ 2 callersFunction_build_container
( executor_registry: NodeExecutorRegistry, event_bus: EventBus, coordinator: CoordinatorPort, )
src/interfaces/api/main.py:60
↓ 2 callersMethod_build_evaluation_context
合并多层上下文 按照优先级合并:item > context > workflow_vars > global_vars 安全机制:移除与白名单函数同名的变量,防止函数劫持 参数: context: 主上下文
src/domain/services/expression_evaluator.py:569
↓ 2 callersMethod_build_messages
(system_prompt: str, user_prompt: str)
src/infrastructure/llm/langchain_workflow_chat_llm.py:40
↓ 2 callersMethod_build_rules
构建规则列表 返回: 规则字典列表
src/domain/services/context/service.py:165
↓ 2 callersMethod_build_summary
生成上下文摘要 参数: user_input: 用户输入 rules_count: 规则数量 tools_count: 工具数量 knowledge_count: 知识条目数量
src/domain/services/context/service.py:280
↓ 2 callersFunction_build_test_app
( *, test_engine, workflow: Workflow, event_bus: EventBus, )
tests/integration/api/workflows/test_validated_decision_run_events_replay_e2e.py:85
↓ 2 callersMethod_calculate_execution_time
计算执行时间(毫秒)
src/domain/services/subagent_context_bridge.py:502
↓ 2 callersMethod_calculate_relevance
计算相关性得分 参数: note: 笔记实例 query: 查询字符串 返回: 相关性得分(0-1之间)
src/domain/services/knowledge_vault_retriever.py:205
↓ 2 callersMethod_check_condition
检查条件是否满足 参数: condition: 条件(字符串或函数) context: 上下文 返回: 条件是否满足
src/domain/services/enhanced_rule_repository.py:382
↓ 2 callersMethod_check_dangerous_keywords
检查表达式是否包含危险关键字 参数: expression: 表达式字符串 异常: UnsafeExpressionError: 包含危险关键字
src/domain/services/expression_evaluator.py:445
↓ 2 callersMethod_check_type
检查值类型
src/domain/agents/node_definition.py:1145
↓ 2 callersMethod_chunk_document
将文档切分为多个块
scripts/ingest_docs.py:149
↓ 2 callersMethod_compress_session
执行会话压缩
src/domain/services/token_guardrail.py:161
↓ 2 callersMethod_convert_month_abbr
转换月份缩写为数字 参数: month_field: 月份字段 返回: 转换后的字段
src/domain/entities/scheduled_workflow.py:175
↓ 2 callersMethod_convert_weekday_abbr
转换星期缩写为数字(0=Sunday, 6=Saturday) 参数: weekday_field: 星期字段 返回: 转换后的字段
src/domain/entities/scheduled_workflow.py:206
↓ 2 callersFunction_count_execution_events
(db: Session, *, run_id: str)
tests/integration/api/workflows/test_validated_decision_run_events_replay_e2e.py:157
↓ 2 callersMethod_count_tokens
计算文本的token数量
src/infrastructure/knowledge_base/chroma_retriever_service.py:146
↓ 2 callersFunction_create_memory_service_impl
创建 CompositeMemoryService 实现(内部工厂函数) Args: session: 数据库会话(可选,用于测试) Returns: CompositeMemoryService 实例
src/interfaces/api/dependencies/memory.py:43
↓ 2 callersMethod_create_scheduled_run
(self, *, session: Session, workflow_id: str)
src/interfaces/api/services/workflow_executor_adapter.py:168
↓ 2 callersFunction_create_session
()
src/interfaces/api/main.py:56
↓ 2 callersFunction_create_simple_workflow
(db: Session)
tests/integration/api/runs/test_run_events_replay_api.py:66
↓ 2 callersMethod_create_slot
创建槽位(内部方法)
src/domain/services/tool_concurrency_controller.py:338
↓ 2 callersMethod_create_supplement_injection
创建补充型注入(SUPPLEMENT, PRE_THINKING) 参数: session_id: 会话 ID content: 补充内容 reason: 注入原因 返回:
src/domain/services/supervision_facade.py:211
↓ 2 callersMethod_ensure_agent_for_run
Ensure `run.agent_id` is set and refers to an existing Agent row. Red-team note: - SQLite schema enforces runs.agent_id NOT NULL + FK
src/infrastructure/database/repositories/run_repository.py:116
↓ 2 callersMethod_estimate_message_tokens
估计单条消息的 token 数 使用启发式方法:中文约1-2字符1个token,英文约4字符1个token 参数: msg: 消息 返回: 估计的 token 数
src/domain/services/workflow_chat_service_enhanced.py:275
↓ 2 callersFunction_evaluate_edge_condition
( *, condition: str, source_output: Any, evaluator: ExpressionEvaluator, context: dict[str
src/domain/services/workflow_engine.py:312
↓ 2 callersMethod_execute_child_node
执行子节点
src/domain/services/self_describing_node.py:686
↓ 2 callersMethod_execute_retry
执行重试
src/domain/agents/error_handling.py:289
↓ 2 callersMethod_execute_workflow_async
执行定时任务并记录结果。 事务边界: - 若提供 session_factory,创建独立 session 并在操作后 commit/close - 确保调度器执行不会造成长事务问题
src/domain/services/workflow_scheduler.py:108
↓ 2 callersMethod_extract_conversation_summary
提取对话摘要 参数: raw_data: 原始数据 返回: 对话摘要字符串
src/domain/services/context_compressor.py:526
↓ 2 callersMethod_extract_execution_status
提取执行状态 参数: raw_data: 原始数据 返回: 执行状态字典
src/domain/services/context_compressor.py:391
← previousnext →1,501–1,600 of 13,770, ranked by callers