create-mastra 0.0.0-stream-vnext-usage-20250908171242 → 0.0.0-suspendRuntimeContextTypeFix-20250930142630

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/CHANGELOG.md CHANGED
@@ -1,14 +1,152 @@
1
1
  # create-mastra
2
2
 
3
- ## 0.0.0-stream-vnext-usage-20250908171242
3
+ ## 0.0.0-suspendRuntimeContextTypeFix-20250930142630
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed an issue in playground where text-start/end parts were ignored in handleStreamChunk and tool ordering vs text wasn't retained ([#8234](https://github.com/mastra-ai/mastra/pull/8234))
8
+
9
+ - Add conditional chaining to scorer.agentNames return ([#8199](https://github.com/mastra-ai/mastra/pull/8199))
10
+
11
+ - Add types in the streamVNext codepath, fixes for various issues across multiple packages surfaced from type issues, align return types. ([#8010](https://github.com/mastra-ai/mastra/pull/8010))
12
+
13
+ - Add model fallbacks to playground ([#7427](https://github.com/mastra-ai/mastra/pull/7427))
14
+
15
+ ## 0.13.3-alpha.0
16
+
17
+ ### Patch Changes
18
+
19
+ - Add types in the streamVNext codepath, fixes for various issues across multiple packages surfaced from type issues, align return types. ([#8010](https://github.com/mastra-ai/mastra/pull/8010))
20
+
21
+ - Add model fallbacks to playground ([#7427](https://github.com/mastra-ai/mastra/pull/7427))
22
+
23
+ ## 0.13.2
24
+
25
+ ### Patch Changes
26
+
27
+ - dependencies updates: ([#8007](https://github.com/mastra-ai/mastra/pull/8007))
28
+ - Updated dependency [`fs-extra@^11.3.2` ↗︎](https://www.npmjs.com/package/fs-extra/v/11.3.2) (from `^11.3.1`, in `dependencies`)
29
+
30
+ - Add model fallback handlers and apis ([#7378](https://github.com/mastra-ai/mastra/pull/7378))
31
+
32
+ - Fix DateTimePicker style issue ([#8106](https://github.com/mastra-ai/mastra/pull/8106))
33
+
34
+ - Fix getting tool link path from agent in playground ui tools page ([#8135](https://github.com/mastra-ai/mastra/pull/8135))
35
+
36
+ ## 0.13.2-alpha.4
37
+
38
+ ### Patch Changes
39
+
40
+ - Fix getting tool link path from agent in playground ui tools page ([#8135](https://github.com/mastra-ai/mastra/pull/8135))
41
+
42
+ ## 0.13.2-alpha.3
43
+
44
+ ### Patch Changes
45
+
46
+ - Add model fallback handlers and apis ([#7378](https://github.com/mastra-ai/mastra/pull/7378))
47
+
48
+ - Fix DateTimePicker style issue ([#8106](https://github.com/mastra-ai/mastra/pull/8106))
49
+
50
+ ## 0.13.2-alpha.2
51
+
52
+ ## 0.13.2-alpha.1
53
+
54
+ ### Patch Changes
55
+
56
+ - dependencies updates: ([#8007](https://github.com/mastra-ai/mastra/pull/8007))
57
+ - Updated dependency [`fs-extra@^11.3.2` ↗︎](https://www.npmjs.com/package/fs-extra/v/11.3.2) (from `^11.3.1`, in `dependencies`)
58
+
59
+ ## 0.13.2-alpha.0
60
+
61
+ ## 0.13.1
62
+
63
+ ## 0.13.1-alpha.0
64
+
65
+ ## 0.13.0
66
+
67
+ ### Patch Changes
68
+
69
+ - clean up console logs in monorepo ([#7926](https://github.com/mastra-ai/mastra/pull/7926))
70
+
71
+ - Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
72
+
73
+ - fix minor playground stuff for observability ([#7765](https://github.com/mastra-ai/mastra/pull/7765))
74
+
75
+ - Handle zod intersections in dynamic form ([#7768](https://github.com/mastra-ai/mastra/pull/7768))
76
+
77
+ - Playground ui -pass runtimeContext to client SDK get methods ([#7767](https://github.com/mastra-ai/mastra/pull/7767))
78
+
79
+ ## 0.13.0-alpha.5
80
+
81
+ ## 0.13.0-alpha.4
82
+
83
+ ### Patch Changes
84
+
85
+ - clean up console logs in monorepo ([#7926](https://github.com/mastra-ai/mastra/pull/7926))
86
+
87
+ ## 0.13.0-alpha.3
88
+
89
+ ## 0.13.0-alpha.2
90
+
91
+ ## 0.13.0-alpha.1
92
+
93
+ ### Patch Changes
94
+
95
+ - Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
96
+
97
+ ## 0.12.4-alpha.0
98
+
99
+ ### Patch Changes
100
+
101
+ - fix minor playground stuff for observability ([#7765](https://github.com/mastra-ai/mastra/pull/7765))
102
+
103
+ - Handle zod intersections in dynamic form ([#7768](https://github.com/mastra-ai/mastra/pull/7768))
104
+
105
+ - Playground ui -pass runtimeContext to client SDK get methods ([#7767](https://github.com/mastra-ai/mastra/pull/7767))
106
+
107
+ ## 0.12.3
108
+
109
+ ### Patch Changes
110
+
111
+ - Client SDK Agents, Mastra server - support runtimeContext with GET requests ([#7734](https://github.com/mastra-ai/mastra/pull/7734))
112
+
113
+ ## 0.12.3-alpha.1
114
+
115
+ ### Patch Changes
116
+
117
+ - Client SDK Agents, Mastra server - support runtimeContext with GET requests ([#7734](https://github.com/mastra-ai/mastra/pull/7734))
118
+
119
+ ## 0.12.3-alpha.0
120
+
121
+ ## 0.12.2
122
+
123
+ ## 0.12.2-alpha.0
124
+
125
+ ## 0.12.1
4
126
 
5
127
  ### Patch Changes
6
128
 
7
129
  - dependencies updates: ([#7544](https://github.com/mastra-ai/mastra/pull/7544))
8
130
  - Updated dependency [`fs-extra@^11.3.1` ↗︎](https://www.npmjs.com/package/fs-extra/v/11.3.1) (from `^11.3.0`, in `dependencies`)
9
131
 
132
+ - add workflow streaming in agent thread ([#7506](https://github.com/mastra-ai/mastra/pull/7506))
133
+
134
+ - Fix template slug when getting template environment variables ([#7650](https://github.com/mastra-ai/mastra/pull/7650))
135
+
10
136
  - Update cli dev copy from "Local" - ([#7579](https://github.com/mastra-ai/mastra/pull/7579))
11
137
 
138
+ ## 0.12.1-alpha.2
139
+
140
+ ### Patch Changes
141
+
142
+ - Fix template slug when getting template environment variables ([#7650](https://github.com/mastra-ai/mastra/pull/7650))
143
+
144
+ ## 0.12.1-alpha.1
145
+
146
+ ### Patch Changes
147
+
148
+ - add workflow streaming in agent thread ([#7506](https://github.com/mastra-ai/mastra/pull/7506))
149
+
12
150
  ## 0.12.1-alpha.0
13
151
 
14
152
  ### Patch Changes
package/dist/index.js CHANGED
@@ -12,15 +12,15 @@ import y$1, { stdout, stdin } from 'node:process';
12
12
  import * as g from 'node:readline';
13
13
  import g__default from 'node:readline';
14
14
  import { Writable } from 'node:stream';
15
- import fs from 'node:fs/promises';
15
+ import fs5 from 'node:fs/promises';
16
16
  import child_process from 'node:child_process';
17
17
  import tty from 'node:tty';
18
18
  import pino from 'pino';
19
19
  import pretty from 'pino-pretty';
20
20
  import { execa } from 'execa';
21
- import fsExtra2, { readJSON, ensureFile, writeJSON } from 'fs-extra/esm';
21
+ import fsExtra, { readJSON, ensureFile, writeJSON } from 'fs-extra/esm';
22
22
  import prettier from 'prettier';
23
- import fsExtra from 'fs-extra';
23
+ import fsExtra$1 from 'fs-extra';
24
24
 
25
25
  var __filename = fileURLToPath(import.meta.url);
26
26
  var __dirname = path3.dirname(__filename);
@@ -1214,7 +1214,7 @@ async function cloneTemplate(options) {
1214
1214
  await updatePackageJson(projectPath, projectName);
1215
1215
  const envExamplePath = path3.join(projectPath, ".env.example");
1216
1216
  if (await fileExists(envExamplePath)) {
1217
- await fs.copyFile(envExamplePath, path3.join(projectPath, ".env"));
1217
+ await fs5.copyFile(envExamplePath, path3.join(projectPath, ".env"));
1218
1218
  }
1219
1219
  spinner5.success(`Template "${template.title}" cloned successfully to ${projectName}`);
1220
1220
  return projectPath;
@@ -1225,7 +1225,7 @@ async function cloneTemplate(options) {
1225
1225
  }
1226
1226
  async function directoryExists(dirPath) {
1227
1227
  try {
1228
- const stat = await fs.stat(dirPath);
1228
+ const stat = await fs5.stat(dirPath);
1229
1229
  return stat.isDirectory();
1230
1230
  } catch {
1231
1231
  return false;
@@ -1233,14 +1233,14 @@ async function directoryExists(dirPath) {
1233
1233
  }
1234
1234
  async function fileExists(filePath) {
1235
1235
  try {
1236
- const stat = await fs.stat(filePath);
1236
+ const stat = await fs5.stat(filePath);
1237
1237
  return stat.isFile();
1238
1238
  } catch {
1239
1239
  return false;
1240
1240
  }
1241
1241
  }
1242
1242
  async function cloneRepositoryWithoutGit(repoUrl, targetPath) {
1243
- await fs.mkdir(targetPath, { recursive: true });
1243
+ await fs5.mkdir(targetPath, { recursive: true });
1244
1244
  try {
1245
1245
  const degitRepo = repoUrl.replace("https://github.com/", "");
1246
1246
  const degitCommand = shellQuote.quote(["npx", "degit", degitRepo, targetPath]);
@@ -1255,7 +1255,7 @@ async function cloneRepositoryWithoutGit(repoUrl, targetPath) {
1255
1255
  });
1256
1256
  const gitDir = path3.join(targetPath, ".git");
1257
1257
  if (await directoryExists(gitDir)) {
1258
- await fs.rm(gitDir, { recursive: true, force: true });
1258
+ await fs5.rm(gitDir, { recursive: true, force: true });
1259
1259
  }
1260
1260
  } catch (gitError) {
1261
1261
  throw new Error(`Failed to clone repository: ${gitError instanceof Error ? gitError.message : "Unknown error"}`);
@@ -1265,10 +1265,10 @@ async function cloneRepositoryWithoutGit(repoUrl, targetPath) {
1265
1265
  async function updatePackageJson(projectPath, projectName) {
1266
1266
  const packageJsonPath = path3.join(projectPath, "package.json");
1267
1267
  try {
1268
- const packageJsonContent = await fs.readFile(packageJsonPath, "utf-8");
1268
+ const packageJsonContent = await fs5.readFile(packageJsonPath, "utf-8");
1269
1269
  const packageJson = JSON.parse(packageJsonContent);
1270
1270
  packageJson.name = projectName;
1271
- await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
1271
+ await fs5.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
1272
1272
  } catch (error) {
1273
1273
  logger.warn(`Could not update package.json: ${error instanceof Error ? error.message : "Unknown error"}`);
1274
1274
  }
@@ -1411,11 +1411,11 @@ var DepsService = class {
1411
1411
  try {
1412
1412
  const packageJsonPath = path3.join(process.cwd(), "package.json");
1413
1413
  try {
1414
- await fs.access(packageJsonPath);
1414
+ await fs5.access(packageJsonPath);
1415
1415
  } catch {
1416
1416
  return "No package.json file found in the current directory";
1417
1417
  }
1418
- const packageJson = JSON.parse(await fs.readFile(packageJsonPath, "utf-8"));
1418
+ const packageJson = JSON.parse(await fs5.readFile(packageJsonPath, "utf-8"));
1419
1419
  for (const dependency of dependencies) {
1420
1420
  if (!packageJson.dependencies || !packageJson.dependencies[dependency]) {
1421
1421
  return `Please install ${dependency} before running this command (${this.packageManager} install ${dependency})`;
@@ -1430,7 +1430,7 @@ var DepsService = class {
1430
1430
  async getProjectName() {
1431
1431
  try {
1432
1432
  const packageJsonPath = path3.join(process.cwd(), "package.json");
1433
- const packageJson = await fs.readFile(packageJsonPath, "utf-8");
1433
+ const packageJson = await fs5.readFile(packageJsonPath, "utf-8");
1434
1434
  const pkg = JSON.parse(packageJson);
1435
1435
  return pkg.name;
1436
1436
  } catch (err) {
@@ -1438,12 +1438,12 @@ var DepsService = class {
1438
1438
  }
1439
1439
  }
1440
1440
  async addScriptsToPackageJson(scripts) {
1441
- const packageJson = JSON.parse(await fs.readFile("package.json", "utf-8"));
1441
+ const packageJson = JSON.parse(await fs5.readFile("package.json", "utf-8"));
1442
1442
  packageJson.scripts = {
1443
1443
  ...packageJson.scripts,
1444
1444
  ...scripts
1445
1445
  };
1446
- await fs.writeFile("package.json", JSON.stringify(packageJson, null, 2));
1446
+ await fs5.writeFile("package.json", JSON.stringify(packageJson, null, 2));
1447
1447
  }
1448
1448
  };
1449
1449
  var args = ["-y", "@mastra/mcp-docs-server"];
@@ -1596,7 +1596,7 @@ var FileEnvService = class extends EnvService {
1596
1596
  ${key}=${value}`;
1597
1597
  }
1598
1598
  await this.writeFile({ filePath, data });
1599
- console.log(`${key} set to ${value} in ENV file.`);
1599
+ console.info(`${key} set to ${value} in ENV file.`);
1600
1600
  return data;
1601
1601
  }
1602
1602
  async getEnvValue(key) {
@@ -1633,15 +1633,15 @@ var FileService = class {
1633
1633
  const filePath = path3.resolve(__dirname, "starter-files", inputFile);
1634
1634
  const fileString = fs4__default__default.readFileSync(filePath, "utf8");
1635
1635
  if (fs4__default__default.existsSync(outputFilePath) && !replaceIfExists) {
1636
- console.log(`${outputFilePath} already exists`);
1636
+ console.info(`${outputFilePath} already exists`);
1637
1637
  return false;
1638
1638
  }
1639
- await fsExtra2.outputFile(outputFilePath, fileString);
1639
+ await fsExtra.outputFile(outputFilePath, fileString);
1640
1640
  return true;
1641
1641
  }
1642
1642
  async setupEnvFile({ dbUrl }) {
1643
1643
  const envPath = path3.join(process.cwd(), ".env.development");
1644
- await fsExtra2.ensureFile(envPath);
1644
+ await fsExtra.ensureFile(envPath);
1645
1645
  const fileEnvService = new FileEnvService(envPath);
1646
1646
  await fileEnvService.setEnvValue("DB_URL", dbUrl);
1647
1647
  }
@@ -1754,8 +1754,8 @@ export const weatherAgent = new Agent({
1754
1754
  parser: "typescript",
1755
1755
  singleQuote: true
1756
1756
  });
1757
- await fs.writeFile(destPath, "");
1758
- await fs.writeFile(destPath, formattedContent);
1757
+ await fs5.writeFile(destPath, "");
1758
+ await fs5.writeFile(destPath, formattedContent);
1759
1759
  }
1760
1760
  async function writeWorkflowSample(destPath) {
1761
1761
  const content = `import { createStep, createWorkflow } from '@mastra/core/workflows';
@@ -1948,7 +1948,7 @@ export { weatherWorkflow };`;
1948
1948
  semi: true,
1949
1949
  singleQuote: true
1950
1950
  });
1951
- await fs.writeFile(destPath, formattedContent);
1951
+ await fs5.writeFile(destPath, formattedContent);
1952
1952
  }
1953
1953
  async function writeToolSample(destPath) {
1954
1954
  const fileService = new FileService();
@@ -1968,7 +1968,7 @@ async function writeCodeSampleForComponents(llmprovider, component, destPath, im
1968
1968
  }
1969
1969
  var createComponentsDir = async (dirPath, component) => {
1970
1970
  const componentPath = dirPath + `/${component}`;
1971
- await fsExtra2.ensureDir(componentPath);
1971
+ await fsExtra.ensureDir(componentPath);
1972
1972
  };
1973
1973
  var writeIndexFile = async ({
1974
1974
  dirPath,
@@ -1979,13 +1979,13 @@ var writeIndexFile = async ({
1979
1979
  const indexPath = dirPath + "/index.ts";
1980
1980
  const destPath = path3.join(indexPath);
1981
1981
  try {
1982
- await fs.writeFile(destPath, "");
1982
+ await fs5.writeFile(destPath, "");
1983
1983
  const filteredExports = [
1984
1984
  addWorkflow ? `workflows: { weatherWorkflow },` : "",
1985
1985
  addAgent ? `agents: { weatherAgent },` : ""
1986
1986
  ].filter(Boolean);
1987
1987
  if (!addExample) {
1988
- await fs.writeFile(
1988
+ await fs5.writeFile(
1989
1989
  destPath,
1990
1990
  `
1991
1991
  import { Mastra } from '@mastra/core';
@@ -1995,7 +1995,7 @@ export const mastra = new Mastra()
1995
1995
  );
1996
1996
  return;
1997
1997
  }
1998
- await fs.writeFile(
1998
+ await fs5.writeFile(
1999
1999
  destPath,
2000
2000
  `
2001
2001
  import { Mastra } from '@mastra/core/mastra';
@@ -2057,10 +2057,10 @@ var createMastraDir = async (directory) => {
2057
2057
  let dir = directory.trim().split("/").filter((item) => item !== "");
2058
2058
  const dirPath = path3.join(process.cwd(), ...dir, "mastra");
2059
2059
  try {
2060
- await fs.access(dirPath);
2060
+ await fs5.access(dirPath);
2061
2061
  return { ok: false };
2062
2062
  } catch {
2063
- await fsExtra2.ensureDir(dirPath);
2063
+ await fsExtra.ensureDir(dirPath);
2064
2064
  return { ok: true, dirPath };
2065
2065
  }
2066
2066
  };
@@ -2342,7 +2342,7 @@ var createMastraProject = async ({
2342
2342
  try {
2343
2343
  s2.start("Creating project");
2344
2344
  try {
2345
- await fs.mkdir(projectName);
2345
+ await fs5.mkdir(projectName);
2346
2346
  } catch (error) {
2347
2347
  if (error instanceof Error && "code" in error && error.code === "EEXIST") {
2348
2348
  s2.stop(`A directory named "${projectName}" already exists. Please choose a different name.`);
@@ -2432,7 +2432,7 @@ var createMastraProject = async ({
2432
2432
  }
2433
2433
  s2.stop(".gitignore added");
2434
2434
  Se("Project created successfully");
2435
- console.log("");
2435
+ console.info("");
2436
2436
  return { projectName };
2437
2437
  } catch (error) {
2438
2438
  s2.stop();
@@ -2642,13 +2642,13 @@ async function getPackageVersion() {
2642
2642
  const __filename = fileURLToPath(import.meta.url);
2643
2643
  const __dirname = dirname(__filename);
2644
2644
  const pkgJsonPath = path3.join(__dirname, "..", "package.json");
2645
- const content = await fsExtra.readJSON(pkgJsonPath);
2645
+ const content = await fsExtra$1.readJSON(pkgJsonPath);
2646
2646
  return content.version;
2647
2647
  }
2648
2648
  async function getCreateVersionTag() {
2649
2649
  try {
2650
2650
  const pkgPath = fileURLToPath(import.meta.resolve("create-mastra/package.json"));
2651
- const json = await fsExtra.readJSON(pkgPath);
2651
+ const json = await fsExtra$1.readJSON(pkgPath);
2652
2652
  const { stdout } = await execa("npm", ["dist-tag", "create-mastra"]);
2653
2653
  const tagLine = stdout.split("\n").find((distLine) => distLine.endsWith(`: ${json.version}`));
2654
2654
  const tag = tagLine ? tagLine.split(":")[0].trim() : "latest";
@@ -2672,7 +2672,7 @@ program.version(`${version}`, "-v, --version").description(`create-mastra ${vers
2672
2672
  analytics.trackCommand({
2673
2673
  command: "version"
2674
2674
  });
2675
- console.log(`create-mastra ${version}`);
2675
+ console.info(`create-mastra ${version}`);
2676
2676
  } catch {
2677
2677
  }
2678
2678
  });