mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
docs: add OpenClaw plugin page
Add docs/content/docs/openclaw.mdx covering the bundled plugins/openclaw context-engine plugin: headroom wrap openclaw and manual install (why --dangerously-force-unsafe-install is required), contextEngine slot configuration, the option table from openclaw.plugin.json UI hints, and local development installs with launcher detection order. Register the page in the Integrations nav. Signed-off-by: LeonSGP43 <LeonSGP43@users.noreply.github.com>
This commit is contained in:
parent
5e0ce242e9
commit
32328d7ac2
2 changed files with 52 additions and 0 deletions
|
|
@ -42,6 +42,7 @@
|
|||
"opencode",
|
||||
"opencode-deepseek",
|
||||
"grok-build",
|
||||
"openclaw",
|
||||
"mcp",
|
||||
"---Configuration---",
|
||||
"configuration",
|
||||
|
|
|
|||
51
docs/content/docs/openclaw.mdx
Normal file
51
docs/content/docs/openclaw.mdx
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
title: OpenClaw
|
||||
description: Context compression plugin for OpenClaw with 70-90% token savings and optional local proxy auto-start.
|
||||
---
|
||||
|
||||
The bundled [`plugins/openclaw`](https://github.com/chopratejas/headroom/tree/main/plugins/openclaw) plugin (`@headroom-ai/openclaw`) brings Headroom compression to [OpenClaw](https://github.com/openclaw/openclaw): tool outputs, code, logs, and structured data — 70-90% token savings with zero LLM calls.
|
||||
|
||||
## Install
|
||||
|
||||
Recommended one-command setup:
|
||||
|
||||
```bash
|
||||
headroom wrap openclaw
|
||||
```
|
||||
|
||||
Manual install:
|
||||
|
||||
```bash
|
||||
pip install "headroom-ai[proxy]"
|
||||
openclaw plugins install --dangerously-force-unsafe-install headroom-ai/openclaw
|
||||
```
|
||||
|
||||
> The plugin can auto-start a local `headroom proxy` when needed. OpenClaw treats process-launching plugins as unsafe by default, so `--dangerously-force-unsafe-install` is required even if you plan to use a remote proxy — the capability is declared at install time.
|
||||
|
||||
## Configure
|
||||
|
||||
Install automatically selects the `contextEngine` slot for `headroom` on current OpenClaw releases. To switch back manually, set `plugins.slots.contextEngine` to `"legacy"` or another engine id.
|
||||
|
||||
Key options (exposed as plugin UI hints):
|
||||
|
||||
| Option | Meaning |
|
||||
|--------|---------|
|
||||
| `proxyUrl` | Optional proxy URL (e.g. `http://127.0.0.1:8787` or remote). Probe-gated before provider routing; auto-start opt-in only works for local addresses. |
|
||||
| `proxyPort` | Default port for auto-detect/auto-start when `proxyUrl` is unset (default 8787). |
|
||||
| `pythonPath` | Optional explicit python executable for the python fallback launcher. |
|
||||
| `retryMaxAttempts` | Max upstream retry attempts (connection/read/5xx) with auto-started local proxy. |
|
||||
| `connectTimeoutSeconds` | Upstream connection timeout for the auto-started proxy. |
|
||||
| `requestTimeoutMs` | Max wait for one compression request before returning original messages. |
|
||||
|
||||
## Local development install
|
||||
|
||||
When testing from the repo, build from the plugin directory so launcher detection aligns with runtime paths:
|
||||
|
||||
```bash
|
||||
cd plugins/openclaw
|
||||
npm install
|
||||
npm run build
|
||||
openclaw plugins install --dangerously-force-unsafe-install --link .
|
||||
```
|
||||
|
||||
The plugin checks launchers in this order: **PATH → local npm bin → global npm → python**, where "local npm bin" means `plugins/openclaw/node_modules/.bin/headroom` relative to the source checkout. `plugins/openclaw` also carries a no-op hook shim so OpenClaw's hook-pack fallback treats the path as valid instead of emitting a misleading `package.json missing openclaw.hooks` warning.
|
||||
Loading…
Add table
Add a link
Reference in a new issue