mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-16 07:50:45 +08:00
初始化:独立 oclaw 仓库首提交
- 在 oclaw/ 下重新初始化 Git 仓库 - 补齐子仓库 .gitignore,避免提交本地运行态数据(_local、node_modules、logs 等) - 提交当前工程代码与配置 Made-with: Cursor
This commit is contained in:
commit
ba3836f00f
579 changed files with 83112 additions and 0 deletions
40
agents/__init__.py
Normal file
40
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