mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-26 11:34:50 +02:00
[eric] apps: leading-_ -> p_ for import aliases (import x as _y) across apps modules (file-local bindings, p-private 0)
This commit is contained in:
@@ -245,9 +245,9 @@ def derive_mcp_config(tool: ToolDefinition) -> Optional[dict]:
|
||||
npm_dir = os.path.join(p_backend, "npm-servers", safe_dir)
|
||||
pkg_json_path = os.path.join(npm_dir, "node_modules", pkg_name, "package.json")
|
||||
if os.path.isfile(pkg_json_path):
|
||||
import json as _json
|
||||
import json as p_json
|
||||
with open(pkg_json_path) as f:
|
||||
pkg_meta = _json.load(f)
|
||||
pkg_meta = p_json.load(f)
|
||||
bin_field = pkg_meta.get("bin", {})
|
||||
entry = list(bin_field.values())[0] if isinstance(bin_field, dict) else bin_field
|
||||
# Same priority as 9Router / MCP-bundle paths: bundled node > system node > Electron-as-Node.
|
||||
|
||||
@@ -525,8 +525,8 @@ async def m365_device_login(tool_id: str):
|
||||
login_state["status"] = "connected"
|
||||
# Try to extract email from output
|
||||
try:
|
||||
import json as _j
|
||||
result = _j.loads(login_state["output"].strip().split("\n")[-1])
|
||||
import json as p_j
|
||||
result = p_j.loads(login_state["output"].strip().split("\n")[-1])
|
||||
if result.get("success"):
|
||||
ud = result.get("userData", {})
|
||||
login_state["email"] = ud.get("userPrincipalName") or ud.get("displayName")
|
||||
|
||||
Reference in New Issue
Block a user