@artil-ai/hermes 0.1.1 → 0.1.3
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/README.md +7 -10
- package/__init__.py +10 -6
- package/package.json +1 -1
- package/plugin.yaml +4 -4
package/README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# @artil-ai/hermes
|
|
2
2
|
|
|
3
3
|
The Artil platform for the [Hermes](https://hermes-agent.nousresearch.com)
|
|
4
|
-
gateway. New email and
|
|
5
|
-
reach the gateway as notices that
|
|
6
|
-
where it left off; the agent
|
|
4
|
+
gateway. New email, texts and Telegram messages to the agent account, and
|
|
5
|
+
messages its team sends to its Message URL, reach the gateway as notices that
|
|
6
|
+
`artil internal hermes-channel` prints, from where it left off; the agent
|
|
7
|
+
answers them with the `artil` CLI.
|
|
7
8
|
|
|
8
9
|
## Usage
|
|
9
10
|
|
|
@@ -35,13 +36,9 @@ itself: the agent answers with `artil` commands.
|
|
|
35
36
|
|
|
36
37
|
## Development
|
|
37
38
|
|
|
38
|
-
From the repository root, lint
|
|
39
|
-
|
|
40
|
-
image:
|
|
39
|
+
From the repository root, lint the plugin with [ruff](https://docs.astral.sh/ruff),
|
|
40
|
+
then validate and test it inside the Hermes image; this needs `uv` and Docker:
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
|
-
|
|
44
|
-
docker run --rm -v "$PWD/plugins/hermes:/plugin" -w /plugin --entrypoint hermes nousresearch/hermes-agent:latest plugins validate .
|
|
45
|
-
docker run --rm -v "$PWD/plugins/hermes:/plugin" -w /plugin --entrypoint sh nousresearch/hermes-agent:latest -c \
|
|
46
|
-
'uv pip install -q --python /opt/hermes/.venv/bin/python pytest && PYTHONPATH=/opt/hermes /opt/hermes/.venv/bin/python -m pytest -p no:cacheprovider tests'
|
|
43
|
+
bun run check:hermes
|
|
47
44
|
```
|
package/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Artil for Hermes: notices about an agent account's new
|
|
1
|
+
"""Artil for Hermes: notices about an agent account's new messages reach the gateway."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
@@ -6,6 +6,7 @@ import asyncio
|
|
|
6
6
|
import dataclasses
|
|
7
7
|
import json
|
|
8
8
|
import shutil
|
|
9
|
+
import signal
|
|
9
10
|
from pathlib import Path
|
|
10
11
|
from typing import Any
|
|
11
12
|
|
|
@@ -16,10 +17,12 @@ from gateway.platforms.base import BasePlatformAdapter, MessageEvent, MessageTyp
|
|
|
16
17
|
PLATFORM = "artil"
|
|
17
18
|
|
|
18
19
|
HINT = (
|
|
19
|
-
"Notices about new email and
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
20
|
+
"Notices about new email, texts and Telegram messages to this Artil agent account, and "
|
|
21
|
+
"messages its team sends to its Message URL, arrive here. Read each email, text or Telegram "
|
|
22
|
+
"message with the artil command its notice names, and answer it with "
|
|
23
|
+
"`artil email send --reply-to`, `artil sms send --reply-to` or "
|
|
24
|
+
"`artil telegram send --reply-to`; a message from the Message URL comes whole, and its notice "
|
|
25
|
+
"says how to answer it. Nobody outside reads what you write in this conversation."
|
|
23
26
|
)
|
|
24
27
|
|
|
25
28
|
|
|
@@ -68,7 +71,7 @@ class ArtilAdapter(BasePlatformAdapter):
|
|
|
68
71
|
|
|
69
72
|
reason = (await problem).decode().strip()
|
|
70
73
|
code = await process.wait()
|
|
71
|
-
asked_to_stop = code in (0, -
|
|
74
|
+
asked_to_stop = code in (0, -signal.SIGINT, -signal.SIGTERM)
|
|
72
75
|
|
|
73
76
|
if asked_to_stop:
|
|
74
77
|
await asyncio.sleep(self.STOP_GRACE_SECONDS)
|
|
@@ -139,6 +142,7 @@ def _needs_nothing() -> bool:
|
|
|
139
142
|
|
|
140
143
|
|
|
141
144
|
def _service_fields() -> dict[str, Any]:
|
|
145
|
+
"""The entry fields Hermes after 0.21.5 knows, which 0.21.5 itself rejects."""
|
|
142
146
|
known = {field.name for field in dataclasses.fields(PlatformEntry)}
|
|
143
147
|
wanted = {"trusted_inbound": True, "display_tier": "minimal"}
|
|
144
148
|
return {name: value for name, value in wanted.items() if name in known}
|
package/package.json
CHANGED
package/plugin.yaml
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
name: artil
|
|
2
2
|
label: Artil
|
|
3
3
|
kind: platform
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
description: >
|
|
6
|
-
New email and texts to an Artil agent account, and
|
|
7
|
-
reach the Hermes gateway through the artil CLI. The agent
|
|
8
|
-
the CLI.
|
|
6
|
+
New email and texts to an Artil agent account, and messages its team sends to
|
|
7
|
+
its Message URL, reach the Hermes gateway through the artil CLI. The agent
|
|
8
|
+
answers them with the CLI.
|
|
9
9
|
author: Artil
|
|
10
10
|
homepage: https://docs.artil.dev/hermes
|
|
11
11
|
requires_hermes: ">=0.21.5"
|