@inline-chat/hermes-agent-adapter 0.0.1
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/LICENSE +201 -0
- package/README.md +315 -0
- package/dist/install.d.ts +4 -0
- package/dist/install.js +7957 -0
- package/package.json +81 -0
- package/plugin/inline/__init__.py +4 -0
- package/plugin/inline/adapter.py +2996 -0
- package/plugin/inline/cli.py +101 -0
- package/plugin/inline/plugin.yaml +132 -0
- package/plugin/inline/sidecar/index.mjs +24941 -0
- package/plugin/inline/tools.py +663 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
# @inline-chat/hermes-agent-adapter
|
|
2
|
+
|
|
3
|
+
Inline platform plugin for Hermes Agent.
|
|
4
|
+
|
|
5
|
+
This package installs an external Hermes platform plugin named `inline` and a
|
|
6
|
+
supervised Node sidecar that uses `@inline-chat/realtime-sdk` for Inline
|
|
7
|
+
realtime transport.
|
|
8
|
+
|
|
9
|
+
Implemented Hermes-native surfaces:
|
|
10
|
+
|
|
11
|
+
- realtime inbound messages, replies, and action callbacks
|
|
12
|
+
- outbound text, markdown, opt-in edit-message streaming, deletes, typing, media uploads, and reply threads
|
|
13
|
+
- Discord-style native Hermes `inline` tool for bounded chat/message/history/thread actions
|
|
14
|
+
- clarify prompts, command approvals, slash confirmations, and model picker buttons
|
|
15
|
+
- Hermes slash commands synced into Inline's native `/` bot command menu
|
|
16
|
+
- DM/group access policy controls compatible with Hermes gateway allowlists
|
|
17
|
+
- installer, doctor, dry-run, and live `test-send` probes
|
|
18
|
+
|
|
19
|
+
## Feature Support
|
|
20
|
+
|
|
21
|
+
Supported:
|
|
22
|
+
|
|
23
|
+
- Install, status, doctor, dry-run, and live `test-send` commands.
|
|
24
|
+
- External Hermes platform registration as `inline`.
|
|
25
|
+
- `INLINE_TOKEN`, `INLINE_BOT_TOKEN`, `platforms.inline.token`, and `inline.token` auth paths, including simple `${ENV_NAME}` config references.
|
|
26
|
+
- Supervised loopback Node sidecar using the Inline realtime SDK.
|
|
27
|
+
- Realtime inbound messages, catch-up, replies to bot messages, and action callbacks.
|
|
28
|
+
- Outbound text, Markdown parsing, opt-in edit-message streaming, long-message splitting, edits, deletes, typing, and presence.
|
|
29
|
+
- Inline reply-thread routing, default DM/group auto-threading, `/threads` controls, parent chat metadata, parent/thread prompt fallback, and thread-specific skill bindings.
|
|
30
|
+
- Native Hermes `inline` tool for current-chat/thread reads, bounded history, exact message lookup, sending, editing, deleting bot-owned messages, typing/presence, and reply-thread creation.
|
|
31
|
+
- Per-turn Inline sender/chat/thread IDs, with prompt guidance for sender mentions and current chat/thread Markdown links.
|
|
32
|
+
- OpenClaw-style entity summaries for live turns and tool-fetched history, including mentions, text links, thread links, thread-title links, code/pre blocks, bot commands, and group mentions as untrusted Hermes context.
|
|
33
|
+
- DM and group policies, user allowlists, group sender allowlists, mention requirements, strict mention mode, allowed chats, and free-response chats.
|
|
34
|
+
- Native Inline `/` command-menu sync for Hermes slash commands, including `/threads` and `/update`; typed slash commands continue to work even if menu sync is disabled or rejected.
|
|
35
|
+
- Inline-native buttons for clarify prompts, command approvals, slash confirmations, and model selection.
|
|
36
|
+
- Outbound local photo, video, voice, and document uploads with configurable size caps.
|
|
37
|
+
- Inbound photo, video, voice, and document summaries, with URL-backed media cached locally for Hermes when available.
|
|
38
|
+
- Reactions on bot messages, plus opt-in lifecycle/system events as synthetic Hermes messages.
|
|
39
|
+
- Cron or standalone sends through `INLINE_HOME_CHANNEL` and `hermes send --to inline:<chat-id>`.
|
|
40
|
+
- Hermes-native `typing_indicator` and `gateway_restart_notification` toggles, with plugin-owned YAML bridge coverage for external-plugin compatibility.
|
|
41
|
+
|
|
42
|
+
Unsupported or intentionally limited:
|
|
43
|
+
|
|
44
|
+
- Multiple Inline accounts in one Hermes process. Run separate Hermes instances for separate tokens.
|
|
45
|
+
- Inline member, space, search, and admin tools beyond bounded current-chat/thread message access.
|
|
46
|
+
- Full Inline rich-text span conversion. Outbound formatting uses Inline Markdown parsing; rich entities are summarized for the agent instead of converted into Hermes-specific spans.
|
|
47
|
+
- Native animated draft streaming. Inline can stream by sending one preview message and editing it, but this edit-based streaming path is off by default like Discord and Slack.
|
|
48
|
+
- Ephemeral in-channel private replies. Private notices are sent as DMs when a user id is available.
|
|
49
|
+
- Live voice sessions or calls. Voice file messages are supported, but realtime audio is not.
|
|
50
|
+
- Media without a usable Inline CDN/local URL. Those messages still produce text summaries, but Hermes may not receive a local file path.
|
|
51
|
+
|
|
52
|
+
## Install
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
npm install -g @inline-chat/hermes-agent-adapter
|
|
56
|
+
inline-hermes install
|
|
57
|
+
hermes plugins enable inline-platform
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
For local development:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
cd packages/hermes-agent
|
|
64
|
+
bun run build
|
|
65
|
+
node dist/install.js install --link --hermes-home ~/.hermes
|
|
66
|
+
cd ~/dev/hermes-agent
|
|
67
|
+
uv run ./hermes plugins enable inline-platform
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Check an installation:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
inline-hermes doctor --json
|
|
74
|
+
hermes inline status
|
|
75
|
+
inline-hermes --version
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`doctor` verifies required plugin files, the Node executable used for the
|
|
79
|
+
sidecar, the installed sidecar bundle hash, and whether Hermes config enables
|
|
80
|
+
the external plugin with `plugins.enabled: [inline-platform]`. It honors
|
|
81
|
+
`INLINE_NODE_BIN` and fails if that explicit path is missing, not executable,
|
|
82
|
+
older than Node 20, or cannot report a Node version. It also fails if a copied
|
|
83
|
+
plugin has drifted from the package bundle.
|
|
84
|
+
|
|
85
|
+
Confirm Hermes sees the plugin:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
cd ~/dev/hermes-agent
|
|
89
|
+
uv run ./hermes plugins list --plain --no-bundled
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Expected local output includes:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
enabled user 0.0.1 inline-platform
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Update Or Reinstall
|
|
99
|
+
|
|
100
|
+
After upgrading the npm package, refresh the installed Hermes plugin copy:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
npm install -g @inline-chat/hermes-agent-adapter@latest
|
|
104
|
+
inline-hermes install --force
|
|
105
|
+
inline-hermes --version
|
|
106
|
+
inline-hermes doctor --json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`install --force` replaces the copied plugin files under
|
|
110
|
+
`~/.hermes/plugins/inline` or refreshes a dev symlink target. It does not edit
|
|
111
|
+
`config.yaml`, tokens, or other Hermes state. If `doctor` reports a sidecar hash
|
|
112
|
+
mismatch, rerun the same command after rebuilding or upgrading the package.
|
|
113
|
+
|
|
114
|
+
## Compatibility
|
|
115
|
+
|
|
116
|
+
- Hermes Agent: requires the external user plugin registry and native platform
|
|
117
|
+
plugin loader available in Hermes Agent `0.17.x`. This package was validated
|
|
118
|
+
against Hermes Agent `0.17.0` from source commit `824f2279`.
|
|
119
|
+
- Node.js: `>=20` is required for the bundled sidecar. Hermes-managed Node 22,
|
|
120
|
+
system Node, or an explicit `INLINE_NODE_BIN` path all work.
|
|
121
|
+
- Inline transport: the sidecar uses `@inline-chat/realtime-sdk@0.0.11` and is
|
|
122
|
+
bundled into the npm package, so Hermes startup does not run `npm install`.
|
|
123
|
+
- Live sends require a valid Inline user or bot token in `INLINE_TOKEN`,
|
|
124
|
+
`INLINE_BOT_TOKEN`, `platforms.inline.token`, or `inline.token`.
|
|
125
|
+
|
|
126
|
+
Use `hermes plugins list --plain --no-bundled` to verify external plugin
|
|
127
|
+
registration. Other Hermes channel listings may be limited to bundled platforms
|
|
128
|
+
depending on the Hermes version, but `hermes send --to inline:<chat-id> ...`
|
|
129
|
+
and the gateway path load the external plugin through Hermes' platform registry
|
|
130
|
+
after `hermes plugins enable inline-platform`.
|
|
131
|
+
|
|
132
|
+
## Maintainer Preflight
|
|
133
|
+
|
|
134
|
+
Before publishing, run:
|
|
135
|
+
|
|
136
|
+
```sh
|
|
137
|
+
bun run release:preflight
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
This runs `npm publish --dry-run --access public`. npm invokes
|
|
141
|
+
`prepublishOnly`, so the dry-run must pass `bun run check`, rebuild the packed
|
|
142
|
+
runtime files, verify the shipped `inline-hermes` binary, and print the final
|
|
143
|
+
tarball contents without publishing.
|
|
144
|
+
|
|
145
|
+
Maintainers should also run the manual live-test and publish checklist in
|
|
146
|
+
[`packages/hermes-agent/RELEASE.md`](https://github.com/inline-chat/inline/blob/main/packages/hermes-agent/RELEASE.md).
|
|
147
|
+
|
|
148
|
+
## Smoke Test
|
|
149
|
+
|
|
150
|
+
Dry-run mode validates target parsing and package wiring without a token:
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
inline-hermes test-send --dry-run --to chat:123 --text "Inline Hermes dry-run" --json
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
With a valid Inline bot or user token in the environment or Hermes config,
|
|
157
|
+
`test-send` starts the bundled sidecar on a loopback port, waits for realtime
|
|
158
|
+
readiness, sends one message, and shuts the sidecar down:
|
|
159
|
+
|
|
160
|
+
```sh
|
|
161
|
+
export INLINE_TOKEN="<token>"
|
|
162
|
+
inline-hermes test-send --to chat:123 --text "Inline Hermes test"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Use `--json` for automation. Tokens are read from `INLINE_TOKEN`,
|
|
166
|
+
`INLINE_BOT_TOKEN`, `platforms.inline.token`, or `inline.token`; the CLI
|
|
167
|
+
intentionally does not accept token arguments. If the token is expired or
|
|
168
|
+
revoked, the JSON `issues` array includes the server connection reason, for
|
|
169
|
+
example `SESSION_REVOKED`.
|
|
170
|
+
|
|
171
|
+
## Configure
|
|
172
|
+
|
|
173
|
+
Set an Inline token in the Hermes gateway environment:
|
|
174
|
+
|
|
175
|
+
```sh
|
|
176
|
+
export INLINE_TOKEN="<token>"
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Then enable the platform in Hermes config:
|
|
180
|
+
|
|
181
|
+
```yaml
|
|
182
|
+
platforms:
|
|
183
|
+
inline:
|
|
184
|
+
enabled: true
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Inline follows Hermes' native work-chat defaults: show typing/presence while a
|
|
188
|
+
turn is running, keep tool-call progress out of the room by default, and keep
|
|
189
|
+
edit-based token streaming opt-in. If an older Hermes config has global
|
|
190
|
+
`display.tool_progress: all`, add the per-platform override below so terminal
|
|
191
|
+
and tool progress bubbles are not left in Inline chats:
|
|
192
|
+
|
|
193
|
+
```yaml
|
|
194
|
+
display:
|
|
195
|
+
platforms:
|
|
196
|
+
inline:
|
|
197
|
+
tool_progress: off
|
|
198
|
+
cleanup_progress: true
|
|
199
|
+
streaming: false
|
|
200
|
+
interim_assistant_messages: false
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
To temporarily show live tool progress, set `tool_progress: new` or
|
|
204
|
+
`tool_progress: all` and leave `cleanup_progress: true` so Hermes deletes the
|
|
205
|
+
progress message after a successful final reply. Token streaming requires both
|
|
206
|
+
top-level `streaming.enabled: true` and
|
|
207
|
+
`display.platforms.inline.streaming: true`.
|
|
208
|
+
|
|
209
|
+
Hermes also accepts a top-level `inline:` block for plugin-owned settings, but
|
|
210
|
+
`platforms.inline` matches the shape used by most Hermes platform docs and is
|
|
211
|
+
the safest form to copy into `~/.hermes/config.yaml`.
|
|
212
|
+
|
|
213
|
+
If you intentionally keep the token in `config.yaml` instead of the gateway
|
|
214
|
+
environment, set `platforms.inline.token` directly. The adapter also accepts
|
|
215
|
+
`inline.token` and simple `${ENV_NAME}` references in either token field,
|
|
216
|
+
resolving them from the process environment at runtime. Environment variables
|
|
217
|
+
remain the preferred production path for secrets.
|
|
218
|
+
|
|
219
|
+
Access control follows Hermes' native platform model:
|
|
220
|
+
|
|
221
|
+
| Setting | Purpose |
|
|
222
|
+
| --- | --- |
|
|
223
|
+
| `INLINE_ALLOWED_USERS` | Comma-separated Inline user ids allowed to DM the bot. Setting this also makes the adapter treat DMs as allowlisted unless `INLINE_DM_POLICY` is set. |
|
|
224
|
+
| `INLINE_ALLOW_ALL_USERS=true` | Explicit Hermes gateway allow-all switch for Inline. Use only for trusted/dev deployments. |
|
|
225
|
+
| `INLINE_DM_POLICY=open|allowlist|disabled` | Controls direct-message intake. `allowlist` requires `INLINE_ALLOWED_USERS` or config `allow_from`. |
|
|
226
|
+
| `INLINE_GROUP_POLICY=open|allowlist|disabled` | Controls group intake. `allowlist` requires `INLINE_GROUP_ALLOW_FROM`. |
|
|
227
|
+
| `INLINE_GROUP_ALLOW_FROM` | Comma-separated Inline user ids allowed to invoke the bot from group chats. |
|
|
228
|
+
| `INLINE_REQUIRE_MENTION` | Requires a mention or wake word in groups by default. Replies to the bot are accepted without the wake word. |
|
|
229
|
+
| `INLINE_STRICT_MENTION` | Requires a mention or wake word on every group turn, including replies to the bot. Defaults to `false`. |
|
|
230
|
+
| `INLINE_ALLOWED_CHATS` | Comma-separated group/thread chat ids where the bot may respond. Parent chat ids also match their Inline reply threads. DMs are not filtered. Empty means no chat restriction. |
|
|
231
|
+
| `INLINE_FREE_RESPONSE_CHATS` | Comma-separated group/thread chat ids where no mention is required. Parent chat ids also match their Inline reply threads. Useful for dedicated agent rooms. |
|
|
232
|
+
| `INLINE_REPLY_THREADS` | Creates/uses Inline reply threads for top-level DM and group replies by default. Accepts `true`/`false`, `on`/`off`, `auto`, `thread`, or `flat`; defaults to `true`. |
|
|
233
|
+
| `INLINE_SETTINGS_PATH` | JSON settings file for per-chat `/threads` overrides. Defaults next to `INLINE_STATE_PATH`; `.env`-like paths are refused. |
|
|
234
|
+
| `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. |
|
|
235
|
+
| `INLINE_MENTION_PATTERNS` | JSON list, comma-separated, or newline-separated regex patterns for group wake words. |
|
|
236
|
+
| `INLINE_PARSE_MARKDOWN` | Controls whether outbound Hermes Markdown is parsed by Inline. Defaults to `true`. |
|
|
237
|
+
| `INLINE_SYNC_COMMANDS` | Syncs Hermes slash commands into Inline's native `/` bot command menu on gateway connect. Defaults to `true`. |
|
|
238
|
+
| `INLINE_COMMAND_LIMIT` | Caps native Inline bot command sync. Must be `1` through `100`; defaults to `100`. |
|
|
239
|
+
| `INLINE_MEDIA_MAX_MB` | Maximum inbound media download size for URL-backed Inline attachments. Defaults to `25`. |
|
|
240
|
+
| `INLINE_UPLOAD_MAX_MB` | Maximum outbound local file upload size. The Python adapter and Node sidecar both enforce it before upload bytes are read. Defaults to `300`. |
|
|
241
|
+
| `INLINE_STATE_PATH` | Persistent Inline SDK state file. Defaults to `~/.hermes/inline/sdk-state.json`. |
|
|
242
|
+
| `INLINE_RPC_TIMEOUT_MS` | Realtime RPC timeout for the Node sidecar. |
|
|
243
|
+
| `INLINE_CONNECT_TIMEOUT_MS` | Adapter startup timeout while waiting for the sidecar to become realtime-ready. Defaults to `20000`. |
|
|
244
|
+
| `INLINE_CONNECT_RETRY_INITIAL_MS` | Initial sidecar retry delay after realtime startup failure. Defaults to `1000`. |
|
|
245
|
+
| `INLINE_CONNECT_RETRY_MAX_MS` | Maximum sidecar retry delay after repeated realtime startup failures. Defaults to `15000`. |
|
|
246
|
+
| `INLINE_SIDECAR_PORT` | Fixed loopback port for the sidecar. Must be `1` through `65535`. Defaults to `8794`; `test-send` uses a random free port. |
|
|
247
|
+
| `INLINE_SIDECAR_BIND` | Sidecar bind host. Must be loopback: `127.0.0.1`, `localhost`, or `::1`. Defaults to `127.0.0.1`. |
|
|
248
|
+
| `platforms.inline.typing_indicator` | Hermes-native toggle for Inline typing/presence while a turn is running. Defaults to `true`; set to `false` to keep busy threads visually quiet. |
|
|
249
|
+
| `platforms.inline.gateway_restart_notification` | Hermes-native toggle for gateway online/restarted notices. Defaults to `true`. |
|
|
250
|
+
|
|
251
|
+
Equivalent Hermes YAML can use `allow_from`, `allowed_users`,
|
|
252
|
+
`group_allow_from`, `dm_policy`, `group_policy`, `require_mention`,
|
|
253
|
+
`strict_mention`, `allowed_chats`, `free_response_chats`, `reply_threads`,
|
|
254
|
+
`settings_path`, and
|
|
255
|
+
`mention_patterns` under the Inline platform config. Operational settings such
|
|
256
|
+
as `base_url`, `parse_markdown`, `media_max_mb`, `upload_max_mb`,
|
|
257
|
+
`state_path`, `sidecar_port`, `connect_timeout_ms`, `sync_commands`, and
|
|
258
|
+
`command_limit` can also be set there.
|
|
259
|
+
Env allowlists are still preferred for production because the Hermes gateway
|
|
260
|
+
also sees them directly.
|
|
261
|
+
Use a JSON list for mention regexes that contain commas, for example
|
|
262
|
+
`["hermes\\b[:,]?"]`.
|
|
263
|
+
|
|
264
|
+
Inline also supports Hermes' native thread/channel prompt and skill bindings.
|
|
265
|
+
Use raw Inline chat/thread ids for these bindings. Inline reply-thread chats
|
|
266
|
+
are checked first, then their parent chat id:
|
|
267
|
+
|
|
268
|
+
```yaml
|
|
269
|
+
platforms:
|
|
270
|
+
inline:
|
|
271
|
+
channel_prompts:
|
|
272
|
+
"123": "Treat this Inline thread as the customer escalation room."
|
|
273
|
+
channel_skill_bindings:
|
|
274
|
+
- id: "123"
|
|
275
|
+
skills: ["support-triage", "incident-report"]
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Inline-native button callbacks, such as approvals and clarify choices, require
|
|
279
|
+
the clicking actor to pass an explicit Inline or global Hermes allowlist, or
|
|
280
|
+
`INLINE_ALLOW_ALL_USERS=true` / `GATEWAY_ALLOW_ALL_USERS=true`. This includes
|
|
281
|
+
model-picker callbacks. The stricter callback gate prevents group-visible
|
|
282
|
+
buttons from becoming a bypass when message intake is otherwise `open`.
|
|
283
|
+
|
|
284
|
+
On gateway startup, the adapter derives the Inline `/` menu from Hermes'
|
|
285
|
+
central slash-command registry, normalizes names to Inline Bot API constraints
|
|
286
|
+
(`^[a-z0-9_]+$`, max 32 characters), and calls `setMyCommands`. If Inline
|
|
287
|
+
rejects the full list with `BOT_COMMANDS_TOO_MUCH`, the adapter retries with a
|
|
288
|
+
smaller prefix. Menu sync failures are logged as warnings and do not prevent
|
|
289
|
+
message transport; `/commands` remains the full fallback list.
|
|
290
|
+
|
|
291
|
+
The plugin id is `inline`, which is intentionally the same id an eventual
|
|
292
|
+
bundled Hermes adapter should use.
|
|
293
|
+
|
|
294
|
+
## Troubleshooting
|
|
295
|
+
|
|
296
|
+
Run `inline-hermes doctor --json` first. It checks the installed plugin path,
|
|
297
|
+
required files, Node executable, and source/installed sidecar bundle hashes.
|
|
298
|
+
|
|
299
|
+
- `plugin is not installed`: run `inline-hermes install`.
|
|
300
|
+
- `Hermes plugin 'inline-platform' is not enabled`: run
|
|
301
|
+
`hermes plugins enable inline-platform`.
|
|
302
|
+
- `installed sidecar bundle does not match`: re-run
|
|
303
|
+
`inline-hermes install --force` after upgrading this package.
|
|
304
|
+
- `node executable was not detected`, `INLINE_NODE_BIN does not exist`, or
|
|
305
|
+
`must be Node.js >=20`: install Node.js 20+ or set `INLINE_NODE_BIN` to the
|
|
306
|
+
Node executable Hermes should use.
|
|
307
|
+
- `SESSION_REVOKED` during `test-send`: the Inline token reached the realtime
|
|
308
|
+
service but was rejected. Re-authenticate or rotate the bot/user token and
|
|
309
|
+
retry.
|
|
310
|
+
- `sidecar was not ready`: inspect the JSON `health` and `logs` fields from
|
|
311
|
+
`test-send --json`; token, base URL, or realtime startup failures are exposed
|
|
312
|
+
there with retry diagnostics.
|
|
313
|
+
- `INLINE_SIDECAR_BIND must be loopback`: remove the override or set it to
|
|
314
|
+
`127.0.0.1`, `localhost`, or `::1`. The sidecar intentionally refuses
|
|
315
|
+
externally reachable bind addresses even though its HTTP API is token-gated.
|