@ouro.bot/cli 0.1.0-alpha.217 → 0.1.0-alpha.218

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,12 @@
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.218",
6
+ "changes": [
7
+ "fix: surface tool now resolves friend names to UUIDs — agents pass friend names (e.g. 'arimendelow') but sessions are stored under UUID directories. Added name-to-UUID resolution by scanning the friends directory when the friendId doesn't match a session directory."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.217",
6
12
  "changes": [
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.surfaceToolDefinition = exports.surfaceToolDef = void 0;
37
+ const fs = __importStar(require("fs"));
37
38
  const identity_1 = require("../heart/identity");
38
39
  const surface_tool_1 = require("../senses/surface-tool");
39
40
  const obligations_1 = require("../arc/obligations");
@@ -83,6 +84,23 @@ exports.surfaceToolDefinition = {
83
84
  const agentRoot = (0, identity_1.getAgentRoot)();
84
85
  const sessionsDir = path.join(agentRoot, "state", "sessions");
85
86
  const friendsDir = path.join(agentRoot, "friends");
87
+ // Resolve friend name → UUID if needed (agents may pass name instead of UUID)
88
+ let resolvedFriendId = friendId;
89
+ if (!fs.existsSync(path.join(sessionsDir, friendId))) {
90
+ try {
91
+ const friendFiles = fs.readdirSync(friendsDir).filter((f) => f.endsWith(".json"));
92
+ for (const file of friendFiles) {
93
+ const raw = fs.readFileSync(path.join(friendsDir, file), "utf-8");
94
+ const record = JSON.parse(raw);
95
+ if (record.name?.toLowerCase() === friendId.toLowerCase() && record.id) {
96
+ resolvedFriendId = record.id;
97
+ break;
98
+ }
99
+ }
100
+ }
101
+ catch { /* friends dir unreadable — continue with original friendId */ }
102
+ }
103
+ friendId = resolvedFriendId;
86
104
  // Priority 1: Bridge-preferred session (if queue item has a bridgeId)
87
105
  if (queueItem?.bridgeId) {
88
106
  const { createBridgeManager } = await Promise.resolve().then(() => __importStar(require("../heart/bridges/manager")));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.217",
3
+ "version": "0.1.0-alpha.218",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",