mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-10 05:10:45 +08:00
重构仓库目录为统一的 runtime 分层并清理历史 openclaw 残留。
本次迁移将网关/通道/工具/技能/脚本与协议资源集中到新结构,统一路径常量与脚本转发机制,减少顶层噪音并保证运行与测试行为一致。 Made-with: Cursor
This commit is contained in:
parent
ba3836f00f
commit
4a23b715a2
498 changed files with 2760 additions and 2200 deletions
40
runtime/agents/__init__.py
Normal file
40
runtime/agents/__init__.py
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from .agent_scope import (
|
||||
resolve_agent_id_by_workspace_path,
|
||||
resolve_agent_id_from_session_key,
|
||||
resolve_agent_ids_by_workspace_path,
|
||||
resolve_agent_workspace_dir,
|
||||
resolve_default_agent_id,
|
||||
resolve_session_agent_id,
|
||||
resolve_session_agent_ids,
|
||||
)
|
||||
from .subagent_registry import init_subagent_registry
|
||||
|
||||
__all__ = [
|
||||
"build_gateway_executor",
|
||||
"build_ops_agent",
|
||||
"NetworkOpsAgent",
|
||||
"resolve_default_agent_id",
|
||||
"resolve_agent_workspace_dir",
|
||||
"resolve_agent_id_from_session_key",
|
||||
"resolve_session_agent_id",
|
||||
"resolve_session_agent_ids",
|
||||
"resolve_agent_id_by_workspace_path",
|
||||
"resolve_agent_ids_by_workspace_path",
|
||||
"init_subagent_registry",
|
||||
]
|
||||
|
||||
|
||||
def __getattr__(name: str) -> Any:
|
||||
if name in {"build_gateway_executor", "build_ops_agent"}:
|
||||
from .factory import build_gateway_executor, build_ops_agent
|
||||
|
||||
return {"build_gateway_executor": build_gateway_executor, "build_ops_agent": build_ops_agent}[name]
|
||||
if name == "NetworkOpsAgent":
|
||||
from .network_ops_agent import NetworkOpsAgent
|
||||
|
||||
return NetworkOpsAgent
|
||||
raise AttributeError(f"module 'src.agents' has no attribute {name!r}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue