@chrysb/alphaclaw 0.9.17 → 0.9.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/lib/public/dist/app.bundle.js +1265 -1225
- package/lib/public/js/components/api-feature-panel.js +76 -0
- package/lib/public/js/components/general/index.js +6 -0
- package/lib/public/js/components/general/use-general-tab.js +69 -0
- package/lib/public/js/lib/api.js +19 -0
- package/lib/public/js/lib/storage-keys.js +4 -0
- package/lib/server/alphaclaw-config.js +99 -0
- package/lib/server/constants.js +48 -0
- package/lib/server/gateway.js +163 -1
- package/lib/server/init/register-server-routes.js +8 -0
- package/lib/server/login-throttle.js +41 -22
- package/lib/server/onboarding/openclaw.js +27 -3
- package/lib/server/routes/proxy.js +219 -1
- package/lib/server/routes/system.js +61 -0
- package/lib/server.js +35 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -158,6 +158,31 @@ The built-in watchdog monitors gateway health and recovers from failures automat
|
|
|
158
158
|
| `PORT` | Optional | Server port (default `3000`) |
|
|
159
159
|
| `ALPHACLAW_ROOT_DIR` | Optional | Data directory (default `/data`) |
|
|
160
160
|
| `TRUST_PROXY_HOPS` | Optional | Trust proxy hop count for correct client IP |
|
|
161
|
+
| `REMOTE_MCP_URL` | Optional | Upstream remote MCP server URL. When set together with `REMOTE_MCP_API_TOKEN`, AlphaClaw writes a managed `mcp.servers.<name>` entry to `openclaw.json` on every gateway start. |
|
|
162
|
+
| `REMOTE_MCP_API_TOKEN` | Optional | Bearer token for the remote MCP server. Persisted in `openclaw.json` as the `${REMOTE_MCP_API_TOKEN}` reference, never as plaintext. |
|
|
163
|
+
| `REMOTE_MCP_NAME` | Optional | Key under `mcp.servers.<name>`. Defaults to `remote`. Set it to label the entry (e.g. `sure`, `notion`). |
|
|
164
|
+
| `REMOTE_MCP_PROXY_URL` | Optional | When set, OpenClaw connects here instead of `REMOTE_MCP_URL`. Intended for a same-host scanning proxy (e.g. `pipelock mcp proxy --listen <REMOTE_MCP_PROXY_URL> --upstream <REMOTE_MCP_URL>`). Implementation is proxy-agnostic. |
|
|
165
|
+
|
|
166
|
+
## OpenAI-compatible `/v1` proxy
|
|
167
|
+
|
|
168
|
+
AlphaClaw can expose an OpenAI-compatible API surface on the same public port as the Setup UI. It is disabled by default. Enable it from the Setup UI under General -> Features -> API; the setting is persisted in `alphaclaw.json` in the OpenClaw repo so workspace sync can commit the change.
|
|
169
|
+
|
|
170
|
+
| Path | Method | Notes |
|
|
171
|
+
| ------------------------------- | ------- | ------------------------------------------------------------------ |
|
|
172
|
+
| `/v1/chat/completions` | POST | Streams when `stream: true`. Use `model: "openclaw/default"` or `openclaw/<agentId>`. |
|
|
173
|
+
| `/v1/responses` | POST | OpenClaw's `/v1/responses` surface (enabled together with chat completions). |
|
|
174
|
+
| `/v1/embeddings` | POST | Routes to OpenClaw's embeddings endpoint. |
|
|
175
|
+
| `/v1/models`, `/v1/models/<id>` | GET | Lists OpenClaw agent targets. |
|
|
176
|
+
|
|
177
|
+
When enabled, the proxy forwards requests to the loopback OpenClaw gateway. AlphaClaw requires `Authorization: Bearer <OPENCLAW_GATEWAY_TOKEN>` and rejects requests when the gateway token is missing or does not match before forwarding to OpenClaw. Failed bearer-token attempts are rate-limited before proxying. The setup-UI cookie is stripped before forwarding, hop-by-hop response headers are not passed through, and `/v1` JSON request bodies are accepted up to 50 MB. When disabled or missing from `alphaclaw.json`, `/v1` requests return 404.
|
|
178
|
+
|
|
179
|
+
**Security boundary (important).** OpenClaw treats `/v1/chat/completions` as a full operator-access surface. A caller with a valid `OPENCLAW_GATEWAY_TOKEN` can run any tool the configured agent profile allows. Treat this token like an owner credential:
|
|
180
|
+
|
|
181
|
+
- Use this surface only for trusted server-to-server callers (for example, a self-hosted app that needs OpenClaw as its external assistant).
|
|
182
|
+
- Do not hand the gateway token to end-user clients.
|
|
183
|
+
- If your front door is public (Render, Fly, fly-style PaaS), make sure `SETUP_PASSWORD` is strong and that the gateway token is held by exactly one trusted backend.
|
|
184
|
+
|
|
185
|
+
When `REMOTE_MCP_URL` + `REMOTE_MCP_API_TOKEN` are set, AlphaClaw also registers an `mcp.servers.<REMOTE_MCP_NAME>` block (default key `remote`) in `openclaw.json` so the agent can call back into that remote MCP server. Set `REMOTE_MCP_PROXY_URL` to route those callbacks through a same-host scanning proxy (for example a Pipelock MCP reverse proxy running in the same container).
|
|
161
186
|
|
|
162
187
|
## Security Notes
|
|
163
188
|
|