MCPcopy Create free account
hub / github.com/AI45Lab/Code / find_config

Function find_config

examples/ahp_agent_monitors_agent.py:50–58  ·  view source on GitHub ↗

定位 agent_kimi.acl 配置文件(与本脚本同目录)

()

Source from the content-addressed store, hash-verified

48
49
50def find_config() -> str:
51 """定位 agent_kimi.acl 配置文件(与本脚本同目录)"""
52 if env := os.environ.get("A3S_CONFIG"):
53 return env
54 script_dir = Path(__file__).parent
55 candidate = script_dir / "agent_kimi.acl"
56 if candidate.exists():
57 return str(candidate)
58 raise FileNotFoundError(f"配置文件未找到:{candidate}")
59
60
61def log(msg: str):

Callers 1

_ensure_sessionMethod · 0.70

Calls 2

getMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected