geniebox-shared-lib 2.6.0 → 2.6.2
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/dist/ai-provider.dto.d.ts +43 -0
- package/dist/chat.interface.d.ts +54 -0
- package/dist/chat.interface.js +217 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/package.json +1 -1
|
@@ -3,6 +3,41 @@ export interface AIMessage {
|
|
|
3
3
|
role: AIMessageRole;
|
|
4
4
|
content: string;
|
|
5
5
|
}
|
|
6
|
+
export type AIProviderToolType = "function";
|
|
7
|
+
export interface AIProviderToolFunctionDefinition {
|
|
8
|
+
type: "function";
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
parameters?: Record<string, unknown>;
|
|
12
|
+
metadata?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export type AIProviderToolDefinition = AIProviderToolFunctionDefinition;
|
|
15
|
+
export type AIProviderToolChoice = "auto" | "none" | "manual" | {
|
|
16
|
+
type: "function";
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
19
|
+
export interface AIProviderToolResult {
|
|
20
|
+
toolCallId: string;
|
|
21
|
+
toolName: string;
|
|
22
|
+
content?: unknown;
|
|
23
|
+
error?: string;
|
|
24
|
+
submittedAt?: string;
|
|
25
|
+
metadata?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
export interface AIProviderPendingToolCall {
|
|
28
|
+
toolCallId: string;
|
|
29
|
+
toolName: string;
|
|
30
|
+
input?: Record<string, unknown>;
|
|
31
|
+
status?: "requested" | "running" | "completed" | "failed";
|
|
32
|
+
result?: AIProviderToolResult;
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
export interface AIProviderToolRuntimeHints {
|
|
36
|
+
manualExecution?: boolean;
|
|
37
|
+
maxToolIterations?: number;
|
|
38
|
+
pendingToolCalls?: AIProviderPendingToolCall[];
|
|
39
|
+
metadata?: Record<string, unknown>;
|
|
40
|
+
}
|
|
6
41
|
export type AIProviderRequestVariant = {
|
|
7
42
|
type: "messages";
|
|
8
43
|
provider: string;
|
|
@@ -11,6 +46,10 @@ export type AIProviderRequestVariant = {
|
|
|
11
46
|
systemPrompt?: string;
|
|
12
47
|
messages: AIMessage[];
|
|
13
48
|
metadata?: Record<string, unknown>;
|
|
49
|
+
tools?: AIProviderToolDefinition[];
|
|
50
|
+
toolChoice?: AIProviderToolChoice;
|
|
51
|
+
toolResults?: AIProviderToolResult[];
|
|
52
|
+
toolRuntime?: AIProviderToolRuntimeHints;
|
|
14
53
|
} | {
|
|
15
54
|
type: "input";
|
|
16
55
|
provider: string;
|
|
@@ -19,6 +58,10 @@ export type AIProviderRequestVariant = {
|
|
|
19
58
|
systemPrompt?: string;
|
|
20
59
|
input: string;
|
|
21
60
|
metadata?: Record<string, unknown>;
|
|
61
|
+
tools?: AIProviderToolDefinition[];
|
|
62
|
+
toolChoice?: AIProviderToolChoice;
|
|
63
|
+
toolResults?: AIProviderToolResult[];
|
|
64
|
+
toolRuntime?: AIProviderToolRuntimeHints;
|
|
22
65
|
};
|
|
23
66
|
export interface AIProviderRequestEnvelope {
|
|
24
67
|
schema: "ai.provider.request@v1";
|
package/dist/chat.interface.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ export interface ChatMessage {
|
|
|
23
23
|
[key: string]: any;
|
|
24
24
|
} | undefined;
|
|
25
25
|
createdAt: string;
|
|
26
|
+
/** Present if generation was started */
|
|
27
|
+
runId?: string | undefined;
|
|
28
|
+
/** Present if generation was started */
|
|
29
|
+
status?: string | undefined;
|
|
26
30
|
}
|
|
27
31
|
/** Requests */
|
|
28
32
|
export interface CreateChatRequest {
|
|
@@ -62,9 +66,18 @@ export interface AddMessageRequest {
|
|
|
62
66
|
userId: string;
|
|
63
67
|
role: string;
|
|
64
68
|
content: string;
|
|
69
|
+
/** Message metadata (files, clientMessageId, etc.) */
|
|
65
70
|
metadata?: {
|
|
66
71
|
[key: string]: any;
|
|
67
72
|
} | undefined;
|
|
73
|
+
/** If true, starts generation after saving message */
|
|
74
|
+
startGeneration?: boolean | undefined;
|
|
75
|
+
/** Generation config (model, temperature, tools, mentions, etc.) */
|
|
76
|
+
payload?: {
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
} | undefined;
|
|
79
|
+
/** Prevents duplicate requests */
|
|
80
|
+
idempotencyKey?: string | undefined;
|
|
68
81
|
}
|
|
69
82
|
export interface GetMessagesRequest {
|
|
70
83
|
chatId: string;
|
|
@@ -73,6 +86,27 @@ export interface GetMessagesRequest {
|
|
|
73
86
|
limit: number;
|
|
74
87
|
offset: number;
|
|
75
88
|
}
|
|
89
|
+
export interface StartChatRequest {
|
|
90
|
+
userId: string;
|
|
91
|
+
/** Optional: if empty, will be auto-generated */
|
|
92
|
+
title?: string | undefined;
|
|
93
|
+
/** First user message */
|
|
94
|
+
content: string;
|
|
95
|
+
/** Message metadata (files, clientMessageId, etc.) */
|
|
96
|
+
metadata?: {
|
|
97
|
+
[key: string]: any;
|
|
98
|
+
} | undefined;
|
|
99
|
+
/** Generation config (model, temperature, tools, mentions, etc.) */
|
|
100
|
+
payload?: {
|
|
101
|
+
[key: string]: any;
|
|
102
|
+
} | undefined;
|
|
103
|
+
/** Prevents duplicate requests */
|
|
104
|
+
idempotencyKey: string;
|
|
105
|
+
/** Optional: chat metadata */
|
|
106
|
+
chatMetadata?: {
|
|
107
|
+
[key: string]: any;
|
|
108
|
+
} | undefined;
|
|
109
|
+
}
|
|
76
110
|
/** Responses */
|
|
77
111
|
export interface ChatsResponse {
|
|
78
112
|
chats: Chat[];
|
|
@@ -82,6 +116,12 @@ export interface MessagesResponse {
|
|
|
82
116
|
messages: ChatMessage[];
|
|
83
117
|
total: number;
|
|
84
118
|
}
|
|
119
|
+
export interface StartChatResponse {
|
|
120
|
+
runId: string;
|
|
121
|
+
messageId: string;
|
|
122
|
+
chatId: string;
|
|
123
|
+
status: string;
|
|
124
|
+
}
|
|
85
125
|
export interface ChatExportMessage {
|
|
86
126
|
id: string;
|
|
87
127
|
role: string;
|
|
@@ -171,8 +211,10 @@ export declare const ListChatsRequest: MessageFns<ListChatsRequest>;
|
|
|
171
211
|
export declare const DeleteChatRequest: MessageFns<DeleteChatRequest>;
|
|
172
212
|
export declare const AddMessageRequest: MessageFns<AddMessageRequest>;
|
|
173
213
|
export declare const GetMessagesRequest: MessageFns<GetMessagesRequest>;
|
|
214
|
+
export declare const StartChatRequest: MessageFns<StartChatRequest>;
|
|
174
215
|
export declare const ChatsResponse: MessageFns<ChatsResponse>;
|
|
175
216
|
export declare const MessagesResponse: MessageFns<MessagesResponse>;
|
|
217
|
+
export declare const StartChatResponse: MessageFns<StartChatResponse>;
|
|
176
218
|
export declare const ChatExportMessage: MessageFns<ChatExportMessage>;
|
|
177
219
|
export declare const ChatExport: MessageFns<ChatExport>;
|
|
178
220
|
export declare const ChatExportSummary: MessageFns<ChatExportSummary>;
|
|
@@ -195,6 +237,7 @@ export interface ChatServiceClient {
|
|
|
195
237
|
updateChat(request: UpdateChatRequest, metadata?: Metadata): Observable<Chat>;
|
|
196
238
|
addMessage(request: AddMessageRequest, metadata?: Metadata): Observable<ChatMessage>;
|
|
197
239
|
getMessages(request: GetMessagesRequest, metadata?: Metadata): Observable<MessagesResponse>;
|
|
240
|
+
startChat(request: StartChatRequest, metadata?: Metadata): Observable<StartChatResponse>;
|
|
198
241
|
exportChat(request: ExportChatRequest, metadata?: Metadata): Observable<ExportChatResponse>;
|
|
199
242
|
getChatExport(request: GetChatExportRequest, metadata?: Metadata): Observable<ChatExport>;
|
|
200
243
|
listChatExports(request: ListChatExportsRequest, metadata?: Metadata): Observable<ChatExportsResponse>;
|
|
@@ -211,6 +254,7 @@ export interface ChatServiceController {
|
|
|
211
254
|
updateChat(request: UpdateChatRequest, metadata?: Metadata): Promise<Chat> | Observable<Chat> | Chat;
|
|
212
255
|
addMessage(request: AddMessageRequest, metadata?: Metadata): Promise<ChatMessage> | Observable<ChatMessage> | ChatMessage;
|
|
213
256
|
getMessages(request: GetMessagesRequest, metadata?: Metadata): Promise<MessagesResponse> | Observable<MessagesResponse> | MessagesResponse;
|
|
257
|
+
startChat(request: StartChatRequest, metadata?: Metadata): Promise<StartChatResponse> | Observable<StartChatResponse> | StartChatResponse;
|
|
214
258
|
exportChat(request: ExportChatRequest, metadata?: Metadata): Promise<ExportChatResponse> | Observable<ExportChatResponse> | ExportChatResponse;
|
|
215
259
|
getChatExport(request: GetChatExportRequest, metadata?: Metadata): Promise<ChatExport> | Observable<ChatExport> | ChatExport;
|
|
216
260
|
listChatExports(request: ListChatExportsRequest, metadata?: Metadata): Promise<ChatExportsResponse> | Observable<ChatExportsResponse> | ChatExportsResponse;
|
|
@@ -286,6 +330,15 @@ export declare const ChatServiceService: {
|
|
|
286
330
|
readonly responseSerialize: (value: MessagesResponse) => Buffer;
|
|
287
331
|
readonly responseDeserialize: (value: Buffer) => MessagesResponse;
|
|
288
332
|
};
|
|
333
|
+
readonly startChat: {
|
|
334
|
+
readonly path: "/chat.ChatService/startChat";
|
|
335
|
+
readonly requestStream: false;
|
|
336
|
+
readonly responseStream: false;
|
|
337
|
+
readonly requestSerialize: (value: StartChatRequest) => Buffer;
|
|
338
|
+
readonly requestDeserialize: (value: Buffer) => StartChatRequest;
|
|
339
|
+
readonly responseSerialize: (value: StartChatResponse) => Buffer;
|
|
340
|
+
readonly responseDeserialize: (value: Buffer) => StartChatResponse;
|
|
341
|
+
};
|
|
289
342
|
readonly exportChat: {
|
|
290
343
|
readonly path: "/chat.ChatService/exportChat";
|
|
291
344
|
readonly requestStream: false;
|
|
@@ -358,6 +411,7 @@ export interface ChatServiceServer extends UntypedServiceImplementation {
|
|
|
358
411
|
updateChat: handleUnaryCall<UpdateChatRequest, Chat>;
|
|
359
412
|
addMessage: handleUnaryCall<AddMessageRequest, ChatMessage>;
|
|
360
413
|
getMessages: handleUnaryCall<GetMessagesRequest, MessagesResponse>;
|
|
414
|
+
startChat: handleUnaryCall<StartChatRequest, StartChatResponse>;
|
|
361
415
|
exportChat: handleUnaryCall<ExportChatRequest, ExportChatResponse>;
|
|
362
416
|
getChatExport: handleUnaryCall<GetChatExportRequest, ChatExport>;
|
|
363
417
|
listChatExports: handleUnaryCall<ListChatExportsRequest, ChatExportsResponse>;
|
package/dist/chat.interface.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v5.28.2
|
|
6
6
|
// source: chat.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ChatServiceService = exports.CHAT_SERVICE_NAME = exports.DeleteChatExportCommentRequest = exports.AddChatExportCommentRequest = exports.ChatExportCommentsResponse = exports.GetChatExportCommentsRequest = exports.ChatExportsResponse = exports.ListChatExportsRequest = exports.DeleteChatExportRequest = exports.GetChatExportRequest = exports.ExportChatResponse = exports.ExportChatRequest = exports.ChatExportComment = exports.ChatExportSummary = exports.ChatExport = exports.ChatExportMessage = exports.MessagesResponse = exports.ChatsResponse = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = exports.UpdateChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.CHAT_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.ChatServiceService = exports.CHAT_SERVICE_NAME = exports.DeleteChatExportCommentRequest = exports.AddChatExportCommentRequest = exports.ChatExportCommentsResponse = exports.GetChatExportCommentsRequest = exports.ChatExportsResponse = exports.ListChatExportsRequest = exports.DeleteChatExportRequest = exports.GetChatExportRequest = exports.ExportChatResponse = exports.ExportChatRequest = exports.ChatExportComment = exports.ChatExportSummary = exports.ChatExport = exports.ChatExportMessage = exports.StartChatResponse = exports.MessagesResponse = exports.ChatsResponse = exports.StartChatRequest = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = exports.UpdateChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.CHAT_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.ChatServiceControllerMethods = ChatServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
@@ -121,6 +121,12 @@ exports.ChatMessage = {
|
|
|
121
121
|
if (message.createdAt !== "") {
|
|
122
122
|
writer.uint32(50).string(message.createdAt);
|
|
123
123
|
}
|
|
124
|
+
if (message.runId !== undefined) {
|
|
125
|
+
writer.uint32(58).string(message.runId);
|
|
126
|
+
}
|
|
127
|
+
if (message.status !== undefined) {
|
|
128
|
+
writer.uint32(66).string(message.status);
|
|
129
|
+
}
|
|
124
130
|
return writer;
|
|
125
131
|
},
|
|
126
132
|
decode(input, length) {
|
|
@@ -172,6 +178,20 @@ exports.ChatMessage = {
|
|
|
172
178
|
message.createdAt = reader.string();
|
|
173
179
|
continue;
|
|
174
180
|
}
|
|
181
|
+
case 7: {
|
|
182
|
+
if (tag !== 58) {
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
message.runId = reader.string();
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
case 8: {
|
|
189
|
+
if (tag !== 66) {
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
message.status = reader.string();
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
175
195
|
}
|
|
176
196
|
if ((tag & 7) === 4 || tag === 0) {
|
|
177
197
|
break;
|
|
@@ -456,6 +476,15 @@ exports.AddMessageRequest = {
|
|
|
456
476
|
if (message.metadata !== undefined) {
|
|
457
477
|
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.metadata), writer.uint32(42).fork()).join();
|
|
458
478
|
}
|
|
479
|
+
if (message.startGeneration !== undefined) {
|
|
480
|
+
writer.uint32(48).bool(message.startGeneration);
|
|
481
|
+
}
|
|
482
|
+
if (message.payload !== undefined) {
|
|
483
|
+
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.payload), writer.uint32(58).fork()).join();
|
|
484
|
+
}
|
|
485
|
+
if (message.idempotencyKey !== undefined) {
|
|
486
|
+
writer.uint32(66).string(message.idempotencyKey);
|
|
487
|
+
}
|
|
459
488
|
return writer;
|
|
460
489
|
},
|
|
461
490
|
decode(input, length) {
|
|
@@ -500,6 +529,27 @@ exports.AddMessageRequest = {
|
|
|
500
529
|
message.metadata = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
501
530
|
continue;
|
|
502
531
|
}
|
|
532
|
+
case 6: {
|
|
533
|
+
if (tag !== 48) {
|
|
534
|
+
break;
|
|
535
|
+
}
|
|
536
|
+
message.startGeneration = reader.bool();
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
539
|
+
case 7: {
|
|
540
|
+
if (tag !== 58) {
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
message.payload = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
544
|
+
continue;
|
|
545
|
+
}
|
|
546
|
+
case 8: {
|
|
547
|
+
if (tag !== 66) {
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
message.idempotencyKey = reader.string();
|
|
551
|
+
continue;
|
|
552
|
+
}
|
|
503
553
|
}
|
|
504
554
|
if ((tag & 7) === 4 || tag === 0) {
|
|
505
555
|
break;
|
|
@@ -572,6 +622,99 @@ exports.GetMessagesRequest = {
|
|
|
572
622
|
return message;
|
|
573
623
|
},
|
|
574
624
|
};
|
|
625
|
+
function createBaseStartChatRequest() {
|
|
626
|
+
return { userId: "", content: "", idempotencyKey: "" };
|
|
627
|
+
}
|
|
628
|
+
exports.StartChatRequest = {
|
|
629
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
630
|
+
if (message.userId !== "") {
|
|
631
|
+
writer.uint32(10).string(message.userId);
|
|
632
|
+
}
|
|
633
|
+
if (message.title !== undefined) {
|
|
634
|
+
writer.uint32(18).string(message.title);
|
|
635
|
+
}
|
|
636
|
+
if (message.content !== "") {
|
|
637
|
+
writer.uint32(26).string(message.content);
|
|
638
|
+
}
|
|
639
|
+
if (message.metadata !== undefined) {
|
|
640
|
+
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.metadata), writer.uint32(34).fork()).join();
|
|
641
|
+
}
|
|
642
|
+
if (message.payload !== undefined) {
|
|
643
|
+
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.payload), writer.uint32(42).fork()).join();
|
|
644
|
+
}
|
|
645
|
+
if (message.idempotencyKey !== "") {
|
|
646
|
+
writer.uint32(50).string(message.idempotencyKey);
|
|
647
|
+
}
|
|
648
|
+
if (message.chatMetadata !== undefined) {
|
|
649
|
+
struct_interface_1.Struct.encode(struct_interface_1.Struct.wrap(message.chatMetadata), writer.uint32(58).fork()).join();
|
|
650
|
+
}
|
|
651
|
+
return writer;
|
|
652
|
+
},
|
|
653
|
+
decode(input, length) {
|
|
654
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
655
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
656
|
+
const message = createBaseStartChatRequest();
|
|
657
|
+
while (reader.pos < end) {
|
|
658
|
+
const tag = reader.uint32();
|
|
659
|
+
switch (tag >>> 3) {
|
|
660
|
+
case 1: {
|
|
661
|
+
if (tag !== 10) {
|
|
662
|
+
break;
|
|
663
|
+
}
|
|
664
|
+
message.userId = reader.string();
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
667
|
+
case 2: {
|
|
668
|
+
if (tag !== 18) {
|
|
669
|
+
break;
|
|
670
|
+
}
|
|
671
|
+
message.title = reader.string();
|
|
672
|
+
continue;
|
|
673
|
+
}
|
|
674
|
+
case 3: {
|
|
675
|
+
if (tag !== 26) {
|
|
676
|
+
break;
|
|
677
|
+
}
|
|
678
|
+
message.content = reader.string();
|
|
679
|
+
continue;
|
|
680
|
+
}
|
|
681
|
+
case 4: {
|
|
682
|
+
if (tag !== 34) {
|
|
683
|
+
break;
|
|
684
|
+
}
|
|
685
|
+
message.metadata = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
686
|
+
continue;
|
|
687
|
+
}
|
|
688
|
+
case 5: {
|
|
689
|
+
if (tag !== 42) {
|
|
690
|
+
break;
|
|
691
|
+
}
|
|
692
|
+
message.payload = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
693
|
+
continue;
|
|
694
|
+
}
|
|
695
|
+
case 6: {
|
|
696
|
+
if (tag !== 50) {
|
|
697
|
+
break;
|
|
698
|
+
}
|
|
699
|
+
message.idempotencyKey = reader.string();
|
|
700
|
+
continue;
|
|
701
|
+
}
|
|
702
|
+
case 7: {
|
|
703
|
+
if (tag !== 58) {
|
|
704
|
+
break;
|
|
705
|
+
}
|
|
706
|
+
message.chatMetadata = struct_interface_1.Struct.unwrap(struct_interface_1.Struct.decode(reader, reader.uint32()));
|
|
707
|
+
continue;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
reader.skip(tag & 7);
|
|
714
|
+
}
|
|
715
|
+
return message;
|
|
716
|
+
},
|
|
717
|
+
};
|
|
575
718
|
function createBaseChatsResponse() {
|
|
576
719
|
return { chats: [], total: 0 };
|
|
577
720
|
}
|
|
@@ -658,6 +801,69 @@ exports.MessagesResponse = {
|
|
|
658
801
|
return message;
|
|
659
802
|
},
|
|
660
803
|
};
|
|
804
|
+
function createBaseStartChatResponse() {
|
|
805
|
+
return { runId: "", messageId: "", chatId: "", status: "" };
|
|
806
|
+
}
|
|
807
|
+
exports.StartChatResponse = {
|
|
808
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
809
|
+
if (message.runId !== "") {
|
|
810
|
+
writer.uint32(10).string(message.runId);
|
|
811
|
+
}
|
|
812
|
+
if (message.messageId !== "") {
|
|
813
|
+
writer.uint32(18).string(message.messageId);
|
|
814
|
+
}
|
|
815
|
+
if (message.chatId !== "") {
|
|
816
|
+
writer.uint32(26).string(message.chatId);
|
|
817
|
+
}
|
|
818
|
+
if (message.status !== "") {
|
|
819
|
+
writer.uint32(34).string(message.status);
|
|
820
|
+
}
|
|
821
|
+
return writer;
|
|
822
|
+
},
|
|
823
|
+
decode(input, length) {
|
|
824
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
825
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
826
|
+
const message = createBaseStartChatResponse();
|
|
827
|
+
while (reader.pos < end) {
|
|
828
|
+
const tag = reader.uint32();
|
|
829
|
+
switch (tag >>> 3) {
|
|
830
|
+
case 1: {
|
|
831
|
+
if (tag !== 10) {
|
|
832
|
+
break;
|
|
833
|
+
}
|
|
834
|
+
message.runId = reader.string();
|
|
835
|
+
continue;
|
|
836
|
+
}
|
|
837
|
+
case 2: {
|
|
838
|
+
if (tag !== 18) {
|
|
839
|
+
break;
|
|
840
|
+
}
|
|
841
|
+
message.messageId = reader.string();
|
|
842
|
+
continue;
|
|
843
|
+
}
|
|
844
|
+
case 3: {
|
|
845
|
+
if (tag !== 26) {
|
|
846
|
+
break;
|
|
847
|
+
}
|
|
848
|
+
message.chatId = reader.string();
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
851
|
+
case 4: {
|
|
852
|
+
if (tag !== 34) {
|
|
853
|
+
break;
|
|
854
|
+
}
|
|
855
|
+
message.status = reader.string();
|
|
856
|
+
continue;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
860
|
+
break;
|
|
861
|
+
}
|
|
862
|
+
reader.skip(tag & 7);
|
|
863
|
+
}
|
|
864
|
+
return message;
|
|
865
|
+
},
|
|
866
|
+
};
|
|
661
867
|
function createBaseChatExportMessage() {
|
|
662
868
|
return { id: "", role: "" };
|
|
663
869
|
}
|
|
@@ -1441,6 +1647,7 @@ function ChatServiceControllerMethods() {
|
|
|
1441
1647
|
"updateChat",
|
|
1442
1648
|
"addMessage",
|
|
1443
1649
|
"getMessages",
|
|
1650
|
+
"startChat",
|
|
1444
1651
|
"exportChat",
|
|
1445
1652
|
"getChatExport",
|
|
1446
1653
|
"listChatExports",
|
|
@@ -1525,6 +1732,15 @@ exports.ChatServiceService = {
|
|
|
1525
1732
|
responseSerialize: (value) => Buffer.from(exports.MessagesResponse.encode(value).finish()),
|
|
1526
1733
|
responseDeserialize: (value) => exports.MessagesResponse.decode(value),
|
|
1527
1734
|
},
|
|
1735
|
+
startChat: {
|
|
1736
|
+
path: "/chat.ChatService/startChat",
|
|
1737
|
+
requestStream: false,
|
|
1738
|
+
responseStream: false,
|
|
1739
|
+
requestSerialize: (value) => Buffer.from(exports.StartChatRequest.encode(value).finish()),
|
|
1740
|
+
requestDeserialize: (value) => exports.StartChatRequest.decode(value),
|
|
1741
|
+
responseSerialize: (value) => Buffer.from(exports.StartChatResponse.encode(value).finish()),
|
|
1742
|
+
responseDeserialize: (value) => exports.StartChatResponse.decode(value),
|
|
1743
|
+
},
|
|
1528
1744
|
exportChat: {
|
|
1529
1745
|
path: "/chat.ChatService/exportChat",
|
|
1530
1746
|
requestStream: false,
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { WorkflowClient } from "./workflow.client";
|
|
|
15
15
|
export { LibraryClient } from "./library.client";
|
|
16
16
|
export { ChatClient } from "./chat.client";
|
|
17
17
|
export { GenerationClient } from "./generation.client";
|
|
18
|
-
export { AIMessageRole, AIMessage, AIProviderRequestVariant, AIProviderRequestEnvelope, PROVIDER_REQUEST_SCHEMA, buildProviderRequestEnvelope, isProviderRequestEnvelope, } from "./ai-provider.dto";
|
|
18
|
+
export { AIMessageRole, AIMessage, AIProviderRequestVariant, AIProviderRequestEnvelope, AIProviderToolDefinition, AIProviderToolChoice, AIProviderToolResult, AIProviderToolRuntimeHints, AIProviderPendingToolCall, PROVIDER_REQUEST_SCHEMA, buildProviderRequestEnvelope, isProviderRequestEnvelope, } from "./ai-provider.dto";
|
|
19
19
|
export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, User, UserPersonal, UserSettings, UserNotificationSettings, UserEmailNotifications, UserPushNotifications, UserInAppNotifications, UserAuthentication, CreateUserRequest, CreateUserPersonal, CreateUserAuthentication, UpdateUserRequest, FindOneRequest, UserResponse, UsersResponse, FindByEmailRequest, FindByPhoneRequest, UpdateUserPersonal, UpdatePasswordRequest, UpdateEmailVerificationRequest, ResetPasswordData, GetEmailVerificationStatusRequest, EmailVerificationStatusResponse, GetUserSettingsRequest, UpdateUserSettingsRequest, CreateUserSettingsRequest, UserSettingsResponse, UserOAuthIdentity, FindOAuthIdentityRequest, CreateOAuthIdentityRequest, UserServiceService as UserService, } from "./user.interface";
|
|
20
20
|
export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, LoginCredentials, RegisterCredentials, LogoutRequest, RefreshRequest, AuthResponse, RefreshTokenResponse, RecoverRequest, ResetPasswordRequest, ConfirmEmailRequest, ConfirmEmailByCodeRequest, ConfirmEmailResponse, CheckEmailVerifiedRequest, CheckEmailVerifiedResponse, ResendConfirmationCodeRequest, VerifyResetCodeRequest, LoginWithOAuthRequest, } from "./auth.interface";
|
|
21
21
|
export { MessageFns as EndpointMessageFns, protobufPackage as EndpointProtobufPackage, ENDPOINT_PACKAGE_NAME, ENDPOINT_SERVICE_NAME, Provider as EndpointProvider, Model as EndpointModel, Pricing as EndpointPricing, EndpointConfig, EndpointRequest, ProvidersRequest, ProvidersResponse, ModelsRequest, ModelsResponse, PricingRequest, PricingResponse, ValidateEndpointRequest, ValidateEndpointResponse, CreateEndpointRequest, UpdateEndpointRequest, GetEndpointByIdRequest, ListEndpointsRequest, DeleteEndpointRequest, CreateEndpointResponse, UpdateEndpointResponse, GetEndpointByIdResponse, ListEndpointsResponse, DeleteEndpointResponse, EndpointServiceClient, EndpointServiceController, EndpointServiceService as EndpointService, } from "./endpoint.interface";
|
|
@@ -30,5 +30,5 @@ export { MessageFns as AgentMessageFns, protobufPackage as AgentProtobufPackage,
|
|
|
30
30
|
export { MessageFns as WorkflowMessageFns, protobufPackage as WorkflowProtobufPackage, Workflow, WorkflowNode, WorkflowEdge, FullWorkflow, CreateWorkflowRequest, UpdateWorkflowRequest, GetWorkflowRequest, ListWorkflowsRequest, DeleteWorkflowRequest, CreateNodeRequest, UpdateNodeRequest, DeleteNodeRequest, CreateEdgeRequest, DeleteEdgeRequest, WorkflowsResponse, WorkflowServiceClient, WorkflowServiceController, WorkflowServiceService as WorkflowService, } from "./workflow.interface";
|
|
31
31
|
export { MessageFns as McpMessageFns, protobufPackage as McpProtobufPackage, McpServer, McpServerCustomization, McpToolCustomization, McpOAuthSession, CreateMcpServerRequest, UpdateMcpServerRequest, GetMcpServerRequest, ListMcpServersRequest, DeleteMcpServerRequest, SetServerCustomizationRequest, SetToolCustomizationRequest, ListServerCustomizationsRequest, ListToolCustomizationsRequest, McpServerCustomizationsResponse, McpToolCustomizationsResponse, McpServersResponse, McpServiceClient, McpServiceController, McpServiceService as McpService, } from "./mcp.interface";
|
|
32
32
|
export { MessageFns as LibraryMessageFns, protobufPackage as LibraryProtobufPackage, Bookmark, Archive, ArchiveItem, CreateBookmarkRequest, DeleteBookmarkRequest, ListBookmarksRequest, CreateArchiveRequest, UpdateArchiveRequest, DeleteArchiveRequest, ListArchivesRequest, AddItemToArchiveRequest, RemoveItemFromArchiveRequest, BookmarksResponse, ArchivesResponse, ListArchiveItemsRequest, ArchiveItemsResponse, LibraryServiceClient, LibraryServiceController, LibraryServiceService as LibraryService, } from "./library.interface";
|
|
33
|
-
export { MessageFns as ChatMessageFns, protobufPackage as ChatProtobufPackage, Chat, ChatMessage, CreateChatRequest, UpdateChatRequest, GetChatRequest, ListChatsRequest, DeleteChatRequest, AddMessageRequest, GetMessagesRequest, ChatsResponse, MessagesResponse, ChatServiceClient, ChatExportMessage, ChatExport, ChatExportSummary, ChatExportComment, ExportChatRequest, ExportChatResponse, GetChatExportRequest, GetChatExportCommentsRequest, DeleteChatExportRequest, ListChatExportsRequest, ChatExportsResponse, ChatExportCommentsResponse, AddChatExportCommentRequest, DeleteChatExportCommentRequest, ChatServiceController, ChatServiceService as ChatService, } from "./chat.interface";
|
|
33
|
+
export { MessageFns as ChatMessageFns, protobufPackage as ChatProtobufPackage, Chat, ChatMessage, CreateChatRequest, UpdateChatRequest, GetChatRequest, ListChatsRequest, DeleteChatRequest, AddMessageRequest, GetMessagesRequest, ChatsResponse, MessagesResponse, ChatServiceClient, ChatExportMessage, ChatExport, ChatExportSummary, ChatExportComment, ExportChatRequest, ExportChatResponse, GetChatExportRequest, GetChatExportCommentsRequest, DeleteChatExportRequest, ListChatExportsRequest, ChatExportsResponse, ChatExportCommentsResponse, AddChatExportCommentRequest, DeleteChatExportCommentRequest, ChatServiceController, StartChatRequest, StartChatResponse, ChatServiceService as ChatService, } from "./chat.interface";
|
|
34
34
|
export { MessageFns as GenerationMessageFns, protobufPackage as GenerationProtobufPackage, StartChatRunRequest, StartChatRunResponse, SubmitToolResultRequest, CancelRunRequest, WorkflowLLMNodeRequest, WorkflowLLMNodeResponse, AgentGenerateRequest, AgentGenerateResponse, MCPToolSchemaRequest, MCPToolSchemaResponse, GenerateImageRequest, GeneratedImage, GenerateImageResponse, GenerationServiceClient, GenerationServiceController, GenerationServiceService as GenerationService, } from "./generation.interface";
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.OpenAIService = exports.OpenAICreateResponse = exports.OpenAICreateReque
|
|
|
5
5
|
exports.ProcessResponseRequest = exports.ResponseProtobufPackage = exports.RequestService = exports.StreamChunk = exports.RequestLog = exports.StreamRequestRequest = exports.CancelRequestResponse = exports.CancelRequestRequest = exports.RequestResultResponse = exports.GetRequestResultRequest = exports.RequestStatusResponse = exports.GetRequestStatusRequest = exports.CreateRequestResponse = exports.CreateRequestRequest = exports.RequestProtobufPackage = exports.KeyService = exports.GetSystemKeyRequest = exports.ValidateKeyResponse = exports.ValidateKeyRequest = exports.GetKeysByUserRequest = exports.KeysResponse = exports.KeyResponse = exports.GetKeyByIdRequest = exports.RemoveKeyRequest = exports.UpdateKeyRequest = exports.CreateKeyRequest = exports.Key = exports.KeysProtobufPackage = exports.EventService = exports.EmitResponse = exports.BroadcastRequest = exports.EmitToUserRequest = exports.EventMessage = exports.SubscribeRequest = exports.EventProtobufPackage = exports.StorageProtobufPackage = exports.StorageService = exports.ListFilesResponse = exports.ListFilesRequest = exports.ExistsResponse = exports.ExistsRequest = exports.GetMetadataResponse = exports.GetMetadataRequest = exports.DeleteResponse = exports.DeleteRequest = exports.DownloadResponse = exports.DownloadRequest = exports.UploadResponse = exports.UploadRequest = exports.FileMetadata = void 0;
|
|
6
6
|
exports.DeleteAgentRequest = exports.ListAgentsRequest = exports.GetAgentRequest = exports.UpdateAgentRequest = exports.CreateAgentRequest = exports.Agent = exports.AgentProtobufPackage = exports.BillingService = exports.ProcessWebhookResponse = exports.ProcessWebhookRequest = exports.GetPaymentsByUserResponse = exports.GetPaymentsByUserRequest = exports.GetPaymentResponse = exports.GetPaymentRequest = exports.CreatePaymentResponse = exports.CreatePaymentRequest = exports.GetUsageByUserResponse = exports.GetUsageByUserRequest = exports.GetUsageByKeyResponse = exports.GetUsageByKeyRequest = exports.GetUsageStatsResponse = exports.GetUsageStatsRequest = exports.RecordUsageResponse = exports.RecordUsageRequest = exports.GetTransactionResponse = exports.GetTransactionRequest = exports.GetTransactionsResponse = exports.GetTransactionsRequest = exports.CreateTransactionResponse = exports.CreateTransactionRequest = exports.DepositResponse = exports.DepositRequest = exports.ChargeResponse = exports.ChargeRequest = exports.GetBalanceResponse = exports.GetBalanceRequest = exports.Payment = exports.UsageStats = exports.Usage = exports.Transaction = exports.Balance = exports.BillingProtobufPackage = exports.ResponseService = exports.ProviderResponse = exports.ProviderError = exports.ProviderChunk = exports.ProviderUsage = exports.StreamUpdate = exports.StreamUpdatesRequest = exports.ProcessResponseResponse = void 0;
|
|
7
7
|
exports.RemoveItemFromArchiveRequest = exports.AddItemToArchiveRequest = exports.ListArchivesRequest = exports.DeleteArchiveRequest = exports.UpdateArchiveRequest = exports.CreateArchiveRequest = exports.ListBookmarksRequest = exports.DeleteBookmarkRequest = exports.CreateBookmarkRequest = exports.ArchiveItem = exports.Archive = exports.Bookmark = exports.LibraryProtobufPackage = exports.McpService = exports.McpServersResponse = exports.McpToolCustomizationsResponse = exports.McpServerCustomizationsResponse = exports.ListToolCustomizationsRequest = exports.ListServerCustomizationsRequest = exports.SetToolCustomizationRequest = exports.SetServerCustomizationRequest = exports.DeleteMcpServerRequest = exports.ListMcpServersRequest = exports.GetMcpServerRequest = exports.UpdateMcpServerRequest = exports.CreateMcpServerRequest = exports.McpOAuthSession = exports.McpToolCustomization = exports.McpServerCustomization = exports.McpServer = exports.McpProtobufPackage = exports.WorkflowService = exports.WorkflowsResponse = exports.DeleteEdgeRequest = exports.CreateEdgeRequest = exports.DeleteNodeRequest = exports.UpdateNodeRequest = exports.CreateNodeRequest = exports.DeleteWorkflowRequest = exports.ListWorkflowsRequest = exports.GetWorkflowRequest = exports.UpdateWorkflowRequest = exports.CreateWorkflowRequest = exports.FullWorkflow = exports.WorkflowEdge = exports.WorkflowNode = exports.Workflow = exports.WorkflowProtobufPackage = exports.AgentService = exports.AgentsResponse = void 0;
|
|
8
|
-
exports.GenerationService = exports.GenerateImageResponse = exports.GeneratedImage = exports.GenerateImageRequest = exports.MCPToolSchemaResponse = exports.MCPToolSchemaRequest = exports.AgentGenerateResponse = exports.AgentGenerateRequest = exports.WorkflowLLMNodeResponse = exports.WorkflowLLMNodeRequest = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GenerationProtobufPackage = exports.ChatService = exports.DeleteChatExportCommentRequest = exports.AddChatExportCommentRequest = exports.ChatExportCommentsResponse = exports.ChatExportsResponse = exports.ListChatExportsRequest = exports.DeleteChatExportRequest = exports.GetChatExportCommentsRequest = exports.GetChatExportRequest = exports.ExportChatResponse = exports.ExportChatRequest = exports.ChatExportComment = exports.ChatExportSummary = exports.ChatExport = exports.ChatExportMessage = exports.MessagesResponse = exports.ChatsResponse = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = exports.UpdateChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.ChatProtobufPackage = exports.LibraryService = exports.ArchiveItemsResponse = exports.ListArchiveItemsRequest = exports.ArchivesResponse = exports.BookmarksResponse = void 0;
|
|
8
|
+
exports.GenerationService = exports.GenerateImageResponse = exports.GeneratedImage = exports.GenerateImageRequest = exports.MCPToolSchemaResponse = exports.MCPToolSchemaRequest = exports.AgentGenerateResponse = exports.AgentGenerateRequest = exports.WorkflowLLMNodeResponse = exports.WorkflowLLMNodeRequest = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GenerationProtobufPackage = exports.ChatService = exports.StartChatResponse = exports.StartChatRequest = exports.DeleteChatExportCommentRequest = exports.AddChatExportCommentRequest = exports.ChatExportCommentsResponse = exports.ChatExportsResponse = exports.ListChatExportsRequest = exports.DeleteChatExportRequest = exports.GetChatExportCommentsRequest = exports.GetChatExportRequest = exports.ExportChatResponse = exports.ExportChatRequest = exports.ChatExportComment = exports.ChatExportSummary = exports.ChatExport = exports.ChatExportMessage = exports.MessagesResponse = exports.ChatsResponse = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = exports.UpdateChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.ChatProtobufPackage = exports.LibraryService = exports.ArchiveItemsResponse = exports.ListArchiveItemsRequest = exports.ArchivesResponse = exports.BookmarksResponse = void 0;
|
|
9
9
|
var shared_module_1 = require("./shared.module");
|
|
10
10
|
Object.defineProperty(exports, "SharedModule", { enumerable: true, get: function () { return shared_module_1.SharedModule; } });
|
|
11
11
|
var user_client_1 = require("./user.client");
|
|
@@ -366,6 +366,8 @@ Object.defineProperty(exports, "ChatExportsResponse", { enumerable: true, get: f
|
|
|
366
366
|
Object.defineProperty(exports, "ChatExportCommentsResponse", { enumerable: true, get: function () { return chat_interface_1.ChatExportCommentsResponse; } });
|
|
367
367
|
Object.defineProperty(exports, "AddChatExportCommentRequest", { enumerable: true, get: function () { return chat_interface_1.AddChatExportCommentRequest; } });
|
|
368
368
|
Object.defineProperty(exports, "DeleteChatExportCommentRequest", { enumerable: true, get: function () { return chat_interface_1.DeleteChatExportCommentRequest; } });
|
|
369
|
+
Object.defineProperty(exports, "StartChatRequest", { enumerable: true, get: function () { return chat_interface_1.StartChatRequest; } });
|
|
370
|
+
Object.defineProperty(exports, "StartChatResponse", { enumerable: true, get: function () { return chat_interface_1.StartChatResponse; } });
|
|
369
371
|
Object.defineProperty(exports, "ChatService", { enumerable: true, get: function () { return chat_interface_1.ChatServiceService; } });
|
|
370
372
|
// ============================
|
|
371
373
|
// Generation exports
|