Skip to content
Closed
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3bf3ead
fix(memos-local-plugin): prevent orphan episode scan from closing act…
Starfie1d1272 Apr 27, 2026
328d1a5
fix(memos-local-plugin): prevent bridge process flood and crash on He…
Starfie1d1272 Apr 27, 2026
27d64eb
fix(memos-local-plugin): read bridge version from package.json instea…
Starfie1d1272 Apr 27, 2026
f2571e7
Update apps/memos-local-plugin/agent-contract/memory-core.ts
Starfie1d1272 Apr 27, 2026
68bfe16
Update apps/memos-local-plugin/core/session/manager.ts
Starfie1d1272 Apr 27, 2026
bfee04d
fix(memos-local-plugin): reject deletion of open episodes (409 conflict)
Starfie1d1272 Apr 27, 2026
23d0e89
fix(memos-local-plugin): connect Hermes provider to daemon bridge via…
Starfie1d1272 Apr 28, 2026
dc985cf
fix(memos-local-plugin): implement TCP transport for daemon bridge; a…
Starfie1d1272 Apr 28, 2026
948adff
fix(memos-local-plugin): address Copilot review round 2 — TCP fallbac…
Starfie1d1272 Apr 28, 2026
e09f116
fix: reconnect FD leak, tcp close race, deleteEpisode non-optional
Starfie1d1272 Apr 28, 2026
34bdb43
fix: tcp listen error handling, tcp_host fallback, delete response shape
Starfie1d1272 Apr 28, 2026
7e08cf7
fix: shutdown re-entrancy, JSON-RPC method validation, socket error c…
Starfie1d1272 Apr 28, 2026
981a1db
fix: remove duplicate tcpServer declaration
Starfie1d1272 Apr 28, 2026
a641b1d
fix: socket destroy guard, deleteClosedEpisode helper
Starfie1d1272 Apr 28, 2026
0fe7906
fix: TCP cleanup on failure, error listener, daemon guard, BridgeErro…
Starfie1d1272 Apr 28, 2026
8abb30b
test(memos-local-plugin): add orphan init and deleteEpisode unit tests
Starfie1d1272 Apr 28, 2026
700f006
fix(memos-local-plugin): close _rfile leak, PID path via MEMOS_HOME, …
Starfie1d1272 Apr 28, 2026
3fa7375
chore(memos-local-plugin): sync package-lock.json to 2.0.0-beta.1
Starfie1d1272 Apr 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@ def initialize(self, session_id: str, **kwargs: Any) -> None: # type: ignore[ov
logger.warning("MemOS: failed to start bridge — %s", err)
return
try:
self._bridge = MemosBridgeClient()
# Try TCP mode first (connect to daemon bridge).
# Falls back to stdio (spawn subprocess) if daemon isn't running.
try:
self._bridge = MemosBridgeClient(tcp_host="127.0.0.1", tcp_port=18911)
except BridgeError:
logger.info("MemOS: TCP daemon not available, falling back to stdio bridge")
self._bridge = MemosBridgeClient()
Comment thread
Starfie1d1272 marked this conversation as resolved.
resp = self._bridge.request(
Comment thread
Starfie1d1272 marked this conversation as resolved.
"session.open",
{
Expand Down Expand Up @@ -455,6 +461,10 @@ def on_session_end(self, messages: list[dict[str, Any]]) -> None: # type: ignor
if pending:
with contextlib.suppress(Exception):
self._turn_end(*pending)
# Close the episode and session so the core stamps closure metadata
# (e.g. session.meta.closedAt). In TCP mode this ensures the daemon
# can distinguish "normal shutdown" from "abrupt disconnect" on
# restart, preventing orphan retention.
with contextlib.suppress(Exception):
self._bridge.request("episode.close", {"episodeId": self._episode_id})
with contextlib.suppress(Exception):
Expand Down
Loading
Loading