@openserv-labs/sdk 1.8.1 → 1.8.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/agent.d.ts +10 -23
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +3 -4
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -7
- package/dist/mcp.d.ts +8 -8
- package/dist/types.d.ts +198 -2938
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -305
- package/package.json +1 -1
package/dist/agent.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { type AxiosInstance } from 'axios';
|
|
2
|
-
import type { GetFilesParams, GetSecretsParams, GetSecretValueParams, UploadFileParams, DeleteFileParams, MarkTaskAsErroredParams, CompleteTaskParams, SendChatMessageParams, GetTaskDetailParams, GetAgentsParams, GetTasksParams, CreateTaskParams, AddLogToTaskParams, RequestHumanAssistanceParams, UpdateTaskStatusParams, ProcessParams, IntegrationCallRequest, GetChatMessagesParams, GetFilesResponse, GetSecretsResponse, UploadFileResponse, DeleteFileResponse, GetTaskDetailResponse, GetAgentsResponse, GetTasksResponse, CreateTaskResponse } from './types';
|
|
3
|
-
import type { doTaskActionSchema, respondChatMessageActionSchema } from './types';
|
|
4
|
-
import { actionSchema } from './types';
|
|
2
|
+
import type { GetFilesParams, GetSecretsParams, GetSecretValueParams, UploadFileParams, DeleteFileParams, MarkTaskAsErroredParams, CompleteTaskParams, SendChatMessageParams, GetTaskDetailParams, GetAgentsParams, GetTasksParams, CreateTaskParams, AddLogToTaskParams, RequestHumanAssistanceParams, UpdateTaskStatusParams, ProcessParams, IntegrationCallRequest, GetChatMessagesParams, AgentChatMessagesResponse, GetFilesResponse, GetSecretsResponse, UploadFileResponse, DeleteFileResponse, GetTaskDetailResponse, GetAgentsResponse, GetTasksResponse, CreateTaskResponse, ActionSchema, DoTaskActionSchema, RespondChatMessageActionSchema } from './types';
|
|
5
3
|
import type { ChatCompletionMessageParam, ChatCompletion } from 'openai/resources/chat/completions';
|
|
6
4
|
import OpenAI from 'openai';
|
|
7
5
|
import type { z } from 'zod';
|
|
@@ -44,7 +42,7 @@ export interface AgentOptions<T extends string> {
|
|
|
44
42
|
*/
|
|
45
43
|
mcpServers?: Record<T, MCPServerConfig>;
|
|
46
44
|
}
|
|
47
|
-
export declare class Agent<M extends string> {
|
|
45
|
+
export declare class Agent<M extends string = string> {
|
|
48
46
|
private options;
|
|
49
47
|
/**
|
|
50
48
|
* The Express application instance used to handle HTTP requests.
|
|
@@ -148,7 +146,7 @@ export declare class Agent<M extends string> {
|
|
|
148
146
|
* @param {Function} capability.run - Function that implements the capability's behavior
|
|
149
147
|
* @param {Object} capability.run.params - Parameters for the run function
|
|
150
148
|
* @param {z.infer<S>} capability.run.params.args - Validated arguments matching the schema
|
|
151
|
-
* @param {
|
|
149
|
+
* @param {ActionSchema} [capability.run.params.action] - Optional action context
|
|
152
150
|
* @param {ChatCompletionMessageParam[]} capability.run.messages - Chat message history
|
|
153
151
|
* @returns {this} The agent instance for method chaining
|
|
154
152
|
* @throws {Error} If a capability with the same name already exists
|
|
@@ -159,7 +157,7 @@ export declare class Agent<M extends string> {
|
|
|
159
157
|
schema: S;
|
|
160
158
|
run(this: Agent<M>, params: {
|
|
161
159
|
args: z.infer<S>;
|
|
162
|
-
action?:
|
|
160
|
+
action?: ActionSchema;
|
|
163
161
|
}, messages: ChatCompletionMessageParam[]): string | Promise<string>;
|
|
164
162
|
}): this;
|
|
165
163
|
/**
|
|
@@ -182,7 +180,7 @@ export declare class Agent<M extends string> {
|
|
|
182
180
|
schema: T[K];
|
|
183
181
|
run(this: Agent<M>, params: {
|
|
184
182
|
args: z.infer<T[K]>;
|
|
185
|
-
action?:
|
|
183
|
+
action?: ActionSchema;
|
|
186
184
|
}, messages: ChatCompletionMessageParam[]): string | Promise<string>;
|
|
187
185
|
};
|
|
188
186
|
}): this;
|
|
@@ -292,18 +290,7 @@ export declare class Agent<M extends string> {
|
|
|
292
290
|
* @param {number} params.agentId - ID of the agent to get chat messages from
|
|
293
291
|
* @returns {Promise<AgentChatMessagesResponse>} List of chat messages
|
|
294
292
|
*/
|
|
295
|
-
getChatMessages(params: GetChatMessagesParams): Promise<
|
|
296
|
-
messages: {
|
|
297
|
-
message: string;
|
|
298
|
-
id: number;
|
|
299
|
-
createdAt: Date;
|
|
300
|
-
author: "agent" | "user";
|
|
301
|
-
}[];
|
|
302
|
-
agent: {
|
|
303
|
-
name: string;
|
|
304
|
-
id: number;
|
|
305
|
-
};
|
|
306
|
-
}>;
|
|
293
|
+
getChatMessages(params: GetChatMessagesParams): Promise<AgentChatMessagesResponse>;
|
|
307
294
|
/**
|
|
308
295
|
* Creates a new task in a workspace.
|
|
309
296
|
*
|
|
@@ -366,13 +353,13 @@ export declare class Agent<M extends string> {
|
|
|
366
353
|
* This method can be overridden by extending classes to customize task handling
|
|
367
354
|
* @protected
|
|
368
355
|
*/
|
|
369
|
-
protected doTask(action:
|
|
356
|
+
protected doTask(action: DoTaskActionSchema): Promise<void>;
|
|
370
357
|
/**
|
|
371
358
|
* Handle a chat message response request
|
|
372
359
|
* This method can be overridden by extending classes to customize chat handling
|
|
373
360
|
* @protected
|
|
374
361
|
*/
|
|
375
|
-
protected respondToChat(action:
|
|
362
|
+
protected respondToChat(action: RespondChatMessageActionSchema): Promise<void>;
|
|
376
363
|
/**
|
|
377
364
|
* Handles execution of a specific tool/capability.
|
|
378
365
|
*
|
|
@@ -381,7 +368,7 @@ export declare class Agent<M extends string> {
|
|
|
381
368
|
* @param {string} req.params.toolName - Name of the tool to execute
|
|
382
369
|
* @param {Object} req.body - Request body
|
|
383
370
|
* @param {z.infer<z.ZodTypeAny>} [req.body.args] - Arguments for the tool
|
|
384
|
-
* @param {
|
|
371
|
+
* @param {ActionSchema} [req.body.action] - Action context
|
|
385
372
|
* @param {ChatCompletionMessageParam[]} [req.body.messages] - Message history
|
|
386
373
|
* @returns {Promise<{result: string}>} The result of the tool execution
|
|
387
374
|
* @throws {BadRequest} If tool name is missing or tool is not found
|
|
@@ -393,7 +380,7 @@ export declare class Agent<M extends string> {
|
|
|
393
380
|
};
|
|
394
381
|
body: {
|
|
395
382
|
args?: z.infer<z.ZodTypeAny>;
|
|
396
|
-
action?:
|
|
383
|
+
action?: ActionSchema;
|
|
397
384
|
messages?: ChatCompletionMessageParam[];
|
|
398
385
|
};
|
|
399
386
|
}): Promise<{
|
package/dist/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAA;AAUjD,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC5B,sBAAsB,EACtB,aAAa,EACb,sBAAsB,EACtB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAA;AAUjD,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC5B,sBAAsB,EACtB,aAAa,EACb,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,gBAAgB,EAEhB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACj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B;IAY7C;;;;;;;;;;OAUG;IACG,sBAAsB,CAAC,MAAM,EAAE,4BAA4B;IA0BjE;;;;;;;;OAQG;IACG,gBAAgB,CAAC,MAAM,EAAE,sBAAsB;IAUrD;;;;;;;OAOG;IACG,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IA4FnE;;;;OAIG;cACa,MAAM,CAAC,MAAM,EAAE,kBAAkB;IA6BjD;;;;OAIG;cACa,aAAa,CAAC,MAAM,EAAE,8BAA8B;IA+BpE;;;;;;;;;;;;;OAaG;IACG,eAAe,CAAC,GAAG,EAAE;QACzB,MAAM,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAA;QAC5B,IAAI,EAAE;YACJ,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;YAC5B,MAAM,CAAC,EAAE,YAAY,CAAA;YACrB,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAA;SACxC,CAAA;KACF;;;IAyBD;;;;;;;OAOG;IACG,eAAe,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE;IAgB5C;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAuBnB;;;;;OAKG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA6C5B;;;;OAIG;IACG,IAAI;IAQV;;;OAGG;IACH,OAAO,CAAC,WAAW;IAOnB;;;;;;;;;;;;;OAaG;IACG,eAAe,CAAC,WAAW,EAAE,sBAAsB;IASzD;;;;;;;;OAQG;IACH,OAAO,CAAC,yBAAyB;CAsClC"}
|
package/dist/agent.js
CHANGED
|
@@ -12,7 +12,6 @@ const express_async_router_1 = require("express-async-router");
|
|
|
12
12
|
const helmet_1 = __importDefault(require("helmet"));
|
|
13
13
|
const hpp_1 = __importDefault(require("hpp"));
|
|
14
14
|
const logger_1 = require("./logger");
|
|
15
|
-
const types_1 = require("./types");
|
|
16
15
|
const http_errors_1 = require("http-errors");
|
|
17
16
|
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
18
17
|
const json_schema_to_zod_1 = require("@n8n/json-schema-to-zod");
|
|
@@ -209,7 +208,7 @@ class Agent {
|
|
|
209
208
|
* @param {Function} capability.run - Function that implements the capability's behavior
|
|
210
209
|
* @param {Object} capability.run.params - Parameters for the run function
|
|
211
210
|
* @param {z.infer<S>} capability.run.params.args - Validated arguments matching the schema
|
|
212
|
-
* @param {
|
|
211
|
+
* @param {ActionSchema} [capability.run.params.action] - Optional action context
|
|
213
212
|
* @param {ChatCompletionMessageParam[]} capability.run.messages - Chat message history
|
|
214
213
|
* @returns {this} The agent instance for method chaining
|
|
215
214
|
* @throws {Error} If a capability with the same name already exists
|
|
@@ -657,7 +656,7 @@ class Agent {
|
|
|
657
656
|
* @param {string} req.params.toolName - Name of the tool to execute
|
|
658
657
|
* @param {Object} req.body - Request body
|
|
659
658
|
* @param {z.infer<z.ZodTypeAny>} [req.body.args] - Arguments for the tool
|
|
660
|
-
* @param {
|
|
659
|
+
* @param {ActionSchema} [req.body.action] - Action context
|
|
661
660
|
* @param {ChatCompletionMessageParam[]} [req.body.messages] - Message history
|
|
662
661
|
* @returns {Promise<{result: string}>} The result of the tool execution
|
|
663
662
|
* @throws {BadRequest} If tool name is missing or tool is not found
|
|
@@ -695,7 +694,7 @@ class Agent {
|
|
|
695
694
|
*/
|
|
696
695
|
async handleRootRoute(req) {
|
|
697
696
|
try {
|
|
698
|
-
const action =
|
|
697
|
+
const action = req.body;
|
|
699
698
|
if (action.type === 'do-task') {
|
|
700
699
|
this.doTask(action);
|
|
701
700
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,4 @@ export { Agent } from './agent';
|
|
|
2
2
|
export type { AgentOptions } from './agent';
|
|
3
3
|
export { Capability } from './capability';
|
|
4
4
|
export type { TaskStatus, GetFilesParams, UploadFileParams, DeleteFileParams, MarkTaskAsErroredParams, CompleteTaskParams, SendChatMessageParams, GetTaskDetailParams, GetAgentsParams, GetTasksParams, CreateTaskParams, AddLogToTaskParams, RequestHumanAssistanceParams, UpdateTaskStatusParams, ProcessParams, CapabilityFuncParams, GetChatMessagesParams } from './types';
|
|
5
|
-
export { actionSchema, doTaskActionSchema, respondChatMessageActionSchema, taskStatusSchema, agentKind } from './types';
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,YAAY,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC5B,sBAAsB,EACtB,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,SAAS,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,YAAY,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC5B,sBAAsB,EACtB,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,SAAS,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Capability = exports.Agent = void 0;
|
|
4
4
|
var agent_1 = require("./agent");
|
|
5
5
|
Object.defineProperty(exports, "Agent", { enumerable: true, get: function () { return agent_1.Agent; } });
|
|
6
6
|
var capability_1 = require("./capability");
|
|
7
7
|
Object.defineProperty(exports, "Capability", { enumerable: true, get: function () { return capability_1.Capability; } });
|
|
8
|
-
var types_1 = require("./types");
|
|
9
|
-
Object.defineProperty(exports, "actionSchema", { enumerable: true, get: function () { return types_1.actionSchema; } });
|
|
10
|
-
Object.defineProperty(exports, "doTaskActionSchema", { enumerable: true, get: function () { return types_1.doTaskActionSchema; } });
|
|
11
|
-
Object.defineProperty(exports, "respondChatMessageActionSchema", { enumerable: true, get: function () { return types_1.respondChatMessageActionSchema; } });
|
|
12
|
-
Object.defineProperty(exports, "taskStatusSchema", { enumerable: true, get: function () { return types_1.taskStatusSchema; } });
|
|
13
|
-
Object.defineProperty(exports, "agentKind", { enumerable: true, get: function () { return types_1.agentKind; } });
|
package/dist/mcp.d.ts
CHANGED
|
@@ -46,12 +46,12 @@ export declare const mcpServerConfigSseSchema: z.ZodObject<{
|
|
|
46
46
|
/** Whether to automatically discover tools and register them as capabilities upon successful connection. Defaults to false. */
|
|
47
47
|
autoRegisterTools: z.ZodOptional<z.ZodBoolean>;
|
|
48
48
|
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
url: string;
|
|
50
49
|
transport: "sse";
|
|
50
|
+
url: string;
|
|
51
51
|
autoRegisterTools?: boolean | undefined;
|
|
52
52
|
}, {
|
|
53
|
-
url: string;
|
|
54
53
|
transport: "sse";
|
|
54
|
+
url: string;
|
|
55
55
|
autoRegisterTools?: boolean | undefined;
|
|
56
56
|
}>;
|
|
57
57
|
/** Zod schema for validating MCP server configurations using 'http' (Streamable HTTP) transport. */
|
|
@@ -63,12 +63,12 @@ export declare const mcpServerConfigHttpSchema: z.ZodObject<{
|
|
|
63
63
|
/** Whether to automatically discover tools and register them as capabilities upon successful connection. Defaults to false. */
|
|
64
64
|
autoRegisterTools: z.ZodOptional<z.ZodBoolean>;
|
|
65
65
|
}, "strip", z.ZodTypeAny, {
|
|
66
|
-
url: string;
|
|
67
66
|
transport: "http";
|
|
67
|
+
url: string;
|
|
68
68
|
autoRegisterTools?: boolean | undefined;
|
|
69
69
|
}, {
|
|
70
|
-
url: string;
|
|
71
70
|
transport: "http";
|
|
71
|
+
url: string;
|
|
72
72
|
autoRegisterTools?: boolean | undefined;
|
|
73
73
|
}>;
|
|
74
74
|
/**
|
|
@@ -106,12 +106,12 @@ export declare const mcpServerConfigSchema: z.ZodDiscriminatedUnion<"transport",
|
|
|
106
106
|
/** Whether to automatically discover tools and register them as capabilities upon successful connection. Defaults to false. */
|
|
107
107
|
autoRegisterTools: z.ZodOptional<z.ZodBoolean>;
|
|
108
108
|
}, "strip", z.ZodTypeAny, {
|
|
109
|
-
url: string;
|
|
110
109
|
transport: "sse";
|
|
110
|
+
url: string;
|
|
111
111
|
autoRegisterTools?: boolean | undefined;
|
|
112
112
|
}, {
|
|
113
|
-
url: string;
|
|
114
113
|
transport: "sse";
|
|
114
|
+
url: string;
|
|
115
115
|
autoRegisterTools?: boolean | undefined;
|
|
116
116
|
}>, z.ZodObject<{
|
|
117
117
|
/** Specifies the transport type as 'http'. */
|
|
@@ -121,12 +121,12 @@ export declare const mcpServerConfigSchema: z.ZodDiscriminatedUnion<"transport",
|
|
|
121
121
|
/** Whether to automatically discover tools and register them as capabilities upon successful connection. Defaults to false. */
|
|
122
122
|
autoRegisterTools: z.ZodOptional<z.ZodBoolean>;
|
|
123
123
|
}, "strip", z.ZodTypeAny, {
|
|
124
|
-
url: string;
|
|
125
124
|
transport: "http";
|
|
125
|
+
url: string;
|
|
126
126
|
autoRegisterTools?: boolean | undefined;
|
|
127
127
|
}, {
|
|
128
|
-
url: string;
|
|
129
128
|
transport: "http";
|
|
129
|
+
url: string;
|
|
130
130
|
autoRegisterTools?: boolean | undefined;
|
|
131
131
|
}>]>;
|
|
132
132
|
/** Configuration for a single MCP server, covering all transport types. */
|