@oked/openclaw 0.6.20 → 0.6.21

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.
Files changed (2) hide show
  1. package/README.md +22 -35
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,14 +1,11 @@
1
1
  # @oked/openclaw
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@oked/openclaw.svg)](https://www.npmjs.com/package/@oked/openclaw)
4
- [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](./LICENSE)
5
- [![Types: included](https://img.shields.io/npm/types/@oked/openclaw.svg)](./dist/index.d.ts)
4
+ [![License: Apache-2.0](https://img.shields.io/npm/l/@oked/openclaw.svg)](./LICENSE)
6
5
 
7
- Zero-code integration for OpenClaw. Registers a `before_tool_call` hook that fires for **every** tool the OpenClaw agent calls (built-in or skill-registered), classifies it, and freezes the agent on dangerous actions until you approve from the OKed mobile app.
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
- ## Why
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, prompts for your API key + `minTier`, writes the entry into `~/.openclaw/openclaw.json`, and restarts the OpenClaw daemon.
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
- If you'd rather do it by hand:
19
+ To wire it by hand:
23
20
 
24
21
  ```bash
25
22
  openclaw plugins install --link <path-to-this-package>
@@ -43,50 +40,40 @@ Then in `~/.openclaw/openclaw.json`:
43
40
  }
44
41
  ```
45
42
 
46
- Restart the OpenClaw gateway and you're done.
43
+ 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
44
 
48
45
  ## Configuration
49
46
 
50
- All keys go under `plugins.entries.oked`:
47
+ Keys live under `plugins.entries.oked`. The plugin manifest sets `additionalProperties: false`, so only the keys in the table are accepted in `openclaw.json`. `OKED_STRICT_FAIL_CLOSED` is read from the environment, not from this object.
51
48
 
52
49
  | Key | Type | Default | Description |
53
50
  |---|---|---|---|
54
- | `apiKey` | `string` | `OKED_API_KEY` env | Your OKed API key. Required. |
55
- | `backendUrl` | `string` | `https://api.oked.ai` | Override the OKed backend URL. |
56
- | `minTier` | `"review" \| "high_stakes"` | `"review"` | Minimum risk tier that triggers approval. Set to `"high_stakes"` to only gate the most dangerous calls. `warning` is informational only and does not block. |
57
- | `alwaysApprove` | `string[]` | `[]` | Tool names to always require approval for, regardless of classifier. |
58
- | `alwaysAllow` | `string[]` | `[]` | Tool names to never gate. Use sparingly. |
59
- | `timeoutMs` | `number` | `630000` | Per-approval timeout in ms (10.5 minutes, just above the backend's 10 minute expiry). Max `1800000`. |
51
+ | `apiKey` | `string` | `OKED_API_KEY` env | OKed API key. Required. With no key, sensitive calls are denied. |
52
+ | `backendUrl` | `string` | `https://api.oked.ai` | Backend URL. |
53
+ | `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. |
54
+ | `alwaysApprove` | `string[]` | `[]` | Tool names that are always `high_stakes`, whatever the classifier says. |
55
+ | `alwaysAllow` | `string[]` | `[]` | Tool names that are always `safe`. Use sparingly. |
56
+ | `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
57
 
61
58
  ## What gets gated
62
59
 
63
- The classifier matches OpenClaw skill naming conventions:
60
+ Names are matched against OpenClaw skill conventions, then unknown names default to `review`.
64
61
 
65
- - **High stakes** (always approval): `*_send`, `*_post`, `*_publish`, `*_call`, `*_dial`, `*_charge`, `*_pay`, `*_delete`, `*_drop`, `*_deploy`, `*_release`, ...
66
- - **Review** (approval at default `minTier`): `*_create`, `*_update`, `*_write`, `*_edit`, `*_rename`, `*_modify`, and unknown tool names.
67
- - **Warning** (log / allow): lower-risk state changes from shared SDK classifiers.
68
- - **Safe** (never gated): `get_*`, `list_*`, `search_*`, `read_*`, `find_*`.
69
- - **Bash / shell / exec**: defers to the `@oked/sdk` shell classifier (`rm -rf`, `git push --force`, ...).
62
+ - **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`.
63
+ - **Review** (an approval at the default `minTier`): `create`, `update`, `write`, `edit`, `rename`, `modify`, and any tool name the classifier does not recognize.
64
+ - **Safe** (never gated): `get_*`, `list_*`, `search_*`, `read_*`, `find_*`, and the other read-style prefixes and suffixes in that file.
65
+ - **Bash / shell / exec**: deferred to the `@oked/sdk` shell classifier (`rm -rf`, `git push --force`, and the rest).
70
66
 
71
- For tool names the classifier doesn't recognize, the default tier is `review`, so they are gated by the default configuration.
67
+ `warning` is logged by the SDK classifier and does not block, even if you set `minTier` below `review`.
72
68
 
73
69
  ## Degraded-mode behavior
74
70
 
75
- Explicit denials, invalid API keys, missing API keys, and unexpected plugin errors deny sensitive tool calls. If the backend is unreachable, OKed denies `high_stakes` actions and, by default, allows lower tiers so a temporary outage does not stop every OpenClaw workflow. Set `OKED_STRICT_FAIL_CLOSED=1` to deny every sensitive action during backend outages.
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.
71
+ 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
72
 
88
73
  ## Development
89
74
 
75
+ From the repo root:
76
+
90
77
  ```bash
91
78
  npm install
92
79
  npm run build
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oked/openclaw",
3
- "version": "0.6.20",
3
+ "version": "0.6.21",
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,7 +37,7 @@
37
37
  }
38
38
  },
39
39
  "dependencies": {
40
- "@oked/sdk": "0.6.20"
40
+ "@oked/sdk": "0.6.21"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^22.13.10",