@openserv-labs/sdk 1.1.0 → 1.2.0
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/README.md +1 -1
- package/dist/agent.d.ts +15 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +34 -1
- package/dist/types.d.ts +517 -48
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +43 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# OpenServ Autonomous AI Agent Development Framework
|
|
1
|
+
# OpenServ TypeScript SDK, Autonomous AI Agent Development Framework
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@openserv-labs/sdk)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
package/dist/agent.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AxiosInstance } from 'axios';
|
|
2
|
-
import type { GetFilesParams, UploadFileParams, MarkTaskAsErroredParams, CompleteTaskParams, SendChatMessageParams, GetTaskDetailParams, GetAgentsParams, GetTasksParams, CreateTaskParams, AddLogToTaskParams, RequestHumanAssistanceParams, UpdateTaskStatusParams, ProcessParams, IntegrationCallRequest } from './types';
|
|
2
|
+
import type { GetFilesParams, GetSecretsParams, GetSecretValueParams, UploadFileParams, MarkTaskAsErroredParams, CompleteTaskParams, SendChatMessageParams, GetTaskDetailParams, GetAgentsParams, GetTasksParams, CreateTaskParams, AddLogToTaskParams, RequestHumanAssistanceParams, UpdateTaskStatusParams, ProcessParams, IntegrationCallRequest } from './types';
|
|
3
3
|
import type { doTaskActionSchema, respondChatMessageActionSchema } from './types';
|
|
4
4
|
import { actionSchema } from './types';
|
|
5
5
|
import type { ChatCompletionMessageParam, ChatCompletion } from 'openai/resources/chat/completions';
|
|
@@ -183,6 +183,20 @@ export declare class Agent {
|
|
|
183
183
|
* @returns {Promise<any>} The files in the workspace
|
|
184
184
|
*/
|
|
185
185
|
getFiles(params: GetFilesParams): Promise<any>;
|
|
186
|
+
/**
|
|
187
|
+
* Get all secrets for an agent in a workspace.
|
|
188
|
+
*
|
|
189
|
+
* @param {GetSecretsParams} params - Parameters for the secrets retrieval
|
|
190
|
+
* @returns {Promise<any>} List of agent secrets.
|
|
191
|
+
*/
|
|
192
|
+
getSecrets(params: GetSecretsParams): Promise<any>;
|
|
193
|
+
/**
|
|
194
|
+
* Get the value of a secret for an agent in a workspace
|
|
195
|
+
*
|
|
196
|
+
* @param {GetSecretValueParams} params - Parameters for the secret value retrieval
|
|
197
|
+
* @returns {Promise<string>} The value of the secret.
|
|
198
|
+
*/
|
|
199
|
+
getSecretValue(params: GetSecretValueParams): Promise<string>;
|
|
186
200
|
/**
|
|
187
201
|
* Uploads a file to a workspace.
|
|
188
202
|
*
|
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;AASjD,OAAO,KAAK,EACV,cAAc,EACd,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,EACvB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,kBAAkB,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EACV,0BAA0B,EAE1B,cAAc,EACf,MAAM,mCAAmC,CAAA;AAE1C,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA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AOG;IACG,eAAe,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE;IAgB5C;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAuBnB;;;;;OAKG;IACG,KAAK;IAUX;;;;OAIG;IACG,IAAI;IAQV;;;OAGG;IACH,OAAO,CAAC,WAAW;IAOnB;;;;;;;;;;;;;OAaG;IACG,eAAe,CAAC,WAAW,EAAE,sBAAsB;CAQ1D"}
|
package/dist/agent.js
CHANGED
|
@@ -211,6 +211,26 @@ class Agent {
|
|
|
211
211
|
const response = await this.apiClient.get(`/workspaces/${params.workspaceId}/files`);
|
|
212
212
|
return response.data;
|
|
213
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Get all secrets for an agent in a workspace.
|
|
216
|
+
*
|
|
217
|
+
* @param {GetSecretsParams} params - Parameters for the secrets retrieval
|
|
218
|
+
* @returns {Promise<any>} List of agent secrets.
|
|
219
|
+
*/
|
|
220
|
+
async getSecrets(params) {
|
|
221
|
+
const response = await this.apiClient.get(`/workspaces/${params.workspaceId}/agent-secrets`);
|
|
222
|
+
return response.data;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Get the value of a secret for an agent in a workspace
|
|
226
|
+
*
|
|
227
|
+
* @param {GetSecretValueParams} params - Parameters for the secret value retrieval
|
|
228
|
+
* @returns {Promise<string>} The value of the secret.
|
|
229
|
+
*/
|
|
230
|
+
async getSecretValue(params) {
|
|
231
|
+
const response = await this.apiClient.get(`/workspaces/${params.workspaceId}/agent-secrets/${params.secretId}/value`);
|
|
232
|
+
return response.data;
|
|
233
|
+
}
|
|
214
234
|
/**
|
|
215
235
|
* Uploads a file to a workspace.
|
|
216
236
|
*
|
|
@@ -377,9 +397,22 @@ class Agent {
|
|
|
377
397
|
* @returns {Promise<any>} The created assistance request details
|
|
378
398
|
*/
|
|
379
399
|
async requestHumanAssistance(params) {
|
|
400
|
+
let question = params.question;
|
|
401
|
+
if (typeof question === 'string') {
|
|
402
|
+
question = {
|
|
403
|
+
type: 'text',
|
|
404
|
+
question
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
else {
|
|
408
|
+
question = {
|
|
409
|
+
type: 'json',
|
|
410
|
+
...question
|
|
411
|
+
};
|
|
412
|
+
}
|
|
380
413
|
const response = await this.apiClient.post(`/workspaces/${params.workspaceId}/tasks/${params.taskId}/human-assistance`, {
|
|
381
414
|
type: params.type,
|
|
382
|
-
question
|
|
415
|
+
question,
|
|
383
416
|
agentDump: params.agentDump
|
|
384
417
|
});
|
|
385
418
|
return response.data;
|
package/dist/types.d.ts
CHANGED
|
@@ -87,28 +87,155 @@ export declare const doTaskActionSchema: z.ZodObject<{
|
|
|
87
87
|
}[];
|
|
88
88
|
output?: string | null | undefined;
|
|
89
89
|
}>, "many">;
|
|
90
|
-
humanAssistanceRequests: z.ZodArray<z.ZodObject<{
|
|
90
|
+
humanAssistanceRequests: z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<"text">;
|
|
92
|
+
question: z.ZodObject<{
|
|
93
|
+
type: z.ZodLiteral<"text">;
|
|
94
|
+
question: z.ZodString;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
type: "text";
|
|
97
|
+
question: string;
|
|
98
|
+
}, {
|
|
99
|
+
type: "text";
|
|
100
|
+
question: string;
|
|
101
|
+
}>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
type: "text";
|
|
104
|
+
question: {
|
|
105
|
+
type: "text";
|
|
106
|
+
question: string;
|
|
107
|
+
};
|
|
108
|
+
}, {
|
|
109
|
+
type: "text";
|
|
110
|
+
question: {
|
|
111
|
+
type: "text";
|
|
112
|
+
question: string;
|
|
113
|
+
};
|
|
114
|
+
}>, z.ZodObject<{
|
|
115
|
+
type: z.ZodLiteral<"project-manager-plan-review">;
|
|
116
|
+
question: z.ZodObject<z.objectUtil.extendShape<{
|
|
117
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
118
|
+
index: z.ZodNumber;
|
|
119
|
+
assigneeAgentId: z.ZodNumber;
|
|
120
|
+
assigneeAgentName: z.ZodString;
|
|
121
|
+
taskDescription: z.ZodString;
|
|
122
|
+
taskBody: z.ZodString;
|
|
123
|
+
input: z.ZodString;
|
|
124
|
+
expectedOutput: z.ZodString;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
expectedOutput: string;
|
|
127
|
+
input: string;
|
|
128
|
+
index: number;
|
|
129
|
+
assigneeAgentId: number;
|
|
130
|
+
assigneeAgentName: string;
|
|
131
|
+
taskDescription: string;
|
|
132
|
+
taskBody: string;
|
|
133
|
+
}, {
|
|
134
|
+
expectedOutput: string;
|
|
135
|
+
input: string;
|
|
136
|
+
index: number;
|
|
137
|
+
assigneeAgentId: number;
|
|
138
|
+
assigneeAgentName: string;
|
|
139
|
+
taskDescription: string;
|
|
140
|
+
taskBody: string;
|
|
141
|
+
}>, "many">;
|
|
142
|
+
}, {
|
|
143
|
+
type: z.ZodLiteral<"project-manager-plan-review">;
|
|
144
|
+
}>, "strip", z.ZodTypeAny, {
|
|
145
|
+
type: "project-manager-plan-review";
|
|
146
|
+
tasks: {
|
|
147
|
+
expectedOutput: string;
|
|
148
|
+
input: string;
|
|
149
|
+
index: number;
|
|
150
|
+
assigneeAgentId: number;
|
|
151
|
+
assigneeAgentName: string;
|
|
152
|
+
taskDescription: string;
|
|
153
|
+
taskBody: string;
|
|
154
|
+
}[];
|
|
155
|
+
}, {
|
|
156
|
+
type: "project-manager-plan-review";
|
|
157
|
+
tasks: {
|
|
158
|
+
expectedOutput: string;
|
|
159
|
+
input: string;
|
|
160
|
+
index: number;
|
|
161
|
+
assigneeAgentId: number;
|
|
162
|
+
assigneeAgentName: string;
|
|
163
|
+
taskDescription: string;
|
|
164
|
+
taskBody: string;
|
|
165
|
+
}[];
|
|
166
|
+
}>;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
type: "project-manager-plan-review";
|
|
169
|
+
question: {
|
|
170
|
+
type: "project-manager-plan-review";
|
|
171
|
+
tasks: {
|
|
172
|
+
expectedOutput: string;
|
|
173
|
+
input: string;
|
|
174
|
+
index: number;
|
|
175
|
+
assigneeAgentId: number;
|
|
176
|
+
assigneeAgentName: string;
|
|
177
|
+
taskDescription: string;
|
|
178
|
+
taskBody: string;
|
|
179
|
+
}[];
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
type: "project-manager-plan-review";
|
|
183
|
+
question: {
|
|
184
|
+
type: "project-manager-plan-review";
|
|
185
|
+
tasks: {
|
|
186
|
+
expectedOutput: string;
|
|
187
|
+
input: string;
|
|
188
|
+
index: number;
|
|
189
|
+
assigneeAgentId: number;
|
|
190
|
+
assigneeAgentName: string;
|
|
191
|
+
taskDescription: string;
|
|
192
|
+
taskBody: string;
|
|
193
|
+
}[];
|
|
194
|
+
};
|
|
195
|
+
}>, z.ZodObject<{
|
|
196
|
+
type: z.ZodLiteral<"insufficient-balance">;
|
|
197
|
+
question: z.ZodObject<{
|
|
198
|
+
type: z.ZodLiteral<"insufficient-balance">;
|
|
199
|
+
}, "strip", z.ZodTypeAny, {
|
|
200
|
+
type: "insufficient-balance";
|
|
201
|
+
}, {
|
|
202
|
+
type: "insufficient-balance";
|
|
203
|
+
}>;
|
|
204
|
+
}, "strip", z.ZodTypeAny, {
|
|
205
|
+
type: "insufficient-balance";
|
|
206
|
+
question: {
|
|
207
|
+
type: "insufficient-balance";
|
|
208
|
+
};
|
|
209
|
+
}, {
|
|
210
|
+
type: "insufficient-balance";
|
|
211
|
+
question: {
|
|
212
|
+
type: "insufficient-balance";
|
|
213
|
+
};
|
|
214
|
+
}>, z.ZodObject<{
|
|
215
|
+
type: z.ZodLiteral<"json">;
|
|
216
|
+
question: z.ZodAny;
|
|
217
|
+
}, "strip", z.ZodTypeAny, {
|
|
218
|
+
type: "json";
|
|
219
|
+
question?: any;
|
|
220
|
+
}, {
|
|
221
|
+
type: "json";
|
|
222
|
+
question?: any;
|
|
223
|
+
}>]>, z.ZodObject<{
|
|
91
224
|
agentDump: z.ZodUnknown;
|
|
92
225
|
humanResponse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
226
|
id: z.ZodNumber;
|
|
94
|
-
question: z.ZodString;
|
|
95
227
|
status: z.ZodEnum<["pending", "responded"]>;
|
|
96
|
-
type: z.ZodEnum<["text", "project-manager-plan-review"]>;
|
|
97
228
|
}, "strip", z.ZodTypeAny, {
|
|
98
|
-
type: "text" | "project-manager-plan-review";
|
|
99
229
|
status: "pending" | "responded";
|
|
100
230
|
id: number;
|
|
101
|
-
question: string;
|
|
102
231
|
agentDump?: unknown;
|
|
103
232
|
humanResponse?: string | null | undefined;
|
|
104
233
|
}, {
|
|
105
|
-
type: "text" | "project-manager-plan-review";
|
|
106
234
|
status: "pending" | "responded";
|
|
107
235
|
id: number;
|
|
108
|
-
question: string;
|
|
109
236
|
agentDump?: unknown;
|
|
110
237
|
humanResponse?: string | null | undefined;
|
|
111
|
-
}
|
|
238
|
+
}>>, "many">;
|
|
112
239
|
}, "strip", z.ZodTypeAny, {
|
|
113
240
|
description: string;
|
|
114
241
|
id: number;
|
|
@@ -124,14 +251,40 @@ export declare const doTaskActionSchema: z.ZodObject<{
|
|
|
124
251
|
}[];
|
|
125
252
|
output?: string | null | undefined;
|
|
126
253
|
}[];
|
|
127
|
-
humanAssistanceRequests: {
|
|
128
|
-
type: "text"
|
|
254
|
+
humanAssistanceRequests: (({
|
|
255
|
+
type: "text";
|
|
256
|
+
question: {
|
|
257
|
+
type: "text";
|
|
258
|
+
question: string;
|
|
259
|
+
};
|
|
260
|
+
} | {
|
|
261
|
+
type: "project-manager-plan-review";
|
|
262
|
+
question: {
|
|
263
|
+
type: "project-manager-plan-review";
|
|
264
|
+
tasks: {
|
|
265
|
+
expectedOutput: string;
|
|
266
|
+
input: string;
|
|
267
|
+
index: number;
|
|
268
|
+
assigneeAgentId: number;
|
|
269
|
+
assigneeAgentName: string;
|
|
270
|
+
taskDescription: string;
|
|
271
|
+
taskBody: string;
|
|
272
|
+
}[];
|
|
273
|
+
};
|
|
274
|
+
} | {
|
|
275
|
+
type: "insufficient-balance";
|
|
276
|
+
question: {
|
|
277
|
+
type: "insufficient-balance";
|
|
278
|
+
};
|
|
279
|
+
} | {
|
|
280
|
+
type: "json";
|
|
281
|
+
question?: any;
|
|
282
|
+
}) & {
|
|
129
283
|
status: "pending" | "responded";
|
|
130
284
|
id: number;
|
|
131
|
-
question: string;
|
|
132
285
|
agentDump?: unknown;
|
|
133
286
|
humanResponse?: string | null | undefined;
|
|
134
|
-
}[];
|
|
287
|
+
})[];
|
|
135
288
|
body?: string | null | undefined;
|
|
136
289
|
expectedOutput?: string | null | undefined;
|
|
137
290
|
input?: string | null | undefined;
|
|
@@ -150,14 +303,40 @@ export declare const doTaskActionSchema: z.ZodObject<{
|
|
|
150
303
|
}[];
|
|
151
304
|
output?: string | null | undefined;
|
|
152
305
|
}[];
|
|
153
|
-
humanAssistanceRequests: {
|
|
154
|
-
type: "text"
|
|
306
|
+
humanAssistanceRequests: (({
|
|
307
|
+
type: "text";
|
|
308
|
+
question: {
|
|
309
|
+
type: "text";
|
|
310
|
+
question: string;
|
|
311
|
+
};
|
|
312
|
+
} | {
|
|
313
|
+
type: "project-manager-plan-review";
|
|
314
|
+
question: {
|
|
315
|
+
type: "project-manager-plan-review";
|
|
316
|
+
tasks: {
|
|
317
|
+
expectedOutput: string;
|
|
318
|
+
input: string;
|
|
319
|
+
index: number;
|
|
320
|
+
assigneeAgentId: number;
|
|
321
|
+
assigneeAgentName: string;
|
|
322
|
+
taskDescription: string;
|
|
323
|
+
taskBody: string;
|
|
324
|
+
}[];
|
|
325
|
+
};
|
|
326
|
+
} | {
|
|
327
|
+
type: "insufficient-balance";
|
|
328
|
+
question: {
|
|
329
|
+
type: "insufficient-balance";
|
|
330
|
+
};
|
|
331
|
+
} | {
|
|
332
|
+
type: "json";
|
|
333
|
+
question?: any;
|
|
334
|
+
}) & {
|
|
155
335
|
status: "pending" | "responded";
|
|
156
336
|
id: number;
|
|
157
|
-
question: string;
|
|
158
337
|
agentDump?: unknown;
|
|
159
338
|
humanResponse?: string | null | undefined;
|
|
160
|
-
}[];
|
|
339
|
+
})[];
|
|
161
340
|
body?: string | null | undefined;
|
|
162
341
|
expectedOutput?: string | null | undefined;
|
|
163
342
|
input?: string | null | undefined;
|
|
@@ -281,14 +460,40 @@ export declare const doTaskActionSchema: z.ZodObject<{
|
|
|
281
460
|
}[];
|
|
282
461
|
output?: string | null | undefined;
|
|
283
462
|
}[];
|
|
284
|
-
humanAssistanceRequests: {
|
|
285
|
-
type: "text"
|
|
463
|
+
humanAssistanceRequests: (({
|
|
464
|
+
type: "text";
|
|
465
|
+
question: {
|
|
466
|
+
type: "text";
|
|
467
|
+
question: string;
|
|
468
|
+
};
|
|
469
|
+
} | {
|
|
470
|
+
type: "project-manager-plan-review";
|
|
471
|
+
question: {
|
|
472
|
+
type: "project-manager-plan-review";
|
|
473
|
+
tasks: {
|
|
474
|
+
expectedOutput: string;
|
|
475
|
+
input: string;
|
|
476
|
+
index: number;
|
|
477
|
+
assigneeAgentId: number;
|
|
478
|
+
assigneeAgentName: string;
|
|
479
|
+
taskDescription: string;
|
|
480
|
+
taskBody: string;
|
|
481
|
+
}[];
|
|
482
|
+
};
|
|
483
|
+
} | {
|
|
484
|
+
type: "insufficient-balance";
|
|
485
|
+
question: {
|
|
486
|
+
type: "insufficient-balance";
|
|
487
|
+
};
|
|
488
|
+
} | {
|
|
489
|
+
type: "json";
|
|
490
|
+
question?: any;
|
|
491
|
+
}) & {
|
|
286
492
|
status: "pending" | "responded";
|
|
287
493
|
id: number;
|
|
288
|
-
question: string;
|
|
289
494
|
agentDump?: unknown;
|
|
290
495
|
humanResponse?: string | null | undefined;
|
|
291
|
-
}[];
|
|
496
|
+
})[];
|
|
292
497
|
body?: string | null | undefined;
|
|
293
498
|
expectedOutput?: string | null | undefined;
|
|
294
499
|
input?: string | null | undefined;
|
|
@@ -348,14 +553,40 @@ export declare const doTaskActionSchema: z.ZodObject<{
|
|
|
348
553
|
}[];
|
|
349
554
|
output?: string | null | undefined;
|
|
350
555
|
}[];
|
|
351
|
-
humanAssistanceRequests: {
|
|
352
|
-
type: "text"
|
|
556
|
+
humanAssistanceRequests: (({
|
|
557
|
+
type: "text";
|
|
558
|
+
question: {
|
|
559
|
+
type: "text";
|
|
560
|
+
question: string;
|
|
561
|
+
};
|
|
562
|
+
} | {
|
|
563
|
+
type: "project-manager-plan-review";
|
|
564
|
+
question: {
|
|
565
|
+
type: "project-manager-plan-review";
|
|
566
|
+
tasks: {
|
|
567
|
+
expectedOutput: string;
|
|
568
|
+
input: string;
|
|
569
|
+
index: number;
|
|
570
|
+
assigneeAgentId: number;
|
|
571
|
+
assigneeAgentName: string;
|
|
572
|
+
taskDescription: string;
|
|
573
|
+
taskBody: string;
|
|
574
|
+
}[];
|
|
575
|
+
};
|
|
576
|
+
} | {
|
|
577
|
+
type: "insufficient-balance";
|
|
578
|
+
question: {
|
|
579
|
+
type: "insufficient-balance";
|
|
580
|
+
};
|
|
581
|
+
} | {
|
|
582
|
+
type: "json";
|
|
583
|
+
question?: any;
|
|
584
|
+
}) & {
|
|
353
585
|
status: "pending" | "responded";
|
|
354
586
|
id: number;
|
|
355
|
-
question: string;
|
|
356
587
|
agentDump?: unknown;
|
|
357
588
|
humanResponse?: string | null | undefined;
|
|
358
|
-
}[];
|
|
589
|
+
})[];
|
|
359
590
|
body?: string | null | undefined;
|
|
360
591
|
expectedOutput?: string | null | undefined;
|
|
361
592
|
input?: string | null | undefined;
|
|
@@ -700,28 +931,155 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
700
931
|
}[];
|
|
701
932
|
output?: string | null | undefined;
|
|
702
933
|
}>, "many">;
|
|
703
|
-
humanAssistanceRequests: z.ZodArray<z.ZodObject<{
|
|
934
|
+
humanAssistanceRequests: z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
935
|
+
type: z.ZodLiteral<"text">;
|
|
936
|
+
question: z.ZodObject<{
|
|
937
|
+
type: z.ZodLiteral<"text">;
|
|
938
|
+
question: z.ZodString;
|
|
939
|
+
}, "strip", z.ZodTypeAny, {
|
|
940
|
+
type: "text";
|
|
941
|
+
question: string;
|
|
942
|
+
}, {
|
|
943
|
+
type: "text";
|
|
944
|
+
question: string;
|
|
945
|
+
}>;
|
|
946
|
+
}, "strip", z.ZodTypeAny, {
|
|
947
|
+
type: "text";
|
|
948
|
+
question: {
|
|
949
|
+
type: "text";
|
|
950
|
+
question: string;
|
|
951
|
+
};
|
|
952
|
+
}, {
|
|
953
|
+
type: "text";
|
|
954
|
+
question: {
|
|
955
|
+
type: "text";
|
|
956
|
+
question: string;
|
|
957
|
+
};
|
|
958
|
+
}>, z.ZodObject<{
|
|
959
|
+
type: z.ZodLiteral<"project-manager-plan-review">;
|
|
960
|
+
question: z.ZodObject<z.objectUtil.extendShape<{
|
|
961
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
962
|
+
index: z.ZodNumber;
|
|
963
|
+
assigneeAgentId: z.ZodNumber;
|
|
964
|
+
assigneeAgentName: z.ZodString;
|
|
965
|
+
taskDescription: z.ZodString;
|
|
966
|
+
taskBody: z.ZodString;
|
|
967
|
+
input: z.ZodString;
|
|
968
|
+
expectedOutput: z.ZodString;
|
|
969
|
+
}, "strip", z.ZodTypeAny, {
|
|
970
|
+
expectedOutput: string;
|
|
971
|
+
input: string;
|
|
972
|
+
index: number;
|
|
973
|
+
assigneeAgentId: number;
|
|
974
|
+
assigneeAgentName: string;
|
|
975
|
+
taskDescription: string;
|
|
976
|
+
taskBody: string;
|
|
977
|
+
}, {
|
|
978
|
+
expectedOutput: string;
|
|
979
|
+
input: string;
|
|
980
|
+
index: number;
|
|
981
|
+
assigneeAgentId: number;
|
|
982
|
+
assigneeAgentName: string;
|
|
983
|
+
taskDescription: string;
|
|
984
|
+
taskBody: string;
|
|
985
|
+
}>, "many">;
|
|
986
|
+
}, {
|
|
987
|
+
type: z.ZodLiteral<"project-manager-plan-review">;
|
|
988
|
+
}>, "strip", z.ZodTypeAny, {
|
|
989
|
+
type: "project-manager-plan-review";
|
|
990
|
+
tasks: {
|
|
991
|
+
expectedOutput: string;
|
|
992
|
+
input: string;
|
|
993
|
+
index: number;
|
|
994
|
+
assigneeAgentId: number;
|
|
995
|
+
assigneeAgentName: string;
|
|
996
|
+
taskDescription: string;
|
|
997
|
+
taskBody: string;
|
|
998
|
+
}[];
|
|
999
|
+
}, {
|
|
1000
|
+
type: "project-manager-plan-review";
|
|
1001
|
+
tasks: {
|
|
1002
|
+
expectedOutput: string;
|
|
1003
|
+
input: string;
|
|
1004
|
+
index: number;
|
|
1005
|
+
assigneeAgentId: number;
|
|
1006
|
+
assigneeAgentName: string;
|
|
1007
|
+
taskDescription: string;
|
|
1008
|
+
taskBody: string;
|
|
1009
|
+
}[];
|
|
1010
|
+
}>;
|
|
1011
|
+
}, "strip", z.ZodTypeAny, {
|
|
1012
|
+
type: "project-manager-plan-review";
|
|
1013
|
+
question: {
|
|
1014
|
+
type: "project-manager-plan-review";
|
|
1015
|
+
tasks: {
|
|
1016
|
+
expectedOutput: string;
|
|
1017
|
+
input: string;
|
|
1018
|
+
index: number;
|
|
1019
|
+
assigneeAgentId: number;
|
|
1020
|
+
assigneeAgentName: string;
|
|
1021
|
+
taskDescription: string;
|
|
1022
|
+
taskBody: string;
|
|
1023
|
+
}[];
|
|
1024
|
+
};
|
|
1025
|
+
}, {
|
|
1026
|
+
type: "project-manager-plan-review";
|
|
1027
|
+
question: {
|
|
1028
|
+
type: "project-manager-plan-review";
|
|
1029
|
+
tasks: {
|
|
1030
|
+
expectedOutput: string;
|
|
1031
|
+
input: string;
|
|
1032
|
+
index: number;
|
|
1033
|
+
assigneeAgentId: number;
|
|
1034
|
+
assigneeAgentName: string;
|
|
1035
|
+
taskDescription: string;
|
|
1036
|
+
taskBody: string;
|
|
1037
|
+
}[];
|
|
1038
|
+
};
|
|
1039
|
+
}>, z.ZodObject<{
|
|
1040
|
+
type: z.ZodLiteral<"insufficient-balance">;
|
|
1041
|
+
question: z.ZodObject<{
|
|
1042
|
+
type: z.ZodLiteral<"insufficient-balance">;
|
|
1043
|
+
}, "strip", z.ZodTypeAny, {
|
|
1044
|
+
type: "insufficient-balance";
|
|
1045
|
+
}, {
|
|
1046
|
+
type: "insufficient-balance";
|
|
1047
|
+
}>;
|
|
1048
|
+
}, "strip", z.ZodTypeAny, {
|
|
1049
|
+
type: "insufficient-balance";
|
|
1050
|
+
question: {
|
|
1051
|
+
type: "insufficient-balance";
|
|
1052
|
+
};
|
|
1053
|
+
}, {
|
|
1054
|
+
type: "insufficient-balance";
|
|
1055
|
+
question: {
|
|
1056
|
+
type: "insufficient-balance";
|
|
1057
|
+
};
|
|
1058
|
+
}>, z.ZodObject<{
|
|
1059
|
+
type: z.ZodLiteral<"json">;
|
|
1060
|
+
question: z.ZodAny;
|
|
1061
|
+
}, "strip", z.ZodTypeAny, {
|
|
1062
|
+
type: "json";
|
|
1063
|
+
question?: any;
|
|
1064
|
+
}, {
|
|
1065
|
+
type: "json";
|
|
1066
|
+
question?: any;
|
|
1067
|
+
}>]>, z.ZodObject<{
|
|
704
1068
|
agentDump: z.ZodUnknown;
|
|
705
1069
|
humanResponse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
706
1070
|
id: z.ZodNumber;
|
|
707
|
-
question: z.ZodString;
|
|
708
1071
|
status: z.ZodEnum<["pending", "responded"]>;
|
|
709
|
-
type: z.ZodEnum<["text", "project-manager-plan-review"]>;
|
|
710
1072
|
}, "strip", z.ZodTypeAny, {
|
|
711
|
-
type: "text" | "project-manager-plan-review";
|
|
712
1073
|
status: "pending" | "responded";
|
|
713
1074
|
id: number;
|
|
714
|
-
question: string;
|
|
715
1075
|
agentDump?: unknown;
|
|
716
1076
|
humanResponse?: string | null | undefined;
|
|
717
1077
|
}, {
|
|
718
|
-
type: "text" | "project-manager-plan-review";
|
|
719
1078
|
status: "pending" | "responded";
|
|
720
1079
|
id: number;
|
|
721
|
-
question: string;
|
|
722
1080
|
agentDump?: unknown;
|
|
723
1081
|
humanResponse?: string | null | undefined;
|
|
724
|
-
}
|
|
1082
|
+
}>>, "many">;
|
|
725
1083
|
}, "strip", z.ZodTypeAny, {
|
|
726
1084
|
description: string;
|
|
727
1085
|
id: number;
|
|
@@ -737,14 +1095,40 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
737
1095
|
}[];
|
|
738
1096
|
output?: string | null | undefined;
|
|
739
1097
|
}[];
|
|
740
|
-
humanAssistanceRequests: {
|
|
741
|
-
type: "text"
|
|
1098
|
+
humanAssistanceRequests: (({
|
|
1099
|
+
type: "text";
|
|
1100
|
+
question: {
|
|
1101
|
+
type: "text";
|
|
1102
|
+
question: string;
|
|
1103
|
+
};
|
|
1104
|
+
} | {
|
|
1105
|
+
type: "project-manager-plan-review";
|
|
1106
|
+
question: {
|
|
1107
|
+
type: "project-manager-plan-review";
|
|
1108
|
+
tasks: {
|
|
1109
|
+
expectedOutput: string;
|
|
1110
|
+
input: string;
|
|
1111
|
+
index: number;
|
|
1112
|
+
assigneeAgentId: number;
|
|
1113
|
+
assigneeAgentName: string;
|
|
1114
|
+
taskDescription: string;
|
|
1115
|
+
taskBody: string;
|
|
1116
|
+
}[];
|
|
1117
|
+
};
|
|
1118
|
+
} | {
|
|
1119
|
+
type: "insufficient-balance";
|
|
1120
|
+
question: {
|
|
1121
|
+
type: "insufficient-balance";
|
|
1122
|
+
};
|
|
1123
|
+
} | {
|
|
1124
|
+
type: "json";
|
|
1125
|
+
question?: any;
|
|
1126
|
+
}) & {
|
|
742
1127
|
status: "pending" | "responded";
|
|
743
1128
|
id: number;
|
|
744
|
-
question: string;
|
|
745
1129
|
agentDump?: unknown;
|
|
746
1130
|
humanResponse?: string | null | undefined;
|
|
747
|
-
}[];
|
|
1131
|
+
})[];
|
|
748
1132
|
body?: string | null | undefined;
|
|
749
1133
|
expectedOutput?: string | null | undefined;
|
|
750
1134
|
input?: string | null | undefined;
|
|
@@ -763,14 +1147,40 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
763
1147
|
}[];
|
|
764
1148
|
output?: string | null | undefined;
|
|
765
1149
|
}[];
|
|
766
|
-
humanAssistanceRequests: {
|
|
767
|
-
type: "text"
|
|
1150
|
+
humanAssistanceRequests: (({
|
|
1151
|
+
type: "text";
|
|
1152
|
+
question: {
|
|
1153
|
+
type: "text";
|
|
1154
|
+
question: string;
|
|
1155
|
+
};
|
|
1156
|
+
} | {
|
|
1157
|
+
type: "project-manager-plan-review";
|
|
1158
|
+
question: {
|
|
1159
|
+
type: "project-manager-plan-review";
|
|
1160
|
+
tasks: {
|
|
1161
|
+
expectedOutput: string;
|
|
1162
|
+
input: string;
|
|
1163
|
+
index: number;
|
|
1164
|
+
assigneeAgentId: number;
|
|
1165
|
+
assigneeAgentName: string;
|
|
1166
|
+
taskDescription: string;
|
|
1167
|
+
taskBody: string;
|
|
1168
|
+
}[];
|
|
1169
|
+
};
|
|
1170
|
+
} | {
|
|
1171
|
+
type: "insufficient-balance";
|
|
1172
|
+
question: {
|
|
1173
|
+
type: "insufficient-balance";
|
|
1174
|
+
};
|
|
1175
|
+
} | {
|
|
1176
|
+
type: "json";
|
|
1177
|
+
question?: any;
|
|
1178
|
+
}) & {
|
|
768
1179
|
status: "pending" | "responded";
|
|
769
1180
|
id: number;
|
|
770
|
-
question: string;
|
|
771
1181
|
agentDump?: unknown;
|
|
772
1182
|
humanResponse?: string | null | undefined;
|
|
773
|
-
}[];
|
|
1183
|
+
})[];
|
|
774
1184
|
body?: string | null | undefined;
|
|
775
1185
|
expectedOutput?: string | null | undefined;
|
|
776
1186
|
input?: string | null | undefined;
|
|
@@ -894,14 +1304,40 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
894
1304
|
}[];
|
|
895
1305
|
output?: string | null | undefined;
|
|
896
1306
|
}[];
|
|
897
|
-
humanAssistanceRequests: {
|
|
898
|
-
type: "text"
|
|
1307
|
+
humanAssistanceRequests: (({
|
|
1308
|
+
type: "text";
|
|
1309
|
+
question: {
|
|
1310
|
+
type: "text";
|
|
1311
|
+
question: string;
|
|
1312
|
+
};
|
|
1313
|
+
} | {
|
|
1314
|
+
type: "project-manager-plan-review";
|
|
1315
|
+
question: {
|
|
1316
|
+
type: "project-manager-plan-review";
|
|
1317
|
+
tasks: {
|
|
1318
|
+
expectedOutput: string;
|
|
1319
|
+
input: string;
|
|
1320
|
+
index: number;
|
|
1321
|
+
assigneeAgentId: number;
|
|
1322
|
+
assigneeAgentName: string;
|
|
1323
|
+
taskDescription: string;
|
|
1324
|
+
taskBody: string;
|
|
1325
|
+
}[];
|
|
1326
|
+
};
|
|
1327
|
+
} | {
|
|
1328
|
+
type: "insufficient-balance";
|
|
1329
|
+
question: {
|
|
1330
|
+
type: "insufficient-balance";
|
|
1331
|
+
};
|
|
1332
|
+
} | {
|
|
1333
|
+
type: "json";
|
|
1334
|
+
question?: any;
|
|
1335
|
+
}) & {
|
|
899
1336
|
status: "pending" | "responded";
|
|
900
1337
|
id: number;
|
|
901
|
-
question: string;
|
|
902
1338
|
agentDump?: unknown;
|
|
903
1339
|
humanResponse?: string | null | undefined;
|
|
904
|
-
}[];
|
|
1340
|
+
})[];
|
|
905
1341
|
body?: string | null | undefined;
|
|
906
1342
|
expectedOutput?: string | null | undefined;
|
|
907
1343
|
input?: string | null | undefined;
|
|
@@ -961,14 +1397,40 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
961
1397
|
}[];
|
|
962
1398
|
output?: string | null | undefined;
|
|
963
1399
|
}[];
|
|
964
|
-
humanAssistanceRequests: {
|
|
965
|
-
type: "text"
|
|
1400
|
+
humanAssistanceRequests: (({
|
|
1401
|
+
type: "text";
|
|
1402
|
+
question: {
|
|
1403
|
+
type: "text";
|
|
1404
|
+
question: string;
|
|
1405
|
+
};
|
|
1406
|
+
} | {
|
|
1407
|
+
type: "project-manager-plan-review";
|
|
1408
|
+
question: {
|
|
1409
|
+
type: "project-manager-plan-review";
|
|
1410
|
+
tasks: {
|
|
1411
|
+
expectedOutput: string;
|
|
1412
|
+
input: string;
|
|
1413
|
+
index: number;
|
|
1414
|
+
assigneeAgentId: number;
|
|
1415
|
+
assigneeAgentName: string;
|
|
1416
|
+
taskDescription: string;
|
|
1417
|
+
taskBody: string;
|
|
1418
|
+
}[];
|
|
1419
|
+
};
|
|
1420
|
+
} | {
|
|
1421
|
+
type: "insufficient-balance";
|
|
1422
|
+
question: {
|
|
1423
|
+
type: "insufficient-balance";
|
|
1424
|
+
};
|
|
1425
|
+
} | {
|
|
1426
|
+
type: "json";
|
|
1427
|
+
question?: any;
|
|
1428
|
+
}) & {
|
|
966
1429
|
status: "pending" | "responded";
|
|
967
1430
|
id: number;
|
|
968
|
-
question: string;
|
|
969
1431
|
agentDump?: unknown;
|
|
970
1432
|
humanResponse?: string | null | undefined;
|
|
971
|
-
}[];
|
|
1433
|
+
})[];
|
|
972
1434
|
body?: string | null | undefined;
|
|
973
1435
|
expectedOutput?: string | null | undefined;
|
|
974
1436
|
input?: string | null | undefined;
|
|
@@ -1235,6 +1697,13 @@ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
1235
1697
|
export interface GetFilesParams {
|
|
1236
1698
|
workspaceId: number;
|
|
1237
1699
|
}
|
|
1700
|
+
export interface GetSecretsParams {
|
|
1701
|
+
workspaceId: number;
|
|
1702
|
+
}
|
|
1703
|
+
export interface GetSecretValueParams {
|
|
1704
|
+
workspaceId: number;
|
|
1705
|
+
secretId: number;
|
|
1706
|
+
}
|
|
1238
1707
|
export declare const getFilesParamsSchema: z.ZodObject<{
|
|
1239
1708
|
workspaceId: z.ZodNumber;
|
|
1240
1709
|
}, "strip", z.ZodTypeAny, {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAKnF,MAAM,MAAM,oBAAoB,CAAC,MAAM,SAAS,CAAC,CAAC,UAAU,IAAI;IAC9D,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACrB,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,SAAS,8CAA4C,CAAA;AAElE,eAAO,MAAM,gBAAgB,gGAEC,CAAA;AAE9B,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAKnF,MAAM,MAAM,oBAAoB,CAAC,MAAM,SAAS,CAAC,CAAC,UAAU,IAAI;IAC9D,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACrB,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,SAAS,8CAA4C,CAAA;AAElE,eAAO,MAAM,gBAAgB,gGAEC,CAAA;AAE9B,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AA+CzD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;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
CHANGED
|
@@ -8,6 +8,46 @@ exports.agentKind = zod_1.z.enum(['external', 'eliza', 'openserv']);
|
|
|
8
8
|
exports.taskStatusSchema = zod_1.z
|
|
9
9
|
.enum(['to-do', 'in-progress', 'human-assistance-required', 'error', 'done', 'cancelled'])
|
|
10
10
|
.openapi('taskStatusSchema');
|
|
11
|
+
const projectManagerPlanReviewHumanAssistanceQuestionSchema = zod_1.z.object({
|
|
12
|
+
tasks: zod_1.z.array(zod_1.z.object({
|
|
13
|
+
index: zod_1.z.number(),
|
|
14
|
+
assigneeAgentId: zod_1.z.number().int(),
|
|
15
|
+
assigneeAgentName: zod_1.z.string(),
|
|
16
|
+
taskDescription: zod_1.z.string(),
|
|
17
|
+
taskBody: zod_1.z.string(),
|
|
18
|
+
input: zod_1.z.string(),
|
|
19
|
+
expectedOutput: zod_1.z.string()
|
|
20
|
+
}))
|
|
21
|
+
});
|
|
22
|
+
const baseHumanAssistanceRequestSchema = zod_1.z.discriminatedUnion('type', [
|
|
23
|
+
zod_1.z
|
|
24
|
+
.object({
|
|
25
|
+
type: zod_1.z.literal('text'),
|
|
26
|
+
question: zod_1.z.object({
|
|
27
|
+
type: zod_1.z.literal('text'),
|
|
28
|
+
question: zod_1.z.string().trim().min(1).openapi({ description: 'Your question for the user' })
|
|
29
|
+
})
|
|
30
|
+
})
|
|
31
|
+
.openapi({
|
|
32
|
+
description: "The type is 'text' and the question is a known object. This is what your agents will typically use."
|
|
33
|
+
}),
|
|
34
|
+
zod_1.z.object({
|
|
35
|
+
type: zod_1.z.literal('project-manager-plan-review'),
|
|
36
|
+
question: projectManagerPlanReviewHumanAssistanceQuestionSchema.extend({
|
|
37
|
+
type: zod_1.z.literal('project-manager-plan-review')
|
|
38
|
+
})
|
|
39
|
+
}),
|
|
40
|
+
zod_1.z.object({
|
|
41
|
+
type: zod_1.z.literal('insufficient-balance'),
|
|
42
|
+
question: zod_1.z.object({
|
|
43
|
+
type: zod_1.z.literal('insufficient-balance')
|
|
44
|
+
})
|
|
45
|
+
}),
|
|
46
|
+
zod_1.z.object({
|
|
47
|
+
type: zod_1.z.literal('json'),
|
|
48
|
+
question: zod_1.z.any()
|
|
49
|
+
})
|
|
50
|
+
]);
|
|
11
51
|
exports.doTaskActionSchema = zod_1.z
|
|
12
52
|
.object({
|
|
13
53
|
type: zod_1.z.literal('do-task'),
|
|
@@ -56,7 +96,7 @@ exports.doTaskActionSchema = zod_1.z
|
|
|
56
96
|
}))
|
|
57
97
|
}))
|
|
58
98
|
.openapi({ description: 'List of dependant tasks' }),
|
|
59
|
-
humanAssistanceRequests: zod_1.z.array(zod_1.z
|
|
99
|
+
humanAssistanceRequests: zod_1.z.array(zod_1.z.intersection(baseHumanAssistanceRequestSchema, zod_1.z
|
|
60
100
|
.object({
|
|
61
101
|
agentDump: zod_1.z.unknown().openapi({
|
|
62
102
|
description: "Agent's internal data. Anything the agent wanted to store in the context of this human assistant request."
|
|
@@ -66,13 +106,9 @@ exports.doTaskActionSchema = zod_1.z
|
|
|
66
106
|
.nullish()
|
|
67
107
|
.openapi({ description: "Human's response to the question" }),
|
|
68
108
|
id: zod_1.z.number(),
|
|
69
|
-
|
|
70
|
-
status: zod_1.z.enum(['pending', 'responded']),
|
|
71
|
-
type: zod_1.z.enum(['text', 'project-manager-plan-review']).openapi({
|
|
72
|
-
description: "'project-manager-plan-review' is initiaded by a Project Manager agent to let the user confirm the project plan for this workspace."
|
|
73
|
-
})
|
|
109
|
+
status: zod_1.z.enum(['pending', 'responded'])
|
|
74
110
|
})
|
|
75
|
-
.openapi({ description: 'List of Human Assistance Requests' }))
|
|
111
|
+
.openapi({ description: 'List of Human Assistance Requests' })))
|
|
76
112
|
}),
|
|
77
113
|
workspace: zod_1.z.object({
|
|
78
114
|
id: zod_1.z.number(),
|