@ravi-os/sdk 0.260519.2 → 0.260716.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 +32 -0
- package/dist/client.d.ts +1682 -40
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2364 -157
- 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/inherit.d.ts +38 -0
- package/dist/inherit.d.ts.map +1 -0
- package/dist/inherit.js +101 -0
- package/dist/inherit.js.map +1 -0
- package/dist/schemas.d.ts +52044 -5135
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +66566 -5477
- package/dist/schemas.js.map +1 -1
- package/dist/streaming.d.ts +1 -92
- package/dist/streaming.d.ts.map +1 -1
- package/dist/streaming.generated.d.ts +185 -0
- package/dist/streaming.generated.d.ts.map +1 -0
- package/dist/streaming.generated.js +233 -0
- package/dist/streaming.generated.js.map +1 -0
- package/dist/streaming.js +10 -188
- package/dist/streaming.js.map +1 -1
- package/dist/types.d.ts +11526 -942
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +5 -1
package/dist/client.js
CHANGED
|
@@ -73,6 +73,14 @@ export class RaviClient {
|
|
|
73
73
|
body: { ...(options ?? {}) },
|
|
74
74
|
});
|
|
75
75
|
},
|
|
76
|
+
/** Set or show an agent runtime permission profile */
|
|
77
|
+
permissions: async (id, profile, options) => {
|
|
78
|
+
return this.transport.call({
|
|
79
|
+
groupSegments: ["agents"],
|
|
80
|
+
command: "permissions",
|
|
81
|
+
body: { id, profile, ...(options ?? {}) },
|
|
82
|
+
});
|
|
83
|
+
},
|
|
76
84
|
/** Reset agent session */
|
|
77
85
|
reset: async (id, nameOrKey) => {
|
|
78
86
|
return this.transport.call({
|
|
@@ -89,7 +97,7 @@ export class RaviClient {
|
|
|
89
97
|
body: { id },
|
|
90
98
|
});
|
|
91
99
|
},
|
|
92
|
-
/** Set agent property */
|
|
100
|
+
/** Set agent property and report active session runtime overrides */
|
|
93
101
|
set: async (id, key, value) => {
|
|
94
102
|
return this.transport.call({
|
|
95
103
|
groupSegments: ["agents"],
|
|
@@ -122,6 +130,80 @@ export class RaviClient {
|
|
|
122
130
|
});
|
|
123
131
|
}
|
|
124
132
|
};
|
|
133
|
+
apps = {
|
|
134
|
+
/** Validate Ravi app manifests without executing app code */
|
|
135
|
+
check: async (id) => {
|
|
136
|
+
return this.transport.call({
|
|
137
|
+
groupSegments: ["apps"],
|
|
138
|
+
command: "check",
|
|
139
|
+
body: { id },
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
/** Delete scaffold-owned artifacts for a Ravi app */
|
|
143
|
+
delete: async (id, options) => {
|
|
144
|
+
return this.transport.call({
|
|
145
|
+
groupSegments: ["apps"],
|
|
146
|
+
command: "delete",
|
|
147
|
+
body: { id, ...(options ?? {}) },
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
/** Print agent guidance for discovering, scaffolding, and operating Ravi apps */
|
|
151
|
+
guide: async (id) => {
|
|
152
|
+
return this.transport.call({
|
|
153
|
+
groupSegments: ["apps"],
|
|
154
|
+
command: "guide",
|
|
155
|
+
body: { id },
|
|
156
|
+
});
|
|
157
|
+
},
|
|
158
|
+
/** Create a Ravi app draft from an existing CLI contract */
|
|
159
|
+
importCli: async (command, options) => {
|
|
160
|
+
return this.transport.call({
|
|
161
|
+
groupSegments: ["apps"],
|
|
162
|
+
command: "import-cli",
|
|
163
|
+
body: { command, ...(options ?? {}) },
|
|
164
|
+
});
|
|
165
|
+
},
|
|
166
|
+
/** List discovered Ravi apps */
|
|
167
|
+
list: async (options) => {
|
|
168
|
+
return this.transport.call({
|
|
169
|
+
groupSegments: ["apps"],
|
|
170
|
+
command: "list",
|
|
171
|
+
body: { ...(options ?? {}) },
|
|
172
|
+
});
|
|
173
|
+
},
|
|
174
|
+
/** Print all built-in Ravi apps agent prompts */
|
|
175
|
+
prompts: async (id) => {
|
|
176
|
+
return this.transport.call({
|
|
177
|
+
groupSegments: ["apps"],
|
|
178
|
+
command: "prompts",
|
|
179
|
+
body: { id },
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
/** Run a Ravi app operation through the runtime app router */
|
|
183
|
+
run: async (id, operation, args) => {
|
|
184
|
+
return this.transport.call({
|
|
185
|
+
groupSegments: ["apps"],
|
|
186
|
+
command: "run",
|
|
187
|
+
body: { id, operation, args },
|
|
188
|
+
});
|
|
189
|
+
},
|
|
190
|
+
/** Create a Ravi app scaffold from the app contract */
|
|
191
|
+
scaffold: async (id, options) => {
|
|
192
|
+
return this.transport.call({
|
|
193
|
+
groupSegments: ["apps"],
|
|
194
|
+
command: "scaffold",
|
|
195
|
+
body: { id, ...(options ?? {}) },
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
/** Show a Ravi app manifest */
|
|
199
|
+
show: async (id) => {
|
|
200
|
+
return this.transport.call({
|
|
201
|
+
groupSegments: ["apps"],
|
|
202
|
+
command: "show",
|
|
203
|
+
body: { id },
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
};
|
|
125
207
|
artifacts = {
|
|
126
208
|
/** Soft-archive an artifact */
|
|
127
209
|
archive: async (id) => {
|
|
@@ -180,7 +262,7 @@ export class RaviClient {
|
|
|
180
262
|
body: { ...(options ?? {}) },
|
|
181
263
|
});
|
|
182
264
|
},
|
|
183
|
-
/**
|
|
265
|
+
/** Upload a local artifact/file/directory to Console and optionally release it to Ravi Pages */
|
|
184
266
|
publish: async (target, options) => {
|
|
185
267
|
return this.transport.call({
|
|
186
268
|
groupSegments: ["artifacts"],
|
|
@@ -248,6 +330,15 @@ export class RaviClient {
|
|
|
248
330
|
}
|
|
249
331
|
};
|
|
250
332
|
audio = {
|
|
333
|
+
/** Return generated TTS audio bytes */
|
|
334
|
+
blob: async (id) => {
|
|
335
|
+
return this.transport.call({
|
|
336
|
+
groupSegments: ["audio"],
|
|
337
|
+
command: "blob",
|
|
338
|
+
body: { id },
|
|
339
|
+
binary: true,
|
|
340
|
+
});
|
|
341
|
+
},
|
|
251
342
|
/** Generate speech from text using ElevenLabs TTS */
|
|
252
343
|
generate: async (text, options) => {
|
|
253
344
|
return this.transport.call({
|
|
@@ -255,9 +346,241 @@ export class RaviClient {
|
|
|
255
346
|
command: "generate",
|
|
256
347
|
body: { text, ...(options ?? {}) },
|
|
257
348
|
});
|
|
349
|
+
},
|
|
350
|
+
/** List generated ravi.tts playback items waiting for extension playback */
|
|
351
|
+
pending: async (options) => {
|
|
352
|
+
return this.transport.call({
|
|
353
|
+
groupSegments: ["audio"],
|
|
354
|
+
command: "pending",
|
|
355
|
+
body: { ...(options ?? {}) },
|
|
356
|
+
});
|
|
357
|
+
},
|
|
358
|
+
/** Publish a ravi.tts request for ElevenLabs generation and extension playback */
|
|
359
|
+
tts: async (text, options) => {
|
|
360
|
+
return this.transport.call({
|
|
361
|
+
groupSegments: ["audio"],
|
|
362
|
+
command: "tts",
|
|
363
|
+
body: { text, ...(options ?? {}) },
|
|
364
|
+
});
|
|
365
|
+
},
|
|
366
|
+
/** List available ElevenLabs voices for picker UIs */
|
|
367
|
+
voices: async (options) => {
|
|
368
|
+
return this.transport.call({
|
|
369
|
+
groupSegments: ["audio"],
|
|
370
|
+
command: "voices",
|
|
371
|
+
body: { ...(options ?? {}) },
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
bridges = {
|
|
376
|
+
/** Create a Ravi MCP bridge URL for a Console project */
|
|
377
|
+
create: async (options) => {
|
|
378
|
+
return this.transport.call({
|
|
379
|
+
groupSegments: ["bridges"],
|
|
380
|
+
command: "create",
|
|
381
|
+
body: { ...(options ?? {}) },
|
|
382
|
+
});
|
|
383
|
+
},
|
|
384
|
+
/** List Ravi MCP bridges for a Console project */
|
|
385
|
+
list: async (options) => {
|
|
386
|
+
return this.transport.call({
|
|
387
|
+
groupSegments: ["bridges"],
|
|
388
|
+
command: "list",
|
|
389
|
+
body: { ...(options ?? {}) },
|
|
390
|
+
});
|
|
391
|
+
},
|
|
392
|
+
/** Revoke a Ravi MCP bridge and its client tokens */
|
|
393
|
+
revoke: async (id, options) => {
|
|
394
|
+
return this.transport.call({
|
|
395
|
+
groupSegments: ["bridges"],
|
|
396
|
+
command: "revoke",
|
|
397
|
+
body: { id, ...(options ?? {}) },
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
calendars = {
|
|
402
|
+
/** Return free/busy availability in a bounded time window */
|
|
403
|
+
availability: async (options) => {
|
|
404
|
+
return this.transport.call({
|
|
405
|
+
groupSegments: ["calendars"],
|
|
406
|
+
command: "availability",
|
|
407
|
+
body: { ...(options ?? {}) },
|
|
408
|
+
});
|
|
409
|
+
},
|
|
410
|
+
/** Create or update a local calendar projection */
|
|
411
|
+
create: async (options) => {
|
|
412
|
+
return this.transport.call({
|
|
413
|
+
groupSegments: ["calendars"],
|
|
414
|
+
command: "create",
|
|
415
|
+
body: { ...(options ?? {}) },
|
|
416
|
+
});
|
|
417
|
+
},
|
|
418
|
+
/** Disable a local calendar projection */
|
|
419
|
+
disable: async (calendar) => {
|
|
420
|
+
return this.transport.call({
|
|
421
|
+
groupSegments: ["calendars"],
|
|
422
|
+
command: "disable",
|
|
423
|
+
body: { calendar },
|
|
424
|
+
});
|
|
425
|
+
},
|
|
426
|
+
events: {
|
|
427
|
+
/** Cancel a local calendar event */
|
|
428
|
+
cancel: async (event, options) => {
|
|
429
|
+
return this.transport.call({
|
|
430
|
+
groupSegments: ["calendars", "events"],
|
|
431
|
+
command: "cancel",
|
|
432
|
+
body: { event, ...(options ?? {}) },
|
|
433
|
+
});
|
|
434
|
+
},
|
|
435
|
+
/** Create a local calendar event and local outbox row */
|
|
436
|
+
create: async (options) => {
|
|
437
|
+
return this.transport.call({
|
|
438
|
+
groupSegments: ["calendars", "events"],
|
|
439
|
+
command: "create",
|
|
440
|
+
body: { ...(options ?? {}) },
|
|
441
|
+
});
|
|
442
|
+
},
|
|
443
|
+
/** List local calendar events in a bounded time window */
|
|
444
|
+
list: async (options) => {
|
|
445
|
+
return this.transport.call({
|
|
446
|
+
groupSegments: ["calendars", "events"],
|
|
447
|
+
command: "list",
|
|
448
|
+
body: { ...(options ?? {}) },
|
|
449
|
+
});
|
|
450
|
+
},
|
|
451
|
+
/** Read one local calendar event */
|
|
452
|
+
read: async (event) => {
|
|
453
|
+
return this.transport.call({
|
|
454
|
+
groupSegments: ["calendars", "events"],
|
|
455
|
+
command: "read",
|
|
456
|
+
body: { event },
|
|
457
|
+
});
|
|
458
|
+
},
|
|
459
|
+
/** Record an attendee response and enqueue provider delivery */
|
|
460
|
+
respond: async (event, options) => {
|
|
461
|
+
return this.transport.call({
|
|
462
|
+
groupSegments: ["calendars", "events"],
|
|
463
|
+
command: "respond",
|
|
464
|
+
body: { event, ...(options ?? {}) },
|
|
465
|
+
});
|
|
466
|
+
},
|
|
467
|
+
/** Update a local calendar event and enqueue provider delivery */
|
|
468
|
+
update: async (event, options) => {
|
|
469
|
+
return this.transport.call({
|
|
470
|
+
groupSegments: ["calendars", "events"],
|
|
471
|
+
command: "update",
|
|
472
|
+
body: { event, ...(options ?? {}) },
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
/** List local calendars visible to the current requester */
|
|
477
|
+
list: async (options) => {
|
|
478
|
+
return this.transport.call({
|
|
479
|
+
groupSegments: ["calendars"],
|
|
480
|
+
command: "list",
|
|
481
|
+
body: { ...(options ?? {}) },
|
|
482
|
+
});
|
|
483
|
+
},
|
|
484
|
+
/** Grant a calendar relation to an agent/contact/system subject */
|
|
485
|
+
share: async (calendar, options) => {
|
|
486
|
+
return this.transport.call({
|
|
487
|
+
groupSegments: ["calendars"],
|
|
488
|
+
command: "share",
|
|
489
|
+
body: { calendar, ...(options ?? {}) },
|
|
490
|
+
});
|
|
491
|
+
},
|
|
492
|
+
/** Show a local calendar */
|
|
493
|
+
show: async (calendar, options) => {
|
|
494
|
+
return this.transport.call({
|
|
495
|
+
groupSegments: ["calendars"],
|
|
496
|
+
command: "show",
|
|
497
|
+
body: { calendar, ...(options ?? {}) },
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
channels = {
|
|
502
|
+
/** Create or update a native channel config */
|
|
503
|
+
create: async (name, options) => {
|
|
504
|
+
return this.transport.call({
|
|
505
|
+
groupSegments: ["channels"],
|
|
506
|
+
command: "create",
|
|
507
|
+
body: { name, ...(options ?? {}) },
|
|
508
|
+
});
|
|
509
|
+
},
|
|
510
|
+
/** List configured native channels */
|
|
511
|
+
list: async (options) => {
|
|
512
|
+
return this.transport.call({
|
|
513
|
+
groupSegments: ["channels"],
|
|
514
|
+
command: "list",
|
|
515
|
+
body: { ...(options ?? {}) },
|
|
516
|
+
});
|
|
517
|
+
},
|
|
518
|
+
/** Start channel runner infrastructure and print foreground status */
|
|
519
|
+
probe: async () => {
|
|
520
|
+
return this.transport.call({
|
|
521
|
+
groupSegments: ["channels"],
|
|
522
|
+
command: "probe",
|
|
523
|
+
body: {},
|
|
524
|
+
});
|
|
525
|
+
},
|
|
526
|
+
/** Restart the channel runner */
|
|
527
|
+
restart: async (options) => {
|
|
528
|
+
return this.transport.call({
|
|
529
|
+
groupSegments: ["channels"],
|
|
530
|
+
command: "restart",
|
|
531
|
+
body: { ...(options ?? {}) },
|
|
532
|
+
});
|
|
533
|
+
},
|
|
534
|
+
/** Set a native channel config property */
|
|
535
|
+
set: async (name, key, value) => {
|
|
536
|
+
return this.transport.call({
|
|
537
|
+
groupSegments: ["channels"],
|
|
538
|
+
command: "set",
|
|
539
|
+
body: { name, key, value },
|
|
540
|
+
});
|
|
541
|
+
},
|
|
542
|
+
/** Show one configured native channel */
|
|
543
|
+
show: async (name) => {
|
|
544
|
+
return this.transport.call({
|
|
545
|
+
groupSegments: ["channels"],
|
|
546
|
+
command: "show",
|
|
547
|
+
body: { name },
|
|
548
|
+
});
|
|
549
|
+
},
|
|
550
|
+
/** Start the channel runner via PM2 */
|
|
551
|
+
start: async (options) => {
|
|
552
|
+
return this.transport.call({
|
|
553
|
+
groupSegments: ["channels"],
|
|
554
|
+
command: "start",
|
|
555
|
+
body: { ...(options ?? {}) },
|
|
556
|
+
});
|
|
557
|
+
},
|
|
558
|
+
/** Show channel runner status */
|
|
559
|
+
status: async () => {
|
|
560
|
+
return this.transport.call({
|
|
561
|
+
groupSegments: ["channels"],
|
|
562
|
+
command: "status",
|
|
563
|
+
body: {},
|
|
564
|
+
});
|
|
565
|
+
},
|
|
566
|
+
/** Stop the channel runner */
|
|
567
|
+
stop: async () => {
|
|
568
|
+
return this.transport.call({
|
|
569
|
+
groupSegments: ["channels"],
|
|
570
|
+
command: "stop",
|
|
571
|
+
body: {},
|
|
572
|
+
});
|
|
258
573
|
}
|
|
259
574
|
};
|
|
260
575
|
chats = {
|
|
576
|
+
/** Backfill message provider timestamps from raw provenance */
|
|
577
|
+
backfillProviderTimestamps: async (options) => {
|
|
578
|
+
return this.transport.call({
|
|
579
|
+
groupSegments: ["chats"],
|
|
580
|
+
command: "backfill-provider-timestamps",
|
|
581
|
+
body: { ...(options ?? {}) },
|
|
582
|
+
});
|
|
583
|
+
},
|
|
261
584
|
/** List recent canonical chats */
|
|
262
585
|
list: async (options) => {
|
|
263
586
|
return this.transport.call({
|
|
@@ -315,6 +638,22 @@ export class RaviClient {
|
|
|
315
638
|
body: { list, ...(options ?? {}) },
|
|
316
639
|
});
|
|
317
640
|
},
|
|
641
|
+
/** Validate a dynamic selector and preview membership diff without writes */
|
|
642
|
+
preview: async (listId, options) => {
|
|
643
|
+
return this.transport.call({
|
|
644
|
+
groupSegments: ["chats", "lists"],
|
|
645
|
+
command: "preview",
|
|
646
|
+
body: { listId, ...(options ?? {}) },
|
|
647
|
+
});
|
|
648
|
+
},
|
|
649
|
+
/** Materialize dynamic reading-list selector membership */
|
|
650
|
+
recompute: async (listId, options) => {
|
|
651
|
+
return this.transport.call({
|
|
652
|
+
groupSegments: ["chats", "lists"],
|
|
653
|
+
command: "recompute",
|
|
654
|
+
body: { listId, ...(options ?? {}) },
|
|
655
|
+
});
|
|
656
|
+
},
|
|
318
657
|
/** Remove a chat from a reading list without deleting cursor history */
|
|
319
658
|
remove: async (list, chat, options) => {
|
|
320
659
|
return this.transport.call({
|
|
@@ -322,6 +661,14 @@ export class RaviClient {
|
|
|
322
661
|
command: "remove",
|
|
323
662
|
body: { list, chat, ...(options ?? {}) },
|
|
324
663
|
});
|
|
664
|
+
},
|
|
665
|
+
/** Show one reading list and explain whether its selector is safe */
|
|
666
|
+
show: async (listId, options) => {
|
|
667
|
+
return this.transport.call({
|
|
668
|
+
groupSegments: ["chats", "lists"],
|
|
669
|
+
command: "show",
|
|
670
|
+
body: { listId, ...(options ?? {}) },
|
|
671
|
+
});
|
|
325
672
|
}
|
|
326
673
|
},
|
|
327
674
|
/** Read messages from one chat */
|
|
@@ -333,6 +680,60 @@ export class RaviClient {
|
|
|
333
680
|
});
|
|
334
681
|
}
|
|
335
682
|
};
|
|
683
|
+
cloud = {
|
|
684
|
+
projects: {
|
|
685
|
+
/** Create a Ravi Cloud project in Console */
|
|
686
|
+
create: async (slug, options) => {
|
|
687
|
+
return this.transport.call({
|
|
688
|
+
groupSegments: ["cloud", "projects"],
|
|
689
|
+
command: "create",
|
|
690
|
+
body: { slug, ...(options ?? {}) },
|
|
691
|
+
});
|
|
692
|
+
},
|
|
693
|
+
/** List Ravi Cloud projects from Console */
|
|
694
|
+
list: async (options) => {
|
|
695
|
+
return this.transport.call({
|
|
696
|
+
groupSegments: ["cloud", "projects"],
|
|
697
|
+
command: "list",
|
|
698
|
+
body: { ...(options ?? {}) },
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
scope: {
|
|
703
|
+
/** Clear a default Console project for a session, agent, workspace, or install */
|
|
704
|
+
clear: async (options) => {
|
|
705
|
+
return this.transport.call({
|
|
706
|
+
groupSegments: ["cloud", "scope"],
|
|
707
|
+
command: "clear",
|
|
708
|
+
body: { ...(options ?? {}) },
|
|
709
|
+
});
|
|
710
|
+
},
|
|
711
|
+
/** Explain how the effective Ravi Console scope is resolved */
|
|
712
|
+
explain: async (options) => {
|
|
713
|
+
return this.transport.call({
|
|
714
|
+
groupSegments: ["cloud", "scope"],
|
|
715
|
+
command: "explain",
|
|
716
|
+
body: { ...(options ?? {}) },
|
|
717
|
+
});
|
|
718
|
+
},
|
|
719
|
+
/** Set a default Console project for a session, agent, workspace, or install */
|
|
720
|
+
set: async (options) => {
|
|
721
|
+
return this.transport.call({
|
|
722
|
+
groupSegments: ["cloud", "scope"],
|
|
723
|
+
command: "set",
|
|
724
|
+
body: { ...(options ?? {}) },
|
|
725
|
+
});
|
|
726
|
+
},
|
|
727
|
+
/** Show the effective Ravi Console scope for this process */
|
|
728
|
+
show: async (options) => {
|
|
729
|
+
return this.transport.call({
|
|
730
|
+
groupSegments: ["cloud", "scope"],
|
|
731
|
+
command: "show",
|
|
732
|
+
body: { ...(options ?? {}) },
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
};
|
|
336
737
|
commands = {
|
|
337
738
|
/** List Ravi commands */
|
|
338
739
|
list: async (options) => {
|
|
@@ -367,14 +768,40 @@ export class RaviClient {
|
|
|
367
768
|
});
|
|
368
769
|
}
|
|
369
770
|
};
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
|
|
771
|
+
connectors = {
|
|
772
|
+
/** List your connectors */
|
|
773
|
+
list: async (options) => {
|
|
373
774
|
return this.transport.call({
|
|
374
|
-
groupSegments: ["
|
|
375
|
-
command: "
|
|
376
|
-
body: {
|
|
377
|
-
});
|
|
775
|
+
groupSegments: ["connectors"],
|
|
776
|
+
command: "list",
|
|
777
|
+
body: { ...(options ?? {}) },
|
|
778
|
+
});
|
|
779
|
+
},
|
|
780
|
+
/** Revoke a connector and delete its stored credentials */
|
|
781
|
+
revoke: async (id, options) => {
|
|
782
|
+
return this.transport.call({
|
|
783
|
+
groupSegments: ["connectors"],
|
|
784
|
+
command: "revoke",
|
|
785
|
+
body: { id, ...(options ?? {}) },
|
|
786
|
+
});
|
|
787
|
+
},
|
|
788
|
+
/** Show details of a single connector */
|
|
789
|
+
show: async (id) => {
|
|
790
|
+
return this.transport.call({
|
|
791
|
+
groupSegments: ["connectors"],
|
|
792
|
+
command: "show",
|
|
793
|
+
body: { id },
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
contacts = {
|
|
798
|
+
/** Show session activity attributed to a contact */
|
|
799
|
+
activity: async (contact, options) => {
|
|
800
|
+
return this.transport.call({
|
|
801
|
+
groupSegments: ["contacts"],
|
|
802
|
+
command: "activity",
|
|
803
|
+
body: { contact, ...(options ?? {}) },
|
|
804
|
+
});
|
|
378
805
|
},
|
|
379
806
|
/** Add/allow a contact */
|
|
380
807
|
add: async (identity, name, options) => {
|
|
@@ -702,6 +1129,14 @@ export class RaviClient {
|
|
|
702
1129
|
body: { ...(options ?? {}) },
|
|
703
1130
|
});
|
|
704
1131
|
},
|
|
1132
|
+
/** Compact the context store by deleting inactive (revoked/expired) contexts */
|
|
1133
|
+
prune: async (options) => {
|
|
1134
|
+
return this.transport.call({
|
|
1135
|
+
groupSegments: ["context"],
|
|
1136
|
+
command: "prune",
|
|
1137
|
+
body: { ...(options ?? {}) },
|
|
1138
|
+
});
|
|
1139
|
+
},
|
|
705
1140
|
/** Revoke a runtime context by context ID */
|
|
706
1141
|
revoke: async (contextId, options) => {
|
|
707
1142
|
return this.transport.call({
|
|
@@ -744,6 +1179,14 @@ export class RaviClient {
|
|
|
744
1179
|
body: { ...(options ?? {}) },
|
|
745
1180
|
});
|
|
746
1181
|
},
|
|
1182
|
+
/** Audit pricing coverage for recent cost events */
|
|
1183
|
+
pricing: async (options) => {
|
|
1184
|
+
return this.transport.call({
|
|
1185
|
+
groupSegments: ["costs"],
|
|
1186
|
+
command: "pricing",
|
|
1187
|
+
body: { ...(options ?? {}) },
|
|
1188
|
+
});
|
|
1189
|
+
},
|
|
747
1190
|
/** Show detailed cost summary for one session */
|
|
748
1191
|
session: async (nameOrKey) => {
|
|
749
1192
|
return this.transport.call({
|
|
@@ -769,6 +1212,52 @@ export class RaviClient {
|
|
|
769
1212
|
});
|
|
770
1213
|
}
|
|
771
1214
|
};
|
|
1215
|
+
credentials = {
|
|
1216
|
+
connections: {
|
|
1217
|
+
/** Disable a credential connection */
|
|
1218
|
+
disable: async (options) => {
|
|
1219
|
+
return this.transport.call({
|
|
1220
|
+
groupSegments: ["credentials", "connections"],
|
|
1221
|
+
command: "disable",
|
|
1222
|
+
body: { ...(options ?? {}) },
|
|
1223
|
+
});
|
|
1224
|
+
},
|
|
1225
|
+
/** Enable a credential connection */
|
|
1226
|
+
enable: async (options) => {
|
|
1227
|
+
return this.transport.call({
|
|
1228
|
+
groupSegments: ["credentials", "connections"],
|
|
1229
|
+
command: "enable",
|
|
1230
|
+
body: { ...(options ?? {}) },
|
|
1231
|
+
});
|
|
1232
|
+
},
|
|
1233
|
+
/** List provider credential connections without secret values */
|
|
1234
|
+
list: async (options) => {
|
|
1235
|
+
return this.transport.call({
|
|
1236
|
+
groupSegments: ["credentials", "connections"],
|
|
1237
|
+
command: "list",
|
|
1238
|
+
body: { ...(options ?? {}) },
|
|
1239
|
+
});
|
|
1240
|
+
},
|
|
1241
|
+
/** Show one credential connection without secret values */
|
|
1242
|
+
show: async (options) => {
|
|
1243
|
+
return this.transport.call({
|
|
1244
|
+
groupSegments: ["credentials", "connections"],
|
|
1245
|
+
command: "show",
|
|
1246
|
+
body: { ...(options ?? {}) },
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
},
|
|
1250
|
+
policies: {
|
|
1251
|
+
/** Explain capabilities required for a provider credential action */
|
|
1252
|
+
explain: async (options) => {
|
|
1253
|
+
return this.transport.call({
|
|
1254
|
+
groupSegments: ["credentials", "policies"],
|
|
1255
|
+
command: "explain",
|
|
1256
|
+
body: { ...(options ?? {}) },
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
};
|
|
772
1261
|
crm = {
|
|
773
1262
|
account: {
|
|
774
1263
|
/** Create a CRM account */
|
|
@@ -805,11 +1294,11 @@ export class RaviClient {
|
|
|
805
1294
|
});
|
|
806
1295
|
},
|
|
807
1296
|
/** Show open opportunity board */
|
|
808
|
-
board: async () => {
|
|
1297
|
+
board: async (options) => {
|
|
809
1298
|
return this.transport.call({
|
|
810
1299
|
groupSegments: ["crm"],
|
|
811
1300
|
command: "board",
|
|
812
|
-
body: {},
|
|
1301
|
+
body: { ...(options ?? {}) },
|
|
813
1302
|
});
|
|
814
1303
|
},
|
|
815
1304
|
contact: {
|
|
@@ -938,7 +1427,159 @@ export class RaviClient {
|
|
|
938
1427
|
body: { opportunity },
|
|
939
1428
|
});
|
|
940
1429
|
},
|
|
1430
|
+
pipeline: {
|
|
1431
|
+
/** Create a CRM pipeline (with optional declarative metadata) */
|
|
1432
|
+
create: async (name, options) => {
|
|
1433
|
+
return this.transport.call({
|
|
1434
|
+
groupSegments: ["crm", "pipeline"],
|
|
1435
|
+
command: "create",
|
|
1436
|
+
body: { name, ...(options ?? {}) },
|
|
1437
|
+
});
|
|
1438
|
+
},
|
|
1439
|
+
/** List CRM pipelines */
|
|
1440
|
+
list: async (options) => {
|
|
1441
|
+
return this.transport.call({
|
|
1442
|
+
groupSegments: ["crm", "pipeline"],
|
|
1443
|
+
command: "list",
|
|
1444
|
+
body: { ...(options ?? {}) },
|
|
1445
|
+
});
|
|
1446
|
+
},
|
|
1447
|
+
policy: {
|
|
1448
|
+
/** Evaluate metadata.hitl_required_when against a JSON context (decide if send needs human approval) */
|
|
1449
|
+
hitlCheck: async (pipeline, options) => {
|
|
1450
|
+
return this.transport.call({
|
|
1451
|
+
groupSegments: ["crm", "pipeline", "policy"],
|
|
1452
|
+
command: "hitl-check",
|
|
1453
|
+
body: { pipeline, ...(options ?? {}) },
|
|
1454
|
+
});
|
|
1455
|
+
},
|
|
1456
|
+
/** Evaluate metadata.send_window for a pipeline at a given instant (allow / releaseAt) */
|
|
1457
|
+
sendWindowCheck: async (pipeline, options) => {
|
|
1458
|
+
return this.transport.call({
|
|
1459
|
+
groupSegments: ["crm", "pipeline", "policy"],
|
|
1460
|
+
command: "send-window-check",
|
|
1461
|
+
body: { pipeline, ...(options ?? {}) },
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
},
|
|
1465
|
+
/** Review pipeline metadata against canonical schema (12 fields, ✓/⚠/✗ + suggestions) */
|
|
1466
|
+
review: async (pipeline) => {
|
|
1467
|
+
return this.transport.call({
|
|
1468
|
+
groupSegments: ["crm", "pipeline"],
|
|
1469
|
+
command: "review",
|
|
1470
|
+
body: { pipeline },
|
|
1471
|
+
});
|
|
1472
|
+
},
|
|
1473
|
+
/** Set a CRM pipeline field (or patch metadata via structured flags) */
|
|
1474
|
+
set: async (pipeline, field, value, options) => {
|
|
1475
|
+
return this.transport.call({
|
|
1476
|
+
groupSegments: ["crm", "pipeline"],
|
|
1477
|
+
command: "set",
|
|
1478
|
+
body: { pipeline, field, value, ...(options ?? {}) },
|
|
1479
|
+
});
|
|
1480
|
+
},
|
|
1481
|
+
/** Show one CRM pipeline with stages and topics */
|
|
1482
|
+
show: async (pipeline, options) => {
|
|
1483
|
+
return this.transport.call({
|
|
1484
|
+
groupSegments: ["crm", "pipeline"],
|
|
1485
|
+
command: "show",
|
|
1486
|
+
body: { pipeline, ...(options ?? {}) },
|
|
1487
|
+
});
|
|
1488
|
+
},
|
|
1489
|
+
stage: {
|
|
1490
|
+
/** Add a stage to a CRM pipeline */
|
|
1491
|
+
add: async (pipeline, key, options) => {
|
|
1492
|
+
return this.transport.call({
|
|
1493
|
+
groupSegments: ["crm", "pipeline", "stage"],
|
|
1494
|
+
command: "add",
|
|
1495
|
+
body: { pipeline, key, ...(options ?? {}) },
|
|
1496
|
+
});
|
|
1497
|
+
},
|
|
1498
|
+
/** Archive a CRM pipeline stage */
|
|
1499
|
+
archive: async (pipeline, stage) => {
|
|
1500
|
+
return this.transport.call({
|
|
1501
|
+
groupSegments: ["crm", "pipeline", "stage"],
|
|
1502
|
+
command: "archive",
|
|
1503
|
+
body: { pipeline, stage },
|
|
1504
|
+
});
|
|
1505
|
+
},
|
|
1506
|
+
/** List stages in a CRM pipeline */
|
|
1507
|
+
list: async (pipeline, options) => {
|
|
1508
|
+
return this.transport.call({
|
|
1509
|
+
groupSegments: ["crm", "pipeline", "stage"],
|
|
1510
|
+
command: "list",
|
|
1511
|
+
body: { pipeline, ...(options ?? {}) },
|
|
1512
|
+
});
|
|
1513
|
+
},
|
|
1514
|
+
/** Set a CRM pipeline stage field */
|
|
1515
|
+
set: async (pipeline, stage, field, value) => {
|
|
1516
|
+
return this.transport.call({
|
|
1517
|
+
groupSegments: ["crm", "pipeline", "stage"],
|
|
1518
|
+
command: "set",
|
|
1519
|
+
body: { pipeline, stage, field, value },
|
|
1520
|
+
});
|
|
1521
|
+
},
|
|
1522
|
+
/** Show one CRM pipeline stage */
|
|
1523
|
+
show: async (pipeline, stage) => {
|
|
1524
|
+
return this.transport.call({
|
|
1525
|
+
groupSegments: ["crm", "pipeline", "stage"],
|
|
1526
|
+
command: "show",
|
|
1527
|
+
body: { pipeline, stage },
|
|
1528
|
+
});
|
|
1529
|
+
},
|
|
1530
|
+
topic: {
|
|
1531
|
+
/** Add a topic to a CRM pipeline stage */
|
|
1532
|
+
add: async (pipeline, stage, key, options) => {
|
|
1533
|
+
return this.transport.call({
|
|
1534
|
+
groupSegments: ["crm", "pipeline", "stage", "topic"],
|
|
1535
|
+
command: "add",
|
|
1536
|
+
body: { pipeline, stage, key, ...(options ?? {}) },
|
|
1537
|
+
});
|
|
1538
|
+
},
|
|
1539
|
+
/** Archive a CRM pipeline stage topic */
|
|
1540
|
+
archive: async (pipeline, stage, topic) => {
|
|
1541
|
+
return this.transport.call({
|
|
1542
|
+
groupSegments: ["crm", "pipeline", "stage", "topic"],
|
|
1543
|
+
command: "archive",
|
|
1544
|
+
body: { pipeline, stage, topic },
|
|
1545
|
+
});
|
|
1546
|
+
},
|
|
1547
|
+
/** Set a CRM pipeline stage topic field */
|
|
1548
|
+
set: async (pipeline, stage, topic, field, value) => {
|
|
1549
|
+
return this.transport.call({
|
|
1550
|
+
groupSegments: ["crm", "pipeline", "stage", "topic"],
|
|
1551
|
+
command: "set",
|
|
1552
|
+
body: { pipeline, stage, topic, field, value },
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
},
|
|
1556
|
+
/** List topics configured for a CRM pipeline stage */
|
|
1557
|
+
topics: async (pipeline, stage, options) => {
|
|
1558
|
+
return this.transport.call({
|
|
1559
|
+
groupSegments: ["crm", "pipeline", "stage"],
|
|
1560
|
+
command: "topics",
|
|
1561
|
+
body: { pipeline, stage, ...(options ?? {}) },
|
|
1562
|
+
});
|
|
1563
|
+
}
|
|
1564
|
+
},
|
|
1565
|
+
/** Validate pipeline metadata against canonical JSON Schema (PASS/WARN/FAIL) */
|
|
1566
|
+
validate: async (pipeline, options) => {
|
|
1567
|
+
return this.transport.call({
|
|
1568
|
+
groupSegments: ["crm", "pipeline"],
|
|
1569
|
+
command: "validate",
|
|
1570
|
+
body: { pipeline, ...(options ?? {}) },
|
|
1571
|
+
});
|
|
1572
|
+
}
|
|
1573
|
+
},
|
|
941
1574
|
task: {
|
|
1575
|
+
/** Cancel a CRM task */
|
|
1576
|
+
cancel: async (task, options) => {
|
|
1577
|
+
return this.transport.call({
|
|
1578
|
+
groupSegments: ["crm", "task"],
|
|
1579
|
+
command: "cancel",
|
|
1580
|
+
body: { task, ...(options ?? {}) },
|
|
1581
|
+
});
|
|
1582
|
+
},
|
|
942
1583
|
/** Create a CRM relationship task */
|
|
943
1584
|
create: async (title, options) => {
|
|
944
1585
|
return this.transport.call({
|
|
@@ -955,6 +1596,14 @@ export class RaviClient {
|
|
|
955
1596
|
body: { task },
|
|
956
1597
|
});
|
|
957
1598
|
},
|
|
1599
|
+
/** List CRM tasks (all statuses) */
|
|
1600
|
+
list: async (options) => {
|
|
1601
|
+
return this.transport.call({
|
|
1602
|
+
groupSegments: ["crm", "task"],
|
|
1603
|
+
command: "list",
|
|
1604
|
+
body: { ...(options ?? {}) },
|
|
1605
|
+
});
|
|
1606
|
+
},
|
|
958
1607
|
/** Show CRM task */
|
|
959
1608
|
show: async (task) => {
|
|
960
1609
|
return this.transport.call({
|
|
@@ -962,6 +1611,14 @@ export class RaviClient {
|
|
|
962
1611
|
command: "show",
|
|
963
1612
|
body: { task },
|
|
964
1613
|
});
|
|
1614
|
+
},
|
|
1615
|
+
/** Snooze a CRM task to a new due_at */
|
|
1616
|
+
snooze: async (task, options) => {
|
|
1617
|
+
return this.transport.call({
|
|
1618
|
+
groupSegments: ["crm", "task"],
|
|
1619
|
+
command: "snooze",
|
|
1620
|
+
body: { task, ...(options ?? {}) },
|
|
1621
|
+
});
|
|
965
1622
|
}
|
|
966
1623
|
}
|
|
967
1624
|
};
|
|
@@ -990,7 +1647,7 @@ export class RaviClient {
|
|
|
990
1647
|
body: { id },
|
|
991
1648
|
});
|
|
992
1649
|
},
|
|
993
|
-
/** List
|
|
1650
|
+
/** List scheduled jobs (agent-scoped by default) */
|
|
994
1651
|
list: async (options) => {
|
|
995
1652
|
return this.transport.call({
|
|
996
1653
|
groupSegments: ["cron"],
|
|
@@ -1209,6 +1866,34 @@ export class RaviClient {
|
|
|
1209
1866
|
});
|
|
1210
1867
|
}
|
|
1211
1868
|
};
|
|
1869
|
+
feedback = {
|
|
1870
|
+
/** Submit structured feedback to Ravi Console */
|
|
1871
|
+
send: async (message, options) => {
|
|
1872
|
+
return this.transport.call({
|
|
1873
|
+
groupSegments: ["feedback"],
|
|
1874
|
+
command: "send",
|
|
1875
|
+
body: { message, ...(options ?? {}) },
|
|
1876
|
+
});
|
|
1877
|
+
}
|
|
1878
|
+
};
|
|
1879
|
+
gmail = {
|
|
1880
|
+
/** List messages in the connected Gmail mailbox */
|
|
1881
|
+
list: async (options) => {
|
|
1882
|
+
return this.transport.call({
|
|
1883
|
+
groupSegments: ["gmail"],
|
|
1884
|
+
command: "list",
|
|
1885
|
+
body: { ...(options ?? {}) },
|
|
1886
|
+
});
|
|
1887
|
+
},
|
|
1888
|
+
/** Read a single Gmail message */
|
|
1889
|
+
read: async (id, options) => {
|
|
1890
|
+
return this.transport.call({
|
|
1891
|
+
groupSegments: ["gmail"],
|
|
1892
|
+
command: "read",
|
|
1893
|
+
body: { id, ...(options ?? {}) },
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
};
|
|
1212
1897
|
heartbeat = {
|
|
1213
1898
|
/** Disable heartbeat for an agent */
|
|
1214
1899
|
disable: async (id) => {
|
|
@@ -1337,6 +2022,104 @@ export class RaviClient {
|
|
|
1337
2022
|
});
|
|
1338
2023
|
}
|
|
1339
2024
|
};
|
|
2025
|
+
inbox = {
|
|
2026
|
+
/** Archive a local inbox item */
|
|
2027
|
+
archive: async (item) => {
|
|
2028
|
+
return this.transport.call({
|
|
2029
|
+
groupSegments: ["inbox"],
|
|
2030
|
+
command: "archive",
|
|
2031
|
+
body: { item },
|
|
2032
|
+
});
|
|
2033
|
+
},
|
|
2034
|
+
/** Disable inbox polling for the current Console+org */
|
|
2035
|
+
disable: async () => {
|
|
2036
|
+
return this.transport.call({
|
|
2037
|
+
groupSegments: ["inbox"],
|
|
2038
|
+
command: "disable",
|
|
2039
|
+
body: {},
|
|
2040
|
+
});
|
|
2041
|
+
},
|
|
2042
|
+
/** Mark a local inbox item done */
|
|
2043
|
+
done: async (item) => {
|
|
2044
|
+
return this.transport.call({
|
|
2045
|
+
groupSegments: ["inbox"],
|
|
2046
|
+
command: "done",
|
|
2047
|
+
body: { item },
|
|
2048
|
+
});
|
|
2049
|
+
},
|
|
2050
|
+
/** Enable inbox polling for the current Console+org */
|
|
2051
|
+
enable: async () => {
|
|
2052
|
+
return this.transport.call({
|
|
2053
|
+
groupSegments: ["inbox"],
|
|
2054
|
+
command: "enable",
|
|
2055
|
+
body: {},
|
|
2056
|
+
});
|
|
2057
|
+
},
|
|
2058
|
+
/** List recently delivered inbox items in the local mirror */
|
|
2059
|
+
items: async (options) => {
|
|
2060
|
+
return this.transport.call({
|
|
2061
|
+
groupSegments: ["inbox"],
|
|
2062
|
+
command: "items",
|
|
2063
|
+
body: { ...(options ?? {}) },
|
|
2064
|
+
});
|
|
2065
|
+
},
|
|
2066
|
+
/** List local inbox items */
|
|
2067
|
+
list: async (options) => {
|
|
2068
|
+
return this.transport.call({
|
|
2069
|
+
groupSegments: ["inbox"],
|
|
2070
|
+
command: "list",
|
|
2071
|
+
body: { ...(options ?? {}) },
|
|
2072
|
+
});
|
|
2073
|
+
},
|
|
2074
|
+
/** Run a single inbox poll cycle (foreground) */
|
|
2075
|
+
poll: async (options) => {
|
|
2076
|
+
return this.transport.call({
|
|
2077
|
+
groupSegments: ["inbox"],
|
|
2078
|
+
command: "poll",
|
|
2079
|
+
body: { ...(options ?? {}) },
|
|
2080
|
+
});
|
|
2081
|
+
},
|
|
2082
|
+
/** Read one local inbox item and mark it seen */
|
|
2083
|
+
read: async (item) => {
|
|
2084
|
+
return this.transport.call({
|
|
2085
|
+
groupSegments: ["inbox"],
|
|
2086
|
+
command: "read",
|
|
2087
|
+
body: { item },
|
|
2088
|
+
});
|
|
2089
|
+
},
|
|
2090
|
+
/** Republish a locally stored inbox item to NATS */
|
|
2091
|
+
replay: async (ref) => {
|
|
2092
|
+
return this.transport.call({
|
|
2093
|
+
groupSegments: ["inbox"],
|
|
2094
|
+
command: "replay",
|
|
2095
|
+
body: { ref },
|
|
2096
|
+
});
|
|
2097
|
+
},
|
|
2098
|
+
/** Snooze a local inbox item until a timestamp */
|
|
2099
|
+
snooze: async (item, options) => {
|
|
2100
|
+
return this.transport.call({
|
|
2101
|
+
groupSegments: ["inbox"],
|
|
2102
|
+
command: "snooze",
|
|
2103
|
+
body: { item, ...(options ?? {}) },
|
|
2104
|
+
});
|
|
2105
|
+
},
|
|
2106
|
+
/** List local inbox source domains */
|
|
2107
|
+
sources: async () => {
|
|
2108
|
+
return this.transport.call({
|
|
2109
|
+
groupSegments: ["inbox"],
|
|
2110
|
+
command: "sources",
|
|
2111
|
+
body: {},
|
|
2112
|
+
});
|
|
2113
|
+
},
|
|
2114
|
+
/** Show inbox poller status and subscriptions */
|
|
2115
|
+
status: async () => {
|
|
2116
|
+
return this.transport.call({
|
|
2117
|
+
groupSegments: ["inbox"],
|
|
2118
|
+
command: "status",
|
|
2119
|
+
body: {},
|
|
2120
|
+
});
|
|
2121
|
+
}
|
|
2122
|
+
};
|
|
1340
2123
|
insights = {
|
|
1341
2124
|
/** Create a new insight with lineage captured from the current runtime context */
|
|
1342
2125
|
create: async (summary, options) => {
|
|
@@ -1561,59 +2344,391 @@ export class RaviClient {
|
|
|
1561
2344
|
});
|
|
1562
2345
|
}
|
|
1563
2346
|
};
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
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) => {
|
|
2347
|
+
mail = {
|
|
2348
|
+
accounts: {
|
|
2349
|
+
/** Create or update a local mail provider account */
|
|
2350
|
+
create: async (options) => {
|
|
1586
2351
|
return this.transport.call({
|
|
1587
|
-
groupSegments: ["
|
|
1588
|
-
command: "
|
|
1589
|
-
body: {
|
|
2352
|
+
groupSegments: ["mail", "accounts"],
|
|
2353
|
+
command: "create",
|
|
2354
|
+
body: { ...(options ?? {}) },
|
|
1590
2355
|
});
|
|
1591
2356
|
},
|
|
1592
|
-
/** List
|
|
2357
|
+
/** List local mail accounts */
|
|
1593
2358
|
list: async (options) => {
|
|
1594
2359
|
return this.transport.call({
|
|
1595
|
-
groupSegments: ["
|
|
2360
|
+
groupSegments: ["mail", "accounts"],
|
|
1596
2361
|
command: "list",
|
|
1597
2362
|
body: { ...(options ?? {}) },
|
|
1598
2363
|
});
|
|
1599
2364
|
},
|
|
1600
|
-
/**
|
|
1601
|
-
|
|
2365
|
+
/** Run one local provider sync tick for an account */
|
|
2366
|
+
sync: async (account, options) => {
|
|
1602
2367
|
return this.transport.call({
|
|
1603
|
-
groupSegments: ["
|
|
1604
|
-
command: "
|
|
1605
|
-
body: {
|
|
2368
|
+
groupSegments: ["mail", "accounts"],
|
|
2369
|
+
command: "sync",
|
|
2370
|
+
body: { account, ...(options ?? {}) },
|
|
1606
2371
|
});
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
|
|
2372
|
+
}
|
|
2373
|
+
},
|
|
2374
|
+
domains: {
|
|
2375
|
+
/** Register a managed Ravi Mail domain in Console */
|
|
2376
|
+
create: async (domain, options) => {
|
|
1610
2377
|
return this.transport.call({
|
|
1611
|
-
groupSegments: ["
|
|
1612
|
-
command: "
|
|
1613
|
-
body: {
|
|
2378
|
+
groupSegments: ["mail", "domains"],
|
|
2379
|
+
command: "create",
|
|
2380
|
+
body: { domain, ...(options ?? {}) },
|
|
1614
2381
|
});
|
|
1615
2382
|
},
|
|
1616
|
-
/**
|
|
2383
|
+
/** List managed Ravi Mail domains through Console */
|
|
2384
|
+
list: async (options) => {
|
|
2385
|
+
return this.transport.call({
|
|
2386
|
+
groupSegments: ["mail", "domains"],
|
|
2387
|
+
command: "list",
|
|
2388
|
+
body: { ...(options ?? {}) },
|
|
2389
|
+
});
|
|
2390
|
+
}
|
|
2391
|
+
},
|
|
2392
|
+
mailboxes: {
|
|
2393
|
+
/** Create or update a local mailbox projection */
|
|
2394
|
+
create: async (address, options) => {
|
|
2395
|
+
return this.transport.call({
|
|
2396
|
+
groupSegments: ["mail", "mailboxes"],
|
|
2397
|
+
command: "create",
|
|
2398
|
+
body: { address, ...(options ?? {}) },
|
|
2399
|
+
});
|
|
2400
|
+
},
|
|
2401
|
+
/** Disable a local mailbox projection */
|
|
2402
|
+
disable: async (mailbox) => {
|
|
2403
|
+
return this.transport.call({
|
|
2404
|
+
groupSegments: ["mail", "mailboxes"],
|
|
2405
|
+
command: "disable",
|
|
2406
|
+
body: { mailbox },
|
|
2407
|
+
});
|
|
2408
|
+
},
|
|
2409
|
+
/** List local mailboxes */
|
|
2410
|
+
list: async (options) => {
|
|
2411
|
+
return this.transport.call({
|
|
2412
|
+
groupSegments: ["mail", "mailboxes"],
|
|
2413
|
+
command: "list",
|
|
2414
|
+
body: { ...(options ?? {}) },
|
|
2415
|
+
});
|
|
2416
|
+
},
|
|
2417
|
+
/** Show a local mailbox */
|
|
2418
|
+
show: async (mailbox) => {
|
|
2419
|
+
return this.transport.call({
|
|
2420
|
+
groupSegments: ["mail", "mailboxes"],
|
|
2421
|
+
command: "show",
|
|
2422
|
+
body: { mailbox },
|
|
2423
|
+
});
|
|
2424
|
+
}
|
|
2425
|
+
},
|
|
2426
|
+
messages: {
|
|
2427
|
+
/** Import one normalized provider message into the local mailbox */
|
|
2428
|
+
import: async (options) => {
|
|
2429
|
+
return this.transport.call({
|
|
2430
|
+
groupSegments: ["mail", "messages"],
|
|
2431
|
+
command: "import",
|
|
2432
|
+
body: { ...(options ?? {}) },
|
|
2433
|
+
});
|
|
2434
|
+
},
|
|
2435
|
+
/** List local mail messages */
|
|
2436
|
+
list: async (options) => {
|
|
2437
|
+
return this.transport.call({
|
|
2438
|
+
groupSegments: ["mail", "messages"],
|
|
2439
|
+
command: "list",
|
|
2440
|
+
body: { ...(options ?? {}) },
|
|
2441
|
+
});
|
|
2442
|
+
},
|
|
2443
|
+
/** Read a local mail message */
|
|
2444
|
+
read: async (message, options) => {
|
|
2445
|
+
return this.transport.call({
|
|
2446
|
+
groupSegments: ["mail", "messages"],
|
|
2447
|
+
command: "read",
|
|
2448
|
+
body: { message, ...(options ?? {}) },
|
|
2449
|
+
});
|
|
2450
|
+
},
|
|
2451
|
+
/** Search local mail messages */
|
|
2452
|
+
search: async (query, options) => {
|
|
2453
|
+
return this.transport.call({
|
|
2454
|
+
groupSegments: ["mail", "messages"],
|
|
2455
|
+
command: "search",
|
|
2456
|
+
body: { query, ...(options ?? {}) },
|
|
2457
|
+
});
|
|
2458
|
+
}
|
|
2459
|
+
},
|
|
2460
|
+
outbox: {
|
|
2461
|
+
/** Inspect a local outbox row */
|
|
2462
|
+
inspect: async (outbox) => {
|
|
2463
|
+
return this.transport.call({
|
|
2464
|
+
groupSegments: ["mail", "outbox"],
|
|
2465
|
+
command: "inspect",
|
|
2466
|
+
body: { outbox },
|
|
2467
|
+
});
|
|
2468
|
+
},
|
|
2469
|
+
/** List local outbox rows */
|
|
2470
|
+
list: async (options) => {
|
|
2471
|
+
return this.transport.call({
|
|
2472
|
+
groupSegments: ["mail", "outbox"],
|
|
2473
|
+
command: "list",
|
|
2474
|
+
body: { ...(options ?? {}) },
|
|
2475
|
+
});
|
|
2476
|
+
},
|
|
2477
|
+
/** Move a failed/dead local outbox row back to pending */
|
|
2478
|
+
retry: async (outbox) => {
|
|
2479
|
+
return this.transport.call({
|
|
2480
|
+
groupSegments: ["mail", "outbox"],
|
|
2481
|
+
command: "retry",
|
|
2482
|
+
body: { outbox },
|
|
2483
|
+
});
|
|
2484
|
+
},
|
|
2485
|
+
/** Show local mail outbox status */
|
|
2486
|
+
status: async () => {
|
|
2487
|
+
return this.transport.call({
|
|
2488
|
+
groupSegments: ["mail", "outbox"],
|
|
2489
|
+
command: "status",
|
|
2490
|
+
body: {},
|
|
2491
|
+
});
|
|
2492
|
+
}
|
|
2493
|
+
},
|
|
2494
|
+
providers: {
|
|
2495
|
+
/** List known mail providers and local account counts */
|
|
2496
|
+
list: async (options) => {
|
|
2497
|
+
return this.transport.call({
|
|
2498
|
+
groupSegments: ["mail", "providers"],
|
|
2499
|
+
command: "list",
|
|
2500
|
+
body: { ...(options ?? {}) },
|
|
2501
|
+
});
|
|
2502
|
+
},
|
|
2503
|
+
raviMail: {
|
|
2504
|
+
mailboxes: {
|
|
2505
|
+
/** Create a Ravi Mail provider mailbox through Console */
|
|
2506
|
+
create: async (addressOrLocalPart, options) => {
|
|
2507
|
+
return this.transport.call({
|
|
2508
|
+
groupSegments: ["mail", "providers", "ravi-mail", "mailboxes"],
|
|
2509
|
+
command: "create",
|
|
2510
|
+
body: { addressOrLocalPart, ...(options ?? {}) },
|
|
2511
|
+
});
|
|
2512
|
+
},
|
|
2513
|
+
/** Disable a managed Ravi Mail provider mailbox and active routes */
|
|
2514
|
+
disable: async (mailbox, options) => {
|
|
2515
|
+
return this.transport.call({
|
|
2516
|
+
groupSegments: ["mail", "providers", "ravi-mail", "mailboxes"],
|
|
2517
|
+
command: "disable",
|
|
2518
|
+
body: { mailbox, ...(options ?? {}) },
|
|
2519
|
+
});
|
|
2520
|
+
},
|
|
2521
|
+
/** List Ravi Mail provider mailboxes through Console */
|
|
2522
|
+
list: async (options) => {
|
|
2523
|
+
return this.transport.call({
|
|
2524
|
+
groupSegments: ["mail", "providers", "ravi-mail", "mailboxes"],
|
|
2525
|
+
command: "list",
|
|
2526
|
+
body: { ...(options ?? {}) },
|
|
2527
|
+
});
|
|
2528
|
+
},
|
|
2529
|
+
/** Show Ravi Mail provider mailbox metadata */
|
|
2530
|
+
show: async (mailbox, options) => {
|
|
2531
|
+
return this.transport.call({
|
|
2532
|
+
groupSegments: ["mail", "providers", "ravi-mail", "mailboxes"],
|
|
2533
|
+
command: "show",
|
|
2534
|
+
body: { mailbox, ...(options ?? {}) },
|
|
2535
|
+
});
|
|
2536
|
+
}
|
|
2537
|
+
},
|
|
2538
|
+
messages: {
|
|
2539
|
+
/** List Ravi Mail provider message metadata */
|
|
2540
|
+
list: async (options) => {
|
|
2541
|
+
return this.transport.call({
|
|
2542
|
+
groupSegments: ["mail", "providers", "ravi-mail", "messages"],
|
|
2543
|
+
command: "list",
|
|
2544
|
+
body: { ...(options ?? {}) },
|
|
2545
|
+
});
|
|
2546
|
+
},
|
|
2547
|
+
/** Read one authorized Ravi Mail provider message body through Console */
|
|
2548
|
+
read: async (message, options) => {
|
|
2549
|
+
return this.transport.call({
|
|
2550
|
+
groupSegments: ["mail", "providers", "ravi-mail", "messages"],
|
|
2551
|
+
command: "read",
|
|
2552
|
+
body: { message, ...(options ?? {}) },
|
|
2553
|
+
});
|
|
2554
|
+
},
|
|
2555
|
+
/** Show Ravi Mail provider message metadata */
|
|
2556
|
+
show: async (message, options) => {
|
|
2557
|
+
return this.transport.call({
|
|
2558
|
+
groupSegments: ["mail", "providers", "ravi-mail", "messages"],
|
|
2559
|
+
command: "show",
|
|
2560
|
+
body: { message, ...(options ?? {}) },
|
|
2561
|
+
});
|
|
2562
|
+
}
|
|
2563
|
+
},
|
|
2564
|
+
/** Send mail directly through Console Ravi Mail */
|
|
2565
|
+
send: async (options) => {
|
|
2566
|
+
return this.transport.call({
|
|
2567
|
+
groupSegments: ["mail", "providers", "ravi-mail"],
|
|
2568
|
+
command: "send",
|
|
2569
|
+
body: { ...(options ?? {}) },
|
|
2570
|
+
});
|
|
2571
|
+
}
|
|
2572
|
+
}
|
|
2573
|
+
},
|
|
2574
|
+
/** Queue a local reply in the outbox */
|
|
2575
|
+
reply: async (message, options) => {
|
|
2576
|
+
return this.transport.call({
|
|
2577
|
+
groupSegments: ["mail"],
|
|
2578
|
+
command: "reply",
|
|
2579
|
+
body: { message, ...(options ?? {}) },
|
|
2580
|
+
});
|
|
2581
|
+
},
|
|
2582
|
+
/** Queue mail in the local outbox */
|
|
2583
|
+
send: async (options) => {
|
|
2584
|
+
return this.transport.call({
|
|
2585
|
+
groupSegments: ["mail"],
|
|
2586
|
+
command: "send",
|
|
2587
|
+
body: { ...(options ?? {}) },
|
|
2588
|
+
});
|
|
2589
|
+
},
|
|
2590
|
+
threads: {
|
|
2591
|
+
/** Read a local mail thread and its safe message timeline */
|
|
2592
|
+
read: async (thread, options) => {
|
|
2593
|
+
return this.transport.call({
|
|
2594
|
+
groupSegments: ["mail", "threads"],
|
|
2595
|
+
command: "read",
|
|
2596
|
+
body: { thread, ...(options ?? {}) },
|
|
2597
|
+
});
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
};
|
|
2601
|
+
media = {
|
|
2602
|
+
/** Send a media file (image, video, audio, document) */
|
|
2603
|
+
send: async (filePath, options) => {
|
|
2604
|
+
return this.transport.call({
|
|
2605
|
+
groupSegments: ["media"],
|
|
2606
|
+
command: "send",
|
|
2607
|
+
body: { filePath, ...(options ?? {}) },
|
|
2608
|
+
});
|
|
2609
|
+
}
|
|
2610
|
+
};
|
|
2611
|
+
meetings = {
|
|
2612
|
+
/** Finalize a completed meeting recorder run into a Ravi meeting.raw artifact */
|
|
2613
|
+
finalize: async (options) => {
|
|
2614
|
+
return this.transport.call({
|
|
2615
|
+
groupSegments: ["meetings"],
|
|
2616
|
+
command: "finalize",
|
|
2617
|
+
body: { ...(options ?? {}) },
|
|
2618
|
+
});
|
|
2619
|
+
},
|
|
2620
|
+
profiles: {
|
|
2621
|
+
/** Create a reusable meeting profile scaffold */
|
|
2622
|
+
init: async (profileId, options) => {
|
|
2623
|
+
return this.transport.call({
|
|
2624
|
+
groupSegments: ["meetings", "profiles"],
|
|
2625
|
+
command: "init",
|
|
2626
|
+
body: { profileId, ...(options ?? {}) },
|
|
2627
|
+
});
|
|
2628
|
+
},
|
|
2629
|
+
/** List resolved meeting profiles */
|
|
2630
|
+
list: async (options) => {
|
|
2631
|
+
return this.transport.call({
|
|
2632
|
+
groupSegments: ["meetings", "profiles"],
|
|
2633
|
+
command: "list",
|
|
2634
|
+
body: { ...(options ?? {}) },
|
|
2635
|
+
});
|
|
2636
|
+
},
|
|
2637
|
+
/** Show one resolved meeting profile */
|
|
2638
|
+
show: async (profileId) => {
|
|
2639
|
+
return this.transport.call({
|
|
2640
|
+
groupSegments: ["meetings", "profiles"],
|
|
2641
|
+
command: "show",
|
|
2642
|
+
body: { profileId },
|
|
2643
|
+
});
|
|
2644
|
+
},
|
|
2645
|
+
/** Validate one meeting profile or the whole catalog */
|
|
2646
|
+
validate: async (profileId) => {
|
|
2647
|
+
return this.transport.call({
|
|
2648
|
+
groupSegments: ["meetings", "profiles"],
|
|
2649
|
+
command: "validate",
|
|
2650
|
+
body: { profileId },
|
|
2651
|
+
});
|
|
2652
|
+
}
|
|
2653
|
+
},
|
|
2654
|
+
/** List meeting voice runtime candidates and current recommendation */
|
|
2655
|
+
voiceRuntimes: async () => {
|
|
2656
|
+
return this.transport.call({
|
|
2657
|
+
groupSegments: ["meetings"],
|
|
2658
|
+
command: "voice-runtimes",
|
|
2659
|
+
body: {},
|
|
2660
|
+
});
|
|
2661
|
+
}
|
|
2662
|
+
};
|
|
2663
|
+
metrics = {
|
|
2664
|
+
/** List dates that have already been rolled up */
|
|
2665
|
+
dates: async () => {
|
|
2666
|
+
return this.transport.call({
|
|
2667
|
+
groupSegments: ["metrics"],
|
|
2668
|
+
command: "dates",
|
|
2669
|
+
body: {},
|
|
2670
|
+
});
|
|
2671
|
+
},
|
|
2672
|
+
/** Aggregate cost_events + session_events into daily_metrics for a date range */
|
|
2673
|
+
rollup: async (options) => {
|
|
2674
|
+
return this.transport.call({
|
|
2675
|
+
groupSegments: ["metrics"],
|
|
2676
|
+
command: "rollup",
|
|
2677
|
+
body: { ...(options ?? {}) },
|
|
2678
|
+
});
|
|
2679
|
+
},
|
|
2680
|
+
/** Display daily metrics rolled up to date */
|
|
2681
|
+
show: async (options) => {
|
|
2682
|
+
return this.transport.call({
|
|
2683
|
+
groupSegments: ["metrics"],
|
|
2684
|
+
command: "show",
|
|
2685
|
+
body: { ...(options ?? {}) },
|
|
2686
|
+
});
|
|
2687
|
+
}
|
|
2688
|
+
};
|
|
2689
|
+
observers = {
|
|
2690
|
+
/** List session observer bindings */
|
|
2691
|
+
list: async (options) => {
|
|
2692
|
+
return this.transport.call({
|
|
2693
|
+
groupSegments: ["observers"],
|
|
2694
|
+
command: "list",
|
|
2695
|
+
body: { ...(options ?? {}) },
|
|
2696
|
+
});
|
|
2697
|
+
},
|
|
2698
|
+
profiles: {
|
|
2699
|
+
/** Create a Markdown observer profile scaffold */
|
|
2700
|
+
init: async (profileId, options) => {
|
|
2701
|
+
return this.transport.call({
|
|
2702
|
+
groupSegments: ["observers", "profiles"],
|
|
2703
|
+
command: "init",
|
|
2704
|
+
body: { profileId, ...(options ?? {}) },
|
|
2705
|
+
});
|
|
2706
|
+
},
|
|
2707
|
+
/** List observer profiles */
|
|
2708
|
+
list: async (options) => {
|
|
2709
|
+
return this.transport.call({
|
|
2710
|
+
groupSegments: ["observers", "profiles"],
|
|
2711
|
+
command: "list",
|
|
2712
|
+
body: { ...(options ?? {}) },
|
|
2713
|
+
});
|
|
2714
|
+
},
|
|
2715
|
+
/** Render an observer profile preview */
|
|
2716
|
+
preview: async (profileId, options) => {
|
|
2717
|
+
return this.transport.call({
|
|
2718
|
+
groupSegments: ["observers", "profiles"],
|
|
2719
|
+
command: "preview",
|
|
2720
|
+
body: { profileId, ...(options ?? {}) },
|
|
2721
|
+
});
|
|
2722
|
+
},
|
|
2723
|
+
/** Show one observer profile */
|
|
2724
|
+
show: async (profileId) => {
|
|
2725
|
+
return this.transport.call({
|
|
2726
|
+
groupSegments: ["observers", "profiles"],
|
|
2727
|
+
command: "show",
|
|
2728
|
+
body: { profileId },
|
|
2729
|
+
});
|
|
2730
|
+
},
|
|
2731
|
+
/** Validate observer profiles */
|
|
1617
2732
|
validate: async (profileId) => {
|
|
1618
2733
|
return this.transport.call({
|
|
1619
2734
|
groupSegments: ["observers", "profiles"],
|
|
@@ -1705,60 +2820,102 @@ export class RaviClient {
|
|
|
1705
2820
|
});
|
|
1706
2821
|
}
|
|
1707
2822
|
};
|
|
1708
|
-
|
|
1709
|
-
/**
|
|
1710
|
-
|
|
2823
|
+
pages = {
|
|
2824
|
+
/** Compatibility: ensure a Ravi Pages host record; does not upload HTML or assets */
|
|
2825
|
+
create: async (args, options) => {
|
|
1711
2826
|
return this.transport.call({
|
|
1712
|
-
groupSegments: ["
|
|
1713
|
-
command: "
|
|
1714
|
-
body: {
|
|
2827
|
+
groupSegments: ["pages"],
|
|
2828
|
+
command: "create",
|
|
2829
|
+
body: { args, ...(options ?? {}) },
|
|
1715
2830
|
});
|
|
1716
2831
|
},
|
|
1717
|
-
/**
|
|
1718
|
-
|
|
2832
|
+
/** Bind custom hostnames to a Ravi Pages site */
|
|
2833
|
+
domains: async (args, options) => {
|
|
1719
2834
|
return this.transport.call({
|
|
1720
|
-
groupSegments: ["
|
|
1721
|
-
command: "
|
|
1722
|
-
body: { ...(options ?? {}) },
|
|
2835
|
+
groupSegments: ["pages"],
|
|
2836
|
+
command: "domains",
|
|
2837
|
+
body: { args, ...(options ?? {}) },
|
|
2838
|
+
});
|
|
2839
|
+
},
|
|
2840
|
+
/** List Ravi Pages sites in a Console project */
|
|
2841
|
+
list: async (project, options) => {
|
|
2842
|
+
return this.transport.call({
|
|
2843
|
+
groupSegments: ["pages"],
|
|
2844
|
+
command: "list",
|
|
2845
|
+
body: { project, ...(options ?? {}) },
|
|
2846
|
+
});
|
|
2847
|
+
},
|
|
2848
|
+
/** Publish a directory, file, or local artifact to a project Pages host */
|
|
2849
|
+
publish: async (args, options) => {
|
|
2850
|
+
return this.transport.call({
|
|
2851
|
+
groupSegments: ["pages"],
|
|
2852
|
+
command: "publish",
|
|
2853
|
+
body: { args, ...(options ?? {}) },
|
|
2854
|
+
});
|
|
2855
|
+
},
|
|
2856
|
+
/** List published Ravi Pages URLs in a Console project */
|
|
2857
|
+
published: async (project, options) => {
|
|
2858
|
+
return this.transport.call({
|
|
2859
|
+
groupSegments: ["pages"],
|
|
2860
|
+
command: "published",
|
|
2861
|
+
body: { project, ...(options ?? {}) },
|
|
2862
|
+
});
|
|
2863
|
+
},
|
|
2864
|
+
/** Update a Ravi Pages site in a Console project */
|
|
2865
|
+
update: async (args, options) => {
|
|
2866
|
+
return this.transport.call({
|
|
2867
|
+
groupSegments: ["pages"],
|
|
2868
|
+
command: "update",
|
|
2869
|
+
body: { args, ...(options ?? {}) },
|
|
1723
2870
|
});
|
|
1724
2871
|
},
|
|
1725
|
-
/**
|
|
1726
|
-
|
|
2872
|
+
/** Set a Ravi Pages site default visibility */
|
|
2873
|
+
visibility: async (args, options) => {
|
|
2874
|
+
return this.transport.call({
|
|
2875
|
+
groupSegments: ["pages"],
|
|
2876
|
+
command: "visibility",
|
|
2877
|
+
body: { args, ...(options ?? {}) },
|
|
2878
|
+
});
|
|
2879
|
+
}
|
|
2880
|
+
};
|
|
2881
|
+
permissions = {
|
|
2882
|
+
/** Plan or apply a provider-owned permission profile to subjects */
|
|
2883
|
+
allow: async (profile, options) => {
|
|
1727
2884
|
return this.transport.call({
|
|
1728
2885
|
groupSegments: ["permissions"],
|
|
1729
|
-
command: "
|
|
1730
|
-
body: {
|
|
2886
|
+
command: "allow",
|
|
2887
|
+
body: { profile, ...(options ?? {}) },
|
|
1731
2888
|
});
|
|
1732
2889
|
},
|
|
1733
|
-
/**
|
|
1734
|
-
|
|
2890
|
+
/** Evaluate a provider-runtime permission request */
|
|
2891
|
+
check: async (options) => {
|
|
1735
2892
|
return this.transport.call({
|
|
1736
2893
|
groupSegments: ["permissions"],
|
|
1737
|
-
command: "
|
|
1738
|
-
body: {
|
|
2894
|
+
command: "check",
|
|
2895
|
+
body: { ...(options ?? {}) },
|
|
1739
2896
|
});
|
|
1740
2897
|
},
|
|
1741
|
-
/**
|
|
1742
|
-
|
|
2898
|
+
/** Materialize provider-runtime capabilities for a subject */
|
|
2899
|
+
materialize: async (options) => {
|
|
1743
2900
|
return this.transport.call({
|
|
1744
2901
|
groupSegments: ["permissions"],
|
|
1745
|
-
command: "
|
|
2902
|
+
command: "materialize",
|
|
1746
2903
|
body: { ...(options ?? {}) },
|
|
1747
2904
|
});
|
|
1748
2905
|
},
|
|
1749
|
-
/**
|
|
1750
|
-
|
|
2906
|
+
/** Plan or apply a provider-owned fix for a recorded permission denial */
|
|
2907
|
+
resolve: async (denialId, options) => {
|
|
1751
2908
|
return this.transport.call({
|
|
1752
2909
|
groupSegments: ["permissions"],
|
|
1753
|
-
command: "
|
|
1754
|
-
body: {
|
|
2910
|
+
command: "resolve",
|
|
2911
|
+
body: { denialId, ...(options ?? {}) },
|
|
1755
2912
|
});
|
|
1756
2913
|
},
|
|
1757
|
-
/**
|
|
1758
|
-
|
|
2914
|
+
/** Show the active provider-runtime permission chain */
|
|
2915
|
+
status: async () => {
|
|
1759
2916
|
return this.transport.call({
|
|
1760
2917
|
groupSegments: ["permissions"],
|
|
1761
|
-
command: "
|
|
2918
|
+
command: "status",
|
|
1762
2919
|
body: {},
|
|
1763
2920
|
});
|
|
1764
2921
|
}
|
|
@@ -2155,27 +3312,195 @@ export class RaviClient {
|
|
|
2155
3312
|
});
|
|
2156
3313
|
}
|
|
2157
3314
|
};
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
3315
|
+
rules = {
|
|
3316
|
+
/** Import provider rules into .ravi/rules/imported */
|
|
3317
|
+
import: async (source, options) => {
|
|
3318
|
+
return this.transport.call({
|
|
3319
|
+
groupSegments: ["rules"],
|
|
3320
|
+
command: "import",
|
|
3321
|
+
body: { source, ...(options ?? {}) },
|
|
3322
|
+
});
|
|
3323
|
+
},
|
|
3324
|
+
/** List importable provider rule sources */
|
|
3325
|
+
sources: async (source, options) => {
|
|
3326
|
+
return this.transport.call({
|
|
3327
|
+
groupSegments: ["rules"],
|
|
3328
|
+
command: "sources",
|
|
3329
|
+
body: { source, ...(options ?? {}) },
|
|
3330
|
+
});
|
|
3331
|
+
}
|
|
3332
|
+
};
|
|
3333
|
+
runtime = {
|
|
3334
|
+
credentials: {
|
|
3335
|
+
/** Add a managed runtime provider credential */
|
|
3336
|
+
add: async (options) => {
|
|
2162
3337
|
return this.transport.call({
|
|
2163
|
-
groupSegments: ["
|
|
2164
|
-
command: "
|
|
3338
|
+
groupSegments: ["runtime", "credentials"],
|
|
3339
|
+
command: "add",
|
|
2165
3340
|
body: { ...(options ?? {}) },
|
|
2166
3341
|
});
|
|
2167
3342
|
},
|
|
2168
|
-
/**
|
|
2169
|
-
|
|
3343
|
+
/** Classify a provider failure for credential fallback */
|
|
3344
|
+
classify: async (options) => {
|
|
2170
3345
|
return this.transport.call({
|
|
2171
|
-
groupSegments: ["
|
|
2172
|
-
command: "
|
|
3346
|
+
groupSegments: ["runtime", "credentials"],
|
|
3347
|
+
command: "classify",
|
|
2173
3348
|
body: { ...(options ?? {}) },
|
|
2174
3349
|
});
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
3350
|
+
},
|
|
3351
|
+
/** Disable a runtime credential immediately */
|
|
3352
|
+
disable: async (id) => {
|
|
3353
|
+
return this.transport.call({
|
|
3354
|
+
groupSegments: ["runtime", "credentials"],
|
|
3355
|
+
command: "disable",
|
|
3356
|
+
body: { id },
|
|
3357
|
+
});
|
|
3358
|
+
},
|
|
3359
|
+
/** Enable a runtime credential */
|
|
3360
|
+
enable: async (id) => {
|
|
3361
|
+
return this.transport.call({
|
|
3362
|
+
groupSegments: ["runtime", "credentials"],
|
|
3363
|
+
command: "enable",
|
|
3364
|
+
body: { id },
|
|
3365
|
+
});
|
|
3366
|
+
},
|
|
3367
|
+
/** Import/reference an existing provider-native credential source */
|
|
3368
|
+
import: async (options) => {
|
|
3369
|
+
return this.transport.call({
|
|
3370
|
+
groupSegments: ["runtime", "credentials"],
|
|
3371
|
+
command: "import",
|
|
3372
|
+
body: { ...(options ?? {}) },
|
|
3373
|
+
});
|
|
3374
|
+
},
|
|
3375
|
+
/** List runtime provider credentials */
|
|
3376
|
+
list: async (options) => {
|
|
3377
|
+
return this.transport.call({
|
|
3378
|
+
groupSegments: ["runtime", "credentials"],
|
|
3379
|
+
command: "list",
|
|
3380
|
+
body: { ...(options ?? {}) },
|
|
3381
|
+
});
|
|
3382
|
+
},
|
|
3383
|
+
/** Refresh or recover credential health before pool selection */
|
|
3384
|
+
refresh: async (id, options) => {
|
|
3385
|
+
return this.transport.call({
|
|
3386
|
+
groupSegments: ["runtime", "credentials"],
|
|
3387
|
+
command: "refresh",
|
|
3388
|
+
body: { id, ...(options ?? {}) },
|
|
3389
|
+
});
|
|
3390
|
+
},
|
|
3391
|
+
/** Clear cooldown/error state for a credential */
|
|
3392
|
+
resetHealth: async (id) => {
|
|
3393
|
+
return this.transport.call({
|
|
3394
|
+
groupSegments: ["runtime", "credentials"],
|
|
3395
|
+
command: "reset-health",
|
|
3396
|
+
body: { id },
|
|
3397
|
+
});
|
|
3398
|
+
},
|
|
3399
|
+
/** Preview which credential the pool would select */
|
|
3400
|
+
select: async (options) => {
|
|
3401
|
+
return this.transport.call({
|
|
3402
|
+
groupSegments: ["runtime", "credentials"],
|
|
3403
|
+
command: "select",
|
|
3404
|
+
body: { ...(options ?? {}) },
|
|
3405
|
+
});
|
|
3406
|
+
},
|
|
3407
|
+
/** Show credential health and provider health */
|
|
3408
|
+
status: async (id) => {
|
|
3409
|
+
return this.transport.call({
|
|
3410
|
+
groupSegments: ["runtime", "credentials"],
|
|
3411
|
+
command: "status",
|
|
3412
|
+
body: { id },
|
|
3413
|
+
});
|
|
3414
|
+
}
|
|
3415
|
+
},
|
|
3416
|
+
presets: {
|
|
3417
|
+
/** Create a runtime model preset */
|
|
3418
|
+
create: async (id, options) => {
|
|
3419
|
+
return this.transport.call({
|
|
3420
|
+
groupSegments: ["runtime", "presets"],
|
|
3421
|
+
command: "create",
|
|
3422
|
+
body: { id, ...(options ?? {}) },
|
|
3423
|
+
});
|
|
3424
|
+
},
|
|
3425
|
+
/** Delete an unreferenced runtime model preset */
|
|
3426
|
+
delete: async (id, options) => {
|
|
3427
|
+
return this.transport.call({
|
|
3428
|
+
groupSegments: ["runtime", "presets"],
|
|
3429
|
+
command: "delete",
|
|
3430
|
+
body: { id, ...(options ?? {}) },
|
|
3431
|
+
});
|
|
3432
|
+
},
|
|
3433
|
+
/** Disable an unreferenced runtime model preset */
|
|
3434
|
+
disable: async (id, options) => {
|
|
3435
|
+
return this.transport.call({
|
|
3436
|
+
groupSegments: ["runtime", "presets"],
|
|
3437
|
+
command: "disable",
|
|
3438
|
+
body: { id, ...(options ?? {}) },
|
|
3439
|
+
});
|
|
3440
|
+
},
|
|
3441
|
+
/** Enable a runtime model preset */
|
|
3442
|
+
enable: async (id, options) => {
|
|
3443
|
+
return this.transport.call({
|
|
3444
|
+
groupSegments: ["runtime", "presets"],
|
|
3445
|
+
command: "enable",
|
|
3446
|
+
body: { id, ...(options ?? {}) },
|
|
3447
|
+
});
|
|
3448
|
+
},
|
|
3449
|
+
/** Show agents/sessions affected by a preset */
|
|
3450
|
+
impact: async (id, options) => {
|
|
3451
|
+
return this.transport.call({
|
|
3452
|
+
groupSegments: ["runtime", "presets"],
|
|
3453
|
+
command: "impact",
|
|
3454
|
+
body: { id, ...(options ?? {}) },
|
|
3455
|
+
});
|
|
3456
|
+
},
|
|
3457
|
+
/** List runtime model presets */
|
|
3458
|
+
list: async (options) => {
|
|
3459
|
+
return this.transport.call({
|
|
3460
|
+
groupSegments: ["runtime", "presets"],
|
|
3461
|
+
command: "list",
|
|
3462
|
+
body: { ...(options ?? {}) },
|
|
3463
|
+
});
|
|
3464
|
+
},
|
|
3465
|
+
/** Update a runtime model preset field (model) */
|
|
3466
|
+
set: async (id, field, value, options) => {
|
|
3467
|
+
return this.transport.call({
|
|
3468
|
+
groupSegments: ["runtime", "presets"],
|
|
3469
|
+
command: "set",
|
|
3470
|
+
body: { id, field, value, ...(options ?? {}) },
|
|
3471
|
+
});
|
|
3472
|
+
},
|
|
3473
|
+
/** Show a runtime model preset */
|
|
3474
|
+
show: async (id) => {
|
|
3475
|
+
return this.transport.call({
|
|
3476
|
+
groupSegments: ["runtime", "presets"],
|
|
3477
|
+
command: "show",
|
|
3478
|
+
body: { id },
|
|
3479
|
+
});
|
|
3480
|
+
}
|
|
3481
|
+
}
|
|
3482
|
+
};
|
|
3483
|
+
sdk = {
|
|
3484
|
+
client: {
|
|
3485
|
+
/** Compare on-disk @ravi-os/sdk sources to a fresh emit; exit 1 on drift */
|
|
3486
|
+
check: async (options) => {
|
|
3487
|
+
return this.transport.call({
|
|
3488
|
+
groupSegments: ["sdk", "client"],
|
|
3489
|
+
command: "check",
|
|
3490
|
+
body: { ...(options ?? {}) },
|
|
3491
|
+
});
|
|
3492
|
+
},
|
|
3493
|
+
/** Generate the four @ravi-os/sdk source files from the live registry */
|
|
3494
|
+
generate: async (options) => {
|
|
3495
|
+
return this.transport.call({
|
|
3496
|
+
groupSegments: ["sdk", "client"],
|
|
3497
|
+
command: "generate",
|
|
3498
|
+
body: { ...(options ?? {}) },
|
|
3499
|
+
});
|
|
3500
|
+
}
|
|
3501
|
+
},
|
|
3502
|
+
openapi: {
|
|
3503
|
+
/** Diff a stored OpenAPI spec against the live registry */
|
|
2179
3504
|
check: async (options) => {
|
|
2180
3505
|
return this.transport.call({
|
|
2181
3506
|
groupSegments: ["sdk", "openapi"],
|
|
@@ -2277,33 +3602,15 @@ export class RaviClient {
|
|
|
2277
3602
|
});
|
|
2278
3603
|
}
|
|
2279
3604
|
};
|
|
2280
|
-
|
|
2281
|
-
/**
|
|
2282
|
-
|
|
2283
|
-
return this.transport.call({
|
|
2284
|
-
groupSegments: ["service"],
|
|
2285
|
-
command: "start",
|
|
2286
|
-
body: {},
|
|
2287
|
-
});
|
|
2288
|
-
},
|
|
2289
|
-
/** Start the TUI interface */
|
|
2290
|
-
tui: async (session) => {
|
|
3605
|
+
sessions = {
|
|
3606
|
+
/** Show available chat actions and recent own messages for a session */
|
|
3607
|
+
actions: async (nameOrKey, options) => {
|
|
2291
3608
|
return this.transport.call({
|
|
2292
|
-
groupSegments: ["
|
|
2293
|
-
command: "
|
|
2294
|
-
body: {
|
|
3609
|
+
groupSegments: ["sessions"],
|
|
3610
|
+
command: "actions",
|
|
3611
|
+
body: { nameOrKey, ...(options ?? {}) },
|
|
2295
3612
|
});
|
|
2296
3613
|
},
|
|
2297
|
-
/** Start WhatsApp gateway (deprecated — use daemon start) */
|
|
2298
|
-
wa: async () => {
|
|
2299
|
-
return this.transport.call({
|
|
2300
|
-
groupSegments: ["service"],
|
|
2301
|
-
command: "wa",
|
|
2302
|
-
body: {},
|
|
2303
|
-
});
|
|
2304
|
-
}
|
|
2305
|
-
};
|
|
2306
|
-
sessions = {
|
|
2307
3614
|
/** Answer a question from another session (fire-and-forget) */
|
|
2308
3615
|
answer: async (target, message, sender, options) => {
|
|
2309
3616
|
return this.transport.call({
|
|
@@ -2320,6 +3627,14 @@ export class RaviClient {
|
|
|
2320
3627
|
body: { target, message, sender, ...(options ?? {}) },
|
|
2321
3628
|
});
|
|
2322
3629
|
},
|
|
3630
|
+
/** Attach a chat as the session output target and input source */
|
|
3631
|
+
attach: async (nameOrKey, options) => {
|
|
3632
|
+
return this.transport.call({
|
|
3633
|
+
groupSegments: ["sessions"],
|
|
3634
|
+
command: "attach",
|
|
3635
|
+
body: { nameOrKey, ...(options ?? {}) },
|
|
3636
|
+
});
|
|
3637
|
+
},
|
|
2323
3638
|
/** Delete a session permanently */
|
|
2324
3639
|
delete: async (nameOrKey) => {
|
|
2325
3640
|
return this.transport.call({
|
|
@@ -2328,6 +3643,30 @@ export class RaviClient {
|
|
|
2328
3643
|
body: { nameOrKey },
|
|
2329
3644
|
});
|
|
2330
3645
|
},
|
|
3646
|
+
/** Delete one of this session agent's own channel messages */
|
|
3647
|
+
deleteMessage: async (sessionOrMessage, messageRef) => {
|
|
3648
|
+
return this.transport.call({
|
|
3649
|
+
groupSegments: ["sessions"],
|
|
3650
|
+
command: "delete-message",
|
|
3651
|
+
body: { sessionOrMessage, messageRef },
|
|
3652
|
+
});
|
|
3653
|
+
},
|
|
3654
|
+
/** Detach a chat/output target from a session */
|
|
3655
|
+
detach: async (nameOrKey, options) => {
|
|
3656
|
+
return this.transport.call({
|
|
3657
|
+
groupSegments: ["sessions"],
|
|
3658
|
+
command: "detach",
|
|
3659
|
+
body: { nameOrKey, ...(options ?? {}) },
|
|
3660
|
+
});
|
|
3661
|
+
},
|
|
3662
|
+
/** Edit one of this session agent's own text channel messages */
|
|
3663
|
+
editMessage: async (sessionOrMessage, messageOrText, textArg, options) => {
|
|
3664
|
+
return this.transport.call({
|
|
3665
|
+
groupSegments: ["sessions"],
|
|
3666
|
+
command: "edit-message",
|
|
3667
|
+
body: { sessionOrMessage, messageOrText, textArg, ...(options ?? {}) },
|
|
3668
|
+
});
|
|
3669
|
+
},
|
|
2331
3670
|
/** Send an execute command to another session (fire-and-forget) */
|
|
2332
3671
|
execute: async (target, message, options) => {
|
|
2333
3672
|
return this.transport.call({
|
|
@@ -2344,6 +3683,88 @@ export class RaviClient {
|
|
|
2344
3683
|
body: { nameOrKey, duration },
|
|
2345
3684
|
});
|
|
2346
3685
|
},
|
|
3686
|
+
followups: {
|
|
3687
|
+
/** Create a session followup cadence */
|
|
3688
|
+
add: async (name, options) => {
|
|
3689
|
+
return this.transport.call({
|
|
3690
|
+
groupSegments: ["sessions", "followups"],
|
|
3691
|
+
command: "add",
|
|
3692
|
+
body: { name, ...(options ?? {}) },
|
|
3693
|
+
});
|
|
3694
|
+
},
|
|
3695
|
+
/** Inspect one session followup cadence and recent runs */
|
|
3696
|
+
inspect: async (id, options) => {
|
|
3697
|
+
return this.transport.call({
|
|
3698
|
+
groupSegments: ["sessions", "followups"],
|
|
3699
|
+
command: "inspect",
|
|
3700
|
+
body: { id, ...(options ?? {}) },
|
|
3701
|
+
});
|
|
3702
|
+
},
|
|
3703
|
+
/** List session followup cadences */
|
|
3704
|
+
list: async (options) => {
|
|
3705
|
+
return this.transport.call({
|
|
3706
|
+
groupSegments: ["sessions", "followups"],
|
|
3707
|
+
command: "list",
|
|
3708
|
+
body: { ...(options ?? {}) },
|
|
3709
|
+
});
|
|
3710
|
+
},
|
|
3711
|
+
/** Pause a followup cadence */
|
|
3712
|
+
pause: async (id) => {
|
|
3713
|
+
return this.transport.call({
|
|
3714
|
+
groupSegments: ["sessions", "followups"],
|
|
3715
|
+
command: "pause",
|
|
3716
|
+
body: { id },
|
|
3717
|
+
});
|
|
3718
|
+
},
|
|
3719
|
+
/** Resume a followup cadence and recalculate next run */
|
|
3720
|
+
resume: async (id) => {
|
|
3721
|
+
return this.transport.call({
|
|
3722
|
+
groupSegments: ["sessions", "followups"],
|
|
3723
|
+
command: "resume",
|
|
3724
|
+
body: { id },
|
|
3725
|
+
});
|
|
3726
|
+
},
|
|
3727
|
+
/** Retry failed/dead followup runs */
|
|
3728
|
+
retry: async (run, options) => {
|
|
3729
|
+
return this.transport.call({
|
|
3730
|
+
groupSegments: ["sessions", "followups"],
|
|
3731
|
+
command: "retry",
|
|
3732
|
+
body: { run, ...(options ?? {}) },
|
|
3733
|
+
});
|
|
3734
|
+
},
|
|
3735
|
+
/** Run a followup cadence now without consuming its next scheduled time */
|
|
3736
|
+
run: async (id) => {
|
|
3737
|
+
return this.transport.call({
|
|
3738
|
+
groupSegments: ["sessions", "followups"],
|
|
3739
|
+
command: "run",
|
|
3740
|
+
body: { id },
|
|
3741
|
+
});
|
|
3742
|
+
},
|
|
3743
|
+
/** List session followup runs */
|
|
3744
|
+
runs: async (options) => {
|
|
3745
|
+
return this.transport.call({
|
|
3746
|
+
groupSegments: ["sessions", "followups"],
|
|
3747
|
+
command: "runs",
|
|
3748
|
+
body: { ...(options ?? {}) },
|
|
3749
|
+
});
|
|
3750
|
+
},
|
|
3751
|
+
/** Snooze a followup cadence until a timestamp */
|
|
3752
|
+
snooze: async (id, options) => {
|
|
3753
|
+
return this.transport.call({
|
|
3754
|
+
groupSegments: ["sessions", "followups"],
|
|
3755
|
+
command: "snooze",
|
|
3756
|
+
body: { id, ...(options ?? {}) },
|
|
3757
|
+
});
|
|
3758
|
+
},
|
|
3759
|
+
/** Update a session followup cadence without recreating it */
|
|
3760
|
+
update: async (id, options) => {
|
|
3761
|
+
return this.transport.call({
|
|
3762
|
+
groupSegments: ["sessions", "followups"],
|
|
3763
|
+
command: "update",
|
|
3764
|
+
body: { id, ...(options ?? {}) },
|
|
3765
|
+
});
|
|
3766
|
+
}
|
|
3767
|
+
},
|
|
2347
3768
|
/** Inspect or mutate persisted session goal state */
|
|
2348
3769
|
goal: async (action, nameOrKey, objective, options) => {
|
|
2349
3770
|
return this.transport.call({
|
|
@@ -2384,6 +3805,14 @@ export class RaviClient {
|
|
|
2384
3805
|
body: { ...(options ?? {}) },
|
|
2385
3806
|
});
|
|
2386
3807
|
},
|
|
3808
|
+
/** Keep a subscribed chat as listen-only for a session */
|
|
3809
|
+
mute: async (nameOrKey, options) => {
|
|
3810
|
+
return this.transport.call({
|
|
3811
|
+
groupSegments: ["sessions"],
|
|
3812
|
+
command: "mute",
|
|
3813
|
+
body: { nameOrKey, ...(options ?? {}) },
|
|
3814
|
+
});
|
|
3815
|
+
},
|
|
2387
3816
|
/** Prune sessions inactive for a duration (dry-run by default) */
|
|
2388
3817
|
prune: async (options) => {
|
|
2389
3818
|
return this.transport.call({
|
|
@@ -2490,6 +3919,14 @@ export class RaviClient {
|
|
|
2490
3919
|
body: { nameOrKey, displayName },
|
|
2491
3920
|
});
|
|
2492
3921
|
},
|
|
3922
|
+
/** Set session reasoning effort override */
|
|
3923
|
+
setEffort: async (nameOrKey, level) => {
|
|
3924
|
+
return this.transport.call({
|
|
3925
|
+
groupSegments: ["sessions"],
|
|
3926
|
+
command: "set-effort",
|
|
3927
|
+
body: { nameOrKey, level },
|
|
3928
|
+
});
|
|
3929
|
+
},
|
|
2493
3930
|
/** Set session model override */
|
|
2494
3931
|
setModel: async (nameOrKey, model) => {
|
|
2495
3932
|
return this.transport.call({
|
|
@@ -2498,6 +3935,14 @@ export class RaviClient {
|
|
|
2498
3935
|
body: { nameOrKey, model },
|
|
2499
3936
|
});
|
|
2500
3937
|
},
|
|
3938
|
+
/** Set session runtime provider override */
|
|
3939
|
+
setProvider: async (nameOrKey, provider) => {
|
|
3940
|
+
return this.transport.call({
|
|
3941
|
+
groupSegments: ["sessions"],
|
|
3942
|
+
command: "set-provider",
|
|
3943
|
+
body: { nameOrKey, provider },
|
|
3944
|
+
});
|
|
3945
|
+
},
|
|
2501
3946
|
/** Set session thinking level */
|
|
2502
3947
|
setThinking: async (nameOrKey, level) => {
|
|
2503
3948
|
return this.transport.call({
|
|
@@ -2514,6 +3959,14 @@ export class RaviClient {
|
|
|
2514
3959
|
body: { nameOrKey, duration },
|
|
2515
3960
|
});
|
|
2516
3961
|
},
|
|
3962
|
+
/** List chats attached to a session */
|
|
3963
|
+
subscriptions: async (nameOrKey) => {
|
|
3964
|
+
return this.transport.call({
|
|
3965
|
+
groupSegments: ["sessions"],
|
|
3966
|
+
command: "subscriptions",
|
|
3967
|
+
body: { nameOrKey },
|
|
3968
|
+
});
|
|
3969
|
+
},
|
|
2517
3970
|
/** Read the SQLite session trace timeline */
|
|
2518
3971
|
trace: async (nameOrKey, options) => {
|
|
2519
3972
|
return this.transport.call({
|
|
@@ -2522,6 +3975,14 @@ export class RaviClient {
|
|
|
2522
3975
|
body: { nameOrKey, ...(options ?? {}) },
|
|
2523
3976
|
});
|
|
2524
3977
|
},
|
|
3978
|
+
/** Allow a subscribed chat to receive session responses */
|
|
3979
|
+
unmute: async (nameOrKey, options) => {
|
|
3980
|
+
return this.transport.call({
|
|
3981
|
+
groupSegments: ["sessions"],
|
|
3982
|
+
command: "unmute",
|
|
3983
|
+
body: { nameOrKey, ...(options ?? {}) },
|
|
3984
|
+
});
|
|
3985
|
+
},
|
|
2525
3986
|
/** Show runtime session visibility state */
|
|
2526
3987
|
visibility: async (nameOrKey) => {
|
|
2527
3988
|
return this.transport.call({
|
|
@@ -2598,62 +4059,400 @@ export class RaviClient {
|
|
|
2598
4059
|
body: { id },
|
|
2599
4060
|
});
|
|
2600
4061
|
},
|
|
2601
|
-
/** Remove a custom gate or disable a default gate */
|
|
2602
|
-
rm: async (id) => {
|
|
4062
|
+
/** Remove a custom gate or disable a default gate */
|
|
4063
|
+
rm: async (id) => {
|
|
4064
|
+
return this.transport.call({
|
|
4065
|
+
groupSegments: ["skill-gates"],
|
|
4066
|
+
command: "rm",
|
|
4067
|
+
body: { id },
|
|
4068
|
+
});
|
|
4069
|
+
},
|
|
4070
|
+
/** Create or overwrite a skill gate rule */
|
|
4071
|
+
set: async (id, skill, options) => {
|
|
4072
|
+
return this.transport.call({
|
|
4073
|
+
groupSegments: ["skill-gates"],
|
|
4074
|
+
command: "set",
|
|
4075
|
+
body: { id, skill, ...(options ?? {}) },
|
|
4076
|
+
});
|
|
4077
|
+
},
|
|
4078
|
+
/** Show one skill gate rule */
|
|
4079
|
+
show: async (id) => {
|
|
4080
|
+
return this.transport.call({
|
|
4081
|
+
groupSegments: ["skill-gates"],
|
|
4082
|
+
command: "show",
|
|
4083
|
+
body: { id },
|
|
4084
|
+
});
|
|
4085
|
+
}
|
|
4086
|
+
};
|
|
4087
|
+
skills = {
|
|
4088
|
+
/** Grant a custom skill to an agent (per-agent visibility). System skills follow permissions. */
|
|
4089
|
+
grant: async (agent, skill, options) => {
|
|
4090
|
+
return this.transport.call({
|
|
4091
|
+
groupSegments: ["skills"],
|
|
4092
|
+
command: "grant",
|
|
4093
|
+
body: { agent, skill, ...(options ?? {}) },
|
|
4094
|
+
});
|
|
4095
|
+
},
|
|
4096
|
+
/** Grant skills to agents in bulk. Reuses the per-agent grant mechanism across many (agent, skill) pairs in one call. Idempotent (upsert). Use --dry-run to preview. */
|
|
4097
|
+
grantBatch: async (options) => {
|
|
4098
|
+
return this.transport.call({
|
|
4099
|
+
groupSegments: ["skills"],
|
|
4100
|
+
command: "grant-batch",
|
|
4101
|
+
body: { ...(options ?? {}) },
|
|
4102
|
+
});
|
|
4103
|
+
},
|
|
4104
|
+
/** Show the resolved per-agent skill allowlist (baseline ∪ permission-derived ∪ grants) */
|
|
4105
|
+
inspect: async (agent) => {
|
|
4106
|
+
return this.transport.call({
|
|
4107
|
+
groupSegments: ["skills"],
|
|
4108
|
+
command: "inspect",
|
|
4109
|
+
body: { agent },
|
|
4110
|
+
});
|
|
4111
|
+
},
|
|
4112
|
+
/** Install Ravi catalog skills or skills from an explicit source */
|
|
4113
|
+
install: async (name, options) => {
|
|
4114
|
+
return this.transport.call({
|
|
4115
|
+
groupSegments: ["skills"],
|
|
4116
|
+
command: "install",
|
|
4117
|
+
body: { name, ...(options ?? {}) },
|
|
4118
|
+
});
|
|
4119
|
+
},
|
|
4120
|
+
/** List Ravi catalog skills, installed skills or source skills */
|
|
4121
|
+
list: async (options) => {
|
|
4122
|
+
return this.transport.call({
|
|
4123
|
+
groupSegments: ["skills"],
|
|
4124
|
+
command: "list",
|
|
4125
|
+
body: { ...(options ?? {}) },
|
|
4126
|
+
});
|
|
4127
|
+
},
|
|
4128
|
+
/** Revoke a skill grant from an agent */
|
|
4129
|
+
revoke: async (agent, skill) => {
|
|
4130
|
+
return this.transport.call({
|
|
4131
|
+
groupSegments: ["skills"],
|
|
4132
|
+
command: "revoke",
|
|
4133
|
+
body: { agent, skill },
|
|
4134
|
+
});
|
|
4135
|
+
},
|
|
4136
|
+
/** Revoke skill grants from agents in bulk — the retirement counterpart of grant-batch. Same axes (--agent/--all-agents × --skill/--all-skills). Use --dry-run to preview. */
|
|
4137
|
+
revokeBatch: async (options) => {
|
|
4138
|
+
return this.transport.call({
|
|
4139
|
+
groupSegments: ["skills"],
|
|
4140
|
+
command: "revoke-batch",
|
|
4141
|
+
body: { ...(options ?? {}) },
|
|
4142
|
+
});
|
|
4143
|
+
},
|
|
4144
|
+
/** Show a Ravi catalog skill, installed skill or source skill */
|
|
4145
|
+
show: async (name, options) => {
|
|
4146
|
+
return this.transport.call({
|
|
4147
|
+
groupSegments: ["skills"],
|
|
4148
|
+
command: "show",
|
|
4149
|
+
body: { name, ...(options ?? {}) },
|
|
4150
|
+
});
|
|
4151
|
+
},
|
|
4152
|
+
/** Sync Ravi plugin skills into the Codex skills directory */
|
|
4153
|
+
sync: async () => {
|
|
4154
|
+
return this.transport.call({
|
|
4155
|
+
groupSegments: ["skills"],
|
|
4156
|
+
command: "sync",
|
|
4157
|
+
body: {},
|
|
4158
|
+
});
|
|
4159
|
+
},
|
|
4160
|
+
/** List agents currently granted a skill (or list all grants for an agent with --agent) */
|
|
4161
|
+
who: async (skill, options) => {
|
|
4162
|
+
return this.transport.call({
|
|
4163
|
+
groupSegments: ["skills"],
|
|
4164
|
+
command: "who",
|
|
4165
|
+
body: { skill, ...(options ?? {}) },
|
|
4166
|
+
});
|
|
4167
|
+
}
|
|
4168
|
+
};
|
|
4169
|
+
slack = {
|
|
4170
|
+
/** Send a Slack Block Kit message; dry-run unless --execute is set */
|
|
4171
|
+
blocksSend: async (channel, file, options) => {
|
|
4172
|
+
return this.transport.call({
|
|
4173
|
+
groupSegments: ["slack"],
|
|
4174
|
+
command: "blocks-send",
|
|
4175
|
+
body: { channel, file, ...(options ?? {}) },
|
|
4176
|
+
});
|
|
4177
|
+
},
|
|
4178
|
+
/** Send a Slack Block Kit showcase; dry-run unless --execute is set */
|
|
4179
|
+
blocksShowcase: async (channel, options) => {
|
|
4180
|
+
return this.transport.call({
|
|
4181
|
+
groupSegments: ["slack"],
|
|
4182
|
+
command: "blocks-showcase",
|
|
4183
|
+
body: { channel, ...(options ?? {}) },
|
|
4184
|
+
});
|
|
4185
|
+
},
|
|
4186
|
+
/** Update a Slack message with Block Kit; dry-run unless --execute is set */
|
|
4187
|
+
blocksUpdate: async (channel, ts, file, options) => {
|
|
4188
|
+
return this.transport.call({
|
|
4189
|
+
groupSegments: ["slack"],
|
|
4190
|
+
command: "blocks-update",
|
|
4191
|
+
body: { channel, ts, file, ...(options ?? {}) },
|
|
4192
|
+
});
|
|
4193
|
+
},
|
|
4194
|
+
/** Validate Slack Block Kit JSON with Slack blocks.validate */
|
|
4195
|
+
blocksValidate: async (file, options) => {
|
|
4196
|
+
return this.transport.call({
|
|
4197
|
+
groupSegments: ["slack"],
|
|
4198
|
+
command: "blocks-validate",
|
|
4199
|
+
body: { file, ...(options ?? {}) },
|
|
4200
|
+
});
|
|
4201
|
+
},
|
|
4202
|
+
/** Delete Slack standalone canvas access; dry-run unless --execute is set */
|
|
4203
|
+
canvasAccessDelete: async (canvas, options) => {
|
|
4204
|
+
return this.transport.call({
|
|
4205
|
+
groupSegments: ["slack"],
|
|
4206
|
+
command: "canvas-access-delete",
|
|
4207
|
+
body: { canvas, ...(options ?? {}) },
|
|
4208
|
+
});
|
|
4209
|
+
},
|
|
4210
|
+
/** Set Slack standalone canvas access; dry-run unless --execute is set */
|
|
4211
|
+
canvasAccessSet: async (canvas, access, options) => {
|
|
4212
|
+
return this.transport.call({
|
|
4213
|
+
groupSegments: ["slack"],
|
|
4214
|
+
command: "canvas-access-set",
|
|
4215
|
+
body: { canvas, access, ...(options ?? {}) },
|
|
4216
|
+
});
|
|
4217
|
+
},
|
|
4218
|
+
/** Compatibility helper for publishing Markdown to Slack Canvas; prefer native canvas-create/channel-create/edit --artifact */
|
|
4219
|
+
canvasArtifactPublish: async (artifactOrFile, options) => {
|
|
4220
|
+
return this.transport.call({
|
|
4221
|
+
groupSegments: ["slack"],
|
|
4222
|
+
command: "canvas-artifact-publish",
|
|
4223
|
+
body: { artifactOrFile, ...(options ?? {}) },
|
|
4224
|
+
});
|
|
4225
|
+
},
|
|
4226
|
+
/** Show local Slack Canvas publish status for a Ravi artifact */
|
|
4227
|
+
canvasArtifactStatus: async (artifact) => {
|
|
4228
|
+
return this.transport.call({
|
|
4229
|
+
groupSegments: ["slack"],
|
|
4230
|
+
command: "canvas-artifact-status",
|
|
4231
|
+
body: { artifact },
|
|
4232
|
+
});
|
|
4233
|
+
},
|
|
4234
|
+
/** Create a Slack channel canvas; dry-run unless --execute is set */
|
|
4235
|
+
canvasChannelCreate: async (channel, options) => {
|
|
4236
|
+
return this.transport.call({
|
|
4237
|
+
groupSegments: ["slack"],
|
|
4238
|
+
command: "canvas-channel-create",
|
|
4239
|
+
body: { channel, ...(options ?? {}) },
|
|
4240
|
+
});
|
|
4241
|
+
},
|
|
4242
|
+
/** Create or reuse a channel canvas and publish the Ravi showcase; dry-run unless --execute is set */
|
|
4243
|
+
canvasChannelShowcase: async (channel, options) => {
|
|
4244
|
+
return this.transport.call({
|
|
4245
|
+
groupSegments: ["slack"],
|
|
4246
|
+
command: "canvas-channel-showcase",
|
|
4247
|
+
body: { channel, ...(options ?? {}) },
|
|
4248
|
+
});
|
|
4249
|
+
},
|
|
4250
|
+
/** Create a Slack standalone canvas; dry-run unless --execute is set */
|
|
4251
|
+
canvasCreate: async (options) => {
|
|
4252
|
+
return this.transport.call({
|
|
4253
|
+
groupSegments: ["slack"],
|
|
4254
|
+
command: "canvas-create",
|
|
4255
|
+
body: { ...(options ?? {}) },
|
|
4256
|
+
});
|
|
4257
|
+
},
|
|
4258
|
+
/** Delete a Slack standalone canvas; dry-run unless --execute is set */
|
|
4259
|
+
canvasDelete: async (canvas, options) => {
|
|
4260
|
+
return this.transport.call({
|
|
4261
|
+
groupSegments: ["slack"],
|
|
4262
|
+
command: "canvas-delete",
|
|
4263
|
+
body: { canvas, ...(options ?? {}) },
|
|
4264
|
+
});
|
|
4265
|
+
},
|
|
4266
|
+
/** Edit a Slack canvas section or title; dry-run unless --execute is set */
|
|
4267
|
+
canvasEdit: async (canvas, operation, options) => {
|
|
4268
|
+
return this.transport.call({
|
|
4269
|
+
groupSegments: ["slack"],
|
|
4270
|
+
command: "canvas-edit",
|
|
4271
|
+
body: { canvas, operation, ...(options ?? {}) },
|
|
4272
|
+
});
|
|
4273
|
+
},
|
|
4274
|
+
/** Lookup Slack canvas section IDs */
|
|
4275
|
+
canvasSectionsLookup: async (canvas, options) => {
|
|
4276
|
+
return this.transport.call({
|
|
4277
|
+
groupSegments: ["slack"],
|
|
4278
|
+
command: "canvas-sections-lookup",
|
|
4279
|
+
body: { canvas, ...(options ?? {}) },
|
|
4280
|
+
});
|
|
4281
|
+
},
|
|
4282
|
+
/** Publish the Ravi Slack Canvas showcase into an existing canvas; dry-run unless --execute is set */
|
|
4283
|
+
canvasShowcase: async (canvas, options) => {
|
|
4284
|
+
return this.transport.call({
|
|
4285
|
+
groupSegments: ["slack"],
|
|
4286
|
+
command: "canvas-showcase",
|
|
4287
|
+
body: { canvas, ...(options ?? {}) },
|
|
4288
|
+
});
|
|
4289
|
+
},
|
|
4290
|
+
/** Create a Slack channel; dry-run unless --execute is set */
|
|
4291
|
+
channelsCreate: async (name, options) => {
|
|
4292
|
+
return this.transport.call({
|
|
4293
|
+
groupSegments: ["slack"],
|
|
4294
|
+
command: "channels-create",
|
|
4295
|
+
body: { name, ...(options ?? {}) },
|
|
4296
|
+
});
|
|
4297
|
+
},
|
|
4298
|
+
/** Read Slack conversation history */
|
|
4299
|
+
channelsHistory: async (channel, options) => {
|
|
4300
|
+
return this.transport.call({
|
|
4301
|
+
groupSegments: ["slack"],
|
|
4302
|
+
command: "channels-history",
|
|
4303
|
+
body: { channel, ...(options ?? {}) },
|
|
4304
|
+
});
|
|
4305
|
+
},
|
|
4306
|
+
/** Show Slack conversation metadata */
|
|
4307
|
+
channelsInfo: async (channel) => {
|
|
4308
|
+
return this.transport.call({
|
|
4309
|
+
groupSegments: ["slack"],
|
|
4310
|
+
command: "channels-info",
|
|
4311
|
+
body: { channel },
|
|
4312
|
+
});
|
|
4313
|
+
},
|
|
4314
|
+
/** Invite Slack users to a channel; dry-run unless --execute is set */
|
|
4315
|
+
channelsInvite: async (channel, users, options) => {
|
|
4316
|
+
return this.transport.call({
|
|
4317
|
+
groupSegments: ["slack"],
|
|
4318
|
+
command: "channels-invite",
|
|
4319
|
+
body: { channel, users, ...(options ?? {}) },
|
|
4320
|
+
});
|
|
4321
|
+
},
|
|
4322
|
+
/** List Slack conversations visible to the configured bot */
|
|
4323
|
+
channelsList: async (options) => {
|
|
4324
|
+
return this.transport.call({
|
|
4325
|
+
groupSegments: ["slack"],
|
|
4326
|
+
command: "channels-list",
|
|
4327
|
+
body: { ...(options ?? {}) },
|
|
4328
|
+
});
|
|
4329
|
+
},
|
|
4330
|
+
/** Rename a Slack channel; dry-run unless --execute is set */
|
|
4331
|
+
channelsRename: async (channel, name, options) => {
|
|
4332
|
+
return this.transport.call({
|
|
4333
|
+
groupSegments: ["slack"],
|
|
4334
|
+
command: "channels-rename",
|
|
4335
|
+
body: { channel, name, ...(options ?? {}) },
|
|
4336
|
+
});
|
|
4337
|
+
},
|
|
4338
|
+
/** List Slack files visible to the configured bot */
|
|
4339
|
+
filesList: async (options) => {
|
|
4340
|
+
return this.transport.call({
|
|
4341
|
+
groupSegments: ["slack"],
|
|
4342
|
+
command: "files-list",
|
|
4343
|
+
body: { ...(options ?? {}) },
|
|
4344
|
+
});
|
|
4345
|
+
},
|
|
4346
|
+
/** Respond to a Slack interaction response handle; dry-run unless --execute is set */
|
|
4347
|
+
interactionsRespond: async (responseUrlId, file, options) => {
|
|
4348
|
+
return this.transport.call({
|
|
4349
|
+
groupSegments: ["slack"],
|
|
4350
|
+
command: "interactions-respond",
|
|
4351
|
+
body: { responseUrlId, file, ...(options ?? {}) },
|
|
4352
|
+
});
|
|
4353
|
+
},
|
|
4354
|
+
/** List Slack conversation members */
|
|
4355
|
+
membersList: async (channel, options) => {
|
|
4356
|
+
return this.transport.call({
|
|
4357
|
+
groupSegments: ["slack"],
|
|
4358
|
+
command: "members-list",
|
|
4359
|
+
body: { channel, ...(options ?? {}) },
|
|
4360
|
+
});
|
|
4361
|
+
},
|
|
4362
|
+
/** Inspect whether a Slack message exists in Slack and Ravi */
|
|
4363
|
+
messagesInspect: async (channel, ts) => {
|
|
4364
|
+
return this.transport.call({
|
|
4365
|
+
groupSegments: ["slack"],
|
|
4366
|
+
command: "messages-inspect",
|
|
4367
|
+
body: { channel, ts },
|
|
4368
|
+
});
|
|
4369
|
+
},
|
|
4370
|
+
/** Replay a Slack message through the native Ravi channel pipeline */
|
|
4371
|
+
messagesReplay: async (channel, ts, options) => {
|
|
4372
|
+
return this.transport.call({
|
|
4373
|
+
groupSegments: ["slack"],
|
|
4374
|
+
command: "messages-replay",
|
|
4375
|
+
body: { channel, ts, ...(options ?? {}) },
|
|
4376
|
+
});
|
|
4377
|
+
},
|
|
4378
|
+
/** Send a Slack message; dry-run unless --execute is set */
|
|
4379
|
+
messagesSend: async (channel, text, options) => {
|
|
4380
|
+
return this.transport.call({
|
|
4381
|
+
groupSegments: ["slack"],
|
|
4382
|
+
command: "messages-send",
|
|
4383
|
+
body: { channel, text, ...(options ?? {}) },
|
|
4384
|
+
});
|
|
4385
|
+
},
|
|
4386
|
+
/** Open a Slack modal from an interaction trigger_id; dry-run unless --execute is set */
|
|
4387
|
+
modalsOpen: async (triggerId, file, options) => {
|
|
4388
|
+
return this.transport.call({
|
|
4389
|
+
groupSegments: ["slack"],
|
|
4390
|
+
command: "modals-open",
|
|
4391
|
+
body: { triggerId, file, ...(options ?? {}) },
|
|
4392
|
+
});
|
|
4393
|
+
},
|
|
4394
|
+
/** Push a Slack modal view onto an existing modal stack; dry-run unless --execute is set */
|
|
4395
|
+
modalsPush: async (triggerId, file, options) => {
|
|
4396
|
+
return this.transport.call({
|
|
4397
|
+
groupSegments: ["slack"],
|
|
4398
|
+
command: "modals-push",
|
|
4399
|
+
body: { triggerId, file, ...(options ?? {}) },
|
|
4400
|
+
});
|
|
4401
|
+
},
|
|
4402
|
+
/** Update a Slack modal view; dry-run unless --execute is set */
|
|
4403
|
+
modalsUpdate: async (view, file, options) => {
|
|
2603
4404
|
return this.transport.call({
|
|
2604
|
-
groupSegments: ["
|
|
2605
|
-
command: "
|
|
2606
|
-
body: {
|
|
4405
|
+
groupSegments: ["slack"],
|
|
4406
|
+
command: "modals-update",
|
|
4407
|
+
body: { view, file, ...(options ?? {}) },
|
|
2607
4408
|
});
|
|
2608
4409
|
},
|
|
2609
|
-
/**
|
|
2610
|
-
|
|
4410
|
+
/** List OAuth scopes granted to the configured Slack bot token */
|
|
4411
|
+
permissionsList: async (options) => {
|
|
2611
4412
|
return this.transport.call({
|
|
2612
|
-
groupSegments: ["
|
|
2613
|
-
command: "
|
|
2614
|
-
body: {
|
|
4413
|
+
groupSegments: ["slack"],
|
|
4414
|
+
command: "permissions-list",
|
|
4415
|
+
body: { ...(options ?? {}) },
|
|
2615
4416
|
});
|
|
2616
4417
|
},
|
|
2617
|
-
/** Show
|
|
2618
|
-
|
|
4418
|
+
/** Show Slack channels and Ravi route/session ownership */
|
|
4419
|
+
topology: async (options) => {
|
|
2619
4420
|
return this.transport.call({
|
|
2620
|
-
groupSegments: ["
|
|
2621
|
-
command: "
|
|
2622
|
-
body: {
|
|
4421
|
+
groupSegments: ["slack"],
|
|
4422
|
+
command: "topology",
|
|
4423
|
+
body: { ...(options ?? {}) },
|
|
2623
4424
|
});
|
|
2624
|
-
}
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
/** Install Ravi catalog skills or skills from an explicit source */
|
|
2628
|
-
install: async (name, options) => {
|
|
4425
|
+
},
|
|
4426
|
+
/** Present Slack native Work Object flexpane details; dry-run unless --execute is set */
|
|
4427
|
+
workObjectsPresentDetails: async (triggerId, file, options) => {
|
|
2629
4428
|
return this.transport.call({
|
|
2630
|
-
groupSegments: ["
|
|
2631
|
-
command: "
|
|
2632
|
-
body: {
|
|
4429
|
+
groupSegments: ["slack"],
|
|
4430
|
+
command: "work-objects-present-details",
|
|
4431
|
+
body: { triggerId, file, ...(options ?? {}) },
|
|
2633
4432
|
});
|
|
2634
4433
|
},
|
|
2635
|
-
/**
|
|
2636
|
-
|
|
4434
|
+
/** Send Slack native Work Object metadata with chat.postMessage; dry-run unless --execute is set */
|
|
4435
|
+
workObjectsSend: async (channel, file, options) => {
|
|
2637
4436
|
return this.transport.call({
|
|
2638
|
-
groupSegments: ["
|
|
2639
|
-
command: "
|
|
2640
|
-
body: { ...(options ?? {}) },
|
|
4437
|
+
groupSegments: ["slack"],
|
|
4438
|
+
command: "work-objects-send",
|
|
4439
|
+
body: { channel, file, ...(options ?? {}) },
|
|
2641
4440
|
});
|
|
2642
4441
|
},
|
|
2643
|
-
/**
|
|
2644
|
-
|
|
4442
|
+
/** Attach Slack native Work Object metadata with chat.unfurl; dry-run unless --execute is set */
|
|
4443
|
+
workObjectsUnfurl: async (channel, ts, url, file, options) => {
|
|
2645
4444
|
return this.transport.call({
|
|
2646
|
-
groupSegments: ["
|
|
2647
|
-
command: "
|
|
2648
|
-
body: {
|
|
4445
|
+
groupSegments: ["slack"],
|
|
4446
|
+
command: "work-objects-unfurl",
|
|
4447
|
+
body: { channel, ts, url, file, ...(options ?? {}) },
|
|
2649
4448
|
});
|
|
2650
4449
|
},
|
|
2651
|
-
/**
|
|
2652
|
-
|
|
4450
|
+
/** Validate Slack native Work Object metadata JSON */
|
|
4451
|
+
workObjectsValidate: async (file, options) => {
|
|
2653
4452
|
return this.transport.call({
|
|
2654
|
-
groupSegments: ["
|
|
2655
|
-
command: "
|
|
2656
|
-
body: {},
|
|
4453
|
+
groupSegments: ["slack"],
|
|
4454
|
+
command: "work-objects-validate",
|
|
4455
|
+
body: { file, ...(options ?? {}) },
|
|
2657
4456
|
});
|
|
2658
4457
|
}
|
|
2659
4458
|
};
|
|
@@ -2733,6 +4532,48 @@ export class RaviClient {
|
|
|
2733
4532
|
});
|
|
2734
4533
|
}
|
|
2735
4534
|
};
|
|
4535
|
+
sync = {
|
|
4536
|
+
/** Inspect a sync outbox/inbox row by id */
|
|
4537
|
+
inspect: async (id) => {
|
|
4538
|
+
return this.transport.call({
|
|
4539
|
+
groupSegments: ["sync"],
|
|
4540
|
+
command: "inspect",
|
|
4541
|
+
body: { id },
|
|
4542
|
+
});
|
|
4543
|
+
},
|
|
4544
|
+
/** Download a bounded remote event batch from Console */
|
|
4545
|
+
pull: async (options) => {
|
|
4546
|
+
return this.transport.call({
|
|
4547
|
+
groupSegments: ["sync"],
|
|
4548
|
+
command: "pull",
|
|
4549
|
+
body: { ...(options ?? {}) },
|
|
4550
|
+
});
|
|
4551
|
+
},
|
|
4552
|
+
/** Upload a bounded outbox batch to Console */
|
|
4553
|
+
push: async (options) => {
|
|
4554
|
+
return this.transport.call({
|
|
4555
|
+
groupSegments: ["sync"],
|
|
4556
|
+
command: "push",
|
|
4557
|
+
body: { ...(options ?? {}) },
|
|
4558
|
+
});
|
|
4559
|
+
},
|
|
4560
|
+
/** Move failed sync outbox rows back to pending */
|
|
4561
|
+
retry: async (options) => {
|
|
4562
|
+
return this.transport.call({
|
|
4563
|
+
groupSegments: ["sync"],
|
|
4564
|
+
command: "retry",
|
|
4565
|
+
body: { ...(options ?? {}) },
|
|
4566
|
+
});
|
|
4567
|
+
},
|
|
4568
|
+
/** Show local sync status */
|
|
4569
|
+
status: async () => {
|
|
4570
|
+
return this.transport.call({
|
|
4571
|
+
groupSegments: ["sync"],
|
|
4572
|
+
command: "status",
|
|
4573
|
+
body: {},
|
|
4574
|
+
});
|
|
4575
|
+
}
|
|
4576
|
+
};
|
|
2736
4577
|
tagRules = {
|
|
2737
4578
|
/** Evaluate a rule against a target asset */
|
|
2738
4579
|
evaluate: async (ruleId, options) => {
|
|
@@ -3124,6 +4965,14 @@ export class RaviClient {
|
|
|
3124
4965
|
}
|
|
3125
4966
|
};
|
|
3126
4967
|
tools = {
|
|
4968
|
+
/** Execute a tool handler (real execution with full authorization) */
|
|
4969
|
+
invoke: async (name, args) => {
|
|
4970
|
+
return this.transport.call({
|
|
4971
|
+
groupSegments: ["tools"],
|
|
4972
|
+
command: "invoke",
|
|
4973
|
+
body: { name, args },
|
|
4974
|
+
});
|
|
4975
|
+
},
|
|
3127
4976
|
/** List all available CLI tools */
|
|
3128
4977
|
list: async (options) => {
|
|
3129
4978
|
return this.transport.call({
|
|
@@ -3148,6 +4997,14 @@ export class RaviClient {
|
|
|
3148
4997
|
body: {},
|
|
3149
4998
|
});
|
|
3150
4999
|
},
|
|
5000
|
+
/** Search tools by intent, name, description, or metadata */
|
|
5001
|
+
search: async (query, options) => {
|
|
5002
|
+
return this.transport.call({
|
|
5003
|
+
groupSegments: ["tools"],
|
|
5004
|
+
command: "search",
|
|
5005
|
+
body: { query, ...(options ?? {}) },
|
|
5006
|
+
});
|
|
5007
|
+
},
|
|
3151
5008
|
/** Show details for a specific tool */
|
|
3152
5009
|
show: async (name) => {
|
|
3153
5010
|
return this.transport.call({
|
|
@@ -3156,7 +5013,7 @@ export class RaviClient {
|
|
|
3156
5013
|
body: { name },
|
|
3157
5014
|
});
|
|
3158
5015
|
},
|
|
3159
|
-
/**
|
|
5016
|
+
/** Dry-run plan for a tool (does not execute the handler) */
|
|
3160
5017
|
test: async (name, args) => {
|
|
3161
5018
|
return this.transport.call({
|
|
3162
5019
|
groupSegments: ["tools"],
|
|
@@ -3239,6 +5096,14 @@ export class RaviClient {
|
|
|
3239
5096
|
command: "test",
|
|
3240
5097
|
body: { id },
|
|
3241
5098
|
});
|
|
5099
|
+
},
|
|
5100
|
+
/** List trigger-ready NATS topics */
|
|
5101
|
+
topics: async () => {
|
|
5102
|
+
return this.transport.call({
|
|
5103
|
+
groupSegments: ["triggers"],
|
|
5104
|
+
command: "topics",
|
|
5105
|
+
body: {},
|
|
5106
|
+
});
|
|
3242
5107
|
}
|
|
3243
5108
|
};
|
|
3244
5109
|
video = {
|
|
@@ -3251,6 +5116,80 @@ export class RaviClient {
|
|
|
3251
5116
|
});
|
|
3252
5117
|
}
|
|
3253
5118
|
};
|
|
5119
|
+
watch = {
|
|
5120
|
+
/** List available watch connectors and event types */
|
|
5121
|
+
connectors: async (options) => {
|
|
5122
|
+
return this.transport.call({
|
|
5123
|
+
groupSegments: ["watch"],
|
|
5124
|
+
command: "connectors",
|
|
5125
|
+
body: { ...(options ?? {}) },
|
|
5126
|
+
});
|
|
5127
|
+
},
|
|
5128
|
+
/** Create a watch */
|
|
5129
|
+
create: async (provider, resource, options) => {
|
|
5130
|
+
return this.transport.call({
|
|
5131
|
+
groupSegments: ["watch"],
|
|
5132
|
+
command: "create",
|
|
5133
|
+
body: { provider, resource, ...(options ?? {}) },
|
|
5134
|
+
});
|
|
5135
|
+
},
|
|
5136
|
+
/** Disable a watch */
|
|
5137
|
+
disable: async (id) => {
|
|
5138
|
+
return this.transport.call({
|
|
5139
|
+
groupSegments: ["watch"],
|
|
5140
|
+
command: "disable",
|
|
5141
|
+
body: { id },
|
|
5142
|
+
});
|
|
5143
|
+
},
|
|
5144
|
+
/** Enable a watch */
|
|
5145
|
+
enable: async (id) => {
|
|
5146
|
+
return this.transport.call({
|
|
5147
|
+
groupSegments: ["watch"],
|
|
5148
|
+
command: "enable",
|
|
5149
|
+
body: { id },
|
|
5150
|
+
});
|
|
5151
|
+
},
|
|
5152
|
+
/** Show trigger-ready event subjects for a watch */
|
|
5153
|
+
events: async (id) => {
|
|
5154
|
+
return this.transport.call({
|
|
5155
|
+
groupSegments: ["watch"],
|
|
5156
|
+
command: "events",
|
|
5157
|
+
body: { id },
|
|
5158
|
+
});
|
|
5159
|
+
},
|
|
5160
|
+
/** List watches */
|
|
5161
|
+
list: async (options) => {
|
|
5162
|
+
return this.transport.call({
|
|
5163
|
+
groupSegments: ["watch"],
|
|
5164
|
+
command: "list",
|
|
5165
|
+
body: { ...(options ?? {}) },
|
|
5166
|
+
});
|
|
5167
|
+
},
|
|
5168
|
+
/** Remove a watch */
|
|
5169
|
+
rm: async (id) => {
|
|
5170
|
+
return this.transport.call({
|
|
5171
|
+
groupSegments: ["watch"],
|
|
5172
|
+
command: "rm",
|
|
5173
|
+
body: { id },
|
|
5174
|
+
});
|
|
5175
|
+
},
|
|
5176
|
+
/** Show watch details */
|
|
5177
|
+
show: async (id) => {
|
|
5178
|
+
return this.transport.call({
|
|
5179
|
+
groupSegments: ["watch"],
|
|
5180
|
+
command: "show",
|
|
5181
|
+
body: { id },
|
|
5182
|
+
});
|
|
5183
|
+
},
|
|
5184
|
+
/** Create a trigger for a watch event in the current chat */
|
|
5185
|
+
trigger: async (id, options) => {
|
|
5186
|
+
return this.transport.call({
|
|
5187
|
+
groupSegments: ["watch"],
|
|
5188
|
+
command: "trigger",
|
|
5189
|
+
body: { id, ...(options ?? {}) },
|
|
5190
|
+
});
|
|
5191
|
+
}
|
|
5192
|
+
};
|
|
3254
5193
|
whatsapp = {
|
|
3255
5194
|
dm: {
|
|
3256
5195
|
/** Send read receipt (blue ticks) for a specific message */
|
|
@@ -3383,6 +5322,14 @@ export class RaviClient {
|
|
|
3383
5322
|
body: { groupId, ...(options ?? {}) },
|
|
3384
5323
|
});
|
|
3385
5324
|
},
|
|
5325
|
+
/** Send a message to a WhatsApp group */
|
|
5326
|
+
send: async (groupId, message, options) => {
|
|
5327
|
+
return this.transport.call({
|
|
5328
|
+
groupSegments: ["whatsapp", "group"],
|
|
5329
|
+
command: "send",
|
|
5330
|
+
body: { groupId, message, ...(options ?? {}) },
|
|
5331
|
+
});
|
|
5332
|
+
},
|
|
3386
5333
|
/** Update group settings (announcement, not_announcement, locked, unlocked) */
|
|
3387
5334
|
settings: async (groupId, setting, options) => {
|
|
3388
5335
|
return this.transport.call({
|
|
@@ -3393,6 +5340,40 @@ export class RaviClient {
|
|
|
3393
5340
|
}
|
|
3394
5341
|
}
|
|
3395
5342
|
};
|
|
5343
|
+
workObjects = {
|
|
5344
|
+
/** Execute one Work Object action */
|
|
5345
|
+
action: async (type, id, actionId, options) => {
|
|
5346
|
+
return this.transport.call({
|
|
5347
|
+
groupSegments: ["work-objects"],
|
|
5348
|
+
command: "action",
|
|
5349
|
+
body: { type, id, actionId, ...(options ?? {}) },
|
|
5350
|
+
});
|
|
5351
|
+
},
|
|
5352
|
+
/** Resolve a Work Object by URL or external reference */
|
|
5353
|
+
resolve: async (target, options) => {
|
|
5354
|
+
return this.transport.call({
|
|
5355
|
+
groupSegments: ["work-objects"],
|
|
5356
|
+
command: "resolve",
|
|
5357
|
+
body: { target, ...(options ?? {}) },
|
|
5358
|
+
});
|
|
5359
|
+
},
|
|
5360
|
+
/** Suggest selectable options for a Work Object field */
|
|
5361
|
+
suggest: async (type, id, fieldId, options) => {
|
|
5362
|
+
return this.transport.call({
|
|
5363
|
+
groupSegments: ["work-objects"],
|
|
5364
|
+
command: "suggest",
|
|
5365
|
+
body: { type, id, fieldId, ...(options ?? {}) },
|
|
5366
|
+
});
|
|
5367
|
+
},
|
|
5368
|
+
/** Apply a structured patch to a Work Object */
|
|
5369
|
+
update: async (type, id, options) => {
|
|
5370
|
+
return this.transport.call({
|
|
5371
|
+
groupSegments: ["work-objects"],
|
|
5372
|
+
command: "update",
|
|
5373
|
+
body: { type, id, ...(options ?? {}) },
|
|
5374
|
+
});
|
|
5375
|
+
}
|
|
5376
|
+
};
|
|
3396
5377
|
workflows = {
|
|
3397
5378
|
runs: {
|
|
3398
5379
|
/** Archive one node run from workflow aggregate state */
|
|
@@ -3495,5 +5476,231 @@ export class RaviClient {
|
|
|
3495
5476
|
}
|
|
3496
5477
|
}
|
|
3497
5478
|
};
|
|
5479
|
+
yt = {
|
|
5480
|
+
/** Break down recent views and watch time by country */
|
|
5481
|
+
analyticsCountries: async (options) => {
|
|
5482
|
+
return this.transport.call({
|
|
5483
|
+
groupSegments: ["yt"],
|
|
5484
|
+
command: "analytics-countries",
|
|
5485
|
+
body: { ...(options ?? {}) },
|
|
5486
|
+
});
|
|
5487
|
+
},
|
|
5488
|
+
/** Break down viewer percentage by age group and gender */
|
|
5489
|
+
analyticsDemographics: async (options) => {
|
|
5490
|
+
return this.transport.call({
|
|
5491
|
+
groupSegments: ["yt"],
|
|
5492
|
+
command: "analytics-demographics",
|
|
5493
|
+
body: { ...(options ?? {}) },
|
|
5494
|
+
});
|
|
5495
|
+
},
|
|
5496
|
+
/** Break down recent views and watch time by device type */
|
|
5497
|
+
analyticsDevices: async (options) => {
|
|
5498
|
+
return this.transport.call({
|
|
5499
|
+
groupSegments: ["yt"],
|
|
5500
|
+
command: "analytics-devices",
|
|
5501
|
+
body: { ...(options ?? {}) },
|
|
5502
|
+
});
|
|
5503
|
+
},
|
|
5504
|
+
/** Return aggregate channel engagement metrics for a recent period */
|
|
5505
|
+
analyticsOverview: async (options) => {
|
|
5506
|
+
return this.transport.call({
|
|
5507
|
+
groupSegments: ["yt"],
|
|
5508
|
+
command: "analytics-overview",
|
|
5509
|
+
body: { ...(options ?? {}) },
|
|
5510
|
+
});
|
|
5511
|
+
},
|
|
5512
|
+
/** Return a daily time series for one approved YouTube Analytics metric */
|
|
5513
|
+
analyticsSeries: async (options) => {
|
|
5514
|
+
return this.transport.call({
|
|
5515
|
+
groupSegments: ["yt"],
|
|
5516
|
+
command: "analytics-series",
|
|
5517
|
+
body: { ...(options ?? {}) },
|
|
5518
|
+
});
|
|
5519
|
+
},
|
|
5520
|
+
/** Rank channel videos by views for a recent period */
|
|
5521
|
+
analyticsTop: async (options) => {
|
|
5522
|
+
return this.transport.call({
|
|
5523
|
+
groupSegments: ["yt"],
|
|
5524
|
+
command: "analytics-top",
|
|
5525
|
+
body: { ...(options ?? {}) },
|
|
5526
|
+
});
|
|
5527
|
+
},
|
|
5528
|
+
/** Break down recent views and watch time by traffic-source type */
|
|
5529
|
+
analyticsTraffic: async (options) => {
|
|
5530
|
+
return this.transport.call({
|
|
5531
|
+
groupSegments: ["yt"],
|
|
5532
|
+
command: "analytics-traffic",
|
|
5533
|
+
body: { ...(options ?? {}) },
|
|
5534
|
+
});
|
|
5535
|
+
},
|
|
5536
|
+
/** Download one caption track as text */
|
|
5537
|
+
captionDownload: async (captionId, options) => {
|
|
5538
|
+
return this.transport.call({
|
|
5539
|
+
groupSegments: ["yt"],
|
|
5540
|
+
command: "caption-download",
|
|
5541
|
+
body: { captionId, ...(options ?? {}) },
|
|
5542
|
+
});
|
|
5543
|
+
},
|
|
5544
|
+
/** List caption tracks for one video */
|
|
5545
|
+
captions: async (videoId, options) => {
|
|
5546
|
+
return this.transport.call({
|
|
5547
|
+
groupSegments: ["yt"],
|
|
5548
|
+
command: "captions",
|
|
5549
|
+
body: { videoId, ...(options ?? {}) },
|
|
5550
|
+
});
|
|
5551
|
+
},
|
|
5552
|
+
/** List top-level comment threads for a video */
|
|
5553
|
+
comments: async (videoId, options) => {
|
|
5554
|
+
return this.transport.call({
|
|
5555
|
+
groupSegments: ["yt"],
|
|
5556
|
+
command: "comments",
|
|
5557
|
+
body: { videoId, ...(options ?? {}) },
|
|
5558
|
+
});
|
|
5559
|
+
},
|
|
5560
|
+
/** Inspect YouTube credential metadata without resolving a secret or calling Google */
|
|
5561
|
+
health: async (options) => {
|
|
5562
|
+
return this.transport.call({
|
|
5563
|
+
groupSegments: ["yt"],
|
|
5564
|
+
command: "health",
|
|
5565
|
+
body: { ...(options ?? {}) },
|
|
5566
|
+
});
|
|
5567
|
+
},
|
|
5568
|
+
/** Return metadata and lifetime counters for the authenticated channel */
|
|
5569
|
+
info: async (options) => {
|
|
5570
|
+
return this.transport.call({
|
|
5571
|
+
groupSegments: ["yt"],
|
|
5572
|
+
command: "info",
|
|
5573
|
+
body: { ...(options ?? {}) },
|
|
5574
|
+
});
|
|
5575
|
+
},
|
|
5576
|
+
/** List videos and playlist-item IDs from one playlist */
|
|
5577
|
+
playlist: async (playlistId, options) => {
|
|
5578
|
+
return this.transport.call({
|
|
5579
|
+
groupSegments: ["yt"],
|
|
5580
|
+
command: "playlist",
|
|
5581
|
+
body: { playlistId, ...(options ?? {}) },
|
|
5582
|
+
});
|
|
5583
|
+
},
|
|
5584
|
+
/** Add one video to a YouTube playlist */
|
|
5585
|
+
playlistAdd: async (playlistId, videoId, options) => {
|
|
5586
|
+
return this.transport.call({
|
|
5587
|
+
groupSegments: ["yt"],
|
|
5588
|
+
command: "playlist-add",
|
|
5589
|
+
body: { playlistId, videoId, ...(options ?? {}) },
|
|
5590
|
+
});
|
|
5591
|
+
},
|
|
5592
|
+
/** Create a YouTube playlist */
|
|
5593
|
+
playlistCreate: async (title, options) => {
|
|
5594
|
+
return this.transport.call({
|
|
5595
|
+
groupSegments: ["yt"],
|
|
5596
|
+
command: "playlist-create",
|
|
5597
|
+
body: { title, ...(options ?? {}) },
|
|
5598
|
+
});
|
|
5599
|
+
},
|
|
5600
|
+
/** Permanently delete a YouTube playlist without deleting its videos */
|
|
5601
|
+
playlistDelete: async (playlistId, options) => {
|
|
5602
|
+
return this.transport.call({
|
|
5603
|
+
groupSegments: ["yt"],
|
|
5604
|
+
command: "playlist-delete",
|
|
5605
|
+
body: { playlistId, ...(options ?? {}) },
|
|
5606
|
+
});
|
|
5607
|
+
},
|
|
5608
|
+
/** Remove one playlist item without deleting the video */
|
|
5609
|
+
playlistRemove: async (playlistItemId, options) => {
|
|
5610
|
+
return this.transport.call({
|
|
5611
|
+
groupSegments: ["yt"],
|
|
5612
|
+
command: "playlist-remove",
|
|
5613
|
+
body: { playlistItemId, ...(options ?? {}) },
|
|
5614
|
+
});
|
|
5615
|
+
},
|
|
5616
|
+
/** List playlists owned by the authenticated channel */
|
|
5617
|
+
playlists: async (options) => {
|
|
5618
|
+
return this.transport.call({
|
|
5619
|
+
groupSegments: ["yt"],
|
|
5620
|
+
command: "playlists",
|
|
5621
|
+
body: { ...(options ?? {}) },
|
|
5622
|
+
});
|
|
5623
|
+
},
|
|
5624
|
+
/** Publish a reply to a top-level YouTube comment */
|
|
5625
|
+
reply: async (commentId, text, options) => {
|
|
5626
|
+
return this.transport.call({
|
|
5627
|
+
groupSegments: ["yt"],
|
|
5628
|
+
command: "reply",
|
|
5629
|
+
body: { commentId, text, ...(options ?? {}) },
|
|
5630
|
+
});
|
|
5631
|
+
},
|
|
5632
|
+
/** Search videos in the authenticated channel */
|
|
5633
|
+
search: async (query, options) => {
|
|
5634
|
+
return this.transport.call({
|
|
5635
|
+
groupSegments: ["yt"],
|
|
5636
|
+
command: "search",
|
|
5637
|
+
body: { query, ...(options ?? {}) },
|
|
5638
|
+
});
|
|
5639
|
+
},
|
|
5640
|
+
/** Calculate lifetime video counters, age and average views per day */
|
|
5641
|
+
stats: async (id, options) => {
|
|
5642
|
+
return this.transport.call({
|
|
5643
|
+
groupSegments: ["yt"],
|
|
5644
|
+
command: "stats",
|
|
5645
|
+
body: { id, ...(options ?? {}) },
|
|
5646
|
+
});
|
|
5647
|
+
},
|
|
5648
|
+
/** List channels followed by the authenticated channel */
|
|
5649
|
+
subscriptions: async (options) => {
|
|
5650
|
+
return this.transport.call({
|
|
5651
|
+
groupSegments: ["yt"],
|
|
5652
|
+
command: "subscriptions",
|
|
5653
|
+
body: { ...(options ?? {}) },
|
|
5654
|
+
});
|
|
5655
|
+
},
|
|
5656
|
+
/** List recent comment threads with zero replies */
|
|
5657
|
+
unanswered: async (videoId, options) => {
|
|
5658
|
+
return this.transport.call({
|
|
5659
|
+
groupSegments: ["yt"],
|
|
5660
|
+
command: "unanswered",
|
|
5661
|
+
body: { videoId, ...(options ?? {}) },
|
|
5662
|
+
});
|
|
5663
|
+
},
|
|
5664
|
+
/** Get one video by YouTube video ID */
|
|
5665
|
+
video: async (id, options) => {
|
|
5666
|
+
return this.transport.call({
|
|
5667
|
+
groupSegments: ["yt"],
|
|
5668
|
+
command: "video",
|
|
5669
|
+
body: { id, ...(options ?? {}) },
|
|
5670
|
+
});
|
|
5671
|
+
},
|
|
5672
|
+
/** List assignable YouTube video categories for a region */
|
|
5673
|
+
videoCategories: async (options) => {
|
|
5674
|
+
return this.transport.call({
|
|
5675
|
+
groupSegments: ["yt"],
|
|
5676
|
+
command: "video-categories",
|
|
5677
|
+
body: { ...(options ?? {}) },
|
|
5678
|
+
});
|
|
5679
|
+
},
|
|
5680
|
+
/** Permanently delete an owned YouTube video */
|
|
5681
|
+
videoDelete: async (id, options) => {
|
|
5682
|
+
return this.transport.call({
|
|
5683
|
+
groupSegments: ["yt"],
|
|
5684
|
+
command: "video-delete",
|
|
5685
|
+
body: { id, ...(options ?? {}) },
|
|
5686
|
+
});
|
|
5687
|
+
},
|
|
5688
|
+
/** Update selected metadata on an owned YouTube video */
|
|
5689
|
+
videoUpdate: async (id, options) => {
|
|
5690
|
+
return this.transport.call({
|
|
5691
|
+
groupSegments: ["yt"],
|
|
5692
|
+
command: "video-update",
|
|
5693
|
+
body: { id, ...(options ?? {}) },
|
|
5694
|
+
});
|
|
5695
|
+
},
|
|
5696
|
+
/** List videos from the authenticated channel uploads playlist */
|
|
5697
|
+
videos: async (options) => {
|
|
5698
|
+
return this.transport.call({
|
|
5699
|
+
groupSegments: ["yt"],
|
|
5700
|
+
command: "videos",
|
|
5701
|
+
body: { ...(options ?? {}) },
|
|
5702
|
+
});
|
|
5703
|
+
}
|
|
5704
|
+
};
|
|
3498
5705
|
}
|
|
3499
5706
|
//# sourceMappingURL=client.js.map
|