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
↓ 6 callers
Method
_to_entity
将 ORM 模型转换为领域实体 参数: model: LLMProviderModel ORM 模型 返回: LLMProvider 领域实体
src/infrastructure/database/repositories/llm_provider_repository.py:46
↓ 6 callers
Function
_tool_to_response
将 Tool 实体转换为 Response DTO
src/interfaces/api/routes/tools.py:52
↓ 6 callers
Method
_update_events
更新事件状态
src/domain/services/reliable_emitter.py:304
↓ 6 callers
Method
acknowledge
确认告警
src/domain/services/management_modules.py:1116
↓ 6 callers
Method
activate
激活插件 参数: plugin_id: 插件ID 异常: KeyError: 插件不存在 Exception: 激活回调抛出的异常
src/domain/services/extension_api.py:169
↓ 6 callers
Method
add_case
添加异常案例
src/domain/services/coordinator_runbook.py:840
↓ 6 callers
Method
add_trace_event
添加追踪事件
src/domain/services/coordinator_runbook.py:706
↓ 6 callers
Method
analyze_save_request
分析保存请求 参数: request: 保存请求数据 返回: 触发的监督信息列表
src/domain/services/supervision_module.py:540
↓ 6 callers
Method
archive_note
归档笔记 将笔记从 approved 状态转换为 archived 状态。 参数: note: 笔记实例 异常: LifecycleTransitionError: 如果当前状态不允许归档
src/domain/services/knowledge_note_lifecycle.py:118
↓ 6 callers
Method
build_control_nodes
将 ControlFlowIR 转换为 NodeDefinition + EdgeDefinition 参数: control_ir: 控制流 IR existing_nodes: 现有节点列表(用于避免ID冲突)
src/domain/agents/conversation_agent_control_flow.py:111
↓ 6 callers
Method
build_range_validation_rule
构建字段值范围验证规则 参数: decision_type: 决策类型 field_ranges: 字段范围映射 {字段路径: {"min": 最小值, "max": 最大值}} 返回: Ru
src/domain/services/safety_guard/payload_rule_builder.py:158
↓ 6 callers
Method
build_required_fields_rule
构建必填字段验证规则 参数: decision_type: 决策类型 required_fields: 必填字段列表 返回: Rule: 验证规则
src/domain/services/safety_guard/payload_rule_builder.py:35
↓ 6 callers
Method
build_type_validation_rule
构建字段类型验证规则 参数: decision_type: 决策类型 field_types: 字段类型映射 {字段名: 类型} nested_field_types: 嵌套字段类型映射 {字段路径: 类型},
src/domain/services/safety_guard/payload_rule_builder.py:85
↓ 6 callers
Method
calculate_severity
计算严重程度 参数: ignored_notes: 被忽视的笔记列表 返回: 严重程度 (取最高级别)
src/domain/services/knowledge_deviation_alert.py:224
↓ 6 callers
Method
capture_snapshot
捕获快照
src/domain/services/coordinator_runbook.py:670
↓ 6 callers
Method
check_budget
检查预算状态 参数: session: 会话上下文 返回: BudgetStatus 枚举值
src/domain/services/token_guardrail.py:116
↓ 6 callers
Method
collapse
折叠节点(仅GENERIC类型)
src/domain/services/node_registry.py:308
↓ 6 callers
Method
commit
(self)
src/application/ports/transaction_manager.py:14
↓ 6 callers
Method
complete_with_error
因错误完成发射
src/domain/services/reliable_emitter.py:586
↓ 6 callers
Function
count
(items: DiffItem[], kind: DiffKind)
web/src/features/workflows/utils/workflowDiff.ts:126
↓ 6 callers
Method
create
创建审计日志 参数: note_id: 笔记ID action: 操作类型 actor: 操作者ID metadata: 额外元数据(可选) 返回:
src/domain/services/knowledge_audit_log.py:65
↓ 6 callers
Method
create_backup
创建会话备份(Step 3) 备份当前会话状态,用于压缩失败时回滚。 返回: 包含会话状态的备份字典
src/domain/entities/session_context.py:492
↓ 6 callers
Method
create_isolated
从父上下文创建隔离上下文(工厂方法) 参数: parent: 父执行上下文 subtask_id: 子任务ID 返回: SubTaskExecutionContext 实例
src/domain/agents/subtask_executor.py:188
↓ 6 callers
Function
create_mock_workflow_context
创建 Mock WorkflowContext
tests/unit/domain/agents/test_workflow_agent_hierarchical_integration.py:25
↓ 6 callers
Function
create_node_factory
创建 NodeFactory
tests/unit/domain/agents/test_workflow_agent_hierarchical_integration.py:36
↓ 6 callers
Method
create_openai
创建 OpenAI 提供商(预定义配置) 参数: api_key: OpenAI API 密钥 返回: 配置好的 OpenAI LLMProvider
src/domain/entities/llm_provider.py:102
↓ 6 callers
Method
create_rollout_plan
创建灰度发布计划
src/domain/services/ab_testing_system.py:682
↓ 6 callers
Method
create_session
创建新会话 参数: session_id: 会话 ID request: FastAPI Request timeout: 超时时间 返回: (emitter, han
src/interfaces/api/services/sse_emitter_handler.py:285
↓ 6 callers
Function
create_test_session_context
创建测试用会话上下文
tests/unit/domain/services/test_save_request_channel.py:69
↓ 6 callers
Method
deactivate
停用用户 业务方法:管理员可以停用用户账户 停用后,用户无法登录系统
src/domain/entities/user.py:147
↓ 6 callers
Method
decompose_to_nodes
(self, goal: str)
tests/integration/test_coordinator_context_integration.py:103
↓ 6 callers
Method
define_custom_node_type
定义自定义节点类型 参数: type_name: 类型名称 schema: 配置 schema executor_class: 可选的执行器类
src/domain/agents/workflow_agent.py:997
↓ 6 callers
Method
dequeue
出队 返回: QueuedExecution 或 None(队列为空时)
src/domain/services/tool_concurrency_controller.py:470
↓ 6 callers
Method
detect_cycle_kahn
使用 Kahn's 算法检测循环依赖 参数: nodes: 节点列表 edges: 边列表 返回: (是否有循环, 涉及循环的节点列表)
src/domain/services/safety_guard/dag_rule_builder.py:23
↓ 6 callers
Method
detect_deviation
检测偏离 参数: injected_notes: 注入给 agent 的笔记列表 agent_actions: agent 的行动列表 (包含 type 和 content) 返回: 偏离告警
src/domain/services/knowledge_deviation_alert.py:143
↓ 6 callers
Method
ensure_directories_exist
确保必要的目录存在
src/infrastructure/knowledge_base/rag_config_manager.py:95
↓ 6 callers
Function
estimate_tokens
估算文本的 token 数(通用方法) 使用简单的启发式方法: - 英文:约 4 个字符 = 1 token - 中文:约 1.5 个字符 = 1 token - 混合文本:根据字符类型加权平均 参数: text: 文本内容 返回
src/infrastructure/lc_adapters/token_counter.py:240
↓ 6 callers
Method
evaluate
评估所有规则 参数: metrics: 指标字典 {指标名: 值} 返回: 触发的告警列表
src/domain/services/dynamic_alert_rule_manager.py:243
↓ 6 callers
Method
execute
为工作流创建定时任务 参数: input_data: 输入数据 返回: 创建的ScheduledWorkflow实体 抛出: NotFoundError: 工作流不存在
src/application/use_cases/schedule_workflow.py:82
↓ 6 callers
Method
execute_container_node
执行容器节点 参数: node_id: 节点 ID 返回: 执行结果字典
src/domain/agents/workflow_agent.py:589
↓ 6 callers
Method
execute_intervention
执行干预(委托到 SupervisionFacade) 根据监督信息执行相应的干预动作。 参数: supervision_info: 监督信息 返回: 干预结果
src/domain/agents/coordinator_agent.py:1448
↓ 6 callers
Method
execute_parallel
并行执行节点 参数: nodes: 节点ID列表 execute_fn: 执行函数 fail_fast: 是否快速失败 max_concurrency: 最大并发数 返
src/domain/services/performance_optimizer.py:166
↓ 6 callers
Method
execute_streaming
执行流式对话(异步生成器) 异步生成器,按以下顺序产生事件: 1. processing_started - 开始处理 2. react_step - 每个 ReAct 推理步骤(可能有多个) 3. modifications_pre
src/application/use_cases/update_workflow_by_chat.py:210
↓ 6 callers
Method
execute_switch
执行版本切换
src/domain/services/coordinator_runbook.py:442
↓ 6 callers
Method
execute_update
执行模板更新
src/domain/services/coordinator_runbook.py:311
↓ 6 callers
Method
find_by_agent_id
根据 Agent ID 查找所有 Task 业务语义: - 查询某个 Agent 的所有计划任务(工作流) - 如果没有 Task,返回空列表(不抛异常) - 按创建时间倒序排列(最新的在前) - 返回完整的 Task
src/domain/ports/task_repository.py:169
↓ 6 callers
Method
for_workflow
为工作流节点创建上下文 参数: workflow_id: 工作流 ID node_id: 节点 ID inputs: 节点输入 **kwargs: 其他参数 返回:
src/domain/services/tool_executor.py:97
↓ 6 callers
Method
from_parent_schema
从父节点 Schema 创建 NodeDefinition 参数: schema: 父节点 schema 字典 registry: 子节点注册表 (ref -> NodeDefinition) validato
src/domain/agents/node_definition.py:338
↓ 6 callers
Method
generate_tool_rules
生成工具约束规则 参数: allowed_tools: 允许的工具列表 tool_configs: 工具配置 返回: 规则列表
src/domain/services/rule_generator.py:456
↓ 6 callers
Method
get_by_id
根据 ID 获取 Workflow 实体(不存在抛异常) 实现策略: - 使用 select() + scalars().first() - 级联加载:lazy="selectin" 自动加载 Node 和 Edge - 不存在抛出
src/infrastructure/database/repositories/workflow_repository.py:208
↓ 6 callers
Method
get_child_by_alias
按别名查找子节点
src/domain/agents/node_definition.py:560
↓ 6 callers
Method
get_container_execution_statistics
获取容器执行统计 兼容两种数据格式: - status 字段(completed/failed) - success 字段(仅存在success字段) 返回: 统计字典,包含: - t
src/domain/services/container_execution_monitor.py:240
↓ 6 callers
Method
get_context
获取上下文
src/domain/services/resource_lifecycle.py:335
↓ 6 callers
Method
get_context_for_conversation
获取用于对话Agent下一轮输入的上下文 返回包含所有八段压缩信息的上下文,供对话Agent引用。 参数: workflow_id: 工作流ID 返回: 对话Agent可用的上下文字典,如果不存在返
src/domain/agents/coordinator_agent.py:3231
↓ 6 callers
Method
get_embedding_config
获取嵌入模型配置
src/infrastructure/knowledge_base/rag_config_manager.py:57
↓ 6 callers
Method
get_failures
获取所有失败案例
src/domain/services/knowledge_maintenance.py:770
↓ 6 callers
Function
get_llm_for_classification
创建用于任务分类的 LLM 客户端 为什么单独创建? - 任务分类需要确定性输出(temperature 很低) - 分类任务通常输出较短(JSON格式) - 便于统一管理分类任务的 LLM 配置 参数: model: 模型名称(默认从配置
src/infrastructure/lc_adapters/llm_client.py:169
↓ 6 callers
Method
get_logs_by_session
按会话获取日志
src/domain/services/save_request_audit.py:759
↓ 6 callers
Method
get_priority
获取动作优先级 参数: action: 监督动作 返回: 优先级数值(越大优先级越高)
src/domain/services/supervision_module.py:48
↓ 6 callers
Method
get_rule
获取规则 参数: rule_id: 规则 ID 返回: 规则字典,如果不存在返回 None
src/domain/services/dynamic_alert_rule_manager.py:144
↓ 6 callers
Method
get_rule
根据ID获取规则 参数: rule_id: 规则ID 返回: 规则对象,不存在则返回None
src/domain/services/rule_engine.py:156
↓ 6 callers
Function
get_session_manager
获取全局会话管理器
src/interfaces/api/services/sse_emitter_handler.py:371
↓ 6 callers
Method
get_status
(self)
tests/unit/domain/services/test_sub_agent_scheduler.py:125
↓ 6 callers
Method
get_task_status
获取任务状态 参数: task_id: 任务ID 返回: 任务状态字符串
src/domain/services/concurrent_execution_manager.py:228
↓ 6 callers
Method
get_version
获取模块的配置版本
src/domain/services/prompt_version_manager.py:202
↓ 6 callers
Method
get_version
获取指定版本 Args: module_name: 模块名称 version: 版本号 Returns: PromptVersion: 版本对象 Raises:
src/domain/services/prompt_version_manager.py:313
↓ 6 callers
Method
get_visible_children
获取可见的子节点 如果节点折叠,返回空列表;否则返回所有子节点。 返回: 可见的子节点列表
src/domain/agents/node_definition.py:567
↓ 6 callers
Method
handle_progress_event
处理进度事件并记录到历史 参数: event: ExecutionProgressEvent 实例
src/domain/agents/conversation_agent.py:809
↓ 6 callers
Method
inject_knowledge_to_context
向现有压缩上下文注入知识(委托) 参数: workflow_id: 工作流ID goal: 任务目标(可选) errors: 错误列表(可选)
src/domain/agents/coordinator_agent.py:2932
↓ 6 callers
Method
invalidate
(self, workflow_id: str)
tests/unit/domain/ports/test_memory_cache.py:64
↓ 6 callers
Method
is_processing
检查是否正在处理
src/domain/agents/conversation_agent.py:644
↓ 6 callers
Method
is_waiting_for_subagent
检查是否正在等待子Agent
src/domain/agents/conversation_agent.py:640
↓ 6 callers
Method
load
加载节点定义 参数: node_name: 节点名称 返回: 节点定义,如果不存在返回 None
src/domain/services/self_describing_node.py:293
↓ 6 callers
Method
load_from_directory_with_errors
从目录加载所有工具配置(带错误信息) 只加载 .yaml 和 .yml 扩展名的文件 参数: dir_path: 目录路径 返回: (成功加载的配置列表, 失败的文件列表[(文件名, 错误信息)])
src/domain/services/tool_config_loader.py:215
↓ 6 callers
Method
load_from_file
从文件加载工具配置 参数: file_path: YAML 文件路径 返回: ToolConfigSchema 实例 抛出: ToolConfigValidationErro
src/domain/services/tool_config_loader.py:181
↓ 6 callers
Function
log
(line: str, *, to_console: bool = False)
scripts/organize_project_files.py:330
↓ 6 callers
Method
log_audit
记录审核决策 参数: request: SaveRequest 实例 result: AuditResult 审核结果
src/domain/services/save_request_audit.py:693
↓ 6 callers
Method
log_resource_allocation
记录资源分配
src/domain/services/resource_lifecycle.py:490
↓ 6 callers
Method
notify_plan_proposed
通知客户端计划已提议 参数: session_id: 会话ID plan_summary: 计划摘要 estimated_steps: 预计步骤数
src/domain/agents/agent_channel.py:282
↓ 6 callers
Method
on_node_complete
节点完成 参数: workflow_id: 工作流ID node_id: 节点ID outputs: 输出数据
src/domain/services/execution_monitor.py:498
↓ 6 callers
Method
on_node_error
节点错误 参数: workflow_id: 工作流ID node_id: 节点ID error: 异常 node_type: 节点类型 返回:
src/domain/services/execution_monitor.py:512
↓ 6 callers
Method
plan_switch
计划版本切换
src/domain/services/coordinator_runbook.py:377
↓ 6 callers
Method
prepare_update
准备模板更新
src/domain/services/coordinator_runbook.py:270
↓ 6 callers
Method
promote
提升生命周期 参数: to: 目标生命周期 返回: self,支持链式调用 异常: ValueError: 无效的生命周期转换
src/domain/services/generic_node.py:280
↓ 6 callers
Method
publish
同步发布事件
tests/unit/domain/services/test_save_request_channel.py:40
↓ 6 callers
Method
record_failure
记录失败案例 参数: task_type: 任务类型 task_description: 任务描述 workflow_id: 工作流 ID failure_category: 失败类别
src/domain/services/knowledge_maintenance.py:729
↓ 6 callers
Method
record_latency
记录节点延迟 参数: workflow_id: 工作流ID node_id: 节点ID start_time: 开始时间 end_time: 结束时间
src/domain/services/supervision/efficiency.py:73
↓ 6 callers
Method
record_to_medium_term
记录到中期记忆 参数: session_id: 会话 ID result: 保存结果
src/domain/services/save_request_receipt.py:235
↓ 6 callers
Method
register
注册Agent类 参数: agent_type: Agent类型 agent_class: Agent类
src/domain/services/sub_agent_scheduler.py:324
↓ 6 callers
Method
remove_decision_rule
移除决策规则 参数: rule_id: 规则ID 返回: 是否成功移除 注意: 线程安全 - 使用锁保护 P1-1 Step 3 Critical F
src/domain/services/rule_engine_facade.py:199
↓ 6 callers
Function
renderComponent
(agentId: string = 'agent-123')
web/src/features/agents/pages/__tests__/AgentDetailPage.test.tsx:42
↓ 6 callers
Function
renderWithProviders
(ui: React.ReactElement)
web/src/features/agents/pages/__tests__/CreateAgentPage.test.tsx:40
↓ 6 callers
Method
repair_code
修复代码 参数: code: 原始代码 error: 错误实例 context: 上下文信息 validate: 是否验证修复结果 返回: 修复
src/domain/services/code_repair.py:293
↓ 6 callers
Method
reset_saturation
重置饱和状态(Step 2) 清除 is_saturated 标志,允许再次触发饱和事件。 通常在上下文压缩完成后调用。
src/domain/entities/session_context.py:461
↓ 6 callers
Function
resolvePath
(relativePath: string)
web/vite.config.ts:5
↓ 6 callers
Method
restore_from_backup
从备份恢复会话状态(Step 3) 参数: backup: 备份字典
src/domain/entities/session_context.py:514
↓ 6 callers
Method
resume_from_subagent
从子Agent等待中恢复 使用子Agent结果恢复执行。 参数: result: 子Agent执行结果 返回: 恢复的上下文(包含子Agent结果)
src/domain/agents/conversation_agent_state.py:396
↓ 6 callers
Method
rollback
回滚到上一个快照 Args: workflow_id: 工作流 ID Returns: 恢复的状态,如果没有快照则返回 None
src/domain/services/dynamic_node_monitoring.py:244
↓ 6 callers
Method
scan
扫描文本 参数: text: 输入文本 返回: 扫描结果
src/domain/services/supervision_strategy.py:269
↓ 6 callers
Method
should_write_to_knowledge_base
判断是否应写入知识库 参数: result: 保存结果 返回: True 如果应写入
src/domain/services/save_request_receipt.py:365
← previous
next →
701–800 of 13,770, ranked by callers