Mock gateway
For quick looks, the app’s built-in demo is enough. For the full protocol, including Gateway Settings and plugins, run the Node mock in mock-gateway/.
Start it
Section titled “Start it”cd mock-gateway && npm installnpm start # ws://127.0.0.1:18789, token "dev-token"MOCK_TOKEN= MOCK_BACKGROUND=1 npm start # no auth, simulated Discord trafficThen add ws://127.0.0.1:18789 in Pincer with the token dev-token.
Options
Section titled “Options”| Variable | Default | Effect |
|---|---|---|
HOST |
127.0.0.1 |
Address to listen on. |
PORT |
18789 |
Port to listen on. |
MOCK_TOKEN |
dev-token |
Gateway token. Set it empty for no auth. |
MOCK_PAIRING |
auto |
auto approves new devices after about 3 seconds, off accepts them right away, manual waits for you to type the requestId. |
MOCK_BACKGROUND |
off | Set to 1 for simulated Discord traffic. |
Message triggers
Section titled “Message triggers”| Include this word | What happens |
|---|---|
tool, disk |
Streams a tool call. |
image |
Streams a tool call and attaches an image. |
approve |
Raises an exec approval. |
plan |
Walks a three-step progress card. |
[mock:fail-send] |
Refuses the chat.send with UNAVAILABLE, for testing failed sends. |
[mock:drop] |
Closes the connection. The client reconnects after its backoff. |
Config and plugins
Section titled “Config and plugins”The mock serves a small config and plugin catalog for Gateway Settings. It supports config.get, config.schema, config.patch, config.set and config.apply, with redacted secrets, validation issues and restart hints, plus the plugins.* methods. Writes need the operator.admin scope, so set Access to Full Management.
Selftest and live checks
Section titled “Selftest and live checks”The mock has its own selftest, and it is the target for Pincer’s live end-to-end checks. CI runs both.
cd mock-gateway && npm ci && npm run selftest
# in another terminal, with the mock running:PINCER_KEYCHAIN=memory swift run PincerChecks --live ws://127.0.0.1:18789 dev-tokenThe unit tests (swift test) don’t need the mock: they never open a socket. See Building from source.
See mock-gateway/README.md for everything else.