feat(scenarios): overhaul export/import with multi-entity YAML format
- export now accepts includeEnvironment and credentialIds query params - output is a YAML stream with comment-delimited environment, credential, and scenario sections - scenario entity includes credentials array with alias mappings - import accepts both old single-object and new array format, upserts envs/creds before linking - new ExportScenarioModal with env and per-credential checkboxes replaces direct download
This commit is contained in:
@@ -965,7 +965,10 @@ export class McpService {
|
||||
},
|
||||
async ({ id }) => {
|
||||
try {
|
||||
const exported = await this.scenarioService.exportScenario(id);
|
||||
const exported = await this.scenarioService.exportScenario(id, {
|
||||
includeEnvironment: false,
|
||||
credentialIds: [],
|
||||
});
|
||||
return {
|
||||
content: [
|
||||
{ type: "text" as const, text: JSON.stringify(exported) },
|
||||
@@ -1010,11 +1013,10 @@ export class McpService {
|
||||
async ({ name, description, steps }) => {
|
||||
try {
|
||||
const scenario = await this.scenarioService.importScenario({
|
||||
kind: "scenario",
|
||||
name,
|
||||
description,
|
||||
steps: steps as Parameters<
|
||||
typeof this.scenarioService.importScenario
|
||||
>[0]["steps"],
|
||||
steps: steps as { title: string | null; execCode: string | null }[],
|
||||
});
|
||||
return {
|
||||
content: [
|
||||
|
||||
Reference in New Issue
Block a user