@artil-ai/hermes 0.1.3 → 0.1.5
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/__init__.py +12 -1
- package/package.json +1 -1
- package/plugin.yaml +1 -1
package/__init__.py
CHANGED
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import asyncio
|
|
6
6
|
import dataclasses
|
|
7
|
+
import getpass
|
|
7
8
|
import json
|
|
8
9
|
import shutil
|
|
9
10
|
import signal
|
|
@@ -22,7 +23,9 @@ HINT = (
|
|
|
22
23
|
"message with the artil command its notice names, and answer it with "
|
|
23
24
|
"`artil email send --reply-to`, `artil sms send --reply-to` or "
|
|
24
25
|
"`artil telegram send --reply-to`; a message from the Message URL comes whole, and its notice "
|
|
25
|
-
"says how to answer it.
|
|
26
|
+
"says how to answer it. Answer only through artil, never with Hermes' own Telegram or other "
|
|
27
|
+
"platforms, which are other accounts. Nobody outside reads what you write in this "
|
|
28
|
+
"conversation."
|
|
26
29
|
)
|
|
27
30
|
|
|
28
31
|
|
|
@@ -52,6 +55,14 @@ class ArtilAdapter(BasePlatformAdapter):
|
|
|
52
55
|
stderr=asyncio.subprocess.PIPE,
|
|
53
56
|
start_new_session=True,
|
|
54
57
|
)
|
|
58
|
+
except PermissionError:
|
|
59
|
+
user = getpass.getuser()
|
|
60
|
+
self._set_fatal_error(
|
|
61
|
+
"artil_not_runnable",
|
|
62
|
+
f"The gateway runs as {user}, who cannot run {self._command}. Install artil as {user}.",
|
|
63
|
+
retryable=False,
|
|
64
|
+
)
|
|
65
|
+
return False
|
|
55
66
|
except OSError as error:
|
|
56
67
|
self._set_fatal_error(
|
|
57
68
|
"artil_missing", f"Could not run {self._command}: {error}", retryable=False
|
package/package.json
CHANGED
package/plugin.yaml
CHANGED