@ouro.bot/cli 0.1.0-alpha.30 → 0.1.0-alpha.31

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/changelog.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.31",
6
+ "changes": [
7
+ "BlueBubbles no longer silently deletes old per-thread session files when loading a chat trunk. It now only detects and warns about those obsolete artifacts so local state is never mutated without an explicit human choice.",
8
+ "The cross-thread-awareness fix still keeps one chat trunk per conversation and preserves threaded reply targeting, but stale `_thread_*.json` files are now left in place until a person removes them."
9
+ ]
10
+ },
4
11
  {
5
12
  "version": "0.1.0-alpha.30",
6
13
  "changes": [
@@ -33,11 +33,11 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.cleanupObsoleteBlueBubblesThreadSessions = cleanupObsoleteBlueBubblesThreadSessions;
36
+ exports.findObsoleteBlueBubblesThreadSessions = findObsoleteBlueBubblesThreadSessions;
37
37
  const fs = __importStar(require("node:fs"));
38
38
  const path = __importStar(require("node:path"));
39
39
  const runtime_1 = require("../nerves/runtime");
40
- function cleanupObsoleteBlueBubblesThreadSessions(trunkSessionPath) {
40
+ function findObsoleteBlueBubblesThreadSessions(trunkSessionPath) {
41
41
  const normalized = trunkSessionPath.trim();
42
42
  if (!normalized.endsWith(".json"))
43
43
  return [];
@@ -48,26 +48,25 @@ function cleanupObsoleteBlueBubblesThreadSessions(trunkSessionPath) {
48
48
  return [];
49
49
  const dir = path.dirname(normalized);
50
50
  const prefix = trunkName.slice(0, -".json".length);
51
- const removed = [];
51
+ const threadLaneFiles = [];
52
52
  for (const entry of fs.readdirSync(dir)) {
53
53
  if (!entry.endsWith(".json"))
54
54
  continue;
55
55
  if (!entry.startsWith(`${prefix}_thread_`))
56
56
  continue;
57
- const target = path.join(dir, entry);
58
- fs.rmSync(target, { force: true });
59
- removed.push(target);
57
+ threadLaneFiles.push(path.join(dir, entry));
60
58
  }
61
- if (removed.length > 0) {
59
+ if (threadLaneFiles.length > 0) {
62
60
  (0, runtime_1.emitNervesEvent)({
61
+ level: "warn",
63
62
  component: "senses",
64
- event: "senses.bluebubbles_thread_lane_cleanup",
65
- message: "removed obsolete bluebubbles thread-lane sessions",
63
+ event: "senses.bluebubbles_thread_lane_artifacts_detected",
64
+ message: "detected obsolete bluebubbles thread-lane sessions",
66
65
  meta: {
67
- trunkSessionPath: normalized,
68
- removedCount: removed.length,
66
+ sessionPath: normalized,
67
+ artifactCount: threadLaneFiles.length,
69
68
  },
70
69
  });
71
70
  }
72
- return removed;
71
+ return threadLaneFiles;
73
72
  }
@@ -313,14 +313,14 @@ async function handleBlueBubblesEvent(payload, deps = {}) {
313
313
  const friendId = context.friend.id;
314
314
  const sessPath = resolvedDeps.sessionPath(friendId, "bluebubbles", event.chat.sessionKey);
315
315
  try {
316
- (0, bluebubbles_session_cleanup_1.cleanupObsoleteBlueBubblesThreadSessions)(sessPath);
316
+ (0, bluebubbles_session_cleanup_1.findObsoleteBlueBubblesThreadSessions)(sessPath);
317
317
  }
318
318
  catch (error) {
319
319
  (0, runtime_1.emitNervesEvent)({
320
320
  level: "warn",
321
321
  component: "senses",
322
322
  event: "senses.bluebubbles_thread_lane_cleanup_error",
323
- message: "failed to clean up obsolete bluebubbles thread-lane sessions",
323
+ message: "failed to inspect obsolete bluebubbles thread-lane sessions",
324
324
  meta: {
325
325
  sessionPath: sessPath,
326
326
  reason: error instanceof Error ? error.message : String(error),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.30",
3
+ "version": "0.1.0-alpha.31",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",