@mastra/client-js 0.1.0-alpha.10 → 0.1.0-alpha.11

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 CHANGED
@@ -1,4 +1,4 @@
1
- import { MessageType, OutputType, StorageThreadType, CoreMessage, AiMessageType, StepAction, StepGraph, QueryResult, BaseLogMessage, GenerateReturn } from '@mastra/core';
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: MessageType[];
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: MessageType[];
36
+ messages: string | string[] | CoreMessage[];
37
37
  threadId?: string;
38
38
  resourceid?: string;
39
39
  output?: OutputType | T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/client-js",
3
- "version": "0.1.0-alpha.10",
3
+ "version": "0.1.0-alpha.11",
4
4
  "description": "The official TypeScript library for the Mastra Client API",
5
5
  "author": "",
6
6
  "types": "dist/index.d.mts",
@@ -16,6 +16,11 @@
16
16
  },
17
17
  "repository": "github:mastra-ai/client-js",
18
18
  "license": "ISC",
19
+ "scripts": {
20
+ "build": "tsup-node src/index.ts --format esm --dts --clean --treeshake",
21
+ "dev": "tsup-node src/index.ts --format esm --dts --clean --treeshake --watch",
22
+ "test": "vitest run"
23
+ },
19
24
  "dependencies": {
20
25
  "@mastra/core": "^0.2.0-alpha.83",
21
26
  "json-schema": "^0.4.0",
@@ -31,10 +36,5 @@
31
36
  "tsup": "^8.0.1",
32
37
  "typescript": "^5.7.3",
33
38
  "vitest": "^3.0.4"
34
- },
35
- "scripts": {
36
- "build": "tsup-node src/index.ts --format esm --dts --clean --treeshake",
37
- "dev": "tsup-node src/index.ts --format esm --dts --clean --treeshake --watch",
38
- "test": "vitest run"
39
39
  }
40
- }
40
+ }
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: MessageType[];
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: MessageType[];
40
+ messages: string | string[] | CoreMessage[];
41
41
  threadId?: string;
42
42
  resourceid?: string;
43
43
  output?: OutputType | T