@ouro.bot/cli 0.1.0-alpha.220 → 0.1.0-alpha.222
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,18 @@
|
|
|
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.222",
|
|
6
|
+
"changes": [
|
|
7
|
+
"debug: add diagnostic nerves events to proactive BB delivery — name resolution in both tools-session.ts and sendProactiveBlueBubblesMessageToSession now emit events showing friend count, names, resolution success/failure, and errors. Temporary diagnostics to identify why name→UUID resolution isn't working in production."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.221",
|
|
12
|
+
"changes": [
|
|
13
|
+
"fix: BB proactive send resolves friend by name when UUID lookup fails — sendProactiveBlueBubblesMessageToSession now falls back to store.listAll() name matching when store.get() returns null. This handles agents passing friend names instead of UUIDs, bypassing the upstream resolution that wasn't working in all contexts."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.220",
|
|
6
18
|
"changes": [
|
|
@@ -444,11 +444,13 @@ exports.sessionToolDefinitions = [
|
|
|
444
444
|
// Resolve friend name → UUID if needed
|
|
445
445
|
/* v8 ignore start -- name resolution: reads real filesystem, tested via live integration @preserve */
|
|
446
446
|
if (friendId !== "self") {
|
|
447
|
+
const originalFriendId = friendId;
|
|
447
448
|
try {
|
|
448
449
|
const agentRoot = (0, identity_1.getAgentRoot)();
|
|
449
450
|
const sessionsDir = path.join(agentRoot, "state", "sessions");
|
|
450
451
|
const friendsDir = path.join(agentRoot, "friends");
|
|
451
|
-
|
|
452
|
+
const sessionDirExists = fs.existsSync(path.join(sessionsDir, friendId));
|
|
453
|
+
if (!sessionDirExists) {
|
|
452
454
|
const friendFiles = fs.readdirSync(friendsDir).filter((f) => f.endsWith(".json"));
|
|
453
455
|
for (const file of friendFiles) {
|
|
454
456
|
const raw = fs.readFileSync(path.join(friendsDir, file), "utf-8");
|
|
@@ -458,9 +460,23 @@ exports.sessionToolDefinitions = [
|
|
|
458
460
|
break;
|
|
459
461
|
}
|
|
460
462
|
}
|
|
463
|
+
(0, runtime_1.emitNervesEvent)({
|
|
464
|
+
component: "repertoire",
|
|
465
|
+
event: "repertoire.send_message_name_resolve",
|
|
466
|
+
message: friendId !== originalFriendId ? "resolved friend name to UUID" : "friend name resolution failed",
|
|
467
|
+
meta: { original: originalFriendId, resolved: friendId, friendsDir, fileCount: friendFiles.length },
|
|
468
|
+
});
|
|
461
469
|
}
|
|
462
470
|
}
|
|
463
|
-
catch {
|
|
471
|
+
catch (err) {
|
|
472
|
+
(0, runtime_1.emitNervesEvent)({
|
|
473
|
+
level: "warn",
|
|
474
|
+
component: "repertoire",
|
|
475
|
+
event: "repertoire.send_message_name_resolve_error",
|
|
476
|
+
message: "friend name resolution threw",
|
|
477
|
+
meta: { friendId: originalFriendId, error: err instanceof Error ? err.message : String(err) },
|
|
478
|
+
});
|
|
479
|
+
}
|
|
464
480
|
}
|
|
465
481
|
/* v8 ignore stop */
|
|
466
482
|
// Self-routing: messages to "self" always go to inner dialog pending dir,
|
|
@@ -1067,6 +1067,45 @@ async function sendProactiveBlueBubblesMessageToSession(params, deps = {}) {
|
|
|
1067
1067
|
catch {
|
|
1068
1068
|
friend = null;
|
|
1069
1069
|
}
|
|
1070
|
+
// Fallback: if friendId is a name (not UUID), resolve via listAll
|
|
1071
|
+
/* v8 ignore start -- name resolution fallback + diagnostics @preserve */
|
|
1072
|
+
if (!friend && store.listAll) {
|
|
1073
|
+
try {
|
|
1074
|
+
const all = await store.listAll();
|
|
1075
|
+
(0, runtime_1.emitNervesEvent)({
|
|
1076
|
+
component: "senses",
|
|
1077
|
+
event: "senses.bluebubbles_proactive_name_resolve",
|
|
1078
|
+
message: "attempting name-based friend resolution",
|
|
1079
|
+
meta: {
|
|
1080
|
+
friendId: params.friendId,
|
|
1081
|
+
storeHasListAll: true,
|
|
1082
|
+
friendCount: all.length,
|
|
1083
|
+
friendNames: all.map((f) => f.name ?? "<no name>"),
|
|
1084
|
+
},
|
|
1085
|
+
});
|
|
1086
|
+
friend = all.find((f) => f.name?.toLowerCase() === params.friendId.toLowerCase()) ?? null;
|
|
1087
|
+
}
|
|
1088
|
+
catch (err) {
|
|
1089
|
+
(0, runtime_1.emitNervesEvent)({
|
|
1090
|
+
level: "warn",
|
|
1091
|
+
component: "senses",
|
|
1092
|
+
event: "senses.bluebubbles_proactive_name_resolve_error",
|
|
1093
|
+
message: "name resolution fallback failed",
|
|
1094
|
+
meta: { friendId: params.friendId, error: err instanceof Error ? err.message : String(err) },
|
|
1095
|
+
});
|
|
1096
|
+
friend = null;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
else if (!friend) {
|
|
1100
|
+
(0, runtime_1.emitNervesEvent)({
|
|
1101
|
+
level: "warn",
|
|
1102
|
+
component: "senses",
|
|
1103
|
+
event: "senses.bluebubbles_proactive_name_resolve_skip",
|
|
1104
|
+
message: "name resolution skipped: store.listAll not available",
|
|
1105
|
+
meta: { friendId: params.friendId, hasListAll: typeof store.listAll },
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
/* v8 ignore stop */
|
|
1070
1109
|
if (!friend) {
|
|
1071
1110
|
(0, runtime_1.emitNervesEvent)({
|
|
1072
1111
|
level: "warn",
|