feat: convert to pip package
- Restructure repo into hermes_identity_plugin/ Python package - Add pyproject.toml with setuptools build config - Register identity entry point under hermes_agent.plugins - Include plugin.yaml, .json, .yaml as package data - Update README with pip install instructions and project layout
This commit is contained in:
30
README.md
30
README.md
@@ -46,11 +46,29 @@ initialization — no files are changed on disk.
|
|||||||
4. **Missing config or env** → returns None → Honcho behaves exactly as
|
4. **Missing config or env** → returns None → Honcho behaves exactly as
|
||||||
before (creates `user-default-*` peers — safe fallback).
|
before (creates `user-default-*` peers — safe fallback).
|
||||||
|
|
||||||
## Installation
|
## Project layout
|
||||||
|
|
||||||
|
```
|
||||||
|
hermes-identity-plugin/
|
||||||
|
├── pyproject.toml # pip package config
|
||||||
|
├── README.md
|
||||||
|
├── hermes_identity_plugin/ # Python package
|
||||||
|
│ ├── __init__.py # register() entry point
|
||||||
|
│ └── plugin.yaml # Hermes plugin metadata
|
||||||
|
├── config.sample.json
|
||||||
|
└── docs/
|
||||||
|
├── enforcement.md
|
||||||
|
└── how-it-works.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### Option 1: pip package (recommended)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Install the plugin from Gitea
|
# Install from Gitea (requires GITEA_PAT in environment)
|
||||||
hermes plugins install ssh://git@code.lazyworkhorse.net:2222/Hermes/hermes-identity-plugin.git
|
pip install git+https://gortium:${GITEA_PAT}@code.lazyworkhorse.net/gortium/hermes-identity-plugin.git
|
||||||
|
|
||||||
|
# Or install from local checkout
|
||||||
|
pip install /path/to/hermes-identity-plugin
|
||||||
|
|
||||||
# 2. Create the config file (persistent volume)
|
# 2. Create the config file (persistent volume)
|
||||||
cp config.sample.json /opt/data/identity-config.json
|
cp config.sample.json /opt/data/identity-config.json
|
||||||
@@ -59,6 +77,12 @@ cp config.sample.json /opt/data/identity-config.json
|
|||||||
# 4. Restart gateways to pick up the plugin
|
# 4. Restart gateways to pick up the plugin
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Option 2: Legacy plugin install
|
||||||
|
|
||||||
|
```bash
|
||||||
|
hermes plugins install ssh://git@code.lazyworkhorse.net:2222/gortium/hermes-identity-plugin.git
|
||||||
|
```
|
||||||
|
|
||||||
## Config file: `/opt/data/identity-config.json`
|
## Config file: `/opt/data/identity-config.json`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
21
pyproject.toml
Normal file
21
pyproject.toml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["setuptools"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "hermes-identity-plugin"
|
||||||
|
version = "1.0.0"
|
||||||
|
description = "Identity mapping plugin for Hermes Agent"
|
||||||
|
authors = [{name = "@gortium"}]
|
||||||
|
license = {text = "MIT"}
|
||||||
|
requires-python = ">=3.11"
|
||||||
|
dependencies = []
|
||||||
|
|
||||||
|
[project.entry-points.'hermes_agent.plugins']
|
||||||
|
identity = "hermes_identity_plugin:register"
|
||||||
|
|
||||||
|
[tool.setuptools.packages.find]
|
||||||
|
include = ["hermes_identity_plugin*", "docs*"]
|
||||||
|
|
||||||
|
[tool.setuptools.package-data]
|
||||||
|
"*" = ["*.json", "*.yaml"]
|
||||||
Reference in New Issue
Block a user