@signetai/connector-hermes-agent 0.182.1 → 0.182.2
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.
- package/hermes-plugin/__init__.py +9 -14
- package/hermes-plugin/client.py +11 -7
- package/package.json +3 -3
|
@@ -526,24 +526,19 @@ class SignetMemoryProvider(MemoryProvider):
|
|
|
526
526
|
project=project,
|
|
527
527
|
)
|
|
528
528
|
if result:
|
|
529
|
-
# Handle daemon restart detection
|
|
530
|
-
#
|
|
531
|
-
#
|
|
529
|
+
# Handle daemon restart detection by restoring only the runtime
|
|
530
|
+
# claim. The initial system prompt is already part of this
|
|
531
|
+
# conversation; injecting session-start context again would mutate
|
|
532
|
+
# the cached prefix mid-conversation.
|
|
532
533
|
if not result.get("sessionKnown", True) and self._session_initialized:
|
|
533
|
-
logger.debug("Signet daemon restarted mid-session,
|
|
534
|
+
logger.debug("Signet daemon restarted mid-session, restoring session claim")
|
|
534
535
|
reinit = client.session_start(
|
|
535
|
-
session_key, project=project,
|
|
536
|
+
session_key, project=project, claim_only=True,
|
|
536
537
|
)
|
|
537
|
-
if reinit:
|
|
538
|
-
inject_from_reinit = reinit.get("inject", "")
|
|
539
|
-
if inject_from_reinit and inject_from_reinit.strip():
|
|
540
|
-
with self._prefetch_lock:
|
|
541
|
-
if prefetch_generation == self._prefetch_generation and session_key == self._session_key:
|
|
542
|
-
self._prefetch_result = inject_from_reinit
|
|
543
|
-
else:
|
|
538
|
+
if not reinit:
|
|
544
539
|
logger.warning(
|
|
545
|
-
"Signet
|
|
546
|
-
"
|
|
540
|
+
"Signet session-claim recovery after daemon restart returned no data; "
|
|
541
|
+
"the next prompt may be treated as a new session"
|
|
547
542
|
)
|
|
548
543
|
return
|
|
549
544
|
inject = result.get("inject", "")
|
package/hermes-plugin/client.py
CHANGED
|
@@ -280,16 +280,20 @@ class SignetClient:
|
|
|
280
280
|
session_key: str,
|
|
281
281
|
*,
|
|
282
282
|
project: str = "",
|
|
283
|
+
claim_only: bool = False,
|
|
283
284
|
) -> Optional[Dict[str, Any]]:
|
|
284
|
-
"""Call session-start hook
|
|
285
|
+
"""Call session-start hook, optionally recovering only the session claim."""
|
|
286
|
+
body: Dict[str, Any] = {
|
|
287
|
+
"harness": self._harness,
|
|
288
|
+
"sessionKey": session_key,
|
|
289
|
+
"project": project,
|
|
290
|
+
"agentId": self._agent_id,
|
|
291
|
+
}
|
|
292
|
+
if claim_only:
|
|
293
|
+
body["claimOnly"] = True
|
|
285
294
|
return self._post(
|
|
286
295
|
"/api/hooks/session-start",
|
|
287
|
-
|
|
288
|
-
"harness": self._harness,
|
|
289
|
-
"sessionKey": session_key,
|
|
290
|
-
"project": project,
|
|
291
|
-
"agentId": self._agent_id,
|
|
292
|
-
},
|
|
296
|
+
body,
|
|
293
297
|
timeout=_LONG_TIMEOUT_SECS,
|
|
294
298
|
)
|
|
295
299
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-hermes-agent",
|
|
3
|
-
"version": "0.182.
|
|
3
|
+
"version": "0.182.2",
|
|
4
4
|
"description": "Signet connector for Hermes Agent — installs Signet as a pluggable memory provider",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"typecheck": "tsc --noEmit"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@signetai/connector-base": "0.182.
|
|
29
|
-
"@signetai/core": "0.182.
|
|
28
|
+
"@signetai/connector-base": "0.182.2",
|
|
29
|
+
"@signetai/core": "0.182.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^22.0.0",
|