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 fromsrc/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 }.modelsis 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: trueis 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 torunId);restorerebuilds aRunHandlefrom 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 injectedhealthCheckagainst a 2 s timeout; any throw →{ ok: false, message }.start(_task: TaskHandle, opts: StartOpts): Promise<RunHandle>: mints a driver viadriverFactory(opts), stores it byopts.sessionKey, callsdriver.start(), returns{ adapterId: 'hermes', sessionKey, runId: null }. TherunIdlate-binds inevents()from the first native frame carrying a session id (falling back tosessionKey).events(run: RunHandle): AsyncIterable<RuntimeEvent>: subscribes to the run’s driver stream, captures + late-binds the native session id, accumulates non-reasoningtext-deltatext, and yields the mapped normalized stream via a boundedcreateAsyncQueue(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 driverabort().setModel(run: RunHandle, model: string): Promise<void>: delegates to the run’s driversetModel().writeContext(run: RunHandle, key: string, value: string): Promise<void>: delegates to the run’s driverwriteContext().
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, instantiatesHermesAdapter, injecting the real spawn-backed driver and a CLI health probe.apps/web/server/lib/runtimes/hermesDriver.ts, imports theHermesDriver+HermesNativeEventtypes to implement the server-side driver against thehermesCLI.apps/web/server/lib/__tests__/executorRunner.test.ts, importsHermesAdapter+ driver/event types for the executor-runner integration tests.
Source
packages/adapters/hermes/src/index.ts (barrel; re-exports ./adapter, ./types, ./mapHermesEvent).
See also
- @clawboo/executor, the
RuntimeAdaptertrait +RuntimeEventunion this adapter implements. - RuntimeAdapter trait, the cross-runtime contract.
- Hermes runtime, using the runtime end-to-end (persistent per-identity home,
--resume). - Sibling adapters: @clawboo/adapter-claude-code, @clawboo/adapter-codex, @clawboo/adapter-native, @clawboo/adapter-openclaw.