@mastra/client-js 0.1.14-alpha.7 → 0.1.14
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 +8 -8
- package/CHANGELOG.md +51 -0
- package/dist/index.cjs +3 -2
- package/dist/index.d.cts +40 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.js +3 -2
- package/package.json +2 -2
- package/src/resources/base.ts +2 -1
- package/src/types.ts +41 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/client-js@0.1.14-alpha.
|
|
2
|
+
> @mastra/client-js@0.1.14-alpha.8 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
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
12
|
+
[32mESM[39m [1mdist/index.js [22m[32m21.61 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 1160ms
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m21.79 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 1160ms
|
|
16
16
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 13568ms
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m19.79 KB[39m
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m19.79 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
+
## 0.1.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 055c4ea: Fix traces page showing e.reduce error
|
|
8
|
+
- 789bef3: Make runId optional for workflow startAsync api
|
|
9
|
+
- 8393832: Handle nested workflow view on workflow graph
|
|
10
|
+
- 84fe241: Improve streaming of workflows
|
|
11
|
+
- 5646a01: Fix parsing chunk in client-js workflow watch method sometimes failing, disrupting the stream process
|
|
12
|
+
- bffd64f: Fix mastraClient CORS
|
|
13
|
+
- 8076ecf: Unify workflow watch/start response
|
|
14
|
+
- Updated dependencies [56c31b7]
|
|
15
|
+
- Updated dependencies [619c39d]
|
|
16
|
+
- Updated dependencies [5ae0180]
|
|
17
|
+
- Updated dependencies [fe56be0]
|
|
18
|
+
- Updated dependencies [93875ed]
|
|
19
|
+
- Updated dependencies [107bcfe]
|
|
20
|
+
- Updated dependencies [9bfa12b]
|
|
21
|
+
- Updated dependencies [515ebfb]
|
|
22
|
+
- Updated dependencies [5b4e19f]
|
|
23
|
+
- Updated dependencies [dbbbf80]
|
|
24
|
+
- Updated dependencies [a0967a0]
|
|
25
|
+
- Updated dependencies [fca3b21]
|
|
26
|
+
- Updated dependencies [88fa727]
|
|
27
|
+
- Updated dependencies [f37f535]
|
|
28
|
+
- Updated dependencies [a3f0e90]
|
|
29
|
+
- Updated dependencies [4d67826]
|
|
30
|
+
- Updated dependencies [6330967]
|
|
31
|
+
- Updated dependencies [8393832]
|
|
32
|
+
- Updated dependencies [6330967]
|
|
33
|
+
- Updated dependencies [99d43b9]
|
|
34
|
+
- Updated dependencies [d7e08e8]
|
|
35
|
+
- Updated dependencies [febc8a6]
|
|
36
|
+
- Updated dependencies [7599d77]
|
|
37
|
+
- Updated dependencies [0118361]
|
|
38
|
+
- Updated dependencies [619c39d]
|
|
39
|
+
- Updated dependencies [cafae83]
|
|
40
|
+
- Updated dependencies [8076ecf]
|
|
41
|
+
- Updated dependencies [8df4a77]
|
|
42
|
+
- Updated dependencies [304397c]
|
|
43
|
+
- @mastra/core@0.8.0
|
|
44
|
+
|
|
45
|
+
## 0.1.14-alpha.8
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- 055c4ea: Fix traces page showing e.reduce error
|
|
50
|
+
- bffd64f: Fix mastraClient CORS
|
|
51
|
+
- Updated dependencies [8df4a77]
|
|
52
|
+
- @mastra/core@0.8.0-alpha.8
|
|
53
|
+
|
|
3
54
|
## 0.1.14-alpha.7
|
|
4
55
|
|
|
5
56
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -28,8 +28,9 @@ var BaseResource = class {
|
|
|
28
28
|
...options,
|
|
29
29
|
headers: {
|
|
30
30
|
...headers,
|
|
31
|
-
...options.headers
|
|
32
|
-
|
|
31
|
+
...options.headers
|
|
32
|
+
// TODO: Bring this back once we figure out what we/users need to do to make this work with cross-origin requests
|
|
33
|
+
// 'x-mastra-client-type': 'js',
|
|
33
34
|
},
|
|
34
35
|
body: options.body instanceof FormData ? options.body : options.body ? JSON.stringify(options.body) : void 0
|
|
35
36
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -125,8 +125,47 @@ interface GetLogParams {
|
|
|
125
125
|
}
|
|
126
126
|
type GetLogsResponse = BaseLogMessage[];
|
|
127
127
|
type RequestFunction = (path: string, options?: RequestOptions) => Promise<any>;
|
|
128
|
+
type SpanStatus = {
|
|
129
|
+
code: number;
|
|
130
|
+
};
|
|
131
|
+
type SpanOther = {
|
|
132
|
+
droppedAttributesCount: number;
|
|
133
|
+
droppedEventsCount: number;
|
|
134
|
+
droppedLinksCount: number;
|
|
135
|
+
};
|
|
136
|
+
type SpanEventAttributes = {
|
|
137
|
+
key: string;
|
|
138
|
+
value: {
|
|
139
|
+
[key: string]: string | number | boolean | null;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
type SpanEvent = {
|
|
143
|
+
attributes: SpanEventAttributes[];
|
|
144
|
+
name: string;
|
|
145
|
+
timeUnixNano: string;
|
|
146
|
+
droppedAttributesCount: number;
|
|
147
|
+
};
|
|
148
|
+
type Span = {
|
|
149
|
+
id: string;
|
|
150
|
+
parentSpanId: string | null;
|
|
151
|
+
traceId: string;
|
|
152
|
+
name: string;
|
|
153
|
+
scope: string;
|
|
154
|
+
kind: number;
|
|
155
|
+
status: SpanStatus;
|
|
156
|
+
events: SpanEvent[];
|
|
157
|
+
links: any[];
|
|
158
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
159
|
+
startTime: number;
|
|
160
|
+
endTime: number;
|
|
161
|
+
duration: number;
|
|
162
|
+
other: SpanOther;
|
|
163
|
+
createdAt: string;
|
|
164
|
+
};
|
|
128
165
|
interface GetTelemetryResponse {
|
|
129
|
-
traces:
|
|
166
|
+
traces: {
|
|
167
|
+
traces: Span[];
|
|
168
|
+
};
|
|
130
169
|
}
|
|
131
170
|
interface GetTelemetryParams {
|
|
132
171
|
name?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -125,8 +125,47 @@ interface GetLogParams {
|
|
|
125
125
|
}
|
|
126
126
|
type GetLogsResponse = BaseLogMessage[];
|
|
127
127
|
type RequestFunction = (path: string, options?: RequestOptions) => Promise<any>;
|
|
128
|
+
type SpanStatus = {
|
|
129
|
+
code: number;
|
|
130
|
+
};
|
|
131
|
+
type SpanOther = {
|
|
132
|
+
droppedAttributesCount: number;
|
|
133
|
+
droppedEventsCount: number;
|
|
134
|
+
droppedLinksCount: number;
|
|
135
|
+
};
|
|
136
|
+
type SpanEventAttributes = {
|
|
137
|
+
key: string;
|
|
138
|
+
value: {
|
|
139
|
+
[key: string]: string | number | boolean | null;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
type SpanEvent = {
|
|
143
|
+
attributes: SpanEventAttributes[];
|
|
144
|
+
name: string;
|
|
145
|
+
timeUnixNano: string;
|
|
146
|
+
droppedAttributesCount: number;
|
|
147
|
+
};
|
|
148
|
+
type Span = {
|
|
149
|
+
id: string;
|
|
150
|
+
parentSpanId: string | null;
|
|
151
|
+
traceId: string;
|
|
152
|
+
name: string;
|
|
153
|
+
scope: string;
|
|
154
|
+
kind: number;
|
|
155
|
+
status: SpanStatus;
|
|
156
|
+
events: SpanEvent[];
|
|
157
|
+
links: any[];
|
|
158
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
159
|
+
startTime: number;
|
|
160
|
+
endTime: number;
|
|
161
|
+
duration: number;
|
|
162
|
+
other: SpanOther;
|
|
163
|
+
createdAt: string;
|
|
164
|
+
};
|
|
128
165
|
interface GetTelemetryResponse {
|
|
129
|
-
traces:
|
|
166
|
+
traces: {
|
|
167
|
+
traces: Span[];
|
|
168
|
+
};
|
|
130
169
|
}
|
|
131
170
|
interface GetTelemetryParams {
|
|
132
171
|
name?: string;
|
package/dist/index.js
CHANGED
|
@@ -26,8 +26,9 @@ var BaseResource = class {
|
|
|
26
26
|
...options,
|
|
27
27
|
headers: {
|
|
28
28
|
...headers,
|
|
29
|
-
...options.headers
|
|
30
|
-
|
|
29
|
+
...options.headers
|
|
30
|
+
// TODO: Bring this back once we figure out what we/users need to do to make this work with cross-origin requests
|
|
31
|
+
// 'x-mastra-client-type': 'js',
|
|
31
32
|
},
|
|
32
33
|
body: options.body instanceof FormData ? options.body : options.body ? JSON.stringify(options.body) : void 0
|
|
33
34
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/client-js",
|
|
3
|
-
"version": "0.1.14
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "The official TypeScript library for the Mastra Client API",
|
|
5
5
|
"author": "",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"json-schema": "^0.4.0",
|
|
27
27
|
"zod": "^3.24.2",
|
|
28
28
|
"zod-to-json-schema": "^3.24.3",
|
|
29
|
-
"@mastra/core": "^0.8.0
|
|
29
|
+
"@mastra/core": "^0.8.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@babel/preset-env": "^7.26.9",
|
package/src/resources/base.ts
CHANGED
|
@@ -26,7 +26,8 @@ export class BaseResource {
|
|
|
26
26
|
headers: {
|
|
27
27
|
...headers,
|
|
28
28
|
...options.headers,
|
|
29
|
-
|
|
29
|
+
// TODO: Bring this back once we figure out what we/users need to do to make this work with cross-origin requests
|
|
30
|
+
// 'x-mastra-client-type': 'js',
|
|
30
31
|
},
|
|
31
32
|
body:
|
|
32
33
|
options.body instanceof FormData ? options.body : options.body ? JSON.stringify(options.body) : undefined,
|
package/src/types.ts
CHANGED
|
@@ -156,8 +156,48 @@ export type GetLogsResponse = BaseLogMessage[];
|
|
|
156
156
|
|
|
157
157
|
export type RequestFunction = (path: string, options?: RequestOptions) => Promise<any>;
|
|
158
158
|
|
|
159
|
+
type SpanStatus = {
|
|
160
|
+
code: number;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
type SpanOther = {
|
|
164
|
+
droppedAttributesCount: number;
|
|
165
|
+
droppedEventsCount: number;
|
|
166
|
+
droppedLinksCount: number;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
type SpanEventAttributes = {
|
|
170
|
+
key: string;
|
|
171
|
+
value: { [key: string]: string | number | boolean | null };
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
type SpanEvent = {
|
|
175
|
+
attributes: SpanEventAttributes[];
|
|
176
|
+
name: string;
|
|
177
|
+
timeUnixNano: string;
|
|
178
|
+
droppedAttributesCount: number;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
type Span = {
|
|
182
|
+
id: string;
|
|
183
|
+
parentSpanId: string | null;
|
|
184
|
+
traceId: string;
|
|
185
|
+
name: string;
|
|
186
|
+
scope: string;
|
|
187
|
+
kind: number;
|
|
188
|
+
status: SpanStatus;
|
|
189
|
+
events: SpanEvent[];
|
|
190
|
+
links: any[];
|
|
191
|
+
attributes: Record<string, string | number | boolean | null>;
|
|
192
|
+
startTime: number;
|
|
193
|
+
endTime: number;
|
|
194
|
+
duration: number;
|
|
195
|
+
other: SpanOther;
|
|
196
|
+
createdAt: string;
|
|
197
|
+
};
|
|
198
|
+
|
|
159
199
|
export interface GetTelemetryResponse {
|
|
160
|
-
traces:
|
|
200
|
+
traces: { traces: Span[] };
|
|
161
201
|
}
|
|
162
202
|
|
|
163
203
|
export interface GetTelemetryParams {
|