@pushwoosh/rpc-gateway-ai-assistant 0.1.660 → 0.1.662
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 +111 -3
- package/package.json +1 -1
- package/pushwoosh_accounts_assistant_v1.d.ts +101 -34
package/data.js
CHANGED
|
@@ -4027,6 +4027,62 @@ export const data = {
|
|
|
4027
4027
|
},
|
|
4028
4028
|
"capReason": {
|
|
4029
4029
|
"type": "string"
|
|
4030
|
+
},
|
|
4031
|
+
"mockup": {
|
|
4032
|
+
"type": "pushwoosh.accounts.assistant.v1.Mockup"
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
},
|
|
4036
|
+
"pushwoosh.accounts.assistant.v1.Mockup": {
|
|
4037
|
+
"type": "I",
|
|
4038
|
+
"fields": {
|
|
4039
|
+
"id": {
|
|
4040
|
+
"type": "string"
|
|
4041
|
+
},
|
|
4042
|
+
"channel": {
|
|
4043
|
+
"type": "string"
|
|
4044
|
+
},
|
|
4045
|
+
"title": {
|
|
4046
|
+
"type": "string"
|
|
4047
|
+
},
|
|
4048
|
+
"text": {
|
|
4049
|
+
"type": "string"
|
|
4050
|
+
},
|
|
4051
|
+
"who": {
|
|
4052
|
+
"type": "string"
|
|
4053
|
+
},
|
|
4054
|
+
"when": {
|
|
4055
|
+
"type": "string"
|
|
4056
|
+
},
|
|
4057
|
+
"what": {
|
|
4058
|
+
"type": "string"
|
|
4059
|
+
},
|
|
4060
|
+
"why": {
|
|
4061
|
+
"type": "string"
|
|
4062
|
+
},
|
|
4063
|
+
"brand": {
|
|
4064
|
+
"type": "pushwoosh.accounts.assistant.v1.MockupBrand"
|
|
4065
|
+
},
|
|
4066
|
+
"emailHtml": {
|
|
4067
|
+
"type": "string"
|
|
4068
|
+
}
|
|
4069
|
+
}
|
|
4070
|
+
},
|
|
4071
|
+
"pushwoosh.accounts.assistant.v1.MockupBrand": {
|
|
4072
|
+
"type": "I",
|
|
4073
|
+
"fields": {
|
|
4074
|
+
"appName": {
|
|
4075
|
+
"type": "string"
|
|
4076
|
+
},
|
|
4077
|
+
"iconUrl": {
|
|
4078
|
+
"type": "string"
|
|
4079
|
+
},
|
|
4080
|
+
"logoUrl": {
|
|
4081
|
+
"type": "string"
|
|
4082
|
+
},
|
|
4083
|
+
"colors": {
|
|
4084
|
+
"type": "string",
|
|
4085
|
+
"mapKeyType": "string"
|
|
4030
4086
|
}
|
|
4031
4087
|
}
|
|
4032
4088
|
},
|
|
@@ -4112,6 +4168,9 @@ export const data = {
|
|
|
4112
4168
|
},
|
|
4113
4169
|
"needsDecision": {
|
|
4114
4170
|
"type": "boolean"
|
|
4171
|
+
},
|
|
4172
|
+
"onboardingPath": {
|
|
4173
|
+
"type": "boolean"
|
|
4115
4174
|
}
|
|
4116
4175
|
}
|
|
4117
4176
|
},
|
|
@@ -4129,6 +4188,12 @@ export const data = {
|
|
|
4129
4188
|
},
|
|
4130
4189
|
"isAdvisor": {
|
|
4131
4190
|
"type": "boolean"
|
|
4191
|
+
},
|
|
4192
|
+
"language": {
|
|
4193
|
+
"type": "string"
|
|
4194
|
+
},
|
|
4195
|
+
"onboardingPath": {
|
|
4196
|
+
"type": "boolean"
|
|
4132
4197
|
}
|
|
4133
4198
|
}
|
|
4134
4199
|
},
|
|
@@ -4319,7 +4384,8 @@ export const data = {
|
|
|
4319
4384
|
"STREAM_EVENT_SUGGESTED_ACTIONS",
|
|
4320
4385
|
"STREAM_EVENT_RELOAD_VIEW",
|
|
4321
4386
|
"STREAM_EVENT_PROPOSAL",
|
|
4322
|
-
"STREAM_EVENT_TOOL_REQUEST_SAVED"
|
|
4387
|
+
"STREAM_EVENT_TOOL_REQUEST_SAVED",
|
|
4388
|
+
"STREAM_EVENT_MOCKUP"
|
|
4323
4389
|
]
|
|
4324
4390
|
},
|
|
4325
4391
|
"pushwoosh.accounts.assistant.v1.ReloadView": {
|
|
@@ -4409,6 +4475,9 @@ export const data = {
|
|
|
4409
4475
|
},
|
|
4410
4476
|
"capReason": {
|
|
4411
4477
|
"type": "string"
|
|
4478
|
+
},
|
|
4479
|
+
"mockup": {
|
|
4480
|
+
"type": "pushwoosh.accounts.assistant.v1.Mockup"
|
|
4412
4481
|
}
|
|
4413
4482
|
}
|
|
4414
4483
|
},
|
|
@@ -4551,9 +4620,36 @@ export const data = {
|
|
|
4551
4620
|
},
|
|
4552
4621
|
"completed": {
|
|
4553
4622
|
"type": "boolean"
|
|
4623
|
+
}
|
|
4624
|
+
}
|
|
4625
|
+
},
|
|
4626
|
+
"pushwoosh.accounts.assistant.v1.NudgeOnboardingChatRequest": {
|
|
4627
|
+
"type": "I",
|
|
4628
|
+
"fields": {}
|
|
4629
|
+
},
|
|
4630
|
+
"pushwoosh.accounts.assistant.v1.NudgeOnboardingChatResponse": {
|
|
4631
|
+
"type": "I",
|
|
4632
|
+
"fields": {
|
|
4633
|
+
"queued": {
|
|
4634
|
+
"type": "boolean"
|
|
4635
|
+
}
|
|
4636
|
+
}
|
|
4637
|
+
},
|
|
4638
|
+
"pushwoosh.accounts.assistant.v1.CheckOnboardingStepRequest": {
|
|
4639
|
+
"type": "I",
|
|
4640
|
+
"fields": {}
|
|
4641
|
+
},
|
|
4642
|
+
"pushwoosh.accounts.assistant.v1.CheckOnboardingStepResponse": {
|
|
4643
|
+
"type": "I",
|
|
4644
|
+
"fields": {
|
|
4645
|
+
"queued": {
|
|
4646
|
+
"type": "boolean"
|
|
4554
4647
|
},
|
|
4555
|
-
"
|
|
4556
|
-
"type": "
|
|
4648
|
+
"watching": {
|
|
4649
|
+
"type": "boolean"
|
|
4650
|
+
},
|
|
4651
|
+
"completed": {
|
|
4652
|
+
"type": "boolean"
|
|
4557
4653
|
}
|
|
4558
4654
|
}
|
|
4559
4655
|
},
|
|
@@ -4955,6 +5051,18 @@ export const data = {
|
|
|
4955
5051
|
"method": "get",
|
|
4956
5052
|
"path": "/api/v1/onboarding/chat"
|
|
4957
5053
|
},
|
|
5054
|
+
"NudgeOnboardingChat": {
|
|
5055
|
+
"request": "pushwoosh.accounts.assistant.v1.NudgeOnboardingChatRequest",
|
|
5056
|
+
"response": "pushwoosh.accounts.assistant.v1.NudgeOnboardingChatResponse",
|
|
5057
|
+
"method": "post",
|
|
5058
|
+
"path": "/api/v1/onboarding/nudge"
|
|
5059
|
+
},
|
|
5060
|
+
"CheckOnboardingStep": {
|
|
5061
|
+
"request": "pushwoosh.accounts.assistant.v1.CheckOnboardingStepRequest",
|
|
5062
|
+
"response": "pushwoosh.accounts.assistant.v1.CheckOnboardingStepResponse",
|
|
5063
|
+
"method": "post",
|
|
5064
|
+
"path": "/api/v1/onboarding/step"
|
|
5065
|
+
},
|
|
4958
5066
|
"CompleteOnboardingHandoff": {
|
|
4959
5067
|
"request": "pushwoosh.accounts.assistant.v1.CompleteOnboardingHandoffRequest",
|
|
4960
5068
|
"response": "pushwoosh.accounts.assistant.v1.CompleteOnboardingHandoffResponse",
|
package/package.json
CHANGED
|
@@ -26,6 +26,32 @@ export type Message = {
|
|
|
26
26
|
cardId: number;
|
|
27
27
|
/** Why an iteration_capped row stopped: "steps", "length" (the answer hit the output limit) or "session". */
|
|
28
28
|
capReason: string;
|
|
29
|
+
/** Set on the agent message of the turn that called show_mockup. */
|
|
30
|
+
mockup: Mockup;
|
|
31
|
+
};
|
|
32
|
+
/** Mockup is the turn-50 card: the first message drawn in the project's brand. */
|
|
33
|
+
export type Mockup = {
|
|
34
|
+
/** Stable across edits: an edit re-draws the card with the same id instead of adding one. */
|
|
35
|
+
id: string;
|
|
36
|
+
/** Channel code, part 03 §1.6 */
|
|
37
|
+
channel: string;
|
|
38
|
+
title: string;
|
|
39
|
+
text: string;
|
|
40
|
+
who: string;
|
|
41
|
+
when: string;
|
|
42
|
+
what: string;
|
|
43
|
+
why: string;
|
|
44
|
+
brand: MockupBrand;
|
|
45
|
+
/** email only: the server-rendered document; shown in a frame without scripts. */
|
|
46
|
+
emailHtml: string;
|
|
47
|
+
};
|
|
48
|
+
/** MockupBrand is read from the project's brand record and application, never from the model. */
|
|
49
|
+
export type MockupBrand = {
|
|
50
|
+
appName: string;
|
|
51
|
+
iconUrl: string;
|
|
52
|
+
logoUrl: string;
|
|
53
|
+
/** brand record colorScheme slot → hex */
|
|
54
|
+
colors: Record<string, string>;
|
|
29
55
|
};
|
|
30
56
|
/** SuggestedActionKind says what a click does; UNSPECIFIED keeps today's rule: prompt or url. */
|
|
31
57
|
export type SuggestedActionKind = 'SUGGESTED_ACTION_KIND_UNSPECIFIED'
|
|
@@ -61,23 +87,13 @@ export type Chat = {
|
|
|
61
87
|
createdAt: Date;
|
|
62
88
|
updatedAt: Date;
|
|
63
89
|
/**
|
|
64
|
-
* is_onboarding flags
|
|
65
|
-
*
|
|
66
|
-
* onboarding agent runs on either inference provider — StreamInferenceLLM
|
|
67
|
-
* (self-hosted Qwen) or StreamInference (Claude); the frontend picks by
|
|
68
|
-
* which endpoint it calls for the chat. The opening turn is an ordinary
|
|
69
|
-
* turn: the frontend sends a real first user message (e.g. a "Get started"
|
|
70
|
-
* button prompt) and the onboarding agent replies with the greeting +
|
|
71
|
-
* suggested actions. An empty message is rejected (InvalidArgument) — there
|
|
72
|
-
* is no server-synthesised kickoff.
|
|
90
|
+
* is_onboarding flags the account's onboarding chat; its agent runs on StreamInferenceLLM or StreamInference.
|
|
91
|
+
* A chat created with onboarding_path the server opens itself (CreateChat.active_turn_id).
|
|
73
92
|
*/
|
|
74
93
|
isOnboarding: boolean;
|
|
75
94
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* after each StreamInferenceLLM turn (and on chat reload) to detect that
|
|
79
|
-
* the agent has signalled completion and the handoff to a regular chat
|
|
80
|
-
* should be triggered via CompleteOnboardingHandoff.
|
|
95
|
+
* Set by the server's send-history check on the first send (a path chat), or by the agent's
|
|
96
|
+
* complete_onboarding on a chat without onboarding_path; the frontend then calls CompleteOnboardingHandoff.
|
|
81
97
|
*/
|
|
82
98
|
onboardingCompletedAt: Date;
|
|
83
99
|
/**
|
|
@@ -108,16 +124,19 @@ export type Chat = {
|
|
|
108
124
|
cardId: number;
|
|
109
125
|
/** needs_decision marks a card chat whose card waits for the user (GetAllChats only). */
|
|
110
126
|
needsDecision: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* onboarding_path: the onboarding chat runs the PRODUCT-408 path engine (created with
|
|
129
|
+
* CreateChatRequest.onboarding_path). The panel picks path or classic UI for an existing chat by it.
|
|
130
|
+
*/
|
|
131
|
+
onboardingPath: boolean;
|
|
111
132
|
};
|
|
112
133
|
/** CreateChatRequest for creating a new chat */
|
|
113
134
|
export type CreateChatRequest = {
|
|
114
135
|
application: string;
|
|
115
136
|
title: string;
|
|
116
137
|
/**
|
|
117
|
-
* is_onboarding requests the onboarding chat
|
|
118
|
-
*
|
|
119
|
-
* At most one onboarding chat exists per account: if one already exists,
|
|
120
|
-
* the server returns it instead of creating a new chat.
|
|
138
|
+
* is_onboarding requests the account's onboarding chat, returning the existing one if any.
|
|
139
|
+
* Creating it with onboarding_path starts the server's opening turn (Chat.active_turn_id).
|
|
121
140
|
*/
|
|
122
141
|
isOnboarding: boolean;
|
|
123
142
|
/**
|
|
@@ -125,6 +144,16 @@ export type CreateChatRequest = {
|
|
|
125
144
|
* Combined with is_onboarding it is InvalidArgument.
|
|
126
145
|
*/
|
|
127
146
|
isAdvisor: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* language is the panel's UI language (or the browser's), a BCP 47 / ISO 639-1 code like "ru" or "pt-BR";
|
|
149
|
+
* only the onboarding chat's opening turn reads it.
|
|
150
|
+
*/
|
|
151
|
+
language: string;
|
|
152
|
+
/**
|
|
153
|
+
* onboarding_path is the panel's feature flag: the new onboarding chat runs the PRODUCT-408 path engine.
|
|
154
|
+
* Read only on creation; without it the chat runs the onboarding agent of before.
|
|
155
|
+
*/
|
|
156
|
+
onboardingPath: boolean;
|
|
128
157
|
};
|
|
129
158
|
/** CreateChatResponse returns the created chat */
|
|
130
159
|
export type CreateChatResponse = {
|
|
@@ -222,7 +251,9 @@ export type StreamEventType = 'STREAM_EVENT_UNSPECIFIED' | 'STREAM_EVENT_MESSAGE
|
|
|
222
251
|
/** A tool call became a proposal, or a proposal changed status. See Proposal. */
|
|
223
252
|
| 'STREAM_EVENT_PROPOSAL'
|
|
224
253
|
/** The turn's tool calls landed in one row; see tool_request_message_id. */
|
|
225
|
-
| 'STREAM_EVENT_TOOL_REQUEST_SAVED'
|
|
254
|
+
| 'STREAM_EVENT_TOOL_REQUEST_SAVED'
|
|
255
|
+
/** The onboarding mockup card; see mockup. Same id = re-draw the same card. */
|
|
256
|
+
| 'STREAM_EVENT_MOCKUP';
|
|
226
257
|
/**
|
|
227
258
|
* ReloadView tells the frontend that a tool call mutated data, so an open
|
|
228
259
|
* view showing it should re-fetch (views listen for a "reload-view" event on
|
|
@@ -269,6 +300,8 @@ export type InferenceResponse = {
|
|
|
269
300
|
toolRequestMessageId: number;
|
|
270
301
|
/** Set on the closing MESSAGE_STOP with stop_reason "iteration_cap"; see Message.cap_reason */
|
|
271
302
|
capReason: string;
|
|
303
|
+
/** Set on STREAM_EVENT_MOCKUP */
|
|
304
|
+
mockup: Mockup;
|
|
272
305
|
};
|
|
273
306
|
export type GetConsentRequest = {
|
|
274
307
|
application: string;
|
|
@@ -327,11 +360,8 @@ export type GetOnboardingStatusResponse = {
|
|
|
327
360
|
completed: boolean;
|
|
328
361
|
};
|
|
329
362
|
/**
|
|
330
|
-
* CompleteOnboardingHandoffRequest
|
|
331
|
-
*
|
|
332
|
-
* account's onboarding chat with onboarding_completed_at already set by the
|
|
333
|
-
* agent's complete_onboarding tool call. Idempotent: subsequent calls return
|
|
334
|
-
* the same regular chat that the first call created.
|
|
363
|
+
* CompleteOnboardingHandoffRequest moves a completed onboarding chat (onboarding_completed_at set) to a
|
|
364
|
+
* fresh regular chat. Idempotent: later calls return the chat the first call created.
|
|
335
365
|
*/
|
|
336
366
|
export type CompleteOnboardingHandoffRequest = {
|
|
337
367
|
chatId: number;
|
|
@@ -360,8 +390,37 @@ export type GetOnboardingChatResponse = {
|
|
|
360
390
|
inOnboarding: boolean;
|
|
361
391
|
/** onboarding_status is completed */
|
|
362
392
|
completed: boolean;
|
|
363
|
-
|
|
364
|
-
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* NudgeOnboardingChatRequest is the panel's "nudge": the person stayed silent on a visible tab.
|
|
396
|
+
* The chat and the position come from the session and the passport, never from the body.
|
|
397
|
+
*/
|
|
398
|
+
export type NudgeOnboardingChatRequest = {};
|
|
399
|
+
export type NudgeOnboardingChatResponse = {
|
|
400
|
+
/**
|
|
401
|
+
* A silence row was placed. Its worker still skips a nudge already spoken at this position until
|
|
402
|
+
* the person replies, so a queued row may end without a turn.
|
|
403
|
+
*/
|
|
404
|
+
queued: boolean;
|
|
405
|
+
};
|
|
406
|
+
/**
|
|
407
|
+
* CheckOnboardingStepRequest is sent while the panel shows the onboarding chat: a step or the first send may
|
|
408
|
+
* have been done outside it. The chat and the position come from the session and the passport, never from the body.
|
|
409
|
+
*/
|
|
410
|
+
export type CheckOnboardingStepRequest = {};
|
|
411
|
+
export type CheckOnboardingStepResponse = {
|
|
412
|
+
/**
|
|
413
|
+
* A "✓" turn was queued: a setup fact changed since the agent's last message. The panel follows the
|
|
414
|
+
* turn as it follows a nudge's.
|
|
415
|
+
*/
|
|
416
|
+
queued: boolean;
|
|
417
|
+
/** The chat is on turn 60 or 70 and not completed; false: the panel may ask less often. */
|
|
418
|
+
watching: boolean;
|
|
419
|
+
/**
|
|
420
|
+
* Onboarding is completed: the closing turn runs or follows the running one. The panel follows it and
|
|
421
|
+
* then shows the handoff.
|
|
422
|
+
*/
|
|
423
|
+
completed: boolean;
|
|
365
424
|
};
|
|
366
425
|
/**
|
|
367
426
|
* CreateRealtimeSessionRequest mints an ephemeral realtime voice secret
|
|
@@ -547,6 +606,8 @@ export type AssistantService_CompactifyContext = RpcMethod<CompactifyContextRequ
|
|
|
547
606
|
export type AssistantService_CheckUsageAllowed = RpcMethod<CheckUsageAllowedRequest, CheckUsageAllowedResponse>;
|
|
548
607
|
export type AssistantService_GetOnboardingStatus = RpcMethod<GetOnboardingStatusRequest, GetOnboardingStatusResponse>;
|
|
549
608
|
export type AssistantService_GetOnboardingChat = RpcMethod<GetOnboardingChatRequest, GetOnboardingChatResponse>;
|
|
609
|
+
export type AssistantService_NudgeOnboardingChat = RpcMethod<NudgeOnboardingChatRequest, NudgeOnboardingChatResponse>;
|
|
610
|
+
export type AssistantService_CheckOnboardingStep = RpcMethod<CheckOnboardingStepRequest, CheckOnboardingStepResponse>;
|
|
550
611
|
export type AssistantService_CompleteOnboardingHandoff = RpcMethod<CompleteOnboardingHandoffRequest, CompleteOnboardingHandoffResponse>;
|
|
551
612
|
export type AssistantService_CreateRealtimeSession = RpcMethod<CreateRealtimeSessionRequest, CreateRealtimeSessionResponse>;
|
|
552
613
|
export type AssistantService_CallVoiceTool = RpcMethod<CallVoiceToolRequest, CallVoiceToolResponse>;
|
|
@@ -587,8 +648,8 @@ export interface AssistantService {
|
|
|
587
648
|
* StreamInferenceLLM is the self-hosted LLM (Qwen) inference endpoint. It is
|
|
588
649
|
* one of two providers that can run the onboarding agent — the frontend
|
|
589
650
|
* routes an onboarding chat (is_onboarding=true) here or to StreamInference
|
|
590
|
-
* (Claude) by choosing the endpoint. Every turn
|
|
591
|
-
*
|
|
651
|
+
* (Claude) by choosing the endpoint. Every turn here carries a real user message;
|
|
652
|
+
* an empty message is rejected. The server's opening turn runs on Claude. See is_onboarding.
|
|
592
653
|
*/
|
|
593
654
|
StreamInferenceLLM(request: InferenceRequest, options?: RpcCallOptions): Promise<AsyncIterable<InferenceResponse>>;
|
|
594
655
|
ListProposals: AssistantService_ListProposals;
|
|
@@ -614,12 +675,18 @@ export interface AssistantService {
|
|
|
614
675
|
*/
|
|
615
676
|
GetOnboardingChat: AssistantService_GetOnboardingChat;
|
|
616
677
|
/**
|
|
617
|
-
*
|
|
618
|
-
*
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
* on
|
|
678
|
+
* NudgeOnboardingChat queues the silence wake-up of the session's onboarding chat. Anyone but the
|
|
679
|
+
* main user, and a repeat while that row is pending or running, gets queued = false, not an error.
|
|
680
|
+
*/
|
|
681
|
+
NudgeOnboardingChat: AssistantService_NudgeOnboardingChat;
|
|
682
|
+
/**
|
|
683
|
+
* CheckOnboardingStep queues the "✓" turn on news of the setup facts; on turns 60–70 a send from the onboarding
|
|
684
|
+
* project completes onboarding and starts the closing turn. Anyone but the main user gets zeros.
|
|
685
|
+
*/
|
|
686
|
+
CheckOnboardingStep: AssistantService_CheckOnboardingStep;
|
|
687
|
+
/**
|
|
688
|
+
* CompleteOnboardingHandoff creates the regular chat after a completed onboarding chat and copies the
|
|
689
|
+
* handoff summary into it; idempotent. The frontend calls it once onboarding_completed_at is set.
|
|
623
690
|
*/
|
|
624
691
|
CompleteOnboardingHandoff: AssistantService_CompleteOnboardingHandoff;
|
|
625
692
|
/**
|