@ravi-hq/ravi 0.6.2 → 0.7.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 +14 -9
- package/dist/auth.d.ts +31 -28
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +28 -51
- package/dist/auth.js.map +1 -1
- package/dist/bin/ravi-secrets.d.ts +1 -2
- package/dist/bin/ravi-secrets.d.ts.map +1 -1
- package/dist/bin/ravi-secrets.js +7 -34
- package/dist/bin/ravi-secrets.js.map +1 -1
- package/dist/channels/email-trusted.d.ts +2 -0
- package/dist/channels/email-trusted.d.ts.map +1 -1
- package/dist/channels/email-trusted.js +18 -51
- package/dist/channels/email-trusted.js.map +1 -1
- package/dist/channels/email.d.ts +2 -0
- package/dist/channels/email.d.ts.map +1 -1
- package/dist/channels/email.js +18 -60
- package/dist/channels/email.js.map +1 -1
- package/dist/cli.d.ts +12 -5
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +178 -307
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +13 -28
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +22 -63
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -73
- package/dist/index.js.map +1 -1
- package/dist/polling.d.ts +2 -12
- package/dist/polling.d.ts.map +1 -1
- package/dist/polling.js +2 -36
- package/dist/polling.js.map +1 -1
- package/dist/tools/contacts.d.ts.map +1 -1
- package/dist/tools/contacts.js +8 -21
- package/dist/tools/contacts.js.map +1 -1
- package/dist/tools/email-send.d.ts.map +1 -1
- package/dist/tools/email-send.js +6 -23
- package/dist/tools/email-send.js.map +1 -1
- package/dist/tools/feedback.d.ts.map +1 -1
- package/dist/tools/feedback.js +1 -5
- package/dist/tools/feedback.js.map +1 -1
- package/dist/tools/identity.d.ts +0 -7
- package/dist/tools/identity.d.ts.map +1 -1
- package/dist/tools/identity.js +6 -26
- package/dist/tools/identity.js.map +1 -1
- package/dist/tools/inbox.d.ts.map +1 -1
- package/dist/tools/inbox.js +4 -24
- package/dist/tools/inbox.js.map +1 -1
- package/dist/tools/passwords.d.ts +1 -7
- package/dist/tools/passwords.d.ts.map +1 -1
- package/dist/tools/passwords.js +24 -81
- package/dist/tools/passwords.js.map +1 -1
- package/dist/tools/secrets.d.ts +1 -3
- package/dist/tools/secrets.d.ts.map +1 -1
- package/dist/tools/secrets.js +13 -49
- package/dist/tools/secrets.js.map +1 -1
- package/dist/tools/sms-send.d.ts.map +1 -1
- package/dist/tools/sms-send.js +1 -6
- package/dist/tools/sms-send.js.map +1 -1
- package/dist/types.d.ts +31 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -2
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +0 -6
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +0 -18
- package/dist/utils.js.map +1 -1
- package/openclaw.plugin.json +1 -0
- package/package.json +1 -5
- package/dist/crypto.d.ts +0 -156
- package/dist/crypto.d.ts.map +0 -1
- package/dist/crypto.js +0 -350
- package/dist/crypto.js.map +0 -1
package/dist/tools/passwords.js
CHANGED
|
@@ -2,52 +2,30 @@
|
|
|
2
2
|
* Password management tools for the Ravi OpenClaw plugin.
|
|
3
3
|
*
|
|
4
4
|
* Provides tools to list, retrieve, create, and delete website credentials
|
|
5
|
-
* stored in the Ravi password manager.
|
|
6
|
-
* available in the tool context, sensitive fields (username, password, notes)
|
|
7
|
-
* are automatically decrypted on read and encrypted on write using E2E
|
|
8
|
-
* NaCl SealedBox encryption.
|
|
9
|
-
*
|
|
10
|
-
* List view intentionally hides password values — use the detail tool
|
|
11
|
-
* (`ravi_passwords_get`) to retrieve the decrypted password for a specific entry.
|
|
5
|
+
* stored in the Ravi password manager.
|
|
12
6
|
*
|
|
13
7
|
* @module tools/passwords
|
|
14
8
|
*/
|
|
15
|
-
import { tryDecrypt } from "../utils.js";
|
|
16
9
|
// ─── Password Tools ─────────────────────────────────────────────────────────
|
|
17
10
|
/** Tools for managing website credentials (list, get, create, delete). */
|
|
18
11
|
export const passwordTools = [
|
|
19
12
|
{
|
|
20
13
|
name: "ravi_passwords_list",
|
|
21
|
-
description: "List all saved website credentials.
|
|
22
|
-
"Passwords are intentionally hidden in list view for security — use ravi_passwords_get with a specific UUID " +
|
|
23
|
-
"to retrieve the decrypted password when you actually need it. " +
|
|
24
|
-
"For API keys and env vars, use ravi_secrets_list instead — passwords are for website credentials only.",
|
|
14
|
+
description: "List all saved website credentials. Passwords are hidden — use ravi_passwords_get for the actual value.",
|
|
25
15
|
parameters: {
|
|
26
16
|
type: "object",
|
|
27
17
|
properties: {},
|
|
28
18
|
required: [],
|
|
29
19
|
},
|
|
30
|
-
handler: async (_params, { client
|
|
20
|
+
handler: async (_params, { client }) => {
|
|
31
21
|
const entries = await client.listPasswords();
|
|
32
22
|
// Never expose passwords in list view — only in detail view.
|
|
33
|
-
|
|
34
|
-
return Promise.all(entries.map(async (entry) => {
|
|
35
|
-
const result = { ...entry, password: "[hidden]" };
|
|
36
|
-
if (crypto) {
|
|
37
|
-
if (entry.username)
|
|
38
|
-
result.username = await tryDecrypt(crypto, entry.username, "password.username");
|
|
39
|
-
if (entry.notes)
|
|
40
|
-
result.notes = await tryDecrypt(crypto, entry.notes, "password.notes");
|
|
41
|
-
}
|
|
42
|
-
return result;
|
|
43
|
-
}));
|
|
23
|
+
return entries.map((entry) => ({ ...entry, password: "[hidden]" }));
|
|
44
24
|
},
|
|
45
25
|
},
|
|
46
26
|
{
|
|
47
27
|
name: "ravi_passwords_get",
|
|
48
|
-
description: "Get a specific password entry with the full decrypted password.
|
|
49
|
-
"Use the UUID from ravi_passwords_list. Returns domain, username, password, and notes — " +
|
|
50
|
-
"all decrypted. Use this when you need to log in to a website or service.",
|
|
28
|
+
description: "Get a specific password entry with the full decrypted password.",
|
|
51
29
|
parameters: {
|
|
52
30
|
type: "object",
|
|
53
31
|
properties: {
|
|
@@ -58,28 +36,13 @@ export const passwordTools = [
|
|
|
58
36
|
},
|
|
59
37
|
required: ["uuid"],
|
|
60
38
|
},
|
|
61
|
-
handler: async (params, { client
|
|
62
|
-
|
|
63
|
-
if (crypto) {
|
|
64
|
-
if (entry.username)
|
|
65
|
-
entry.username = await tryDecrypt(crypto, entry.username, "password.username");
|
|
66
|
-
if (entry.password)
|
|
67
|
-
entry.password = await tryDecrypt(crypto, entry.password, "password.password");
|
|
68
|
-
if (entry.notes)
|
|
69
|
-
entry.notes = await tryDecrypt(crypto, entry.notes, "password.notes");
|
|
70
|
-
}
|
|
71
|
-
return entry;
|
|
39
|
+
handler: async (params, { client }) => {
|
|
40
|
+
return client.getPassword(params.uuid);
|
|
72
41
|
},
|
|
73
42
|
},
|
|
74
43
|
{
|
|
75
44
|
name: "ravi_passwords_create",
|
|
76
|
-
description: "
|
|
77
|
-
"are E2E encrypted before being sent to the server. " +
|
|
78
|
-
"Domain auto-cleaning: URLs like 'https://mail.google.com/inbox' are normalized to 'google.com'. " +
|
|
79
|
-
"If no password is provided, a strong random password is auto-generated and returned in the response. " +
|
|
80
|
-
"Best practice: store credentials immediately after signing up for a service, so you " +
|
|
81
|
-
"don't lose the password. " +
|
|
82
|
-
"For API keys and env vars (not website logins), use ravi_secrets_set instead.",
|
|
45
|
+
description: "Store website credentials (domain + username + password). Auto-generates a strong password if omitted.",
|
|
83
46
|
parameters: {
|
|
84
47
|
type: "object",
|
|
85
48
|
properties: {
|
|
@@ -93,7 +56,7 @@ export const passwordTools = [
|
|
|
93
56
|
},
|
|
94
57
|
password: {
|
|
95
58
|
type: "string",
|
|
96
|
-
description: "Password for the account.
|
|
59
|
+
description: "Password for the account. " +
|
|
97
60
|
"If omitted, a strong random password is auto-generated.",
|
|
98
61
|
},
|
|
99
62
|
notes: {
|
|
@@ -103,30 +66,22 @@ export const passwordTools = [
|
|
|
103
66
|
},
|
|
104
67
|
required: ["domain"],
|
|
105
68
|
},
|
|
106
|
-
handler: async (params, { client
|
|
107
|
-
if (!crypto) {
|
|
108
|
-
return {
|
|
109
|
-
error: "Cannot create password entry: E2E encryption is not configured. " +
|
|
110
|
-
"Add your PIN to the plugin config to enable encrypted storage.",
|
|
111
|
-
};
|
|
112
|
-
}
|
|
69
|
+
handler: async (params, { client }) => {
|
|
113
70
|
const data = {
|
|
114
71
|
domain: params.domain,
|
|
115
72
|
};
|
|
116
|
-
if (params.username !== undefined)
|
|
117
|
-
data.username =
|
|
118
|
-
|
|
73
|
+
if (params.username !== undefined)
|
|
74
|
+
data.username = params.username;
|
|
75
|
+
if (params.notes !== undefined)
|
|
76
|
+
data.notes = params.notes;
|
|
119
77
|
// Auto-generate a strong password when none is provided
|
|
120
78
|
let generatedPassword;
|
|
121
79
|
if (params.password !== undefined) {
|
|
122
|
-
data.password =
|
|
80
|
+
data.password = params.password;
|
|
123
81
|
}
|
|
124
82
|
else {
|
|
125
83
|
generatedPassword = await client.generatePassword({});
|
|
126
|
-
data.password =
|
|
127
|
-
}
|
|
128
|
-
if (params.notes !== undefined) {
|
|
129
|
-
data.notes = await crypto.encrypt(params.notes);
|
|
84
|
+
data.password = generatedPassword;
|
|
130
85
|
}
|
|
131
86
|
const entry = await client.createPassword(data);
|
|
132
87
|
// Include the plaintext generated password so the agent can use it
|
|
@@ -138,10 +93,7 @@ export const passwordTools = [
|
|
|
138
93
|
},
|
|
139
94
|
{
|
|
140
95
|
name: "ravi_passwords_update",
|
|
141
|
-
description: "Update an existing password entry.
|
|
142
|
-
"Only provide the fields you want to change — omitted fields are left unchanged. " +
|
|
143
|
-
"All sensitive fields (username, password, notes) are E2E encrypted before storage. " +
|
|
144
|
-
"Domain auto-cleaning: URLs like 'https://mail.google.com/inbox' are normalized to 'google.com'.",
|
|
96
|
+
description: "Update an existing password entry. Only provided fields are changed.",
|
|
145
97
|
parameters: {
|
|
146
98
|
type: "object",
|
|
147
99
|
properties: {
|
|
@@ -159,7 +111,7 @@ export const passwordTools = [
|
|
|
159
111
|
},
|
|
160
112
|
password: {
|
|
161
113
|
type: "string",
|
|
162
|
-
description: "New password.
|
|
114
|
+
description: "New password.",
|
|
163
115
|
},
|
|
164
116
|
notes: {
|
|
165
117
|
type: "string",
|
|
@@ -168,30 +120,22 @@ export const passwordTools = [
|
|
|
168
120
|
},
|
|
169
121
|
required: ["uuid"],
|
|
170
122
|
},
|
|
171
|
-
handler: async (params, { client
|
|
172
|
-
if (!crypto) {
|
|
173
|
-
return {
|
|
174
|
-
error: "Cannot update password entry: E2E encryption is not configured. " +
|
|
175
|
-
"Add your PIN to the plugin config to enable encrypted storage.",
|
|
176
|
-
};
|
|
177
|
-
}
|
|
123
|
+
handler: async (params, { client }) => {
|
|
178
124
|
const data = {};
|
|
179
125
|
if (params.domain !== undefined)
|
|
180
126
|
data.domain = params.domain;
|
|
181
127
|
if (params.username !== undefined)
|
|
182
|
-
data.username =
|
|
128
|
+
data.username = params.username;
|
|
183
129
|
if (params.password !== undefined)
|
|
184
|
-
data.password =
|
|
130
|
+
data.password = params.password;
|
|
185
131
|
if (params.notes !== undefined)
|
|
186
|
-
data.notes =
|
|
132
|
+
data.notes = params.notes;
|
|
187
133
|
return client.updatePassword(params.uuid, data);
|
|
188
134
|
},
|
|
189
135
|
},
|
|
190
136
|
{
|
|
191
137
|
name: "ravi_generate_password",
|
|
192
|
-
description: "Generate a random password without storing it.
|
|
193
|
-
"before signing up for a service. Default: 16 characters with uppercase, lowercase, digits, and special chars. " +
|
|
194
|
-
"Returns just the generated password string. Use ravi_passwords_create to store it afterward.",
|
|
138
|
+
description: "Generate a random password without storing it.",
|
|
195
139
|
parameters: {
|
|
196
140
|
type: "object",
|
|
197
141
|
properties: {
|
|
@@ -230,8 +174,7 @@ export const passwordTools = [
|
|
|
230
174
|
},
|
|
231
175
|
{
|
|
232
176
|
name: "ravi_passwords_delete",
|
|
233
|
-
description: "Delete a password entry by UUID.
|
|
234
|
-
"Use ravi_passwords_list to find the UUID of the entry to delete.",
|
|
177
|
+
description: "Delete a password entry by UUID. Permanent and cannot be undone.",
|
|
235
178
|
parameters: {
|
|
236
179
|
type: "object",
|
|
237
180
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passwords.js","sourceRoot":"","sources":["../../src/tools/passwords.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"passwords.js","sourceRoot":"","sources":["../../src/tools/passwords.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,+EAA+E;AAE/E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,aAAa,GAAqB;IAC7C;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,yGAAyG;QAC3G,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAE;SACb;QACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACrC,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,aAAa,EAAE,CAAC;YAC7C,6DAA6D;YAC7D,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,UAAoB,EAAE,CAAC,CAAC,CAAC;QAChF,CAAC;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EACT,iEAAiE;QACnE,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uDAAuD;iBACrE;aACF;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB;QACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACpC,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,IAAc,CAAC,CAAC;QACnD,CAAC;KACF;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;QACpE,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,iEAAiE;iBAC/E;aACF;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB;QACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACpC,MAAM,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,IAAc,CAAC,CAAC;YACnD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QAClD,CAAC;KACF;CACF,CAAC"}
|
package/dist/tools/secrets.d.ts
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
* Secret management tools for the Ravi OpenClaw plugin.
|
|
3
3
|
*
|
|
4
4
|
* Provides tools to list, retrieve, and store key-value secrets in the Ravi
|
|
5
|
-
* secrets store.
|
|
6
|
-
* are automatically decrypted on read and encrypted on write using E2E
|
|
7
|
-
* NaCl SealedBox encryption.
|
|
5
|
+
* secrets store.
|
|
8
6
|
*
|
|
9
7
|
* @module tools/secrets
|
|
10
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/tools/secrets.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/tools/secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC;AAI5C,6EAA6E;AAC7E,eAAO,MAAM,YAAY,EAAE,cAAc,EAsFxC,CAAC"}
|
package/dist/tools/secrets.js
CHANGED
|
@@ -2,43 +2,29 @@
|
|
|
2
2
|
* Secret management tools for the Ravi OpenClaw plugin.
|
|
3
3
|
*
|
|
4
4
|
* Provides tools to list, retrieve, and store key-value secrets in the Ravi
|
|
5
|
-
* secrets store.
|
|
6
|
-
* are automatically decrypted on read and encrypted on write using E2E
|
|
7
|
-
* NaCl SealedBox encryption.
|
|
5
|
+
* secrets store.
|
|
8
6
|
*
|
|
9
7
|
* @module tools/secrets
|
|
10
8
|
*/
|
|
11
|
-
import { tryDecrypt } from "../utils.js";
|
|
12
9
|
// ─── Secrets Tools ──────────────────────────────────────────────────────────
|
|
13
10
|
/** Tools for managing secrets in the Ravi secrets store (list, get, set). */
|
|
14
11
|
export const secretsTools = [
|
|
15
12
|
{
|
|
16
13
|
name: "ravi_secrets_list",
|
|
17
|
-
description: "List all secret keys
|
|
18
|
-
"values are hidden in list view for security. Use ravi_secrets_get with a specific key to retrieve the value. " +
|
|
19
|
-
"For website credentials (domain + username + password), use ravi_passwords_list instead.",
|
|
14
|
+
description: "List all secret keys. Values are hidden — use ravi_secrets_get to retrieve.",
|
|
20
15
|
parameters: {
|
|
21
16
|
type: "object",
|
|
22
17
|
properties: {},
|
|
23
18
|
required: [],
|
|
24
19
|
},
|
|
25
|
-
handler: async (_params, { client
|
|
20
|
+
handler: async (_params, { client }) => {
|
|
26
21
|
const secrets = await client.listSecrets();
|
|
27
|
-
return
|
|
28
|
-
const result = { ...s, value: "[hidden]" };
|
|
29
|
-
if (crypto && s.notes) {
|
|
30
|
-
result.notes = await tryDecrypt(crypto, s.notes, "secrets.notes");
|
|
31
|
-
}
|
|
32
|
-
return result;
|
|
33
|
-
}));
|
|
22
|
+
return secrets.map((s) => ({ ...s, value: "[hidden]" }));
|
|
34
23
|
},
|
|
35
24
|
},
|
|
36
25
|
{
|
|
37
26
|
name: "ravi_secrets_get",
|
|
38
|
-
description: "Get a secret
|
|
39
|
-
"Response includes the secret's UUID (needed for ravi_secrets_delete). " +
|
|
40
|
-
"Use this to retrieve API keys, tokens, or any sensitive configuration values at runtime. " +
|
|
41
|
-
"Keys follow the convention: UPPERCASE_WITH_UNDERSCORES (e.g. OPENAI_API_KEY, STRIPE_SECRET_KEY).",
|
|
27
|
+
description: "Get a secret value by key name.",
|
|
42
28
|
parameters: {
|
|
43
29
|
type: "object",
|
|
44
30
|
properties: {
|
|
@@ -50,24 +36,13 @@ export const secretsTools = [
|
|
|
50
36
|
},
|
|
51
37
|
required: ["key"],
|
|
52
38
|
},
|
|
53
|
-
handler: async (params, { client
|
|
54
|
-
|
|
55
|
-
if (crypto) {
|
|
56
|
-
if (secret.value)
|
|
57
|
-
secret.value = await tryDecrypt(crypto, secret.value, "secrets.value");
|
|
58
|
-
if (secret.notes)
|
|
59
|
-
secret.notes = await tryDecrypt(crypto, secret.notes, "secrets.notes");
|
|
60
|
-
}
|
|
61
|
-
return secret;
|
|
39
|
+
handler: async (params, { client }) => {
|
|
40
|
+
return client.getSecret(params.key);
|
|
62
41
|
},
|
|
63
42
|
},
|
|
64
43
|
{
|
|
65
44
|
name: "ravi_secrets_set",
|
|
66
|
-
description: "Store a secret
|
|
67
|
-
"Fails if a secret with the same key already exists — use ravi_secrets_delete first, then re-create. " +
|
|
68
|
-
"Use this to store API keys, tokens, or any sensitive configuration values securely. " +
|
|
69
|
-
"Keys must be UPPERCASE_WITH_UNDERSCORES (e.g. OPENAI_API_KEY). " +
|
|
70
|
-
"For website login credentials (domain + username + password), use ravi_passwords_create instead.",
|
|
45
|
+
description: "Store a key-value secret. Fails if key already exists.",
|
|
71
46
|
parameters: {
|
|
72
47
|
type: "object",
|
|
73
48
|
properties: {
|
|
@@ -78,33 +53,22 @@ export const secretsTools = [
|
|
|
78
53
|
},
|
|
79
54
|
value: {
|
|
80
55
|
type: "string",
|
|
81
|
-
description: "The secret value to store
|
|
56
|
+
description: "The secret value to store",
|
|
82
57
|
},
|
|
83
58
|
notes: {
|
|
84
59
|
type: "string",
|
|
85
|
-
description: "Optional notes about the secret
|
|
60
|
+
description: "Optional notes about the secret",
|
|
86
61
|
},
|
|
87
62
|
},
|
|
88
63
|
required: ["key", "value"],
|
|
89
64
|
},
|
|
90
|
-
handler: async (params, { client
|
|
91
|
-
|
|
92
|
-
return {
|
|
93
|
-
error: "Cannot store secret: E2E encryption is not configured. " +
|
|
94
|
-
"Add your PIN to the plugin config to enable encrypted storage.",
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
const value = await crypto.encrypt(params.value);
|
|
98
|
-
const notes = params.notes !== undefined
|
|
99
|
-
? await crypto.encrypt(params.notes)
|
|
100
|
-
: undefined;
|
|
101
|
-
return client.setSecret(params.key, value, notes);
|
|
65
|
+
handler: async (params, { client }) => {
|
|
66
|
+
return client.setSecret(params.key, params.value, params.notes);
|
|
102
67
|
},
|
|
103
68
|
},
|
|
104
69
|
{
|
|
105
70
|
name: "ravi_secrets_delete",
|
|
106
|
-
description: "Delete a secret
|
|
107
|
-
"Use ravi_secrets_list or ravi_secrets_get to find the UUID of the secret to delete.",
|
|
71
|
+
description: "Delete a secret by UUID. Permanent and cannot be undone.",
|
|
108
72
|
parameters: {
|
|
109
73
|
type: "object",
|
|
110
74
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../src/tools/secrets.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../src/tools/secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,+EAA+E;AAE/E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,YAAY,GAAqB;IAC5C;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EACT,6EAA6E;QAC/E,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAE;SACb;QACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACrC,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC;YA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ACT,0DAA0D;QAC5D,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2EAA2E;iBACzF;aACF;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB;QACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACpC,MAAM,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,IAAc,CAAC,CAAC;YACjD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QAClD,CAAC;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sms-send.d.ts","sourceRoot":"","sources":["../../src/tools/sms-send.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,eAAe,CAAC;AAEjE,qCAAqC;AACrC,eAAO,MAAM,YAAY,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"sms-send.d.ts","sourceRoot":"","sources":["../../src/tools/sms-send.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,eAAe,CAAC;AAEjE,qCAAqC;AACrC,eAAO,MAAM,YAAY,EAAE,cAAc,EAyBxC,CAAC"}
|
package/dist/tools/sms-send.js
CHANGED
|
@@ -9,12 +9,7 @@
|
|
|
9
9
|
export const smsSendTools = [
|
|
10
10
|
{
|
|
11
11
|
name: "ravi_sms_send",
|
|
12
|
-
description: "Send an SMS message from the active identity's phone number.
|
|
13
|
-
"IMPORTANT: If you only have the recipient's name (e.g. 'text Bob'), use ravi_contacts_search first " +
|
|
14
|
-
"to look up their phone number. If multiple contacts match, confirm with the user before sending. " +
|
|
15
|
-
"The identity must have a provisioned phone number (check with ravi_get_info). " +
|
|
16
|
-
"SMS messages are plain text only, max 1600 characters. " +
|
|
17
|
-
"The sent message will appear in the SMS inbox as an outgoing message.",
|
|
12
|
+
description: "Send an SMS message from the active identity's phone number.",
|
|
18
13
|
parameters: {
|
|
19
14
|
type: "object",
|
|
20
15
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sms-send.js","sourceRoot":"","sources":["../../src/tools/sms-send.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,qCAAqC;AACrC,MAAM,CAAC,MAAM,YAAY,GAAqB;IAC5C;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EACT
|
|
1
|
+
{"version":3,"file":"sms-send.js","sourceRoot":"","sources":["../../src/tools/sms-send.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,qCAAqC;AACrC,MAAM,CAAC,MAAM,YAAY,GAAqB;IAC5C;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EACT,8DAA8D;QAChE,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,qEAAqE;wBACrE,sDAAsD;iBACzD;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oDAAoD;iBAClE;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC;SAChC;QACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACpC,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAmB,EAAE,MAAM,CAAC,IAAc,CAAC,CAAC;QAC3E,CAAC;KACF;CACF,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export interface Identity {
|
|
|
6
6
|
inbox: string | null;
|
|
7
7
|
phone: string | null;
|
|
8
8
|
created_dt: string;
|
|
9
|
+
/** API key returned on identity creation (agent-created identities only). */
|
|
10
|
+
api_key?: string;
|
|
9
11
|
}
|
|
10
12
|
/** Email thread from GET /api/email-inbox/ */
|
|
11
13
|
export interface EmailThread {
|
|
@@ -89,11 +91,8 @@ export interface PresignResponse {
|
|
|
89
91
|
export interface PasswordEntry {
|
|
90
92
|
uuid: string;
|
|
91
93
|
domain: string;
|
|
92
|
-
/** E2E encrypted */
|
|
93
94
|
username: string;
|
|
94
|
-
/** E2E encrypted */
|
|
95
95
|
password: string;
|
|
96
|
-
/** E2E encrypted */
|
|
97
96
|
notes: string;
|
|
98
97
|
created_dt: string;
|
|
99
98
|
updated_dt: string;
|
|
@@ -102,9 +101,7 @@ export interface PasswordEntry {
|
|
|
102
101
|
export interface SecretEntry {
|
|
103
102
|
uuid: string;
|
|
104
103
|
key: string;
|
|
105
|
-
/** E2E encrypted */
|
|
106
104
|
value: string;
|
|
107
|
-
/** E2E encrypted */
|
|
108
105
|
notes: string;
|
|
109
106
|
created_dt: string;
|
|
110
107
|
updated_dt: string;
|
|
@@ -173,6 +170,10 @@ export interface GatewayLogger {
|
|
|
173
170
|
* If the OpenClaw runtime API changes, TypeScript will flag breakage here.
|
|
174
171
|
*/
|
|
175
172
|
export interface PluginRuntimeSubset {
|
|
173
|
+
config: {
|
|
174
|
+
loadConfig(): Record<string, unknown>;
|
|
175
|
+
writeConfigFile(cfg: Record<string, unknown>): Promise<void>;
|
|
176
|
+
};
|
|
176
177
|
channel: {
|
|
177
178
|
routing: {
|
|
178
179
|
resolveAgentRoute(opts: {
|
|
@@ -218,10 +219,31 @@ export interface BaseGatewayContext<TAccount> {
|
|
|
218
219
|
/** Structured logger; may be absent in minimal environments. */
|
|
219
220
|
log?: GatewayLogger;
|
|
220
221
|
}
|
|
222
|
+
/** Response from POST /api/auth/device/token/ after successful authorization. */
|
|
223
|
+
export interface DeviceTokenResponse {
|
|
224
|
+
management_key: string;
|
|
225
|
+
user: {
|
|
226
|
+
id: number;
|
|
227
|
+
email: string;
|
|
228
|
+
first_name: string;
|
|
229
|
+
last_name: string;
|
|
230
|
+
};
|
|
231
|
+
identity_key?: string;
|
|
232
|
+
identity?: {
|
|
233
|
+
uuid: string;
|
|
234
|
+
name: string;
|
|
235
|
+
email: string | null;
|
|
236
|
+
};
|
|
237
|
+
identities?: Array<{
|
|
238
|
+
uuid: string;
|
|
239
|
+
name: string;
|
|
240
|
+
email: string | null;
|
|
241
|
+
}>;
|
|
242
|
+
}
|
|
221
243
|
/**
|
|
222
244
|
* Configuration shape for the Ravi OpenClaw plugin.
|
|
223
245
|
*
|
|
224
|
-
* Auth credentials (tokens, keypair) are stored in ~/.ravi/
|
|
246
|
+
* Auth credentials (tokens, keypair) are stored in ~/.ravi/config.json
|
|
225
247
|
* (managed by `openclaw ravi onboard`). The OpenClaw config only needs
|
|
226
248
|
* the identity UUID to scope this agent to a specific Ravi identity.
|
|
227
249
|
*/
|
|
@@ -230,5 +252,8 @@ export interface RaviPluginConfig {
|
|
|
230
252
|
* Set in the OpenClaw agent config (each agent binds to one identity).
|
|
231
253
|
* Optional at install time; set automatically by `openclaw ravi onboard`. */
|
|
232
254
|
identityUuid?: string;
|
|
255
|
+
/** Identity API key (ravi_id_...). Set per-agent for multi-agent setups.
|
|
256
|
+
* When present, takes precedence over the file-based identity_key. */
|
|
257
|
+
identityKey?: string;
|
|
233
258
|
}
|
|
234
259
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA,yCAAyC;AACzC,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,E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EAAE,MAAM,CAAC;IACtB;2EACuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
package/dist/types.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// ─── API Response Types ──────────────────────────────────────────────────────
|
|
2
2
|
// TypeScript interfaces mirroring the Ravi backend Django REST Framework
|
|
3
|
-
// serializers.
|
|
4
|
-
// Vault fields (passwords/secrets) are E2E encrypted ("e2e::<base64>").
|
|
3
|
+
// serializers. All fields are server-side encrypted (plaintext in API).
|
|
5
4
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
6
5
|
export {};
|
|
7
6
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yEAAyE;AACzE,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yEAAyE;AACzE,wEAAwE;AACxE,gFAAgF"}
|
package/dist/utils.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module utils
|
|
5
5
|
*/
|
|
6
|
-
import type { CryptoManager } from "./crypto.js";
|
|
7
6
|
/**
|
|
8
7
|
* Prepare text for email sending as HTML.
|
|
9
8
|
*
|
|
@@ -12,9 +11,4 @@ import type { CryptoManager } from "./crypto.js";
|
|
|
12
11
|
* and the result is wrapped in a `<div>` element.
|
|
13
12
|
*/
|
|
14
13
|
export declare function wrapInHtml(text: string): string;
|
|
15
|
-
/**
|
|
16
|
-
* Try to decrypt a value, returning a fallback on failure.
|
|
17
|
-
* Logs the first decryption failure to help diagnose wrong-PIN issues.
|
|
18
|
-
*/
|
|
19
|
-
export declare function tryDecrypt(crypto: CryptoManager, value: string, context: string): Promise<string>;
|
|
20
14
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAU/C"}
|
package/dist/utils.js
CHANGED
|
@@ -21,22 +21,4 @@ export function wrapInHtml(text) {
|
|
|
21
21
|
.replace(/\n/g, "<br>");
|
|
22
22
|
return `<div>${escaped}</div>`;
|
|
23
23
|
}
|
|
24
|
-
let decryptionWarningLogged = false;
|
|
25
|
-
/**
|
|
26
|
-
* Try to decrypt a value, returning a fallback on failure.
|
|
27
|
-
* Logs the first decryption failure to help diagnose wrong-PIN issues.
|
|
28
|
-
*/
|
|
29
|
-
export async function tryDecrypt(crypto, value, context) {
|
|
30
|
-
try {
|
|
31
|
-
return await crypto.decrypt(value);
|
|
32
|
-
}
|
|
33
|
-
catch (err) {
|
|
34
|
-
if (!decryptionWarningLogged) {
|
|
35
|
-
const detail = err instanceof Error ? err.message : String(err);
|
|
36
|
-
console.error(`[ravi] Decryption failed (${context}): ${detail}. Wrong PIN?`);
|
|
37
|
-
decryptionWarningLogged = true;
|
|
38
|
-
}
|
|
39
|
-
return "[decryption failed]";
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
24
|
//# sourceMappingURL=utils.js.map
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,IAAI,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,OAAO,GAAG,IAAI;SACjB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1B,OAAO,QAAQ,OAAO,QAAQ,CAAC;AACjC,CAAC"}
|
package/openclaw.plugin.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"identityUuid": { "type": "string" },
|
|
9
|
+
"identityKey": { "type": "string", "description": "Identity API key (ravi_id_...). Set per-agent for multi-agent setups." },
|
|
9
10
|
"externalEmail": {
|
|
10
11
|
"type": "boolean",
|
|
11
12
|
"default": true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ravi-hq/ravi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "OpenClaw plugin for Ravi — identity provider for AI agents. Email channels + full agent toolbox.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -32,10 +32,6 @@
|
|
|
32
32
|
}
|
|
33
33
|
]
|
|
34
34
|
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"hash-wasm": "^4.11.0",
|
|
37
|
-
"tweetnacl": "^1.0.3"
|
|
38
|
-
},
|
|
39
35
|
"devDependencies": {
|
|
40
36
|
"@types/node": "^22.0.0",
|
|
41
37
|
"tsx": "^4.21.0",
|