Commit a3eff0e
feat: agentmask + service discovery infrastructure (#952)
## Summary
- Lands the (current state of) Erik's `rekm/agentmask` branch as base
(agentmask vats, OpenClaw MetaMask vendor plugin, capability schema
discovery) onto `main`
- Adds service-discovery type vocabulary, service matcher, sample
services (Echo, RandomNumber), and a bridge that wires an LLM into the
matcher's ranker
- Adds openclaw service discovery plugin with skill, tools, and
validation plan
- Plus assorted relay/daemon/kernel-cli improvements and fixes
Important caveat: this _requires_ using the updated version of the
MetaMask browser extension (Erik's updates to put the ocap kernel into
it and then some further stuff I needed to add on top of that) in the
`chip/agentmask` branch of the `metamask-extension` repo. While the
changes this PR represents are being proposed for merging into our
`main` branch, we don't really have that option for the browser
extension since it's not our repo to mess with. (I suppose we _could_
merge it with some negotiation with the MetaMake team, but since it's
highly experimental I'm pretty sure they wouldn't be too keen on that
idea. I believe Erik's plan was to eventually have it in under a flag,
but I don't thing that's yet an option.)
## Test plan
- [ ] Follow the procedure in
`packages/agentmask/openclaw-plugin-discovery/VALIDATION.md` end-to-end
(matcher daemon and LLM service consumer on VPS, sample services +
MetaMask browser extension (providing MetaMask services) on laptop,
OpenClaw agent driving discovery and contact)
- [ ] Verify (peerId, providerTag) re-registration dedup by reloading
the MetaMask extension and confirming the matcher evicts the prior
provider entry
- [ ] Verify cold-start path: full reset of all parts, then exercise
discovery / find-services / call-service
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Large new surface (remote OCAP URLs, LLM-ranked matcher, wallet
signing) depends on experimental MetaMask extension work and correct
multi-daemon/relay setup; misconfiguration can orphan daemons or expose
broad host API proxy behavior documented as MVP.
>
> **Overview**
> Introduces **`@ocap/agentmask`** as the home for AgentMask/OpenClaw
integration: long-form docs (capability vendor, two-way kernel comms,
host developer guide), a **MetaMask vendor** plugin (`metamask_*` tools
over `ocap daemon`), and a **service discovery** plugin (`discovery_*` /
`service_*` tools) with session state, shared CLI spawning layer,
skills, and Vitest coverage.
>
> Extends **`kernel-cli`** for multi-daemon workflows: global
**`--home`**, relay **`--public-ip`** / separate **`~/.libp2p-relay`**
bookkeeping, and stricter daemon startup when another process already
owns the same home or socket.
>
> Small repo hygiene: **Yarn** `httpProxy`/`httpsProxy` from
`HTTPS_PROXY`, and **Claude** sandbox allowances for Yarn/npm and local
Unix sockets.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
b609e24. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 052f4d4 commit a3eff0e
132 files changed
Lines changed: 12612 additions & 560 deletions
File tree
- .claude
- packages
- agentmask
- docs
- openclaw-plugin-discovery
- skills/discovery
- tools
- openclaw-plugin-metamask
- skills/metamask
- tools
- src
- test
- kernel-cli
- src
- commands
- kernel-node-runtime
- src/daemon
- kernel-utils
- src
- nodejs
- llm-bridge
- src
- ocap-kernel
- src
- remotes/kernel
- vats
- sample-services
- scripts
- src
- echo-service
- random-number-service
- vat-lib
- service-discovery-types
- docs
- src
- service-matcher
- scripts
- src
- matcher-vat
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
16 | 25 | | |
17 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
9 | 17 | | |
10 | 18 | | |
11 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Large diffs are not rendered by default.
0 commit comments