@pushwoosh/rpc-gateway-ai-assistant 0.1.125 → 0.1.126
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 +28 -0
- package/package.json +1 -1
- package/pushwoosh_accounts_assistant_v1.d.ts +43 -0
package/data.js
CHANGED
|
@@ -1122,6 +1122,12 @@ export const data = {
|
|
|
1122
1122
|
},
|
|
1123
1123
|
"isOnboarding": {
|
|
1124
1124
|
"type": "boolean"
|
|
1125
|
+
},
|
|
1126
|
+
"onboardingCompletedAt": {
|
|
1127
|
+
"type": "Date"
|
|
1128
|
+
},
|
|
1129
|
+
"handoffChildChatId": {
|
|
1130
|
+
"type": "number"
|
|
1125
1131
|
}
|
|
1126
1132
|
}
|
|
1127
1133
|
},
|
|
@@ -1434,6 +1440,22 @@ export const data = {
|
|
|
1434
1440
|
}
|
|
1435
1441
|
}
|
|
1436
1442
|
},
|
|
1443
|
+
"pushwoosh.accounts.assistant.v1.CompleteOnboardingHandoffRequest": {
|
|
1444
|
+
"type": "I",
|
|
1445
|
+
"fields": {
|
|
1446
|
+
"chatId": {
|
|
1447
|
+
"type": "number"
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
},
|
|
1451
|
+
"pushwoosh.accounts.assistant.v1.CompleteOnboardingHandoffResponse": {
|
|
1452
|
+
"type": "I",
|
|
1453
|
+
"fields": {
|
|
1454
|
+
"chat": {
|
|
1455
|
+
"type": "pushwoosh.accounts.assistant.v1.Chat"
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
},
|
|
1437
1459
|
"pushwoosh.accounts.assistant.v1.AssistantService": {
|
|
1438
1460
|
"type": "S",
|
|
1439
1461
|
"key": "assistant",
|
|
@@ -1532,6 +1554,12 @@ export const data = {
|
|
|
1532
1554
|
"method": "post",
|
|
1533
1555
|
"path": "/api/v1/chats/{chat_id}/onboarding/intro",
|
|
1534
1556
|
"serverStreaming": true
|
|
1557
|
+
},
|
|
1558
|
+
"CompleteOnboardingHandoff": {
|
|
1559
|
+
"request": "pushwoosh.accounts.assistant.v1.CompleteOnboardingHandoffRequest",
|
|
1560
|
+
"response": "pushwoosh.accounts.assistant.v1.CompleteOnboardingHandoffResponse",
|
|
1561
|
+
"method": "post",
|
|
1562
|
+
"path": "/api/v1/chats/{chat_id}/onboarding/handoff"
|
|
1535
1563
|
}
|
|
1536
1564
|
}
|
|
1537
1565
|
}
|
package/package.json
CHANGED
|
@@ -46,6 +46,21 @@ export type Chat = {
|
|
|
46
46
|
* StreamInference* endpoints are not used while is_onboarding=true.
|
|
47
47
|
*/
|
|
48
48
|
isOnboarding: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* onboarding_completed_at is set on the onboarding chat the moment the
|
|
51
|
+
* agent invokes the complete_onboarding tool. Frontend polls this field
|
|
52
|
+
* after each StreamInferenceLLM turn (and on chat reload) to detect that
|
|
53
|
+
* the agent has signalled completion and the handoff to a regular chat
|
|
54
|
+
* should be triggered via CompleteOnboardingHandoff.
|
|
55
|
+
*/
|
|
56
|
+
onboardingCompletedAt: Date;
|
|
57
|
+
/**
|
|
58
|
+
* handoff_child_chat_id, on the onboarding chat, stores the id of the
|
|
59
|
+
* regular chat created by CompleteOnboardingHandoff. Non-zero means
|
|
60
|
+
* the handoff has already been performed — repeated calls are idempotent
|
|
61
|
+
* and return that chat. Zero means no handoff yet.
|
|
62
|
+
*/
|
|
63
|
+
handoffChildChatId: number;
|
|
49
64
|
};
|
|
50
65
|
/** CreateChatRequest for creating a new chat */
|
|
51
66
|
export type CreateChatRequest = {
|
|
@@ -197,6 +212,24 @@ export type CheckUsageAllowedResponse = {
|
|
|
197
212
|
export type OnboardingIntroRequest = {
|
|
198
213
|
chatId: number;
|
|
199
214
|
};
|
|
215
|
+
/**
|
|
216
|
+
* CompleteOnboardingHandoffRequest performs the transition from a completed
|
|
217
|
+
* onboarding chat to a fresh regular chat. The referenced chat must be the
|
|
218
|
+
* account's onboarding chat with onboarding_completed_at already set by the
|
|
219
|
+
* agent's complete_onboarding tool call. Idempotent: subsequent calls return
|
|
220
|
+
* the same regular chat that the first call created.
|
|
221
|
+
*/
|
|
222
|
+
export type CompleteOnboardingHandoffRequest = {
|
|
223
|
+
chatId: number;
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* CompleteOnboardingHandoffResponse returns the regular chat that should
|
|
227
|
+
* host the rest of the conversation. The chat carries the handoff summary
|
|
228
|
+
* in its system context — frontend can navigate to it directly.
|
|
229
|
+
*/
|
|
230
|
+
export type CompleteOnboardingHandoffResponse = {
|
|
231
|
+
chat: Chat;
|
|
232
|
+
};
|
|
200
233
|
export type AssistantService_CreateChat = RpcMethod<CreateChatRequest, CreateChatResponse>;
|
|
201
234
|
export type AssistantService_GetChat = RpcMethod<GetChatRequest, GetChatResponse>;
|
|
202
235
|
export type AssistantService_GetAllChats = RpcMethod<GetAllChatsRequest, GetAllChatsResponse>;
|
|
@@ -207,6 +240,7 @@ export type AssistantService_GetConsent = RpcMethod<GetConsentRequest, GetConsen
|
|
|
207
240
|
export type AssistantService_GiveConsent = RpcMethod<GiveConsentRequest, GiveConsentResponse>;
|
|
208
241
|
export type AssistantService_CompactifyContext = RpcMethod<CompactifyContextRequest, CompactifyContextResponse>;
|
|
209
242
|
export type AssistantService_CheckUsageAllowed = RpcMethod<CheckUsageAllowedRequest, CheckUsageAllowedResponse>;
|
|
243
|
+
export type AssistantService_CompleteOnboardingHandoff = RpcMethod<CompleteOnboardingHandoffRequest, CompleteOnboardingHandoffResponse>;
|
|
210
244
|
export interface AssistantService {
|
|
211
245
|
/** Create a new chat */
|
|
212
246
|
CreateChat: AssistantService_CreateChat;
|
|
@@ -252,4 +286,13 @@ export interface AssistantService {
|
|
|
252
286
|
StreamOnboardingIntro(request: OnboardingIntroRequest, options?: {
|
|
253
287
|
signal?: AbortSignal;
|
|
254
288
|
}): Promise<AsyncIterable<InferenceResponse>>;
|
|
289
|
+
/**
|
|
290
|
+
* CompleteOnboardingHandoff atomically creates the regular chat that
|
|
291
|
+
* succeeds a completed onboarding chat and copies the agent's handoff
|
|
292
|
+
* summary into it. Idempotent: a second call returns the same regular
|
|
293
|
+
* chat. Frontend calls this after detecting onboarding_completed_at on
|
|
294
|
+
* the onboarding chat (either right after a StreamInferenceLLM turn or
|
|
295
|
+
* on chat reload).
|
|
296
|
+
*/
|
|
297
|
+
CompleteOnboardingHandoff: AssistantService_CompleteOnboardingHandoff;
|
|
255
298
|
}
|