@ouro.bot/cli 0.1.0-alpha.526 → 0.1.0-alpha.527

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,14 @@
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.527",
6
+ "changes": [
7
+ "Suppresses `onResult`/`onFailure` in the shared tool-activity callbacks factory for any tool that started hidden, so a hidden tool's END never re-emits its raw args into chat surfaces — fixing rejected `settle` calls leaking `answer=`/`intent=` into BlueBubbles and Teams threads.",
8
+ "Tracks hidden-at-start tools by per-name counter to stay sound across concurrent same-name hidden starts, with no behavior change for visible tools.",
9
+ "Adds heart-level regression tests for hidden-tool END suppression (success and failure paths, concurrent same-name) and senses-level regression tests against `createBlueBubblesCallbacks` and `createTeamsCallbacks` asserting that a rejected settle following a visible read_file produces no chat output containing the settle answer text or `intent=`/`answer=` substrings."
10
+ ]
11
+ },
4
12
  {
5
13
  "version": "0.1.0-alpha.526",
6
14
  "changes": [
@@ -12,24 +12,47 @@ function createToolActivityCallbacks(options) {
12
12
  });
13
13
  // Track the last description so we can reference it in END messages
14
14
  let lastDescription = null;
15
+ // Track in-flight hidden tools so onToolEnd can SYMMETRICALLY suppress
16
+ // emission for the same tools that onToolStart already suppresses.
17
+ // Without this, a rejected hidden tool (e.g. settle blocked by the
18
+ // mustResolveBeforeHandoff gate or the inner-dialog attention-queue gate)
19
+ // would emit "✗ <previous visible tool's description> — <hidden tool's args summary>"
20
+ // because lastDescription persists across calls and the hidden tool's summary
21
+ // (built via summarizeArgs) leaks args like settle's `answer`/`intent` into
22
+ // the visible chat. Counter map (not bool) so concurrent hidden starts don't
23
+ // underflow if ends arrive in any order.
24
+ const hiddenInFlight = new Map();
15
25
  return {
16
26
  onToolStart(name, args) {
17
27
  const description = (0, tool_description_1.humanReadableToolDescription)(name, args);
18
- if (description === null)
19
- return; // hidden tool (settle, rest, descend)
28
+ if (description === null) {
29
+ // hidden tool (settle, rest, descend, observe, speak) — track so the
30
+ // matching onToolEnd is also suppressed symmetrically.
31
+ hiddenInFlight.set(name, (hiddenInFlight.get(name) ?? 0) + 1);
32
+ return;
33
+ }
20
34
  lastDescription = description;
21
35
  options.onDescription(description);
22
36
  },
23
37
  onToolEnd(name, summary, success) {
38
+ const hiddenCount = hiddenInFlight.get(name) ?? 0;
39
+ if (hiddenCount > 0) {
40
+ // Hidden tool's start was suppressed; suppress its end too.
41
+ if (hiddenCount === 1)
42
+ hiddenInFlight.delete(name);
43
+ else
44
+ hiddenInFlight.set(name, hiddenCount - 1);
45
+ return;
46
+ }
24
47
  const desc = lastDescription ?? name;
25
48
  // Strip trailing "..." from description for the result line
26
49
  const cleanDesc = desc.endsWith("...") ? desc.slice(0, -3) : desc;
27
50
  if (!success) {
28
- options.onFailure(`\u2717 ${cleanDesc} — ${summary}`);
51
+ options.onFailure(`✗ ${cleanDesc} — ${summary}`);
29
52
  return;
30
53
  }
31
54
  if (options.isDebug()) {
32
- options.onResult(`\u2713 ${cleanDesc}`);
55
+ options.onResult(`✓ ${cleanDesc}`);
33
56
  }
34
57
  },
35
58
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.526",
3
+ "version": "0.1.0-alpha.527",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",