create-mastra 1.0.0-beta.13 → 1.0.0-beta.15
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 +21 -0
- package/dist/index.js +53 -5
- package/dist/index.js.map +1 -1
- package/dist/templates/dev.entry.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# create-mastra
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add human-in-the-loop (HITL) support to agent networks ([#11678](https://github.com/mastra-ai/mastra/pull/11678))
|
|
8
|
+
- Add suspend/resume capabilities to agent network
|
|
9
|
+
- Enable auto-resume for suspended network execution via `autoResumeSuspendedTools`
|
|
10
|
+
|
|
11
|
+
`agent.resumeNetwork`, `agent.approveNetworkToolCall`, `agent.declineNetworkToolCall`
|
|
12
|
+
|
|
13
|
+
## 1.0.0-beta.14
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Replace deprecated client.getTraces with a client.listTraces ([#11711](https://github.com/mastra-ai/mastra/pull/11711))
|
|
18
|
+
|
|
19
|
+
- dependencies updates: ([#11642](https://github.com/mastra-ai/mastra/pull/11642))
|
|
20
|
+
- Updated dependency [`fs-extra@^11.3.3` ↗︎](https://www.npmjs.com/package/fs-extra/v/11.3.3) (from `^11.3.2`, in `dependencies`)
|
|
21
|
+
|
|
22
|
+
- Make initialState optional in studio ([#11744](https://github.com/mastra-ai/mastra/pull/11744))
|
|
23
|
+
|
|
3
24
|
## 1.0.0-beta.13
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1233,7 +1233,7 @@ var PinoLogger = class _PinoLogger extends MastraLogger {
|
|
|
1233
1233
|
};
|
|
1234
1234
|
|
|
1235
1235
|
var package_default = {
|
|
1236
|
-
version: "1.0.0-beta.
|
|
1236
|
+
version: "1.0.0-beta.15"};
|
|
1237
1237
|
function getPackageManagerAddCommand(pm) {
|
|
1238
1238
|
switch (pm) {
|
|
1239
1239
|
case "npm":
|
|
@@ -1254,7 +1254,7 @@ var DepsService = class {
|
|
|
1254
1254
|
this.packageManager = this.getPackageManager();
|
|
1255
1255
|
}
|
|
1256
1256
|
findLockFile(dir) {
|
|
1257
|
-
const lockFiles = ["pnpm-lock.yaml", "package-lock.json", "yarn.lock", "bun.lock"];
|
|
1257
|
+
const lockFiles = ["pnpm-lock.yaml", "package-lock.json", "yarn.lock", "bun.lock", "bun.lockb"];
|
|
1258
1258
|
for (const file of lockFiles) {
|
|
1259
1259
|
if (fs3__default__default.existsSync(path3.join(dir, file))) {
|
|
1260
1260
|
return file;
|
|
@@ -1276,6 +1276,7 @@ var DepsService = class {
|
|
|
1276
1276
|
case "yarn.lock":
|
|
1277
1277
|
return "yarn";
|
|
1278
1278
|
case "bun.lock":
|
|
1279
|
+
case "bun.lockb":
|
|
1279
1280
|
return "bun";
|
|
1280
1281
|
default:
|
|
1281
1282
|
return "npm";
|
|
@@ -1985,7 +1986,7 @@ export const mastra = new Mastra()
|
|
|
1985
1986
|
import { Mastra } from '@mastra/core/mastra';
|
|
1986
1987
|
import { PinoLogger } from '@mastra/loggers';
|
|
1987
1988
|
import { LibSQLStore } from '@mastra/libsql';
|
|
1988
|
-
import { Observability } from '@mastra/observability';
|
|
1989
|
+
import { Observability, DefaultExporter, CloudExporter, SensitiveDataFilter } from '@mastra/observability';
|
|
1989
1990
|
${addWorkflow ? `import { weatherWorkflow } from './workflows/weather-workflow';` : ""}
|
|
1990
1991
|
${addAgent ? `import { weatherAgent } from './agents/weather-agent';` : ""}
|
|
1991
1992
|
${addScorers ? `import { toolCallAppropriatenessScorer, completenessScorer, translationScorer } from './scorers/weather-scorer';` : ""}
|
|
@@ -2002,8 +2003,18 @@ export const mastra = new Mastra({
|
|
|
2002
2003
|
level: 'info',
|
|
2003
2004
|
}),
|
|
2004
2005
|
observability: new Observability({
|
|
2005
|
-
|
|
2006
|
-
|
|
2006
|
+
configs: {
|
|
2007
|
+
default: {
|
|
2008
|
+
serviceName: 'mastra',
|
|
2009
|
+
exporters: [
|
|
2010
|
+
new DefaultExporter(), // Persists traces to storage for Mastra Studio
|
|
2011
|
+
new CloudExporter(), // Sends traces to Mastra Cloud (if MASTRA_CLOUD_ACCESS_TOKEN is set)
|
|
2012
|
+
],
|
|
2013
|
+
spanOutputProcessors: [
|
|
2014
|
+
new SensitiveDataFilter(), // Redacts sensitive data like passwords, tokens, keys
|
|
2015
|
+
],
|
|
2016
|
+
},
|
|
2017
|
+
},
|
|
2007
2018
|
}),
|
|
2008
2019
|
});
|
|
2009
2020
|
`
|
|
@@ -2573,6 +2584,42 @@ async function initializePackageJson(pm) {
|
|
|
2573
2584
|
};
|
|
2574
2585
|
await fs4.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
2575
2586
|
}
|
|
2587
|
+
var writeReadmeFile = async ({ dirPath, projectName }) => {
|
|
2588
|
+
const packageManager = getPackageManager();
|
|
2589
|
+
const readmePath = path3.join(dirPath, "README.md");
|
|
2590
|
+
const content = `# ${projectName}
|
|
2591
|
+
|
|
2592
|
+
Welcome to your new [Mastra](https://mastra.ai/) project! We're excited to see what you'll build.
|
|
2593
|
+
|
|
2594
|
+
## Getting Started
|
|
2595
|
+
|
|
2596
|
+
Start the development server:
|
|
2597
|
+
|
|
2598
|
+
\`\`\`shell
|
|
2599
|
+
${packageManager} run dev
|
|
2600
|
+
\`\`\`
|
|
2601
|
+
|
|
2602
|
+
Open [http://localhost:4111](http://localhost:4111) in your browser to access [Mastra Studio](https://mastra.ai/docs/v1/getting-started/studio). It provides an interactive UI for building and testing your agents, along with a REST API that exposes your Mastra application as a local service. This lets you start building without worrying about integration right away.
|
|
2603
|
+
|
|
2604
|
+
You can start editing files inside the \`src/mastra\` directory. The development server will automatically reload whenever you make changes.
|
|
2605
|
+
|
|
2606
|
+
## Learn more
|
|
2607
|
+
|
|
2608
|
+
To learn more about Mastra, visit our [documentation](https://mastra.ai/docs/v1/). Your bootstrapped project includes example code for [agents](https://mastra.ai/docs/v1/agents/overview), [tools](https://mastra.ai/docs/v1/agents/using-tools), [workflows](https://mastra.ai/docs/v1/workflows/overview), [scorers](https://mastra.ai/docs/v1/evals/overview), and [observability](https://mastra.ai/docs/v1/observability/overview).
|
|
2609
|
+
|
|
2610
|
+
If you're new to AI agents, check out our [course](https://mastra.ai/course) and [YouTube videos](https://youtube.com/@mastra-ai). You can also join our [Discord](https://discord.gg/BTYqqHKUrf) community to get help and share your projects.
|
|
2611
|
+
|
|
2612
|
+
## Deploy on Mastra Cloud
|
|
2613
|
+
|
|
2614
|
+
[Mastra Cloud](https://cloud.mastra.ai/) gives you a serverless agent environment with atomic deployments. Access your agents from anywhere and monitor performance. Make sure they don't go off the rails with evals and tracing.
|
|
2615
|
+
|
|
2616
|
+
Check out the [deployment guide](https://mastra.ai/docs/v1/deployment/overview) for more details.`;
|
|
2617
|
+
const formattedContent = await prettier.format(content, {
|
|
2618
|
+
parser: "markdown",
|
|
2619
|
+
singleQuote: true
|
|
2620
|
+
});
|
|
2621
|
+
await fs4.writeFile(readmePath, formattedContent);
|
|
2622
|
+
};
|
|
2576
2623
|
async function installMastraDependency(pm, dependency, versionTag, isDev, timeout) {
|
|
2577
2624
|
let installCommand = getPackageManagerAddCommand(pm);
|
|
2578
2625
|
if (isDev) {
|
|
@@ -2655,6 +2702,7 @@ var createMastraProject = async ({
|
|
|
2655
2702
|
build: "mastra build",
|
|
2656
2703
|
start: "mastra start"
|
|
2657
2704
|
});
|
|
2705
|
+
await writeReadmeFile({ dirPath: process.cwd(), projectName });
|
|
2658
2706
|
} catch (error) {
|
|
2659
2707
|
throw new Error(
|
|
2660
2708
|
`Failed to initialize project structure: ${error instanceof Error ? error.message : "Unknown error"}`
|