@mastra/client-js 0.1.14-alpha.6 → 0.1.14-alpha.8

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.6 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 839ms
14
- ESM dist/index.js 21.48 KB
15
- ESM ⚡️ Build success in 842ms
12
+ CJS dist/index.cjs 21.79 KB
13
+ CJS ⚡️ Build success in 1252ms
14
+ ESM dist/index.js 21.61 KB
15
+ ESM ⚡️ Build success in 1262ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 13190ms
18
- DTS dist/index.d.ts 18.97 KB
19
- DTS dist/index.d.cts 18.97 KB
17
+ DTS ⚡️ Build success in 12276ms
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,21 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.1.14-alpha.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 055c4ea: Fix traces page showing e.reduce error
8
+ - bffd64f: Fix mastraClient CORS
9
+ - Updated dependencies [8df4a77]
10
+ - @mastra/core@0.8.0-alpha.8
11
+
12
+ ## 0.1.14-alpha.7
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [febc8a6]
17
+ - @mastra/core@0.8.0-alpha.7
18
+
3
19
  ## 0.1.14-alpha.6
4
20
 
5
21
  ### 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.6",
3
+ "version": "0.1.14-alpha.8",
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.6"
29
+ "@mastra/core": "^0.8.0-alpha.8"
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 {