@zibby/core 0.1.1 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -75,18 +75,26 @@ export class CursorAgentStrategy extends AgentStrategy {
|
|
|
75
75
|
'/Applications/Cursor.app/Contents/Resources/app/bin/cursor'
|
|
76
76
|
];
|
|
77
77
|
|
|
78
|
-
let cursorBin =
|
|
78
|
+
let cursorBin = null;
|
|
79
79
|
for (const bin of possibleBins) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
try {
|
|
81
|
+
if (bin.startsWith('/')) {
|
|
82
|
+
accessSync(bin, constants.X_OK);
|
|
83
|
+
} else {
|
|
84
|
+
execSync(`which ${bin} 2>/dev/null`, { stdio: 'ignore', timeout: 2000 });
|
|
85
|
+
}
|
|
85
86
|
cursorBin = bin;
|
|
87
|
+
logger.debug(`[Agent] Using binary: ${bin}`);
|
|
86
88
|
break;
|
|
89
|
+
} catch {
|
|
90
|
+
continue;
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
93
|
|
|
94
|
+
if (!cursorBin) {
|
|
95
|
+
throw new Error('Cursor Agent CLI not found. Install it or add it to PATH.');
|
|
96
|
+
}
|
|
97
|
+
|
|
90
98
|
// File-based structured output: agent writes JSON to this file
|
|
91
99
|
let resultFilePath = null;
|
|
92
100
|
if (schema) {
|