Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Report a security vulnerability privately
url: https://github.com/Substrate-memory/hermes-substrate-wiki/security/advisories/new
url: https://github.com/Substrate-memory/Substrate-memory-plugins/security/advisories/new
about: Never disclose credentials, private data, or exploit details in a public issue.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ jobs:
--repo "$GITHUB_REPOSITORY" \
--verify-tag \
--title "substrate_wiki $tag" \
--notes "Patch release for compact user/assistant-only capture and batched history upload. Tool calls, tool results, system messages, provider metadata, and duplicate envelope fields are excluded. Targets Hermes 0.20.x. See COMPATIBILITY.md and SECURITY.md."
--notes "Patch release for explicit post-approval history consent, reliable device-poll completion, and the Substrate v5 history-only handshake. Targets Hermes 0.20.x. See COMPATIBILITY.md and SECURITY.md."
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## Unreleased

- Let hosted onboarding validate only the history replay contract, so a setup-and-upload MVP does not need to advertise entity retrieval features.
- Add an explicit `SUBSTRATE_WIKI_ORIGIN` override for isolated v5 import tests; the hosted origin remains the default.

## 2.0.5

- Make browser approval completion return an explicit history-consent action to the installing agent.
- Keep blank or interrupted consent prompts pending instead of treating them as refusal.
- Always print the complete browser approval URL while the polling installer waits.
- Support the Substrate v5 history-only capability handshake and test origin.
- Rename the public source repository to `Substrate-memory-plugins`.

## 2.0.4

- Upload only completed user/assistant text; exclude tool calls, tool results, system messages,
Expand Down
1 change: 1 addition & 0 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Compatibility has three independent axes: Hermes host, hosted Substrate capabili

| Plugin | Hermes | Required hosted capabilities | Status |
|---|---|---|---|
| 2.0.5 | 0.20.x | Same as 2.0.4; explicit post-approval history consent and v5 handshake | Contract and lifecycle integration tested |
| 2.0.4 | 0.20.x | Same as 2.0.3; compact user/assistant capture and batched history upload | Contract and lifecycle integration tested |
| 2.0.3 | 0.20.x | Same as 2.0.2; resilient approved-device polling across hosted stalls | Contract and lifecycle integration tested |
| 2.0.2 | 0.20.x | Same as 2.0.1; bounded retry for hosted tenant cold starts | Contract and lifecycle integration tested |
Expand Down
101 changes: 46 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,49 @@
# Hermes Substrate Wiki
# Substrate Memory Plugins

`substrate_wiki` is the official Hermes integration for Substrate: **the memory that decides what your agents are allowed to do**. Version `2.0.0` connects one Hermes profile to hosted Substrate at `https://app.trysubstrate.co` through a bounded, cited memory interface and durable, redacted history capture.
This public repository contains the official Substrate memory plugins. The current plugin,
`substrate_wiki` 2.0.5, connects an existing Hermes 0.20.x agent to hosted Substrate at
`https://app.trysubstrate.co`.

The broader product uses memory to ground deterministic agent permissions. **Version 2.0.0 is the memory-provider integration only:** it does not authorize actions, include the local runtime or policy compiler, or support a no-server mode. Those gaps are explicit rather than silently presented as hosted-only features.
The Substrate application and server are maintained in a separate private repository. This
repository is the canonical editable source for public plugin/client code, verified installers,
tests, documentation, and immutable release artifacts.

**This repository is the canonical editable source for the plugin.** `Substrate-v2` owns the server and HTTP contract; immutable plugin releases and their checksums are published from this repository.
## Install with an agent

## Status
Tell your Hermes agent exactly:

| Surface | Supported |
|---|---|
| Plugin | `substrate_wiki` 2.0.0 |
| Hermes host | Targets 0.20.x; standalone contract suite verified |
| Server contract | `stream-v2`, `entity-wiki-v1`, `entity-quality-v2` |
| Runtime dependencies | Python standard library only |
| License | MIT |
```text
Install the memory plug-in at https://github.com/Substrate-memory/Substrate-memory-plugins
```

Hermes 0.20.x provider discovery and setup hooks are targeted. The hosted origin is fixed; there is no local/self-hosted discovery path.
If you are the installing agent, follow the verified procedure below. Keep the installation
command running while the user approves the browser connection. Browser approval completes the
local device-code poll and returns control to the same conversation. Immediately say that the
connection succeeded, then ask:

## Install with an agent
> Do you want to import your existing Hermes conversation history into Substrate?

Give your local coding agent the URL of this README and the following instruction:
Do not select, infer, or pre-authorize the answer. Do not begin history discovery or upload until
the user explicitly answers yes. A no leaves future conversation capture enabled. A blank,
interrupted, or missing answer leaves consent pending.

```text
Install the official Substrate plugin for my existing Hermes installation by following the
"Install with an agent" section of this README exactly.

Security and consent rules:
- Install only immutable release v2.0.4 from Substrate-memory/hermes-substrate-wiki.
- Before executing downloaded code, independently verify the installer and plugin archive
against the exact SHA-256 values in the README. Never substitute a branch archive, CI
artifact, newer release, or checksum obtained only from the same download response.
- Require `hermes --version` to report 0.20.x. If Hermes is absent or a different version,
stop and tell me; do not install or upgrade Hermes yourself.
- Use the active HERMES_HOME/profile. Do not configure HERMES_API_URL or HERMES_API_KEY.
- Do not print, store, or request access tokens. The plugin's credential-custody flow owns them.
- Run the installer with `--yes --json`; add `--headless` if a browser cannot be opened.
- Immediately show me `verification_uri_complete` as the exact clickable authorization URL,
plus the one-time code. Never show `verification_uri` alone. Then wait while I approve access
in my browser; never approve access on my behalf.
- Historical upload is the only consent choice. Ask me whether to approve or decline it; do not
infer consent. Declining history must leave future capture enabled.
- After onboarding, run the content-free onboarding-status command. Report only version,
installation path, provider activation, connection phase, and import counts/status. Never
expose conversation content or credentials.
- If installation or onboarding is interrupted, rerun the same verified installer or the
documented repair command; do not create replacement credentials or import jobs unnecessarily.

Select the Bash or PowerShell procedure below for this machine. Clean up only the downloaded
installer/archive/checksum files when finished; do not remove plugin state, credentials, spool,
or checkpoints.
```
Release `v2.0.5` is not published yet. Do not run the download commands below until this
notice is removed and exact SHA-256 values replace the pending markers.

Security requirements:

The instruction deliberately leaves browser approval and history consent with the human. The agent may install and verify the plugin, but it must not make either decision.
- Install only immutable release v2.0.5 from `Substrate-memory/Substrate-memory-plugins`.
- Verify the installer and plugin archive against the exact SHA-256 values below before executing
downloaded code.
- Require `hermes --version` to report 0.20.x. Do not install or upgrade Hermes automatically.
- Use the active `HERMES_HOME` profile. Never inspect or copy another profile.
- Do not configure `HERMES_API_URL` or `HERMES_API_KEY`.
- Never print, request, or place access tokens in command arguments or logs.
- Present `verification_uri_complete` exactly when manual browser opening is needed, then keep
polling. Never approve the browser connection for the user.
- When the installer returns `action_required: history_consent`, resume this same conversation
and ask the history question above.
- Report only content-free installation, connection, and import status.

### Bash: Linux, macOS, or WSL

Expand All @@ -69,7 +60,7 @@ install_dir="$(mktemp -d)"
chmod 700 "$install_dir"
cd "$install_dir"

base='https://github.com/Substrate-memory/hermes-substrate-wiki/releases/download/v2.0.4'
base='https://github.com/Substrate-memory/Substrate-memory-plugins/releases/download/v2.0.5'
curl --fail --location --proto '=https' --tlsv1.2 --remote-name "$base/install_hermes_plugin.py"
curl --fail --location --proto '=https' --tlsv1.2 --remote-name "$base/substrate_wiki.zip"
curl --fail --location --proto '=https' --tlsv1.2 --remote-name "$base/SHA256SUMS"
Expand All @@ -79,8 +70,8 @@ import hashlib
from pathlib import Path

expected = {
"install_hermes_plugin.py": "8e37991db874b306045623c5cba39ef995b53b7b6a1a6c6f0253e2ff12c0ebb8",
"substrate_wiki.zip": "333e8b49d34bac3ace3017d3460cb42ab08d990b016c4ab20ca3e624f4117064",
"install_hermes_plugin.py": "INSTALLER_SHA256_PENDING",
"substrate_wiki.zip": "PLUGIN_SHA256_PENDING",
}
for name, digest in expected.items():
actual = hashlib.sha256(Path(name).read_bytes()).hexdigest()
Expand All @@ -95,7 +86,7 @@ PY

python3 install_hermes_plugin.py \
--archive substrate_wiki.zip \
--sha256 333e8b49d34bac3ace3017d3460cb42ab08d990b016c4ab20ca3e624f4117064 \
--sha256 PLUGIN_SHA256_PENDING \
--yes --json
```

Expand All @@ -115,17 +106,17 @@ $installDir = Join-Path ([IO.Path]::GetTempPath()) ("substrate-wiki-" + [guid]::
New-Item -ItemType Directory -Path $installDir | Out-Null
Set-Location $installDir

$base = 'https://github.com/Substrate-memory/hermes-substrate-wiki/releases/download/v2.0.4'
$base = 'https://github.com/Substrate-memory/Substrate-memory-plugins/releases/download/v2.0.5'
Invoke-WebRequest "$base/install_hermes_plugin.py" -OutFile 'install_hermes_plugin.py'
Invoke-WebRequest "$base/substrate_wiki.zip" -OutFile 'substrate_wiki.zip'
Invoke-WebRequest "$base/SHA256SUMS" -OutFile 'SHA256SUMS'

$installerSha = (Get-FileHash -Algorithm SHA256 'install_hermes_plugin.py').Hash.ToLowerInvariant()
$archiveSha = (Get-FileHash -Algorithm SHA256 'substrate_wiki.zip').Hash.ToLowerInvariant()
if ($installerSha -ne '8e37991db874b306045623c5cba39ef995b53b7b6a1a6c6f0253e2ff12c0ebb8') {
if ($installerSha -ne 'INSTALLER_SHA256_PENDING') {
throw 'Installer checksum mismatch'
}
if ($archiveSha -ne '333e8b49d34bac3ace3017d3460cb42ab08d990b016c4ab20ca3e624f4117064') {
if ($archiveSha -ne 'PLUGIN_SHA256_PENDING') {
throw 'Plugin archive checksum mismatch'
}
$published = Get-Content 'SHA256SUMS' -Raw
Expand All @@ -136,7 +127,7 @@ if (($published -notmatch [regex]::Escape($installerSha)) -or

py -3 install_hermes_plugin.py `
--archive substrate_wiki.zip `
--sha256 333e8b49d34bac3ace3017d3460cb42ab08d990b016c4ab20ca3e624f4117064 `
--sha256 PLUGIN_SHA256_PENDING `
--yes --json
```

Expand Down Expand Up @@ -166,7 +157,7 @@ Then verify the content-free state:
hermes substrate_wiki onboarding-status --json
```

Tenant credentials are stored in native credential custody, with an owner-private profile fallback; they never belong in ordinary configuration, logs, arguments, or diagnostics. See [configuration and operation](docs/operation.md) and the immutable [v2.0.4 release](https://github.com/Substrate-memory/hermes-substrate-wiki/releases/tag/v2.0.4).
Tenant credentials are stored in native credential custody, with an owner-private profile fallback; they never belong in ordinary configuration, logs, arguments, or diagnostics. See [configuration and operation](docs/operation.md) and the immutable [v2.0.5 release](https://github.com/Substrate-memory/Substrate-memory-plugins/releases/tag/v2.0.5).

## What it does

Expand All @@ -189,7 +180,7 @@ Read [SECURITY.md](SECURITY.md), [the threat model](docs/threat-model.md), [the

## Open and paid boundary

The open side is permissively licensed and includes the Hermes plugin/client, memory extraction and entity model, credential containment, privacy deletion, and policy compiler. This Hermes integration itself is hosted-only. [BOUNDARY.md](BOUNDARY.md) distinguishes the permanent commitment from the current `v2.0.4` implementation.
The open side is permissively licensed and includes the Hermes plugin/client, memory extraction and entity model, credential containment, privacy deletion, and policy compiler. This Hermes integration itself is hosted-only. [BOUNDARY.md](BOUNDARY.md) distinguishes the permanent commitment from the current `v2.0.5` implementation.

The paid hosted tier covers hosted brokerage, multi-user operation, cross-organizational graph services, audit/attestation, and insurance-backed decisions. Its meter is per authorized action, never seats. This repository does not contain or license those held services.

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Supported versions

The standalone `v2.0.0`, `v2.0.1`, `v2.0.2`, `v2.0.3`, and `v2.0.4` releases target Hermes 0.20.x and the hosted service at `https://app.trysubstrate.co`.
The standalone `v2.0.0`, `v2.0.1`, `v2.0.2`, `v2.0.3`, `v2.0.4`, and `v2.0.5` releases target Hermes 0.20.x and the hosted service at `https://app.trysubstrate.co`.
Candidate CI artifacts are not supported releases.

## Report a vulnerability
Expand Down
2 changes: 1 addition & 1 deletion docs/api-ownership.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
"response_schema": "ValidationCanaryView-v1 aggregate only"
}
],
"plugin_repository": "https://github.com/Substrate-memory/hermes-substrate-wiki",
"plugin_repository": "https://github.com/Substrate-memory/Substrate-memory-plugins",
"repository_obligations": {
"Substrate-v2": "owns implementation, authentication, validation, persistence, compatibility aliases, and concurrent support",
"hermes-substrate-wiki": "owns client shaping, origin validation, bounded requests, capability enforcement, fallback, and user-facing errors",
Expand Down
Loading
Loading