@1claw/openclaw-plugin 0.1.0
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 +21 -0
- package/README.md +112 -0
- package/openclaw.plugin.json +103 -0
- package/package.json +57 -0
- package/skills/1claw/SKILL.md +846 -0
- package/src/client.ts +379 -0
- package/src/commands/index.ts +18 -0
- package/src/commands/list.ts +33 -0
- package/src/commands/rotate.ts +39 -0
- package/src/commands/status.ts +46 -0
- package/src/config.ts +79 -0
- package/src/hooks/index.ts +24 -0
- package/src/hooks/secret-injection.ts +58 -0
- package/src/hooks/secret-redaction.ts +90 -0
- package/src/hooks/shroud-routing.ts +45 -0
- package/src/index.ts +83 -0
- package/src/security/index.ts +153 -0
- package/src/services/index.ts +17 -0
- package/src/services/key-rotation.ts +52 -0
- package/src/services/token-refresh.ts +33 -0
- package/src/tools/create-vault.ts +28 -0
- package/src/tools/delete-secret.ts +28 -0
- package/src/tools/describe-secret.ts +64 -0
- package/src/tools/get-env-bundle.ts +49 -0
- package/src/tools/get-secret.ts +46 -0
- package/src/tools/grant-access.ts +50 -0
- package/src/tools/index.ts +92 -0
- package/src/tools/list-secrets.ts +39 -0
- package/src/tools/list-vaults.ts +29 -0
- package/src/tools/put-secret.ts +44 -0
- package/src/tools/rotate-and-store.ts +25 -0
- package/src/tools/share-secret.ts +61 -0
- package/src/tools/simulate-transaction.ts +66 -0
- package/src/tools/submit-transaction.ts +69 -0
- package/src/types.ts +186 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 1claw (https://1claw.xyz)
|
|
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
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# 1claw OpenClaw Plugin
|
|
2
|
+
|
|
3
|
+
OpenClaw gateway plugin for [1claw](https://1claw.xyz) — HSM-backed secret management, transaction signing, and Shroud LLM proxy integration for AI agents.
|
|
4
|
+
|
|
5
|
+
**Repository:** [github.com/1clawAI/1claw-openclaw-plugin](https://github.com/1clawAI/1claw-openclaw-plugin)
|
|
6
|
+
**npm:** [@1claw/openclaw-plugin](https://www.npmjs.com/package/@1claw/openclaw-plugin)
|
|
7
|
+
**Docs:** [OpenClaw Plugins](https://docs.openclaw.ai/tools/plugin) · [1claw](https://docs.1claw.xyz)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Native agent tools** — 13 tools for secrets, vaults, policies, sharing, and EVM transactions (optional, configurable)
|
|
14
|
+
- **Secret redaction** — Scan outbound messages and redact leaked secret values (default on)
|
|
15
|
+
- **Secret injection** — Replace `{{1claw:path/to/secret}}` placeholders at prompt time (opt-in)
|
|
16
|
+
- **Shroud routing** — Route LLM traffic through [Shroud](https://shroud.1claw.xyz) TEE when the agent has `shroud_enabled` (opt-in)
|
|
17
|
+
- **Key rotation monitor** — Background warnings for secrets expiring within 7 days (opt-in)
|
|
18
|
+
- **Slash commands** — `/oneclaw`, `/oneclaw-list`, `/oneclaw-rotate` (optional)
|
|
19
|
+
- **Gateway RPC** — `1claw.status` for programmatic health/status
|
|
20
|
+
- **Bundled skill** — 1claw skill (`skills/1claw/SKILL.md`) auto-discovered by OpenClaw
|
|
21
|
+
|
|
22
|
+
All features are toggled via `plugins.entries.1claw.config.features`. Auth uses config or env vars.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
openclaw plugins install @1claw/openclaw-plugin
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or from the repo (e.g. when developing or using as a submodule):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
openclaw plugins install -l ./path/to/1claw-openclaw-plugin
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Config
|
|
41
|
+
|
|
42
|
+
Minimal config (config file or env):
|
|
43
|
+
|
|
44
|
+
```json5
|
|
45
|
+
{
|
|
46
|
+
plugins: {
|
|
47
|
+
entries: {
|
|
48
|
+
"1claw": {
|
|
49
|
+
enabled: true,
|
|
50
|
+
config: {
|
|
51
|
+
apiKey: "ocv_..."
|
|
52
|
+
// agentId, vaultId, baseUrl, shroudUrl optional
|
|
53
|
+
// features: { tools: true, secretRedaction: true, ... }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Env fallback:** `ONECLAW_AGENT_API_KEY`, `ONECLAW_AGENT_ID`, `ONECLAW_VAULT_ID`, `ONECLAW_BASE_URL`, `ONECLAW_SHROUD_URL`.
|
|
62
|
+
|
|
63
|
+
Restart the OpenClaw Gateway after changing config.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Tool names
|
|
68
|
+
|
|
69
|
+
When enabled, tools are registered with a `oneclaw_` prefix (e.g. `oneclaw_list_secrets`, `oneclaw_get_secret`). Add them to your agent’s `tools.allow` (e.g. `"1claw"` or specific names).
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Slash commands
|
|
74
|
+
|
|
75
|
+
| Command | Description |
|
|
76
|
+
|-------------------|--------------------------------------------------|
|
|
77
|
+
| `/oneclaw` | Connection status, vault info, token TTL, features |
|
|
78
|
+
| `/oneclaw-list` | List secret paths (optional prefix arg) |
|
|
79
|
+
| `/oneclaw-rotate` | Rotate a secret: `/oneclaw-rotate <path> <new-value>` |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Development
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm install
|
|
87
|
+
npm run typecheck
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
- **TypeScript** only (no build step required for OpenClaw; jiti loads `.ts` at runtime).
|
|
91
|
+
- Optional: `npm run build` to emit `dist/` (not required for `openclaw plugins install` when using source).
|
|
92
|
+
|
|
93
|
+
### As a submodule in 1claw
|
|
94
|
+
|
|
95
|
+
From the [1claw](https://github.com/1clawAI/1claw) repo root:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
git submodule add https://github.com/1clawAI/1claw-openclaw-plugin.git packages/openclaw-plugin
|
|
99
|
+
git submodule update --init --recursive
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Clone 1claw with the submodule:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
git clone --recurse-submodules https://github.com/1clawAI/1claw.git
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
MIT © [1claw](https://1claw.xyz)
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "1claw",
|
|
3
|
+
"name": "1Claw Secrets Manager",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "HSM-backed secret management, transaction signing, and Shroud LLM proxy for AI agents",
|
|
6
|
+
"configSchema": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"apiKey": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Agent API key (ocv_... prefix)"
|
|
13
|
+
},
|
|
14
|
+
"agentId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Agent UUID (optional — auto-resolved from API key)"
|
|
17
|
+
},
|
|
18
|
+
"vaultId": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Default vault UUID (optional — auto-discovered)"
|
|
21
|
+
},
|
|
22
|
+
"baseUrl": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"default": "https://api.1claw.xyz",
|
|
25
|
+
"description": "1claw API base URL"
|
|
26
|
+
},
|
|
27
|
+
"shroudUrl": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"default": "https://shroud.1claw.xyz",
|
|
30
|
+
"description": "Shroud TEE proxy URL"
|
|
31
|
+
},
|
|
32
|
+
"features": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"properties": {
|
|
36
|
+
"tools": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"default": true,
|
|
39
|
+
"description": "Register native agent tools for secrets, vaults, policies, sharing, and transactions"
|
|
40
|
+
},
|
|
41
|
+
"secretInjection": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"default": false,
|
|
44
|
+
"description": "Inject {{1claw:path}} placeholders with real secret values at prompt time"
|
|
45
|
+
},
|
|
46
|
+
"secretRedaction": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"default": true,
|
|
49
|
+
"description": "Scan outbound messages and redact leaked secret values"
|
|
50
|
+
},
|
|
51
|
+
"shroudRouting": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"default": false,
|
|
54
|
+
"description": "Route LLM traffic through Shroud TEE proxy when agent has shroud_enabled"
|
|
55
|
+
},
|
|
56
|
+
"keyRotationMonitor": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"default": false,
|
|
59
|
+
"description": "Background service that warns about expiring secrets"
|
|
60
|
+
},
|
|
61
|
+
"slashCommands": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"default": true,
|
|
64
|
+
"description": "Register /oneclaw, /oneclaw-list, /oneclaw-rotate slash commands"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"securityMode": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": ["block", "surgical", "log_only"],
|
|
71
|
+
"default": "block",
|
|
72
|
+
"description": "How to handle detected threats in tool inputs"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"uiHints": {
|
|
77
|
+
"apiKey": {
|
|
78
|
+
"label": "Agent API Key",
|
|
79
|
+
"sensitive": true,
|
|
80
|
+
"placeholder": "ocv_..."
|
|
81
|
+
},
|
|
82
|
+
"agentId": {
|
|
83
|
+
"label": "Agent ID",
|
|
84
|
+
"placeholder": "auto-resolved from API key"
|
|
85
|
+
},
|
|
86
|
+
"vaultId": {
|
|
87
|
+
"label": "Vault ID",
|
|
88
|
+
"placeholder": "auto-discovered"
|
|
89
|
+
},
|
|
90
|
+
"baseUrl": {
|
|
91
|
+
"label": "API Base URL",
|
|
92
|
+
"placeholder": "https://api.1claw.xyz"
|
|
93
|
+
},
|
|
94
|
+
"shroudUrl": {
|
|
95
|
+
"label": "Shroud Proxy URL",
|
|
96
|
+
"placeholder": "https://shroud.1claw.xyz"
|
|
97
|
+
},
|
|
98
|
+
"securityMode": {
|
|
99
|
+
"label": "Security Mode"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"skills": ["skills/1claw"]
|
|
103
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@1claw/openclaw-plugin",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OpenClaw plugin for 1claw — HSM-backed secret management, transaction signing, and Shroud LLM proxy integration for AI agents",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"src",
|
|
9
|
+
"skills",
|
|
10
|
+
"openclaw.plugin.json",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"openclaw": {
|
|
15
|
+
"extensions": [
|
|
16
|
+
"./src/index.ts"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc",
|
|
21
|
+
"typecheck": "tsc --noEmit"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"1claw",
|
|
25
|
+
"openclaw",
|
|
26
|
+
"plugin",
|
|
27
|
+
"secrets",
|
|
28
|
+
"vault",
|
|
29
|
+
"hsm",
|
|
30
|
+
"ai-agents",
|
|
31
|
+
"shroud",
|
|
32
|
+
"tee",
|
|
33
|
+
"intents-api"
|
|
34
|
+
],
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/1clawAI/1claw-openclaw-plugin.git"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/1clawAI/1claw-openclaw-plugin#readme",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/1clawAI/1claw-openclaw-plugin/issues"
|
|
45
|
+
},
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@sinclair/typebox": "^0.34.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^20.19.33",
|
|
52
|
+
"typescript": "^5.5.0"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=20.0.0"
|
|
56
|
+
}
|
|
57
|
+
}
|