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

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.227",
6
+ "changes": [
7
+ "fix: direct filesystem name resolution in sendProactiveBlueBubblesMessageToSession — bypass store.get()/listAll() with raw fs reads on friends directory when store lookup fails"
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.226",
12
+ "changes": [
13
+ "fix(daemon): set agent name before senseTurn so MCP messages resolve identity — setAgentName() is now called at the top of the senseTurn handler, before any downstream code that depends on agent identity (loadAgentConfig, getAgentSecretsPath, etc.)"
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.225",
6
18
  "changes": ["debug: emit event at top of FileFriendStore.get() to verify it's called"]
@@ -185,6 +185,8 @@ function parseIncomingCommand(raw) {
185
185
  */
186
186
  async function handleAgentSenseTurn(command) {
187
187
  try {
188
+ const { setAgentName } = await Promise.resolve().then(() => __importStar(require("../identity")));
189
+ setAgentName(command.agent);
188
190
  const { runSenseTurn } = await Promise.resolve().then(() => __importStar(require("../../senses/shared-turn")));
189
191
  const result = await runSenseTurn({
190
192
  agentName: command.agent,
@@ -1067,44 +1067,37 @@ 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) {
1070
+ // Direct filesystem fallback — store.get() with name resolution wasn't working in production
1071
+ // despite correct compiled code. Bypass the entire store abstraction.
1072
+ /* v8 ignore start -- direct filesystem name resolution @preserve */
1073
+ if (!friend) {
1073
1074
  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;
1075
+ const friendsDir = path.join((0, identity_1.getAgentRoot)(), "friends");
1076
+ const files = fs.readdirSync(friendsDir).filter((f) => f.endsWith(".json"));
1077
+ for (const file of files) {
1078
+ const raw = JSON.parse(fs.readFileSync(path.join(friendsDir, file), "utf-8"));
1079
+ if (raw.name?.toLowerCase() === params.friendId.toLowerCase()) {
1080
+ friend = raw;
1081
+ (0, runtime_1.emitNervesEvent)({
1082
+ component: "senses",
1083
+ event: "senses.bluebubbles_proactive_name_resolved",
1084
+ message: "resolved friend by name via direct filesystem scan",
1085
+ meta: { friendId: params.friendId, resolvedId: raw.id, name: raw.name },
1086
+ });
1087
+ break;
1088
+ }
1089
+ }
1087
1090
  }
1088
1091
  catch (err) {
1089
1092
  (0, runtime_1.emitNervesEvent)({
1090
1093
  level: "warn",
1091
1094
  component: "senses",
1092
1095
  event: "senses.bluebubbles_proactive_name_resolve_error",
1093
- message: "name resolution fallback failed",
1096
+ message: "direct filesystem name resolution failed",
1094
1097
  meta: { friendId: params.friendId, error: err instanceof Error ? err.message : String(err) },
1095
1098
  });
1096
- friend = null;
1097
1099
  }
1098
1100
  }
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
1101
  /* v8 ignore stop */
1109
1102
  if (!friend) {
1110
1103
  (0, runtime_1.emitNervesEvent)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.225",
3
+ "version": "0.1.0-alpha.227",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",