-
Notifications
You must be signed in to change notification settings - Fork 26
feat(install-mcp): add openclaw host adapter #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jsdevninja
wants to merge
2
commits into
vouchdev:test
Choose a base branch
from
jsdevninja:feat/openclaw-install-adapter
base: test
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Vouch — knowledge base (OpenClaw plugin) | ||
|
|
||
| This project loads vouch via the OpenClaw plugin manifest at | ||
| [`openclaw.plugin.json`](https://github.com/vouchdev/vouch/blob/main/openclaw.plugin.json) | ||
| in the vouch repo. The plugin exports the `vouch serve` MCP surface, | ||
| the four bundled slash commands (`/vouch-recall`, `/vouch-status`, | ||
| `/vouch-resolve-issue`, `/vouch-propose-from-pr`), and a trust | ||
| boundary: every write tool is review-gated, every lifecycle op is | ||
| audit-logged, and remote callers' filesystem access is confined. | ||
|
|
||
| You **cannot** write durable knowledge directly. Proposals land in | ||
| `.vouch/proposed/` and require human approval via `vouch approve`. | ||
| This is intentional. | ||
|
|
||
| - `kb_search` / `kb_context` to read. | ||
| - `kb_propose_claim` / `kb_propose_page` to suggest additions — every | ||
| claim MUST cite at least one source or evidence id. | ||
| - `kb_supersede` to replace a stale claim, `kb_contradict` to flag a | ||
| conflict for a human to resolve. | ||
|
|
||
| You are recorded as `proposed_by: openclaw` in the audit log. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # openclaw adapter | ||
|
|
||
| Two different things both go by "the OpenClaw integration": | ||
|
|
||
| 1. **Loading vouch into an OpenClaw deployment.** That's the repo-root | ||
| [`openclaw.plugin.json`](../../openclaw.plugin.json) manifest — drop | ||
| the vouch repo into a deployment that vendors plugin repos and the | ||
| loader picks up the MCP server, the four slash commands, and the | ||
| trust-boundary declaration automatically. See the README section | ||
| "Running vouch as an OpenClaw plugin". | ||
| 2. **Enabling vouch in one OpenClaw-managed project.** That's this | ||
| adapter, run with `vouch install-mcp openclaw --path <project>`. | ||
|
|
||
| The writer drops: | ||
|
|
||
| - `.openclaw/plugins.json` — declares the vouch plugin enabled for this | ||
| project (T1). | ||
| - `AGENTS.md` — a fenced snippet pointing at the plugin manifest and | ||
| summarizing the review-gate contract (T2). | ||
| - `.claude/commands/vouch-*.md` — the same four slash commands the | ||
| claude-code adapter ships, referenced in place rather than duplicated | ||
| (T3). | ||
| - `.openclaw/policy.json` — the trust boundary as project-local policy: | ||
| review-gated writes, audit-logged lifecycle ops, confined filesystem | ||
| access for remote callers (T4). | ||
|
|
||
| ```sh | ||
| vouch install-mcp openclaw --path . | ||
| ``` | ||
|
|
||
| Re-running is idempotent: existing files are left alone, and `AGENTS.md` | ||
| gets the vouch block appended once inside a fence so reruns don't | ||
| duplicate it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # OpenClaw adapter manifest. | ||
| # | ||
| # OpenClaw loads vouch as a bundle plugin via the repo-root | ||
| # `openclaw.plugin.json` manifest (see README.md "Running vouch as an | ||
| # OpenClaw plugin"). That covers the *deployment* side -- dropping the | ||
| # vouch repo into an OpenClaw install. This adapter covers the | ||
| # per-*project* side: a project that wants vouch enabled gets a small | ||
| # set of OpenClaw-native files, mirroring the claude-code adapter's tiers. | ||
| # | ||
| # T1 = `.openclaw/plugins.json` -- declares the vouch plugin enabled for | ||
| # this project (the project-local analogue of running | ||
| # `openclaw plugin enable vouch`). | ||
| # T2 = AGENTS.md fenced snippet pointing at the plugin manifest and | ||
| # summarizing the review-gate contract. | ||
| # T3 = the same four slash commands the claude-code adapter ships, | ||
| # referenced in place rather than duplicated (see | ||
| # install_adapter.py's docstring; OpenClaw's loader bundles these | ||
| # from adapters/claude-code/ directly). | ||
| # T4 = `.openclaw/policy.json` -- the trust boundary as project-local | ||
| # policy (review-gated writes, audit-logged lifecycle, confined fs). | ||
| host: openclaw | ||
| pretty: OpenClaw | ||
| fence: | ||
| begin: "<!-- BEGIN vouch -->" | ||
| end: "<!-- END vouch -->" | ||
| tiers: | ||
| T1: | ||
| - { src: plugins.json, dst: .openclaw/plugins.json } | ||
| T2: | ||
| - { src: AGENTS.md.snippet, dst: AGENTS.md, fenced_append: true } | ||
| T3: | ||
| - { src: ../claude-code/.claude/commands/vouch-recall.md, dst: .claude/commands/vouch-recall.md } | ||
| - { src: ../claude-code/.claude/commands/vouch-status.md, dst: .claude/commands/vouch-status.md } | ||
| - { src: ../claude-code/.claude/commands/vouch-resolve-issue.md, dst: .claude/commands/vouch-resolve-issue.md } | ||
| - { src: ../claude-code/.claude/commands/vouch-propose-from-pr.md, dst: .claude/commands/vouch-propose-from-pr.md } | ||
|
jsdevninja marked this conversation as resolved.
|
||
| T4: | ||
| - { src: policy.json, dst: .openclaw/policy.json } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "plugins": { | ||
| "vouch": { | ||
| "source": "github:vouchdev/vouch", | ||
| "enabled": true, | ||
|
jsdevninja marked this conversation as resolved.
|
||
| "config": { | ||
| "agent": "openclaw" | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "vouch": { | ||
| "review_gated_writes": true, | ||
| "audit_logged_lifecycle": true, | ||
| "remote_callers_filesystem": "confined", | ||
| "agent": "openclaw" | ||
|
jsdevninja marked this conversation as resolved.
|
||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.