@ouro.bot/cli 0.1.0-alpha.131 → 0.1.0-alpha.132
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 +31 -2
- 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.132",
|
|
6
|
+
"changes": [
|
|
7
|
+
"BlueBubbles no longer shows redundant \"shared work: errored\" alongside failover messages. Terminal errors are buffered and only displayed when failover doesn't handle them."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
4
10
|
{
|
|
5
11
|
"version": "0.1.0-alpha.131",
|
|
6
12
|
"changes": [
|
|
@@ -624,6 +624,22 @@ async function handleBlueBubblesNormalizedEvent(event, resolvedDeps, source) {
|
|
|
624
624
|
? false
|
|
625
625
|
: await checkHasExistingGroupWithFamily(store, context.friend);
|
|
626
626
|
// ── Call shared pipeline ──────────────────────────────────────────
|
|
627
|
+
// Buffer terminal errors so failover can suppress them.
|
|
628
|
+
// If failover produces a message, the buffered error is skipped.
|
|
629
|
+
// If failover doesn't fire, the buffered error is replayed.
|
|
630
|
+
let bufferedTerminalError = null;
|
|
631
|
+
/* v8 ignore start -- failover-aware error buffering @preserve */
|
|
632
|
+
const failoverAwareCallbacks = {
|
|
633
|
+
...callbacks,
|
|
634
|
+
onError(error, severity) {
|
|
635
|
+
if (severity === "terminal") {
|
|
636
|
+
bufferedTerminalError = error;
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
callbacks.onError(error, severity);
|
|
640
|
+
},
|
|
641
|
+
};
|
|
642
|
+
/* v8 ignore stop */
|
|
627
643
|
try {
|
|
628
644
|
const result = await (0, pipeline_1.handleInboundTurn)({
|
|
629
645
|
channel: "bluebubbles",
|
|
@@ -674,7 +690,7 @@ async function handleBlueBubblesNormalizedEvent(event, resolvedDeps, source) {
|
|
|
674
690
|
accumulateFriendTokens: resolvedDeps.accumulateFriendTokens,
|
|
675
691
|
signal: controller.signal,
|
|
676
692
|
runAgentOptions: { mcpManager },
|
|
677
|
-
callbacks,
|
|
693
|
+
callbacks: failoverAwareCallbacks,
|
|
678
694
|
failoverState: (() => {
|
|
679
695
|
if (!bbFailoverStates.has(event.chat.sessionKey)) {
|
|
680
696
|
bbFailoverStates.set(event.chat.sessionKey, { pending: null });
|
|
@@ -682,10 +698,15 @@ async function handleBlueBubblesNormalizedEvent(event, resolvedDeps, source) {
|
|
|
682
698
|
return bbFailoverStates.get(event.chat.sessionKey);
|
|
683
699
|
})(),
|
|
684
700
|
});
|
|
685
|
-
/* v8 ignore start -- failover display
|
|
701
|
+
/* v8 ignore start -- failover display + error replay @preserve */
|
|
686
702
|
if (result.failoverMessage) {
|
|
703
|
+
// Failover handled it — show the failover message, skip the buffered error
|
|
687
704
|
await client.sendText({ chat: event.chat, text: result.failoverMessage });
|
|
688
705
|
}
|
|
706
|
+
else if (bufferedTerminalError) {
|
|
707
|
+
// No failover — replay the buffered terminal error
|
|
708
|
+
callbacks.onError(bufferedTerminalError, "terminal");
|
|
709
|
+
}
|
|
689
710
|
/* v8 ignore stop */
|
|
690
711
|
// ── Handle gate result ────────────────────────────────────────
|
|
691
712
|
if (!result.gateResult.allowed) {
|
|
@@ -727,6 +748,14 @@ async function handleBlueBubblesNormalizedEvent(event, resolvedDeps, source) {
|
|
|
727
748
|
};
|
|
728
749
|
}
|
|
729
750
|
finally {
|
|
751
|
+
// If a terminal error was buffered and never replayed (e.g., handleInboundTurn threw),
|
|
752
|
+
// replay it now so the user still sees the error.
|
|
753
|
+
/* v8 ignore start -- error replay on throw: tested via BB error test @preserve */
|
|
754
|
+
if (bufferedTerminalError) {
|
|
755
|
+
callbacks.onError(bufferedTerminalError, "terminal");
|
|
756
|
+
bufferedTerminalError = null;
|
|
757
|
+
}
|
|
758
|
+
/* v8 ignore stop */
|
|
730
759
|
await callbacks.finish();
|
|
731
760
|
}
|
|
732
761
|
});
|