@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.
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +10 -0
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/types.ts +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/client-js@0.10.17-alpha.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
[34mCLI[39m Cleaning output folder
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
|
-
[32mESM[39m [1mdist/index.js [22m[32m73.73 KB[39m
|
|
13
|
-
[32mESM[39m ⚡️ Build success in 2020ms
|
|
14
12
|
[32mCJS[39m [1mdist/index.cjs [22m[32m74.04 KB[39m
|
|
15
|
-
[32mCJS[39m ⚡️ Build success in
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 2302ms
|
|
14
|
+
[32mESM[39m [1mdist/index.js [22m[32m73.73 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 2304ms
|
|
16
16
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m46.
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[32m46.
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 19056ms
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m46.21 KB[39m
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m46.21 KB[39m
|
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.
|
|
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.
|
|
37
|
+
"@mastra/core": "0.12.0-alpha.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"zod": "^3.0.0"
|
package/src/index.ts
CHANGED
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>;
|