🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@prismer/adapter-hermes

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prismer/adapter-hermes

Prismer Mode B HTTP loopback adapter for NousResearch Hermes — daemon-side companion to prismer-adapter-hermes (Python, PyPI)

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
9
-92.11%
Maintainers
1
Weekly downloads
 
Created
Source

@prismer/adapter-hermes

Runtime-side Mode B HTTP loopback adapter for NousResearch Hermes, used by the Prismer runtime daemon (@prismer/runtime).

Role in the Prismer PARA bridge

Hermes <-> Prismer integration has two halves:

SidePackageRole
Node (runtime)@prismer/adapter-hermes (this package)Daemon calls dispatch() on this adapter → HTTP POST to Hermes loopback
Python (Hermes plugin)prismer-adapter-hermes on PyPI(v0.1.x) translates Hermes hooks to PARA events; (v0.2.0+) hosts /dispatch HTTP server inside Hermes gateway mode

This package does NOT depend on the Python side at install time — they communicate via the HTTP contract documented in docs/version190/22-adapter-integration-contract.md §3.2 Mode B.

Install

npm install @prismer/adapter-hermes
# Requires @prismer/runtime (peer dep)

Usage — daemon startup hook

import { autoRegisterHermes } from '@prismer/adapter-hermes';
import { AdapterRegistry } from '@prismer/runtime';

const registry = new AdapterRegistry();
// … other adapters register via autoRegisterAdapters() (CLI shims) …

const result = await autoRegisterHermes(registry);
if (result.installed) {
  log.info(`Hermes Mode B adapter installed at ${result.loopbackUrl}`);
} else {
  log.debug(`Hermes Mode B not reachable (${result.reason}); using CLI shim fallback`);
}

autoRegisterHermes() probes http://127.0.0.1:8765/health (configurable). If reachable, it replaces any previously-registered hermes adapter (typically the CLI shim) with a Mode B adapter whose dispatch() is an HTTP POST to http://127.0.0.1:8765/dispatch.

Usage — manual construction

import { buildHermesAdapter } from '@prismer/adapter-hermes';

const adapter = buildHermesAdapter({ port: 19876 });
registry.register(adapter);

Dispatch wire format

POST http://127.0.0.1:<port>/dispatch
Content-Type: application/json

{
  "taskId": "t_abc",
  "capability": "code.write",
  "prompt": "...",
  "stepIdx": 2,
  "deadlineAt": 1776756848133,
  "metadata": { /* free-form */ }
}

→ 200 OK
{
  "ok": true,
  "output": "...",
  "artifacts": [{ "path": "...", "bytes": 123 }],
  "metadata": { /* free-form */ }
}

On non-2xx / JSON parse failure / network error, dispatch() returns:

{ ok: false, error: "mode_b_<status>:<detail>" | "mode_b_invalid_response:<...>" | "mode_b_network:<...>" }

Health check

GET http://127.0.0.1:<port>/health → 200

adapter.health() returns { healthy: true } on 2xx, { healthy: false, reason: "loopback_<status>" } otherwise.

Security

  • Only http://127.0.0.1:<explicit-port> is accepted as the loopback URL. localhost, other hosts, HTTPS, and any non-empty pathname/query/hash are rejected at construction time. This prevents a compromised plugin from pointing the daemon at a remote or locally-proxied service.
  • No credentials or secrets are sent in the loopback request. Hermes is expected to run under the same user identity as the daemon.

Compatibility

@prismer/adapter-hermes@prismer/runtimeprismer-adapter-hermes (PyPI)Hermes
0.1.x≥ 1.9.0≥ 0.2.0 (for /dispatch)≥ 0.10.0 gateway mode

For v0.1.x, the PyPI package does not yet ship the /dispatch server — that arrives in 0.2.0 alongside the Hermes gateway/platforms/dispatch.py adapter. Until then this Node package produces a not_found:refused result at auto-register time and daemon falls back to the CLI shim.

License

MIT

Keywords

prismer

FAQs

Package last updated on 22 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts