Skip to main content
This package is the contract-testable shell. It does not spawn the hermes CLI; a fresh HermesDriver is minted per run via the injected driverFactory, and the real spawn-backed driver (hermesDriver) lives in apps/web/server/lib/runtimes/. The only capability difference from the Claude Code / Codex adapters is streaming: false: Hermes has no live token stream, so the driver derives structured lifecycle events from its run output + state.db rather than scraping rendered text.
Hermes ships its OWN kanban; clawboo does not sync it. Hermes is driven as a single-task worker on clawboo’s one board of record; it reaches the team’s coordination surface by attaching clawboo’s Tasks/Memory/Tools MCP. Two boards would mean drift, double-dispatch, and stale-claim races.

Public API

All exports come from src/index.ts. The package declares a single . export in package.json (no subpath barrels).

Classes

HermesAdapter members:
  • capabilities(): Capabilities: returns { streaming: false, mcp: true, worktrees: true, resume: true, toolApproval: true, models: [], runtimeClass: 'wrapped-oneshot', nativeHome: { scope: 'per-identity', persist: true }, nativeSkills: 'preserve', nativeMemory: 'preserve', nativeChannels: 'none', nativeScheduler: true }. models is empty; Hermes resolves models via its own provider config. The native-preservation seam (stable per-identity home, preserved skills/MEMORY.md/state.db) is what distinguishes Hermes from the stateless wrapped runtimes; nativeScheduler: true is informational only (the host does not co-run Hermes’s cron for teammates).
  • sessionCodec: SessionCodec: serializes { sessionKey, sessionId } (the native Hermes session id captured during the run, falling back to runId); restore rebuilds a RunHandle from the blob. Rotation does not replay the heavy transcript; the codec only carries the session id for lineage + same-runtime --resume.
  • health(): Promise<HealthResult>: races the injected healthCheck against a 2 s timeout; any throw → { ok: false, message }.
  • start(_task: TaskHandle, opts: StartOpts): Promise<RunHandle>: mints a driver via driverFactory(opts), stores it by opts.sessionKey, calls driver.start(), returns { adapterId: 'hermes', sessionKey, runId: null }. The runId late-binds in events() from the first native frame carrying a session id (falling back to sessionKey).
  • events(run: RunHandle): AsyncIterable<RuntimeEvent>: subscribes to the run’s driver stream, captures + late-binds the native session id, accumulates non-reasoning text-delta text, and yields the mapped normalized stream via a bounded createAsyncQueue (max: 1000). Consumer termination (return()) unsubscribes the driver. Returns an empty (closed) queue if no driver is registered for the run.
  • abort(run: RunHandle): Promise<void>: delegates to the run’s driver abort().
  • setModel(run: RunHandle, model: string): Promise<void>: delegates to the run’s driver setModel().
  • writeContext(run: RunHandle, key: string, value: string): Promise<void>: delegates to the run’s driver writeContext().

Functions

Types & interfaces

The Capabilities, HealthResult, RunHandle, RuntimeAdapter, RuntimeEvent, SessionCodec, StartOpts, TaskHandle, and Usage types referenced above are owned by @clawboo/executor, not re-exported here.

Used by

  • apps/web/server/lib/runtimes/index.ts, instantiates HermesAdapter, injecting the real spawn-backed driver and a CLI health probe.
  • apps/web/server/lib/runtimes/hermesDriver.ts, imports the HermesDriver + HermesNativeEvent types to implement the server-side driver against the hermes CLI.
  • apps/web/server/lib/__tests__/executorRunner.test.ts, imports HermesAdapter + driver/event types for the executor-runner integration tests.

Source

packages/adapters/hermes/src/index.ts (barrel; re-exports ./adapter, ./types, ./mapHermesEvent).

See also

Last modified on June 26, 2026