- POST /exec now accepts environmentId (UUID) and credentials (alias → UUID) instead of raw payloads; resolves entities via EnvironmentService and CredentialService before passing data to browserService.exec - exec_code MCP tool updated with same schema: environmentId + credentials map - CredentialModule imported into BrowserModule and McpModule - docs(scenario): rewrite script runtime section for single context argument - docs(mcp): update exec_code description to reflect new parameter shapes - style: reorder imports across server source (formatter)
60 lines
1.2 KiB
TypeScript
60 lines
1.2 KiB
TypeScript
import {
|
|
Column,
|
|
CreateDateColumn,
|
|
Entity,
|
|
JoinColumn,
|
|
ManyToOne,
|
|
PrimaryGeneratedColumn,
|
|
UpdateDateColumn,
|
|
} from "typeorm";
|
|
import { ScenarioRunEntity } from "./scenario-run.entity";
|
|
import { ScenarioStepEntity } from "./scenario-step.entity";
|
|
|
|
export type RunStepStatus =
|
|
| "waiting"
|
|
| "pending"
|
|
| "in_progress"
|
|
| "pass"
|
|
| "fail"
|
|
| "cancelled";
|
|
|
|
@Entity("scenario_run_steps")
|
|
export class ScenarioRunStepEntity {
|
|
@PrimaryGeneratedColumn("uuid")
|
|
id: string;
|
|
|
|
@Column("text")
|
|
runId: string;
|
|
|
|
@ManyToOne(() => ScenarioRunEntity, (run) => run.stepRuns, {
|
|
onDelete: "CASCADE",
|
|
})
|
|
@JoinColumn({ name: "runId" })
|
|
run: ScenarioRunEntity;
|
|
|
|
@Column("text")
|
|
scenarioStepId: string;
|
|
|
|
@ManyToOne(() => ScenarioStepEntity, { onDelete: "CASCADE" })
|
|
@JoinColumn({ name: "scenarioStepId" })
|
|
scenarioStep: ScenarioStepEntity;
|
|
|
|
@Column({ type: "text", default: "waiting" })
|
|
status: RunStepStatus;
|
|
|
|
@Column({ default: 0 })
|
|
order: number;
|
|
|
|
@Column({ type: "text", nullable: true })
|
|
description: string | null;
|
|
|
|
@Column({ type: "text", nullable: true })
|
|
output: string | null;
|
|
|
|
@CreateDateColumn()
|
|
createdAt: Date;
|
|
|
|
@UpdateDateColumn()
|
|
updatedAt: Date;
|
|
}
|