@pushwoosh/rpc-gateway-ai-assistant 0.1.122 → 0.1.124
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/data.js +24 -0
- package/package.json +1 -1
- package/pushwoosh_accounts_assistant_v1.d.ts +34 -0
package/data.js
CHANGED
|
@@ -923,6 +923,9 @@ export const data = {
|
|
|
923
923
|
},
|
|
924
924
|
"url": {
|
|
925
925
|
"type": "string"
|
|
926
|
+
},
|
|
927
|
+
"primary": {
|
|
928
|
+
"type": "boolean"
|
|
926
929
|
}
|
|
927
930
|
}
|
|
928
931
|
},
|
|
@@ -944,6 +947,9 @@ export const data = {
|
|
|
944
947
|
},
|
|
945
948
|
"updatedAt": {
|
|
946
949
|
"type": "Date"
|
|
950
|
+
},
|
|
951
|
+
"isOnboarding": {
|
|
952
|
+
"type": "boolean"
|
|
947
953
|
}
|
|
948
954
|
}
|
|
949
955
|
},
|
|
@@ -955,6 +961,9 @@ export const data = {
|
|
|
955
961
|
},
|
|
956
962
|
"title": {
|
|
957
963
|
"type": "string"
|
|
964
|
+
},
|
|
965
|
+
"isOnboarding": {
|
|
966
|
+
"type": "boolean"
|
|
958
967
|
}
|
|
959
968
|
}
|
|
960
969
|
},
|
|
@@ -1245,6 +1254,14 @@ export const data = {
|
|
|
1245
1254
|
}
|
|
1246
1255
|
}
|
|
1247
1256
|
},
|
|
1257
|
+
"pushwoosh.accounts.assistant.v1.OnboardingIntroRequest": {
|
|
1258
|
+
"type": "I",
|
|
1259
|
+
"fields": {
|
|
1260
|
+
"chatId": {
|
|
1261
|
+
"type": "number"
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
},
|
|
1248
1265
|
"pushwoosh.accounts.assistant.v1.AssistantService": {
|
|
1249
1266
|
"type": "S",
|
|
1250
1267
|
"key": "assistant",
|
|
@@ -1336,6 +1353,13 @@ export const data = {
|
|
|
1336
1353
|
"response": "pushwoosh.accounts.assistant.v1.CheckUsageAllowedResponse",
|
|
1337
1354
|
"method": "get",
|
|
1338
1355
|
"path": "/api/v1/applications/{application}/usage-allowed"
|
|
1356
|
+
},
|
|
1357
|
+
"StreamOnboardingIntro": {
|
|
1358
|
+
"request": "pushwoosh.accounts.assistant.v1.OnboardingIntroRequest",
|
|
1359
|
+
"response": "pushwoosh.accounts.assistant.v1.InferenceResponse",
|
|
1360
|
+
"method": "post",
|
|
1361
|
+
"path": "/api/v1/chats/{chat_id}/onboarding/intro",
|
|
1362
|
+
"serverStreaming": true
|
|
1339
1363
|
}
|
|
1340
1364
|
}
|
|
1341
1365
|
}
|
package/package.json
CHANGED
|
@@ -22,12 +22,14 @@ export type Message = {
|
|
|
22
22
|
* Exactly one of prompt or url must be set:
|
|
23
23
|
* - prompt: literal user message dispatched when the button is clicked.
|
|
24
24
|
* - url: external link (e.g. documentation) opened when the button is clicked.
|
|
25
|
+
* primary marks the visually emphasised CTA — at most one per actions block.
|
|
25
26
|
*/
|
|
26
27
|
export type SuggestedAction = {
|
|
27
28
|
id: string;
|
|
28
29
|
label: string;
|
|
29
30
|
prompt: string;
|
|
30
31
|
url: string;
|
|
32
|
+
primary: boolean;
|
|
31
33
|
};
|
|
32
34
|
/** Chat represents a conversation with its metadata and messages */
|
|
33
35
|
export type Chat = {
|
|
@@ -36,11 +38,24 @@ export type Chat = {
|
|
|
36
38
|
messages: Message[];
|
|
37
39
|
createdAt: Date;
|
|
38
40
|
updatedAt: Date;
|
|
41
|
+
/**
|
|
42
|
+
* is_onboarding flags this chat as the account's onboarding chat.
|
|
43
|
+
* Frontend uses it to decide whether to call StreamOnboardingIntro on the
|
|
44
|
+
* first turn and may render the chat with onboarding-specific UI.
|
|
45
|
+
*/
|
|
46
|
+
isOnboarding: boolean;
|
|
39
47
|
};
|
|
40
48
|
/** CreateChatRequest for creating a new chat */
|
|
41
49
|
export type CreateChatRequest = {
|
|
42
50
|
application: string;
|
|
43
51
|
title: string;
|
|
52
|
+
/**
|
|
53
|
+
* is_onboarding requests the onboarding chat for the calling account.
|
|
54
|
+
* The server seeds the chat with the account's onboarding plan snapshot.
|
|
55
|
+
* At most one onboarding chat exists per account: if one already exists,
|
|
56
|
+
* the server returns it instead of creating a new chat.
|
|
57
|
+
*/
|
|
58
|
+
isOnboarding: boolean;
|
|
44
59
|
};
|
|
45
60
|
/** CreateChatResponse returns the created chat */
|
|
46
61
|
export type CreateChatResponse = {
|
|
@@ -171,6 +186,15 @@ export type CheckUsageAllowedResponse = {
|
|
|
171
186
|
allowed: boolean;
|
|
172
187
|
reason: string;
|
|
173
188
|
};
|
|
189
|
+
/**
|
|
190
|
+
* OnboardingIntroRequest triggers the onboarding chat's first turn —
|
|
191
|
+
* 3 assistant messages plus a set of suggested actions — generated from
|
|
192
|
+
* the account's onboarding plan. Must reference a chat created with
|
|
193
|
+
* is_onboarding=true that has no message history yet.
|
|
194
|
+
*/
|
|
195
|
+
export type OnboardingIntroRequest = {
|
|
196
|
+
chatId: number;
|
|
197
|
+
};
|
|
174
198
|
export type AssistantService_CreateChat = RpcMethod<CreateChatRequest, CreateChatResponse>;
|
|
175
199
|
export type AssistantService_GetChat = RpcMethod<GetChatRequest, GetChatResponse>;
|
|
176
200
|
export type AssistantService_GetAllChats = RpcMethod<GetAllChatsRequest, GetAllChatsResponse>;
|
|
@@ -211,4 +235,14 @@ export interface AssistantService {
|
|
|
211
235
|
GiveConsent: AssistantService_GiveConsent;
|
|
212
236
|
CompactifyContext: AssistantService_CompactifyContext;
|
|
213
237
|
CheckUsageAllowed: AssistantService_CheckUsageAllowed;
|
|
238
|
+
/**
|
|
239
|
+
* StreamOnboardingIntro generates the onboarding chat's first turn —
|
|
240
|
+
* 3 assistant messages and suggested actions — using the self-hosted
|
|
241
|
+
* Qwen model. Frontend must call this exactly once after CreateChat
|
|
242
|
+
* with is_onboarding=true on a chat that has no message history.
|
|
243
|
+
* Subsequent turns go through the regular StreamInference* RPCs.
|
|
244
|
+
*/
|
|
245
|
+
StreamOnboardingIntro(request: OnboardingIntroRequest, options?: {
|
|
246
|
+
signal?: AbortSignal;
|
|
247
|
+
}): Promise<AsyncIterable<InferenceResponse>>;
|
|
214
248
|
}
|