@karmaniverous/jeeves-server-openclaw 0.3.0 → 0.4.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 +12 -3
- package/dist/cli.js +18934 -112
- package/dist/index.js +20584 -214
- package/dist/rollup.config.d.ts +5 -0
- package/dist/src/cli.d.ts +8 -1
- package/dist/src/constants.d.ts +5 -0
- package/dist/src/helpers.d.ts +9 -38
- package/dist/src/index.d.ts +6 -3
- package/dist/src/pluginRemove.d.ts +15 -0
- package/dist/src/pluginRemove.test.d.ts +4 -0
- package/dist/src/serverTools.d.ts +1 -1
- package/dist/src/serviceCommands.d.ts +19 -0
- package/dist/src/serviceCommands.test.d.ts +4 -0
- package/openclaw.plugin.json +10 -1
- package/package.json +16 -3
- package/dist/src/cli.test.d.ts +0 -1
- package/dist/src/toolsWriter.d.ts +0 -8
package/dist/rollup.config.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Rollup configuration for the OpenClaw plugin package.
|
|
3
3
|
* Two entry points: plugin (ESM + declarations) and CLI (ESM executable).
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* `@karmaniverous/jeeves` is bundled (not external) because the plugin runs
|
|
7
|
+
* inside `~/.openclaw/extensions/` where there is no `node_modules` tree.
|
|
8
|
+
* Node builtins remain external since they're always available at runtime.
|
|
4
9
|
*/
|
|
5
10
|
import type { RollupOptions } from 'rollup';
|
|
6
11
|
declare const _default: RollupOptions[];
|
package/dist/src/cli.d.ts
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
* Usage:
|
|
5
5
|
* npx \@karmaniverous/jeeves-server-openclaw install
|
|
6
6
|
* npx \@karmaniverous/jeeves-server-openclaw uninstall
|
|
7
|
+
*
|
|
8
|
+
* Supports non-default installations via:
|
|
9
|
+
* - OPENCLAW_CONFIG env var (path to openclaw.json)
|
|
10
|
+
* - OPENCLAW_HOME env var (path to .openclaw directory)
|
|
11
|
+
* - Default: ~/.openclaw/openclaw.json
|
|
12
|
+
*
|
|
13
|
+
* @module cli
|
|
7
14
|
*/
|
|
8
|
-
export
|
|
15
|
+
export {};
|
package/dist/src/helpers.d.ts
CHANGED
|
@@ -1,46 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Server-specific HMAC authentication helpers for the OpenClaw plugin.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* These helpers handle insider key derivation and URL signing for
|
|
6
|
+
* authenticated requests to jeeves-server. Generic helpers (ok, fail,
|
|
7
|
+
* connectionFail, fetchJson, etc.) are imported from `@karmaniverous/jeeves`.
|
|
8
|
+
*
|
|
9
|
+
* @module helpers
|
|
3
10
|
*/
|
|
4
|
-
|
|
5
|
-
export interface PluginApi {
|
|
6
|
-
config?: {
|
|
7
|
-
plugins?: {
|
|
8
|
-
entries?: Record<string, {
|
|
9
|
-
config?: Record<string, unknown>;
|
|
10
|
-
}>;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
resolvePath?: (input: string) => string;
|
|
14
|
-
registerTool(tool: {
|
|
15
|
-
name: string;
|
|
16
|
-
description: string;
|
|
17
|
-
parameters: Record<string, unknown>;
|
|
18
|
-
execute: (id: string, params: Record<string, unknown>) => Promise<ToolResult>;
|
|
19
|
-
}, options?: {
|
|
20
|
-
optional?: boolean;
|
|
21
|
-
}): void;
|
|
22
|
-
}
|
|
23
|
-
/** Result shape returned by each tool execution. */
|
|
24
|
-
export interface ToolResult {
|
|
25
|
-
content: Array<{
|
|
26
|
-
type: string;
|
|
27
|
-
text: string;
|
|
28
|
-
}>;
|
|
29
|
-
isError?: boolean;
|
|
30
|
-
}
|
|
31
|
-
/** Resolve the server API base URL from plugin config. */
|
|
32
|
-
export declare function getApiUrl(api: PluginApi): string;
|
|
11
|
+
import type { PluginApi } from '@karmaniverous/jeeves';
|
|
33
12
|
/** Resolve the plugin key seed from plugin config. */
|
|
34
13
|
export declare function getPluginKey(api: PluginApi): string | undefined;
|
|
35
14
|
/** Derive HMAC key from seed. */
|
|
36
15
|
export declare function deriveKey(seed: string): string;
|
|
37
16
|
/** Append auth key query param to a URL. */
|
|
38
17
|
export declare function withAuth(url: string, keySeed: string | undefined): string;
|
|
39
|
-
/** Format a successful tool result. */
|
|
40
|
-
export declare function ok(data: unknown): ToolResult;
|
|
41
|
-
/** Format an error tool result. */
|
|
42
|
-
export declare function fail(error: unknown): ToolResult;
|
|
43
|
-
/** Format a connection error with actionable guidance. */
|
|
44
|
-
export declare function connectionFail(error: unknown, baseUrl: string): ToolResult;
|
|
45
|
-
/** Fetch JSON from a URL, throwing on non-OK responses. */
|
|
46
|
-
export declare function fetchJson(url: string, init?: RequestInit): Promise<unknown>;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OpenClaw plugin entry point
|
|
2
|
+
* OpenClaw plugin entry point for jeeves-server.
|
|
3
|
+
*
|
|
4
|
+
* Registers server_* tools, initializes the jeeves-core library,
|
|
5
|
+
* and starts a ComponentWriter to manage the Server section in TOOLS.md.
|
|
3
6
|
*/
|
|
4
|
-
import type
|
|
5
|
-
/** Register all jeeves-server tools
|
|
7
|
+
import { type PluginApi } from '@karmaniverous/jeeves';
|
|
8
|
+
/** Register all jeeves-server tools and start the TOOLS.md writer. */
|
|
6
9
|
export default function register(api: PluginApi): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared plugin removal logic for extension directory and config cleanup.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Used by both the CLI `uninstall` command and the in-process
|
|
6
|
+
* `PluginCommands.uninstall()` implementation.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Remove the plugin extension directory and patch the OpenClaw config.
|
|
10
|
+
*
|
|
11
|
+
* @param home - OpenClaw home directory path.
|
|
12
|
+
* @param configPath - OpenClaw config file path.
|
|
13
|
+
* @returns Messages describing what was changed.
|
|
14
|
+
*/
|
|
15
|
+
export declare function removePlugin(home: string, configPath: string): string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Server tool registrations (server_* tools) for the OpenClaw plugin.
|
|
3
3
|
*/
|
|
4
|
-
import { type PluginApi } from '
|
|
4
|
+
import { type PluginApi } from '@karmaniverous/jeeves';
|
|
5
5
|
/** Register all server_* tools with the OpenClaw plugin API. */
|
|
6
6
|
export declare function registerServerTools(api: PluginApi, baseUrl: string): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service and plugin lifecycle commands for the JeevesComponent interface.
|
|
3
|
+
*
|
|
4
|
+
* Wraps NSSM service management (JeevesServer) and plugin uninstall
|
|
5
|
+
* via shared removal logic.
|
|
6
|
+
*/
|
|
7
|
+
import { type PluginCommands, type ServiceCommands } from '@karmaniverous/jeeves';
|
|
8
|
+
/**
|
|
9
|
+
* Create service lifecycle commands for the JeevesServer NSSM service.
|
|
10
|
+
*
|
|
11
|
+
* @returns ServiceCommands implementation.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createServiceCommands(): ServiceCommands;
|
|
14
|
+
/**
|
|
15
|
+
* Create plugin lifecycle commands for the OpenClaw plugin.
|
|
16
|
+
*
|
|
17
|
+
* @returns PluginCommands implementation.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createPluginCommands(): PluginCommands;
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "jeeves-server-openclaw",
|
|
3
3
|
"name": "Jeeves Server",
|
|
4
4
|
"description": "File browsing, document sharing, export, and event gateway tools for jeeves-server.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4.0",
|
|
6
6
|
"skills": [
|
|
7
7
|
"dist/skills/jeeves-server"
|
|
8
8
|
],
|
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
"pluginKey": {
|
|
19
19
|
"type": "string",
|
|
20
20
|
"description": "Server _plugin key seed (for authenticated API calls)"
|
|
21
|
+
},
|
|
22
|
+
"configRoot": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Platform config root directory (e.g. j:/config). Core derives component config dirs from this path.",
|
|
25
|
+
"default": "j:/config"
|
|
21
26
|
}
|
|
22
27
|
}
|
|
23
28
|
},
|
|
@@ -29,6 +34,10 @@
|
|
|
29
34
|
"pluginKey": {
|
|
30
35
|
"label": "Plugin Key Seed",
|
|
31
36
|
"placeholder": "hex string from server config keys._plugin"
|
|
37
|
+
},
|
|
38
|
+
"configRoot": {
|
|
39
|
+
"label": "Config Root",
|
|
40
|
+
"placeholder": "j:/config"
|
|
32
41
|
}
|
|
33
42
|
}
|
|
34
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karmaniverous/jeeves-server-openclaw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,14 +17,17 @@
|
|
|
17
17
|
"release:pre": "dotenvx run -f .env.local -- release-it --no-git.requireBranch --github.prerelease --preRelease"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@dotenvx/dotenvx": "^1.
|
|
20
|
+
"@dotenvx/dotenvx": "^1.55.1",
|
|
21
|
+
"@rollup/plugin-commonjs": "^29.0.2",
|
|
22
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
23
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
21
24
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
22
25
|
"auto-changelog": "^2.5.0",
|
|
23
26
|
"cross-env": "^10.1.0",
|
|
24
27
|
"release-it": "^19.2.4",
|
|
25
28
|
"rollup": "^4.59.0",
|
|
26
29
|
"tslib": "^2.8.1",
|
|
27
|
-
"vitest": "^4.0
|
|
30
|
+
"vitest": "^4.1.0"
|
|
28
31
|
},
|
|
29
32
|
"author": "Jason Williscroft",
|
|
30
33
|
"description": "OpenClaw plugin for jeeves-server — file browsing, sharing, export, and event gateway tools",
|
|
@@ -103,5 +106,15 @@
|
|
|
103
106
|
"npm": {
|
|
104
107
|
"publish": true
|
|
105
108
|
}
|
|
109
|
+
},
|
|
110
|
+
"auto-changelog": {
|
|
111
|
+
"output": "CHANGELOG.md",
|
|
112
|
+
"tagPrefix": "openclaw/",
|
|
113
|
+
"unreleased": true,
|
|
114
|
+
"commitLimit": false,
|
|
115
|
+
"hideCredit": true
|
|
116
|
+
},
|
|
117
|
+
"dependencies": {
|
|
118
|
+
"@karmaniverous/jeeves": "^0.2.0"
|
|
106
119
|
}
|
|
107
120
|
}
|
package/dist/src/cli.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|