// Reads agent position from ego.json (requires PaddedCell/ego-mgr) import { readFileSync } from "node:fs"; import { homedir } from "node:os"; const EGO_PATH = `${homedir()}/.openclaw/ego.json`; export function resolve(ctx: { agentId: string }): string { try { const ego = JSON.parse(readFileSync(EGO_PATH, "utf8")); return ego["agent-scope"]?.[ctx.agentId]?.position || ""; } catch { return ""; } }