@ouro.bot/cli 0.1.0-alpha.215 → 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,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.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
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.215",
6
12
  "changes": [
@@ -124,31 +124,28 @@ exports.surfaceToolDefinition = {
124
124
  }
125
125
  }
126
126
  }
127
- // Priority 2: Freshest friend session (no active threshold — proactive outreach shouldn't be gated by session age)
128
- const freshest = (0, session_activity_1.findFreshestFriendSession)({
129
- sessionsDir,
130
- friendsDir,
131
- agentName,
132
- friendId,
133
- });
134
- if (freshest && freshest.channel !== "inner") {
135
- // Attempt proactive BB delivery
136
- if (freshest.channel === "bluebubbles") {
137
- const { sendProactiveBlueBubblesMessageToSession } = await Promise.resolve().then(() => __importStar(require("../senses/bluebubbles")));
138
- const proactiveResult = await sendProactiveBlueBubblesMessageToSession({
139
- friendId: freshest.friendId,
140
- sessionKey: freshest.key,
141
- text: content,
142
- });
143
- if (proactiveResult.delivered) {
144
- // Inject surfaced content into the target session so it knows what was delivered
145
- const { appendSyntheticAssistantMessage } = await Promise.resolve().then(() => __importStar(require("../mind/context")));
146
- const sessionFilePath = path.join(sessionsDir, freshest.friendId, freshest.channel, `${freshest.key}.json`);
147
- appendSyntheticAssistantMessage(sessionFilePath, `[surfaced from inner dialog] ${content}`);
148
- return { status: "delivered", detail: "via iMessage" };
149
- }
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" };
150
144
  }
151
- // 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) {
152
149
  const { queuePendingMessage, getPendingDir } = await Promise.resolve().then(() => __importStar(require("../mind/pending")));
153
150
  const pendingDir = getPendingDir(agentName, freshest.friendId, freshest.channel, freshest.key);
154
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.215",
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",