feat(oc-plugin): add MACP ACP runtime backend
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed

This commit is contained in:
Jarvis
2026-03-29 22:48:55 -05:00
parent 472f046a85
commit 01259f56cd
8 changed files with 957 additions and 0 deletions

46
plugins/macp/README.md Normal file
View File

@@ -0,0 +1,46 @@
# MACP OpenClaw Plugin
This plugin registers a new OpenClaw ACP runtime backend named `macp`.
When OpenClaw calls `sessions_spawn(runtime: "macp", agentId: "pi")`, the plugin runs a Pi agent turn in-process using the MACP Pi runner logic and streams Pi output back as ACP runtime events.
## Current behavior
- Supports `agentId: "pi"` only
- Supports ACP `mode: "oneshot"` only
- Rejects persistent ACP sessions
- Reuses the Pi default tools from `tools/macp/dispatcher/pi_runner.ts`
## Install in OpenClaw
Add the plugin entry to your OpenClaw config:
```json
{
"plugins": ["~/src/mosaic-mono-v1/plugins/macp/src/index.ts"]
}
```
## Optional config
```json
{
"plugins": [
{
"source": "~/src/mosaic-mono-v1/plugins/macp/src/index.ts",
"config": {
"defaultModel": "openai/gpt-5-mini",
"systemPrompt": "You are Pi running via MACP.",
"timeoutMs": 300000,
"logDir": "~/.openclaw/state/macp"
}
}
]
}
```
## Verification
```bash
pnpm exec tsc --noEmit -p plugins/macp/tsconfig.json
```