@ravi-os/sdk 0.2.0 → 0.260519.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/README.md +330 -40
- package/dist/client.d.ts +820 -87
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +954 -200
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +5384 -2595
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +4393 -1458
- package/dist/schemas.js.map +1 -1
- package/dist/streaming.d.ts +93 -0
- package/dist/streaming.d.ts.map +1 -0
- package/dist/streaming.js +189 -0
- package/dist/streaming.js.map +1 -0
- package/dist/types.d.ts +1107 -129
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +3 -3
- package/dist/version.js +3 -3
- package/package.json +5 -1
package/dist/client.js
CHANGED
|
@@ -66,11 +66,11 @@ export class RaviClient {
|
|
|
66
66
|
});
|
|
67
67
|
},
|
|
68
68
|
/** List all agents */
|
|
69
|
-
list: async () => {
|
|
69
|
+
list: async (options) => {
|
|
70
70
|
return this.transport.call({
|
|
71
71
|
groupSegments: ["agents"],
|
|
72
72
|
command: "list",
|
|
73
|
-
body: {},
|
|
73
|
+
body: { ...(options ?? {}) },
|
|
74
74
|
});
|
|
75
75
|
},
|
|
76
76
|
/** Reset agent session */
|
|
@@ -149,11 +149,11 @@ export class RaviClient {
|
|
|
149
149
|
});
|
|
150
150
|
},
|
|
151
151
|
/** Create a generic Ravi artifact record */
|
|
152
|
-
create: async (
|
|
152
|
+
create: async (options) => {
|
|
153
153
|
return this.transport.call({
|
|
154
154
|
groupSegments: ["artifacts"],
|
|
155
155
|
command: "create",
|
|
156
|
-
body: {
|
|
156
|
+
body: { ...(options ?? {}) },
|
|
157
157
|
});
|
|
158
158
|
},
|
|
159
159
|
/** Append an artifact lifecycle event */
|
|
@@ -180,6 +180,32 @@ export class RaviClient {
|
|
|
180
180
|
body: { ...(options ?? {}) },
|
|
181
181
|
});
|
|
182
182
|
},
|
|
183
|
+
/** Publish a local artifact package through a Console-compatible endpoint */
|
|
184
|
+
publish: async (target, options) => {
|
|
185
|
+
return this.transport.call({
|
|
186
|
+
groupSegments: ["artifacts"],
|
|
187
|
+
command: "publish",
|
|
188
|
+
body: { target, ...(options ?? {}) },
|
|
189
|
+
});
|
|
190
|
+
},
|
|
191
|
+
release: {
|
|
192
|
+
/** Activate an existing Pages release for a local artifact */
|
|
193
|
+
activate: async (id, options) => {
|
|
194
|
+
return this.transport.call({
|
|
195
|
+
groupSegments: ["artifacts", "release"],
|
|
196
|
+
command: "activate",
|
|
197
|
+
body: { id, ...(options ?? {}) },
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
/** Restore current artifact content from an immutable version */
|
|
202
|
+
restore: async (id, options) => {
|
|
203
|
+
return this.transport.call({
|
|
204
|
+
groupSegments: ["artifacts"],
|
|
205
|
+
command: "restore",
|
|
206
|
+
body: { id, ...(options ?? {}) },
|
|
207
|
+
});
|
|
208
|
+
},
|
|
183
209
|
/** Show artifact details, links and events */
|
|
184
210
|
show: async (id) => {
|
|
185
211
|
return this.transport.call({
|
|
@@ -188,6 +214,14 @@ export class RaviClient {
|
|
|
188
214
|
body: { id },
|
|
189
215
|
});
|
|
190
216
|
},
|
|
217
|
+
/** Create an immutable version snapshot for an artifact */
|
|
218
|
+
snapshot: async (id, options) => {
|
|
219
|
+
return this.transport.call({
|
|
220
|
+
groupSegments: ["artifacts"],
|
|
221
|
+
command: "snapshot",
|
|
222
|
+
body: { id, ...(options ?? {}) },
|
|
223
|
+
});
|
|
224
|
+
},
|
|
191
225
|
/** Edit artifact metadata and high-level fields */
|
|
192
226
|
update: async (id, options) => {
|
|
193
227
|
return this.transport.call({
|
|
@@ -196,13 +230,21 @@ export class RaviClient {
|
|
|
196
230
|
body: { id, ...(options ?? {}) },
|
|
197
231
|
});
|
|
198
232
|
},
|
|
199
|
-
/**
|
|
200
|
-
|
|
233
|
+
/** Show one immutable artifact version */
|
|
234
|
+
version: async (id, options) => {
|
|
201
235
|
return this.transport.call({
|
|
202
236
|
groupSegments: ["artifacts"],
|
|
203
|
-
command: "
|
|
237
|
+
command: "version",
|
|
204
238
|
body: { id, ...(options ?? {}) },
|
|
205
239
|
});
|
|
240
|
+
},
|
|
241
|
+
/** List immutable versions for an artifact */
|
|
242
|
+
versions: async (id) => {
|
|
243
|
+
return this.transport.call({
|
|
244
|
+
groupSegments: ["artifacts"],
|
|
245
|
+
command: "versions",
|
|
246
|
+
body: { id },
|
|
247
|
+
});
|
|
206
248
|
}
|
|
207
249
|
};
|
|
208
250
|
audio = {
|
|
@@ -215,7 +257,125 @@ export class RaviClient {
|
|
|
215
257
|
});
|
|
216
258
|
}
|
|
217
259
|
};
|
|
260
|
+
chats = {
|
|
261
|
+
/** List recent canonical chats */
|
|
262
|
+
list: async (options) => {
|
|
263
|
+
return this.transport.call({
|
|
264
|
+
groupSegments: ["chats"],
|
|
265
|
+
command: "list",
|
|
266
|
+
body: { ...(options ?? {}) },
|
|
267
|
+
});
|
|
268
|
+
},
|
|
269
|
+
lists: {
|
|
270
|
+
/** Add a chat to a reading list */
|
|
271
|
+
add: async (list, chat, options) => {
|
|
272
|
+
return this.transport.call({
|
|
273
|
+
groupSegments: ["chats", "lists"],
|
|
274
|
+
command: "add",
|
|
275
|
+
body: { list, chat, ...(options ?? {}) },
|
|
276
|
+
});
|
|
277
|
+
},
|
|
278
|
+
/** Create or restore a chat reading list */
|
|
279
|
+
create: async (name, options) => {
|
|
280
|
+
return this.transport.call({
|
|
281
|
+
groupSegments: ["chats", "lists"],
|
|
282
|
+
command: "create",
|
|
283
|
+
body: { name, ...(options ?? {}) },
|
|
284
|
+
});
|
|
285
|
+
},
|
|
286
|
+
/** Read what changed in a chat since this list reader cursor */
|
|
287
|
+
delta: async (list, chat, options) => {
|
|
288
|
+
return this.transport.call({
|
|
289
|
+
groupSegments: ["chats", "lists"],
|
|
290
|
+
command: "delta",
|
|
291
|
+
body: { list, chat, ...(options ?? {}) },
|
|
292
|
+
});
|
|
293
|
+
},
|
|
294
|
+
/** List chat reading lists */
|
|
295
|
+
list: async (options) => {
|
|
296
|
+
return this.transport.call({
|
|
297
|
+
groupSegments: ["chats", "lists"],
|
|
298
|
+
command: "list",
|
|
299
|
+
body: { ...(options ?? {}) },
|
|
300
|
+
});
|
|
301
|
+
},
|
|
302
|
+
/** Explicitly advance one reading-list cursor */
|
|
303
|
+
markRead: async (list, chat, options) => {
|
|
304
|
+
return this.transport.call({
|
|
305
|
+
groupSegments: ["chats", "lists"],
|
|
306
|
+
command: "mark-read",
|
|
307
|
+
body: { list, chat, ...(options ?? {}) },
|
|
308
|
+
});
|
|
309
|
+
},
|
|
310
|
+
/** List chats in a reading list with unread counts */
|
|
311
|
+
members: async (list, options) => {
|
|
312
|
+
return this.transport.call({
|
|
313
|
+
groupSegments: ["chats", "lists"],
|
|
314
|
+
command: "members",
|
|
315
|
+
body: { list, ...(options ?? {}) },
|
|
316
|
+
});
|
|
317
|
+
},
|
|
318
|
+
/** Remove a chat from a reading list without deleting cursor history */
|
|
319
|
+
remove: async (list, chat, options) => {
|
|
320
|
+
return this.transport.call({
|
|
321
|
+
groupSegments: ["chats", "lists"],
|
|
322
|
+
command: "remove",
|
|
323
|
+
body: { list, chat, ...(options ?? {}) },
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
/** Read messages from one chat */
|
|
328
|
+
read: async (chat, options) => {
|
|
329
|
+
return this.transport.call({
|
|
330
|
+
groupSegments: ["chats"],
|
|
331
|
+
command: "read",
|
|
332
|
+
body: { chat, ...(options ?? {}) },
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
commands = {
|
|
337
|
+
/** List Ravi commands */
|
|
338
|
+
list: async (options) => {
|
|
339
|
+
return this.transport.call({
|
|
340
|
+
groupSegments: ["commands"],
|
|
341
|
+
command: "list",
|
|
342
|
+
body: { ...(options ?? {}) },
|
|
343
|
+
});
|
|
344
|
+
},
|
|
345
|
+
/** Render a Ravi command into its composed prompt */
|
|
346
|
+
run: async (name, args, options) => {
|
|
347
|
+
return this.transport.call({
|
|
348
|
+
groupSegments: ["commands"],
|
|
349
|
+
command: "run",
|
|
350
|
+
body: { name, args, ...(options ?? {}) },
|
|
351
|
+
});
|
|
352
|
+
},
|
|
353
|
+
/** Show one Ravi command */
|
|
354
|
+
show: async (name, options) => {
|
|
355
|
+
return this.transport.call({
|
|
356
|
+
groupSegments: ["commands"],
|
|
357
|
+
command: "show",
|
|
358
|
+
body: { name, ...(options ?? {}) },
|
|
359
|
+
});
|
|
360
|
+
},
|
|
361
|
+
/** Validate Ravi command files */
|
|
362
|
+
validate: async (options) => {
|
|
363
|
+
return this.transport.call({
|
|
364
|
+
groupSegments: ["commands"],
|
|
365
|
+
command: "validate",
|
|
366
|
+
body: { ...(options ?? {}) },
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
};
|
|
218
370
|
contacts = {
|
|
371
|
+
/** Show session activity attributed to a contact */
|
|
372
|
+
activity: async (contact, options) => {
|
|
373
|
+
return this.transport.call({
|
|
374
|
+
groupSegments: ["contacts"],
|
|
375
|
+
command: "activity",
|
|
376
|
+
body: { contact, ...(options ?? {}) },
|
|
377
|
+
});
|
|
378
|
+
},
|
|
219
379
|
/** Add/allow a contact */
|
|
220
380
|
add: async (identity, name, options) => {
|
|
221
381
|
return this.transport.call({
|
|
@@ -240,6 +400,14 @@ export class RaviClient {
|
|
|
240
400
|
body: { contact, mode, ...(options ?? {}) },
|
|
241
401
|
});
|
|
242
402
|
},
|
|
403
|
+
/** Backfill canonical contacts from captured chats */
|
|
404
|
+
backfill: async (options) => {
|
|
405
|
+
return this.transport.call({
|
|
406
|
+
groupSegments: ["contacts"],
|
|
407
|
+
command: "backfill",
|
|
408
|
+
body: { ...(options ?? {}) },
|
|
409
|
+
});
|
|
410
|
+
},
|
|
243
411
|
/** Block a contact */
|
|
244
412
|
block: async (contact) => {
|
|
245
413
|
return this.transport.call({
|
|
@@ -280,38 +448,6 @@ export class RaviClient {
|
|
|
280
448
|
body: { contact },
|
|
281
449
|
});
|
|
282
450
|
},
|
|
283
|
-
/** Set a contact's tag in a specific group */
|
|
284
|
-
groupTag: async (contact, group, tag) => {
|
|
285
|
-
return this.transport.call({
|
|
286
|
-
groupSegments: ["contacts"],
|
|
287
|
-
command: "group-tag",
|
|
288
|
-
body: { contact, group, tag },
|
|
289
|
-
});
|
|
290
|
-
},
|
|
291
|
-
/** Remove a contact's tag from a specific group */
|
|
292
|
-
groupUntag: async (contact, group) => {
|
|
293
|
-
return this.transport.call({
|
|
294
|
-
groupSegments: ["contacts"],
|
|
295
|
-
command: "group-untag",
|
|
296
|
-
body: { contact, group },
|
|
297
|
-
});
|
|
298
|
-
},
|
|
299
|
-
/** Add an identity to a contact (legacy alias for link) */
|
|
300
|
-
identityAdd: async (contact, platform, value) => {
|
|
301
|
-
return this.transport.call({
|
|
302
|
-
groupSegments: ["contacts"],
|
|
303
|
-
command: "identity-add",
|
|
304
|
-
body: { contact, platform, value },
|
|
305
|
-
});
|
|
306
|
-
},
|
|
307
|
-
/** Remove an identity (legacy alias for unlink) */
|
|
308
|
-
identityRemove: async (platform, value) => {
|
|
309
|
-
return this.transport.call({
|
|
310
|
-
groupSegments: ["contacts"],
|
|
311
|
-
command: "identity-remove",
|
|
312
|
-
body: { platform, value },
|
|
313
|
-
});
|
|
314
|
-
},
|
|
315
451
|
/** Show contact details with all identities */
|
|
316
452
|
info: async (contact) => {
|
|
317
453
|
return this.transport.call({
|
|
@@ -344,6 +480,48 @@ export class RaviClient {
|
|
|
344
480
|
body: { source, target },
|
|
345
481
|
});
|
|
346
482
|
},
|
|
483
|
+
/** Show messages attributed to a contact */
|
|
484
|
+
messages: async (contact, options) => {
|
|
485
|
+
return this.transport.call({
|
|
486
|
+
groupSegments: ["contacts"],
|
|
487
|
+
command: "messages",
|
|
488
|
+
body: { contact, ...(options ?? {}) },
|
|
489
|
+
});
|
|
490
|
+
},
|
|
491
|
+
metadata: {
|
|
492
|
+
/** List current scoped metadata for a contact */
|
|
493
|
+
list: async (contact, options) => {
|
|
494
|
+
return this.transport.call({
|
|
495
|
+
groupSegments: ["contacts", "metadata"],
|
|
496
|
+
command: "list",
|
|
497
|
+
body: { contact, ...(options ?? {}) },
|
|
498
|
+
});
|
|
499
|
+
},
|
|
500
|
+
/** Remove scoped metadata from a contact */
|
|
501
|
+
remove: async (contact, key, options) => {
|
|
502
|
+
return this.transport.call({
|
|
503
|
+
groupSegments: ["contacts", "metadata"],
|
|
504
|
+
command: "remove",
|
|
505
|
+
body: { contact, key, ...(options ?? {}) },
|
|
506
|
+
});
|
|
507
|
+
},
|
|
508
|
+
/** Set scoped metadata for a contact */
|
|
509
|
+
set: async (contact, key, value, options) => {
|
|
510
|
+
return this.transport.call({
|
|
511
|
+
groupSegments: ["contacts", "metadata"],
|
|
512
|
+
command: "set",
|
|
513
|
+
body: { contact, key, value, ...(options ?? {}) },
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
/** Append a note to a contact timeline */
|
|
518
|
+
note: async (contact, text, options) => {
|
|
519
|
+
return this.transport.call({
|
|
520
|
+
groupSegments: ["contacts"],
|
|
521
|
+
command: "note",
|
|
522
|
+
body: { contact, text, ...(options ?? {}) },
|
|
523
|
+
});
|
|
524
|
+
},
|
|
347
525
|
/** List pending contacts */
|
|
348
526
|
pending: async (options) => {
|
|
349
527
|
return this.transport.call({
|
|
@@ -352,6 +530,14 @@ export class RaviClient {
|
|
|
352
530
|
body: { ...(options ?? {}) },
|
|
353
531
|
});
|
|
354
532
|
},
|
|
533
|
+
/** Show a contact profile card */
|
|
534
|
+
profile: async (contact, options) => {
|
|
535
|
+
return this.transport.call({
|
|
536
|
+
groupSegments: ["contacts"],
|
|
537
|
+
command: "profile",
|
|
538
|
+
body: { contact, ...(options ?? {}) },
|
|
539
|
+
});
|
|
540
|
+
},
|
|
355
541
|
/** Remove a contact */
|
|
356
542
|
remove: async (contact) => {
|
|
357
543
|
return this.transport.call({
|
|
@@ -360,6 +546,14 @@ export class RaviClient {
|
|
|
360
546
|
body: { contact },
|
|
361
547
|
});
|
|
362
548
|
},
|
|
549
|
+
/** Show session summaries attributed to a contact */
|
|
550
|
+
sessions: async (contact, options) => {
|
|
551
|
+
return this.transport.call({
|
|
552
|
+
groupSegments: ["contacts"],
|
|
553
|
+
command: "sessions",
|
|
554
|
+
body: { contact, ...(options ?? {}) },
|
|
555
|
+
});
|
|
556
|
+
},
|
|
363
557
|
/** Set contact property */
|
|
364
558
|
set: async (contact, key, value) => {
|
|
365
559
|
return this.transport.call({
|
|
@@ -376,6 +570,14 @@ export class RaviClient {
|
|
|
376
570
|
body: { contact, tag },
|
|
377
571
|
});
|
|
378
572
|
},
|
|
573
|
+
/** Show contact timeline events */
|
|
574
|
+
timeline: async (contact, options) => {
|
|
575
|
+
return this.transport.call({
|
|
576
|
+
groupSegments: ["contacts"],
|
|
577
|
+
command: "timeline",
|
|
578
|
+
body: { contact, ...(options ?? {}) },
|
|
579
|
+
});
|
|
580
|
+
},
|
|
379
581
|
/** Unlink a platform identity from its contact */
|
|
380
582
|
unlink: async (platformIdentity, options) => {
|
|
381
583
|
return this.transport.call({
|
|
@@ -418,6 +620,14 @@ export class RaviClient {
|
|
|
418
620
|
body: { permission, objectType, objectId },
|
|
419
621
|
});
|
|
420
622
|
},
|
|
623
|
+
/** Dry-run or revoke stale agent-runtime contexts left by old turn-scoped issuance */
|
|
624
|
+
cleanupAgentRuntime: async (options) => {
|
|
625
|
+
return this.transport.call({
|
|
626
|
+
groupSegments: ["context"],
|
|
627
|
+
command: "cleanup-agent-runtime",
|
|
628
|
+
body: { ...(options ?? {}) },
|
|
629
|
+
});
|
|
630
|
+
},
|
|
421
631
|
/** Evaluate a Codex PreToolUse Bash hook payload from stdin using the current Ravi context */
|
|
422
632
|
codexBashHook: async () => {
|
|
423
633
|
return this.transport.call({
|
|
@@ -436,11 +646,11 @@ export class RaviClient {
|
|
|
436
646
|
});
|
|
437
647
|
},
|
|
438
648
|
/** List entries in the local credentials store */
|
|
439
|
-
list: async () => {
|
|
649
|
+
list: async (options) => {
|
|
440
650
|
return this.transport.call({
|
|
441
651
|
groupSegments: ["context", "credentials"],
|
|
442
652
|
command: "list",
|
|
443
|
-
body: {},
|
|
653
|
+
body: { ...(options ?? {}) },
|
|
444
654
|
});
|
|
445
655
|
},
|
|
446
656
|
/** Remove a stored context-key from the credentials store */
|
|
@@ -500,6 +710,14 @@ export class RaviClient {
|
|
|
500
710
|
body: { contextId, ...(options ?? {}) },
|
|
501
711
|
});
|
|
502
712
|
},
|
|
713
|
+
/** Show the current context session visibility */
|
|
714
|
+
visibility: async () => {
|
|
715
|
+
return this.transport.call({
|
|
716
|
+
groupSegments: ["context"],
|
|
717
|
+
command: "visibility",
|
|
718
|
+
body: {},
|
|
719
|
+
});
|
|
720
|
+
},
|
|
503
721
|
/** Resolve the current runtime context */
|
|
504
722
|
whoami: async () => {
|
|
505
723
|
return this.transport.call({
|
|
@@ -551,6 +769,202 @@ export class RaviClient {
|
|
|
551
769
|
});
|
|
552
770
|
}
|
|
553
771
|
};
|
|
772
|
+
crm = {
|
|
773
|
+
account: {
|
|
774
|
+
/** Create a CRM account */
|
|
775
|
+
create: async (name, options) => {
|
|
776
|
+
return this.transport.call({
|
|
777
|
+
groupSegments: ["crm", "account"],
|
|
778
|
+
command: "create",
|
|
779
|
+
body: { name, ...(options ?? {}) },
|
|
780
|
+
});
|
|
781
|
+
},
|
|
782
|
+
/** Link a contact to an account */
|
|
783
|
+
linkContact: async (account, contact, options) => {
|
|
784
|
+
return this.transport.call({
|
|
785
|
+
groupSegments: ["crm", "account"],
|
|
786
|
+
command: "link-contact",
|
|
787
|
+
body: { account, contact, ...(options ?? {}) },
|
|
788
|
+
});
|
|
789
|
+
},
|
|
790
|
+
/** Show CRM account */
|
|
791
|
+
show: async (account) => {
|
|
792
|
+
return this.transport.call({
|
|
793
|
+
groupSegments: ["crm", "account"],
|
|
794
|
+
command: "show",
|
|
795
|
+
body: { account },
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
/** Show CRM account */
|
|
800
|
+
accountCommand: async (account) => {
|
|
801
|
+
return this.transport.call({
|
|
802
|
+
groupSegments: ["crm"],
|
|
803
|
+
command: "account",
|
|
804
|
+
body: { account },
|
|
805
|
+
});
|
|
806
|
+
},
|
|
807
|
+
/** Show open opportunity board */
|
|
808
|
+
board: async () => {
|
|
809
|
+
return this.transport.call({
|
|
810
|
+
groupSegments: ["crm"],
|
|
811
|
+
command: "board",
|
|
812
|
+
body: {},
|
|
813
|
+
});
|
|
814
|
+
},
|
|
815
|
+
contact: {
|
|
816
|
+
/** Set one CRM contact profile field */
|
|
817
|
+
set: async (contact, field, value, options) => {
|
|
818
|
+
return this.transport.call({
|
|
819
|
+
groupSegments: ["crm", "contact"],
|
|
820
|
+
command: "set",
|
|
821
|
+
body: { contact, field, value, ...(options ?? {}) },
|
|
822
|
+
});
|
|
823
|
+
},
|
|
824
|
+
/** Show CRM profile for one contact */
|
|
825
|
+
show: async (contact) => {
|
|
826
|
+
return this.transport.call({
|
|
827
|
+
groupSegments: ["crm", "contact"],
|
|
828
|
+
command: "show",
|
|
829
|
+
body: { contact },
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
/** Show CRM profile for one contact */
|
|
834
|
+
contactCommand: async (contact) => {
|
|
835
|
+
return this.transport.call({
|
|
836
|
+
groupSegments: ["crm"],
|
|
837
|
+
command: "contact",
|
|
838
|
+
body: { contact },
|
|
839
|
+
});
|
|
840
|
+
},
|
|
841
|
+
/** List CRM contact cards */
|
|
842
|
+
contacts: async (options) => {
|
|
843
|
+
return this.transport.call({
|
|
844
|
+
groupSegments: ["crm"],
|
|
845
|
+
command: "contacts",
|
|
846
|
+
body: { ...(options ?? {}) },
|
|
847
|
+
});
|
|
848
|
+
},
|
|
849
|
+
fact: {
|
|
850
|
+
/** Confirm a CRM fact */
|
|
851
|
+
confirm: async (fact) => {
|
|
852
|
+
return this.transport.call({
|
|
853
|
+
groupSegments: ["crm", "fact"],
|
|
854
|
+
command: "confirm",
|
|
855
|
+
body: { fact },
|
|
856
|
+
});
|
|
857
|
+
},
|
|
858
|
+
/** List CRM facts */
|
|
859
|
+
list: async (options) => {
|
|
860
|
+
return this.transport.call({
|
|
861
|
+
groupSegments: ["crm", "fact"],
|
|
862
|
+
command: "list",
|
|
863
|
+
body: { ...(options ?? {}) },
|
|
864
|
+
});
|
|
865
|
+
},
|
|
866
|
+
/** Propose or confirm a CRM fact */
|
|
867
|
+
propose: async (entityType, entity, key, value, options) => {
|
|
868
|
+
return this.transport.call({
|
|
869
|
+
groupSegments: ["crm", "fact"],
|
|
870
|
+
command: "propose",
|
|
871
|
+
body: { entityType, entity, key, value, ...(options ?? {}) },
|
|
872
|
+
});
|
|
873
|
+
},
|
|
874
|
+
/** Reject a CRM fact */
|
|
875
|
+
reject: async (fact) => {
|
|
876
|
+
return this.transport.call({
|
|
877
|
+
groupSegments: ["crm", "fact"],
|
|
878
|
+
command: "reject",
|
|
879
|
+
body: { fact },
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
/** List open CRM next actions */
|
|
884
|
+
next: async (options) => {
|
|
885
|
+
return this.transport.call({
|
|
886
|
+
groupSegments: ["crm"],
|
|
887
|
+
command: "next",
|
|
888
|
+
body: { ...(options ?? {}) },
|
|
889
|
+
});
|
|
890
|
+
},
|
|
891
|
+
opportunity: {
|
|
892
|
+
/** List contacts linked to an opportunity */
|
|
893
|
+
contacts: async (opportunity) => {
|
|
894
|
+
return this.transport.call({
|
|
895
|
+
groupSegments: ["crm", "opportunity"],
|
|
896
|
+
command: "contacts",
|
|
897
|
+
body: { opportunity },
|
|
898
|
+
});
|
|
899
|
+
},
|
|
900
|
+
/** Create a CRM opportunity */
|
|
901
|
+
create: async (title, options) => {
|
|
902
|
+
return this.transport.call({
|
|
903
|
+
groupSegments: ["crm", "opportunity"],
|
|
904
|
+
command: "create",
|
|
905
|
+
body: { title, ...(options ?? {}) },
|
|
906
|
+
});
|
|
907
|
+
},
|
|
908
|
+
/** Link a contact to an opportunity */
|
|
909
|
+
linkContact: async (opportunity, contact, options) => {
|
|
910
|
+
return this.transport.call({
|
|
911
|
+
groupSegments: ["crm", "opportunity"],
|
|
912
|
+
command: "link-contact",
|
|
913
|
+
body: { opportunity, contact, ...(options ?? {}) },
|
|
914
|
+
});
|
|
915
|
+
},
|
|
916
|
+
/** Move an opportunity to another stage */
|
|
917
|
+
move: async (opportunity, stage, options) => {
|
|
918
|
+
return this.transport.call({
|
|
919
|
+
groupSegments: ["crm", "opportunity"],
|
|
920
|
+
command: "move",
|
|
921
|
+
body: { opportunity, stage, ...(options ?? {}) },
|
|
922
|
+
});
|
|
923
|
+
},
|
|
924
|
+
/** Show CRM opportunity */
|
|
925
|
+
show: async (opportunity) => {
|
|
926
|
+
return this.transport.call({
|
|
927
|
+
groupSegments: ["crm", "opportunity"],
|
|
928
|
+
command: "show",
|
|
929
|
+
body: { opportunity },
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
},
|
|
933
|
+
/** Show CRM opportunity */
|
|
934
|
+
opportunityCommand: async (opportunity) => {
|
|
935
|
+
return this.transport.call({
|
|
936
|
+
groupSegments: ["crm"],
|
|
937
|
+
command: "opportunity",
|
|
938
|
+
body: { opportunity },
|
|
939
|
+
});
|
|
940
|
+
},
|
|
941
|
+
task: {
|
|
942
|
+
/** Create a CRM relationship task */
|
|
943
|
+
create: async (title, options) => {
|
|
944
|
+
return this.transport.call({
|
|
945
|
+
groupSegments: ["crm", "task"],
|
|
946
|
+
command: "create",
|
|
947
|
+
body: { title, ...(options ?? {}) },
|
|
948
|
+
});
|
|
949
|
+
},
|
|
950
|
+
/** Complete a CRM task */
|
|
951
|
+
done: async (task) => {
|
|
952
|
+
return this.transport.call({
|
|
953
|
+
groupSegments: ["crm", "task"],
|
|
954
|
+
command: "done",
|
|
955
|
+
body: { task },
|
|
956
|
+
});
|
|
957
|
+
},
|
|
958
|
+
/** Show CRM task */
|
|
959
|
+
show: async (task) => {
|
|
960
|
+
return this.transport.call({
|
|
961
|
+
groupSegments: ["crm", "task"],
|
|
962
|
+
command: "show",
|
|
963
|
+
body: { task },
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
};
|
|
554
968
|
cron = {
|
|
555
969
|
/** Add a new scheduled job */
|
|
556
970
|
add: async (name, options) => {
|
|
@@ -577,11 +991,11 @@ export class RaviClient {
|
|
|
577
991
|
});
|
|
578
992
|
},
|
|
579
993
|
/** List all scheduled jobs */
|
|
580
|
-
list: async () => {
|
|
994
|
+
list: async (options) => {
|
|
581
995
|
return this.transport.call({
|
|
582
996
|
groupSegments: ["cron"],
|
|
583
997
|
command: "list",
|
|
584
|
-
body: {},
|
|
998
|
+
body: { ...(options ?? {}) },
|
|
585
999
|
});
|
|
586
1000
|
},
|
|
587
1001
|
/** Delete a job */
|
|
@@ -618,14 +1032,6 @@ export class RaviClient {
|
|
|
618
1032
|
}
|
|
619
1033
|
};
|
|
620
1034
|
daemon = {
|
|
621
|
-
/** Run daemon in dev mode with auto-rebuild on file changes */
|
|
622
|
-
dev: async () => {
|
|
623
|
-
return this.transport.call({
|
|
624
|
-
groupSegments: ["daemon"],
|
|
625
|
-
command: "dev",
|
|
626
|
-
body: {},
|
|
627
|
-
});
|
|
628
|
-
},
|
|
629
1035
|
/** Edit environment file (~/.ravi/.env) */
|
|
630
1036
|
env: async () => {
|
|
631
1037
|
return this.transport.call({
|
|
@@ -666,14 +1072,6 @@ export class RaviClient {
|
|
|
666
1072
|
body: { ...(options ?? {}) },
|
|
667
1073
|
});
|
|
668
1074
|
},
|
|
669
|
-
/** Run daemon in foreground (used by PM2) */
|
|
670
|
-
run: async () => {
|
|
671
|
-
return this.transport.call({
|
|
672
|
-
groupSegments: ["daemon"],
|
|
673
|
-
command: "run",
|
|
674
|
-
body: {},
|
|
675
|
-
});
|
|
676
|
-
},
|
|
677
1075
|
/** Start the daemon via PM2 */
|
|
678
1076
|
start: async () => {
|
|
679
1077
|
return this.transport.call({
|
|
@@ -811,24 +1209,6 @@ export class RaviClient {
|
|
|
811
1209
|
});
|
|
812
1210
|
}
|
|
813
1211
|
};
|
|
814
|
-
events = {
|
|
815
|
-
/** Replay persisted JetStream events with filters */
|
|
816
|
-
replay: async (options) => {
|
|
817
|
-
return this.transport.call({
|
|
818
|
-
groupSegments: ["events"],
|
|
819
|
-
command: "replay",
|
|
820
|
-
body: { ...(options ?? {}) },
|
|
821
|
-
});
|
|
822
|
-
},
|
|
823
|
-
/** Stream all events in real-time (default command) */
|
|
824
|
-
stream: async (options) => {
|
|
825
|
-
return this.transport.call({
|
|
826
|
-
groupSegments: ["events"],
|
|
827
|
-
command: "stream",
|
|
828
|
-
body: { ...(options ?? {}) },
|
|
829
|
-
});
|
|
830
|
-
}
|
|
831
|
-
};
|
|
832
1212
|
heartbeat = {
|
|
833
1213
|
/** Disable heartbeat for an agent */
|
|
834
1214
|
disable: async (id) => {
|
|
@@ -905,11 +1285,11 @@ export class RaviClient {
|
|
|
905
1285
|
});
|
|
906
1286
|
},
|
|
907
1287
|
/** List configured hooks */
|
|
908
|
-
list: async () => {
|
|
1288
|
+
list: async (options) => {
|
|
909
1289
|
return this.transport.call({
|
|
910
1290
|
groupSegments: ["hooks"],
|
|
911
1291
|
command: "list",
|
|
912
|
-
body: {},
|
|
1292
|
+
body: { ...(options ?? {}) },
|
|
913
1293
|
});
|
|
914
1294
|
},
|
|
915
1295
|
/** Delete a hook */
|
|
@@ -992,14 +1372,6 @@ export class RaviClient {
|
|
|
992
1372
|
}
|
|
993
1373
|
};
|
|
994
1374
|
instances = {
|
|
995
|
-
/** Connect an instance to omni (QR code for WhatsApp) */
|
|
996
|
-
connect: async (name, options) => {
|
|
997
|
-
return this.transport.call({
|
|
998
|
-
groupSegments: ["instances"],
|
|
999
|
-
command: "connect",
|
|
1000
|
-
body: { name, ...(options ?? {}) },
|
|
1001
|
-
});
|
|
1002
|
-
},
|
|
1003
1375
|
/** Create a new instance */
|
|
1004
1376
|
create: async (name, options) => {
|
|
1005
1377
|
return this.transport.call({
|
|
@@ -1057,11 +1429,11 @@ export class RaviClient {
|
|
|
1057
1429
|
});
|
|
1058
1430
|
},
|
|
1059
1431
|
/** List all instances */
|
|
1060
|
-
list: async () => {
|
|
1432
|
+
list: async (options) => {
|
|
1061
1433
|
return this.transport.call({
|
|
1062
1434
|
groupSegments: ["instances"],
|
|
1063
1435
|
command: "list",
|
|
1064
|
-
body: {},
|
|
1436
|
+
body: { ...(options ?? {}) },
|
|
1065
1437
|
});
|
|
1066
1438
|
},
|
|
1067
1439
|
pending: {
|
|
@@ -1074,11 +1446,11 @@ export class RaviClient {
|
|
|
1074
1446
|
});
|
|
1075
1447
|
},
|
|
1076
1448
|
/** List pending contacts and chats for an instance */
|
|
1077
|
-
list: async (name) => {
|
|
1449
|
+
list: async (name, options) => {
|
|
1078
1450
|
return this.transport.call({
|
|
1079
1451
|
groupSegments: ["instances", "pending"],
|
|
1080
1452
|
command: "list",
|
|
1081
|
-
body: { name },
|
|
1453
|
+
body: { name, ...(options ?? {}) },
|
|
1082
1454
|
});
|
|
1083
1455
|
},
|
|
1084
1456
|
/** Reject and remove a pending contact or chat */
|
|
@@ -1116,11 +1488,11 @@ export class RaviClient {
|
|
|
1116
1488
|
});
|
|
1117
1489
|
},
|
|
1118
1490
|
/** List routes for an instance */
|
|
1119
|
-
list: async (name) => {
|
|
1491
|
+
list: async (name, options) => {
|
|
1120
1492
|
return this.transport.call({
|
|
1121
1493
|
groupSegments: ["instances", "routes"],
|
|
1122
1494
|
command: "list",
|
|
1123
|
-
body: { name },
|
|
1495
|
+
body: { name, ...(options ?? {}) },
|
|
1124
1496
|
});
|
|
1125
1497
|
},
|
|
1126
1498
|
/** Remove a route (soft-delete, recoverable) */
|
|
@@ -1139,63 +1511,197 @@ export class RaviClient {
|
|
|
1139
1511
|
body: { name, pattern, ...(options ?? {}) },
|
|
1140
1512
|
});
|
|
1141
1513
|
},
|
|
1142
|
-
/** Set a route property */
|
|
1143
|
-
set: async (name, pattern, key, value, options) => {
|
|
1514
|
+
/** Set a route property */
|
|
1515
|
+
set: async (name, pattern, key, value, options) => {
|
|
1516
|
+
return this.transport.call({
|
|
1517
|
+
groupSegments: ["instances", "routes"],
|
|
1518
|
+
command: "set",
|
|
1519
|
+
body: { name, pattern, key, value, ...(options ?? {}) },
|
|
1520
|
+
});
|
|
1521
|
+
},
|
|
1522
|
+
/** Show route details */
|
|
1523
|
+
show: async (name, pattern) => {
|
|
1524
|
+
return this.transport.call({
|
|
1525
|
+
groupSegments: ["instances", "routes"],
|
|
1526
|
+
command: "show",
|
|
1527
|
+
body: { name, pattern },
|
|
1528
|
+
});
|
|
1529
|
+
}
|
|
1530
|
+
},
|
|
1531
|
+
/** Set an instance property */
|
|
1532
|
+
set: async (name, key, value) => {
|
|
1533
|
+
return this.transport.call({
|
|
1534
|
+
groupSegments: ["instances"],
|
|
1535
|
+
command: "set",
|
|
1536
|
+
body: { name, key, value },
|
|
1537
|
+
});
|
|
1538
|
+
},
|
|
1539
|
+
/** Show instance details */
|
|
1540
|
+
show: async (name) => {
|
|
1541
|
+
return this.transport.call({
|
|
1542
|
+
groupSegments: ["instances"],
|
|
1543
|
+
command: "show",
|
|
1544
|
+
body: { name },
|
|
1545
|
+
});
|
|
1546
|
+
},
|
|
1547
|
+
/** Show connection status for an instance */
|
|
1548
|
+
status: async (name) => {
|
|
1549
|
+
return this.transport.call({
|
|
1550
|
+
groupSegments: ["instances"],
|
|
1551
|
+
command: "status",
|
|
1552
|
+
body: { name },
|
|
1553
|
+
});
|
|
1554
|
+
},
|
|
1555
|
+
/** Explain which runtime, DB, and live instance this CLI would affect */
|
|
1556
|
+
target: async (name, options) => {
|
|
1557
|
+
return this.transport.call({
|
|
1558
|
+
groupSegments: ["instances"],
|
|
1559
|
+
command: "target",
|
|
1560
|
+
body: { name, ...(options ?? {}) },
|
|
1561
|
+
});
|
|
1562
|
+
}
|
|
1563
|
+
};
|
|
1564
|
+
media = {
|
|
1565
|
+
/** Send a media file (image, video, audio, document) */
|
|
1566
|
+
send: async (filePath, options) => {
|
|
1567
|
+
return this.transport.call({
|
|
1568
|
+
groupSegments: ["media"],
|
|
1569
|
+
command: "send",
|
|
1570
|
+
body: { filePath, ...(options ?? {}) },
|
|
1571
|
+
});
|
|
1572
|
+
}
|
|
1573
|
+
};
|
|
1574
|
+
observers = {
|
|
1575
|
+
/** List session observer bindings */
|
|
1576
|
+
list: async (options) => {
|
|
1577
|
+
return this.transport.call({
|
|
1578
|
+
groupSegments: ["observers"],
|
|
1579
|
+
command: "list",
|
|
1580
|
+
body: { ...(options ?? {}) },
|
|
1581
|
+
});
|
|
1582
|
+
},
|
|
1583
|
+
profiles: {
|
|
1584
|
+
/** Create a Markdown observer profile scaffold */
|
|
1585
|
+
init: async (profileId, options) => {
|
|
1586
|
+
return this.transport.call({
|
|
1587
|
+
groupSegments: ["observers", "profiles"],
|
|
1588
|
+
command: "init",
|
|
1589
|
+
body: { profileId, ...(options ?? {}) },
|
|
1590
|
+
});
|
|
1591
|
+
},
|
|
1592
|
+
/** List observer profiles */
|
|
1593
|
+
list: async (options) => {
|
|
1594
|
+
return this.transport.call({
|
|
1595
|
+
groupSegments: ["observers", "profiles"],
|
|
1596
|
+
command: "list",
|
|
1597
|
+
body: { ...(options ?? {}) },
|
|
1598
|
+
});
|
|
1599
|
+
},
|
|
1600
|
+
/** Render an observer profile preview */
|
|
1601
|
+
preview: async (profileId, options) => {
|
|
1602
|
+
return this.transport.call({
|
|
1603
|
+
groupSegments: ["observers", "profiles"],
|
|
1604
|
+
command: "preview",
|
|
1605
|
+
body: { profileId, ...(options ?? {}) },
|
|
1606
|
+
});
|
|
1607
|
+
},
|
|
1608
|
+
/** Show one observer profile */
|
|
1609
|
+
show: async (profileId) => {
|
|
1610
|
+
return this.transport.call({
|
|
1611
|
+
groupSegments: ["observers", "profiles"],
|
|
1612
|
+
command: "show",
|
|
1613
|
+
body: { profileId },
|
|
1614
|
+
});
|
|
1615
|
+
},
|
|
1616
|
+
/** Validate observer profiles */
|
|
1617
|
+
validate: async (profileId) => {
|
|
1618
|
+
return this.transport.call({
|
|
1619
|
+
groupSegments: ["observers", "profiles"],
|
|
1620
|
+
command: "validate",
|
|
1621
|
+
body: { profileId },
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
},
|
|
1625
|
+
/** Apply observer rules to an existing source session */
|
|
1626
|
+
refresh: async (session) => {
|
|
1627
|
+
return this.transport.call({
|
|
1628
|
+
groupSegments: ["observers"],
|
|
1629
|
+
command: "refresh",
|
|
1630
|
+
body: { session },
|
|
1631
|
+
});
|
|
1632
|
+
},
|
|
1633
|
+
rules: {
|
|
1634
|
+
/** Disable an observer rule */
|
|
1635
|
+
disable: async (id) => {
|
|
1636
|
+
return this.transport.call({
|
|
1637
|
+
groupSegments: ["observers", "rules"],
|
|
1638
|
+
command: "disable",
|
|
1639
|
+
body: { id },
|
|
1640
|
+
});
|
|
1641
|
+
},
|
|
1642
|
+
/** Enable an observer rule */
|
|
1643
|
+
enable: async (id) => {
|
|
1644
|
+
return this.transport.call({
|
|
1645
|
+
groupSegments: ["observers", "rules"],
|
|
1646
|
+
command: "enable",
|
|
1647
|
+
body: { id },
|
|
1648
|
+
});
|
|
1649
|
+
},
|
|
1650
|
+
/** Explain observer rule matching for a source session */
|
|
1651
|
+
explain: async (session) => {
|
|
1652
|
+
return this.transport.call({
|
|
1653
|
+
groupSegments: ["observers", "rules"],
|
|
1654
|
+
command: "explain",
|
|
1655
|
+
body: { session },
|
|
1656
|
+
});
|
|
1657
|
+
},
|
|
1658
|
+
/** List observer rules */
|
|
1659
|
+
list: async (options) => {
|
|
1660
|
+
return this.transport.call({
|
|
1661
|
+
groupSegments: ["observers", "rules"],
|
|
1662
|
+
command: "list",
|
|
1663
|
+
body: { ...(options ?? {}) },
|
|
1664
|
+
});
|
|
1665
|
+
},
|
|
1666
|
+
/** Delete an observer rule */
|
|
1667
|
+
rm: async (id) => {
|
|
1668
|
+
return this.transport.call({
|
|
1669
|
+
groupSegments: ["observers", "rules"],
|
|
1670
|
+
command: "rm",
|
|
1671
|
+
body: { id },
|
|
1672
|
+
});
|
|
1673
|
+
},
|
|
1674
|
+
/** Create or overwrite an observer rule */
|
|
1675
|
+
set: async (id, observerAgentId, options) => {
|
|
1144
1676
|
return this.transport.call({
|
|
1145
|
-
groupSegments: ["
|
|
1677
|
+
groupSegments: ["observers", "rules"],
|
|
1146
1678
|
command: "set",
|
|
1147
|
-
body: {
|
|
1679
|
+
body: { id, observerAgentId, ...(options ?? {}) },
|
|
1148
1680
|
});
|
|
1149
1681
|
},
|
|
1150
|
-
/** Show
|
|
1151
|
-
show: async (
|
|
1682
|
+
/** Show one observer rule */
|
|
1683
|
+
show: async (id) => {
|
|
1152
1684
|
return this.transport.call({
|
|
1153
|
-
groupSegments: ["
|
|
1685
|
+
groupSegments: ["observers", "rules"],
|
|
1154
1686
|
command: "show",
|
|
1155
|
-
body: {
|
|
1687
|
+
body: { id },
|
|
1688
|
+
});
|
|
1689
|
+
},
|
|
1690
|
+
/** Validate observer rules */
|
|
1691
|
+
validate: async () => {
|
|
1692
|
+
return this.transport.call({
|
|
1693
|
+
groupSegments: ["observers", "rules"],
|
|
1694
|
+
command: "validate",
|
|
1695
|
+
body: {},
|
|
1156
1696
|
});
|
|
1157
1697
|
}
|
|
1158
1698
|
},
|
|
1159
|
-
/**
|
|
1160
|
-
|
|
1161
|
-
return this.transport.call({
|
|
1162
|
-
groupSegments: ["instances"],
|
|
1163
|
-
command: "set",
|
|
1164
|
-
body: { name, key, value },
|
|
1165
|
-
});
|
|
1166
|
-
},
|
|
1167
|
-
/** Show instance details */
|
|
1168
|
-
show: async (name) => {
|
|
1699
|
+
/** Show one observer binding */
|
|
1700
|
+
show: async (bindingId) => {
|
|
1169
1701
|
return this.transport.call({
|
|
1170
|
-
groupSegments: ["
|
|
1702
|
+
groupSegments: ["observers"],
|
|
1171
1703
|
command: "show",
|
|
1172
|
-
body: {
|
|
1173
|
-
});
|
|
1174
|
-
},
|
|
1175
|
-
/** Show connection status for an instance */
|
|
1176
|
-
status: async (name) => {
|
|
1177
|
-
return this.transport.call({
|
|
1178
|
-
groupSegments: ["instances"],
|
|
1179
|
-
command: "status",
|
|
1180
|
-
body: { name },
|
|
1181
|
-
});
|
|
1182
|
-
},
|
|
1183
|
-
/** Explain which runtime, DB, and live instance this CLI would affect */
|
|
1184
|
-
target: async (name, options) => {
|
|
1185
|
-
return this.transport.call({
|
|
1186
|
-
groupSegments: ["instances"],
|
|
1187
|
-
command: "target",
|
|
1188
|
-
body: { name, ...(options ?? {}) },
|
|
1189
|
-
});
|
|
1190
|
-
}
|
|
1191
|
-
};
|
|
1192
|
-
media = {
|
|
1193
|
-
/** Send a media file (image, video, audio, document) */
|
|
1194
|
-
send: async (filePath, options) => {
|
|
1195
|
-
return this.transport.call({
|
|
1196
|
-
groupSegments: ["media"],
|
|
1197
|
-
command: "send",
|
|
1198
|
-
body: { filePath, ...(options ?? {}) },
|
|
1704
|
+
body: { bindingId },
|
|
1199
1705
|
});
|
|
1200
1706
|
}
|
|
1201
1707
|
};
|
|
@@ -1439,11 +1945,11 @@ export class RaviClient {
|
|
|
1439
1945
|
});
|
|
1440
1946
|
},
|
|
1441
1947
|
/** List available call profiles */
|
|
1442
|
-
list: async () => {
|
|
1948
|
+
list: async (options) => {
|
|
1443
1949
|
return this.transport.call({
|
|
1444
1950
|
groupSegments: ["prox", "calls", "profiles"],
|
|
1445
1951
|
command: "list",
|
|
1446
|
-
body: {},
|
|
1952
|
+
body: { ...(options ?? {}) },
|
|
1447
1953
|
});
|
|
1448
1954
|
},
|
|
1449
1955
|
/** Show a call profile by ID */
|
|
@@ -1579,11 +2085,11 @@ export class RaviClient {
|
|
|
1579
2085
|
});
|
|
1580
2086
|
},
|
|
1581
2087
|
/** List voice agents */
|
|
1582
|
-
list: async () => {
|
|
2088
|
+
list: async (options) => {
|
|
1583
2089
|
return this.transport.call({
|
|
1584
2090
|
groupSegments: ["prox", "calls", "voice-agents"],
|
|
1585
2091
|
command: "list",
|
|
1586
|
-
body: {},
|
|
2092
|
+
body: { ...(options ?? {}) },
|
|
1587
2093
|
});
|
|
1588
2094
|
},
|
|
1589
2095
|
/** Show a voice agent by ID */
|
|
@@ -1633,11 +2139,11 @@ export class RaviClient {
|
|
|
1633
2139
|
});
|
|
1634
2140
|
},
|
|
1635
2141
|
/** List routes across all instances or for one instance */
|
|
1636
|
-
list: async (name) => {
|
|
2142
|
+
list: async (name, options) => {
|
|
1637
2143
|
return this.transport.call({
|
|
1638
2144
|
groupSegments: ["routes"],
|
|
1639
2145
|
command: "list",
|
|
1640
|
-
body: { name },
|
|
2146
|
+
body: { name, ...(options ?? {}) },
|
|
1641
2147
|
});
|
|
1642
2148
|
},
|
|
1643
2149
|
/** Show route details */
|
|
@@ -1685,6 +2191,90 @@ export class RaviClient {
|
|
|
1685
2191
|
body: { ...(options ?? {}) },
|
|
1686
2192
|
});
|
|
1687
2193
|
}
|
|
2194
|
+
},
|
|
2195
|
+
swift: {
|
|
2196
|
+
/** Compare on-disk Ravi Swift SDK sources to a fresh emit; exit 1 on drift */
|
|
2197
|
+
check: async (options) => {
|
|
2198
|
+
return this.transport.call({
|
|
2199
|
+
groupSegments: ["sdk", "swift"],
|
|
2200
|
+
command: "check",
|
|
2201
|
+
body: { ...(options ?? {}) },
|
|
2202
|
+
});
|
|
2203
|
+
},
|
|
2204
|
+
/** Generate the Ravi Swift SDK source files from the live registry */
|
|
2205
|
+
generate: async (options) => {
|
|
2206
|
+
return this.transport.call({
|
|
2207
|
+
groupSegments: ["sdk", "swift"],
|
|
2208
|
+
command: "generate",
|
|
2209
|
+
body: { ...(options ?? {}) },
|
|
2210
|
+
});
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
};
|
|
2214
|
+
self = {
|
|
2215
|
+
/** Show the current chat binding and participants */
|
|
2216
|
+
chat: async (options) => {
|
|
2217
|
+
return this.transport.call({
|
|
2218
|
+
groupSegments: ["self"],
|
|
2219
|
+
command: "chat",
|
|
2220
|
+
body: { ...(options ?? {}) },
|
|
2221
|
+
});
|
|
2222
|
+
},
|
|
2223
|
+
/** Show the full current self-context packet */
|
|
2224
|
+
context: async (options) => {
|
|
2225
|
+
return this.transport.call({
|
|
2226
|
+
groupSegments: ["self"],
|
|
2227
|
+
command: "context",
|
|
2228
|
+
body: { ...(options ?? {}) },
|
|
2229
|
+
});
|
|
2230
|
+
},
|
|
2231
|
+
/** Explain how Ravi resolved the current self-context */
|
|
2232
|
+
explain: async () => {
|
|
2233
|
+
return this.transport.call({
|
|
2234
|
+
groupSegments: ["self"],
|
|
2235
|
+
command: "explain",
|
|
2236
|
+
body: {},
|
|
2237
|
+
});
|
|
2238
|
+
},
|
|
2239
|
+
/** Show current knowledge integration status for this context */
|
|
2240
|
+
knowledge: async () => {
|
|
2241
|
+
return this.transport.call({
|
|
2242
|
+
groupSegments: ["self"],
|
|
2243
|
+
command: "knowledge",
|
|
2244
|
+
body: {},
|
|
2245
|
+
});
|
|
2246
|
+
},
|
|
2247
|
+
/** Show capabilities inherited by the current context */
|
|
2248
|
+
permissions: async () => {
|
|
2249
|
+
return this.transport.call({
|
|
2250
|
+
groupSegments: ["self"],
|
|
2251
|
+
command: "permissions",
|
|
2252
|
+
body: {},
|
|
2253
|
+
});
|
|
2254
|
+
},
|
|
2255
|
+
/** Show bounded recent message metadata for the current chat */
|
|
2256
|
+
recent: async (options) => {
|
|
2257
|
+
return this.transport.call({
|
|
2258
|
+
groupSegments: ["self"],
|
|
2259
|
+
command: "recent",
|
|
2260
|
+
body: { ...(options ?? {}) },
|
|
2261
|
+
});
|
|
2262
|
+
},
|
|
2263
|
+
/** Show route information that led to the current session */
|
|
2264
|
+
route: async () => {
|
|
2265
|
+
return this.transport.call({
|
|
2266
|
+
groupSegments: ["self"],
|
|
2267
|
+
command: "route",
|
|
2268
|
+
body: {},
|
|
2269
|
+
});
|
|
2270
|
+
},
|
|
2271
|
+
/** Show the current agent/session identity */
|
|
2272
|
+
whoami: async () => {
|
|
2273
|
+
return this.transport.call({
|
|
2274
|
+
groupSegments: ["self"],
|
|
2275
|
+
command: "whoami",
|
|
2276
|
+
body: {},
|
|
2277
|
+
});
|
|
1688
2278
|
}
|
|
1689
2279
|
};
|
|
1690
2280
|
service = {
|
|
@@ -1730,14 +2320,6 @@ export class RaviClient {
|
|
|
1730
2320
|
body: { target, message, sender, ...(options ?? {}) },
|
|
1731
2321
|
});
|
|
1732
2322
|
},
|
|
1733
|
-
/** Tail live runtime events for a session (defaults to current session when available) */
|
|
1734
|
-
debug: async (nameOrKey, options) => {
|
|
1735
|
-
return this.transport.call({
|
|
1736
|
-
groupSegments: ["sessions"],
|
|
1737
|
-
command: "debug",
|
|
1738
|
-
body: { nameOrKey, ...(options ?? {}) },
|
|
1739
|
-
});
|
|
1740
|
-
},
|
|
1741
2323
|
/** Delete a session permanently */
|
|
1742
2324
|
delete: async (nameOrKey) => {
|
|
1743
2325
|
return this.transport.call({
|
|
@@ -1762,6 +2344,14 @@ export class RaviClient {
|
|
|
1762
2344
|
body: { nameOrKey, duration },
|
|
1763
2345
|
});
|
|
1764
2346
|
},
|
|
2347
|
+
/** Inspect or mutate persisted session goal state */
|
|
2348
|
+
goal: async (action, nameOrKey, objective, options) => {
|
|
2349
|
+
return this.transport.call({
|
|
2350
|
+
groupSegments: ["sessions"],
|
|
2351
|
+
command: "goal",
|
|
2352
|
+
body: { action, nameOrKey, objective, ...(options ?? {}) },
|
|
2353
|
+
});
|
|
2354
|
+
},
|
|
1765
2355
|
/** Show unified session inspection details */
|
|
1766
2356
|
info: async (nameOrKey) => {
|
|
1767
2357
|
return this.transport.call({
|
|
@@ -1794,6 +2384,14 @@ export class RaviClient {
|
|
|
1794
2384
|
body: { ...(options ?? {}) },
|
|
1795
2385
|
});
|
|
1796
2386
|
},
|
|
2387
|
+
/** Prune sessions inactive for a duration (dry-run by default) */
|
|
2388
|
+
prune: async (options) => {
|
|
2389
|
+
return this.transport.call({
|
|
2390
|
+
groupSegments: ["sessions"],
|
|
2391
|
+
command: "prune",
|
|
2392
|
+
body: { ...(options ?? {}) },
|
|
2393
|
+
});
|
|
2394
|
+
},
|
|
1797
2395
|
/** Read message history of a session (normalized) */
|
|
1798
2396
|
read: async (nameOrKey, options) => {
|
|
1799
2397
|
return this.transport.call({
|
|
@@ -1923,6 +2521,14 @@ export class RaviClient {
|
|
|
1923
2521
|
command: "trace",
|
|
1924
2522
|
body: { nameOrKey, ...(options ?? {}) },
|
|
1925
2523
|
});
|
|
2524
|
+
},
|
|
2525
|
+
/** Show runtime session visibility state */
|
|
2526
|
+
visibility: async (nameOrKey) => {
|
|
2527
|
+
return this.transport.call({
|
|
2528
|
+
groupSegments: ["sessions"],
|
|
2529
|
+
command: "visibility",
|
|
2530
|
+
body: { nameOrKey },
|
|
2531
|
+
});
|
|
1926
2532
|
}
|
|
1927
2533
|
};
|
|
1928
2534
|
settings = {
|
|
@@ -1959,6 +2565,64 @@ export class RaviClient {
|
|
|
1959
2565
|
});
|
|
1960
2566
|
}
|
|
1961
2567
|
};
|
|
2568
|
+
skillGates = {
|
|
2569
|
+
/** Disable a skill gate rule */
|
|
2570
|
+
disable: async (id) => {
|
|
2571
|
+
return this.transport.call({
|
|
2572
|
+
groupSegments: ["skill-gates"],
|
|
2573
|
+
command: "disable",
|
|
2574
|
+
body: { id },
|
|
2575
|
+
});
|
|
2576
|
+
},
|
|
2577
|
+
/** Enable a configured skill gate rule */
|
|
2578
|
+
enable: async (id) => {
|
|
2579
|
+
return this.transport.call({
|
|
2580
|
+
groupSegments: ["skill-gates"],
|
|
2581
|
+
command: "enable",
|
|
2582
|
+
body: { id },
|
|
2583
|
+
});
|
|
2584
|
+
},
|
|
2585
|
+
/** List skill gate rules */
|
|
2586
|
+
list: async (options) => {
|
|
2587
|
+
return this.transport.call({
|
|
2588
|
+
groupSegments: ["skill-gates"],
|
|
2589
|
+
command: "list",
|
|
2590
|
+
body: { ...(options ?? {}) },
|
|
2591
|
+
});
|
|
2592
|
+
},
|
|
2593
|
+
/** Delete a configured override and restore the default behavior */
|
|
2594
|
+
reset: async (id) => {
|
|
2595
|
+
return this.transport.call({
|
|
2596
|
+
groupSegments: ["skill-gates"],
|
|
2597
|
+
command: "reset",
|
|
2598
|
+
body: { id },
|
|
2599
|
+
});
|
|
2600
|
+
},
|
|
2601
|
+
/** Remove a custom gate or disable a default gate */
|
|
2602
|
+
rm: async (id) => {
|
|
2603
|
+
return this.transport.call({
|
|
2604
|
+
groupSegments: ["skill-gates"],
|
|
2605
|
+
command: "rm",
|
|
2606
|
+
body: { id },
|
|
2607
|
+
});
|
|
2608
|
+
},
|
|
2609
|
+
/** Create or overwrite a skill gate rule */
|
|
2610
|
+
set: async (id, skill, options) => {
|
|
2611
|
+
return this.transport.call({
|
|
2612
|
+
groupSegments: ["skill-gates"],
|
|
2613
|
+
command: "set",
|
|
2614
|
+
body: { id, skill, ...(options ?? {}) },
|
|
2615
|
+
});
|
|
2616
|
+
},
|
|
2617
|
+
/** Show one skill gate rule */
|
|
2618
|
+
show: async (id) => {
|
|
2619
|
+
return this.transport.call({
|
|
2620
|
+
groupSegments: ["skill-gates"],
|
|
2621
|
+
command: "show",
|
|
2622
|
+
body: { id },
|
|
2623
|
+
});
|
|
2624
|
+
}
|
|
2625
|
+
};
|
|
1962
2626
|
skills = {
|
|
1963
2627
|
/** Install Ravi catalog skills or skills from an explicit source */
|
|
1964
2628
|
install: async (name, options) => {
|
|
@@ -2037,11 +2701,11 @@ export class RaviClient {
|
|
|
2037
2701
|
});
|
|
2038
2702
|
},
|
|
2039
2703
|
/** List stickers in the typed catalog */
|
|
2040
|
-
list: async () => {
|
|
2704
|
+
list: async (options) => {
|
|
2041
2705
|
return this.transport.call({
|
|
2042
2706
|
groupSegments: ["stickers"],
|
|
2043
2707
|
command: "list",
|
|
2044
|
-
body: {},
|
|
2708
|
+
body: { ...(options ?? {}) },
|
|
2045
2709
|
});
|
|
2046
2710
|
},
|
|
2047
2711
|
/** Remove a sticker catalog entry */
|
|
@@ -2069,8 +2733,58 @@ export class RaviClient {
|
|
|
2069
2733
|
});
|
|
2070
2734
|
}
|
|
2071
2735
|
};
|
|
2736
|
+
tagRules = {
|
|
2737
|
+
/** Evaluate a rule against a target asset */
|
|
2738
|
+
evaluate: async (ruleId, options) => {
|
|
2739
|
+
return this.transport.call({
|
|
2740
|
+
groupSegments: ["tag-rules"],
|
|
2741
|
+
command: "evaluate",
|
|
2742
|
+
body: { ruleId, ...(options ?? {}) },
|
|
2743
|
+
});
|
|
2744
|
+
},
|
|
2745
|
+
/** Explain which rules currently match a target asset (dry-run) */
|
|
2746
|
+
explain: async (options) => {
|
|
2747
|
+
return this.transport.call({
|
|
2748
|
+
groupSegments: ["tag-rules"],
|
|
2749
|
+
command: "explain",
|
|
2750
|
+
body: { ...(options ?? {}) },
|
|
2751
|
+
});
|
|
2752
|
+
},
|
|
2753
|
+
/** List loaded tag rules from .ravi/tag-rules */
|
|
2754
|
+
list: async (options) => {
|
|
2755
|
+
return this.transport.call({
|
|
2756
|
+
groupSegments: ["tag-rules"],
|
|
2757
|
+
command: "list",
|
|
2758
|
+
body: { ...(options ?? {}) },
|
|
2759
|
+
});
|
|
2760
|
+
},
|
|
2761
|
+
/** Show a single rule definition */
|
|
2762
|
+
show: async (id) => {
|
|
2763
|
+
return this.transport.call({
|
|
2764
|
+
groupSegments: ["tag-rules"],
|
|
2765
|
+
command: "show",
|
|
2766
|
+
body: { id },
|
|
2767
|
+
});
|
|
2768
|
+
},
|
|
2769
|
+
/** Run all rules against all contacts (use for cron/periodic schedules) */
|
|
2770
|
+
tick: async (options) => {
|
|
2771
|
+
return this.transport.call({
|
|
2772
|
+
groupSegments: ["tag-rules"],
|
|
2773
|
+
command: "tick",
|
|
2774
|
+
body: { ...(options ?? {}) },
|
|
2775
|
+
});
|
|
2776
|
+
},
|
|
2777
|
+
/** Validate all rule files without applying */
|
|
2778
|
+
validate: async () => {
|
|
2779
|
+
return this.transport.call({
|
|
2780
|
+
groupSegments: ["tag-rules"],
|
|
2781
|
+
command: "validate",
|
|
2782
|
+
body: {},
|
|
2783
|
+
});
|
|
2784
|
+
}
|
|
2785
|
+
};
|
|
2072
2786
|
tags = {
|
|
2073
|
-
/** Attach a tag to
|
|
2787
|
+
/** Attach a tag to a Ravi asset */
|
|
2074
2788
|
attach: async (slug, options) => {
|
|
2075
2789
|
return this.transport.call({
|
|
2076
2790
|
groupSegments: ["tags"],
|
|
@@ -2086,7 +2800,7 @@ export class RaviClient {
|
|
|
2086
2800
|
body: { slug, ...(options ?? {}) },
|
|
2087
2801
|
});
|
|
2088
2802
|
},
|
|
2089
|
-
/** Detach a tag from
|
|
2803
|
+
/** Detach a tag from a Ravi asset */
|
|
2090
2804
|
detach: async (slug, options) => {
|
|
2091
2805
|
return this.transport.call({
|
|
2092
2806
|
groupSegments: ["tags"],
|
|
@@ -2095,11 +2809,11 @@ export class RaviClient {
|
|
|
2095
2809
|
});
|
|
2096
2810
|
},
|
|
2097
2811
|
/** List tag definitions */
|
|
2098
|
-
list: async () => {
|
|
2812
|
+
list: async (options) => {
|
|
2099
2813
|
return this.transport.call({
|
|
2100
2814
|
groupSegments: ["tags"],
|
|
2101
2815
|
command: "list",
|
|
2102
|
-
body: {},
|
|
2816
|
+
body: { ...(options ?? {}) },
|
|
2103
2817
|
});
|
|
2104
2818
|
},
|
|
2105
2819
|
/** Search bindings by tag or asset */
|
|
@@ -2110,6 +2824,14 @@ export class RaviClient {
|
|
|
2110
2824
|
body: { ...(options ?? {}) },
|
|
2111
2825
|
});
|
|
2112
2826
|
},
|
|
2827
|
+
/** Set tag definition metadata */
|
|
2828
|
+
set: async (slug, key, value) => {
|
|
2829
|
+
return this.transport.call({
|
|
2830
|
+
groupSegments: ["tags"],
|
|
2831
|
+
command: "set",
|
|
2832
|
+
body: { slug, key, value },
|
|
2833
|
+
});
|
|
2834
|
+
},
|
|
2113
2835
|
/** Show one tag and its bindings */
|
|
2114
2836
|
show: async (slug) => {
|
|
2115
2837
|
return this.transport.call({
|
|
@@ -2154,11 +2876,11 @@ export class RaviClient {
|
|
|
2154
2876
|
});
|
|
2155
2877
|
},
|
|
2156
2878
|
/** List configured task automations */
|
|
2157
|
-
list: async () => {
|
|
2879
|
+
list: async (options) => {
|
|
2158
2880
|
return this.transport.call({
|
|
2159
2881
|
groupSegments: ["tasks", "automations"],
|
|
2160
2882
|
command: "list",
|
|
2161
|
-
body: {},
|
|
2883
|
+
body: { ...(options ?? {}) },
|
|
2162
2884
|
});
|
|
2163
2885
|
},
|
|
2164
2886
|
/** Delete a task automation */
|
|
@@ -2212,11 +2934,11 @@ export class RaviClient {
|
|
|
2212
2934
|
});
|
|
2213
2935
|
},
|
|
2214
2936
|
/** List gating dependencies and dependents for a task */
|
|
2215
|
-
ls: async (taskId) => {
|
|
2937
|
+
ls: async (taskId, options) => {
|
|
2216
2938
|
return this.transport.call({
|
|
2217
2939
|
groupSegments: ["tasks", "deps"],
|
|
2218
2940
|
command: "ls",
|
|
2219
|
-
body: { taskId },
|
|
2941
|
+
body: { taskId, ...(options ?? {}) },
|
|
2220
2942
|
});
|
|
2221
2943
|
},
|
|
2222
2944
|
/** Remove one gating dependency from a task */
|
|
@@ -2270,11 +2992,11 @@ export class RaviClient {
|
|
|
2270
2992
|
});
|
|
2271
2993
|
},
|
|
2272
2994
|
/** List resolved task profiles from all catalog sources */
|
|
2273
|
-
list: async () => {
|
|
2995
|
+
list: async (options) => {
|
|
2274
2996
|
return this.transport.call({
|
|
2275
2997
|
groupSegments: ["tasks", "profiles"],
|
|
2276
2998
|
command: "list",
|
|
2277
|
-
body: {},
|
|
2999
|
+
body: { ...(options ?? {}) },
|
|
2278
3000
|
});
|
|
2279
3001
|
},
|
|
2280
3002
|
/** Render a profile preview with the resolved template context */
|
|
@@ -2325,57 +3047,89 @@ export class RaviClient {
|
|
|
2325
3047
|
command: "unarchive",
|
|
2326
3048
|
body: { taskId },
|
|
2327
3049
|
});
|
|
3050
|
+
}
|
|
3051
|
+
};
|
|
3052
|
+
threads = {
|
|
3053
|
+
/** Render the bounded thread brief used for handoff */
|
|
3054
|
+
brief: async (thread, options) => {
|
|
3055
|
+
return this.transport.call({
|
|
3056
|
+
groupSegments: ["threads"],
|
|
3057
|
+
command: "brief",
|
|
3058
|
+
body: { thread, ...(options ?? {}) },
|
|
3059
|
+
});
|
|
2328
3060
|
},
|
|
2329
|
-
/**
|
|
2330
|
-
|
|
3061
|
+
/** Close a thread */
|
|
3062
|
+
close: async (thread, options) => {
|
|
2331
3063
|
return this.transport.call({
|
|
2332
|
-
groupSegments: ["
|
|
2333
|
-
command: "
|
|
2334
|
-
body: {
|
|
3064
|
+
groupSegments: ["threads"],
|
|
3065
|
+
command: "close",
|
|
3066
|
+
body: { thread, ...(options ?? {}) },
|
|
2335
3067
|
});
|
|
2336
|
-
}
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
/** Attach or switch to an agent/session inside tmux */
|
|
2340
|
-
attach: async (agent, session) => {
|
|
3068
|
+
},
|
|
3069
|
+
/** Append a comment to a thread */
|
|
3070
|
+
comment: async (thread, body, options) => {
|
|
2341
3071
|
return this.transport.call({
|
|
2342
|
-
groupSegments: ["
|
|
2343
|
-
command: "
|
|
2344
|
-
body: {
|
|
3072
|
+
groupSegments: ["threads"],
|
|
3073
|
+
command: "comment",
|
|
3074
|
+
body: { thread, body, ...(options ?? {}) },
|
|
2345
3075
|
});
|
|
2346
3076
|
},
|
|
2347
|
-
/**
|
|
2348
|
-
|
|
3077
|
+
/** Create a Ravi-owned thread */
|
|
3078
|
+
create: async (slug, options) => {
|
|
2349
3079
|
return this.transport.call({
|
|
2350
|
-
groupSegments: ["
|
|
2351
|
-
command: "
|
|
2352
|
-
body: {},
|
|
3080
|
+
groupSegments: ["threads"],
|
|
3081
|
+
command: "create",
|
|
3082
|
+
body: { slug, ...(options ?? {}) },
|
|
3083
|
+
});
|
|
3084
|
+
},
|
|
3085
|
+
/** List thread entries */
|
|
3086
|
+
entries: async (thread, options) => {
|
|
3087
|
+
return this.transport.call({
|
|
3088
|
+
groupSegments: ["threads"],
|
|
3089
|
+
command: "entries",
|
|
3090
|
+
body: { thread, ...(options ?? {}) },
|
|
2353
3091
|
});
|
|
2354
3092
|
},
|
|
2355
|
-
/**
|
|
2356
|
-
|
|
3093
|
+
/** Link a thread to another Ravi object */
|
|
3094
|
+
link: async (thread, target, options) => {
|
|
2357
3095
|
return this.transport.call({
|
|
2358
|
-
groupSegments: ["
|
|
2359
|
-
command: "
|
|
2360
|
-
body: {
|
|
3096
|
+
groupSegments: ["threads"],
|
|
3097
|
+
command: "link",
|
|
3098
|
+
body: { thread, target, ...(options ?? {}) },
|
|
2361
3099
|
});
|
|
2362
3100
|
},
|
|
2363
|
-
/**
|
|
2364
|
-
|
|
3101
|
+
/** List Ravi threads */
|
|
3102
|
+
list: async (options) => {
|
|
2365
3103
|
return this.transport.call({
|
|
2366
|
-
groupSegments: ["
|
|
2367
|
-
command: "
|
|
3104
|
+
groupSegments: ["threads"],
|
|
3105
|
+
command: "list",
|
|
2368
3106
|
body: { ...(options ?? {}) },
|
|
2369
3107
|
});
|
|
3108
|
+
},
|
|
3109
|
+
/** Append a note to a thread */
|
|
3110
|
+
note: async (thread, body, options) => {
|
|
3111
|
+
return this.transport.call({
|
|
3112
|
+
groupSegments: ["threads"],
|
|
3113
|
+
command: "note",
|
|
3114
|
+
body: { thread, body, ...(options ?? {}) },
|
|
3115
|
+
});
|
|
3116
|
+
},
|
|
3117
|
+
/** Show one thread with links and recent entries */
|
|
3118
|
+
show: async (thread, options) => {
|
|
3119
|
+
return this.transport.call({
|
|
3120
|
+
groupSegments: ["threads"],
|
|
3121
|
+
command: "show",
|
|
3122
|
+
body: { thread, ...(options ?? {}) },
|
|
3123
|
+
});
|
|
2370
3124
|
}
|
|
2371
3125
|
};
|
|
2372
3126
|
tools = {
|
|
2373
3127
|
/** List all available CLI tools */
|
|
2374
|
-
list: async () => {
|
|
3128
|
+
list: async (options) => {
|
|
2375
3129
|
return this.transport.call({
|
|
2376
3130
|
groupSegments: ["tools"],
|
|
2377
3131
|
command: "list",
|
|
2378
|
-
body: {},
|
|
3132
|
+
body: { ...(options ?? {}) },
|
|
2379
3133
|
});
|
|
2380
3134
|
},
|
|
2381
3135
|
/** Export tools as JSON manifest */
|
|
@@ -2447,11 +3201,11 @@ export class RaviClient {
|
|
|
2447
3201
|
});
|
|
2448
3202
|
},
|
|
2449
3203
|
/** List all event triggers */
|
|
2450
|
-
list: async () => {
|
|
3204
|
+
list: async (options) => {
|
|
2451
3205
|
return this.transport.call({
|
|
2452
3206
|
groupSegments: ["triggers"],
|
|
2453
3207
|
command: "list",
|
|
2454
|
-
body: {},
|
|
3208
|
+
body: { ...(options ?? {}) },
|
|
2455
3209
|
});
|
|
2456
3210
|
},
|
|
2457
3211
|
/** Delete a trigger */
|
|
@@ -2658,11 +3412,11 @@ export class RaviClient {
|
|
|
2658
3412
|
});
|
|
2659
3413
|
},
|
|
2660
3414
|
/** List workflow runs */
|
|
2661
|
-
list: async () => {
|
|
3415
|
+
list: async (options) => {
|
|
2662
3416
|
return this.transport.call({
|
|
2663
3417
|
groupSegments: ["workflows", "runs"],
|
|
2664
3418
|
command: "list",
|
|
2665
|
-
body: {},
|
|
3419
|
+
body: { ...(options ?? {}) },
|
|
2666
3420
|
});
|
|
2667
3421
|
},
|
|
2668
3422
|
/** Release a manual node transition or gate */
|
|
@@ -2724,11 +3478,11 @@ export class RaviClient {
|
|
|
2724
3478
|
});
|
|
2725
3479
|
},
|
|
2726
3480
|
/** List workflow specs */
|
|
2727
|
-
list: async () => {
|
|
3481
|
+
list: async (options) => {
|
|
2728
3482
|
return this.transport.call({
|
|
2729
3483
|
groupSegments: ["workflows", "specs"],
|
|
2730
3484
|
command: "list",
|
|
2731
|
-
body: {},
|
|
3485
|
+
body: { ...(options ?? {}) },
|
|
2732
3486
|
});
|
|
2733
3487
|
},
|
|
2734
3488
|
/** Show one workflow spec */
|