openclaw-safeclaw-plugin 0.1.0 → 0.1.1
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 +10 -9
- package/SKILL.md +6 -17
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,20 +8,23 @@ Neurosymbolic governance plugin for OpenClaw AI agents. Validates every tool cal
|
|
|
8
8
|
npm install openclaw-safeclaw-plugin
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## Quick Start
|
|
11
|
+
## Quick Start
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Install and go — the plugin connects to SafeClaw's hosted service by default:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
17
|
-
export SAFECLAW_ENFORCEMENT="enforce"
|
|
16
|
+
npm install openclaw-safeclaw-plugin
|
|
18
17
|
```
|
|
19
18
|
|
|
20
|
-
No
|
|
19
|
+
No configuration needed. The default service URL is `https://api.safeclaw.eu/api/v1`.
|
|
20
|
+
|
|
21
|
+
## Self-Hosted
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
To run your own SafeClaw service, override the URL:
|
|
23
24
|
|
|
24
25
|
```bash
|
|
26
|
+
export SAFECLAW_URL="http://localhost:8420/api/v1"
|
|
27
|
+
|
|
25
28
|
# Start the SafeClaw service
|
|
26
29
|
git clone https://github.com/tendlyeu/SafeClaw.git
|
|
27
30
|
cd SafeClaw/safeclaw-service
|
|
@@ -32,8 +35,6 @@ safeclaw serve
|
|
|
32
35
|
# Engine ready on http://localhost:8420
|
|
33
36
|
```
|
|
34
37
|
|
|
35
|
-
The plugin auto-connects to `http://localhost:8420/api/v1` by default.
|
|
36
|
-
|
|
37
38
|
## What It Does
|
|
38
39
|
|
|
39
40
|
- **Blocks dangerous actions** — force push, deleting root, exposing secrets
|
|
@@ -58,7 +59,7 @@ Set via environment variables or `~/.safeclaw/config.json`:
|
|
|
58
59
|
|
|
59
60
|
| Variable | Default | Description |
|
|
60
61
|
|----------|---------|-------------|
|
|
61
|
-
| `SAFECLAW_URL` | `
|
|
62
|
+
| `SAFECLAW_URL` | `https://api.safeclaw.eu/api/v1` | SafeClaw service URL |
|
|
62
63
|
| `SAFECLAW_API_KEY` | *(empty)* | API key for cloud mode |
|
|
63
64
|
| `SAFECLAW_TIMEOUT_MS` | `500` | Request timeout in ms |
|
|
64
65
|
| `SAFECLAW_ENABLED` | `true` | Set `false` to disable |
|
package/SKILL.md
CHANGED
|
@@ -12,26 +12,15 @@ SafeClaw adds ontology-based constraint checking to your OpenClaw agent. Every t
|
|
|
12
12
|
|
|
13
13
|
## Setup
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
The plugin connects to `https://api.safeclaw.eu/api/v1` by default — no configuration needed.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
# 1. Start the SafeClaw service
|
|
19
|
-
pip install safeclaw
|
|
20
|
-
safeclaw init
|
|
21
|
-
uvicorn safeclaw.main:app --port 8420
|
|
22
|
-
|
|
23
|
-
# 2. Install this plugin (done if you're reading this via clawhub)
|
|
24
|
-
# The plugin auto-connects to http://localhost:8420
|
|
25
|
-
```
|
|
17
|
+
### Self-hosted mode
|
|
26
18
|
|
|
27
|
-
|
|
19
|
+
To run your own SafeClaw service, override the URL:
|
|
28
20
|
|
|
29
21
|
```bash
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
# 2. Set your API key
|
|
33
|
-
export SAFECLAW_URL="https://api.safeclaw.eu/api/v1"
|
|
34
|
-
export SAFECLAW_API_KEY="sc_live_your_key_here"
|
|
22
|
+
export SAFECLAW_URL="http://localhost:8420/api/v1"
|
|
23
|
+
export SAFECLAW_API_KEY="sc_live_your_key_here" # optional
|
|
35
24
|
```
|
|
36
25
|
|
|
37
26
|
## Configuration
|
|
@@ -40,7 +29,7 @@ Set via environment variables or `~/.safeclaw/config.json`:
|
|
|
40
29
|
|
|
41
30
|
| Variable | Default | Description |
|
|
42
31
|
|----------|---------|-------------|
|
|
43
|
-
| `SAFECLAW_URL` | `
|
|
32
|
+
| `SAFECLAW_URL` | `https://api.safeclaw.eu/api/v1` | SafeClaw service URL |
|
|
44
33
|
| `SAFECLAW_API_KEY` | (empty) | API key for remote/cloud mode |
|
|
45
34
|
| `SAFECLAW_TIMEOUT_MS` | `500` | Request timeout in milliseconds |
|
|
46
35
|
| `SAFECLAW_ENABLED` | `true` | Set to `false` to disable |
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { join } from 'path';
|
|
|
11
11
|
import { homedir } from 'os';
|
|
12
12
|
function loadConfig() {
|
|
13
13
|
const defaults = {
|
|
14
|
-
serviceUrl: process.env.SAFECLAW_URL ?? '
|
|
14
|
+
serviceUrl: process.env.SAFECLAW_URL ?? 'https://api.safeclaw.eu/api/v1',
|
|
15
15
|
apiKey: process.env.SAFECLAW_API_KEY ?? '',
|
|
16
16
|
timeoutMs: parseInt(process.env.SAFECLAW_TIMEOUT_MS ?? '500', 10),
|
|
17
17
|
enabled: process.env.SAFECLAW_ENABLED !== 'false',
|
package/index.ts
CHANGED
|
@@ -26,7 +26,7 @@ interface SafeClawPluginConfig {
|
|
|
26
26
|
|
|
27
27
|
function loadConfig(): SafeClawPluginConfig {
|
|
28
28
|
const defaults: SafeClawPluginConfig = {
|
|
29
|
-
serviceUrl: process.env.SAFECLAW_URL ?? '
|
|
29
|
+
serviceUrl: process.env.SAFECLAW_URL ?? 'https://api.safeclaw.eu/api/v1',
|
|
30
30
|
apiKey: process.env.SAFECLAW_API_KEY ?? '',
|
|
31
31
|
timeoutMs: parseInt(process.env.SAFECLAW_TIMEOUT_MS ?? '500', 10),
|
|
32
32
|
enabled: process.env.SAFECLAW_ENABLED !== 'false',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openclaw-safeclaw-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "SafeClaw Neurosymbolic Governance plugin for OpenClaw — validates AI agent actions against OWL ontologies and SHACL constraints",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|