@oked/openclaw 0.6.20 → 0.6.22
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 +21 -36
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
# @oked/openclaw
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@oked/openclaw)
|
|
4
|
-
[](./dist/index.d.ts)
|
|
4
|
+
[](./LICENSE)
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
OpenClaw plugin. A `before_tool_call` hook runs for every tool the host reports (built-in or registered by a skill), classifies it, and holds `review` and `high_stakes` calls until you approve in Telegram or on the [web dashboard](https://oked.ai/dashboard). The iPhone app is coming soon.
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
OpenClaw's built-in iOS approvals cover **shell commands** (`exec.approval.*`). They do **not** automatically cover the skill / plugin tools agents actually use to touch the real world (sending iMessages, making phone calls, deploying sites, charging cards). Skill authors have to opt in to `plugin.approval.request`, and most don't. This plugin closes that gap.
|
|
8
|
+
Optional peer dependency: `openclaw` >= 2026.4.20. A denial returns `{ block: true, blockReason }` instead of throwing. The plugin source says OpenClaw 2026.5.4 and later treat that return value as a veto and show the reason to the agent. An earlier host ignored the return and ran the tool.
|
|
12
9
|
|
|
13
10
|
## Install
|
|
14
11
|
|
|
@@ -17,9 +14,9 @@ npm install -g @oked/openclaw @oked/openclaw-cli
|
|
|
17
14
|
oked-openclaw init
|
|
18
15
|
```
|
|
19
16
|
|
|
20
|
-
The CLI ([`@oked/openclaw-cli`](../openclaw-cli)) runs `openclaw plugins install --link` against this package,
|
|
17
|
+
The CLI ([`@oked/openclaw-cli`](../openclaw-cli)) needs the `openclaw` command on your PATH. It runs `openclaw plugins install --link` against this package, pairs this device (or reuses an existing API key), sets `minTier` (a terminal prompt when none is set), writes the entry into `~/.openclaw/openclaw.json`, and offers to restart the gateway.
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
To wire it by hand:
|
|
23
20
|
|
|
24
21
|
```bash
|
|
25
22
|
openclaw plugins install --link <path-to-this-package>
|
|
@@ -35,7 +32,6 @@ Then in `~/.openclaw/openclaw.json`:
|
|
|
35
32
|
"oked": {
|
|
36
33
|
"enabled": true,
|
|
37
34
|
"apiKey": "ok_...",
|
|
38
|
-
"backendUrl": "https://api.oked.ai",
|
|
39
35
|
"minTier": "review"
|
|
40
36
|
}
|
|
41
37
|
}
|
|
@@ -43,50 +39,39 @@ Then in `~/.openclaw/openclaw.json`:
|
|
|
43
39
|
}
|
|
44
40
|
```
|
|
45
41
|
|
|
46
|
-
Restart the OpenClaw gateway
|
|
42
|
+
Restart the OpenClaw gateway after a manual edit. [Sign up](https://oked.ai/signup) if you do not have a key yet. The same dashboard is also served at [app.oked.ai/dashboard](https://app.oked.ai/dashboard/).
|
|
47
43
|
|
|
48
44
|
## Configuration
|
|
49
45
|
|
|
50
|
-
|
|
46
|
+
Keys live under `plugins.entries.oked`. The plugin manifest sets `additionalProperties: false`, so unknown keys are rejected. `OKED_STRICT_FAIL_CLOSED` is read from the environment, not from this object.
|
|
51
47
|
|
|
52
48
|
| Key | Type | Default | Description |
|
|
53
49
|
|---|---|---|---|
|
|
54
|
-
| `apiKey` | `string` | `OKED_API_KEY` env |
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `timeoutMs` | `number` | `630000` | Per-approval timeout in ms (10.5 minutes, just above the backend's 10 minute expiry). Max `1800000`. |
|
|
50
|
+
| `apiKey` | `string` | `OKED_API_KEY` env | OKed API key. Required. With no key, sensitive calls are denied. |
|
|
51
|
+
| `minTier` | `"safe" \| "warning" \| "review" \| "high_stakes"` | `"review"` | Lowest tier that can ask for approval. `warning` never blocks: only `review` and `high_stakes` do. Env `OKED_MIN_TIER` is the fallback when the config value is absent. |
|
|
52
|
+
| `alwaysApprove` | `string[]` | `[]` | Tool names that are always `high_stakes`, whatever the classifier says. |
|
|
53
|
+
| `alwaysAllow` | `string[]` | `[]` | Tool names that are always `safe`. Use sparingly. |
|
|
54
|
+
| `timeoutMs` | `number` | `630000` | Per-approval wait, in milliseconds (10.5 minutes, so the backend's 10 minute expiry answers first). Minimum `1000`, maximum `1800000`. |
|
|
60
55
|
|
|
61
56
|
## What gets gated
|
|
62
57
|
|
|
63
|
-
|
|
58
|
+
Names are matched against OpenClaw skill conventions, then unknown names default to `review`.
|
|
64
59
|
|
|
65
|
-
- **High stakes** (always approval):
|
|
66
|
-
- **Review** (approval at default `minTier`):
|
|
67
|
-
- **
|
|
68
|
-
- **
|
|
69
|
-
- **Bash / shell / exec**: defers to the `@oked/sdk` shell classifier (`rm -rf`, `git push --force`, ...).
|
|
60
|
+
- **High stakes** (always an approval at the default `minTier`): names that send, post, publish, call, dial, charge, pay, delete, drop, deploy, or release, among the patterns in `src/classify-openclaw.ts`.
|
|
61
|
+
- **Review** (an approval at the default `minTier`): `create`, `update`, `write`, `edit`, `rename`, `modify`, and any tool name the classifier does not recognize.
|
|
62
|
+
- **Safe** (never gated): `get_*`, `list_*`, `search_*`, `read_*`, `find_*`, and the other read-style prefixes and suffixes in that file.
|
|
63
|
+
- **Bash / shell / exec**: deferred to the `@oked/sdk` shell classifier (`rm -rf`, `git push --force`, and the rest).
|
|
70
64
|
|
|
71
|
-
|
|
65
|
+
`warning` is logged by the SDK classifier and does not block, even if you set `minTier` below `review`.
|
|
72
66
|
|
|
73
67
|
## Degraded-mode behavior
|
|
74
68
|
|
|
75
|
-
Explicit denials, invalid API keys, missing API
|
|
76
|
-
|
|
77
|
-
## Comparison to OpenClaw built-in approvals
|
|
78
|
-
|
|
79
|
-
| | OpenClaw `exec.approval.*` | `@oked/openclaw` |
|
|
80
|
-
|---|---|---|
|
|
81
|
-
| Shell commands | OK | OK (via classifier) |
|
|
82
|
-
| Skill / plugin tools | Only if skill author opts in | OK all tools |
|
|
83
|
-
| Mobile push | iOS app paired via `device-pairing` | OKed mobile app, unified across Claude Code + OpenClaw + future tools |
|
|
84
|
-
| Audit log | Gateway-local | Centralized OKed dashboard |
|
|
85
|
-
|
|
86
|
-
Use both. OpenClaw's exec approvals stay in place; this plugin layers on top to cover the skill surface.
|
|
69
|
+
Explicit denials, invalid API keys, a missing API key, receipts that do not verify, and unexpected plugin errors deny the tool call. If the backend is unreachable, OKed denies `high_stakes` and, by default, allows lower tiers. Set `OKED_STRICT_FAIL_CLOSED=1` to deny every sensitive action during an outage.
|
|
87
70
|
|
|
88
71
|
## Development
|
|
89
72
|
|
|
73
|
+
From the repo root:
|
|
74
|
+
|
|
90
75
|
```bash
|
|
91
76
|
npm install
|
|
92
77
|
npm run build
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oked/openclaw",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.22",
|
|
4
4
|
"description": "OKed plugin for OpenClaw. Gates skill and tool calls behind a human approval push to your phone.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@oked/sdk": "0.6.
|
|
40
|
+
"@oked/sdk": "0.6.22"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@types/node": "^
|
|
44
|
-
"typescript": "^
|
|
43
|
+
"@types/node": "^26.6.5",
|
|
44
|
+
"typescript": "^7.0.2"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|
|
47
47
|
"openclaw",
|