@rely-ai/caliber 1.40.3 → 1.40.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.
Files changed (2) hide show
  1. package/dist/bin.js +8 -2
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -12188,9 +12188,10 @@ async function refreshCommand(options) {
12188
12188
  `${repoName}: refresh failed \u2014 ${err instanceof Error ? err.message : "unknown error"}`
12189
12189
  )
12190
12190
  );
12191
+ } finally {
12192
+ process.chdir(originalDir);
12191
12193
  }
12192
12194
  }
12193
- process.chdir(originalDir);
12194
12195
  } catch (err) {
12195
12196
  if (err instanceof Error && err.message === "__exit__") throw err;
12196
12197
  writeRefreshError(err);
@@ -12503,6 +12504,7 @@ function trimSessionFileIfNeeded(filePath) {
12503
12504
  const stat = fs43.statSync(filePath);
12504
12505
  if (stat.size > MAX_SESSION_FILE_BYTES) {
12505
12506
  fs43.writeFileSync(filePath, "");
12507
+ resetState();
12506
12508
  return;
12507
12509
  }
12508
12510
  } catch {
@@ -12540,6 +12542,7 @@ function readAllEvents() {
12540
12542
  const stat = fs43.statSync(filePath);
12541
12543
  if (stat.size > MAX_SESSION_FILE_BYTES) {
12542
12544
  fs43.writeFileSync(filePath, "");
12545
+ resetState();
12543
12546
  return [];
12544
12547
  }
12545
12548
  } catch {
@@ -12568,7 +12571,10 @@ function getEventCount() {
12568
12571
  }
12569
12572
  function clearSession() {
12570
12573
  const filePath = sessionFilePath();
12571
- if (fs43.existsSync(filePath)) fs43.unlinkSync(filePath);
12574
+ try {
12575
+ fs43.writeFileSync(filePath, "");
12576
+ } catch {
12577
+ }
12572
12578
  }
12573
12579
  function readState2() {
12574
12580
  const filePath = stateFilePath();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rely-ai/caliber",
3
- "version": "1.40.3",
3
+ "version": "1.40.4",
4
4
  "description": "AI context infrastructure for coding agents — keeps CLAUDE.md, Cursor rules, and skills in sync as your codebase evolves",
5
5
  "type": "module",
6
6
  "bin": {