Tools
Jevclaw
Plugin for enabling the use of Jev with Openclaw
Install
npm install
npm
README
# Jevclaw
Jevclaw is a small OpenClaw native plugin that observes inbound requests and tool calls, asks [Jev](https://typesafe.ai/) to classify requests, and writes compact audit events. Version 0.1 is deliberately **shadow-only**: classifications are telemetry. They do not change agent dispatch, rewrite prompts or tool parameters, block tools, or request approvals.
## Routes
The route vocabulary is fixed:
- `direct` — answer without external context
- `memory` — recall user or conversation context
- `web_research` — substantive/current/multi-source research
- `cheap_research` — quick lookup or fetch
- `developer` — code and software-development work
- `clarification` — ask for missing information
Jevclaw also records a local fallback classification. When Jev is unavailable, times out, or is not configured, OpenClaw continues normally and the audit event records the Jev status.
## Install
Requires Node.js 20+ and an OpenClaw host compatible with plugin API `2026.9.5` or newer.
```sh
git clone https://github.com/kylejschultz/jevclaw.git
cd jevclaw
npm install
npm run build
openclaw plugins install --link .
```
Set the API key in the OpenClaw process environment (do not put it in plugin config):
```sh
export TYPESAFE_API_KEY='...'
```
Then enable/configure the plugin in OpenClaw:
```json5
{
plugins: {
entries: {
jevclaw: {
enabled: true,
config: {
timeoutMs: 1500,
maxInputChars: 2000,
auditPath: "/var/log/openclaw/jevclaw.jsonl"
}
}
}
}
}
```
`model` is an optional Jev model override. `TYPESAFE_BASE_URL` may override the SDK endpoint. If `auditPath` is omitted, events go through the OpenClaw plugin logger.
## Privacy and audit data
By default, only the first 2,000 characters of the current inbound request are sent to Jev. Common bearer tokens, credential assignments, API-key query parameters, `sk-` tokens, and private-key blocks are redacted first. No transcript, stored memory, attachment content, tool parameters, or tool results are sent. Jev SDK body logging is disabled and retries are disabled to keep observation bounded. Redaction is best-effort; arbitrary secrets embedded in natural language cannot be identified reliably, so do not send credentials in chat.
Audit rows contain correlation metadata, character counts, route/status/confidence, tool names, and at most 20 tool parameter **keys**. They do not contain request text or parameter values. Protect a configured JSONL path as operational metadata; new files are requested with mode `0600` (existing-file permissions are unchanged).
Audit writes are fire-and-forget so logging latency or failure cannot turn the `before_tool_call` observation hook into a tool gate.
## Limitations
- Runtime behavior has been checked against the published OpenClaw TypeScript API, but this project does not claim compatibility with every OpenClaw runtime or harness.
- `before_dispatch` is bounded by the configured 100–5,000 ms SDK timeout. Host hook deadlines still apply.
- Tool scope classification is name-based and observational.
- Local fallback routing is intentionally simple and English-oriented.
- Concurrent JSONL appends are not a transactional audit database.
## Roadmap
Future versions may evaluate opt-in dispatch recommendations, richer policy controls, and operational metrics after privacy and runtime semantics are validated. This v0.1 intentionally excludes compaction, an approval engine, prompt-injection detection, dashboards, and model replacement.
## Development
```sh
npm test
npm run typecheck
npm run build
```
No Jev API key is required for tests.
tools
Comments
Sign in to leave a comment