@karmaniverous/jeeves-server-openclaw 0.1.0 → 0.2.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/README.md +49 -0
- package/dist/index.js +9 -8
- package/dist/skills/jeeves-server/SKILL.md +52 -25
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# @karmaniverous/jeeves-server-openclaw
|
|
2
|
+
|
|
3
|
+
OpenClaw plugin for Jeeves Server. Provides agents with tools for:
|
|
4
|
+
|
|
5
|
+
- Server status and capabilities
|
|
6
|
+
- File/directory metadata browsing
|
|
7
|
+
- Share link generation
|
|
8
|
+
- Export (PDF/DOCX/SVG/PNG/ZIP)
|
|
9
|
+
- Event gateway visibility
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @karmaniverous/jeeves-server-openclaw install
|
|
15
|
+
# Restart OpenClaw gateway after installing
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Configuration
|
|
19
|
+
|
|
20
|
+
### Server
|
|
21
|
+
|
|
22
|
+
Add an unscoped `_plugin` key to your Jeeves Server config:
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{ "keys": { "_plugin": "<seed>" } }
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### OpenClaw
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"plugins": {
|
|
33
|
+
"entries": {
|
|
34
|
+
"jeeves-server-openclaw": {
|
|
35
|
+
"enabled": true,
|
|
36
|
+
"config": {
|
|
37
|
+
"apiUrl": "http://127.0.0.1:1934",
|
|
38
|
+
"pluginKey": "<same-seed-as-server-_plugin>"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Docs
|
|
47
|
+
|
|
48
|
+
- OpenClaw Integration: ./guides/openclaw-integration.md
|
|
49
|
+
|
package/dist/index.js
CHANGED
|
@@ -160,7 +160,7 @@ function registerServerTools(api, baseUrl) {
|
|
|
160
160
|
},
|
|
161
161
|
buildRequest: (params) => {
|
|
162
162
|
const p = normalizePath(params);
|
|
163
|
-
return ['/api/
|
|
163
|
+
return ['/api/path/' + p];
|
|
164
164
|
},
|
|
165
165
|
},
|
|
166
166
|
{
|
|
@@ -186,13 +186,14 @@ function registerServerTools(api, baseUrl) {
|
|
|
186
186
|
},
|
|
187
187
|
buildRequest: (params) => {
|
|
188
188
|
const p = normalizePath(params);
|
|
189
|
-
const
|
|
190
|
-
if (params.expiryDays !== undefined)
|
|
191
|
-
|
|
189
|
+
const body = { path: '/' + p };
|
|
190
|
+
if (params.expiryDays !== undefined) {
|
|
191
|
+
const ms = Date.now() + params.expiryDays * 86400000;
|
|
192
|
+
body.expiry = String(ms);
|
|
193
|
+
}
|
|
192
194
|
if (params.depth !== undefined)
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
return ['/api/share/' + p + query];
|
|
195
|
+
body.depth = params.depth;
|
|
196
|
+
return ['/api/share', 'POST', body];
|
|
196
197
|
},
|
|
197
198
|
},
|
|
198
199
|
{
|
|
@@ -216,7 +217,7 @@ function registerServerTools(api, baseUrl) {
|
|
|
216
217
|
buildRequest: (params) => {
|
|
217
218
|
const p = normalizePath(params);
|
|
218
219
|
const fmt = String(params.format);
|
|
219
|
-
return ['/export/' + p + '
|
|
220
|
+
return ['/api/export/' + p + '?format=' + fmt];
|
|
220
221
|
},
|
|
221
222
|
},
|
|
222
223
|
{
|
|
@@ -23,17 +23,18 @@ To convert a Windows file path to a browse path:
|
|
|
23
23
|
|
|
24
24
|
## Sharing
|
|
25
25
|
|
|
26
|
-
- **Insiders** authenticate via Google OAuth — bare URLs work for them
|
|
26
|
+
- **Insiders** authenticate via Google OAuth or key-based auth — bare URLs work for them
|
|
27
27
|
- **Outsiders** need HMAC share links — use `server_share` to generate them
|
|
28
28
|
- Share links have configurable expiry (default 30 days)
|
|
29
29
|
- Directory shares support depth control for recursive access
|
|
30
|
+
- An `outsiderPolicy` can constrain which paths are eligible for outsider sharing
|
|
30
31
|
|
|
31
32
|
## Export
|
|
32
33
|
|
|
33
34
|
Available formats depend on file type and server capabilities:
|
|
34
35
|
- **Markdown files:** PDF (requires Chrome), DOCX
|
|
35
|
-
- **Mermaid diagrams:** SVG, PNG, PDF
|
|
36
|
-
- **PlantUML diagrams:** Formats depend on server configuration
|
|
36
|
+
- **Mermaid diagrams:** SVG, PNG, PDF (Mermaid CLI is bundled)
|
|
37
|
+
- **PlantUML diagrams:** Formats depend on server configuration (jar downloaded automatically via postinstall)
|
|
37
38
|
- **Directories:** ZIP (insider-only)
|
|
38
39
|
|
|
39
40
|
Use `server_link_info` first to check which formats are available for a path.
|
|
@@ -51,8 +52,8 @@ Run `server_status` to check:
|
|
|
51
52
|
### Prerequisites
|
|
52
53
|
|
|
53
54
|
- **Node.js 20+** and npm
|
|
54
|
-
- **Java 8+** (optional, for local PlantUML rendering)
|
|
55
|
-
- **Chrome/Chromium** (
|
|
55
|
+
- **Java 8+** (optional, for local PlantUML rendering — jar downloaded automatically)
|
|
56
|
+
- **Chrome/Chromium** (required for PDF export)
|
|
56
57
|
- **NSSM** (Windows) or **systemd** (Linux) for service management
|
|
57
58
|
- **Caddy** (recommended) or nginx for reverse proxy with automatic TLS
|
|
58
59
|
|
|
@@ -64,49 +65,75 @@ npm install -g @karmaniverous/jeeves-server
|
|
|
64
65
|
|
|
65
66
|
### 2. Create config
|
|
66
67
|
|
|
67
|
-
Create `jeeves-server.config.json` in the server's working directory:
|
|
68
|
+
Create `jeeves-server.config.json` (or any cosmiconfig-supported format) in the server's working directory:
|
|
68
69
|
|
|
69
70
|
```json
|
|
70
71
|
{
|
|
71
72
|
"port": 1934,
|
|
72
|
-
"
|
|
73
|
-
|
|
73
|
+
"chromePath": "/usr/bin/chromium-browser",
|
|
74
|
+
"auth": {
|
|
75
|
+
"modes": ["keys", "google"],
|
|
76
|
+
"google": {
|
|
77
|
+
"clientId": "${GOOGLE_CLIENT_ID}",
|
|
78
|
+
"clientSecret": "${GOOGLE_CLIENT_SECRET}"
|
|
79
|
+
},
|
|
80
|
+
"sessionSecret": "${SESSION_SECRET}"
|
|
81
|
+
},
|
|
82
|
+
"scopes": {
|
|
83
|
+
"public-docs": {
|
|
84
|
+
"allow": ["/d/docs/*"]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"insiders": {
|
|
88
|
+
"you@example.com": {},
|
|
89
|
+
"contractor@example.com": { "scopes": "public-docs" }
|
|
74
90
|
},
|
|
75
91
|
"keys": {
|
|
76
92
|
"_internal": "random-hex-seed-for-puppeteer",
|
|
77
|
-
"_plugin": "random-hex-seed-for-openclaw-plugin"
|
|
93
|
+
"_plugin": "random-hex-seed-for-openclaw-plugin",
|
|
94
|
+
"primary": "random-hex-seed-for-api-access"
|
|
78
95
|
},
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
],
|
|
82
|
-
"google": {
|
|
83
|
-
"clientId": "${GOOGLE_CLIENT_ID}",
|
|
84
|
-
"clientSecret": "${GOOGLE_CLIENT_SECRET}"
|
|
85
|
-
},
|
|
86
|
-
"sessionSecret": "${SESSION_SECRET}",
|
|
87
|
-
"watcherUrl": "http://127.0.0.1:1936"
|
|
96
|
+
"watcherUrl": "http://127.0.0.1:1936",
|
|
97
|
+
"runnerUrl": "http://127.0.0.1:1937"
|
|
88
98
|
}
|
|
89
99
|
```
|
|
90
100
|
|
|
101
|
+
**Key fields:**
|
|
102
|
+
- `chromePath` — **required**, path to Chrome/Chromium executable
|
|
103
|
+
- `auth.modes` — **required**, array of `"keys"` and/or `"google"`
|
|
104
|
+
- `scopes` — named scope definitions (allow/deny), referenced by name from insiders and keys
|
|
105
|
+
- `insiders` — map of email → `{ scopes?, allow?, deny? }`
|
|
106
|
+
- `keys._internal` — required for PDF/DOCX export (Puppeteer auth)
|
|
107
|
+
- `keys._plugin` — required for OpenClaw plugin auth
|
|
108
|
+
- `outsiderPolicy` — optional global constraints on outsider sharing
|
|
109
|
+
|
|
110
|
+
Environment variable substitution is supported: `${VAR_NAME}` in string values.
|
|
111
|
+
|
|
112
|
+
Generate key seeds with:
|
|
113
|
+
```bash
|
|
114
|
+
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
|
|
115
|
+
```
|
|
116
|
+
|
|
91
117
|
### 3. Validate config
|
|
92
118
|
|
|
93
119
|
```bash
|
|
94
|
-
jeeves-server config validate
|
|
95
|
-
jeeves-server config show
|
|
120
|
+
jeeves-server config validate [--config <path>]
|
|
121
|
+
jeeves-server config show [--config <path>]
|
|
96
122
|
```
|
|
97
123
|
|
|
98
124
|
### 4. Register as system service
|
|
99
125
|
|
|
100
126
|
**Windows (NSSM):**
|
|
101
127
|
```bash
|
|
102
|
-
jeeves-server service install
|
|
128
|
+
jeeves-server service install [--config <path>]
|
|
103
129
|
jeeves-server service start
|
|
104
130
|
```
|
|
105
131
|
|
|
106
132
|
**Linux (systemd):**
|
|
107
133
|
```bash
|
|
108
|
-
|
|
109
|
-
sudo jeeves-server
|
|
134
|
+
jeeves-server service install [--config <path>]
|
|
135
|
+
sudo systemctl enable jeeves-server
|
|
136
|
+
sudo systemctl start jeeves-server
|
|
110
137
|
```
|
|
111
138
|
|
|
112
139
|
### 5. Configure Caddy reverse proxy
|
|
@@ -127,9 +154,9 @@ Caddy handles TLS certificate provisioning automatically. Ensure DNS A/AAAA reco
|
|
|
127
154
|
npx @karmaniverous/jeeves-server-openclaw install
|
|
128
155
|
```
|
|
129
156
|
|
|
130
|
-
Configure the plugin in `openclaw.json` with `apiUrl` and `pluginKey` (matching the `_plugin` key seed from server config).
|
|
157
|
+
Configure the plugin in `openclaw.json` with `apiUrl` and `pluginKey` (matching the `_plugin` key seed from server config).
|
|
131
158
|
|
|
132
|
-
**
|
|
159
|
+
**Note:** The installer handles plugin registration in `openclaw.json` automatically. If using `openclaw plugins install` instead (when available), you may need to manually add the plugin entry to `plugins.entries` in `openclaw.json` with `apiUrl` and `pluginKey` config values.
|
|
133
160
|
|
|
134
161
|
Restart the gateway to load the plugin.
|
|
135
162
|
|
package/openclaw.plugin.json
CHANGED