geniebox-shared-lib 2.5.9 → 2.5.10
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/generation.interface.d.ts +95 -0
- package/dist/generation.interface.js +425 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -1
- package/package.json +1 -1
|
@@ -25,20 +25,83 @@ export interface SubmitToolResultRequest {
|
|
|
25
25
|
export interface CancelRunRequest {
|
|
26
26
|
runId: string;
|
|
27
27
|
}
|
|
28
|
+
/** Workflow LLM Node Execution */
|
|
29
|
+
export interface WorkflowLLMNodeRequest {
|
|
30
|
+
userId: string;
|
|
31
|
+
modelProvider: string;
|
|
32
|
+
modelName: string;
|
|
33
|
+
/** JSON array of UIMessage */
|
|
34
|
+
messagesJson: string;
|
|
35
|
+
/** Optional JSONSchema */
|
|
36
|
+
outputSchemaJson: string;
|
|
37
|
+
/** "text" or "object" */
|
|
38
|
+
responseFormat: string;
|
|
39
|
+
}
|
|
40
|
+
export interface WorkflowLLMNodeResponse {
|
|
41
|
+
/** For text format */
|
|
42
|
+
text: string;
|
|
43
|
+
/** For object format */
|
|
44
|
+
objectJson: string;
|
|
45
|
+
totalTokens: number;
|
|
46
|
+
error: string;
|
|
47
|
+
}
|
|
48
|
+
/** Agent Generation */
|
|
49
|
+
export interface AgentGenerateRequest {
|
|
50
|
+
userId: string;
|
|
51
|
+
modelProvider: string;
|
|
52
|
+
modelName: string;
|
|
53
|
+
system: string;
|
|
54
|
+
prompt: string;
|
|
55
|
+
/** JSONSchema */
|
|
56
|
+
schemaJson: string;
|
|
57
|
+
}
|
|
58
|
+
export interface AgentGenerateResponse {
|
|
59
|
+
/** For streaming via SSE */
|
|
60
|
+
requestId: string;
|
|
61
|
+
status: string;
|
|
62
|
+
}
|
|
63
|
+
/** MCP Tool Schema Example */
|
|
64
|
+
export interface MCPToolSchemaRequest {
|
|
65
|
+
userId: string;
|
|
66
|
+
modelProvider: string;
|
|
67
|
+
modelName: string;
|
|
68
|
+
/** MCPToolInfo */
|
|
69
|
+
toolInfoJson: string;
|
|
70
|
+
/** Optional */
|
|
71
|
+
prompt: string;
|
|
72
|
+
}
|
|
73
|
+
export interface MCPToolSchemaResponse {
|
|
74
|
+
objectJson: string;
|
|
75
|
+
error: string;
|
|
76
|
+
}
|
|
28
77
|
export declare const GENERATION_PACKAGE_NAME = "generation";
|
|
29
78
|
export declare const StartChatRunRequest: MessageFns<StartChatRunRequest>;
|
|
30
79
|
export declare const StartChatRunResponse: MessageFns<StartChatRunResponse>;
|
|
31
80
|
export declare const SubmitToolResultRequest: MessageFns<SubmitToolResultRequest>;
|
|
32
81
|
export declare const CancelRunRequest: MessageFns<CancelRunRequest>;
|
|
82
|
+
export declare const WorkflowLLMNodeRequest: MessageFns<WorkflowLLMNodeRequest>;
|
|
83
|
+
export declare const WorkflowLLMNodeResponse: MessageFns<WorkflowLLMNodeResponse>;
|
|
84
|
+
export declare const AgentGenerateRequest: MessageFns<AgentGenerateRequest>;
|
|
85
|
+
export declare const AgentGenerateResponse: MessageFns<AgentGenerateResponse>;
|
|
86
|
+
export declare const MCPToolSchemaRequest: MessageFns<MCPToolSchemaRequest>;
|
|
87
|
+
export declare const MCPToolSchemaResponse: MessageFns<MCPToolSchemaResponse>;
|
|
33
88
|
export interface GenerationServiceClient {
|
|
34
89
|
startChatRun(request: StartChatRunRequest, metadata?: Metadata): Observable<StartChatRunResponse>;
|
|
35
90
|
submitToolResult(request: SubmitToolResultRequest, metadata?: Metadata): Observable<Empty>;
|
|
36
91
|
cancelRun(request: CancelRunRequest, metadata?: Metadata): Observable<Empty>;
|
|
92
|
+
/** New methods for workflow, agent, and MCP */
|
|
93
|
+
executeWorkflowLlmNode(request: WorkflowLLMNodeRequest, metadata?: Metadata): Observable<WorkflowLLMNodeResponse>;
|
|
94
|
+
generateAgent(request: AgentGenerateRequest, metadata?: Metadata): Observable<AgentGenerateResponse>;
|
|
95
|
+
generateMcpToolSchema(request: MCPToolSchemaRequest, metadata?: Metadata): Observable<MCPToolSchemaResponse>;
|
|
37
96
|
}
|
|
38
97
|
export interface GenerationServiceController {
|
|
39
98
|
startChatRun(request: StartChatRunRequest, metadata?: Metadata): Promise<StartChatRunResponse> | Observable<StartChatRunResponse> | StartChatRunResponse;
|
|
40
99
|
submitToolResult(request: SubmitToolResultRequest, metadata?: Metadata): void;
|
|
41
100
|
cancelRun(request: CancelRunRequest, metadata?: Metadata): void;
|
|
101
|
+
/** New methods for workflow, agent, and MCP */
|
|
102
|
+
executeWorkflowLlmNode(request: WorkflowLLMNodeRequest, metadata?: Metadata): Promise<WorkflowLLMNodeResponse> | Observable<WorkflowLLMNodeResponse> | WorkflowLLMNodeResponse;
|
|
103
|
+
generateAgent(request: AgentGenerateRequest, metadata?: Metadata): Promise<AgentGenerateResponse> | Observable<AgentGenerateResponse> | AgentGenerateResponse;
|
|
104
|
+
generateMcpToolSchema(request: MCPToolSchemaRequest, metadata?: Metadata): Promise<MCPToolSchemaResponse> | Observable<MCPToolSchemaResponse> | MCPToolSchemaResponse;
|
|
42
105
|
}
|
|
43
106
|
export declare function GenerationServiceControllerMethods(): (constructor: Function) => void;
|
|
44
107
|
export declare const GENERATION_SERVICE_NAME = "GenerationService";
|
|
@@ -71,11 +134,43 @@ export declare const GenerationServiceService: {
|
|
|
71
134
|
readonly responseSerialize: (value: Empty) => Buffer;
|
|
72
135
|
readonly responseDeserialize: (value: Buffer) => Empty;
|
|
73
136
|
};
|
|
137
|
+
/** New methods for workflow, agent, and MCP */
|
|
138
|
+
readonly executeWorkflowLlmNode: {
|
|
139
|
+
readonly path: "/generation.GenerationService/ExecuteWorkflowLLMNode";
|
|
140
|
+
readonly requestStream: false;
|
|
141
|
+
readonly responseStream: false;
|
|
142
|
+
readonly requestSerialize: (value: WorkflowLLMNodeRequest) => Buffer;
|
|
143
|
+
readonly requestDeserialize: (value: Buffer) => WorkflowLLMNodeRequest;
|
|
144
|
+
readonly responseSerialize: (value: WorkflowLLMNodeResponse) => Buffer;
|
|
145
|
+
readonly responseDeserialize: (value: Buffer) => WorkflowLLMNodeResponse;
|
|
146
|
+
};
|
|
147
|
+
readonly generateAgent: {
|
|
148
|
+
readonly path: "/generation.GenerationService/GenerateAgent";
|
|
149
|
+
readonly requestStream: false;
|
|
150
|
+
readonly responseStream: false;
|
|
151
|
+
readonly requestSerialize: (value: AgentGenerateRequest) => Buffer;
|
|
152
|
+
readonly requestDeserialize: (value: Buffer) => AgentGenerateRequest;
|
|
153
|
+
readonly responseSerialize: (value: AgentGenerateResponse) => Buffer;
|
|
154
|
+
readonly responseDeserialize: (value: Buffer) => AgentGenerateResponse;
|
|
155
|
+
};
|
|
156
|
+
readonly generateMcpToolSchema: {
|
|
157
|
+
readonly path: "/generation.GenerationService/GenerateMCPToolSchema";
|
|
158
|
+
readonly requestStream: false;
|
|
159
|
+
readonly responseStream: false;
|
|
160
|
+
readonly requestSerialize: (value: MCPToolSchemaRequest) => Buffer;
|
|
161
|
+
readonly requestDeserialize: (value: Buffer) => MCPToolSchemaRequest;
|
|
162
|
+
readonly responseSerialize: (value: MCPToolSchemaResponse) => Buffer;
|
|
163
|
+
readonly responseDeserialize: (value: Buffer) => MCPToolSchemaResponse;
|
|
164
|
+
};
|
|
74
165
|
};
|
|
75
166
|
export interface GenerationServiceServer extends UntypedServiceImplementation {
|
|
76
167
|
startChatRun: handleUnaryCall<StartChatRunRequest, StartChatRunResponse>;
|
|
77
168
|
submitToolResult: handleUnaryCall<SubmitToolResultRequest, Empty>;
|
|
78
169
|
cancelRun: handleUnaryCall<CancelRunRequest, Empty>;
|
|
170
|
+
/** New methods for workflow, agent, and MCP */
|
|
171
|
+
executeWorkflowLlmNode: handleUnaryCall<WorkflowLLMNodeRequest, WorkflowLLMNodeResponse>;
|
|
172
|
+
generateAgent: handleUnaryCall<AgentGenerateRequest, AgentGenerateResponse>;
|
|
173
|
+
generateMcpToolSchema: handleUnaryCall<MCPToolSchemaRequest, MCPToolSchemaResponse>;
|
|
79
174
|
}
|
|
80
175
|
export interface MessageFns<T> {
|
|
81
176
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v5.28.2
|
|
6
6
|
// source: generation.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.GenerationServiceService = exports.GENERATION_SERVICE_NAME = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GENERATION_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.GenerationServiceService = exports.GENERATION_SERVICE_NAME = exports.MCPToolSchemaResponse = exports.MCPToolSchemaRequest = exports.AgentGenerateResponse = exports.AgentGenerateRequest = exports.WorkflowLLMNodeResponse = exports.WorkflowLLMNodeRequest = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GENERATION_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.GenerationServiceControllerMethods = GenerationServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
@@ -207,10 +207,405 @@ exports.CancelRunRequest = {
|
|
|
207
207
|
return message;
|
|
208
208
|
},
|
|
209
209
|
};
|
|
210
|
+
function createBaseWorkflowLLMNodeRequest() {
|
|
211
|
+
return { userId: "", modelProvider: "", modelName: "", messagesJson: "", outputSchemaJson: "", responseFormat: "" };
|
|
212
|
+
}
|
|
213
|
+
exports.WorkflowLLMNodeRequest = {
|
|
214
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
215
|
+
if (message.userId !== "") {
|
|
216
|
+
writer.uint32(10).string(message.userId);
|
|
217
|
+
}
|
|
218
|
+
if (message.modelProvider !== "") {
|
|
219
|
+
writer.uint32(18).string(message.modelProvider);
|
|
220
|
+
}
|
|
221
|
+
if (message.modelName !== "") {
|
|
222
|
+
writer.uint32(26).string(message.modelName);
|
|
223
|
+
}
|
|
224
|
+
if (message.messagesJson !== "") {
|
|
225
|
+
writer.uint32(34).string(message.messagesJson);
|
|
226
|
+
}
|
|
227
|
+
if (message.outputSchemaJson !== "") {
|
|
228
|
+
writer.uint32(42).string(message.outputSchemaJson);
|
|
229
|
+
}
|
|
230
|
+
if (message.responseFormat !== "") {
|
|
231
|
+
writer.uint32(50).string(message.responseFormat);
|
|
232
|
+
}
|
|
233
|
+
return writer;
|
|
234
|
+
},
|
|
235
|
+
decode(input, length) {
|
|
236
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
237
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
238
|
+
const message = createBaseWorkflowLLMNodeRequest();
|
|
239
|
+
while (reader.pos < end) {
|
|
240
|
+
const tag = reader.uint32();
|
|
241
|
+
switch (tag >>> 3) {
|
|
242
|
+
case 1: {
|
|
243
|
+
if (tag !== 10) {
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
message.userId = reader.string();
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
case 2: {
|
|
250
|
+
if (tag !== 18) {
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
message.modelProvider = reader.string();
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
case 3: {
|
|
257
|
+
if (tag !== 26) {
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
message.modelName = reader.string();
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
case 4: {
|
|
264
|
+
if (tag !== 34) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
message.messagesJson = reader.string();
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
case 5: {
|
|
271
|
+
if (tag !== 42) {
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
message.outputSchemaJson = reader.string();
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
case 6: {
|
|
278
|
+
if (tag !== 50) {
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
message.responseFormat = reader.string();
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
reader.skip(tag & 7);
|
|
289
|
+
}
|
|
290
|
+
return message;
|
|
291
|
+
},
|
|
292
|
+
};
|
|
293
|
+
function createBaseWorkflowLLMNodeResponse() {
|
|
294
|
+
return { text: "", objectJson: "", totalTokens: 0, error: "" };
|
|
295
|
+
}
|
|
296
|
+
exports.WorkflowLLMNodeResponse = {
|
|
297
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
298
|
+
if (message.text !== "") {
|
|
299
|
+
writer.uint32(10).string(message.text);
|
|
300
|
+
}
|
|
301
|
+
if (message.objectJson !== "") {
|
|
302
|
+
writer.uint32(18).string(message.objectJson);
|
|
303
|
+
}
|
|
304
|
+
if (message.totalTokens !== 0) {
|
|
305
|
+
writer.uint32(24).int32(message.totalTokens);
|
|
306
|
+
}
|
|
307
|
+
if (message.error !== "") {
|
|
308
|
+
writer.uint32(34).string(message.error);
|
|
309
|
+
}
|
|
310
|
+
return writer;
|
|
311
|
+
},
|
|
312
|
+
decode(input, length) {
|
|
313
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
314
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
315
|
+
const message = createBaseWorkflowLLMNodeResponse();
|
|
316
|
+
while (reader.pos < end) {
|
|
317
|
+
const tag = reader.uint32();
|
|
318
|
+
switch (tag >>> 3) {
|
|
319
|
+
case 1: {
|
|
320
|
+
if (tag !== 10) {
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
message.text = reader.string();
|
|
324
|
+
continue;
|
|
325
|
+
}
|
|
326
|
+
case 2: {
|
|
327
|
+
if (tag !== 18) {
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
message.objectJson = reader.string();
|
|
331
|
+
continue;
|
|
332
|
+
}
|
|
333
|
+
case 3: {
|
|
334
|
+
if (tag !== 24) {
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
message.totalTokens = reader.int32();
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
case 4: {
|
|
341
|
+
if (tag !== 34) {
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
message.error = reader.string();
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
reader.skip(tag & 7);
|
|
352
|
+
}
|
|
353
|
+
return message;
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
function createBaseAgentGenerateRequest() {
|
|
357
|
+
return { userId: "", modelProvider: "", modelName: "", system: "", prompt: "", schemaJson: "" };
|
|
358
|
+
}
|
|
359
|
+
exports.AgentGenerateRequest = {
|
|
360
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
361
|
+
if (message.userId !== "") {
|
|
362
|
+
writer.uint32(10).string(message.userId);
|
|
363
|
+
}
|
|
364
|
+
if (message.modelProvider !== "") {
|
|
365
|
+
writer.uint32(18).string(message.modelProvider);
|
|
366
|
+
}
|
|
367
|
+
if (message.modelName !== "") {
|
|
368
|
+
writer.uint32(26).string(message.modelName);
|
|
369
|
+
}
|
|
370
|
+
if (message.system !== "") {
|
|
371
|
+
writer.uint32(34).string(message.system);
|
|
372
|
+
}
|
|
373
|
+
if (message.prompt !== "") {
|
|
374
|
+
writer.uint32(42).string(message.prompt);
|
|
375
|
+
}
|
|
376
|
+
if (message.schemaJson !== "") {
|
|
377
|
+
writer.uint32(50).string(message.schemaJson);
|
|
378
|
+
}
|
|
379
|
+
return writer;
|
|
380
|
+
},
|
|
381
|
+
decode(input, length) {
|
|
382
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
383
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
384
|
+
const message = createBaseAgentGenerateRequest();
|
|
385
|
+
while (reader.pos < end) {
|
|
386
|
+
const tag = reader.uint32();
|
|
387
|
+
switch (tag >>> 3) {
|
|
388
|
+
case 1: {
|
|
389
|
+
if (tag !== 10) {
|
|
390
|
+
break;
|
|
391
|
+
}
|
|
392
|
+
message.userId = reader.string();
|
|
393
|
+
continue;
|
|
394
|
+
}
|
|
395
|
+
case 2: {
|
|
396
|
+
if (tag !== 18) {
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
message.modelProvider = reader.string();
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
402
|
+
case 3: {
|
|
403
|
+
if (tag !== 26) {
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
message.modelName = reader.string();
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
case 4: {
|
|
410
|
+
if (tag !== 34) {
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
message.system = reader.string();
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
case 5: {
|
|
417
|
+
if (tag !== 42) {
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
message.prompt = reader.string();
|
|
421
|
+
continue;
|
|
422
|
+
}
|
|
423
|
+
case 6: {
|
|
424
|
+
if (tag !== 50) {
|
|
425
|
+
break;
|
|
426
|
+
}
|
|
427
|
+
message.schemaJson = reader.string();
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
reader.skip(tag & 7);
|
|
435
|
+
}
|
|
436
|
+
return message;
|
|
437
|
+
},
|
|
438
|
+
};
|
|
439
|
+
function createBaseAgentGenerateResponse() {
|
|
440
|
+
return { requestId: "", status: "" };
|
|
441
|
+
}
|
|
442
|
+
exports.AgentGenerateResponse = {
|
|
443
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
444
|
+
if (message.requestId !== "") {
|
|
445
|
+
writer.uint32(10).string(message.requestId);
|
|
446
|
+
}
|
|
447
|
+
if (message.status !== "") {
|
|
448
|
+
writer.uint32(18).string(message.status);
|
|
449
|
+
}
|
|
450
|
+
return writer;
|
|
451
|
+
},
|
|
452
|
+
decode(input, length) {
|
|
453
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
454
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
455
|
+
const message = createBaseAgentGenerateResponse();
|
|
456
|
+
while (reader.pos < end) {
|
|
457
|
+
const tag = reader.uint32();
|
|
458
|
+
switch (tag >>> 3) {
|
|
459
|
+
case 1: {
|
|
460
|
+
if (tag !== 10) {
|
|
461
|
+
break;
|
|
462
|
+
}
|
|
463
|
+
message.requestId = reader.string();
|
|
464
|
+
continue;
|
|
465
|
+
}
|
|
466
|
+
case 2: {
|
|
467
|
+
if (tag !== 18) {
|
|
468
|
+
break;
|
|
469
|
+
}
|
|
470
|
+
message.status = reader.string();
|
|
471
|
+
continue;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
475
|
+
break;
|
|
476
|
+
}
|
|
477
|
+
reader.skip(tag & 7);
|
|
478
|
+
}
|
|
479
|
+
return message;
|
|
480
|
+
},
|
|
481
|
+
};
|
|
482
|
+
function createBaseMCPToolSchemaRequest() {
|
|
483
|
+
return { userId: "", modelProvider: "", modelName: "", toolInfoJson: "", prompt: "" };
|
|
484
|
+
}
|
|
485
|
+
exports.MCPToolSchemaRequest = {
|
|
486
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
487
|
+
if (message.userId !== "") {
|
|
488
|
+
writer.uint32(10).string(message.userId);
|
|
489
|
+
}
|
|
490
|
+
if (message.modelProvider !== "") {
|
|
491
|
+
writer.uint32(18).string(message.modelProvider);
|
|
492
|
+
}
|
|
493
|
+
if (message.modelName !== "") {
|
|
494
|
+
writer.uint32(26).string(message.modelName);
|
|
495
|
+
}
|
|
496
|
+
if (message.toolInfoJson !== "") {
|
|
497
|
+
writer.uint32(34).string(message.toolInfoJson);
|
|
498
|
+
}
|
|
499
|
+
if (message.prompt !== "") {
|
|
500
|
+
writer.uint32(42).string(message.prompt);
|
|
501
|
+
}
|
|
502
|
+
return writer;
|
|
503
|
+
},
|
|
504
|
+
decode(input, length) {
|
|
505
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
506
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
507
|
+
const message = createBaseMCPToolSchemaRequest();
|
|
508
|
+
while (reader.pos < end) {
|
|
509
|
+
const tag = reader.uint32();
|
|
510
|
+
switch (tag >>> 3) {
|
|
511
|
+
case 1: {
|
|
512
|
+
if (tag !== 10) {
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
515
|
+
message.userId = reader.string();
|
|
516
|
+
continue;
|
|
517
|
+
}
|
|
518
|
+
case 2: {
|
|
519
|
+
if (tag !== 18) {
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
message.modelProvider = reader.string();
|
|
523
|
+
continue;
|
|
524
|
+
}
|
|
525
|
+
case 3: {
|
|
526
|
+
if (tag !== 26) {
|
|
527
|
+
break;
|
|
528
|
+
}
|
|
529
|
+
message.modelName = reader.string();
|
|
530
|
+
continue;
|
|
531
|
+
}
|
|
532
|
+
case 4: {
|
|
533
|
+
if (tag !== 34) {
|
|
534
|
+
break;
|
|
535
|
+
}
|
|
536
|
+
message.toolInfoJson = reader.string();
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
539
|
+
case 5: {
|
|
540
|
+
if (tag !== 42) {
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
message.prompt = reader.string();
|
|
544
|
+
continue;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
reader.skip(tag & 7);
|
|
551
|
+
}
|
|
552
|
+
return message;
|
|
553
|
+
},
|
|
554
|
+
};
|
|
555
|
+
function createBaseMCPToolSchemaResponse() {
|
|
556
|
+
return { objectJson: "", error: "" };
|
|
557
|
+
}
|
|
558
|
+
exports.MCPToolSchemaResponse = {
|
|
559
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
560
|
+
if (message.objectJson !== "") {
|
|
561
|
+
writer.uint32(10).string(message.objectJson);
|
|
562
|
+
}
|
|
563
|
+
if (message.error !== "") {
|
|
564
|
+
writer.uint32(18).string(message.error);
|
|
565
|
+
}
|
|
566
|
+
return writer;
|
|
567
|
+
},
|
|
568
|
+
decode(input, length) {
|
|
569
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
570
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
571
|
+
const message = createBaseMCPToolSchemaResponse();
|
|
572
|
+
while (reader.pos < end) {
|
|
573
|
+
const tag = reader.uint32();
|
|
574
|
+
switch (tag >>> 3) {
|
|
575
|
+
case 1: {
|
|
576
|
+
if (tag !== 10) {
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
message.objectJson = reader.string();
|
|
580
|
+
continue;
|
|
581
|
+
}
|
|
582
|
+
case 2: {
|
|
583
|
+
if (tag !== 18) {
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
message.error = reader.string();
|
|
587
|
+
continue;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
591
|
+
break;
|
|
592
|
+
}
|
|
593
|
+
reader.skip(tag & 7);
|
|
594
|
+
}
|
|
595
|
+
return message;
|
|
596
|
+
},
|
|
597
|
+
};
|
|
210
598
|
protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: struct_interface_1.Struct.wrap, toObject: struct_interface_1.Struct.unwrap };
|
|
211
599
|
function GenerationServiceControllerMethods() {
|
|
212
600
|
return function (constructor) {
|
|
213
|
-
const grpcMethods = [
|
|
601
|
+
const grpcMethods = [
|
|
602
|
+
"startChatRun",
|
|
603
|
+
"submitToolResult",
|
|
604
|
+
"cancelRun",
|
|
605
|
+
"executeWorkflowLlmNode",
|
|
606
|
+
"generateAgent",
|
|
607
|
+
"generateMcpToolSchema",
|
|
608
|
+
];
|
|
214
609
|
for (const method of grpcMethods) {
|
|
215
610
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
216
611
|
(0, microservices_1.GrpcMethod)("GenerationService", method)(constructor.prototype[method], method, descriptor);
|
|
@@ -251,4 +646,32 @@ exports.GenerationServiceService = {
|
|
|
251
646
|
responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
|
|
252
647
|
responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
|
|
253
648
|
},
|
|
649
|
+
/** New methods for workflow, agent, and MCP */
|
|
650
|
+
executeWorkflowLlmNode: {
|
|
651
|
+
path: "/generation.GenerationService/ExecuteWorkflowLLMNode",
|
|
652
|
+
requestStream: false,
|
|
653
|
+
responseStream: false,
|
|
654
|
+
requestSerialize: (value) => Buffer.from(exports.WorkflowLLMNodeRequest.encode(value).finish()),
|
|
655
|
+
requestDeserialize: (value) => exports.WorkflowLLMNodeRequest.decode(value),
|
|
656
|
+
responseSerialize: (value) => Buffer.from(exports.WorkflowLLMNodeResponse.encode(value).finish()),
|
|
657
|
+
responseDeserialize: (value) => exports.WorkflowLLMNodeResponse.decode(value),
|
|
658
|
+
},
|
|
659
|
+
generateAgent: {
|
|
660
|
+
path: "/generation.GenerationService/GenerateAgent",
|
|
661
|
+
requestStream: false,
|
|
662
|
+
responseStream: false,
|
|
663
|
+
requestSerialize: (value) => Buffer.from(exports.AgentGenerateRequest.encode(value).finish()),
|
|
664
|
+
requestDeserialize: (value) => exports.AgentGenerateRequest.decode(value),
|
|
665
|
+
responseSerialize: (value) => Buffer.from(exports.AgentGenerateResponse.encode(value).finish()),
|
|
666
|
+
responseDeserialize: (value) => exports.AgentGenerateResponse.decode(value),
|
|
667
|
+
},
|
|
668
|
+
generateMcpToolSchema: {
|
|
669
|
+
path: "/generation.GenerationService/GenerateMCPToolSchema",
|
|
670
|
+
requestStream: false,
|
|
671
|
+
responseStream: false,
|
|
672
|
+
requestSerialize: (value) => Buffer.from(exports.MCPToolSchemaRequest.encode(value).finish()),
|
|
673
|
+
requestDeserialize: (value) => exports.MCPToolSchemaRequest.decode(value),
|
|
674
|
+
responseSerialize: (value) => Buffer.from(exports.MCPToolSchemaResponse.encode(value).finish()),
|
|
675
|
+
responseDeserialize: (value) => exports.MCPToolSchemaResponse.decode(value),
|
|
676
|
+
},
|
|
254
677
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -30,4 +30,4 @@ export { MessageFns as WorkflowMessageFns, protobufPackage as WorkflowProtobufPa
|
|
|
30
30
|
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";
|
|
31
31
|
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";
|
|
32
32
|
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 GenerationMessageFns, protobufPackage as GenerationProtobufPackage, StartChatRunRequest, StartChatRunResponse, SubmitToolResultRequest, CancelRunRequest, GenerationServiceClient, GenerationServiceController, GenerationServiceService as GenerationService, } from "./generation.interface";
|
|
33
|
+
export { MessageFns as GenerationMessageFns, protobufPackage as GenerationProtobufPackage, StartChatRunRequest, StartChatRunResponse, SubmitToolResultRequest, CancelRunRequest, WorkflowLLMNodeRequest, WorkflowLLMNodeResponse, AgentGenerateRequest, AgentGenerateResponse, MCPToolSchemaRequest, MCPToolSchemaResponse, GenerationServiceClient, GenerationServiceController, GenerationServiceService as GenerationService, } from "./generation.interface";
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.DownloadRequest = exports.UploadResponse = exports.UploadRequest = expor
|
|
|
5
5
|
exports.Balance = exports.BillingProtobufPackage = exports.ResponseService = exports.ProviderResponse = exports.ProviderError = exports.ProviderChunk = exports.ProviderUsage = exports.StreamUpdate = exports.StreamUpdatesRequest = exports.ProcessResponseResponse = 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.FileProtobufPackage = exports.StorageService = exports.DeleteResponse = exports.DeleteRequest = exports.DownloadResponse = void 0;
|
|
6
6
|
exports.GetWorkflowRequest = exports.UpdateWorkflowRequest = exports.CreateWorkflowRequest = exports.FullWorkflow = exports.WorkflowEdge = exports.WorkflowNode = exports.Workflow = exports.WorkflowProtobufPackage = exports.AgentService = exports.AgentsResponse = 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 = void 0;
|
|
7
7
|
exports.UpdateChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.ChatProtobufPackage = exports.LibraryService = exports.ArchiveItemsResponse = exports.ListArchiveItemsRequest = exports.ArchivesResponse = exports.BookmarksResponse = 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 = void 0;
|
|
8
|
-
exports.GenerationService = 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 = void 0;
|
|
8
|
+
exports.GenerationService = 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 = 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");
|
|
@@ -365,4 +365,10 @@ Object.defineProperty(exports, "StartChatRunRequest", { enumerable: true, get: f
|
|
|
365
365
|
Object.defineProperty(exports, "StartChatRunResponse", { enumerable: true, get: function () { return generation_interface_1.StartChatRunResponse; } });
|
|
366
366
|
Object.defineProperty(exports, "SubmitToolResultRequest", { enumerable: true, get: function () { return generation_interface_1.SubmitToolResultRequest; } });
|
|
367
367
|
Object.defineProperty(exports, "CancelRunRequest", { enumerable: true, get: function () { return generation_interface_1.CancelRunRequest; } });
|
|
368
|
+
Object.defineProperty(exports, "WorkflowLLMNodeRequest", { enumerable: true, get: function () { return generation_interface_1.WorkflowLLMNodeRequest; } });
|
|
369
|
+
Object.defineProperty(exports, "WorkflowLLMNodeResponse", { enumerable: true, get: function () { return generation_interface_1.WorkflowLLMNodeResponse; } });
|
|
370
|
+
Object.defineProperty(exports, "AgentGenerateRequest", { enumerable: true, get: function () { return generation_interface_1.AgentGenerateRequest; } });
|
|
371
|
+
Object.defineProperty(exports, "AgentGenerateResponse", { enumerable: true, get: function () { return generation_interface_1.AgentGenerateResponse; } });
|
|
372
|
+
Object.defineProperty(exports, "MCPToolSchemaRequest", { enumerable: true, get: function () { return generation_interface_1.MCPToolSchemaRequest; } });
|
|
373
|
+
Object.defineProperty(exports, "MCPToolSchemaResponse", { enumerable: true, get: function () { return generation_interface_1.MCPToolSchemaResponse; } });
|
|
368
374
|
Object.defineProperty(exports, "GenerationService", { enumerable: true, get: function () { return generation_interface_1.GenerationServiceService; } });
|