This commit is contained in:
Shawn Morreau
2025-11-18 11:26:41 -05:00
parent 50c0095e87
commit e218afc35c
2 changed files with 18 additions and 3 deletions
+13 -3
View File
@@ -8,7 +8,7 @@ import { agent, installFromCurl } from "./shared.ts";
export const cursor = agent({
name: "cursor",
inputKey: "cursor_api_key",
inputKeys: ["cursor_api_key"],
install: async () => {
return await installFromCurl({
installUrl: "https://cursor.com/install",
@@ -93,10 +93,20 @@ export const cursor = agent({
});
// Handle process exit
child.on("close", (code) => {
child.on("close", (code, signal) => {
clearTimeout(timeout);
if (code !== 0) {
if (signal) {
log.warning(`Cursor CLI terminated by signal: ${signal}`);
}
if (code === 0) {
log.success("Cursor CLI completed successfully");
resolve({
success: true,
output: stdout.trim(),
});
} else {
const errorMessage = stderr || `Cursor CLI exited with code ${code}`;
log.error(`Cursor CLI failed: ${errorMessage}`);
resolve({
+5
View File
@@ -29,6 +29,11 @@ export async function run(
agent.inputKeys.map((inputKey) => [inputKey, process.env[inputKey.toUpperCase()]])
),
};
// agent: "cursor",
// ...flatMorph(agents, (_, agent) => [
// agent.inputKey,
// process.env[agent.inputKey.toUpperCase()],
// ]),
const result = await main(inputs);