@mastra/client-js 0.1.0-alpha.10 → 0.1.0-alpha.12
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/index.d.mts +6 -4
- package/package.json +1 -1
- package/src/example.ts +0 -4
- package/src/resources/agent.ts +1 -1
- package/src/resources/tool.ts +1 -1
- package/src/types.ts +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CoreMessage, OutputType, StorageThreadType, AiMessageType, MessageType, StepAction, StepGraph, QueryResult, BaseLogMessage, GenerateReturn } from '@mastra/core';
|
|
2
2
|
import { JSONSchema7 } from 'json-schema';
|
|
3
3
|
import { ZodSchema } from 'zod';
|
|
4
4
|
|
|
@@ -27,13 +27,13 @@ interface GetAgentResponse {
|
|
|
27
27
|
provider: string;
|
|
28
28
|
}
|
|
29
29
|
interface GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> {
|
|
30
|
-
messages:
|
|
30
|
+
messages: string | string[] | CoreMessage[];
|
|
31
31
|
threadId?: string;
|
|
32
32
|
resourceid?: string;
|
|
33
33
|
output?: OutputType | T;
|
|
34
34
|
}
|
|
35
35
|
interface StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> {
|
|
36
|
-
messages:
|
|
36
|
+
messages: string | string[] | CoreMessage[];
|
|
37
37
|
threadId?: string;
|
|
38
38
|
resourceid?: string;
|
|
39
39
|
output?: OutputType | T;
|
|
@@ -267,7 +267,9 @@ declare class Tool extends BaseResource {
|
|
|
267
267
|
* @param params - Parameters required for tool execution
|
|
268
268
|
* @returns Promise containing the tool execution results
|
|
269
269
|
*/
|
|
270
|
-
execute(params:
|
|
270
|
+
execute(params: {
|
|
271
|
+
data: any;
|
|
272
|
+
}): Promise<any>;
|
|
271
273
|
}
|
|
272
274
|
|
|
273
275
|
declare class MastraClient extends BaseResource {
|
package/package.json
CHANGED
package/src/example.ts
CHANGED
package/src/resources/agent.ts
CHANGED
|
@@ -29,7 +29,7 @@ export class AgentTool extends BaseResource {
|
|
|
29
29
|
* @param params - Parameters required for tool execution
|
|
30
30
|
* @returns Promise containing tool execution results
|
|
31
31
|
*/
|
|
32
|
-
execute(params:
|
|
32
|
+
execute(params: { data: any }): Promise<any> {
|
|
33
33
|
return this.request(`/api/agents/${this.agentId}/tools/${this.toolId}/execute`, {
|
|
34
34
|
method: 'POST',
|
|
35
35
|
body: params,
|
package/src/resources/tool.ts
CHANGED
|
@@ -22,7 +22,7 @@ export class Tool extends BaseResource {
|
|
|
22
22
|
* @param params - Parameters required for tool execution
|
|
23
23
|
* @returns Promise containing the tool execution results
|
|
24
24
|
*/
|
|
25
|
-
execute(params:
|
|
25
|
+
execute(params: { data: any }): Promise<any> {
|
|
26
26
|
return this.request(`/api/tools/${this.toolId}/execute`, {
|
|
27
27
|
method: 'POST',
|
|
28
28
|
body: params,
|
package/src/types.ts
CHANGED
|
@@ -30,14 +30,14 @@ export interface GetAgentResponse {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export interface GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> {
|
|
33
|
-
messages:
|
|
33
|
+
messages: string | string[] | CoreMessage[];
|
|
34
34
|
threadId?: string;
|
|
35
35
|
resourceid?: string;
|
|
36
36
|
output?: OutputType | T
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export interface StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> {
|
|
40
|
-
messages:
|
|
40
|
+
messages: string | string[] | CoreMessage[];
|
|
41
41
|
threadId?: string;
|
|
42
42
|
resourceid?: string;
|
|
43
43
|
output?: OutputType | T
|