@rely-ai/caliber 1.19.2 → 1.19.4
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 +24 -19
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1382,11 +1382,15 @@ var ClaudeCliProvider = class {
|
|
|
1382
1382
|
const combined = this.buildCombinedPrompt(options);
|
|
1383
1383
|
const args = ["-p"];
|
|
1384
1384
|
if (options.model) args.push("--model", options.model);
|
|
1385
|
-
const child = spawn2(CLAUDE_CLI_BIN, args, {
|
|
1385
|
+
const child = IS_WINDOWS2 ? spawn2([CLAUDE_CLI_BIN, ...args].join(" "), {
|
|
1386
1386
|
cwd: process.cwd(),
|
|
1387
1387
|
stdio: ["pipe", "pipe", "inherit"],
|
|
1388
1388
|
env: process.env,
|
|
1389
|
-
|
|
1389
|
+
shell: true
|
|
1390
|
+
}) : spawn2(CLAUDE_CLI_BIN, args, {
|
|
1391
|
+
cwd: process.cwd(),
|
|
1392
|
+
stdio: ["pipe", "pipe", "inherit"],
|
|
1393
|
+
env: process.env
|
|
1390
1394
|
});
|
|
1391
1395
|
child.stdin.end(combined);
|
|
1392
1396
|
let settled = false;
|
|
@@ -1446,11 +1450,15 @@ ${msg.content}
|
|
|
1446
1450
|
return new Promise((resolve2, reject) => {
|
|
1447
1451
|
const args = ["-p"];
|
|
1448
1452
|
if (model) args.push("--model", model);
|
|
1449
|
-
const child = spawn2(CLAUDE_CLI_BIN, args, {
|
|
1453
|
+
const child = IS_WINDOWS2 ? spawn2([CLAUDE_CLI_BIN, ...args].join(" "), {
|
|
1450
1454
|
cwd: process.cwd(),
|
|
1451
1455
|
stdio: ["pipe", "pipe", "inherit"],
|
|
1452
1456
|
env: process.env,
|
|
1453
|
-
|
|
1457
|
+
shell: true
|
|
1458
|
+
}) : spawn2(CLAUDE_CLI_BIN, args, {
|
|
1459
|
+
cwd: process.cwd(),
|
|
1460
|
+
stdio: ["pipe", "pipe", "inherit"],
|
|
1461
|
+
env: process.env
|
|
1454
1462
|
});
|
|
1455
1463
|
child.stdin.end(combinedPrompt);
|
|
1456
1464
|
const chunks = [];
|
|
@@ -3200,18 +3208,13 @@ function openDiffsInEditor(editor, files) {
|
|
|
3200
3208
|
const cmd = editor === "cursor" ? "cursor" : "code";
|
|
3201
3209
|
for (const file of files) {
|
|
3202
3210
|
try {
|
|
3203
|
-
if (
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
...IS_WINDOWS3 && { shell: true }
|
|
3208
|
-
}).unref();
|
|
3211
|
+
if (IS_WINDOWS3) {
|
|
3212
|
+
const quote = (s) => `"${s}"`;
|
|
3213
|
+
const parts = file.originalPath ? [cmd, "--diff", quote(file.originalPath), quote(file.proposedPath)] : [cmd, quote(file.proposedPath)];
|
|
3214
|
+
spawn3(parts.join(" "), { shell: true, stdio: "ignore", detached: true }).unref();
|
|
3209
3215
|
} else {
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
detached: true,
|
|
3213
|
-
...IS_WINDOWS3 && { shell: true }
|
|
3214
|
-
}).unref();
|
|
3216
|
+
const args = file.originalPath ? ["--diff", file.originalPath, file.proposedPath] : [file.proposedPath];
|
|
3217
|
+
spawn3(cmd, args, { stdio: "ignore", detached: true }).unref();
|
|
3215
3218
|
}
|
|
3216
3219
|
} catch {
|
|
3217
3220
|
continue;
|
|
@@ -8292,9 +8295,11 @@ async function learnObserveCommand(options) {
|
|
|
8292
8295
|
} catch {
|
|
8293
8296
|
}
|
|
8294
8297
|
}
|
|
8295
|
-
async function learnFinalizeCommand() {
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
+
async function learnFinalizeCommand(options) {
|
|
8299
|
+
if (!options?.force) {
|
|
8300
|
+
const { isCaliberRunning: isCaliberRunning2 } = await Promise.resolve().then(() => (init_lock(), lock_exports));
|
|
8301
|
+
if (isCaliberRunning2()) return;
|
|
8302
|
+
}
|
|
8298
8303
|
if (!acquireFinalizeLock()) return;
|
|
8299
8304
|
let analyzed = false;
|
|
8300
8305
|
try {
|
|
@@ -8492,7 +8497,7 @@ program.command("refresh").description("Update docs based on recent code changes
|
|
|
8492
8497
|
program.command("hooks").description("Manage auto-refresh hooks (toggle interactively)").option("--install", "Enable all hooks non-interactively").option("--remove", "Disable all hooks non-interactively").action(tracked("hooks", hooksCommand));
|
|
8493
8498
|
var learn = program.command("learn", { hidden: true }).description("[dev] Session learning \u2014 observe tool usage and extract reusable instructions");
|
|
8494
8499
|
learn.command("observe").description("Record a tool event from stdin (called by hooks)").option("--failure", "Mark event as a tool failure").action(tracked("learn:observe", learnObserveCommand));
|
|
8495
|
-
learn.command("finalize").description("Analyze session events and update
|
|
8500
|
+
learn.command("finalize").description("Analyze session events and update CALIBER_LEARNINGS.md (called on SessionEnd)").option("--force", "Skip the running-process check (for manual invocation)").action(tracked("learn:finalize", (opts) => learnFinalizeCommand(opts)));
|
|
8496
8501
|
learn.command("install").description("Install learning hooks into .claude/settings.json").action(tracked("learn:install", learnInstallCommand));
|
|
8497
8502
|
learn.command("remove").description("Remove learning hooks from .claude/settings.json").action(tracked("learn:remove", learnRemoveCommand));
|
|
8498
8503
|
learn.command("status").description("Show learning system status").action(tracked("learn:status", learnStatusCommand));
|
package/package.json
CHANGED