@ouro.bot/cli 0.1.0-alpha.155 → 0.1.0-alpha.156
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,16 @@
|
|
|
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.156",
|
|
6
|
+
"changes": [
|
|
7
|
+
"polish: observe tool now hidden (like settle/rest/descend)",
|
|
8
|
+
"polish(bb): batch rapid tool status messages within 500ms debounce window",
|
|
9
|
+
"polish(tools): word-boundary truncation instead of mid-word cut",
|
|
10
|
+
"polish(commands): /commands output uses em dash separators",
|
|
11
|
+
"polish(bb): re-enable typing indicator after each status message"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
4
14
|
{
|
|
5
15
|
"version": "0.1.0-alpha.155",
|
|
6
16
|
"changes": [
|
|
@@ -9,7 +9,13 @@ function basename(filePath) {
|
|
|
9
9
|
function truncate(text, max) {
|
|
10
10
|
if (text.length <= max)
|
|
11
11
|
return text;
|
|
12
|
-
|
|
12
|
+
// Cut at last space before maxLen to avoid mid-word truncation
|
|
13
|
+
const slice = text.slice(0, max - 1);
|
|
14
|
+
const lastSpace = slice.lastIndexOf(" ");
|
|
15
|
+
if (lastSpace > 0)
|
|
16
|
+
return text.slice(0, lastSpace) + "\u2026";
|
|
17
|
+
// No space found (single long word) — hard truncate
|
|
18
|
+
return slice + "\u2026";
|
|
13
19
|
}
|
|
14
20
|
const TOOL_DESCRIPTIONS = {
|
|
15
21
|
// File operations
|
|
@@ -98,7 +104,7 @@ const TOOL_DESCRIPTIONS = {
|
|
|
98
104
|
const thought = args.thought;
|
|
99
105
|
return thought ? `thinking about ${truncate(thought, 40)}...` : "thinking deeper...";
|
|
100
106
|
},
|
|
101
|
-
observe: () =>
|
|
107
|
+
observe: () => null,
|
|
102
108
|
claude: () => "reasoning...",
|
|
103
109
|
set_reasoning_effort: (args) => {
|
|
104
110
|
const level = args.level;
|
|
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.enrichReactionText = enrichReactionText;
|
|
37
|
+
exports.createStatusBatcher = createStatusBatcher;
|
|
37
38
|
exports.handleBlueBubblesEvent = handleBlueBubblesEvent;
|
|
38
39
|
exports.recoverMissedBlueBubblesMessages = recoverMissedBlueBubblesMessages;
|
|
39
40
|
exports.createBlueBubblesWebhookHandler = createBlueBubblesWebhookHandler;
|
|
@@ -81,6 +82,44 @@ function enrichReactionText(baseText, originalText, maxLen) {
|
|
|
81
82
|
: originalText;
|
|
82
83
|
return `${baseText} to: "${truncated}"`;
|
|
83
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Accumulates status descriptions and debounces them.
|
|
87
|
+
* If multiple descriptions arrive within `delayMs`, they are joined with ` · `
|
|
88
|
+
* and sent as a single message. Flush sends immediately and clears the timer.
|
|
89
|
+
*/
|
|
90
|
+
function createStatusBatcher(send, delayMs) {
|
|
91
|
+
(0, runtime_1.emitNervesEvent)({
|
|
92
|
+
component: "senses",
|
|
93
|
+
event: "senses.bluebubbles_status_batcher_created",
|
|
94
|
+
message: "status batcher initialized",
|
|
95
|
+
meta: { delayMs },
|
|
96
|
+
});
|
|
97
|
+
let pending = [];
|
|
98
|
+
let timer = null;
|
|
99
|
+
function fire() {
|
|
100
|
+
if (pending.length === 0)
|
|
101
|
+
return;
|
|
102
|
+
const combined = pending.join(" \u00b7 ");
|
|
103
|
+
pending = [];
|
|
104
|
+
timer = null;
|
|
105
|
+
send(combined);
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
add(text) {
|
|
109
|
+
pending.push(text);
|
|
110
|
+
if (timer !== null)
|
|
111
|
+
clearTimeout(timer);
|
|
112
|
+
timer = setTimeout(fire, delayMs);
|
|
113
|
+
},
|
|
114
|
+
flush() {
|
|
115
|
+
if (timer !== null) {
|
|
116
|
+
clearTimeout(timer);
|
|
117
|
+
timer = null;
|
|
118
|
+
}
|
|
119
|
+
fire();
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
}
|
|
84
123
|
const defaultDeps = {
|
|
85
124
|
getAgentName: identity_1.getAgentName,
|
|
86
125
|
buildSystem: prompt_1.buildSystem,
|
|
@@ -401,14 +440,17 @@ function createBlueBubblesCallbacks(client, chat, replyTarget, isGroupChat) {
|
|
|
401
440
|
text,
|
|
402
441
|
replyToMessageGuid: replyTarget.getReplyToMessageGuid(),
|
|
403
442
|
});
|
|
443
|
+
// Re-enable typing indicator — sending a message clears the typing bubble
|
|
444
|
+
await client.setTyping(chat, true);
|
|
404
445
|
});
|
|
405
446
|
}
|
|
447
|
+
const statusBatcher = createStatusBatcher((text) => sendStatus(text), 500);
|
|
406
448
|
const toolCallbacks = (0, tool_activity_callbacks_1.createToolActivityCallbacks)({
|
|
407
|
-
onDescription: (text) =>
|
|
449
|
+
onDescription: (text) => statusBatcher.add(text),
|
|
408
450
|
/* v8 ignore next -- onResult only called in debug mode; tested via tool-activity-callbacks.test.ts @preserve */
|
|
409
|
-
onResult: (text) => sendStatus(text),
|
|
451
|
+
onResult: (text) => { statusBatcher.flush(); sendStatus(text); },
|
|
410
452
|
/* v8 ignore next -- onFailure only called on tool failure; tested via tool-activity-callbacks.test.ts @preserve */
|
|
411
|
-
onFailure: (text) => sendStatus(text),
|
|
453
|
+
onFailure: (text) => { statusBatcher.flush(); sendStatus(text); },
|
|
412
454
|
isDebug: commands_1.getDebugMode,
|
|
413
455
|
});
|
|
414
456
|
return {
|
|
@@ -471,6 +513,7 @@ function createBlueBubblesCallbacks(client, chat, replyTarget, isGroupChat) {
|
|
|
471
513
|
textBuffer = "";
|
|
472
514
|
},
|
|
473
515
|
async flush() {
|
|
516
|
+
statusBatcher.flush();
|
|
474
517
|
await queue;
|
|
475
518
|
const trimmed = textBuffer.trim();
|
|
476
519
|
if (!trimmed) {
|
|
@@ -495,6 +538,7 @@ function createBlueBubblesCallbacks(client, chat, replyTarget, isGroupChat) {
|
|
|
495
538
|
});
|
|
496
539
|
},
|
|
497
540
|
async finish() {
|
|
541
|
+
statusBatcher.flush();
|
|
498
542
|
if (!typingActive) {
|
|
499
543
|
await queue;
|
|
500
544
|
return;
|
package/dist/senses/commands.js
CHANGED
|
@@ -72,7 +72,7 @@ function registerDefaultCommands(registry) {
|
|
|
72
72
|
channels: ["cli", "teams"],
|
|
73
73
|
handler: (ctx) => {
|
|
74
74
|
const cmds = registry.list(ctx.channel);
|
|
75
|
-
const lines = cmds.map((c) => `/${c.name}
|
|
75
|
+
const lines = cmds.map((c) => `/${c.name} \u2014 ${c.description}`);
|
|
76
76
|
return { action: "response", message: lines.join("\n") };
|
|
77
77
|
},
|
|
78
78
|
});
|