@ravi-os/sdk 0.260724.1 → 0.260725.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 +53 -0
- package/dist/channel-backend.d.ts +246 -0
- package/dist/channel-backend.d.ts.map +1 -0
- package/dist/channel-backend.js +193 -0
- package/dist/channel-backend.js.map +1 -0
- package/dist/channel-runtime-events.d.ts +801 -0
- package/dist/channel-runtime-events.d.ts.map +1 -0
- package/dist/channel-runtime-events.js +184 -0
- package/dist/channel-runtime-events.js.map +1 -0
- package/dist/client.d.ts +69 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +46 -0
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/local-agent-reconciliation.d.ts +172 -0
- package/dist/local-agent-reconciliation.d.ts.map +1 -0
- package/dist/local-agent-reconciliation.js +597 -0
- package/dist/local-agent-reconciliation.js.map +1 -0
- package/dist/native-channel-driver.d.ts +199 -0
- package/dist/native-channel-driver.d.ts.map +1 -0
- package/dist/native-channel-driver.js +55 -0
- package/dist/native-channel-driver.js.map +1 -0
- package/dist/schemas.d.ts +910 -39
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +1111 -5
- package/dist/schemas.js.map +1 -1
- package/dist/types.d.ts +218 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +17 -1
package/dist/types.d.ts
CHANGED
|
@@ -2253,6 +2253,129 @@ export type CalendarsShowReturn = {
|
|
|
2253
2253
|
updatedAt: number;
|
|
2254
2254
|
}>;
|
|
2255
2255
|
};
|
|
2256
|
+
/** Input shape for `channels.backend.ingress`. */
|
|
2257
|
+
export type ChannelsBackendIngressInput = {
|
|
2258
|
+
agentId: string;
|
|
2259
|
+
request: {
|
|
2260
|
+
agentId: string;
|
|
2261
|
+
channelInstanceId: string;
|
|
2262
|
+
content: Array<({
|
|
2263
|
+
text: string;
|
|
2264
|
+
type: "text";
|
|
2265
|
+
}) | ({
|
|
2266
|
+
artifactId: string;
|
|
2267
|
+
mediaType?: string;
|
|
2268
|
+
name?: string;
|
|
2269
|
+
sizeBytes?: number;
|
|
2270
|
+
type: "artifact";
|
|
2271
|
+
})>;
|
|
2272
|
+
external: {
|
|
2273
|
+
channelKind: string;
|
|
2274
|
+
connectionId: string;
|
|
2275
|
+
conversationId: string;
|
|
2276
|
+
messageId: string;
|
|
2277
|
+
senderId: string;
|
|
2278
|
+
};
|
|
2279
|
+
idempotencyKey: string;
|
|
2280
|
+
localActorId: string;
|
|
2281
|
+
protocol: "ravi.channel.backend";
|
|
2282
|
+
receivedAt: string;
|
|
2283
|
+
requestId: string;
|
|
2284
|
+
schemaVersion: 1;
|
|
2285
|
+
};
|
|
2286
|
+
};
|
|
2287
|
+
/** Return shape for `channels.backend.ingress`. */
|
|
2288
|
+
export type ChannelsBackendIngressReturn = {
|
|
2289
|
+
acceptedAt: string;
|
|
2290
|
+
binding?: {
|
|
2291
|
+
agentId: string;
|
|
2292
|
+
channelInstanceId: string;
|
|
2293
|
+
chatId: string;
|
|
2294
|
+
messageId: string;
|
|
2295
|
+
sessionId: string;
|
|
2296
|
+
turnId: string;
|
|
2297
|
+
};
|
|
2298
|
+
disposition: "accepted" | "duplicate" | "rejected";
|
|
2299
|
+
error?: {
|
|
2300
|
+
category: "validation" | "authentication" | "authorization" | "capacity" | "availability" | "internal";
|
|
2301
|
+
code: "INVALID_REQUEST" | "IDEMPOTENCY_CONFLICT" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "LOCAL_PERMISSION_DENIED" | "NOT_FOUND" | "RATE_LIMITED" | "OVERLOADED" | "UNAVAILABLE" | "INTERNAL";
|
|
2302
|
+
correlationId?: string;
|
|
2303
|
+
retryAfterMs?: number;
|
|
2304
|
+
retryable: boolean;
|
|
2305
|
+
};
|
|
2306
|
+
protocol: "ravi.channel.backend";
|
|
2307
|
+
requestId: string;
|
|
2308
|
+
schemaVersion: 1;
|
|
2309
|
+
};
|
|
2310
|
+
/** Input shape for `channels.backend.runtime.interrupt`. */
|
|
2311
|
+
export type ChannelsBackendRuntimeInterruptInput = {
|
|
2312
|
+
agentId: string;
|
|
2313
|
+
request: {
|
|
2314
|
+
binding: {
|
|
2315
|
+
agentId: string;
|
|
2316
|
+
channelInstanceId: string;
|
|
2317
|
+
chatId: string;
|
|
2318
|
+
messageId: string;
|
|
2319
|
+
sessionId: string;
|
|
2320
|
+
turnId: string;
|
|
2321
|
+
};
|
|
2322
|
+
idempotencyKey: string;
|
|
2323
|
+
protocol: "ravi.channel.runtime-events";
|
|
2324
|
+
requestId: string;
|
|
2325
|
+
requestedAt: string;
|
|
2326
|
+
schemaVersion: 1;
|
|
2327
|
+
};
|
|
2328
|
+
};
|
|
2329
|
+
/** Return shape for `channels.backend.runtime.interrupt`. */
|
|
2330
|
+
export type ChannelsBackendRuntimeInterruptReturn = {
|
|
2331
|
+
acceptedAt: string;
|
|
2332
|
+
disposition: "requested" | "duplicate" | "rejected";
|
|
2333
|
+
error?: {
|
|
2334
|
+
category: "validation" | "authentication" | "authorization" | "capacity" | "availability" | "internal";
|
|
2335
|
+
code: "INVALID_REQUEST" | "IDEMPOTENCY_CONFLICT" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "LOCAL_PERMISSION_DENIED" | "NOT_FOUND" | "RATE_LIMITED" | "OVERLOADED" | "UNAVAILABLE" | "INTERNAL";
|
|
2336
|
+
correlationId?: string;
|
|
2337
|
+
retryAfterMs?: number;
|
|
2338
|
+
retryable: boolean;
|
|
2339
|
+
};
|
|
2340
|
+
protocol: "ravi.channel.runtime-events";
|
|
2341
|
+
requestId: string;
|
|
2342
|
+
schemaVersion: 1;
|
|
2343
|
+
};
|
|
2344
|
+
/** Input shape for `channels.backend.runtime.readback`. */
|
|
2345
|
+
export type ChannelsBackendRuntimeReadbackInput = {
|
|
2346
|
+
agentId: string;
|
|
2347
|
+
request: {
|
|
2348
|
+
binding: {
|
|
2349
|
+
agentId: string;
|
|
2350
|
+
channelInstanceId: string;
|
|
2351
|
+
chatId: string;
|
|
2352
|
+
messageId: string;
|
|
2353
|
+
sessionId: string;
|
|
2354
|
+
turnId: string;
|
|
2355
|
+
};
|
|
2356
|
+
protocol: "ravi.channel.runtime-events";
|
|
2357
|
+
requestId: string;
|
|
2358
|
+
schemaVersion: 1;
|
|
2359
|
+
};
|
|
2360
|
+
};
|
|
2361
|
+
/** Return shape for `channels.backend.runtime.readback`. */
|
|
2362
|
+
export type ChannelsBackendRuntimeReadbackReturn = {
|
|
2363
|
+
assistantMessageId?: string;
|
|
2364
|
+
binding: {
|
|
2365
|
+
agentId: string;
|
|
2366
|
+
channelInstanceId: string;
|
|
2367
|
+
chatId: string;
|
|
2368
|
+
messageId: string;
|
|
2369
|
+
sessionId: string;
|
|
2370
|
+
turnId: string;
|
|
2371
|
+
};
|
|
2372
|
+
lastSequence: number;
|
|
2373
|
+
observedAt: string;
|
|
2374
|
+
protocol: "ravi.channel.runtime-events";
|
|
2375
|
+
requestId: string;
|
|
2376
|
+
schemaVersion: 1;
|
|
2377
|
+
state: "accepted" | "running" | "waiting_approval" | "completed" | "failed" | "interrupted";
|
|
2378
|
+
};
|
|
2256
2379
|
/** Input shape for `channels.create`. */
|
|
2257
2380
|
export type ChannelsCreateInput = {
|
|
2258
2381
|
credentialConnection?: string;
|
|
@@ -2712,6 +2835,35 @@ export type ChatsBackfillProviderTimestampsInput = {
|
|
|
2712
2835
|
};
|
|
2713
2836
|
/** Return shape for `chats.backfill-provider-timestamps`. */
|
|
2714
2837
|
export type ChatsBackfillProviderTimestampsReturn = Record<string, unknown>;
|
|
2838
|
+
/** Input shape for `chats.ensure`. */
|
|
2839
|
+
export type ChatsEnsureInput = {
|
|
2840
|
+
actorId: string;
|
|
2841
|
+
agentId: string;
|
|
2842
|
+
clientRequestId: string;
|
|
2843
|
+
};
|
|
2844
|
+
/** Return shape for `chats.ensure`. */
|
|
2845
|
+
export type ChatsEnsureReturn = {
|
|
2846
|
+
chat: {
|
|
2847
|
+
actorId: string;
|
|
2848
|
+
agentId: string;
|
|
2849
|
+
avatarUrl?: string;
|
|
2850
|
+
channel: string;
|
|
2851
|
+
chatType: "dm" | "group" | "room" | "thread" | "channel" | "unknown";
|
|
2852
|
+
createdAt: number;
|
|
2853
|
+
firstSeenAt: number;
|
|
2854
|
+
id: string;
|
|
2855
|
+
instanceId: string;
|
|
2856
|
+
lastSeenAt: number;
|
|
2857
|
+
metadata?: Record<string, unknown>;
|
|
2858
|
+
normalizedChatId?: string;
|
|
2859
|
+
platformChatId?: string;
|
|
2860
|
+
rawProvenance?: Record<string, unknown>;
|
|
2861
|
+
title?: string;
|
|
2862
|
+
updatedAt: number;
|
|
2863
|
+
};
|
|
2864
|
+
clientRequestId: string;
|
|
2865
|
+
disposition: "created" | "existing";
|
|
2866
|
+
};
|
|
2715
2867
|
/** Input shape for `chats.list`. */
|
|
2716
2868
|
export type ChatsListInput = {
|
|
2717
2869
|
agent?: string;
|
|
@@ -2728,6 +2880,8 @@ export type ChatsListInput = {
|
|
|
2728
2880
|
export type ChatsListReturn = {
|
|
2729
2881
|
chats: Array<{
|
|
2730
2882
|
chat: {
|
|
2883
|
+
actorId?: string;
|
|
2884
|
+
agentId?: string;
|
|
2731
2885
|
avatarUrl?: string;
|
|
2732
2886
|
channel: string;
|
|
2733
2887
|
chatType: "dm" | "group" | "room" | "thread" | "channel" | "unknown";
|
|
@@ -2744,10 +2898,12 @@ export type ChatsListReturn = {
|
|
|
2744
2898
|
updatedAt: number;
|
|
2745
2899
|
};
|
|
2746
2900
|
lastMessage: ({
|
|
2901
|
+
actorId?: string;
|
|
2747
2902
|
actorType: string;
|
|
2748
2903
|
agentId?: string;
|
|
2749
2904
|
channel?: string;
|
|
2750
2905
|
chatId: string;
|
|
2906
|
+
clientMessageId?: string;
|
|
2751
2907
|
contactId?: string;
|
|
2752
2908
|
content?: Record<string, unknown>;
|
|
2753
2909
|
createdAt: number;
|
|
@@ -2762,7 +2918,9 @@ export type ChatsListReturn = {
|
|
|
2762
2918
|
rawChatId?: string;
|
|
2763
2919
|
rawProvenance?: Record<string, unknown>;
|
|
2764
2920
|
rawSenderId?: string;
|
|
2921
|
+
revision?: number;
|
|
2765
2922
|
sortKey: string;
|
|
2923
|
+
state?: string;
|
|
2766
2924
|
updatedAt: number;
|
|
2767
2925
|
}) | null;
|
|
2768
2926
|
messageCount: number;
|
|
@@ -2770,6 +2928,8 @@ export type ChatsListReturn = {
|
|
|
2770
2928
|
}>;
|
|
2771
2929
|
items: Array<{
|
|
2772
2930
|
chat: {
|
|
2931
|
+
actorId?: string;
|
|
2932
|
+
agentId?: string;
|
|
2773
2933
|
avatarUrl?: string;
|
|
2774
2934
|
channel: string;
|
|
2775
2935
|
chatType: "dm" | "group" | "room" | "thread" | "channel" | "unknown";
|
|
@@ -2786,10 +2946,12 @@ export type ChatsListReturn = {
|
|
|
2786
2946
|
updatedAt: number;
|
|
2787
2947
|
};
|
|
2788
2948
|
lastMessage: ({
|
|
2949
|
+
actorId?: string;
|
|
2789
2950
|
actorType: string;
|
|
2790
2951
|
agentId?: string;
|
|
2791
2952
|
channel?: string;
|
|
2792
2953
|
chatId: string;
|
|
2954
|
+
clientMessageId?: string;
|
|
2793
2955
|
contactId?: string;
|
|
2794
2956
|
content?: Record<string, unknown>;
|
|
2795
2957
|
createdAt: number;
|
|
@@ -2804,7 +2966,9 @@ export type ChatsListReturn = {
|
|
|
2804
2966
|
rawChatId?: string;
|
|
2805
2967
|
rawProvenance?: Record<string, unknown>;
|
|
2806
2968
|
rawSenderId?: string;
|
|
2969
|
+
revision?: number;
|
|
2807
2970
|
sortKey: string;
|
|
2971
|
+
state?: string;
|
|
2808
2972
|
updatedAt: number;
|
|
2809
2973
|
}) | null;
|
|
2810
2974
|
messageCount: number;
|
|
@@ -3051,6 +3215,45 @@ export type ChatsListsShowReturn = {
|
|
|
3051
3215
|
valid: boolean;
|
|
3052
3216
|
};
|
|
3053
3217
|
};
|
|
3218
|
+
/** Input shape for `chats.messages.create`. */
|
|
3219
|
+
export type ChatsMessagesCreateInput = {
|
|
3220
|
+
actorId: string;
|
|
3221
|
+
chatId: string;
|
|
3222
|
+
clientMessageId: string;
|
|
3223
|
+
content: string;
|
|
3224
|
+
};
|
|
3225
|
+
/** Return shape for `chats.messages.create`. */
|
|
3226
|
+
export type ChatsMessagesCreateReturn = {
|
|
3227
|
+
clientMessageId: string;
|
|
3228
|
+
disposition: "created" | "duplicate";
|
|
3229
|
+
message: {
|
|
3230
|
+
actorId: string;
|
|
3231
|
+
actorType: "actor";
|
|
3232
|
+
agentId?: string;
|
|
3233
|
+
channel?: string;
|
|
3234
|
+
chatId: string;
|
|
3235
|
+
clientMessageId: string;
|
|
3236
|
+
contactId?: string;
|
|
3237
|
+
content: Record<string, unknown>;
|
|
3238
|
+
createdAt: number;
|
|
3239
|
+
id: string;
|
|
3240
|
+
ingestedAt: number;
|
|
3241
|
+
instanceId?: string;
|
|
3242
|
+
messageType?: string;
|
|
3243
|
+
normalizedSenderId?: string;
|
|
3244
|
+
platformIdentityId?: string;
|
|
3245
|
+
providerMessageId?: string;
|
|
3246
|
+
providerTimestamp?: number;
|
|
3247
|
+
rawChatId?: string;
|
|
3248
|
+
rawProvenance?: Record<string, unknown>;
|
|
3249
|
+
rawSenderId?: string;
|
|
3250
|
+
revision: 1;
|
|
3251
|
+
sortKey: string;
|
|
3252
|
+
state: "created";
|
|
3253
|
+
updatedAt: number;
|
|
3254
|
+
};
|
|
3255
|
+
messageId: string;
|
|
3256
|
+
};
|
|
3054
3257
|
/** Input shape for `chats.read`. */
|
|
3055
3258
|
export type ChatsReadInput = {
|
|
3056
3259
|
channel?: string;
|
|
@@ -3065,6 +3268,8 @@ export type ChatsReadInput = {
|
|
|
3065
3268
|
/** Return shape for `chats.read`. */
|
|
3066
3269
|
export type ChatsReadReturn = {
|
|
3067
3270
|
chat: {
|
|
3271
|
+
actorId?: string;
|
|
3272
|
+
agentId?: string;
|
|
3068
3273
|
avatarUrl?: string;
|
|
3069
3274
|
channel: string;
|
|
3070
3275
|
chatType: "dm" | "group" | "room" | "thread" | "channel" | "unknown";
|
|
@@ -3081,10 +3286,12 @@ export type ChatsReadReturn = {
|
|
|
3081
3286
|
updatedAt: number;
|
|
3082
3287
|
};
|
|
3083
3288
|
messages: Array<{
|
|
3289
|
+
actorId?: string;
|
|
3084
3290
|
actorType: string;
|
|
3085
3291
|
agentId?: string;
|
|
3086
3292
|
channel?: string;
|
|
3087
3293
|
chatId: string;
|
|
3294
|
+
clientMessageId?: string;
|
|
3088
3295
|
contactId?: string;
|
|
3089
3296
|
content?: Record<string, unknown>;
|
|
3090
3297
|
createdAt: number;
|
|
@@ -3099,7 +3306,9 @@ export type ChatsReadReturn = {
|
|
|
3099
3306
|
rawChatId?: string;
|
|
3100
3307
|
rawProvenance?: Record<string, unknown>;
|
|
3101
3308
|
rawSenderId?: string;
|
|
3309
|
+
revision?: number;
|
|
3102
3310
|
sortKey: string;
|
|
3311
|
+
state?: string;
|
|
3103
3312
|
updatedAt: number;
|
|
3104
3313
|
}>;
|
|
3105
3314
|
pagination: {
|
|
@@ -9192,17 +9401,24 @@ export type ReactSendReturn = {
|
|
|
9192
9401
|
messageId: string;
|
|
9193
9402
|
[k: string]: unknown;
|
|
9194
9403
|
};
|
|
9404
|
+
executionMode: "durable" | "legacy";
|
|
9405
|
+
idempotencyKey?: string;
|
|
9406
|
+
nextAttemptAt?: number;
|
|
9407
|
+
publishPending?: boolean;
|
|
9408
|
+
publishedNow?: boolean;
|
|
9409
|
+
queued: boolean;
|
|
9195
9410
|
reaction: {
|
|
9196
9411
|
emoji: string;
|
|
9197
9412
|
messageId: string;
|
|
9198
9413
|
};
|
|
9199
|
-
|
|
9414
|
+
requestId?: string;
|
|
9415
|
+
status: "queued" | "accepted";
|
|
9200
9416
|
target: {
|
|
9201
9417
|
accountId: string;
|
|
9202
9418
|
channel: string;
|
|
9203
9419
|
chatId: string;
|
|
9204
9420
|
};
|
|
9205
|
-
topic:
|
|
9421
|
+
topic: string;
|
|
9206
9422
|
};
|
|
9207
9423
|
/** Input shape for `routes.explain`. */
|
|
9208
9424
|
export type RoutesExplainInput = {
|