@inline-chat/hermes-agent-adapter 0.0.5-alpha.1 → 0.0.5-alpha.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inline-chat/hermes-agent-adapter",
|
|
3
|
-
"version": "0.0.5-alpha.
|
|
3
|
+
"version": "0.0.5-alpha.2",
|
|
4
4
|
"description": "Hermes Agent platform adapter for Inline, with a native Python plugin and bundled Inline realtime sidecar.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
package/plugin/inline/adapter.py
CHANGED
|
@@ -3001,7 +3001,6 @@ class InlineAdapter(BasePlatformAdapter):
|
|
|
3001
3001
|
) -> SendResult:
|
|
3002
3002
|
target = self._target_for(chat_id, metadata)
|
|
3003
3003
|
reply_to = self._reply_to_for_target(reply_to, target)
|
|
3004
|
-
parse_markdown = self._parse_markdown and not self._expects_edits(metadata)
|
|
3005
3004
|
chunks = self.truncate_message(self.format_message(content), self.MAX_MESSAGE_LENGTH)
|
|
3006
3005
|
message_ids: List[str] = []
|
|
3007
3006
|
raw_responses: List[Any] = []
|
|
@@ -3011,7 +3010,7 @@ class InlineAdapter(BasePlatformAdapter):
|
|
|
3011
3010
|
body: Dict[str, Any] = {
|
|
3012
3011
|
"target": target,
|
|
3013
3012
|
"text": chunk,
|
|
3014
|
-
"parseMarkdown":
|
|
3013
|
+
"parseMarkdown": self._parse_markdown,
|
|
3015
3014
|
}
|
|
3016
3015
|
if reply_to and index == 0:
|
|
3017
3016
|
body["replyToMsgId"] = str(reply_to)
|
|
@@ -3052,7 +3051,6 @@ class InlineAdapter(BasePlatformAdapter):
|
|
|
3052
3051
|
metadata: Optional[Dict[str, Any]] = None,
|
|
3053
3052
|
) -> SendResult:
|
|
3054
3053
|
text = self.format_message(content)
|
|
3055
|
-
parse_markdown = self._parse_markdown if finalize else False
|
|
3056
3054
|
if len(text) > self.MAX_MESSAGE_LENGTH:
|
|
3057
3055
|
if finalize:
|
|
3058
3056
|
return await self._edit_overflow_split(chat_id, message_id, content, metadata=metadata)
|
|
@@ -3062,7 +3060,7 @@ class InlineAdapter(BasePlatformAdapter):
|
|
|
3062
3060
|
"target": target,
|
|
3063
3061
|
"messageId": str(message_id),
|
|
3064
3062
|
"text": text,
|
|
3065
|
-
"parseMarkdown":
|
|
3063
|
+
"parseMarkdown": self._parse_markdown,
|
|
3066
3064
|
}
|
|
3067
3065
|
result = await self._send_sidecar("/edit", body)
|
|
3068
3066
|
if result.success:
|
|
@@ -3480,10 +3478,6 @@ class InlineAdapter(BasePlatformAdapter):
|
|
|
3480
3478
|
def format_message(self, content: str) -> str:
|
|
3481
3479
|
return content if self._parse_markdown else strip_markdown(content)
|
|
3482
3480
|
|
|
3483
|
-
@staticmethod
|
|
3484
|
-
def _expects_edits(metadata: Optional[Dict[str, Any]]) -> bool:
|
|
3485
|
-
return bool((metadata or {}).get("expect_edits"))
|
|
3486
|
-
|
|
3487
3481
|
def _target_for(self, chat_id: str, metadata: Optional[Dict[str, Any]] = None) -> Dict[str, str]:
|
|
3488
3482
|
thread_id = (metadata or {}).get("thread_id")
|
|
3489
3483
|
if thread_id:
|
package/plugin/inline/cli.py
CHANGED
|
@@ -73,6 +73,7 @@ def gateway_setup() -> None:
|
|
|
73
73
|
if not owner_user_id:
|
|
74
74
|
owner_user_id = _inline_cli_user_id(shutil.which("inline"))
|
|
75
75
|
_configure_access(hermes_gateway, hermes_setup, owner_user_id)
|
|
76
|
+
hermes_gateway.write_platform_config_field("inline", "enabled", True, raw=True)
|
|
76
77
|
|
|
77
78
|
print()
|
|
78
79
|
hermes_setup.print_success("💬 Inline is configured!")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
name: inline-platform
|
|
2
2
|
label: Inline
|
|
3
3
|
kind: platform
|
|
4
|
-
version: 0.0.5-alpha.
|
|
4
|
+
version: 0.0.5-alpha.2
|
|
5
5
|
description: >
|
|
6
6
|
Inline platform adapter for Hermes Agent. The adapter runs as a native
|
|
7
7
|
Hermes Python platform plugin and supervises a local Node sidecar that uses
|