@ouro.bot/cli 0.1.0-alpha.35 → 0.1.0-alpha.36
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 +6 -0
- package/dist/senses/bluebubbles.js +26 -16
- package/package.json +1 -1
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.36",
|
|
6
|
+
"changes": [
|
|
7
|
+
"BlueBubbles now marks a chat read at the same moment it starts typing for a turn, so read receipts and typing begin together instead of the read state lagging until after the reply finishes."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.35",
|
|
6
12
|
"changes": [
|
|
@@ -209,6 +209,18 @@ function createReplyTargetController(event) {
|
|
|
209
209
|
},
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
+
function emitBlueBubblesMarkReadWarning(chat, error) {
|
|
213
|
+
(0, runtime_1.emitNervesEvent)({
|
|
214
|
+
level: "warn",
|
|
215
|
+
component: "senses",
|
|
216
|
+
event: "senses.bluebubbles_mark_read_error",
|
|
217
|
+
message: "failed to mark bluebubbles chat as read",
|
|
218
|
+
meta: {
|
|
219
|
+
chatGuid: chat.chatGuid ?? null,
|
|
220
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
}
|
|
212
224
|
function createBlueBubblesCallbacks(client, chat, replyTarget) {
|
|
213
225
|
let textBuffer = "";
|
|
214
226
|
const phrases = (0, phrases_1.getPhrases)();
|
|
@@ -235,7 +247,20 @@ function createBlueBubblesCallbacks(client, chat, replyTarget) {
|
|
|
235
247
|
});
|
|
236
248
|
},
|
|
237
249
|
setTyping: async (active) => {
|
|
238
|
-
|
|
250
|
+
if (!active) {
|
|
251
|
+
await client.setTyping(chat, false);
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
const [markReadResult, typingResult] = await Promise.allSettled([
|
|
255
|
+
client.markChatRead(chat),
|
|
256
|
+
client.setTyping(chat, true),
|
|
257
|
+
]);
|
|
258
|
+
if (markReadResult.status === "rejected") {
|
|
259
|
+
emitBlueBubblesMarkReadWarning(chat, markReadResult.reason);
|
|
260
|
+
}
|
|
261
|
+
if (typingResult.status === "rejected") {
|
|
262
|
+
throw typingResult.reason;
|
|
263
|
+
}
|
|
239
264
|
},
|
|
240
265
|
},
|
|
241
266
|
onTransportError: (operation, error) => {
|
|
@@ -441,21 +466,6 @@ async function handleBlueBubblesEvent(payload, deps = {}) {
|
|
|
441
466
|
await callbacks.flush();
|
|
442
467
|
resolvedDeps.postTurn(messages, sessPath, result.usage);
|
|
443
468
|
await resolvedDeps.accumulateFriendTokens(store, friendId, result.usage);
|
|
444
|
-
try {
|
|
445
|
-
await client.markChatRead(event.chat);
|
|
446
|
-
}
|
|
447
|
-
catch (error) {
|
|
448
|
-
(0, runtime_1.emitNervesEvent)({
|
|
449
|
-
level: "warn",
|
|
450
|
-
component: "senses",
|
|
451
|
-
event: "senses.bluebubbles_mark_read_error",
|
|
452
|
-
message: "failed to mark bluebubbles chat as read",
|
|
453
|
-
meta: {
|
|
454
|
-
chatGuid: event.chat.chatGuid ?? null,
|
|
455
|
-
reason: error instanceof Error ? error.message : String(error),
|
|
456
|
-
},
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
469
|
(0, runtime_1.emitNervesEvent)({
|
|
460
470
|
component: "senses",
|
|
461
471
|
event: "senses.bluebubbles_turn_end",
|