create-mastra 1.0.0-beta.11 → 1.0.0-beta.12

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,5 +1,15 @@
1
1
  # create-mastra
2
2
 
3
+ ## 1.0.0-beta.12
4
+
5
+ ### Minor Changes
6
+
7
+ - Add Antigravity IDE support to create-mastra CLI. Users can now select Antigravity during project initialization and automatically configure the global Mastra MCP server for the IDE, reducing manual setup and enabling immediate use of Mastra agents. ([#11374](https://github.com/mastra-ai/mastra/pull/11374))
8
+
9
+ ### Patch Changes
10
+
11
+ - Add debugger-like click-through UI to workflow graph ([#11350](https://github.com/mastra-ai/mastra/pull/11350))
12
+
3
13
  ## 1.0.0-beta.11
4
14
 
5
15
  ## 1.0.0-beta.10
package/dist/index.js CHANGED
@@ -105,6 +105,10 @@ var PosthogAnalytics = class {
105
105
  machine_id: os.hostname()
106
106
  };
107
107
  }
108
+ getDurationMs(startTime) {
109
+ const [seconds, nanoseconds] = process.hrtime(startTime);
110
+ return seconds * 1e3 + nanoseconds / 1e6;
111
+ }
108
112
  captureSessionStart() {
109
113
  if (!this.client) {
110
114
  return;
@@ -173,8 +177,7 @@ var PosthogAnalytics = class {
173
177
  const startTime = process.hrtime();
174
178
  try {
175
179
  const result = await execution();
176
- const [seconds, nanoseconds] = process.hrtime(startTime);
177
- const durationMs = seconds * 1e3 + nanoseconds / 1e6;
180
+ const durationMs = this.getDurationMs(startTime);
178
181
  this.trackCommand({
179
182
  command,
180
183
  args,
@@ -184,8 +187,7 @@ var PosthogAnalytics = class {
184
187
  });
185
188
  return result;
186
189
  } catch (error) {
187
- const [seconds, nanoseconds] = process.hrtime(startTime);
188
- const durationMs = seconds * 1e3 + nanoseconds / 1e6;
190
+ const durationMs = this.getDurationMs(startTime);
189
191
  this.trackCommand({
190
192
  command,
191
193
  args,
@@ -1231,7 +1233,7 @@ var PinoLogger = class _PinoLogger extends MastraLogger {
1231
1233
  };
1232
1234
 
1233
1235
  var package_default = {
1234
- version: "1.0.0-beta.11"};
1236
+ version: "1.0.0-beta.12"};
1235
1237
  function getPackageManagerAddCommand(pm) {
1236
1238
  switch (pm) {
1237
1239
  case "npm":
@@ -1491,6 +1493,7 @@ async function writeMergedConfig(configPath, editor, versionTag) {
1491
1493
  });
1492
1494
  }
1493
1495
  var windsurfGlobalMCPConfigPath = path3.join(os.homedir(), ".codeium", "windsurf", "mcp_config.json");
1496
+ var antigravityGlobalMCPConfigPath = path3.join(os.homedir(), ".gemini", "antigravity", "mcp_config.json");
1494
1497
  var cursorGlobalMCPConfigPath = path3.join(os.homedir(), ".cursor", "mcp.json");
1495
1498
  path3.join(process.cwd(), ".vscode", "mcp.json");
1496
1499
  var vscodeGlobalMCPConfigPath = path3.join(
@@ -1522,11 +1525,20 @@ async function installMastraDocsMCPServer({
1522
1525
  }
1523
1526
  await writeMergedConfig(windsurfGlobalMCPConfigPath, editor, versionTag);
1524
1527
  }
1528
+ if (editor === `antigravity`) {
1529
+ const alreadyInstalled = await globalMCPIsAlreadyInstalled(editor, versionTag);
1530
+ if (alreadyInstalled) {
1531
+ return;
1532
+ }
1533
+ await writeMergedConfig(antigravityGlobalMCPConfigPath, editor, versionTag);
1534
+ }
1525
1535
  }
1526
1536
  async function globalMCPIsAlreadyInstalled(editor, versionTag) {
1527
1537
  let configPath = ``;
1528
1538
  if (editor === "windsurf") {
1529
1539
  configPath = windsurfGlobalMCPConfigPath;
1540
+ } else if (editor === "antigravity") {
1541
+ configPath = antigravityGlobalMCPConfigPath;
1530
1542
  } else if (editor === "cursor-global") {
1531
1543
  configPath = cursorGlobalMCPConfigPath;
1532
1544
  } else if (editor === "vscode") {
@@ -2114,6 +2126,10 @@ var interactivePrompt = async (args = {}) => {
2114
2126
  {
2115
2127
  value: "vscode",
2116
2128
  label: "VSCode"
2129
+ },
2130
+ {
2131
+ value: "antigravity",
2132
+ label: "Antigravity"
2117
2133
  }
2118
2134
  ]
2119
2135
  });
@@ -2150,6 +2166,19 @@ This means the Mastra docs MCP server will be available in all your Windsurf pro
2150
2166
  return void 0;
2151
2167
  }
2152
2168
  }
2169
+ if (editor === `antigravity`) {
2170
+ const confirm3 = await ve({
2171
+ message: `Antigravity only supports a global MCP config (at ${antigravityGlobalMCPConfigPath}). Is it ok to add/update that global config?
2172
+ This will make the Mastra docs MCP server available in all Antigravity projects.`,
2173
+ options: [
2174
+ { value: "yes", label: "Yes, I understand" },
2175
+ { value: "skip", label: "No, skip for now" }
2176
+ ]
2177
+ });
2178
+ if (confirm3 !== `yes`) {
2179
+ return void 0;
2180
+ }
2181
+ }
2153
2182
  return editor;
2154
2183
  },
2155
2184
  initGit: async () => {
@@ -3014,7 +3043,7 @@ program.version(`${version}`, "-v, --version").description(`create-mastra ${vers
3014
3043
  program.name("create-mastra").description("Create a new Mastra project").argument("[project-name]", "Directory name of the project").option(
3015
3044
  "-p, --project-name <string>",
3016
3045
  "Project name that will be used in package.json and as the project directory name."
3017
- ).option("--default", "Quick start with defaults (src, OpenAI, examples)").option("-c, --components <components>", "Comma-separated list of components (agents, tools, workflows, scorers)").option("-l, --llm <model-provider>", "Default model provider (openai, anthropic, groq, google, or cerebras)").option("-k, --llm-api-key <api-key>", "API key for the model provider").option("-e, --example", "Include example code").option("-n, --no-example", "Do not include example code").option("-t, --timeout [timeout]", "Configurable timeout for package installation, defaults to 60000 ms").option("-d, --dir <directory>", "Target directory for Mastra source code (default: src/)").option("-m, --mcp <mcp>", "MCP Server for code editor (cursor, cursor-global, windsurf, vscode)").option(
3046
+ ).option("--default", "Quick start with defaults (src, OpenAI, examples)").option("-c, --components <components>", "Comma-separated list of components (agents, tools, workflows, scorers)").option("-l, --llm <model-provider>", "Default model provider (openai, anthropic, groq, google, or cerebras)").option("-k, --llm-api-key <api-key>", "API key for the model provider").option("-e, --example", "Include example code").option("-n, --no-example", "Do not include example code").option("-t, --timeout [timeout]", "Configurable timeout for package installation, defaults to 60000 ms").option("-d, --dir <directory>", "Target directory for Mastra source code (default: src/)").option("-m, --mcp <mcp>", "MCP Server for code editor (cursor, cursor-global, windsurf, vscode, antigravity)").option(
3018
3047
  "--template [template-name]",
3019
3048
  "Create project from a template (use template name, public GitHub URL, or leave blank to select from list)"
3020
3049
  ).action(async (projectNameArg, args) => {