MCPcopy
hub / github.com/aiming-lab/MetaClaw / save

Method save

metaclaw/cli_session_store.py:80–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

78 logger.warning("[CliSessionStore] failed to load %s: %s", self._path, e)
79
80 def save(self) -> None:
81 self._path.parent.mkdir(parents=True, exist_ok=True)
82 data = {
83 "bindings": {
84 sid: asdict(binding) for sid, binding in self._bindings.items()
85 }
86 }
87 self._path.write_text(json.dumps(data, indent=2), encoding="utf-8")
88
89 # ── session resolution (mirrors OpenClaw's resolveCliSessionReuse) ───
90

Callers 4

resolve_sessionMethod · 0.95
update_cli_session_idMethod · 0.95
clear_sessionMethod · 0.95
clear_allMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected