@mastra/deployer 0.3.4-alpha.1 → 0.3.4-alpha.2

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.
@@ -4644,121 +4644,123 @@ async function createHonoServer(mastra, options = {}) {
4644
4644
  }),
4645
4645
  streamGenerateHandler
4646
4646
  );
4647
- app.post(
4648
- "/api/agents/:agentId/instructions",
4649
- bodyLimit.bodyLimit(bodyLimitOptions),
4650
- h({
4651
- description: "Update an agent's instructions",
4652
- tags: ["agents"],
4653
- parameters: [
4654
- {
4655
- name: "agentId",
4656
- in: "path",
4657
- required: true,
4658
- schema: { type: "string" }
4659
- }
4660
- ],
4661
- requestBody: {
4662
- required: true,
4663
- content: {
4664
- "application/json": {
4665
- schema: {
4666
- type: "object",
4667
- properties: {
4668
- instructions: {
4669
- type: "string",
4670
- description: "New instructions for the agent"
4671
- }
4672
- },
4673
- required: ["instructions"]
4674
- }
4647
+ if (options.isDev) {
4648
+ app.post(
4649
+ "/api/agents/:agentId/instructions",
4650
+ bodyLimit.bodyLimit(bodyLimitOptions),
4651
+ h({
4652
+ description: "Update an agent's instructions",
4653
+ tags: ["agents"],
4654
+ parameters: [
4655
+ {
4656
+ name: "agentId",
4657
+ in: "path",
4658
+ required: true,
4659
+ schema: { type: "string" }
4675
4660
  }
4676
- }
4677
- },
4678
- responses: {
4679
- 200: {
4680
- description: "Instructions updated successfully"
4681
- },
4682
- 403: {
4683
- description: "Not allowed in non-playground environment"
4684
- },
4685
- 404: {
4686
- description: "Agent not found"
4687
- }
4688
- }
4689
- }),
4690
- setAgentInstructionsHandler
4691
- );
4692
- app.post(
4693
- "/api/agents/:agentId/instructions/enhance",
4694
- bodyLimit.bodyLimit(bodyLimitOptions),
4695
- h({
4696
- description: "Generate an improved system prompt from instructions",
4697
- tags: ["agents"],
4698
- parameters: [
4699
- {
4700
- name: "agentId",
4701
- in: "path",
4661
+ ],
4662
+ requestBody: {
4702
4663
  required: true,
4703
- schema: { type: "string" },
4704
- description: "ID of the agent whose model will be used for prompt generation"
4705
- }
4706
- ],
4707
- requestBody: {
4708
- required: true,
4709
- content: {
4710
- "application/json": {
4711
- schema: {
4712
- type: "object",
4713
- properties: {
4714
- instructions: {
4715
- type: "string",
4716
- description: "Instructions to generate a system prompt from"
4664
+ content: {
4665
+ "application/json": {
4666
+ schema: {
4667
+ type: "object",
4668
+ properties: {
4669
+ instructions: {
4670
+ type: "string",
4671
+ description: "New instructions for the agent"
4672
+ }
4717
4673
  },
4718
- comment: {
4719
- type: "string",
4720
- description: "Optional comment for the enhanced prompt"
4721
- }
4722
- },
4723
- required: ["instructions"]
4674
+ required: ["instructions"]
4675
+ }
4724
4676
  }
4725
4677
  }
4678
+ },
4679
+ responses: {
4680
+ 200: {
4681
+ description: "Instructions updated successfully"
4682
+ },
4683
+ 403: {
4684
+ description: "Not allowed in non-playground environment"
4685
+ },
4686
+ 404: {
4687
+ description: "Agent not found"
4688
+ }
4726
4689
  }
4727
- },
4728
- responses: {
4729
- 200: {
4730
- description: "Generated system prompt and analysis",
4690
+ }),
4691
+ setAgentInstructionsHandler
4692
+ );
4693
+ app.post(
4694
+ "/api/agents/:agentId/instructions/enhance",
4695
+ bodyLimit.bodyLimit(bodyLimitOptions),
4696
+ h({
4697
+ description: "Generate an improved system prompt from instructions",
4698
+ tags: ["agents"],
4699
+ parameters: [
4700
+ {
4701
+ name: "agentId",
4702
+ in: "path",
4703
+ required: true,
4704
+ schema: { type: "string" },
4705
+ description: "ID of the agent whose model will be used for prompt generation"
4706
+ }
4707
+ ],
4708
+ requestBody: {
4709
+ required: true,
4731
4710
  content: {
4732
4711
  "application/json": {
4733
4712
  schema: {
4734
4713
  type: "object",
4735
4714
  properties: {
4736
- explanation: {
4715
+ instructions: {
4737
4716
  type: "string",
4738
- description: "Detailed analysis of the instructions"
4717
+ description: "Instructions to generate a system prompt from"
4739
4718
  },
4740
- new_prompt: {
4719
+ comment: {
4741
4720
  type: "string",
4742
- description: "The enhanced system prompt"
4721
+ description: "Optional comment for the enhanced prompt"
4743
4722
  }
4744
- }
4723
+ },
4724
+ required: ["instructions"]
4745
4725
  }
4746
4726
  }
4747
4727
  }
4748
4728
  },
4749
- 400: {
4750
- description: "Missing or invalid request parameters"
4751
- },
4752
- 404: {
4753
- description: "Agent not found"
4754
- },
4755
- 500: {
4756
- description: "Internal server error or model response parsing error"
4729
+ responses: {
4730
+ 200: {
4731
+ description: "Generated system prompt and analysis",
4732
+ content: {
4733
+ "application/json": {
4734
+ schema: {
4735
+ type: "object",
4736
+ properties: {
4737
+ explanation: {
4738
+ type: "string",
4739
+ description: "Detailed analysis of the instructions"
4740
+ },
4741
+ new_prompt: {
4742
+ type: "string",
4743
+ description: "The enhanced system prompt"
4744
+ }
4745
+ }
4746
+ }
4747
+ }
4748
+ }
4749
+ },
4750
+ 400: {
4751
+ description: "Missing or invalid request parameters"
4752
+ },
4753
+ 404: {
4754
+ description: "Agent not found"
4755
+ },
4756
+ 500: {
4757
+ description: "Internal server error or model response parsing error"
4758
+ }
4757
4759
  }
4758
- }
4759
- }),
4760
- generateSystemPromptHandler
4761
- );
4760
+ }),
4761
+ generateSystemPromptHandler
4762
+ );
4763
+ }
4762
4764
  app.get(
4763
4765
  "/api/agents/:agentId/speakers",
4764
4766
  async (c2, next) => {
@@ -4638,121 +4638,123 @@ async function createHonoServer(mastra, options = {}) {
4638
4638
  }),
4639
4639
  streamGenerateHandler
4640
4640
  );
4641
- app.post(
4642
- "/api/agents/:agentId/instructions",
4643
- bodyLimit(bodyLimitOptions),
4644
- h({
4645
- description: "Update an agent's instructions",
4646
- tags: ["agents"],
4647
- parameters: [
4648
- {
4649
- name: "agentId",
4650
- in: "path",
4651
- required: true,
4652
- schema: { type: "string" }
4653
- }
4654
- ],
4655
- requestBody: {
4656
- required: true,
4657
- content: {
4658
- "application/json": {
4659
- schema: {
4660
- type: "object",
4661
- properties: {
4662
- instructions: {
4663
- type: "string",
4664
- description: "New instructions for the agent"
4665
- }
4666
- },
4667
- required: ["instructions"]
4668
- }
4641
+ if (options.isDev) {
4642
+ app.post(
4643
+ "/api/agents/:agentId/instructions",
4644
+ bodyLimit(bodyLimitOptions),
4645
+ h({
4646
+ description: "Update an agent's instructions",
4647
+ tags: ["agents"],
4648
+ parameters: [
4649
+ {
4650
+ name: "agentId",
4651
+ in: "path",
4652
+ required: true,
4653
+ schema: { type: "string" }
4669
4654
  }
4670
- }
4671
- },
4672
- responses: {
4673
- 200: {
4674
- description: "Instructions updated successfully"
4675
- },
4676
- 403: {
4677
- description: "Not allowed in non-playground environment"
4678
- },
4679
- 404: {
4680
- description: "Agent not found"
4681
- }
4682
- }
4683
- }),
4684
- setAgentInstructionsHandler
4685
- );
4686
- app.post(
4687
- "/api/agents/:agentId/instructions/enhance",
4688
- bodyLimit(bodyLimitOptions),
4689
- h({
4690
- description: "Generate an improved system prompt from instructions",
4691
- tags: ["agents"],
4692
- parameters: [
4693
- {
4694
- name: "agentId",
4695
- in: "path",
4655
+ ],
4656
+ requestBody: {
4696
4657
  required: true,
4697
- schema: { type: "string" },
4698
- description: "ID of the agent whose model will be used for prompt generation"
4699
- }
4700
- ],
4701
- requestBody: {
4702
- required: true,
4703
- content: {
4704
- "application/json": {
4705
- schema: {
4706
- type: "object",
4707
- properties: {
4708
- instructions: {
4709
- type: "string",
4710
- description: "Instructions to generate a system prompt from"
4658
+ content: {
4659
+ "application/json": {
4660
+ schema: {
4661
+ type: "object",
4662
+ properties: {
4663
+ instructions: {
4664
+ type: "string",
4665
+ description: "New instructions for the agent"
4666
+ }
4711
4667
  },
4712
- comment: {
4713
- type: "string",
4714
- description: "Optional comment for the enhanced prompt"
4715
- }
4716
- },
4717
- required: ["instructions"]
4668
+ required: ["instructions"]
4669
+ }
4718
4670
  }
4719
4671
  }
4672
+ },
4673
+ responses: {
4674
+ 200: {
4675
+ description: "Instructions updated successfully"
4676
+ },
4677
+ 403: {
4678
+ description: "Not allowed in non-playground environment"
4679
+ },
4680
+ 404: {
4681
+ description: "Agent not found"
4682
+ }
4720
4683
  }
4721
- },
4722
- responses: {
4723
- 200: {
4724
- description: "Generated system prompt and analysis",
4684
+ }),
4685
+ setAgentInstructionsHandler
4686
+ );
4687
+ app.post(
4688
+ "/api/agents/:agentId/instructions/enhance",
4689
+ bodyLimit(bodyLimitOptions),
4690
+ h({
4691
+ description: "Generate an improved system prompt from instructions",
4692
+ tags: ["agents"],
4693
+ parameters: [
4694
+ {
4695
+ name: "agentId",
4696
+ in: "path",
4697
+ required: true,
4698
+ schema: { type: "string" },
4699
+ description: "ID of the agent whose model will be used for prompt generation"
4700
+ }
4701
+ ],
4702
+ requestBody: {
4703
+ required: true,
4725
4704
  content: {
4726
4705
  "application/json": {
4727
4706
  schema: {
4728
4707
  type: "object",
4729
4708
  properties: {
4730
- explanation: {
4709
+ instructions: {
4731
4710
  type: "string",
4732
- description: "Detailed analysis of the instructions"
4711
+ description: "Instructions to generate a system prompt from"
4733
4712
  },
4734
- new_prompt: {
4713
+ comment: {
4735
4714
  type: "string",
4736
- description: "The enhanced system prompt"
4715
+ description: "Optional comment for the enhanced prompt"
4737
4716
  }
4738
- }
4717
+ },
4718
+ required: ["instructions"]
4739
4719
  }
4740
4720
  }
4741
4721
  }
4742
4722
  },
4743
- 400: {
4744
- description: "Missing or invalid request parameters"
4745
- },
4746
- 404: {
4747
- description: "Agent not found"
4748
- },
4749
- 500: {
4750
- description: "Internal server error or model response parsing error"
4723
+ responses: {
4724
+ 200: {
4725
+ description: "Generated system prompt and analysis",
4726
+ content: {
4727
+ "application/json": {
4728
+ schema: {
4729
+ type: "object",
4730
+ properties: {
4731
+ explanation: {
4732
+ type: "string",
4733
+ description: "Detailed analysis of the instructions"
4734
+ },
4735
+ new_prompt: {
4736
+ type: "string",
4737
+ description: "The enhanced system prompt"
4738
+ }
4739
+ }
4740
+ }
4741
+ }
4742
+ }
4743
+ },
4744
+ 400: {
4745
+ description: "Missing or invalid request parameters"
4746
+ },
4747
+ 404: {
4748
+ description: "Agent not found"
4749
+ },
4750
+ 500: {
4751
+ description: "Internal server error or model response parsing error"
4752
+ }
4751
4753
  }
4752
- }
4753
- }),
4754
- generateSystemPromptHandler
4755
- );
4754
+ }),
4755
+ generateSystemPromptHandler
4756
+ );
4757
+ }
4756
4758
  app.get(
4757
4759
  "/api/agents/:agentId/speakers",
4758
4760
  async (c2, next) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/deployer",
3
- "version": "0.3.4-alpha.1",
3
+ "version": "0.3.4-alpha.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -107,8 +107,8 @@
107
107
  "rollup-plugin-node-externals": "^8.0.0",
108
108
  "typescript-paths": "^1.5.1",
109
109
  "zod": "^3.24.3",
110
- "@mastra/core": "^0.9.4-alpha.1",
111
- "@mastra/server": "^2.0.4-alpha.1"
110
+ "@mastra/core": "^0.9.4-alpha.2",
111
+ "@mastra/server": "^2.0.4-alpha.2"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@hono/node-server": "^1.13.8",
@@ -128,7 +128,7 @@
128
128
  "typescript": "^5.8.2",
129
129
  "vitest": "^2.1.9",
130
130
  "@internal/lint": "0.0.4",
131
- "@mastra/mcp": "^0.5.0-alpha.1"
131
+ "@mastra/mcp": "^0.5.0-alpha.2"
132
132
  },
133
133
  "scripts": {
134
134
  "build": "tsup src/index.ts src/build/index.ts src/server/index.ts src/build/bundler.ts src/build/analyze.ts src/bundler/index.ts src/services/index.ts src/validator/loader.ts src/validator/custom-resolver.ts --format esm,cjs --clean --experimental-dts --treeshake=smallest --splitting --publicDir",