@inline-chat/hermes-agent-adapter 1.0.0 → 1.1.0
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 +63 -7
- package/package.json +8 -7
- package/plugin/inline/README.md +23 -0
- package/plugin/inline/adapter.py +478 -100
- package/plugin/inline/cli.py +24 -5
- package/plugin/inline/message_actions.py +78 -0
- package/plugin/inline/plugin.yaml +5 -1
- package/plugin/inline/sidecar/index.mjs +7283 -972
- package/plugin/inline/tools.py +82 -11
- package/plugin/inline/widgets.py +267 -0
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ Supported:
|
|
|
35
35
|
- Native Inline `/` command-menu sync for Hermes slash commands, including `/threads`, `/follow`, `/unfollow`, `/inline_sync`, `/inline_version`, and `/update`; typed slash commands continue to work even if menu sync is disabled or rejected.
|
|
36
36
|
- Inline-native buttons for clarify prompts, command approvals, slash confirmations, and model selection.
|
|
37
37
|
- Agent-created `send_message`/`edit_message` button rows with opaque callback data. A callback is acknowledged after its target and access checks succeed, then enters Hermes as a normal turn naming the source message and exact action fields. The normal response edits that source message and clears omitted buttons; the agent can instead call `edit_message` with replacement buttons and finish with `NO_REPLY` so the explicit edit remains authoritative.
|
|
38
|
+
- Message widgets: sandboxed HTML (charts, diagrams, mockups, small pickers) through the `inline` tool's `send_widget` action, or an `<iframe title="…" id="…" height="…">HTML</iframe>` block in a Markdown reply. Long replies are split around widgets, never inside one, with at most one widget per message; a widget longer than the 4,000-character chunk goes alone, up to Inline's 100,000-character limit. Streaming previews hide a widget until its closing tag arrives. `send_widget` returns Inline's reason when the server rejects a widget. A viewer's `inline.action(name, payload)` call becomes a turn naming the widget ID, call name, and untrusted JSON payload, and the answer replies below the widget instead of replacing it. Call names and payloads need realtime SDK 0.0.22 or later; with an older bundled SDK, the turn names only the widget.
|
|
38
39
|
- Outbound local photo, video, voice, and document uploads with configurable size caps.
|
|
39
40
|
- Inbound photo, video, voice, and document summaries, with URL-backed media cached locally for Hermes when available.
|
|
40
41
|
- Reactions on bot messages, plus opt-in lifecycle/system events as synthetic Hermes messages.
|
|
@@ -51,6 +52,24 @@ Unsupported or intentionally limited:
|
|
|
51
52
|
- Live voice sessions or calls. Voice file messages are supported, but realtime audio is not.
|
|
52
53
|
- Media without a usable Inline CDN/local URL. Those messages still produce text summaries, but Hermes may not receive a local file path.
|
|
53
54
|
|
|
55
|
+
## Release 1.1.0
|
|
56
|
+
|
|
57
|
+
Command approvals show Allow and Deny buttons again on every supported Hermes. A
|
|
58
|
+
tap answers only the request its card was sent for, and on Hermes versions with
|
|
59
|
+
`approvals.approvers` only the people that setting allows can answer. Hermes now
|
|
60
|
+
writes the card, so a long command arrives in full before its buttons. Gateways
|
|
61
|
+
with many Inline bots no longer hang during startup or keep the old process alive
|
|
62
|
+
on restart. Scheduled posts can mention their recipient with `cron_mention_prefix`
|
|
63
|
+
(see Scheduled mentions below). The agent settings show how full the session's
|
|
64
|
+
context window is, which Inline's composer draws as its context circle. When a
|
|
65
|
+
later part of a long reply is refused, the parts already sent are no longer posted
|
|
66
|
+
again as a plain-text copy. Tested on Hermes `0.23.0`.
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
npm install -g @inline-chat/hermes-agent-adapter@1.1.0
|
|
70
|
+
inline-hermes install --force
|
|
71
|
+
```
|
|
72
|
+
|
|
54
73
|
## Release 1.0.0
|
|
55
74
|
|
|
56
75
|
A major release with breaking changes. Bots join a thread through its first
|
|
@@ -60,7 +79,9 @@ one thread per conversation. Each Hermes 0.22 profile keeps its own bot, state
|
|
|
60
79
|
and sidecar. Agents can follow, unfollow and manage chats, and they show Working
|
|
61
80
|
while they work. Status and doctor report whether messages reach the agent. See
|
|
62
81
|
"Upgrading to 1.0" in the [Hermes docs](https://inline.chat/docs/hermes) for every
|
|
63
|
-
change.
|
|
82
|
+
change. Hermes `0.22.6` and later need `1.0.0`: they refuse every message from
|
|
83
|
+
earlier adapters with "Hermes refused this message (invalid_params)". Pinned
|
|
84
|
+
realtime SDK `0.0.20`.
|
|
64
85
|
|
|
65
86
|
```sh
|
|
66
87
|
npm install -g @inline-chat/hermes-agent-adapter@1.0.0
|
|
@@ -195,17 +216,20 @@ mismatch, rerun the same command after rebuilding or upgrading the package.
|
|
|
195
216
|
|
|
196
217
|
- Hermes Agent: requires the external user plugin registry and native platform
|
|
197
218
|
plugin loader available in Hermes Agent `>=0.21.3`. This package was validated
|
|
198
|
-
against Hermes Agent `0.
|
|
199
|
-
`v0.
|
|
219
|
+
against Hermes Agent `0.23.0` from source commit `2bd378ed1b8d6bf2192cb26e0a55ff3091e6bd19` (tag
|
|
220
|
+
`v0.23.0`), and installs on the minimum `0.21.3`. Hermes `0.22.6` and later refuse
|
|
221
|
+
every message from adapters before `1.0.0`; upgrade as in Release 1.0.0 above.
|
|
200
222
|
- CI checks the minimum supported Hermes release, newest stable source, and upstream
|
|
201
|
-
`main
|
|
223
|
+
`main`, including a full inbound turn through Hermes' production gateway. A six-hour scheduled check also tests the published npm `latest` adapter.
|
|
202
224
|
`inline-hermes doctor` requires successful host loading and compatibility validation;
|
|
203
225
|
unavailable Hermes diagnostics no longer count as healthy.
|
|
204
226
|
- Node.js: `>=20` is required for the bundled sidecar. Hermes-managed Node 22,
|
|
205
227
|
system Node, or an explicit `INLINE_NODE_BIN` path all work.
|
|
206
228
|
- Inbound recovery retries without waiting for another message or reconnect. Independent chats are consumed concurrently; same-chat order and delivery acknowledgements are preserved. Sender provenance lookups start with a short timeout and expand up to the existing SDK ceiling after timeouts; deferred inputs stay recoverable. Stream replacement wakes pending backpressure writes.
|
|
207
|
-
- Inline transport: the sidecar uses `@inline-chat/realtime-sdk@0.0.
|
|
229
|
+
- Inline transport: the 1.1.0 candidate sidecar uses `@inline-chat/realtime-sdk@0.0.22` and is
|
|
208
230
|
bundled into the npm package, so Hermes startup does not run `npm install`.
|
|
231
|
+
This SDK includes widget calls and submitted forms; protocol `0.0.14` and SDK
|
|
232
|
+
`0.0.22` must be published before the adapter's registry-only release preflight.
|
|
209
233
|
- Live sends require a valid Inline user or bot token in `INLINE_TOKEN`,
|
|
210
234
|
`INLINE_BOT_TOKEN`, `platforms.inline.token`, or `inline.token`.
|
|
211
235
|
|
|
@@ -319,6 +343,7 @@ Access control follows Hermes' native platform model:
|
|
|
319
343
|
| `INLINE_SETTINGS_PATH` | JSON settings file for per-chat `/threads` overrides. `/threads` shows native Auto/On buttons; `reset` clears the chat override back to the global default. Defaults next to `INLINE_STATE_PATH`; `.env`-like paths are refused. |
|
|
320
344
|
| `INLINE_SYSTEM_EVENTS` | Delivers Inline lifecycle events such as edits, deletes, and participant changes as synthetic messages. Defaults to `false`. Reactions on bot messages are always delivered. |
|
|
321
345
|
| `INLINE_REACTIONS` | Shows 👀 while Hermes handles an inbound message, then ✅ on success or ❌ on failure. Cancellation clears the working marker. Defaults to `false`. |
|
|
346
|
+
| `INLINE_CRON_MENTION_PREFIX` | Opt-in Inline Markdown mention prepended once to scheduled gateway text deliveries, for example `[@You](inline://user?id=42)`. Defaults to empty. See [Scheduled mentions](#scheduled-mentions). |
|
|
322
347
|
| `INLINE_PARSE_MARKDOWN` | Controls whether supported outbound Inline Markdown is parsed. Defaults to `true`; `false` preserves the supplied syntax literally. |
|
|
323
348
|
| `INLINE_SYNC_COMMANDS` | Syncs Hermes slash commands into Inline's native `/` bot command menu on gateway connect. Defaults to `true`. |
|
|
324
349
|
| `INLINE_COMMAND_LIMIT` | Caps native Inline bot command sync. Must be `1` through `100`; defaults to `100`. |
|
|
@@ -365,9 +390,10 @@ Equivalent Hermes YAML can use `allow_from`, `allowed_users`,
|
|
|
365
390
|
`observed_context_limit`, `observe_unmentioned_messages`, `settings_path`, and
|
|
366
391
|
`reactions` under the Inline platform config. Operational settings such
|
|
367
392
|
as `base_url`, `parse_markdown`, `media_max_mb`, `upload_max_mb`,
|
|
368
|
-
`state_path`, `sidecar_port`, `connect_timeout_ms`, `sync_commands`,
|
|
369
|
-
`command_limit` can also be set there.
|
|
393
|
+
`state_path`, `sidecar_port`, `connect_timeout_ms`, `sync_commands`,
|
|
394
|
+
`cron_mention_prefix`, and `command_limit` can also be set there.
|
|
370
395
|
Prefer Hermes YAML for behavioral settings. Environment variables remain supported for compatibility and secret-backed deployment inputs.
|
|
396
|
+
|
|
371
397
|
Use a JSON list for mention regexes that contain commas, for example
|
|
372
398
|
`["hermes\\b[:,]?"]`.
|
|
373
399
|
|
|
@@ -452,6 +478,36 @@ what the bot may change. `delete_chat` always needs an explicit `chat_id`.
|
|
|
452
478
|
The plugin id is `inline`, which is intentionally the same id an eventual
|
|
453
479
|
bundled Hermes adapter should use.
|
|
454
480
|
|
|
481
|
+
### Scheduled mentions
|
|
482
|
+
|
|
483
|
+
To bring scheduled text posts back into your Inline sidebar, configure a mention
|
|
484
|
+
for the person who should receive them, then restart the Hermes gateway:
|
|
485
|
+
|
|
486
|
+
```yaml
|
|
487
|
+
platforms:
|
|
488
|
+
inline:
|
|
489
|
+
cron_mention_prefix: "[@You](inline://user?id=42)"
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
Replace `42` with that person's Inline user ID. This setting applies to this
|
|
493
|
+
profile's scheduled gateway text deliveries; set it to `""` to disable it,
|
|
494
|
+
including when `INLINE_CRON_MENTION_PREFIX` is exported. A structured mention
|
|
495
|
+
can reopen an eligible recipient's closed thread. Their notification settings
|
|
496
|
+
still apply.
|
|
497
|
+
|
|
498
|
+
The adapter uses Hermes' `job_id` delivery metadata to identify scheduled posts.
|
|
499
|
+
It adds the prefix before splitting a long post and skips an existing leading
|
|
500
|
+
prefix. `cron.delivery.notify: false` suppresses the added prefix and sends the
|
|
501
|
+
text silently, using Inline's existing notification opt-out. Ordinary replies
|
|
502
|
+
do not get a prefix, and the selected destination stays the same. Markdown
|
|
503
|
+
parsing must be enabled (the default); with `parse_markdown: false` the setting
|
|
504
|
+
is ignored with a warning, preserving the caller's literal text.
|
|
505
|
+
|
|
506
|
+
Hermes currently omits cron identity from standalone/CLI fallback and media-only
|
|
507
|
+
sends. Those deliveries remain unchanged. Media accompanied by scheduled text
|
|
508
|
+
gets the mention in the text post. The required upstream metadata extension is
|
|
509
|
+
described in [Hermes upstream seams](docs/hermes-upstream-seams.md#9-cron-delivery-metadata-across-transports).
|
|
510
|
+
|
|
455
511
|
## Shared transcripts in groups and threads
|
|
456
512
|
|
|
457
513
|
To share one conversation transcript among admitted participants in a group
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inline-chat/hermes-agent-adapter",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
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",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"plugin/inline/profile.py",
|
|
39
39
|
"plugin/inline/telemetry.py",
|
|
40
40
|
"plugin/inline/tools.py",
|
|
41
|
+
"plugin/inline/widgets.py",
|
|
41
42
|
"plugin/inline/sidecar/index.mjs"
|
|
42
43
|
],
|
|
43
44
|
"bin": {
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
"check": "bun run typecheck && bun run lint && bun run test"
|
|
66
67
|
},
|
|
67
68
|
"dependencies": {
|
|
68
|
-
"@inline-chat/realtime-sdk": "0.0.
|
|
69
|
+
"@inline-chat/realtime-sdk": "0.0.22",
|
|
69
70
|
"yaml": "2.9.0"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
@@ -91,12 +92,12 @@
|
|
|
91
92
|
},
|
|
92
93
|
"machineSetupProtocol": 1,
|
|
93
94
|
"minHermesVersion": "0.21.3",
|
|
94
|
-
"testedHermesVersion": "0.
|
|
95
|
-
"testedHermesCommit": "
|
|
95
|
+
"testedHermesVersion": "0.23.0",
|
|
96
|
+
"testedHermesCommit": "2bd378ed1b8d6bf2192cb26e0a55ff3091e6bd19"
|
|
96
97
|
},
|
|
97
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "a24298dc55d21eb2655c25cb6c83b7a133321838",
|
|
98
99
|
"inlineRelease": {
|
|
99
|
-
"tag": "hermes-agent-v1.
|
|
100
|
-
"sha": "
|
|
100
|
+
"tag": "hermes-agent-v1.1.0",
|
|
101
|
+
"sha": "a24298dc55d21eb2655c25cb6c83b7a133321838"
|
|
101
102
|
}
|
|
102
103
|
}
|
package/plugin/inline/README.md
CHANGED
|
@@ -44,6 +44,10 @@ inbound message delivery; confirm that the bot replies.
|
|
|
44
44
|
- `/inline_sync` republishes Hermes commands and skills to Inline.
|
|
45
45
|
- `/inline_version` reports the loaded plugin version and last catalog sync.
|
|
46
46
|
|
|
47
|
+
The agent can send sandboxed HTML message widgets (charts, diagrams, small
|
|
48
|
+
pickers) with the `inline` tool's `send_widget` action or an `<iframe>` block
|
|
49
|
+
in its reply; viewer widget calls come back as turns.
|
|
50
|
+
|
|
47
51
|
Access controls, group mentions, media limits, native message actions, and
|
|
48
52
|
additional setup options are described in the
|
|
49
53
|
[adapter documentation](https://github.com/inline-chat/inline/tree/main/plugins/hermes-agent#readme).
|
|
@@ -53,4 +57,23 @@ with `hermes plugins update inline-platform` after a new pin is accepted, then
|
|
|
53
57
|
restart the gateway. A newer npm version does not automatically change a
|
|
54
58
|
catalog installation.
|
|
55
59
|
|
|
60
|
+
### Scheduled mentions
|
|
61
|
+
|
|
62
|
+
To reopen your closed Inline threads when scheduled text arrives, add an opt-in
|
|
63
|
+
mention to your Hermes config and restart the gateway:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
platforms:
|
|
67
|
+
inline:
|
|
68
|
+
cron_mention_prefix: "[@You](inline://user?id=42)"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Use your Inline user ID in place of `42`. `INLINE_CRON_MENTION_PREFIX` is the
|
|
72
|
+
environment equivalent; an explicit empty YAML value disables it. Markdown
|
|
73
|
+
parsing must stay enabled. The prefix applies once to each scheduled gateway
|
|
74
|
+
text delivery, respects Hermes' cron notification opt-out, and leaves ordinary
|
|
75
|
+
replies alone. Recipient notification settings still apply. Current Hermes
|
|
76
|
+
hosts do not identify standalone fallback or media-only sends as cron deliveries,
|
|
77
|
+
so those paths cannot add the prefix; scheduled text accompanying media does.
|
|
78
|
+
|
|
56
79
|
The plugin is distributed under the Apache-2.0 license; see [LICENSE](LICENSE).
|