@cello-protocol/cli 0.0.302 → 0.0.303

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/hermes/assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,sEAAsE;AACtE,eAAO,MAAM,kBAAkB,8/DAkC9B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,QA+/DjC,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,eAAe,i1JAqF3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,g/EAoDjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,kwFAUV,CAAC"}
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/hermes/assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,sEAAsE;AACtE,eAAO,MAAM,kBAAkB,8/DAkC9B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,QA2gEjC,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,eAAe,i1JAqF3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,g/EAoDjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,kwFAUV,CAAC"}
@@ -1196,6 +1196,18 @@ class CelloAdapter(BasePlatformAdapter):
1196
1196
  self._bindings = self._load_bindings()
1197
1197
  bound_chat = self._bindings.get(session_id)
1198
1198
  chat_id = bound_chat if bound_chat is not None else self._chat_id_for(counterparty)
1199
+ # A session opened from a desktop/TUI chat is bound to that chat's Hermes SESSION ID (no
1200
+ # HERMES_SESSION_CHAT_ID exists there). Using it as the chat_id builds a route key nothing
1201
+ # maps to, so the peer's reply spawned a brand-new chat. Route under the normal agent chat
1202
+ # and point it at the opening session instead.
1203
+ bound_sid = None
1204
+ if (
1205
+ bound_chat is not None
1206
+ and self._session_scope == "agent"
1207
+ and re.fullmatch(r"\d{8}_\d{6}_[0-9a-f]{4,}", bound_chat)
1208
+ ):
1209
+ bound_sid = bound_chat
1210
+ chat_id = self._chat_id_for(counterparty)
1199
1211
  if chat_id is None:
1200
1212
  # peer scope with nothing to attribute this to. A MESSAGE must be dropped: bucketing
1201
1213
  # it under a placeholder would put one customer's words in another's context, which is
@@ -1241,8 +1253,8 @@ class CelloAdapter(BasePlatformAdapter):
1241
1253
  # member and the guard silently protected nothing - a check that reports safety it does
1242
1254
  # not provide is worse than no check. Computed once here and reused below.
1243
1255
  session_key = self._session_key_for(source)
1244
- if bound_chat is None and self._session_scope == "agent":
1245
- landing_sid = self._get_landing_session_id()
1256
+ if (bound_chat is None or bound_sid is not None) and self._session_scope == "agent":
1257
+ landing_sid = bound_sid or self._get_landing_session_id()
1246
1258
  if landing_sid:
1247
1259
  self._sync_gateway_landing_session(source, session_key, landing_sid)
1248
1260
  text = None
@@ -1 +1 @@
1
- {"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/hermes/assets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,sEAAsE;AACtE,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCjC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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