Skip to content
61 changes: 32 additions & 29 deletions packages/cli-v3/src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,47 +107,50 @@ export function configureDevCommand(program: Command) {
export async function devCommand(options: DevCommandOptions) {
runtimeChecks();

const skipMCPInstall = typeof options.skipMCPInstall === "boolean" && options.skipMCPInstall;
// Only show these install prompts if the user is in a terminal (not in a Coding Agent)
if (process.stdout.isTTY) {
const skipMCPInstall = typeof options.skipMCPInstall === "boolean" && options.skipMCPInstall;

if (!skipMCPInstall) {
const hasSeenMCPInstallPrompt = readConfigHasSeenMCPInstallPrompt();
if (!skipMCPInstall) {
const hasSeenMCPInstallPrompt = readConfigHasSeenMCPInstallPrompt();

if (!hasSeenMCPInstallPrompt) {
const installChoice = await confirm({
message: "Would you like to install the Trigger.dev MCP server?",
initialValue: true,
});
if (!hasSeenMCPInstallPrompt) {
const installChoice = await confirm({
message: "Would you like to install the Trigger.dev MCP server?",
initialValue: true,
});

writeConfigHasSeenMCPInstallPrompt(true);
writeConfigHasSeenMCPInstallPrompt(true);

const skipInstall = isCancel(installChoice) || !installChoice;
const skipInstall = isCancel(installChoice) || !installChoice;

if (!skipInstall) {
log.step("Welcome to the Trigger.dev MCP server install wizard 🧙");
if (!skipInstall) {
log.step("Welcome to the Trigger.dev MCP server install wizard 🧙");

const [installError] = await tryCatch(
installMcpServer({
yolo: false,
tag: VERSION as string,
logLevel: options.logLevel,
})
);
const [installError] = await tryCatch(
installMcpServer({
yolo: false,
tag: VERSION as string,
logLevel: options.logLevel,
})
);

if (installError) {
log.error(`Failed to install MCP server: ${installError.message}`);
if (installError) {
log.error(`Failed to install MCP server: ${installError.message}`);
}
}
}
}
}

const skipRulesInstall =
typeof options.skipRulesInstall === "boolean" && options.skipRulesInstall;
const skipRulesInstall =
typeof options.skipRulesInstall === "boolean" && options.skipRulesInstall;

if (!skipRulesInstall) {
await initiateRulesInstallWizard({
manifestPath: options.rulesInstallManifestPath,
branch: options.rulesInstallBranch,
});
if (!skipRulesInstall) {
await initiateRulesInstallWizard({
manifestPath: options.rulesInstallManifestPath,
branch: options.rulesInstallBranch,
});
}
}

const authorization = await login({
Expand Down
1 change: 0 additions & 1 deletion packages/cli-v3/src/mcp/tools/deploys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export const deployTool = {
cwd: cwd.cwd,
env: {
TRIGGER_MCP_SERVER: "1",
CI: "true",
},
},
});
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-v3/src/rules/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class GithubRulesManifestLoader implements RulesManifestLoader {

async loadRulesFile(relativePath: string): Promise<string> {
const response = await fetch(
`https://raw.githubusercontent.com/triggerdotdev/trigger.dev/refs/heads/${this.branch}/${relativePath}`
`https://raw.githubusercontent.com/triggerdotdev/trigger.dev/refs/heads/${this.branch}/rules/${relativePath}`
);

if (!response.ok) {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/v3/schemas/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ export const RetrieveRunTraceSpanSchema = z.object({
runId: z.string(),
taskSlug: z.string().optional(),
taskPath: z.string().optional(),
events: z.array(z.any()),
events: z.array(z.any()).optional(),
startTime: z.coerce.date(),
duration: z.number(),
isError: z.boolean(),
Expand Down
Loading