@mastra/client-js 0.10.17-alpha.0 → 0.10.17-alpha.1

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @mastra/client-js@0.10.17-alpha.0 build /home/runner/work/mastra/mastra/client-sdks/client-js
2
+ > @mastra/client-js@0.10.17-alpha.1 build /home/runner/work/mastra/mastra/client-sdks/client-js
3
3
  > tsup src/index.ts --format esm,cjs --dts --clean --treeshake=smallest --splitting
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,11 +9,11 @@
9
9
  CLI Cleaning output folder
10
10
  ESM Build start
11
11
  CJS Build start
12
- ESM dist/index.js 73.73 KB
13
- ESM ⚡️ Build success in 2020ms
14
12
  CJS dist/index.cjs 74.04 KB
15
- CJS ⚡️ Build success in 2038ms
13
+ CJS ⚡️ Build success in 2302ms
14
+ ESM dist/index.js 73.73 KB
15
+ ESM ⚡️ Build success in 2304ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 17627ms
18
- DTS dist/index.d.ts 46.08 KB
19
- DTS dist/index.d.cts 46.08 KB
17
+ DTS ⚡️ Build success in 19056ms
18
+ DTS dist/index.d.ts 46.21 KB
19
+ DTS dist/index.d.cts 46.21 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.10.17-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - cda801d: Added the ability to pass in metadata for UIMessage and MastraMessageV2 in client-js and agent.stream/generate
8
+ - Updated dependencies [e0f73c6]
9
+ - Updated dependencies [cda801d]
10
+ - Updated dependencies [a77c823]
11
+ - @mastra/core@0.12.0-alpha.1
12
+
3
13
  ## 0.10.17-alpha.0
4
14
 
5
15
  ### Patch Changes
package/dist/index.d.cts CHANGED
@@ -5,7 +5,8 @@ import { GenerateReturn } from '@mastra/core/llm';
5
5
  import { JSONSchema7 } from 'json-schema';
6
6
  import { ZodSchema } from 'zod';
7
7
  import { CoreMessage, AiMessageType, StorageThreadType, StorageGetMessagesArg, PaginationInfo, MastraMessageV1, MastraMessageV2, LegacyWorkflowRuns, WorkflowRuns, WorkflowRun, QueryResult, GenerateReturn as GenerateReturn$1 } from '@mastra/core';
8
- import { AgentGenerateOptions, AgentStreamOptions, ToolsInput } from '@mastra/core/agent';
8
+ import { AgentGenerateOptions, AgentStreamOptions, UIMessageWithMetadata, ToolsInput } from '@mastra/core/agent';
9
+ export { UIMessageWithMetadata } from '@mastra/core/agent';
9
10
  import { LogLevel, BaseLogMessage } from '@mastra/core/logger';
10
11
  import { RuntimeContext } from '@mastra/core/runtime-context';
11
12
  import { MastraScorerEntry, ScoreRowData } from '@mastra/core/scores';
@@ -50,14 +51,14 @@ interface GetAgentResponse {
50
51
  defaultStreamOptions: WithoutMethods<AgentStreamOptions>;
51
52
  }
52
53
  type GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
53
- messages: string | string[] | CoreMessage[] | AiMessageType[];
54
+ messages: string | string[] | CoreMessage[] | AiMessageType[] | UIMessageWithMetadata[];
54
55
  output?: T;
55
56
  experimental_output?: T;
56
57
  runtimeContext?: RuntimeContext | Record<string, any>;
57
58
  clientTools?: ToolsInput;
58
59
  } & WithoutMethods<Omit<AgentGenerateOptions<T>, 'output' | 'experimental_output' | 'runtimeContext' | 'clientTools' | 'abortSignal'>>;
59
60
  type StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
60
- messages: string | string[] | CoreMessage[] | AiMessageType[];
61
+ messages: string | string[] | CoreMessage[] | AiMessageType[] | UIMessageWithMetadata[];
61
62
  output?: T;
62
63
  experimental_output?: T;
63
64
  runtimeContext?: RuntimeContext | Record<string, any>;
package/dist/index.d.ts CHANGED
@@ -5,7 +5,8 @@ import { GenerateReturn } from '@mastra/core/llm';
5
5
  import { JSONSchema7 } from 'json-schema';
6
6
  import { ZodSchema } from 'zod';
7
7
  import { CoreMessage, AiMessageType, StorageThreadType, StorageGetMessagesArg, PaginationInfo, MastraMessageV1, MastraMessageV2, LegacyWorkflowRuns, WorkflowRuns, WorkflowRun, QueryResult, GenerateReturn as GenerateReturn$1 } from '@mastra/core';
8
- import { AgentGenerateOptions, AgentStreamOptions, ToolsInput } from '@mastra/core/agent';
8
+ import { AgentGenerateOptions, AgentStreamOptions, UIMessageWithMetadata, ToolsInput } from '@mastra/core/agent';
9
+ export { UIMessageWithMetadata } from '@mastra/core/agent';
9
10
  import { LogLevel, BaseLogMessage } from '@mastra/core/logger';
10
11
  import { RuntimeContext } from '@mastra/core/runtime-context';
11
12
  import { MastraScorerEntry, ScoreRowData } from '@mastra/core/scores';
@@ -50,14 +51,14 @@ interface GetAgentResponse {
50
51
  defaultStreamOptions: WithoutMethods<AgentStreamOptions>;
51
52
  }
52
53
  type GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
53
- messages: string | string[] | CoreMessage[] | AiMessageType[];
54
+ messages: string | string[] | CoreMessage[] | AiMessageType[] | UIMessageWithMetadata[];
54
55
  output?: T;
55
56
  experimental_output?: T;
56
57
  runtimeContext?: RuntimeContext | Record<string, any>;
57
58
  clientTools?: ToolsInput;
58
59
  } & WithoutMethods<Omit<AgentGenerateOptions<T>, 'output' | 'experimental_output' | 'runtimeContext' | 'clientTools' | 'abortSignal'>>;
59
60
  type StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
60
- messages: string | string[] | CoreMessage[] | AiMessageType[];
61
+ messages: string | string[] | CoreMessage[] | AiMessageType[] | UIMessageWithMetadata[];
61
62
  output?: T;
62
63
  experimental_output?: T;
63
64
  runtimeContext?: RuntimeContext | Record<string, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/client-js",
3
- "version": "0.10.17-alpha.0",
3
+ "version": "0.10.17-alpha.1",
4
4
  "description": "The official TypeScript library for the Mastra Client API",
5
5
  "author": "",
6
6
  "type": "module",
@@ -34,7 +34,7 @@
34
34
  "rxjs": "7.8.1",
35
35
  "zod": "^3.25.67",
36
36
  "zod-to-json-schema": "^3.24.5",
37
- "@mastra/core": "0.12.0-alpha.0"
37
+ "@mastra/core": "0.12.0-alpha.1"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "zod": "^3.0.0"
package/src/index.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './client';
2
2
  export * from './types';
3
+ export type { UIMessageWithMetadata } from '@mastra/core/agent';
package/src/types.ts CHANGED
@@ -11,7 +11,7 @@ import type {
11
11
  PaginationInfo,
12
12
  MastraMessageV2,
13
13
  } from '@mastra/core';
14
- import type { AgentGenerateOptions, AgentStreamOptions, ToolsInput } from '@mastra/core/agent';
14
+ import type { AgentGenerateOptions, AgentStreamOptions, ToolsInput, UIMessageWithMetadata } from '@mastra/core/agent';
15
15
  import type { BaseLogMessage, LogLevel } from '@mastra/core/logger';
16
16
 
17
17
  import type { MCPToolType, ServerInfo } from '@mastra/core/mcp';
@@ -70,7 +70,7 @@ export interface GetAgentResponse {
70
70
  }
71
71
 
72
72
  export type GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
73
- messages: string | string[] | CoreMessage[] | AiMessageType[];
73
+ messages: string | string[] | CoreMessage[] | AiMessageType[] | UIMessageWithMetadata[];
74
74
  output?: T;
75
75
  experimental_output?: T;
76
76
  runtimeContext?: RuntimeContext | Record<string, any>;
@@ -80,7 +80,7 @@ export type GenerateParams<T extends JSONSchema7 | ZodSchema | undefined = undef
80
80
  >;
81
81
 
82
82
  export type StreamParams<T extends JSONSchema7 | ZodSchema | undefined = undefined> = {
83
- messages: string | string[] | CoreMessage[] | AiMessageType[];
83
+ messages: string | string[] | CoreMessage[] | AiMessageType[] | UIMessageWithMetadata[];
84
84
  output?: T;
85
85
  experimental_output?: T;
86
86
  runtimeContext?: RuntimeContext | Record<string, any>;