home / skills / plurigrid / asi / goblins-adapter

goblins-adapter skill

/skills/goblins-adapter

This skill helps you integrate ElizaOS plugins with Goblins OCapN, translating actions, providers, and services into-capability based interactions for secure,

npx playbooks add skill plurigrid/asi --skill goblins-adapter

Review the files below or copy the command above to add this skill to your agents.

Files (12)
SKILL.md
2.8 KB
---
name: openclaw-goblins-adapter
description: ElizaOS/OpenClaw → Goblins OCapN adapter (study + bridge)
version: 0.1.0
metadata:
  trit: 0
  study: elizaOS/openclaw-adapter
---

# OpenClaw → Goblins Adapter

## Study: elizaOS/openclaw-adapter

The `openclaw-adapter` bridges ElizaOS plugins into OpenClaw via:

| File | ElizaOS → OpenClaw |
|---|---|
| `action-to-tool.ts` | Action → Tool (params: JSON Schema → TypeBox) |
| `provider-to-hook.ts` | Provider → `before_agent_start` hook |
| `service-adapter.ts` | Service → Service (eager start) |
| `evaluator-to-hook.ts` | Evaluator → lifecycle hooks |
| `runtime-bridge.ts` | IAgentRuntime → RuntimeBridge shim |
| `in-memory-store.ts` | IDatabaseAdapter → LRU InMemoryStore (10K cap) |
| `schema-converter.ts` | JSON Schema → TypeBox + known wallet schemas |

**Critical pattern**: RuntimeBridge is a _shim_, not a full runtime embed.

## This Adapter: ElizaOS → Goblins OCapN

| ElizaOS | Goblins | Why |
|---|---|---|
| Action | ^action-actor | Caps = authority (not ACL) |
| Provider | ^provider-cap | Read-only attenuated ref (POLA) |
| Service | ^service-actor in vat | Isolation via event loop |
| Evaluator | ^guard-actor | Proxy composition |
| IAgentRuntime | ^vat-bridge | Transactional actor state |
| IDatabaseAdapter | Actor state (bcom) | Automatic rollback |
| JSON Schema | Syrup record descriptor | Wire-native |
| OAuth session | CapTP session (Ed25519) | Structural authority |
| /eliza route | Bootstrap object (pos 0) | Single entry point |
| Tool schema | Syrup record | ^schema-bridge |

## Security Model Upgrade

```
MCP/ElizaOS: ambient authority
  token → role → permissions → action
  (confused deputy attacks possible)

Goblins/OCapN: structural authority
  ref = authority (POLA)
  (confused deputy impossible by construction)
```

## Files

| File | LOC | Role |
|---|---|---|
| `goblins-adapter.scm` | ~350 | Core adapter (9 actor types) |
| `MAPPING.md` | ~200 | Detailed concept mapping |
| `SKILL.md` | this | Skill definition |

## GF(3)

```
Actions  = +1 (generative — create capabilities)
Providers = -1 (constraining — read-only attenuation)
Services = 0  (ergodic — background transport)
```

Adapter enforcer: registration sum ≡ 0 (mod 3).

## Usage

```scheme
(define-values (vat bridge schema session gf3)
  (spawn-goblins-adapter "my-agent" settings))

;; Register ElizaOS-shaped plugin
($ bridge register-plugin plugin-spec)

;; Invoke tool (CapTP bootstrap)
($ bridge invoke "tool-name" params)

;; Bridge MCP call → CapTP deliver
($ session mcp-call->deliver sid "tool" params)
```

## Triads

```
captp (0) ⊗ openclaw-goblins-adapter (0) ⊗ gay-mcp (+1) → needs -1
shadow-goblin (-1) ⊗ this (0) ⊗ agent-o-rama (+1) = 0 ✓
keychain-secure (-1) ⊗ this (0) ⊗ pulse-mcp-stream (+1) = 0 ✓
```

Overview

This skill is an adapter that bridges ElizaOS/OpenClaw plugins into the Goblins OCapN world. It maps ElizaOS concepts (actions, providers, services, evaluators, runtime and schemas) to Goblins capability-oriented actors and wire-native descriptors, upgrading the security model from ambient to structural authority. The adapter is implemented as a lightweight runtime shim that preserves transactional actor state and automatic rollback for database-backed stores.

How this skill works

The adapter exposes a vat/bridge that registers ElizaOS-shaped plugins and exposes tools over CapTP. It converts JSON Schema to Syrup record descriptors and translates Eliza action/provider/service/evaluator primitives into Goblins actor types and attenuated capability refs. A RuntimeBridge shim mediates MCP calls into CapTP deliveries while an in-memory LRU store and actor state provide persistence with rollback semantics.

When to use it

  • You need to run ElizaOS/OpenClaw plugins inside a Goblins OCapN environment.
  • You want to replace ambient token/role-based authority with capability-based structural authority.
  • You require transactional actor state, automatic rollback, and isolated service actors.
  • You need wire-native schema descriptors (Syrup) for cross-vat interoperability.
  • You want to bootstrap CapTP sessions from OAuth-like sessions using Ed25519 keys.

Best practices

  • Register plugins through the bridge bootstrap entry to keep a single, auditable entry point.
  • Model read-only integrations as provider caps to follow the Principle of Least Authority (POLA).
  • Run long-running work as service actors inside vats to isolate event loops and avoid blocking.
  • Use the adapter’s JSON Schema → Syrup conversion to maintain native wire schemas and avoid ad-hoc serializers.
  • Treat the RuntimeBridge as a shim: do not assume full runtime embedding or direct runtime API parity.

Example use cases

  • Porting an OpenClaw action set into Goblins by converting actions to ^action-actor capabilities.
  • Attenuating third-party data access by exposing provider refs instead of ambient tokens.
  • Bootstrapping user sessions over CapTP where OAuth-like sessions map to CapTP Ed25519 sessions.
  • Running evaluators as ^guard-actor proxies to compose policy checks and lifecycle hooks.
  • Using the adapter in an MCP pipeline to translate MCP calls into CapTP deliveries for guarded tools.

FAQ

Does the adapter embed the full OpenClaw runtime?

No. The RuntimeBridge is a shim that mediates calls and state; it does not fully embed the original runtime.

How are schemas handled between systems?

JSON Schema is converted to Syrup record descriptors so schemas are wire-native and compatible with Goblins transports.