@inline-chat/hermes-agent-adapter 1.0.1 → 1.2.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 CHANGED
@@ -35,11 +35,13 @@ 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.
41
42
  - Cron or standalone sends through `INLINE_HOME_CHANNEL` and `hermes send --to inline:<chat-id>`.
42
43
  - Hermes-native `typing_indicator` and `gateway_restart_notification` toggles, with plugin-owned YAML bridge coverage for external-plugin compatibility.
44
+ - Detailed and Friendly output (the bot's Output setting in Inline; see Output below): a live, collapsible progress message for each turn, or short updates instead.
43
45
 
44
46
  Unsupported or intentionally limited:
45
47
 
@@ -50,6 +52,37 @@ Unsupported or intentionally limited:
50
52
  - Ephemeral in-channel private replies. Private notices are sent as DMs when a user id is available.
51
53
  - Live voice sessions or calls. Voice file messages are supported, but realtime audio is not.
52
54
  - Media without a usable Inline CDN/local URL. Those messages still produce text summaries, but Hermes may not receive a local file path.
55
+ - Progress for turns Hermes starts on its own. Scheduled (cron) turns and late background sub-agent results post only their answer.
56
+
57
+ ## Release 1.2.0
58
+
59
+ Work shows in two output modes, Detailed and Friendly, chosen per chat in
60
+ Inline's agent settings; Detailed no longer repeats the still-working notice.
61
+ The plugin manifest declares its activity hooks, and the bundled sidecar speaks
62
+ the focus status protocol. Tested on Hermes `0.23.0`.
63
+
64
+ ```sh
65
+ npm install -g @inline-chat/hermes-agent-adapter@1.2.0
66
+ inline-hermes install --force
67
+ ```
68
+
69
+ ## Release 1.1.0
70
+
71
+ Command approvals show Allow and Deny buttons again on every supported Hermes. A
72
+ tap answers only the request its card was sent for, and on Hermes versions with
73
+ `approvals.approvers` only the people that setting allows can answer. Hermes now
74
+ writes the card, so a long command arrives in full before its buttons. Gateways
75
+ with many Inline bots no longer hang during startup or keep the old process alive
76
+ on restart. Scheduled posts can mention their recipient with `cron_mention_prefix`
77
+ (see Scheduled mentions below). The agent settings show how full the session's
78
+ context window is, which Inline's composer draws as its context circle. When a
79
+ later part of a long reply is refused, the parts already sent are no longer posted
80
+ again as a plain-text copy. Tested on Hermes `0.23.0`.
81
+
82
+ ```sh
83
+ npm install -g @inline-chat/hermes-agent-adapter@1.1.0
84
+ inline-hermes install --force
85
+ ```
53
86
 
54
87
  ## Release 1.0.0
55
88
 
@@ -197,8 +230,8 @@ mismatch, rerun the same command after rebuilding or upgrading the package.
197
230
 
198
231
  - Hermes Agent: requires the external user plugin registry and native platform
199
232
  plugin loader available in Hermes Agent `>=0.21.3`. This package was validated
200
- against Hermes Agent `0.22.7` from source commit `b200f5bc60e31588ba2cb60e288029c4a54ba5fa` (tag
201
- `v0.22.7`), and installs on the minimum `0.21.3`. Hermes `0.22.6` and later refuse
233
+ against Hermes Agent `0.23.0` from source commit `2bd378ed1b8d6bf2192cb26e0a55ff3091e6bd19` (tag
234
+ `v0.23.0`), and installs on the minimum `0.21.3`. Hermes `0.22.6` and later refuse
202
235
  every message from adapters before `1.0.0`; upgrade as in Release 1.0.0 above.
203
236
  - CI checks the minimum supported Hermes release, newest stable source, and upstream
204
237
  `main`, including a full inbound turn through Hermes' production gateway. A six-hour scheduled check also tests the published npm `latest` adapter.
@@ -207,8 +240,10 @@ mismatch, rerun the same command after rebuilding or upgrading the package.
207
240
  - Node.js: `>=20` is required for the bundled sidecar. Hermes-managed Node 22,
208
241
  system Node, or an explicit `INLINE_NODE_BIN` path all work.
209
242
  - 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.
210
- - Inline transport: the sidecar uses `@inline-chat/realtime-sdk@0.0.18` and is
243
+ - Inline transport: the 1.2.0 candidate sidecar uses `@inline-chat/realtime-sdk@0.0.24` and is
211
244
  bundled into the npm package, so Hermes startup does not run `npm install`.
245
+ This SDK includes widget calls, submitted forms and focus status; protocol `0.0.16` and SDK
246
+ `0.0.24` must be published before the adapter's registry-only release preflight.
212
247
  - Live sends require a valid Inline user or bot token in `INLINE_TOKEN`,
213
248
  `INLINE_BOT_TOKEN`, `platforms.inline.token`, or `inline.token`.
214
249
 
@@ -273,14 +308,46 @@ platforms:
273
308
  enabled: true
274
309
  ```
275
310
 
276
- Experimental tool timelines are unavailable in this adapter. The old
277
- `INLINE_EXPERIMENTAL_AGENT_ACTIVITY` setting is ignored and logs a warning when
278
- enabled. Hermes uses ordinary typing, optional processing reactions, and replies.
279
-
280
- Inline keeps tool progress and interim assistant messages quiet by default.
281
- Explicit Hermes display settings still take precedence; if you enable native
282
- tool progress, Hermes uses its ordinary progress messages. Token streaming remains
283
- opt-in through both `streaming.enabled: true` and
311
+ ### Output: Detailed or Friendly
312
+
313
+ Each bot has an Output setting in Inline (the bot's chat settings), with a
314
+ per-chat override. The adapter reads it at the start of every turn (cached for
315
+ 30 seconds per chat) and declares the `OUTPUT_MODE` capability so Inline offers
316
+ the setting. An unset setting means Detailed.
317
+
318
+ - **Detailed**: while Hermes works, one progress message ("Working · 1m 4s")
319
+ shows each step as a row: commands with their output tail and exit code, files
320
+ read and searched, edits with their diff, web searches, plans, sub-agents with
321
+ their own steps nested inside, and approvals waiting on someone. Hermes'
322
+ commentary between tool calls appears inside it too, and its "still working"
323
+ notice is left out since the timer already shows it. When the answer is ready
324
+ the message collapses to "Worked for 1m 4s" and the answer follows as its own
325
+ message. A message someone sends mid-turn ends the progress message there;
326
+ later work starts a new one.
327
+ - **Friendly**: no progress message. Hermes' commentary between tool calls posts
328
+ as short updates, Hermes' "⏳ Working — 3 min" notice keeps a long turn
329
+ visibly alive (removed once the turn succeeds), then the answer.
330
+
331
+ Approvals, questions and errors look the same in both modes. Output tails are
332
+ capped at 2,000 characters and diffs at 8,000, and values that look like secrets
333
+ are hidden. Row titles come from the tool, never from its output.
334
+
335
+ This runs entirely on Hermes' public plugin hooks (`pre_tool_call`,
336
+ `post_tool_call`, `subagent_start`/`subagent_stop`,
337
+ `pre_approval_request`/`post_approval_response`) and its interim-message
338
+ contract. Turns Hermes starts on its own, such as scheduled (cron) runs, have no
339
+ processing hooks and post only their answer.
340
+
341
+ The old experimental timeline is gone: `INLINE_EXPERIMENTAL_AGENT_ACTIVITY` is
342
+ ignored and logs a warning when enabled.
343
+
344
+ Inline's display defaults keep Hermes' own tool-progress bubbles off
345
+ (`tool_progress: off`) and turn on `interim_assistant_messages`, which the
346
+ Output setting then shows as Detailed commentary or Friendly updates. Explicit
347
+ Hermes display settings still take precedence: turning `tool_progress` on adds
348
+ Hermes' own progress bubbles on top of Detailed output, and turning
349
+ `interim_assistant_messages` off hides commentary in both modes. Token streaming
350
+ remains opt-in through both `streaming.enabled: true` and
284
351
  `display.platforms.inline.streaming: true`.
285
352
 
286
353
  Hermes-native sends and scheduled deliveries accept Inline's explicit target
@@ -322,6 +389,7 @@ Access control follows Hermes' native platform model:
322
389
  | `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. |
323
390
  | `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. |
324
391
  | `INLINE_REACTIONS` | Shows 👀 while Hermes handles an inbound message, then ✅ on success or ❌ on failure. Cancellation clears the working marker. Defaults to `false`. |
392
+ | `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). |
325
393
  | `INLINE_PARSE_MARKDOWN` | Controls whether supported outbound Inline Markdown is parsed. Defaults to `true`; `false` preserves the supplied syntax literally. |
326
394
  | `INLINE_SYNC_COMMANDS` | Syncs Hermes slash commands into Inline's native `/` bot command menu on gateway connect. Defaults to `true`. |
327
395
  | `INLINE_COMMAND_LIMIT` | Caps native Inline bot command sync. Must be `1` through `100`; defaults to `100`. |
@@ -368,9 +436,10 @@ Equivalent Hermes YAML can use `allow_from`, `allowed_users`,
368
436
  `observed_context_limit`, `observe_unmentioned_messages`, `settings_path`, and
369
437
  `reactions` under the Inline platform config. Operational settings such
370
438
  as `base_url`, `parse_markdown`, `media_max_mb`, `upload_max_mb`,
371
- `state_path`, `sidecar_port`, `connect_timeout_ms`, `sync_commands`, and
372
- `command_limit` can also be set there.
439
+ `state_path`, `sidecar_port`, `connect_timeout_ms`, `sync_commands`,
440
+ `cron_mention_prefix`, and `command_limit` can also be set there.
373
441
  Prefer Hermes YAML for behavioral settings. Environment variables remain supported for compatibility and secret-backed deployment inputs.
442
+
374
443
  Use a JSON list for mention regexes that contain commas, for example
375
444
  `["hermes\\b[:,]?"]`.
376
445
 
@@ -455,6 +524,36 @@ what the bot may change. `delete_chat` always needs an explicit `chat_id`.
455
524
  The plugin id is `inline`, which is intentionally the same id an eventual
456
525
  bundled Hermes adapter should use.
457
526
 
527
+ ### Scheduled mentions
528
+
529
+ To bring scheduled text posts back into your Inline sidebar, configure a mention
530
+ for the person who should receive them, then restart the Hermes gateway:
531
+
532
+ ```yaml
533
+ platforms:
534
+ inline:
535
+ cron_mention_prefix: "[@You](inline://user?id=42)"
536
+ ```
537
+
538
+ Replace `42` with that person's Inline user ID. This setting applies to this
539
+ profile's scheduled gateway text deliveries; set it to `""` to disable it,
540
+ including when `INLINE_CRON_MENTION_PREFIX` is exported. A structured mention
541
+ can reopen an eligible recipient's closed thread. Their notification settings
542
+ still apply.
543
+
544
+ The adapter uses Hermes' `job_id` delivery metadata to identify scheduled posts.
545
+ It adds the prefix before splitting a long post and skips an existing leading
546
+ prefix. `cron.delivery.notify: false` suppresses the added prefix and sends the
547
+ text silently, using Inline's existing notification opt-out. Ordinary replies
548
+ do not get a prefix, and the selected destination stays the same. Markdown
549
+ parsing must be enabled (the default); with `parse_markdown: false` the setting
550
+ is ignored with a warning, preserving the caller's literal text.
551
+
552
+ Hermes currently omits cron identity from standalone/CLI fallback and media-only
553
+ sends. Those deliveries remain unchanged. Media accompanied by scheduled text
554
+ gets the mention in the text post. The required upstream metadata extension is
555
+ described in [Hermes upstream seams](docs/hermes-upstream-seams.md#9-cron-delivery-metadata-across-transports).
556
+
458
557
  ## Shared transcripts in groups and threads
459
558
 
460
559
  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.0.1",
3
+ "version": "1.2.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": {
@@ -54,7 +55,7 @@
54
55
  },
55
56
  "scripts": {
56
57
  "build": "mkdir -p plugin/inline/sidecar && bun build ./src/install.ts --outdir dist --entry-naming '[name].js' --target=node --format=esm --packages=bundle && bun build ./src/sidecar/index.ts --outdir plugin/inline/sidecar --entry-naming 'index.mjs' --target=node --format=esm --packages=bundle && tsc -p tsconfig.json --emitDeclarationOnly",
57
- "lint": "bunx oxlint --ignore-path ../../.oxlintignore scripts/release-stage.mjs src/install.ts src/sidecar/contract.ts src/sidecar/index.ts src/sidecar/telemetry.ts src/sidecar/telemetry.test.ts src/sidecar/user-directory.ts src/sidecar/user-directory.test.ts src/sidecar/inbound-delivery.ts src/sidecar/inbound-delivery.test.ts src/sidecar/inbound-stream.ts src/sidecar/inbound-stream.test.ts tests/inbound-flow.test.ts tests/adapter-python.test.ts tests/install.test.ts tests/package-artifact.test.ts tests/sidecar-contract.test.ts tests/sidecar-runtime.test.ts tests/telemetry-python.test.ts vitest.config.ts",
58
+ "lint": "bunx oxlint --ignore-path ../../.oxlintignore scripts/release-stage.mjs src/install.ts src/sidecar/activity.ts src/sidecar/activity.test.ts src/sidecar/agent-activity-copy.test.ts src/sidecar/contract.ts src/sidecar/index.ts src/sidecar/telemetry.ts src/sidecar/telemetry.test.ts src/sidecar/user-directory.ts src/sidecar/user-directory.test.ts src/sidecar/inbound-delivery.ts src/sidecar/inbound-delivery.test.ts src/sidecar/inbound-stream.ts src/sidecar/inbound-stream.test.ts tests/inbound-flow.test.ts tests/activity-python.test.ts tests/adapter-python.test.ts tests/install.test.ts tests/package-artifact.test.ts tests/sidecar-contract.test.ts tests/sidecar-runtime.test.ts tests/telemetry-python.test.ts vitest.config.ts",
58
59
  "pretest": "bun run build",
59
60
  "prepack": "bun run build",
60
61
  "prepublishOnly": "bun run check",
@@ -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.20",
69
+ "@inline-chat/realtime-sdk": "0.0.24",
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.22.7",
95
- "testedHermesCommit": "b200f5bc60e31588ba2cb60e288029c4a54ba5fa"
95
+ "testedHermesVersion": "0.23.0",
96
+ "testedHermesCommit": "2bd378ed1b8d6bf2192cb26e0a55ff3091e6bd19"
96
97
  },
97
- "gitHead": "ec95e9296b83c13d2179b47019d915b16783c186",
98
+ "gitHead": "5f1bb189568123b7f99c20f7828d62f067c019ed",
98
99
  "inlineRelease": {
99
- "tag": "hermes-agent-v1.0.1",
100
- "sha": "ec95e9296b83c13d2179b47019d915b16783c186"
100
+ "tag": "hermes-agent-v1.2.0",
101
+ "sha": "5f1bb189568123b7f99c20f7828d62f067c019ed"
101
102
  }
102
103
  }
@@ -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).