@oked/openclaw 0.1.0 → 0.1.3

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 OKed
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OKed
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,98 +1,98 @@
1
- # @oked/openclaw
2
-
3
- [![npm version](https://img.shields.io/npm/v/@oked/openclaw.svg)](https://www.npmjs.com/package/@oked/openclaw)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)
5
- [![Types: included](https://img.shields.io/npm/types/@oked/openclaw.svg)](./dist/index.d.ts)
6
-
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.
8
-
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.
12
-
13
- ## Install
14
-
15
- ```bash
16
- npm install -g @oked/openclaw @oked/openclaw-cli
17
- oked-openclaw init
18
- ```
19
-
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.
21
-
22
- If you'd rather do it by hand:
23
-
24
- ```bash
25
- openclaw plugins install --link <path-to-this-package>
26
- ```
27
-
28
- Then in `~/.openclaw/openclaw.json`:
29
-
30
- ```json
31
- {
32
- "plugins": {
33
- "allow": ["oked"],
34
- "entries": {
35
- "oked": {
36
- "enabled": true,
37
- "apiKey": "ok_...",
38
- "backendUrl": "https://api.oked.ai",
39
- "minTier": "review"
40
- }
41
- }
42
- }
43
- }
44
- ```
45
-
46
- Restart the OpenClaw gateway and you're done.
47
-
48
- ## Configuration
49
-
50
- All keys go under `plugins.entries.oked`:
51
-
52
- | Key | Type | Default | Description |
53
- |---|---|---|---|
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` | `300000` | Per-approval timeout in ms. |
60
-
61
- ## What gets gated
62
-
63
- The classifier matches OpenClaw skill naming conventions:
64
-
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`, ...).
70
-
71
- For tool names the classifier doesn't recognize, the default tier is `review`, so they are gated by the default configuration.
72
-
73
- ## Degraded-mode behavior
74
-
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.
87
-
88
- ## Development
89
-
90
- ```bash
91
- npm install
92
- npm run build
93
- npm test
94
- ```
95
-
96
- ## License
97
-
98
- [MIT](./LICENSE)
1
+ # @oked/openclaw
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@oked/openclaw.svg)](https://www.npmjs.com/package/@oked/openclaw)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)
5
+ [![Types: included](https://img.shields.io/npm/types/@oked/openclaw.svg)](./dist/index.d.ts)
6
+
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.
8
+
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.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ npm install -g @oked/openclaw @oked/openclaw-cli
17
+ oked-openclaw init
18
+ ```
19
+
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.
21
+
22
+ If you'd rather do it by hand:
23
+
24
+ ```bash
25
+ openclaw plugins install --link <path-to-this-package>
26
+ ```
27
+
28
+ Then in `~/.openclaw/openclaw.json`:
29
+
30
+ ```json
31
+ {
32
+ "plugins": {
33
+ "allow": ["oked"],
34
+ "entries": {
35
+ "oked": {
36
+ "enabled": true,
37
+ "apiKey": "ok_...",
38
+ "backendUrl": "https://api.oked.ai",
39
+ "minTier": "review"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ Restart the OpenClaw gateway and you're done.
47
+
48
+ ## Configuration
49
+
50
+ All keys go under `plugins.entries.oked`:
51
+
52
+ | Key | Type | Default | Description |
53
+ |---|---|---|---|
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` | `300000` | Per-approval timeout in ms. |
60
+
61
+ ## What gets gated
62
+
63
+ The classifier matches OpenClaw skill naming conventions:
64
+
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`, ...).
70
+
71
+ For tool names the classifier doesn't recognize, the default tier is `review`, so they are gated by the default configuration.
72
+
73
+ ## Degraded-mode behavior
74
+
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.
87
+
88
+ ## Development
89
+
90
+ ```bash
91
+ npm install
92
+ npm run build
93
+ npm test
94
+ ```
95
+
96
+ ## License
97
+
98
+ [MIT](./LICENSE)
@@ -1,73 +1,73 @@
1
- {
2
- "id": "oked",
3
- "name": "OKed",
4
- "description": "Human approval layer for AI agents - freezes the agent before sensitive tool calls and asks for human approval via Telegram or the OKed dashboard.",
5
- "activation": {
6
- "onStartup": true
7
- },
8
- "configSchema": {
9
- "type": "object",
10
- "additionalProperties": false,
11
- "properties": {
12
- "enabled": {
13
- "type": "boolean"
14
- },
15
- "apiKey": {
16
- "type": "string"
17
- },
18
- "backendUrl": {
19
- "type": "string"
20
- },
21
- "minTier": {
22
- "type": "string",
23
- "enum": ["safe", "warning", "review", "high_stakes"],
24
- "default": "review"
25
- },
26
- "alwaysApprove": {
27
- "type": "array",
28
- "items": { "type": "string" }
29
- },
30
- "alwaysAllow": {
31
- "type": "array",
32
- "items": { "type": "string" }
33
- },
34
- "timeoutMs": {
35
- "type": "integer",
36
- "minimum": 1000,
37
- "maximum": 600000
38
- }
39
- }
40
- },
41
- "uiHints": {
42
- "enabled": {
43
- "label": "OKed Approvals",
44
- "help": "Globally enable or pause the OKed approval gate."
45
- },
46
- "apiKey": {
47
- "label": "OKed API Key",
48
- "placeholder": "ok_...",
49
- "help": "Your OKed API key from https://app.oked.ai/dashboard."
50
- },
51
- "backendUrl": {
52
- "label": "Backend URL",
53
- "placeholder": "https://api.oked.ai",
54
- "help": "Override the OKed backend URL. Default is the hosted backend."
55
- },
56
- "minTier": {
57
- "label": "Minimum Approval Tier",
58
- "help": "Lowest risk tier that requires human approval. Use 'review' to gate everything except clearly safe reads, 'warning' for state-changing actions only, or 'high_stakes' for the most dangerous calls only."
59
- },
60
- "alwaysApprove": {
61
- "label": "Always Require Approval",
62
- "help": "Tool names that should always require approval, regardless of the classifier."
63
- },
64
- "alwaysAllow": {
65
- "label": "Always Allow",
66
- "help": "Tool names to never gate. Use sparingly."
67
- },
68
- "timeoutMs": {
69
- "label": "Approval Timeout (ms)",
70
- "help": "How long to wait for a human decision before the action is denied. Defaults to the SDK's value."
71
- }
72
- }
73
- }
1
+ {
2
+ "id": "oked",
3
+ "name": "OKed",
4
+ "description": "Human approval layer for AI agents - freezes the agent before sensitive tool calls and asks for human approval via Telegram or the OKed dashboard.",
5
+ "activation": {
6
+ "onStartup": true
7
+ },
8
+ "configSchema": {
9
+ "type": "object",
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "enabled": {
13
+ "type": "boolean"
14
+ },
15
+ "apiKey": {
16
+ "type": "string"
17
+ },
18
+ "backendUrl": {
19
+ "type": "string"
20
+ },
21
+ "minTier": {
22
+ "type": "string",
23
+ "enum": ["safe", "warning", "review", "high_stakes"],
24
+ "default": "review"
25
+ },
26
+ "alwaysApprove": {
27
+ "type": "array",
28
+ "items": { "type": "string" }
29
+ },
30
+ "alwaysAllow": {
31
+ "type": "array",
32
+ "items": { "type": "string" }
33
+ },
34
+ "timeoutMs": {
35
+ "type": "integer",
36
+ "minimum": 1000,
37
+ "maximum": 600000
38
+ }
39
+ }
40
+ },
41
+ "uiHints": {
42
+ "enabled": {
43
+ "label": "OKed Approvals",
44
+ "help": "Globally enable or pause the OKed approval gate."
45
+ },
46
+ "apiKey": {
47
+ "label": "OKed API Key",
48
+ "placeholder": "ok_...",
49
+ "help": "Your OKed API key from https://app.oked.ai/dashboard."
50
+ },
51
+ "backendUrl": {
52
+ "label": "Backend URL",
53
+ "placeholder": "https://api.oked.ai",
54
+ "help": "Override the OKed backend URL. Default is the hosted backend."
55
+ },
56
+ "minTier": {
57
+ "label": "Minimum Approval Tier",
58
+ "help": "Lowest risk tier that requires human approval. Use 'review' to gate everything except clearly safe reads, 'warning' for state-changing actions only, or 'high_stakes' for the most dangerous calls only."
59
+ },
60
+ "alwaysApprove": {
61
+ "label": "Always Require Approval",
62
+ "help": "Tool names that should always require approval, regardless of the classifier."
63
+ },
64
+ "alwaysAllow": {
65
+ "label": "Always Allow",
66
+ "help": "Tool names to never gate. Use sparingly."
67
+ },
68
+ "timeoutMs": {
69
+ "label": "Approval Timeout (ms)",
70
+ "help": "How long to wait for a human decision before the action is denied. Defaults to the SDK's value."
71
+ }
72
+ }
73
+ }
package/package.json CHANGED
@@ -1,70 +1,70 @@
1
- {
2
- "name": "@oked/openclaw",
3
- "version": "0.1.0",
4
- "description": "OKed plugin for OpenClaw. Gates skill and tool calls behind a human approval push to your phone.",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/index.js",
11
- "types": "./dist/index.d.ts"
12
- }
13
- },
14
- "files": [
15
- "dist",
16
- "openclaw.plugin.json",
17
- "README.md"
18
- ],
19
- "scripts": {
20
- "prebuild": "npm run build --workspace=@oked/sdk",
21
- "build": "tsc",
22
- "dev": "tsc --watch",
23
- "test": "npm run build && node src/smoke.test.mjs",
24
- "prepublishOnly": "npm run build"
25
- },
26
- "openclaw": {
27
- "extensions": [
28
- "./dist/index.js"
29
- ]
30
- },
31
- "peerDependencies": {
32
- "openclaw": ">=2026.4.20"
33
- },
34
- "peerDependenciesMeta": {
35
- "openclaw": {
36
- "optional": true
37
- }
38
- },
39
- "dependencies": {
40
- "@oked/sdk": "^0.1.0"
41
- },
42
- "devDependencies": {
43
- "@types/node": "^22.13.10",
44
- "typescript": "^5.6.0"
45
- },
46
- "keywords": [
47
- "openclaw",
48
- "openclaw-plugin",
49
- "approval",
50
- "agents",
51
- "ai",
52
- "human-in-the-loop",
53
- "oked"
54
- ],
55
- "repository": {
56
- "type": "git",
57
- "url": "git+https://github.com/oked-ai/oked-sdk.git"
58
- },
59
- "bugs": {
60
- "url": "https://github.com/oked-ai/oked-sdk/issues"
61
- },
62
- "homepage": "https://github.com/oked-ai/oked-sdk/tree/main/packages/openclaw#readme",
63
- "license": "MIT",
64
- "engines": {
65
- "node": ">=18"
66
- },
67
- "publishConfig": {
68
- "access": "public"
69
- }
70
- }
1
+ {
2
+ "name": "@oked/openclaw",
3
+ "version": "0.1.3",
4
+ "description": "OKed plugin for OpenClaw. Gates skill and tool calls behind a human approval push to your phone.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "openclaw.plugin.json",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "prebuild": "npm run build --workspace=@oked/sdk",
21
+ "build": "tsc",
22
+ "dev": "tsc --watch",
23
+ "test": "npm run build && node src/smoke.test.mjs",
24
+ "prepublishOnly": "npm run build"
25
+ },
26
+ "openclaw": {
27
+ "extensions": [
28
+ "./dist/index.js"
29
+ ]
30
+ },
31
+ "peerDependencies": {
32
+ "openclaw": ">=2026.4.20"
33
+ },
34
+ "peerDependenciesMeta": {
35
+ "openclaw": {
36
+ "optional": true
37
+ }
38
+ },
39
+ "dependencies": {
40
+ "@oked/sdk": "^0.1.0"
41
+ },
42
+ "devDependencies": {
43
+ "@types/node": "^22.13.10",
44
+ "typescript": "^5.6.0"
45
+ },
46
+ "keywords": [
47
+ "openclaw",
48
+ "openclaw-plugin",
49
+ "approval",
50
+ "agents",
51
+ "ai",
52
+ "human-in-the-loop",
53
+ "oked"
54
+ ],
55
+ "repository": {
56
+ "type": "git",
57
+ "url": "git+https://github.com/oked-ai/oked-sdk.git"
58
+ },
59
+ "bugs": {
60
+ "url": "https://github.com/oked-ai/oked-sdk/issues"
61
+ },
62
+ "homepage": "https://github.com/oked-ai/oked-sdk/tree/main/packages/openclaw#readme",
63
+ "license": "MIT",
64
+ "engines": {
65
+ "node": ">=18"
66
+ },
67
+ "publishConfig": {
68
+ "access": "public"
69
+ }
70
+ }