feat(FN-2481): align Hermes runtime artifacts and compatibility coverage
- Regenerate fusion-plugin-hermes-runtime build artifacts and manifest metadata for runtime packaging - Refactor Hermes runtime source into dedicated pi-module, runtime-adapter, and shared type modules - Expand Hermes and engine plugin-runner tests to validate cross-runtime compatibility behavior - Update getting-started, settings reference, and Hermes README docs to reflect the current runtime integration guidance
This commit is contained in:
@@ -1,34 +1,16 @@
|
||||
# Hermes Runtime Plugin
|
||||
|
||||
> **Status:** Experimental placeholder runtime (current behavior)
|
||||
Provides an executable Hermes runtime plugin for Fusion. This package enables runtime registration, discovery, and session execution so agents configured with `runtimeConfig.runtimeHint: "hermes"` can run through the standard runtime adapter contract.
|
||||
|
||||
Provides a Hermes runtime plugin for Fusion. The plugin is active today for runtime registration/discovery and runtime selection via `runtimeConfig.runtimeHint: "hermes"`.
|
||||
## Overview
|
||||
|
||||
## What it does today
|
||||
This plugin follows the runtime adapter pattern used by other executable plugin runtimes:
|
||||
|
||||
- Registers Hermes runtime metadata with the plugin system
|
||||
- Exposes a runtime factory that returns a placeholder runtime object
|
||||
- Emits `hermes-runtime:loaded` on plugin load
|
||||
- Supports runtime routing with `runtimeHint: "hermes"`
|
||||
|
||||
## Current behavior and limitations
|
||||
|
||||
This plugin currently provides **registration + placeholder execution semantics**.
|
||||
|
||||
- Runtime factory returns an object with:
|
||||
- `runtimeId: "hermes"`
|
||||
- `version: "0.1.0"`
|
||||
- `status: "deferred"`
|
||||
- `message` describing placeholder/deferred status
|
||||
- `execute()` function
|
||||
- Calling `execute()` always throws a not-implemented error.
|
||||
- Runtime creation itself does **not** throw.
|
||||
|
||||
Expected execution failure message includes:
|
||||
|
||||
```
|
||||
Hermes runtime is not yet implemented. Full implementation deferred to FN-2264. See https://github.com/gsxdsm/fusion/issues/FN-2264
|
||||
```
|
||||
- Registers Hermes runtime metadata for resolver discovery
|
||||
- Creates executable runtime sessions via `createFnAgent`
|
||||
- Delegates prompt execution through `promptWithFallback`
|
||||
- Exposes model descriptions through `describeModel`
|
||||
- Supports best-effort session disposal via `dispose()`
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -44,9 +26,18 @@ cp -r fusion-plugin-hermes-runtime ~/.fusion/plugins/
|
||||
fn plugin add ./plugins/fusion-plugin-hermes-runtime
|
||||
```
|
||||
|
||||
## Runtime routing (`runtimeHint`)
|
||||
## Runtime Metadata
|
||||
|
||||
To route an agent to Hermes, set `runtimeConfig.runtimeHint` to `"hermes"`:
|
||||
- **Plugin ID:** `fusion-plugin-hermes-runtime`
|
||||
- **Package name:** `@fusion-plugin-examples/hermes-runtime`
|
||||
- **Runtime ID:** `hermes`
|
||||
- **Runtime name:** `Hermes Runtime`
|
||||
- **Version:** `0.1.0`
|
||||
- **Description:** Hermes-backed AI session using the user's configured pi provider and model
|
||||
|
||||
## Agent Configuration
|
||||
|
||||
Configure an agent to target Hermes via `runtimeConfig.runtimeHint`:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -58,66 +49,12 @@ To route an agent to Hermes, set `runtimeConfig.runtimeHint` to `"hermes"`:
|
||||
}
|
||||
```
|
||||
|
||||
> ⚠️ With the current placeholder runtime, agent/session selection can target Hermes successfully, but runtime `execute()` will throw.
|
||||
|
||||
## Source-of-truth metadata
|
||||
|
||||
### `manifest.json`
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "fusion-plugin-hermes-runtime",
|
||||
"name": "Hermes Runtime Plugin",
|
||||
"version": "0.1.0",
|
||||
"description": "Hermes AI runtime plugin for Fusion - provides AI agent execution runtime capabilities",
|
||||
"author": "Fusion Team",
|
||||
"homepage": "https://github.com/gsxdsm/fusion",
|
||||
"runtime": {
|
||||
"runtimeId": "hermes",
|
||||
"name": "Hermes Runtime",
|
||||
"description": "Experimental Hermes runtime integration for Fusion tasks (implementation deferred to FN-2264)",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Runtime metadata (from `src/index.ts`)
|
||||
|
||||
- **Runtime ID:** `hermes`
|
||||
- **Name:** `Hermes Runtime`
|
||||
- **Version:** `0.1.0`
|
||||
- **Description:** `Experimental Hermes runtime integration for Fusion tasks (implementation deferred to FN-2264)`
|
||||
|
||||
## Development
|
||||
## Local Development
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
pnpm install
|
||||
|
||||
# Run plugin tests
|
||||
pnpm --filter @fusion-plugin-examples/hermes-runtime test
|
||||
|
||||
# Build
|
||||
pnpm build
|
||||
# Build plugin output to dist/
|
||||
pnpm --filter @fusion-plugin-examples/hermes-runtime build
|
||||
```
|
||||
|
||||
## Test coverage
|
||||
|
||||
The plugin tests validate:
|
||||
|
||||
- Manifest identity
|
||||
- Runtime registration + metadata consistency
|
||||
- Placeholder runtime return shape (`status: "deferred"`)
|
||||
- `execute()` failure semantics
|
||||
- Hook behavior (`onLoad`, `onUnload`, event emission)
|
||||
|
||||
## Exports
|
||||
|
||||
- `default` — plugin instance
|
||||
- `hermesRuntimeMetadata` — runtime metadata object
|
||||
- `hermesRuntimeFactory` — runtime factory
|
||||
- `HERMES_RUNTIME_ID` — runtime ID constant (`"hermes"`)
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
Reference in New Issue
Block a user