@ouro.bot/cli 0.1.0-alpha.223 → 0.1.0-alpha.225

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,16 @@
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.225",
6
+ "changes": ["debug: emit event at top of FileFriendStore.get() to verify it's called"]
7
+ },
8
+ {
9
+ "version": "0.1.0-alpha.224",
10
+ "changes": [
11
+ "fix: FileFriendStore.get() now resolves friend names — when UUID lookup fails, scans the friends directory for a name match. This is the deepest possible layer for name resolution, ensuring it works regardless of which tool or code path calls store.get()."
12
+ ]
13
+ },
4
14
  {
5
15
  "version": "0.1.0-alpha.223",
6
16
  "changes": [
@@ -55,10 +55,32 @@ class FileFriendStore {
55
55
  });
56
56
  }
57
57
  async get(id) {
58
+ /* v8 ignore start -- temporary debug @preserve */
59
+ (0, runtime_1.emitNervesEvent)({ component: "friends", event: "friends.get_called", message: `store.get called`, meta: { id, friendsPath: this.friendsPath } });
60
+ /* v8 ignore stop */
61
+ // Direct UUID lookup
58
62
  const record = await this.readJson(path.join(this.friendsPath, `${id}.json`));
59
- if (!record)
60
- return null;
61
- return this.normalize(record);
63
+ if (record)
64
+ return this.normalize(record);
65
+ // Fallback: if id is a name (not UUID), scan for matching friend
66
+ /* v8 ignore start -- name fallback: exercised by live proactive sends @preserve */
67
+ try {
68
+ const entries = await fsPromises.readdir(this.friendsPath);
69
+ for (const entry of entries) {
70
+ if (!entry.endsWith(".json"))
71
+ continue;
72
+ const raw = await this.readJson(path.join(this.friendsPath, entry));
73
+ if (!raw)
74
+ continue;
75
+ const normalized = this.normalize(raw);
76
+ if (normalized.name?.toLowerCase() === id.toLowerCase()) {
77
+ return normalized;
78
+ }
79
+ }
80
+ }
81
+ catch { /* directory unreadable — return null */ }
82
+ /* v8 ignore stop */
83
+ return null;
62
84
  }
63
85
  async put(id, record) {
64
86
  await this.writeJson(path.join(this.friendsPath, `${id}.json`), this.normalize(record));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.223",
3
+ "version": "0.1.0-alpha.225",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",