@ravi-hq/ravi 0.5.4 → 0.5.5

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.
Files changed (79) hide show
  1. package/README.md +56 -69
  2. package/dist/auth.d.ts +2 -0
  3. package/dist/auth.d.ts.map +1 -1
  4. package/dist/auth.js.map +1 -1
  5. package/dist/bin/ravi-secrets.d.ts +3 -3
  6. package/dist/bin/ravi-secrets.js +7 -7
  7. package/dist/bin/ravi-secrets.js.map +1 -1
  8. package/dist/channels/email-trusted.d.ts.map +1 -1
  9. package/dist/channels/email-trusted.js +5 -7
  10. package/dist/channels/email-trusted.js.map +1 -1
  11. package/dist/channels/email-untrusted.d.ts.map +1 -1
  12. package/dist/channels/email-untrusted.js +5 -7
  13. package/dist/channels/email-untrusted.js.map +1 -1
  14. package/dist/channels/email.d.ts +12 -12
  15. package/dist/channels/email.d.ts.map +1 -1
  16. package/dist/channels/email.js +48 -49
  17. package/dist/channels/email.js.map +1 -1
  18. package/dist/cli.d.ts +15 -2
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/cli.js +271 -211
  21. package/dist/cli.js.map +1 -1
  22. package/dist/client.d.ts +62 -22
  23. package/dist/client.d.ts.map +1 -1
  24. package/dist/client.js +75 -33
  25. package/dist/client.js.map +1 -1
  26. package/dist/index.d.ts +5 -9
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +17 -26
  29. package/dist/index.js.map +1 -1
  30. package/dist/sse-pool.d.ts +5 -2
  31. package/dist/sse-pool.d.ts.map +1 -1
  32. package/dist/sse-pool.js +9 -7
  33. package/dist/sse-pool.js.map +1 -1
  34. package/dist/sse.d.ts +7 -21
  35. package/dist/sse.d.ts.map +1 -1
  36. package/dist/sse.js +10 -33
  37. package/dist/sse.js.map +1 -1
  38. package/dist/tools/contacts.d.ts +14 -0
  39. package/dist/tools/contacts.d.ts.map +1 -0
  40. package/dist/tools/contacts.js +186 -0
  41. package/dist/tools/contacts.js.map +1 -0
  42. package/dist/tools/email-send.d.ts.map +1 -1
  43. package/dist/tools/email-send.js +11 -4
  44. package/dist/tools/email-send.js.map +1 -1
  45. package/dist/tools/identity.d.ts +2 -2
  46. package/dist/tools/identity.d.ts.map +1 -1
  47. package/dist/tools/identity.js +14 -6
  48. package/dist/tools/identity.js.map +1 -1
  49. package/dist/tools/inbox.js +7 -7
  50. package/dist/tools/inbox.js.map +1 -1
  51. package/dist/tools/passwords.d.ts.map +1 -1
  52. package/dist/tools/passwords.js +20 -7
  53. package/dist/tools/passwords.js.map +1 -1
  54. package/dist/tools/secrets.d.ts +15 -0
  55. package/dist/tools/secrets.d.ts.map +1 -0
  56. package/dist/tools/{vault.js → secrets.js} +23 -23
  57. package/dist/tools/secrets.js.map +1 -0
  58. package/dist/tools/sms-send.d.ts.map +1 -1
  59. package/dist/tools/sms-send.js +3 -1
  60. package/dist/tools/sms-send.js.map +1 -1
  61. package/dist/types.d.ts +18 -12
  62. package/dist/types.d.ts.map +1 -1
  63. package/openclaw.plugin.json +1 -1
  64. package/package.json +4 -13
  65. package/dist/channels/sms-trusted.d.ts +0 -161
  66. package/dist/channels/sms-trusted.d.ts.map +0 -1
  67. package/dist/channels/sms-trusted.js +0 -306
  68. package/dist/channels/sms-trusted.js.map +0 -1
  69. package/dist/channels/sms-untrusted.d.ts +0 -124
  70. package/dist/channels/sms-untrusted.d.ts.map +0 -1
  71. package/dist/channels/sms-untrusted.js +0 -269
  72. package/dist/channels/sms-untrusted.js.map +0 -1
  73. package/dist/channels/sms.d.ts +0 -269
  74. package/dist/channels/sms.d.ts.map +0 -1
  75. package/dist/channels/sms.js +0 -380
  76. package/dist/channels/sms.js.map +0 -1
  77. package/dist/tools/vault.d.ts +0 -15
  78. package/dist/tools/vault.d.ts.map +0 -1
  79. package/dist/tools/vault.js.map +0 -1
@@ -1,380 +0,0 @@
1
- // ─── Channel Definition ──────────────────────────────────────────────────────
2
- /**
3
- * Creates the ravi-sms channel definition for OpenClaw.
4
- *
5
- * All messages from one phone number are grouped into a single session:
6
- * - A new `from_number` triggers creation of a new session.
7
- * - A known `from_number` resumes the existing session.
8
- *
9
- * The channel is a plain object (not a class) following OpenClaw's
10
- * declarative channel convention.
11
- *
12
- * @returns The ravi-sms channel definition object.
13
- */
14
- export function createSmsChannel() {
15
- return {
16
- id: "ravi-sms",
17
- meta: {
18
- id: "ravi-sms",
19
- label: "Ravi SMS",
20
- selectionLabel: "Ravi SMS (AI Agent Identity)",
21
- blurb: "SMS channel via Ravi identity provider. All messages from one phone number form a single agent session.",
22
- aliases: ["ravi-text"],
23
- },
24
- capabilities: {
25
- chatTypes: ["direct"],
26
- },
27
- config: {
28
- /**
29
- * List all configured account IDs (identity UUIDs) for the ravi-sms channel.
30
- *
31
- * Reads from the plugin config path first (set by `openclaw ravi login`),
32
- * then falls back to the standard `channels.ravi-sms.accounts` path.
33
- * Deduplicates when both sources contain the same UUID.
34
- *
35
- * @param cfg - The full OpenClaw gateway configuration object.
36
- * @returns Array of identity UUID strings.
37
- */
38
- listAccountIds: (cfg) => {
39
- // Primary: read from plugin config (set by `openclaw ravi login`)
40
- const plugins = cfg.plugins;
41
- const uuid = plugins?.entries?.ravi?.config?.identityUuid;
42
- // Fallback: standard channel accounts path
43
- const channels = cfg.channels;
44
- const channelIds = Object.keys(channels?.["ravi-sms"]?.accounts ?? {});
45
- // Deduplicate — plugin config uuid takes priority
46
- if (uuid) {
47
- return [uuid, ...channelIds.filter((id) => id !== uuid)];
48
- }
49
- return channelIds;
50
- },
51
- /**
52
- * Resolve an account configuration by its ID (identity UUID).
53
- *
54
- * Returns a minimal config with just the UUID if the account is not
55
- * found in the standard channels path. The gateway adapter will fetch
56
- * identity details at startup.
57
- *
58
- * @param cfg - The full OpenClaw gateway configuration object.
59
- * @param accountId - The identity UUID to look up.
60
- * @returns The resolved {@link SmsAccountConfig}.
61
- */
62
- resolveAccount: (cfg, accountId) => {
63
- const channels = cfg.channels;
64
- const found = channels?.["ravi-sms"]?.accounts?.[accountId];
65
- if (found)
66
- return found;
67
- // Fallback: return minimal config — gateway adapter fetches details at startup
68
- return {
69
- identityUuid: accountId,
70
- identityName: "",
71
- phone: "",
72
- };
73
- },
74
- },
75
- /**
76
- * Normalize an inbound SSE SMS event into a channel message envelope.
77
- *
78
- * Only owner events reach this channel — trust-level routing happens
79
- * at the SSE layer. No read-only or sender classification needed.
80
- *
81
- * @param event - The raw {@link SmsEvent} from the SSE stream.
82
- * @param account - The {@link SmsAccountConfig} for the receiving identity.
83
- * @returns A normalized {@link SmsInboundEnvelope}. Current implementation always returns non-null.
84
- */
85
- normalizeInbound(event, account) {
86
- return {
87
- senderId: event.from_number,
88
- text: event.body,
89
- threadId: event.from_number,
90
- metadata: {
91
- conversationId: event.conversation_id,
92
- },
93
- };
94
- },
95
- outbound: {
96
- deliveryMode: "direct",
97
- /**
98
- * Send an SMS reply to the phone number that triggered this session.
99
- *
100
- * Calls {@link RaviClient.sendSms} with the plain-text body (no HTML
101
- * wrapping, unlike the email channel).
102
- *
103
- * @param params.text - Plain-text message body.
104
- * @param params.client - An authenticated {@link RaviClient} instance.
105
- * @param params.threadContext - Thread context containing the recipient's phone number.
106
- * @returns A result object indicating success or failure.
107
- */
108
- sendText: async (params) => {
109
- const { text, client, threadContext } = params;
110
- if (!threadContext?.phoneNumber) {
111
- return {
112
- ok: false,
113
- error: "No SMS thread context — cannot send without a recipient phone number",
114
- };
115
- }
116
- try {
117
- await client.sendSms(threadContext.phoneNumber, text);
118
- return { ok: true };
119
- }
120
- catch (error) {
121
- const message = error instanceof Error ? error.message : "Unknown error";
122
- return { ok: false, error: `Failed to send SMS: ${message}` };
123
- }
124
- },
125
- },
126
- /**
127
- * Generate the session key for this channel.
128
- *
129
- * The key uniquely identifies a session by combining the agent, account,
130
- * and phone number. OpenClaw uses this to route inbound events to the
131
- * correct session and persist session state.
132
- *
133
- * For SMS, all messages from the same phone number share one session,
134
- * so `phoneNumber` is used as the conversation discriminator (unlike
135
- * email which uses `threadId`).
136
- *
137
- * Format: `agent:{agentId}:ravi-sms:{accountId}:dm:{phoneNumber}`
138
- *
139
- * @param agentId - The OpenClaw agent identifier.
140
- * @param accountId - The identity UUID (account ID).
141
- * @param phoneNumber - The other party's phone number (E.164 format).
142
- * @returns The deterministic session key string.
143
- */
144
- getSessionKey(agentId, accountId, phoneNumber) {
145
- return `agent:${agentId}:ravi-sms:${accountId}:dm:${phoneNumber}`;
146
- },
147
- // ─── Gateway Adapter ──────────────────────────────────────────────────
148
- gateway: {
149
- /**
150
- * Start monitoring inbound SMS for a single identity account.
151
- *
152
- * Called by the ChannelManager once per account. Opens an SSE stream
153
- * to the Ravi backend, dispatches inbound SMS through the OpenClaw
154
- * reply pipeline, and blocks until the abort signal fires.
155
- *
156
- * Bails out early if the identity has no phone number — SMS requires
157
- * a provisioned phone number.
158
- *
159
- * Only owner events reach this adapter — trust-level routing at the
160
- * SSE layer filters out non-owner senders before they arrive here.
161
- *
162
- * @param ctx - Gateway context provided by the ChannelManager.
163
- * @returns Promise that resolves when the account is stopped.
164
- */
165
- startAccount: async (ctx) => {
166
- const log = ctx.log ?? {
167
- info: (...args) => console.log("[ravi-sms]", ...args),
168
- warn: (...args) => console.warn("[ravi-sms]", ...args),
169
- error: (...args) => console.error("[ravi-sms]", ...args),
170
- };
171
- // Lazy imports — only loaded when the gateway actually starts an account.
172
- // This avoids pulling in runtime/auth/config/client/sse in test environments
173
- // where gateway.startAccount() is never called.
174
- let getRaviRuntime, loadAuth, updateAuth, RAVI_API_URL, RaviClient, acquireSSEClient, releaseSSEClient;
175
- try {
176
- ({ getRaviRuntime } = await import("../runtime.js"));
177
- ({ loadAuth, updateAuth } = await import("../auth.js"));
178
- ({ RAVI_API_URL } = await import("../config.js"));
179
- ({ RaviClient } = await import("../client.js"));
180
- ({ acquireSSEClient, releaseSSEClient } = await import("../sse-pool.js"));
181
- }
182
- catch (err) {
183
- const detail = err instanceof Error ? err.message : String(err);
184
- log.error(`[ravi-sms] Failed to load dependencies: ${detail}. Is the plugin built correctly?`);
185
- return;
186
- }
187
- const runtime = getRaviRuntime();
188
- const auth = loadAuth();
189
- if (!auth?.access_token) {
190
- log.error("[ravi-sms] No auth credentials — cannot start SMS channel. Run 'openclaw ravi login'.");
191
- return;
192
- }
193
- // Track the current token — onTokenRefresh updates this when the
194
- // REST client auto-refreshes on 401, so the SSE client (created after
195
- // the first REST call) gets the fresh token instead of the stale one.
196
- let currentToken = auth.access_token;
197
- let sse = null;
198
- // Build HTTP client for identity lookup + outbound replies
199
- const client = new RaviClient({
200
- apiUrl: RAVI_API_URL,
201
- token: auth.access_token,
202
- refreshToken: auth.refresh_token,
203
- identityUuid: ctx.accountId,
204
- onTokenRefresh: (newToken) => {
205
- currentToken = newToken;
206
- try {
207
- updateAuth({ access_token: newToken });
208
- }
209
- catch (err) {
210
- const detail = err instanceof Error ? err.message : String(err);
211
- log.error(`[ravi-sms] Failed to persist refreshed token: ${detail}`);
212
- }
213
- sse?.updateToken(newToken);
214
- },
215
- });
216
- // Fetch identity details (phone number, name) if not in config
217
- let phone = ctx.account.phone;
218
- let identityName = ctx.account.identityName;
219
- if (!phone) {
220
- try {
221
- const identities = await client.listIdentities();
222
- const identity = identities.find((i) => i.uuid === ctx.accountId);
223
- phone = identity?.phone ?? "";
224
- identityName = identity?.display_name ?? identity?.name ?? ctx.accountId;
225
- }
226
- catch (err) {
227
- if (err?.name === "RaviApiError") {
228
- const status = err.status;
229
- log.error(`[ravi-sms] Failed to fetch identity details (HTTP ${status}): ${err.message}` +
230
- (status === 401 ? ". Token may be expired — run 'openclaw ravi login'." : ""));
231
- }
232
- else {
233
- const detail = err instanceof Error ? err.message : String(err);
234
- log.error(`[ravi-sms] Failed to fetch identity details: ${detail}`);
235
- }
236
- return;
237
- }
238
- }
239
- // SMS requires a phone number — bail out if the identity doesn't have one
240
- if (!phone) {
241
- log.info(`[ravi-sms] Identity ${identityName} has no phone number — skipping SMS channel`);
242
- return;
243
- }
244
- log.info(`[ravi-sms] Starting SMS channel for ${identityName} (${phone})`);
245
- // Build SSE client using currentToken — which may have been refreshed
246
- // by the listIdentities() call above if the original token was expired.
247
- // onAuthFailure triggers a REST call to force auto-refresh, then returns
248
- // the updated currentToken (already set by onTokenRefresh callback).
249
- sse = acquireSSEClient({
250
- apiUrl: RAVI_API_URL,
251
- token: currentToken,
252
- identityUuid: ctx.accountId,
253
- onAuthFailure: async () => {
254
- const tokenBefore = currentToken;
255
- try {
256
- await client.listIdentities();
257
- }
258
- catch (err) {
259
- const detail = err instanceof Error ? err.message : String(err);
260
- log.error(`[ravi-sms] Auth refresh failed during SSE reconnect: ${detail}. Run 'openclaw ravi login' to re-authenticate.`);
261
- return null;
262
- }
263
- if (currentToken === tokenBefore) {
264
- log.warn(`[ravi-sms] Auth refresh did not produce a new token — SSE auth failure is not recoverable via REST refresh`);
265
- return null;
266
- }
267
- return currentToken;
268
- },
269
- });
270
- sse.onSmsOwner((event) => {
271
- try {
272
- // Resolve agent route — maps (channel, accountId) → agentId + session key
273
- const route = runtime.channel.routing.resolveAgentRoute({
274
- cfg: ctx.cfg,
275
- channel: "ravi-sms",
276
- accountId: ctx.accountId,
277
- peer: { kind: "direct", id: event.from_number },
278
- });
279
- const sessionKey = route.sessionKey;
280
- // Build MsgContext for dispatch
281
- const msgCtx = {
282
- Body: event.body,
283
- BodyForAgent: event.body,
284
- From: `ravi-sms:${event.from_number}`,
285
- To: `ravi-sms:${phone}`,
286
- SessionKey: sessionKey,
287
- AccountId: ctx.accountId,
288
- ChatType: "direct",
289
- Provider: "ravi-sms",
290
- Surface: "ravi-sms",
291
- OriginatingChannel: "ravi-sms",
292
- OriginatingTo: ctx.accountId,
293
- SenderName: event.from_number,
294
- SenderId: event.from_number,
295
- Timestamp: Date.now(),
296
- CommandAuthorized: true,
297
- MessageSid: `ravi-sms:${event.id}`,
298
- };
299
- // Record inbound session so follow-ups route back through SMS
300
- try {
301
- runtime.channel.session.recordInboundSession({
302
- storePath: runtime.channel.session.resolveStorePath(ctx.cfg.session?.store, { agentId: route.agentId }),
303
- sessionKey,
304
- ctx: msgCtx,
305
- updateLastRoute: {
306
- sessionKey,
307
- channel: "ravi-sms",
308
- to: ctx.accountId,
309
- accountId: ctx.accountId,
310
- phoneNumber: event.from_number,
311
- },
312
- onRecordError: (err) => {
313
- const detail = err instanceof Error ? err.message : String(err);
314
- log.error(`[ravi-sms] Session record error for ${event.from_number}: ${detail}`);
315
- },
316
- });
317
- }
318
- catch (err) {
319
- const detail = err instanceof Error ? err.message : String(err);
320
- log.error(`[ravi-sms] recordInboundSession threw for ${event.from_number}: ${detail}`);
321
- }
322
- // Dispatch — triggers AI agent turn. Owner always gets full reply delivery.
323
- runtime.channel.reply.dispatchReplyWithBufferedBlockDispatcher({
324
- ctx: msgCtx,
325
- cfg: ctx.cfg,
326
- dispatcherOptions: {
327
- deliver: async (payload) => {
328
- if (!payload.text) {
329
- log.info(`[ravi-sms] Deliver called with empty text for ${event.from_number} — skipping`);
330
- return;
331
- }
332
- try {
333
- await client.sendSms(event.from_number, payload.text);
334
- }
335
- catch (err) {
336
- const detail = err instanceof Error ? err.message : String(err);
337
- const status = err?.status;
338
- log.error(`[ravi-sms] Failed to deliver reply to ${event.from_number}` +
339
- `${status ? ` (HTTP ${status})` : ""}: ${detail}`);
340
- }
341
- },
342
- onError: (err) => {
343
- log.error(`[ravi-sms] Dispatch error: ${err}`);
344
- },
345
- },
346
- }).catch((err) => {
347
- const detail = err instanceof Error ? err.message : String(err);
348
- log.error(`[ravi-sms] dispatchReply failed for ${event.from_number}: ${detail}`);
349
- });
350
- }
351
- catch (err) {
352
- const detail = err instanceof Error ? err.message : String(err);
353
- log.error(`[ravi-sms] Unhandled error processing event ${event.id}: ${detail}`);
354
- }
355
- });
356
- sse.onReconnect(() => {
357
- log.info(`[ravi-sms] SSE reconnecting for ${identityName}`);
358
- });
359
- log.info(`[ravi-sms] SSE connected for ${identityName} (${ctx.accountId})`);
360
- // Block until gateway signals shutdown
361
- await new Promise((resolve) => {
362
- if (ctx.abortSignal.aborted) {
363
- log.info(`[ravi-sms] Stopping SMS channel for ${identityName} (already aborted)`);
364
- releaseSSEClient(ctx.accountId);
365
- resolve();
366
- return;
367
- }
368
- ctx.abortSignal.addEventListener("abort", () => {
369
- log.info(`[ravi-sms] Stopping SMS channel for ${identityName}`);
370
- releaseSSEClient(ctx.accountId);
371
- resolve();
372
- });
373
- });
374
- },
375
- },
376
- };
377
- }
378
- /** The singleton ravi-sms channel instance. */
379
- export const raviSmsChannel = createSmsChannel();
380
- //# sourceMappingURL=sms.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sms.js","sourceRoot":"","sources":["../../src/channels/sms.ts"],"names":[],"mappings":"AAiDA,gFAAgF;AAEhF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO;QACL,EAAE,EAAE,UAAmB;QAEvB,IAAI,EAAE;YACJ,EAAE,EAAE,UAAU;YACd,KAAK,EAAE,UAAU;YACjB,cAAc,EAAE,8BAA8B;YAC9C,KAAK,EACH,yGAAyG;YAC3G,OAAO,EAAE,CAAC,WAAW,CAAC;SACvB;QAED,YAAY,EAAE;YACZ,SAAS,EAAE,CAAC,QAAQ,CAAU;SAC/B;QAED,MAAM,EAAE;YACN;;;;;;;;;eASG;YACH,cAAc,EAAE,CAAC,GAA4B,EAAY,EAAE;gBACzD,kEAAkE;gBAClE,MAAM,OAAO,GAAG,GAAG,CAAC,OAEP,CAAC;gBACd,MAAM,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC;gBAE1D,2CAA2C;gBAC3C,MAAM,QAAQ,GAAG,GAAG,CAAC,QAER,CAAC;gBACd,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;gBAEvE,kDAAkD;gBAClD,IAAI,IAAI,EAAE,CAAC;oBACT,OAAO,CAAC,IA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CAAC,+CAA+C,KAAK,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC,CAAC;oBAClF,CAAC;gBACH,CAAC,CAAC,CAAC;gBAEH,GAAG,CAAC,WAAW,CAAC,GAAG,EAAE;oBACnB,GAAG,CAAC,IAAI,CAAC,mCAAmC,YAAY,EAAE,CAAC,CAAC;gBAC9D,CAAC,CAAC,CAAC;gBAEH,GAAG,CAAC,IAAI,CAAC,gCAAgC,YAAY,KAAK,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC;gBAE5E,uCAAuC;gBACvC,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;oBAClC,IAAI,GAAG,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;wBAC5B,GAAG,CAAC,IAAI,CAAC,uCAAuC,YAAY,oBAAoB,CAAC,CAAC;wBAClF,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;wBAChC,OAAO,EAAE,CAAC;wBACV,OAAO;oBACT,CAAC;oBACD,GAAG,CAAC,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;wBAC7C,GAAG,CAAC,IAAI,CAAC,uCAAuC,YAAY,EAAE,CAAC,CAAC;wBAChE,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;wBAChC,OAAO,EAAE,CAAC;oBACZ,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC;SACF;KACF,CAAC;AACJ,CAAC;AAED,+CAA+C;AAC/C,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,EAAE,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Vault secret management tools for the Ravi OpenClaw plugin.
3
- *
4
- * Provides tools to list, retrieve, and store key-value secrets in the Ravi
5
- * vault. When a {@link CryptoManager} is available in the tool context, values
6
- * are automatically decrypted on read and encrypted on write using E2E
7
- * NaCl SealedBox encryption.
8
- *
9
- * @module tools/vault
10
- */
11
- import type { ToolDefinition, ToolContext } from "./identity.js";
12
- export type { ToolDefinition, ToolContext };
13
- /** Tools for managing secrets in the Ravi vault (list, get, set). */
14
- export declare const vaultTools: ToolDefinition[];
15
- //# sourceMappingURL=vault.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../src/tools/vault.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC;AAI5C,qEAAqE;AACrE,eAAO,MAAM,UAAU,EAAE,cAAc,EAiHtC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"vault.js","sourceRoot":"","sources":["../../src/tools/vault.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzC,+EAA+E;AAE/E,qEAAqE;AACrE,MAAM,CAAC,MAAM,UAAU,GAAqB;IAC1C;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,+EAA+E;YAC/E,6GAA6G;YAC7G,0FAA0F;QAC5F,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,MAAM,EAAE,EAAE,EAAE;YAC7C,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC;YAC3C,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;gBACzC,MAAM,MAAM,GAAG,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,UAAoB,EAAE,CAAC;gBACrD,IAAI,MAAM,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;oBACtB,MAAM,CAAC,KAAK,GAAG,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