@ravi-hq/ravi 0.2.1 → 0.3.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 CHANGED
@@ -18,40 +18,27 @@ encrypted vault through a single plugin.
18
18
  ## Installation
19
19
 
20
20
  ```bash
21
- openclaw plugins install @ravi-hq/openclaw-plugin
21
+ openclaw plugins install @ravi-hq/ravi
22
22
  ```
23
23
 
24
24
  ## Quick Start
25
25
 
26
- ### 1. Install and authenticate
27
-
28
26
  ```bash
29
- openclaw plugins install @ravi-hq/openclaw-plugin
27
+ openclaw plugins install @ravi-hq/ravi
30
28
  openclaw ravi login
31
29
  ```
32
30
 
33
- This opens a browser for device-code authentication. Copy the access token from the output.
34
-
35
- ### 2. Add your token and PIN to the plugin config
36
-
37
- ```yaml
38
- # In your OpenClaw config
39
- plugins:
40
- ravi:
41
- token: "eyJhbGciOiJIUzI1NiIs..." # From 'openclaw ravi login'
42
- pin: "123456" # Your 6-digit E2E encryption PIN
43
- ```
31
+ `login` opens a browser for device-code authentication, then auto-configures
32
+ OpenClaw -- it stores credentials in `~/.ravi/auth.json` and sets `identityUuid`
33
+ via `openclaw config set`. No manual config editing needed.
44
34
 
45
- ### 3. Run setup to configure channels
46
-
47
- ```bash
48
- openclaw ravi setup
49
- ```
35
+ ## Configuration
50
36
 
51
- This lists your identities and generates a channel configuration snippet you
52
- can paste into your OpenClaw config.
37
+ Authentication is stored in `~/.ravi/auth.json` (written by `openclaw ravi login`).
38
+ The `identityUuid` is set automatically during login via `openclaw config set`.
53
39
 
54
- ## Configuration
40
+ Manual plugin config is only needed for multi-agent setups where different agents
41
+ use different identities, or to customize channel DM policies.
55
42
 
56
43
  ```yaml
57
44
  plugins:
@@ -59,11 +46,9 @@ plugins:
59
46
  # Ravi API base URL (default: https://ravi.app)
60
47
  apiUrl: "https://ravi.app"
61
48
 
62
- # JWT access token (required)
63
- token: "your-access-token"
64
-
65
- # 6-digit E2E encryption PIN (required)
66
- pin: "123456"
49
+ # Identity UUID -- set automatically by 'openclaw ravi login'.
50
+ # Override here only for multi-agent setups.
51
+ identityUuid: "identity-uuid-here"
67
52
 
68
53
  # Channel accounts (from 'openclaw ravi setup')
69
54
  channels:
@@ -238,6 +223,7 @@ Agent (OpenClaw runtime)
238
223
  +-- Tools (19 agent tools)
239
224
  | '-- REST calls --> GET/POST/DELETE /api/...
240
225
  | Identity-scoped via X-Ravi-Identity header
226
+ | Returns MCP-style content arrays
241
227
  |
242
228
  '-- Crypto layer (lazy-initialized)
243
229
  PIN + salt --> Argon2id --> NaCl SealedBox
@@ -252,8 +238,10 @@ Key points:
252
238
  - **REST data may be encrypted** -- historical email content, passwords, and vault
253
239
  secrets can contain `"e2e::<base64>"` ciphertext that the plugin decrypts
254
240
  client-side using the PIN-derived keypair.
255
- - **Authentication** uses unbound JWTs. The `X-Ravi-Identity` header scopes each
256
- API request to a specific identity.
241
+ - **Tool responses** return MCP-style content arrays (e.g. `[{ type: "text", text: "..." }]`),
242
+ letting the runtime render structured results natively.
243
+ - **Authentication** uses unbound JWTs stored in `~/.ravi/auth.json`. The
244
+ `X-Ravi-Identity` header scopes each API request to a specific identity.
257
245
 
258
246
  ## Development
259
247
 
package/dist/index.d.ts CHANGED
@@ -28,31 +28,45 @@ export declare const allTools: import("./index.js").ToolDefinition[];
28
28
  /**
29
29
  * Minimal OpenClaw Plugin API type.
30
30
  *
31
- * Defines the contract between the plugin and the OpenClaw runtime. In
32
- * production this would come from `@openclaw/sdk` types; this local
33
- * definition serves as a pragmatic stand-in until those types are published.
31
+ * Mirrors the real `OpenClawPluginApi` from the OpenClaw runtime. See
32
+ * https://docs.openclaw.ai/tools/plugin and src/plugins/registry.ts in
33
+ * the openclaw/openclaw repo for the authoritative definitions.
34
34
  */
35
35
  interface PluginAPI {
36
- /** Retrieve the typed plugin configuration. */
37
- getConfig<T>(): T;
38
- /** Retrieve the raw (untyped) plugin configuration object. */
39
- getRawConfig(): Record<string, unknown>;
40
- /** The OpenClaw agent identifier, if available. */
41
- agentId?: string;
42
- /** Register a tool that agents can invoke. */
36
+ /** Full OpenClaw gateway configuration. */
37
+ config: Record<string, unknown>;
38
+ /** Validated plugin-specific config from plugins.entries.ravi.config. */
39
+ pluginConfig?: Record<string, unknown>;
40
+ /** Structured logger (info, warn, error, debug). */
41
+ logger: {
42
+ info: (...args: unknown[]) => void;
43
+ warn: (...args: unknown[]) => void;
44
+ error: (...args: unknown[]) => void;
45
+ debug: (...args: unknown[]) => void;
46
+ };
47
+ /** Register an agent tool. See https://docs.openclaw.ai/plugins/agent-tools */
43
48
  registerTool(tool: {
44
49
  name: string;
45
50
  description: string;
46
51
  parameters: unknown;
47
- handler: (params: Record<string, unknown>) => Promise<unknown>;
52
+ execute: (id: string, params: Record<string, unknown>) => Promise<{
53
+ content: Array<{
54
+ type: string;
55
+ text: string;
56
+ }>;
57
+ }>;
58
+ }, options?: {
59
+ optional?: boolean;
48
60
  }): void;
49
61
  /** Register a messaging channel (email, SMS, etc.). */
50
- registerChannel(channel: unknown): void;
51
- /** Register a CLI subcommand under `openclaw ravi <name>`. */
52
- registerCommand(cmd: {
53
- name: string;
54
- description: string;
55
- handler: (args: string[]) => Promise<string>;
62
+ registerChannel(channel: {
63
+ plugin: unknown;
64
+ }): void;
65
+ /** Register CLI commands via Commander.js-style program. */
66
+ registerCli(registrar: (ctx: {
67
+ program: CLIProgram;
68
+ }) => void, opts?: {
69
+ commands?: string[];
56
70
  }): void;
57
71
  /** Register a background service with start/stop lifecycle. */
58
72
  registerService(svc: {
@@ -60,10 +74,16 @@ interface PluginAPI {
60
74
  start: () => void;
61
75
  stop: () => void;
62
76
  }): void;
63
- /** Gateway for dispatching inbound messages to the OpenClaw runtime. */
64
- gateway: {
65
- dispatch: (message: unknown) => void;
66
- };
77
+ }
78
+ /** Minimal Commander.js program interface for CLI registration. */
79
+ interface CLIProgram {
80
+ command(name: string): CLICommand;
81
+ }
82
+ /** Minimal Commander.js command interface. */
83
+ interface CLICommand {
84
+ description(desc: string): CLICommand;
85
+ argument(name: string, desc?: string): CLICommand;
86
+ action(fn: (...args: unknown[]) => void | Promise<void>): CLICommand;
67
87
  }
68
88
  /**
69
89
  * The OpenClaw plugin registration function.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,YAAY,EACV,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,eAAe,EACf,UAAU,EACV,aAAa,EACb,WAAW,EACX,cAAc,EACd,UAAU,EACV,QAAQ,EACR,UAAU,GACX,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACpF,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACtF,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACxG,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAChG,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAuB3C;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,uCAQpB,CAAC;AAIF;;;;;;GAMG;AACH,UAAU,SAAS;IACjB,+CAA+C;IAC/C,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;IAClB,8DAA8D;IAC9D,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,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E,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;CACtE;AAID;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAgI3D"}
package/dist/index.js CHANGED
@@ -53,24 +53,28 @@ export const allTools = [
53
53
  * @param api - The OpenClaw plugin API provided by the runtime.
54
54
  */
55
55
  export default function registerPlugin(api) {
56
- const config = api.getConfig();
56
+ const config = (api.pluginConfig ?? {});
57
57
  // Load auth from ~/.ravi/auth.json (written by `openclaw ravi login`)
58
58
  const auth = loadAuth();
59
- if (!auth?.access_token) {
60
- console.warn("[ravi] Not authenticated only CLI commands available. Run 'openclaw ravi login' to enable tools and channels.");
61
- // Not logged in — register CLI commands so user can run `openclaw ravi login`
59
+ // ── Always register CLI commands (login works even without auth) ───────
60
+ api.registerCli(({ program }) => {
62
61
  for (const cmd of cliCommands) {
63
- api.registerCommand({
64
- name: cmd.name,
65
- description: cmd.description,
66
- handler: (args) => cmd.handler(args, config),
62
+ program
63
+ .command(cmd.name)
64
+ .description(cmd.description)
65
+ .action(async () => {
66
+ const output = await cmd.handler([], config);
67
+ process.stdout.write(output + "\n");
67
68
  });
68
69
  }
70
+ }, { commands: cliCommands.map((c) => c.name) });
71
+ if (!auth?.access_token) {
72
+ api.logger.warn("Not authenticated — only CLI commands available. Run 'openclaw ravi login' to enable tools and channels.");
69
73
  return;
70
74
  }
71
75
  // Background listener service — created early so onTokenRefresh can update it.
72
76
  const service = new RaviListenerService((message) => {
73
- api.gateway.dispatch(message);
77
+ api.logger.debug("Dispatching inbound message", message);
74
78
  });
75
79
  // Initialize HTTP client from auth.json + config identityUuid
76
80
  const client = new RaviClient({
@@ -92,12 +96,12 @@ export default function registerPlugin(api) {
92
96
  }
93
97
  catch (err) {
94
98
  const detail = err instanceof Error ? err.message : String(err);
95
- console.error(`[ravi] Failed to initialize E2E encryption: ${detail}. ` +
99
+ api.logger.error(`Failed to initialize E2E encryption: ${detail}. ` +
96
100
  `Encrypted data will not be readable. Run 'openclaw ravi login' to fix.`);
97
101
  }
98
102
  }
99
103
  else if (auth.access_token) {
100
- console.warn("[ravi] No encryption keypair found. Encrypted data (passwords, vault) will not be readable. " +
104
+ api.logger.warn("No encryption keypair found. Encrypted data (passwords, vault) will not be readable. " +
101
105
  "Run 'openclaw ravi login' to set up E2E encryption.");
102
106
  }
103
107
  // ── Register all tools ──────────────────────────────────────────────────
@@ -106,22 +110,18 @@ export default function registerPlugin(api) {
106
110
  name: tool.name,
107
111
  description: tool.description,
108
112
  parameters: tool.parameters,
109
- handler: async (params) => {
110
- return tool.handler(params, { client, crypto });
113
+ execute: async (_id, params) => {
114
+ const result = await tool.handler(params, { client, crypto });
115
+ const text = typeof result === "string"
116
+ ? result
117
+ : JSON.stringify(result, null, 2);
118
+ return { content: [{ type: "text", text }] };
111
119
  },
112
120
  });
113
121
  }
114
122
  // ── Register channels ───────────────────────────────────────────────────
115
- api.registerChannel(raviEmailChannel);
116
- api.registerChannel(raviSmsChannel);
117
- // ── Register CLI commands ───────────────────────────────────────────────
118
- for (const cmd of cliCommands) {
119
- api.registerCommand({
120
- name: cmd.name,
121
- description: cmd.description,
122
- handler: (args) => cmd.handler(args, config),
123
- });
124
- }
123
+ api.registerChannel({ plugin: raviEmailChannel });
124
+ api.registerChannel({ plugin: raviSmsChannel });
125
125
  // ── Register background listener service ────────────────────────────────
126
126
  api.registerService({
127
127
  id: "ravi-listener",
@@ -138,7 +138,7 @@ export default function registerPlugin(api) {
138
138
  apiUrl: RAVI_API_URL,
139
139
  token: auth.access_token,
140
140
  identityUuid,
141
- agentId: api.agentId ?? "default",
141
+ agentId: "default",
142
142
  emailAccount: {
143
143
  identityUuid,
144
144
  identityName: name,
@@ -155,7 +155,7 @@ export default function registerPlugin(api) {
155
155
  });
156
156
  }).catch((err) => {
157
157
  const detail = err instanceof Error ? err.message : String(err);
158
- console.error(`[ravi] Failed to start listener: ${detail}`);
158
+ api.logger.error(`Failed to start listener: ${detail}`);
159
159
  });
160
160
  },
161
161
  stop: () => {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoBH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAUvD,gFAAgF;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,8BAA8B,EAAsB,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAA2B,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAyB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,gFAAgF;AAEhF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,GAAG,aAAa;IAChB,GAAG,UAAU;IACb,GAAG,cAAc;IACjB,GAAG,YAAY;IACf,GAAG,aAAa;IAChB,GAAG,UAAU;IACb,GAAG,aAAa;CACjB,CA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AY;oBACpB,KAAK,EAAE,IAAI,CAAC,YAAY;oBACxB,YAAY;oBACZ,OAAO,EAAE,SAAS;oBAClB,YAAY,EAAE;wBACZ,YAAY;wBACZ,YAAY,EAAE,IAAI;wBAClB,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,EAAE;qBAC7B;oBACD,+DAA+D;oBAC/D,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;wBACpB,UAAU,EAAE;4BACV,YAAY;4BACZ,YAAY,EAAE,IAAI;4BAClB,KAAK,EAAE,QAAQ,CAAC,KAAK;yBACtB;qBACF,CAAC,CAAC,CAAC,EAAE,CAAC;iBACR,CAAC,CAAC;YACL,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gBACf,MAAM,MAAM,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAChE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,MAAM,EAAE,CAAC,CAAC;YAC1D,CAAC,CAAC,CAAC;QACL,CAAC;QACD,IAAI,EAAE,GAAG,EAAE;YACT,OAAO,CAAC,OAAO,EAAE,CAAC;QACpB,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ravi-hq/ravi",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "OpenClaw plugin for Ravi — identity provider for AI agents. Email & SMS channels + full agent toolbox.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",