@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @mastra/client-js@0.1.14-alpha.7 build /home/runner/work/mastra/mastra/client-sdks/client-js
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
  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
- CJS dist/index.cjs 21.66 KB
13
- CJS ⚡️ Build success in 1078ms
14
- ESM dist/index.js 21.48 KB
15
- ESM ⚡️ Build success in 1084ms
12
+ ESM dist/index.js 21.61 KB
13
+ ESM ⚡️ Build success in 1160ms
14
+ CJS dist/index.cjs 21.79 KB
15
+ CJS ⚡️ Build success in 1160ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 14008ms
18
- DTS dist/index.d.ts 18.97 KB
19
- DTS dist/index.d.cts 18.97 KB
17
+ DTS ⚡️ Build success in 13568ms
18
+ DTS dist/index.d.ts 19.79 KB
19
+ DTS dist/index.d.cts 19.79 KB
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
- "x-mastra-client-type": "js"
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: any[];
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: any[];
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
- "x-mastra-client-type": "js"
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-alpha.7",
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-alpha.7"
29
+ "@mastra/core": "^0.8.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@babel/preset-env": "^7.26.9",
@@ -26,7 +26,8 @@ export class BaseResource {
26
26
  headers: {
27
27
  ...headers,
28
28
  ...options.headers,
29
- 'x-mastra-client-type': 'js',
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: any[];
200
+ traces: { traces: Span[] };
161
201
  }
162
202
 
163
203
  export interface GetTelemetryParams {