Compare commits
2 Commits
0a224983fd
...
0c6d8bb2c5
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c6d8bb2c5 | |||
| 6792249a0b |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
|
dist/
|
||||||
.env
|
.env
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.log
|
*.log
|
||||||
|
|||||||
5
Makefile
5
Makefile
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: check check-rules test-api up down smoke render-config
|
.PHONY: check check-rules test-api up down smoke render-config package-plugin
|
||||||
|
|
||||||
check:
|
check:
|
||||||
cd plugin && npm run check
|
cd plugin && npm run check
|
||||||
@@ -20,3 +20,6 @@ smoke:
|
|||||||
|
|
||||||
render-config:
|
render-config:
|
||||||
node scripts/render-openclaw-config.mjs
|
node scripts/render-openclaw-config.mjs
|
||||||
|
|
||||||
|
package-plugin:
|
||||||
|
node scripts/package-plugin.mjs
|
||||||
|
|||||||
17
README.md
17
README.md
@@ -19,11 +19,26 @@ The no-reply provider returns `NO_REPLY` for any input.
|
|||||||
|
|
||||||
- `plugin/` — OpenClaw plugin (before_model_resolve hook)
|
- `plugin/` — OpenClaw plugin (before_model_resolve hook)
|
||||||
- `no-reply-api/` — OpenAI-compatible minimal API that always returns `NO_REPLY`
|
- `no-reply-api/` — OpenAI-compatible minimal API that always returns `NO_REPLY`
|
||||||
- `docs/` — rollout and configuration notes
|
- `docs/` — rollout, integration, run-mode notes
|
||||||
- `scripts/` — smoke/dev/helper checks
|
- `scripts/` — smoke/dev/helper checks
|
||||||
- `Makefile` — common dev commands (`make check`, `make check-rules`, `make test-api`, `make up`)
|
- `Makefile` — common dev commands (`make check`, `make check-rules`, `make test-api`, `make up`)
|
||||||
- `CHANGELOG.md` — milestone summary
|
- `CHANGELOG.md` — milestone summary
|
||||||
|
|
||||||
|
## Quick start (no Docker)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd no-reply-api
|
||||||
|
node server.mjs
|
||||||
|
```
|
||||||
|
|
||||||
|
Then render config snippet:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
node scripts/render-openclaw-config.mjs
|
||||||
|
```
|
||||||
|
|
||||||
|
See `docs/RUN_MODES.md` for Docker mode.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Development plan (incremental commits)
|
## Development plan (incremental commits)
|
||||||
|
|||||||
27
docs/RELEASE.md
Normal file
27
docs/RELEASE.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# Release / Packaging
|
||||||
|
|
||||||
|
## Package plugin files
|
||||||
|
|
||||||
|
```bash
|
||||||
|
node scripts/package-plugin.mjs
|
||||||
|
```
|
||||||
|
|
||||||
|
Output:
|
||||||
|
|
||||||
|
- `dist/plugin/index.ts`
|
||||||
|
- `dist/plugin/rules.ts`
|
||||||
|
- `dist/plugin/openclaw.plugin.json`
|
||||||
|
- `dist/plugin/README.md`
|
||||||
|
- `dist/plugin/package.json`
|
||||||
|
|
||||||
|
## Use packaged plugin path
|
||||||
|
|
||||||
|
Point OpenClaw `plugins.load.paths` to:
|
||||||
|
|
||||||
|
`/absolute/path/to/WhisperGate/dist/plugin`
|
||||||
|
|
||||||
|
## Verify package completeness
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd plugin && npm run check
|
||||||
|
```
|
||||||
35
docs/RUN_MODES.md
Normal file
35
docs/RUN_MODES.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# Run Modes
|
||||||
|
|
||||||
|
WhisperGate has two runtime components:
|
||||||
|
|
||||||
|
1. `plugin/` (OpenClaw plugin)
|
||||||
|
2. `no-reply-api/` (deterministic NO_REPLY service)
|
||||||
|
|
||||||
|
Docker is optional.
|
||||||
|
|
||||||
|
## Mode A (recommended): No Docker
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd no-reply-api
|
||||||
|
node server.mjs
|
||||||
|
```
|
||||||
|
|
||||||
|
Then configure OpenClaw provider `baseURL` to `http://127.0.0.1:8787/v1`.
|
||||||
|
|
||||||
|
## Mode B: Docker
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/dev-up.sh
|
||||||
|
# or: docker compose up -d --build whispergate-no-reply-api
|
||||||
|
```
|
||||||
|
|
||||||
|
Stop:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/dev-down.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Security notes
|
||||||
|
|
||||||
|
- Bind API to loopback/private network.
|
||||||
|
- If exposed beyond localhost, set `AUTH_TOKEN`.
|
||||||
15
scripts/package-plugin.mjs
Normal file
15
scripts/package-plugin.mjs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import fs from "node:fs";
|
||||||
|
import path from "node:path";
|
||||||
|
|
||||||
|
const root = process.cwd();
|
||||||
|
const pluginDir = path.join(root, "plugin");
|
||||||
|
const outDir = path.join(root, "dist", "plugin");
|
||||||
|
|
||||||
|
fs.rmSync(outDir, { recursive: true, force: true });
|
||||||
|
fs.mkdirSync(outDir, { recursive: true });
|
||||||
|
|
||||||
|
for (const f of ["index.ts", "rules.ts", "openclaw.plugin.json", "README.md", "package.json"]) {
|
||||||
|
fs.copyFileSync(path.join(pluginDir, f), path.join(outDir, f));
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`packaged plugin to ${outDir}`);
|
||||||
Reference in New Issue
Block a user