@rely-ai/caliber 1.22.0-dev.1773767470 → 1.22.0-dev.1773768107
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/dist/bin.js +13 -7
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1271,6 +1271,7 @@ var CursorAcpProvider = class {
|
|
|
1271
1271
|
...IS_WINDOWS && { shell: true }
|
|
1272
1272
|
});
|
|
1273
1273
|
let buffer = "";
|
|
1274
|
+
let endCalled = false;
|
|
1274
1275
|
child.stdout.on("data", (data) => {
|
|
1275
1276
|
buffer += data.toString("utf-8");
|
|
1276
1277
|
const lines = buffer.split("\n");
|
|
@@ -1283,7 +1284,9 @@ var CursorAcpProvider = class {
|
|
|
1283
1284
|
const text = event.message?.content?.[0]?.text || event.content;
|
|
1284
1285
|
if (text) callbacks.onText(text);
|
|
1285
1286
|
} else if (event.type === "result") {
|
|
1286
|
-
|
|
1287
|
+
endCalled = true;
|
|
1288
|
+
const stopReason = event.is_error ? "error" : "end_turn";
|
|
1289
|
+
callbacks.onEnd({ stopReason });
|
|
1287
1290
|
}
|
|
1288
1291
|
} catch {
|
|
1289
1292
|
callbacks.onText(line);
|
|
@@ -1302,12 +1305,16 @@ var CursorAcpProvider = class {
|
|
|
1302
1305
|
const text = event.message?.content?.[0]?.text || event.content;
|
|
1303
1306
|
if (text) callbacks.onText(text);
|
|
1304
1307
|
} else if (event.type === "result") {
|
|
1305
|
-
|
|
1308
|
+
endCalled = true;
|
|
1309
|
+
callbacks.onEnd({ stopReason: event.is_error ? "error" : "end_turn" });
|
|
1306
1310
|
}
|
|
1307
1311
|
} catch {
|
|
1308
1312
|
callbacks.onText(buffer);
|
|
1309
1313
|
}
|
|
1310
1314
|
}
|
|
1315
|
+
if (!endCalled) {
|
|
1316
|
+
callbacks.onEnd({ stopReason: code === 0 ? "end_turn" : "error" });
|
|
1317
|
+
}
|
|
1311
1318
|
if (code !== 0 && code !== null) {
|
|
1312
1319
|
const err = new Error(`Cursor agent exited with code ${code}`);
|
|
1313
1320
|
callbacks.onError(err);
|
|
@@ -1323,17 +1330,16 @@ var CursorAcpProvider = class {
|
|
|
1323
1330
|
buildPrompt(options) {
|
|
1324
1331
|
const streamOpts = options;
|
|
1325
1332
|
const hasHistory = streamOpts.messages && streamOpts.messages.length > 0;
|
|
1326
|
-
let combined = "";
|
|
1327
|
-
combined += "[[System]]\n" + options.system + "\n\n";
|
|
1333
|
+
let combined = options.system + "\n\n";
|
|
1328
1334
|
if (hasHistory) {
|
|
1329
1335
|
for (const msg of streamOpts.messages) {
|
|
1330
|
-
|
|
1331
|
-
${msg.content}
|
|
1336
|
+
const label = msg.role === "user" ? "User" : "Assistant";
|
|
1337
|
+
combined += `${label}: ${msg.content}
|
|
1332
1338
|
|
|
1333
1339
|
`;
|
|
1334
1340
|
}
|
|
1335
1341
|
}
|
|
1336
|
-
combined +=
|
|
1342
|
+
combined += options.prompt;
|
|
1337
1343
|
return combined;
|
|
1338
1344
|
}
|
|
1339
1345
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rely-ai/caliber",
|
|
3
|
-
"version": "1.22.0-dev.
|
|
3
|
+
"version": "1.22.0-dev.1773768107",
|
|
4
4
|
"description": "Analyze your codebase and generate optimized AI agent configs (CLAUDE.md, .cursorrules, skills) — no API key needed",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|