hermes-xmemo 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ name: Publish to PyPI
2
+
3
+ "on":
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
7
+ release:
8
+ types: [published]
9
+
10
+ jobs:
11
+ build-and-publish:
12
+ name: Build and publish Python package
13
+ runs-on: ubuntu-latest
14
+ environment:
15
+ name: pypi
16
+ url: https://pypi.org/p/hermes-xmemo
17
+ permissions:
18
+ id-token: write # required for OIDC trusted publishing
19
+ contents: read
20
+
21
+ steps:
22
+ - name: Checkout
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Set up Python
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: "3.12"
29
+
30
+ - name: Install build tools
31
+ run: |
32
+ python -m pip install --upgrade pip
33
+ python -m pip install build
34
+
35
+ - name: Build package
36
+ run: python -m build
37
+
38
+ - name: Publish to PyPI
39
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,13 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ *.egg-info/
8
+ dist/
9
+ build/
10
+
11
+ # Hermes runtime state (if someone runs from inside the repo)
12
+ .env
13
+ xmemo.json
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 XMemo contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,207 @@
1
+ Metadata-Version: 2.4
2
+ Name: hermes-xmemo
3
+ Version: 1.0.0
4
+ Summary: XMemo memory provider plugin for Hermes Agent
5
+ Author: XMemo
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/yonro/hermes-xmemo-plugin
8
+ Project-URL: Repository, https://github.com/yonro/hermes-xmemo-plugin
9
+ Project-URL: Issues, https://github.com/yonro/hermes-xmemo-plugin/issues
10
+ Keywords: hermes,agent,memory,xmemo,plugin
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: httpx>=0.25.0
23
+ Dynamic: license-file
24
+
25
+ # XMemo Memory Provider for Hermes Agent
26
+
27
+ [XMemo](https://xmemo.dev) is an identity-aware memory layer for AI agents: one persistent, user-owned memory space that works across ChatGPT, Copilot, Claude, Codex, Gemini, and here — Hermes Agent. Every memory entry knows who wrote it, so you can recall, audit, and control context without confusion or spillover.
28
+
29
+ This plugin connects Hermes Agent to your XMemo account, giving the agent durable memory that survives sessions and long-running workflows, with per-profile isolation.
30
+
31
+ ## What it does
32
+
33
+ - **Orchestrated recall** — Hermes prefetches relevant XMemo context before each turn, automatically.
34
+ - **Semantic search** — ask the agent to search saved facts with natural language (`xmemo_search`).
35
+ - **Durable fact storage** — store explicit facts, preferences, and decisions (`xmemo_remember`).
36
+ - **Working state with TTL** — save active task, next action, or blocker so future sessions can resume (`xmemo_update_state`).
37
+ - **Built-in memory mirroring** — when Hermes' native `memory` tool writes, the same fact is mirrored to XMemo.
38
+ - **Session snapshots** — captures a restart snapshot at session end for later restoration by compatible XMemo workflows.
39
+ - **Reminders & timeline** — optional workflow tools for TODOs and timeline events (opt-in via config).
40
+ - **Profile isolation** — each Hermes profile uses its own `xmemo.json` and scoped memories.
41
+ - **Resilient by default** — circuit breaker pauses API calls after consecutive failures; background prefetch/sync never block the chat.
42
+
43
+ ## Install
44
+
45
+ Hermes looks for memory provider plugins in `$HERMES_HOME/plugins/<name>/`. The default `HERMES_HOME` is `~/.hermes`.
46
+
47
+ ### pip install (recommended)
48
+
49
+ ```bash
50
+ pip install hermes-xmemo
51
+ hermes-xmemo install
52
+ hermes memory setup xmemo
53
+ ```
54
+
55
+ To install to a non-default Hermes home:
56
+
57
+ ```bash
58
+ HERMES_HOME=/path/to/your/hermes-home hermes-xmemo install
59
+ ```
60
+
61
+ ### One-liner (no pip)
62
+
63
+ ```bash
64
+ curl -fsSL https://raw.githubusercontent.com/yonro/hermes-xmemo-plugin/main/install-remote.sh | bash
65
+ hermes memory setup xmemo
66
+ ```
67
+
68
+ ### Using install.sh (if you already cloned)
69
+
70
+ ```bash
71
+ cd hermes-xmemo-plugin
72
+ bash install.sh
73
+ ```
74
+
75
+ ### Manual install
76
+
77
+ ```bash
78
+ # Remove any previous install first to avoid nested directories.
79
+ rm -rf "${HERMES_HOME:-$HOME/.hermes}/plugins/xmemo"
80
+ mkdir -p "${HERMES_HOME:-$HOME/.hermes}/plugins"
81
+ cp -r src/hermes_xmemo/xmemo "${HERMES_HOME:-$HOME/.hermes}/plugins/"
82
+ ```
83
+
84
+ ### Configure
85
+
86
+ ```bash
87
+ hermes memory setup xmemo
88
+ ```
89
+
90
+ Or manually:
91
+
92
+ ```bash
93
+ hermes config set memory.provider xmemo
94
+ echo "XMEMO_KEY=your-token" >> "${HERMES_HOME:-$HOME/.hermes}/.env"
95
+ ```
96
+
97
+ ## Requirements
98
+
99
+ - Hermes Agent (the plugin is loaded by Hermes at runtime)
100
+ - `httpx` (already a dependency of Hermes)
101
+ - XMemo service token from [xmemo.dev](https://xmemo.dev)
102
+
103
+ ## How it works
104
+
105
+ 1. **Before the turn** — Hermes calls `prefetch()` to retrieve relevant XMemo context and injects it into the conversation.
106
+ 2. **During the turn** — the agent can call explicit XMemo tools (`xmemo_search`, `xmemo_remember`, etc.).
107
+ 3. **After the turn** — high-signal turns can be recorded to the XMemo timeline if `capture_timeline` is enabled.
108
+ 4. **Session end** — a restart snapshot is captured for later restoration by compatible XMemo workflows.
109
+
110
+ Automatic prefetch, turn sync, and session snapshots run in the background. Explicit tool calls and memory mirroring use bounded timeouts, with a circuit breaker protecting Hermes from repeated failures.
111
+
112
+ ## Configure
113
+
114
+ Edit `$HERMES_HOME/xmemo.json`:
115
+
116
+ | Key | Default | Description |
117
+ |-----|---------|-------------|
118
+ | `base_url` | `https://xmemo.dev` | XMemo service URL |
119
+ | `agent_id` | `hermes` | Agent family identifier |
120
+ | `agent_instance_id` | auto-generated | Stable, opaque install identifier |
121
+ | `bucket` | `work` | Storage namespace |
122
+ | `scope` | `hermes/default` | Project/session scope |
123
+ | `timeout_seconds` | `5.0` | REST request timeout |
124
+ | `prefetch_max_items` | `5` | Max context items per recall |
125
+ | `prefetch_max_tokens` | `900` | Max context tokens per recall |
126
+ | `enable_workflow_tools` | `false` | Expose reminder/event tools |
127
+ | `enable_destructive_tools` | `false` | Expose `xmemo_forget` |
128
+ | `capture_timeline` | `false` | Record high-signal turns to timeline |
129
+
130
+ ### Environment variables
131
+
132
+ You can override most settings via environment variables (useful for CI or containerized setups):
133
+
134
+ | Variable | Overrides |
135
+ |----------|-----------|
136
+ | `XMEMO_KEY` | API key (required; `MEMORY_OS_API_KEY` is also accepted) |
137
+ | `XMEMO_URL` | `base_url` (`MEMORY_OS_URL` is also accepted) |
138
+ | `XMEMO_AGENT_ID` | `agent_id` |
139
+ | `XMEMO_AGENT_INSTANCE_ID` | `agent_instance_id` |
140
+ | `XMEMO_BUCKET` | `bucket` |
141
+ | `XMEMO_SCOPE` | `scope` |
142
+ | `XMEMO_TIMEOUT_SECONDS` | `timeout_seconds` |
143
+ | `XMEMO_PREFETCH_MAX_ITEMS` | `prefetch_max_items` |
144
+ | `XMEMO_PREFETCH_MAX_TOKENS` | `prefetch_max_tokens` |
145
+
146
+ ## Tools
147
+
148
+ ### Default tools
149
+
150
+ These tools are always available:
151
+
152
+ | Tool | Description |
153
+ |------|-------------|
154
+ | `xmemo_recall_context` | Build a bounded, ranked context pack |
155
+ | `xmemo_search` | Semantic search over XMemo memories |
156
+ | `xmemo_remember` | Save a durable fact |
157
+ | `xmemo_update_state` | Save active task / next action / blocker with TTL |
158
+
159
+ ### Optional workflow tools
160
+
161
+ Set `enable_workflow_tools: true` in `xmemo.json` to expose:
162
+
163
+ | Tool | Description |
164
+ |------|-------------|
165
+ | `xmemo_record_event` | Append a timeline event or milestone |
166
+ | `xmemo_create_reminder` | Create a TODO / action item |
167
+ | `xmemo_list_reminders` | List open or completed reminders |
168
+ | `xmemo_complete_reminder` | Mark a reminder as completed |
169
+
170
+ ### Optional destructive tool
171
+
172
+ Set `enable_destructive_tools: true` to expose:
173
+
174
+ | Tool | Description |
175
+ |------|-------------|
176
+ | `xmemo_forget` | Delete a memory by exact id |
177
+
178
+ ## Privacy & security
179
+
180
+ - API keys live in `$HERMES_HOME/.env`, never in `xmemo.json`.
181
+ - `xmemo_forget` requires an exact memory id and is disabled by default.
182
+ - Automatic timeline writes are disabled by default. When enabled, only high-signal turns (decisions, preferences, blockers, etc.) are recorded.
183
+ - Built-in `memory` tool writes are mirrored to XMemo only when the provider is active.
184
+ - Prefetch cache is isolated per session, so concurrent gateway sessions cannot cross-contaminate recall context.
185
+
186
+ ## Uninstall or disable
187
+
188
+ To disable XMemo without removing files:
189
+
190
+ ```bash
191
+ hermes config set memory.provider ""
192
+ ```
193
+
194
+ To remove the plugin entirely:
195
+
196
+ ```bash
197
+ rm -rf "${HERMES_HOME:-$HOME/.hermes}/plugins/xmemo"
198
+ ```
199
+
200
+ ## Learn more
201
+
202
+ - [xmemo.dev](https://xmemo.dev) — XMemo home
203
+ - [Hermes Agent docs: Memory Providers](https://hermes-agent.nousresearch.com/docs/user-guide/features/memory-providers)
204
+
205
+ ## License
206
+
207
+ MIT
@@ -0,0 +1,183 @@
1
+ # XMemo Memory Provider for Hermes Agent
2
+
3
+ [XMemo](https://xmemo.dev) is an identity-aware memory layer for AI agents: one persistent, user-owned memory space that works across ChatGPT, Copilot, Claude, Codex, Gemini, and here — Hermes Agent. Every memory entry knows who wrote it, so you can recall, audit, and control context without confusion or spillover.
4
+
5
+ This plugin connects Hermes Agent to your XMemo account, giving the agent durable memory that survives sessions and long-running workflows, with per-profile isolation.
6
+
7
+ ## What it does
8
+
9
+ - **Orchestrated recall** — Hermes prefetches relevant XMemo context before each turn, automatically.
10
+ - **Semantic search** — ask the agent to search saved facts with natural language (`xmemo_search`).
11
+ - **Durable fact storage** — store explicit facts, preferences, and decisions (`xmemo_remember`).
12
+ - **Working state with TTL** — save active task, next action, or blocker so future sessions can resume (`xmemo_update_state`).
13
+ - **Built-in memory mirroring** — when Hermes' native `memory` tool writes, the same fact is mirrored to XMemo.
14
+ - **Session snapshots** — captures a restart snapshot at session end for later restoration by compatible XMemo workflows.
15
+ - **Reminders & timeline** — optional workflow tools for TODOs and timeline events (opt-in via config).
16
+ - **Profile isolation** — each Hermes profile uses its own `xmemo.json` and scoped memories.
17
+ - **Resilient by default** — circuit breaker pauses API calls after consecutive failures; background prefetch/sync never block the chat.
18
+
19
+ ## Install
20
+
21
+ Hermes looks for memory provider plugins in `$HERMES_HOME/plugins/<name>/`. The default `HERMES_HOME` is `~/.hermes`.
22
+
23
+ ### pip install (recommended)
24
+
25
+ ```bash
26
+ pip install hermes-xmemo
27
+ hermes-xmemo install
28
+ hermes memory setup xmemo
29
+ ```
30
+
31
+ To install to a non-default Hermes home:
32
+
33
+ ```bash
34
+ HERMES_HOME=/path/to/your/hermes-home hermes-xmemo install
35
+ ```
36
+
37
+ ### One-liner (no pip)
38
+
39
+ ```bash
40
+ curl -fsSL https://raw.githubusercontent.com/yonro/hermes-xmemo-plugin/main/install-remote.sh | bash
41
+ hermes memory setup xmemo
42
+ ```
43
+
44
+ ### Using install.sh (if you already cloned)
45
+
46
+ ```bash
47
+ cd hermes-xmemo-plugin
48
+ bash install.sh
49
+ ```
50
+
51
+ ### Manual install
52
+
53
+ ```bash
54
+ # Remove any previous install first to avoid nested directories.
55
+ rm -rf "${HERMES_HOME:-$HOME/.hermes}/plugins/xmemo"
56
+ mkdir -p "${HERMES_HOME:-$HOME/.hermes}/plugins"
57
+ cp -r src/hermes_xmemo/xmemo "${HERMES_HOME:-$HOME/.hermes}/plugins/"
58
+ ```
59
+
60
+ ### Configure
61
+
62
+ ```bash
63
+ hermes memory setup xmemo
64
+ ```
65
+
66
+ Or manually:
67
+
68
+ ```bash
69
+ hermes config set memory.provider xmemo
70
+ echo "XMEMO_KEY=your-token" >> "${HERMES_HOME:-$HOME/.hermes}/.env"
71
+ ```
72
+
73
+ ## Requirements
74
+
75
+ - Hermes Agent (the plugin is loaded by Hermes at runtime)
76
+ - `httpx` (already a dependency of Hermes)
77
+ - XMemo service token from [xmemo.dev](https://xmemo.dev)
78
+
79
+ ## How it works
80
+
81
+ 1. **Before the turn** — Hermes calls `prefetch()` to retrieve relevant XMemo context and injects it into the conversation.
82
+ 2. **During the turn** — the agent can call explicit XMemo tools (`xmemo_search`, `xmemo_remember`, etc.).
83
+ 3. **After the turn** — high-signal turns can be recorded to the XMemo timeline if `capture_timeline` is enabled.
84
+ 4. **Session end** — a restart snapshot is captured for later restoration by compatible XMemo workflows.
85
+
86
+ Automatic prefetch, turn sync, and session snapshots run in the background. Explicit tool calls and memory mirroring use bounded timeouts, with a circuit breaker protecting Hermes from repeated failures.
87
+
88
+ ## Configure
89
+
90
+ Edit `$HERMES_HOME/xmemo.json`:
91
+
92
+ | Key | Default | Description |
93
+ |-----|---------|-------------|
94
+ | `base_url` | `https://xmemo.dev` | XMemo service URL |
95
+ | `agent_id` | `hermes` | Agent family identifier |
96
+ | `agent_instance_id` | auto-generated | Stable, opaque install identifier |
97
+ | `bucket` | `work` | Storage namespace |
98
+ | `scope` | `hermes/default` | Project/session scope |
99
+ | `timeout_seconds` | `5.0` | REST request timeout |
100
+ | `prefetch_max_items` | `5` | Max context items per recall |
101
+ | `prefetch_max_tokens` | `900` | Max context tokens per recall |
102
+ | `enable_workflow_tools` | `false` | Expose reminder/event tools |
103
+ | `enable_destructive_tools` | `false` | Expose `xmemo_forget` |
104
+ | `capture_timeline` | `false` | Record high-signal turns to timeline |
105
+
106
+ ### Environment variables
107
+
108
+ You can override most settings via environment variables (useful for CI or containerized setups):
109
+
110
+ | Variable | Overrides |
111
+ |----------|-----------|
112
+ | `XMEMO_KEY` | API key (required; `MEMORY_OS_API_KEY` is also accepted) |
113
+ | `XMEMO_URL` | `base_url` (`MEMORY_OS_URL` is also accepted) |
114
+ | `XMEMO_AGENT_ID` | `agent_id` |
115
+ | `XMEMO_AGENT_INSTANCE_ID` | `agent_instance_id` |
116
+ | `XMEMO_BUCKET` | `bucket` |
117
+ | `XMEMO_SCOPE` | `scope` |
118
+ | `XMEMO_TIMEOUT_SECONDS` | `timeout_seconds` |
119
+ | `XMEMO_PREFETCH_MAX_ITEMS` | `prefetch_max_items` |
120
+ | `XMEMO_PREFETCH_MAX_TOKENS` | `prefetch_max_tokens` |
121
+
122
+ ## Tools
123
+
124
+ ### Default tools
125
+
126
+ These tools are always available:
127
+
128
+ | Tool | Description |
129
+ |------|-------------|
130
+ | `xmemo_recall_context` | Build a bounded, ranked context pack |
131
+ | `xmemo_search` | Semantic search over XMemo memories |
132
+ | `xmemo_remember` | Save a durable fact |
133
+ | `xmemo_update_state` | Save active task / next action / blocker with TTL |
134
+
135
+ ### Optional workflow tools
136
+
137
+ Set `enable_workflow_tools: true` in `xmemo.json` to expose:
138
+
139
+ | Tool | Description |
140
+ |------|-------------|
141
+ | `xmemo_record_event` | Append a timeline event or milestone |
142
+ | `xmemo_create_reminder` | Create a TODO / action item |
143
+ | `xmemo_list_reminders` | List open or completed reminders |
144
+ | `xmemo_complete_reminder` | Mark a reminder as completed |
145
+
146
+ ### Optional destructive tool
147
+
148
+ Set `enable_destructive_tools: true` to expose:
149
+
150
+ | Tool | Description |
151
+ |------|-------------|
152
+ | `xmemo_forget` | Delete a memory by exact id |
153
+
154
+ ## Privacy & security
155
+
156
+ - API keys live in `$HERMES_HOME/.env`, never in `xmemo.json`.
157
+ - `xmemo_forget` requires an exact memory id and is disabled by default.
158
+ - Automatic timeline writes are disabled by default. When enabled, only high-signal turns (decisions, preferences, blockers, etc.) are recorded.
159
+ - Built-in `memory` tool writes are mirrored to XMemo only when the provider is active.
160
+ - Prefetch cache is isolated per session, so concurrent gateway sessions cannot cross-contaminate recall context.
161
+
162
+ ## Uninstall or disable
163
+
164
+ To disable XMemo without removing files:
165
+
166
+ ```bash
167
+ hermes config set memory.provider ""
168
+ ```
169
+
170
+ To remove the plugin entirely:
171
+
172
+ ```bash
173
+ rm -rf "${HERMES_HOME:-$HOME/.hermes}/plugins/xmemo"
174
+ ```
175
+
176
+ ## Learn more
177
+
178
+ - [xmemo.dev](https://xmemo.dev) — XMemo home
179
+ - [Hermes Agent docs: Memory Providers](https://hermes-agent.nousresearch.com/docs/user-guide/features/memory-providers)
180
+
181
+ ## License
182
+
183
+ MIT
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # One-liner installer for the XMemo Hermes memory provider plugin.
5
+ # Downloads the latest plugin source from GitHub and runs the local install.sh.
6
+ #
7
+ # Usage:
8
+ # curl -fsSL https://raw.githubusercontent.com/yonro/hermes-xmemo-plugin/main/install-remote.sh | bash
9
+
10
+ REPO_URL="https://github.com/yonro/hermes-xmemo-plugin.git"
11
+ TMP_DIR="$(mktemp -d)"
12
+ trap 'rm -rf "$TMP_DIR"' EXIT
13
+
14
+ echo "Downloading XMemo Hermes plugin..."
15
+ git clone --depth 1 "$REPO_URL" "$TMP_DIR/hermes-xmemo-plugin"
16
+
17
+ cd "$TMP_DIR/hermes-xmemo-plugin"
18
+ bash install.sh
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env bash
2
+ # Install the XMemo memory provider plugin into $HERMES_HOME/plugins/xmemo
3
+
4
+ set -euo pipefail
5
+
6
+ HERMES_HOME_ORIGINAL="${HERMES_HOME:-}"
7
+ HERMES_HOME="${HERMES_HOME:-$HOME/.hermes}"
8
+ DEST="$HERMES_HOME/plugins/xmemo"
9
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10
+ # Prefer the plugin files inside the pip package layout if it exists.
11
+ if [ -d "$SCRIPT_DIR/src/hermes_xmemo/xmemo" ]; then
12
+ SRC="$SCRIPT_DIR/src/hermes_xmemo/xmemo"
13
+ elif [ -d "$SCRIPT_DIR/xmemo" ]; then
14
+ SRC="$SCRIPT_DIR/xmemo"
15
+ else
16
+ echo "Error: plugin source directory not found" >&2
17
+ echo "Run this script from the root of the hermes-xmemo-plugin repo." >&2
18
+ exit 1
19
+ fi
20
+
21
+ # Warn when running under WSL without an explicit HERMES_HOME, because the
22
+ # default $HOME/.hermes may point to the WSL filesystem rather than the
23
+ # Windows Hermes home that the user actually uses.
24
+ if [ -z "$HERMES_HOME_ORIGINAL" ] && [ -n "${WSL_DISTRO_NAME:-}" ]; then
25
+ echo "Warning: WSL detected and HERMES_HOME is not set." >&2
26
+ echo " Default install location: $DEST" >&2
27
+ echo " If your Windows Hermes home is elsewhere, set HERMES_HOME and re-run." >&2
28
+ fi
29
+
30
+ echo "Installing XMemo memory provider plugin to $DEST"
31
+
32
+ # Ensure the parent plugins directory exists before copying.
33
+ mkdir -p "$(dirname "$DEST")"
34
+
35
+ # Atomic-ish replacement: build in a temp directory, then swap.
36
+ DEST_TMP="${DEST}.tmp.$$"
37
+ rm -rf "$DEST_TMP"
38
+ cp -a "$SRC" "$DEST_TMP"
39
+
40
+ # Remove old install (including hidden files) and swap in the new one.
41
+ rm -rf "$DEST"
42
+ mv "$DEST_TMP" "$DEST"
43
+
44
+ if [ ! -f "$DEST/__init__.py" ]; then
45
+ echo "Error: installation appears incomplete ($DEST/__init__.py missing)" >&2
46
+ exit 1
47
+ fi
48
+
49
+ echo "Installed to $DEST"
50
+ echo "Run 'hermes memory setup xmemo' to configure."
@@ -0,0 +1,46 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "setuptools_scm>=8"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "hermes-xmemo"
7
+ dynamic = ["version"]
8
+ description = "XMemo memory provider plugin for Hermes Agent"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ authors = [
13
+ {name = "XMemo"},
14
+ ]
15
+ keywords = ["hermes", "agent", "memory", "xmemo", "plugin"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
25
+ ]
26
+ dependencies = [
27
+ "httpx>=0.25.0",
28
+ ]
29
+
30
+ [project.scripts]
31
+ hermes-xmemo = "hermes_xmemo.cli:main"
32
+
33
+ [project.urls]
34
+ Homepage = "https://github.com/yonro/hermes-xmemo-plugin"
35
+ Repository = "https://github.com/yonro/hermes-xmemo-plugin"
36
+ Issues = "https://github.com/yonro/hermes-xmemo-plugin/issues"
37
+
38
+ [tool.setuptools.packages.find]
39
+ where = ["src"]
40
+
41
+ [tool.setuptools.package-data]
42
+ hermes_xmemo = ["xmemo/*", "xmemo/**/*"]
43
+
44
+ [tool.setuptools_scm]
45
+ write_to = "src/hermes_xmemo/_version.py"
46
+ fallback_version = "0.0.0+unknown"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,19 @@
1
+ """XMemo Hermes memory provider — pip-installable package.
2
+
3
+ This package does not run inside Hermes directly. It ships the plugin files
4
+ and provides a small CLI that copies them into the user's Hermes plugins
5
+ directory, which is the only location Hermes scans for memory providers.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ try:
11
+ from importlib.metadata import version
12
+ __version__ = version("hermes-xmemo")
13
+ except Exception: # pragma: no cover
14
+ try:
15
+ from hermes_xmemo._version import __version__
16
+ except Exception:
17
+ __version__ = "unknown"
18
+
19
+ __all__ = ["__version__"]
@@ -0,0 +1,10 @@
1
+ """Allow ``python -m hermes_xmemo install``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+ from hermes_xmemo.install import main
8
+
9
+ if __name__ == "__main__":
10
+ sys.exit(main())
@@ -0,0 +1,24 @@
1
+ # file generated by vcs-versioning
2
+ # don't change, don't track in version control
3
+ from __future__ import annotations
4
+
5
+ __all__ = [
6
+ "__version__",
7
+ "__version_tuple__",
8
+ "version",
9
+ "version_tuple",
10
+ "__commit_id__",
11
+ "commit_id",
12
+ ]
13
+
14
+ version: str
15
+ __version__: str
16
+ __version_tuple__: tuple[int | str, ...]
17
+ version_tuple: tuple[int | str, ...]
18
+ commit_id: str | None
19
+ __commit_id__: str | None
20
+
21
+ __version__ = version = '1.0.0'
22
+ __version_tuple__ = version_tuple = (1, 0, 0)
23
+
24
+ __commit_id__ = commit_id = 'g1ef689d12'
@@ -0,0 +1,7 @@
1
+ """CLI entry point for the ``hermes-xmemo`` command."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from hermes_xmemo.install import main
6
+
7
+ __all__ = ["main"]