feat(scenarios): require environment for scenario runs
- require environmentId when creating runs in API and MCP tools - pass selected environment data into step execution helpers - prompt for environment selection before running scenarios in UI
This commit is contained in:
1 parent
d8ea2d0126
commit
56d23f913d
13 files changed
+237
-28
No files matched your search
@@ -23,6 +23,7 @@ import { AddScenarioCredentialDto } from "./dto/add-scenario-credential.dto";
|
||||
import { PaginationQueryDto } from "./dto/pagination-query.dto";
|
||||
import { ScenarioOrderBy } from "./scenario.service";
|
||||
import { RunsQueryDto } from "./dto/runs-query.dto";
|
||||
import { CreateScenarioRunDto } from "./dto/create-scenario-run.dto";
|
||||
import { ScenarioExportDto } from "./dto/scenario-export.dto";
|
||||
|
||||
@ApiTags("scenarios")
|
||||
@@ -210,8 +211,11 @@ export class ScenarioController {
|
||||
@ApiOperation({ summary: "Create a new run for a scenario" })
|
||||
@ApiResponse({ status: 201, description: "Run created with step runs" })
|
||||
@ApiResponse({ status: 404, description: "Scenario not found" })
|
||||
createRun(@Param("id", ParseUUIDPipe) id: string) {
|
||||
return this.scenarioService.createRun(id);
|
||||
createRun(
|
||||
@Param("id", ParseUUIDPipe) id: string,
|
||||
@Body() dto: CreateScenarioRunDto,
|
||||
) {
|
||||
return this.scenarioService.createRun(id, dto.environmentId);
|
||||
}
|
||||
|
||||
@Get(":id/run/:runId")
|
||||
|
||||
Reference in new issue
Block a user