@mastra/client-js 0.1.12-alpha.1 → 0.1.13-alpha.0

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.12-alpha.1 build /home/runner/work/mastra/mastra/client-sdks/client-js
2
+ > @mastra/client-js@0.1.13-alpha.0 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 21.01 KB
13
- ESM ⚡️ Build success in 1132ms
14
- CJS dist/index.cjs 21.19 KB
15
- CJS ⚡️ Build success in 1171ms
12
+ CJS dist/index.cjs 21.09 KB
13
+ CJS ⚡️ Build success in 817ms
14
+ ESM dist/index.js 20.92 KB
15
+ ESM ⚡️ Build success in 821ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 10321ms
17
+ DTS ⚡️ Build success in 10056ms
18
18
  DTS dist/index.d.ts 18.78 KB
19
19
  DTS dist/index.d.cts 18.78 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.1.13-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 0206617: Fix mastaClient cors error, remove default req headers
8
+ - 3811029: Add identifying header
9
+ - Updated dependencies [b4fbc59]
10
+ - @mastra/core@0.6.5-alpha.0
11
+
12
+ ## 0.1.12
13
+
14
+ ### Patch Changes
15
+
16
+ - 05ef3e0: Support voice for mastra client
17
+ - 248cb07: Allow ai-sdk Message type for messages in agent generate and stream
18
+ Fix sidebar horizontal overflow in playground
19
+ - Updated dependencies [6794797]
20
+ - Updated dependencies [fb68a80]
21
+ - Updated dependencies [b56a681]
22
+ - Updated dependencies [248cb07]
23
+ - @mastra/core@0.6.4
24
+
3
25
  ## 0.1.12-alpha.1
4
26
 
5
27
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -23,13 +23,12 @@ var BaseResource = class {
23
23
  let delay = backoffMs;
24
24
  for (let attempt = 0; attempt <= retries; attempt++) {
25
25
  try {
26
- const defaultHeaders = options.body instanceof FormData ? {} : { "Content-Type": "application/json" };
27
26
  const response = await fetch(`${baseUrl}${path}`, {
28
27
  ...options,
29
28
  headers: {
30
- ...defaultHeaders,
31
29
  ...headers,
32
- ...options.headers
30
+ ...options.headers,
31
+ "x-mastra-client-type": "js"
33
32
  },
34
33
  body: options.body instanceof FormData ? options.body : options.body ? JSON.stringify(options.body) : void 0
35
34
  });
package/dist/index.js CHANGED
@@ -21,13 +21,12 @@ var BaseResource = class {
21
21
  let delay = backoffMs;
22
22
  for (let attempt = 0; attempt <= retries; attempt++) {
23
23
  try {
24
- const defaultHeaders = options.body instanceof FormData ? {} : { "Content-Type": "application/json" };
25
24
  const response = await fetch(`${baseUrl}${path}`, {
26
25
  ...options,
27
26
  headers: {
28
- ...defaultHeaders,
29
27
  ...headers,
30
- ...options.headers
28
+ ...options.headers,
29
+ "x-mastra-client-type": "js"
31
30
  },
32
31
  body: options.body instanceof FormData ? options.body : options.body ? JSON.stringify(options.body) : void 0
33
32
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/client-js",
3
- "version": "0.1.12-alpha.1",
3
+ "version": "0.1.13-alpha.0",
4
4
  "description": "The official TypeScript library for the Mastra Client API",
5
5
  "author": "",
6
6
  "type": "module",
@@ -25,7 +25,7 @@
25
25
  "json-schema": "^0.4.0",
26
26
  "zod": "^3.24.2",
27
27
  "zod-to-json-schema": "^3.24.3",
28
- "@mastra/core": "^0.6.4-alpha.1"
28
+ "@mastra/core": "^0.6.5-alpha.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@babel/preset-env": "^7.26.9",
@@ -21,16 +21,12 @@ export class BaseResource {
21
21
 
22
22
  for (let attempt = 0; attempt <= retries; attempt++) {
23
23
  try {
24
- const defaultHeaders: Record<string, string> =
25
- options.body instanceof FormData
26
- ? {} // Let browser set correct Content-Type for FormData which is required for audio
27
- : { 'Content-Type': 'application/json' };
28
24
  const response = await fetch(`${baseUrl}${path}`, {
29
25
  ...options,
30
26
  headers: {
31
- ...defaultHeaders,
32
27
  ...headers,
33
28
  ...options.headers,
29
+ 'x-mastra-client-type': 'js',
34
30
  },
35
31
  body:
36
32
  options.body instanceof FormData ? options.body : options.body ? JSON.stringify(options.body) : undefined,