@ouro.bot/cli 0.1.0-alpha.214 → 0.1.0-alpha.216

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.216",
6
+ "changes": [
7
+ "fix: surface tool proactive BB delivery masked by newer MCP/CLI sessions — findFreshestFriendSession picked the single freshest session regardless of channel, so an MCP or CLI session being newer than the BB session caused the BB proactive path to be skipped entirely. Now scans all friend sessions, attempts BB delivery first on any BB session, then falls back to queuing on the freshest non-inner session."
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.215",
12
+ "changes": [
13
+ "fix: surface tool proactive delivery no longer gated by 24-hour session threshold — findFreshestFriendSession was called with activeOnly:true, filtering out sessions older than 24h even when the agent explicitly wants to send a proactive message. Both the bridge path and direct path now find any session regardless of age. Proactive BB delivery and trust checks still apply."
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.214",
6
18
  "changes": [
@@ -88,7 +88,7 @@ exports.surfaceToolDefinition = {
88
88
  const { createBridgeManager } = await Promise.resolve().then(() => __importStar(require("../heart/bridges/manager")));
89
89
  const bridge = createBridgeManager().getBridge(queueItem.bridgeId);
90
90
  if (bridge && bridge.lifecycle !== "completed" && bridge.lifecycle !== "cancelled") {
91
- const allSessions = (0, session_activity_1.listSessionActivity)({ sessionsDir, friendsDir, agentName });
91
+ const allSessions = (0, session_activity_1.listSessionActivity)({ sessionsDir, friendsDir, agentName, activeThresholdMs: Number.MAX_SAFE_INTEGER });
92
92
  const bridgeTarget = allSessions.find((activity) => activity.friendId === friendId
93
93
  && activity.channel !== "inner"
94
94
  && bridge.attachedSessions.some((s) => s.friendId === activity.friendId && s.channel === activity.channel && s.key === activity.key));
@@ -124,32 +124,28 @@ exports.surfaceToolDefinition = {
124
124
  }
125
125
  }
126
126
  }
127
- // Priority 2: Freshest active friend session
128
- const freshest = (0, session_activity_1.findFreshestFriendSession)({
129
- sessionsDir,
130
- friendsDir,
131
- agentName,
132
- friendId,
133
- activeOnly: true,
134
- });
135
- if (freshest && freshest.channel !== "inner") {
136
- // Attempt proactive BB delivery
137
- if (freshest.channel === "bluebubbles") {
138
- const { sendProactiveBlueBubblesMessageToSession } = await Promise.resolve().then(() => __importStar(require("../senses/bluebubbles")));
139
- const proactiveResult = await sendProactiveBlueBubblesMessageToSession({
140
- friendId: freshest.friendId,
141
- sessionKey: freshest.key,
142
- text: content,
143
- });
144
- if (proactiveResult.delivered) {
145
- // Inject surfaced content into the target session so it knows what was delivered
146
- const { appendSyntheticAssistantMessage } = await Promise.resolve().then(() => __importStar(require("../mind/context")));
147
- const sessionFilePath = path.join(sessionsDir, freshest.friendId, freshest.channel, `${freshest.key}.json`);
148
- appendSyntheticAssistantMessage(sessionFilePath, `[surfaced from inner dialog] ${content}`);
149
- return { status: "delivered", detail: "via iMessage" };
150
- }
127
+ // Priority 2: Try proactive delivery first, then queue to freshest session
128
+ const allFriendSessions = (0, session_activity_1.listSessionActivity)({ sessionsDir, friendsDir, agentName, activeThresholdMs: Number.MAX_SAFE_INTEGER })
129
+ .filter((s) => s.friendId === friendId && s.channel !== "inner");
130
+ // 2a: Attempt proactive BB delivery on any BB session (prefer freshest)
131
+ const bbSession = allFriendSessions.find((s) => s.channel === "bluebubbles");
132
+ if (bbSession) {
133
+ const { sendProactiveBlueBubblesMessageToSession } = await Promise.resolve().then(() => __importStar(require("../senses/bluebubbles")));
134
+ const proactiveResult = await sendProactiveBlueBubblesMessageToSession({
135
+ friendId: bbSession.friendId,
136
+ sessionKey: bbSession.key,
137
+ text: content,
138
+ });
139
+ if (proactiveResult.delivered) {
140
+ const { appendSyntheticAssistantMessage } = await Promise.resolve().then(() => __importStar(require("../mind/context")));
141
+ const sessionFilePath = path.join(sessionsDir, bbSession.friendId, bbSession.channel, `${bbSession.key}.json`);
142
+ appendSyntheticAssistantMessage(sessionFilePath, `[surfaced from inner dialog] ${content}`);
143
+ return { status: "delivered", detail: "via iMessage" };
151
144
  }
152
- // Queue as pending for next interaction
145
+ }
146
+ // 2b: No proactive delivery — queue to freshest non-inner session
147
+ const freshest = allFriendSessions[0];
148
+ if (freshest) {
153
149
  const { queuePendingMessage, getPendingDir } = await Promise.resolve().then(() => __importStar(require("../mind/pending")));
154
150
  const pendingDir = getPendingDir(agentName, freshest.friendId, freshest.channel, freshest.key);
155
151
  queuePendingMessage(pendingDir, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.214",
3
+ "version": "0.1.0-alpha.216",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",