@karmaniverous/jeeves-server-openclaw 0.3.1 → 0.4.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/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
+ * @packageDocumentation
7
14
  */
8
15
  export {};
@@ -1,53 +1,17 @@
1
1
  /**
2
- * Shared types and utility functions for the OpenClaw plugin tool registrations.
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
+ * @packageDocumentation
3
10
  */
4
- /** Minimal OpenClaw plugin API surface used for tool registration. */
5
- export interface PluginApi {
6
- config?: {
7
- agents?: {
8
- defaults?: {
9
- workspace?: string;
10
- };
11
- };
12
- plugins?: {
13
- entries?: Record<string, {
14
- config?: Record<string, unknown>;
15
- }>;
16
- };
17
- };
18
- resolvePath?: (input: string) => string;
19
- registerTool(tool: {
20
- name: string;
21
- description: string;
22
- parameters: Record<string, unknown>;
23
- execute: (id: string, params: Record<string, unknown>) => Promise<ToolResult>;
24
- }, options?: {
25
- optional?: boolean;
26
- }): void;
27
- }
28
- /** Result shape returned by each tool execution. */
29
- export interface ToolResult {
30
- content: Array<{
31
- type: string;
32
- text: string;
33
- }>;
34
- isError?: boolean;
35
- }
36
- /** Extract plugin config from the API object. */
37
- export declare function getPluginConfig(api: PluginApi): Record<string, unknown> | undefined;
38
- /** Resolve the server API base URL from plugin config. */
39
- export declare function getApiUrl(api: PluginApi): string;
11
+ import type { PluginApi } from '@karmaniverous/jeeves';
40
12
  /** Resolve the plugin key seed from plugin config. */
41
13
  export declare function getPluginKey(api: PluginApi): string | undefined;
42
14
  /** Derive HMAC key from seed. */
43
15
  export declare function deriveKey(seed: string): string;
44
16
  /** Append auth key query param to a URL. */
45
17
  export declare function withAuth(url: string, keySeed: string | undefined): string;
46
- /** Format a successful tool result. */
47
- export declare function ok(data: unknown): ToolResult;
48
- /** Format an error tool result. */
49
- export declare function fail(error: unknown): ToolResult;
50
- /** Format a connection error with actionable guidance. */
51
- export declare function connectionFail(error: unknown, baseUrl: string): ToolResult;
52
- /** Fetch JSON from a URL, throwing on non-OK responses. */
53
- export declare function fetchJson(url: string, init?: RequestInit): Promise<unknown>;
@@ -4,6 +4,6 @@
4
4
  * Registers server_* tools, initializes the jeeves-core library,
5
5
  * and starts a ComponentWriter to manage the Server section in TOOLS.md.
6
6
  */
7
- import { type PluginApi } from './helpers.js';
7
+ import { type PluginApi } from '@karmaniverous/jeeves';
8
8
  /** Register all jeeves-server tools and start the TOOLS.md writer. */
9
9
  export default function register(api: PluginApi): void;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Server tool registrations (server_* tools) for the OpenClaw plugin.
3
3
  */
4
- import { type PluginApi } from './helpers.js';
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;
@@ -4,7 +4,7 @@
4
4
  * Wraps NSSM service management (JeevesServer) and plugin uninstall
5
5
  * via shared removal logic.
6
6
  */
7
- import type { PluginCommands, ServiceCommands } from '@karmaniverous/jeeves';
7
+ import { type PluginCommands, type ServiceCommands } from '@karmaniverous/jeeves';
8
8
  /**
9
9
  * Create service lifecycle commands for the JeevesServer NSSM service.
10
10
  *
@@ -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.3.1",
5
+ "version": "0.4.1",
6
6
  "skills": [
7
7
  "dist/skills/jeeves-server"
8
8
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karmaniverous/jeeves-server-openclaw",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -115,6 +115,6 @@
115
115
  "hideCredit": true
116
116
  },
117
117
  "dependencies": {
118
- "@karmaniverous/jeeves": "^0.1.6"
118
+ "@karmaniverous/jeeves": "^0.2.0"
119
119
  }
120
120
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- /**
2
- * OpenClaw config patching utilities.
3
- *
4
- * @remarks
5
- * Shared by both the `npx ... install|uninstall` CLI and by in-process
6
- * plugin commands.
7
- */
8
- export declare function patchConfig(config: Record<string, unknown>, mode: 'add' | 'remove'): string[];
@@ -1,14 +0,0 @@
1
- /**
2
- * OpenClaw home and config path resolution.
3
- *
4
- * @remarks
5
- * Shared by the CLI installer and the in-process plugin commands.
6
- */
7
- /**
8
- * Resolve the OpenClaw home directory from environment or default.
9
- */
10
- export declare function resolveOpenClawHome(): string;
11
- /**
12
- * Resolve the OpenClaw config file path from environment or default.
13
- */
14
- export declare function resolveConfigPath(home: string): string;
@@ -1,4 +0,0 @@
1
- /**
2
- * Tests for OpenClaw path resolution utilities.
3
- */
4
- export {};