@michael-joseph-miller/ant-bot 0.4.1 → 0.4.2

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.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to ant-bot are recorded here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow
5
5
  [semantic versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.4.2] — 2026-08-24
8
+
9
+ ### Changed
10
+
11
+ - **JSON stays out of the thread.** A tool that returns structured data — a mail search, a thread
12
+ fetch — now shows one line saying what came back (`Result — 50 threads · 82.1 KB`) with the JSON
13
+ behind it, instead of a page of it between you and the Bot's actual reply. Plain-text results
14
+ stay visible, because that is usually the thing you wanted to see.
15
+ - **Tool arguments read as words.** `gmail: search_threads query: is:unread, maxResults: 50`
16
+ rather than a JSON object, in the thread and on every approval card. Lists are counted and
17
+ nested objects collapse to `{…}`.
18
+
7
19
  ## [0.4.1] — 2026-08-24
8
20
 
9
21
  ### Fixed
package/README.md CHANGED
@@ -281,10 +281,10 @@ Current totals, as run against this checkout:
281
281
  | Package | Test files | Tests |
282
282
  |---|---|---|
283
283
  | `@antbot/contract` | 1 | 34 |
284
- | `@antbot/daemon` | 29 | 610 |
285
- | `@antbot/ui` | 10 | 99 |
284
+ | `@antbot/daemon` | 29 | 614 |
285
+ | `@antbot/ui` | 10 | 105 |
286
286
  | `@antbot/cli` | 8 | 142 |
287
- | **Total** | **48** | **885** |
287
+ | **Total** | **48** | **895** |
288
288
 
289
289
  ## Status / not built
290
290
 
package/dist/server.js CHANGED
@@ -2101,6 +2101,20 @@ function describeMcpStatus(status) {
2101
2101
  return status;
2102
2102
  }
2103
2103
  }
2104
+ function summarizeArgs(input) {
2105
+ if (input === null || typeof input !== "object" || Array.isArray(input)) return "";
2106
+ const parts = [];
2107
+ for (const [k, v] of Object.entries(input)) {
2108
+ if (v === void 0 || v === null || v === "") continue;
2109
+ let s;
2110
+ if (typeof v === "string") s = v;
2111
+ else if (typeof v === "number" || typeof v === "boolean") s = String(v);
2112
+ else if (Array.isArray(v)) s = `${v.length} item${v.length === 1 ? "" : "s"}`;
2113
+ else s = "{\u2026}";
2114
+ parts.push(`${k}: ${s.length > 60 ? `${s.slice(0, 60)}\u2026` : s}`);
2115
+ }
2116
+ return parts.join(", ");
2117
+ }
2104
2118
  function summarizeTool(name, input) {
2105
2119
  const o = input ?? {};
2106
2120
  const s = (k) => typeof o[k] === "string" ? o[k] : "";
@@ -2114,9 +2128,12 @@ function summarizeTool(name, input) {
2114
2128
  if (name.includes("remember")) return `memory: ${s("title")}`;
2115
2129
  if (name.startsWith("browser_") || name.includes("browser")) return [s("url"), s("selector"), s("text")].filter(Boolean).join(" ").slice(0, 160);
2116
2130
  const mcp = /^mcp__([^_]+(?:_[^_]+)*)__(.+)$/.exec(name);
2117
- if (mcp) return `${mcp[1]}: ${mcp[2]} ${JSON.stringify(input ?? {})}`.slice(0, 160);
2118
- const j = JSON.stringify(input ?? {});
2119
- return j.length > 160 ? `${j.slice(0, 160)}\u2026` : j;
2131
+ if (mcp) {
2132
+ const args2 = summarizeArgs(input);
2133
+ return `${mcp[1]}: ${mcp[2]}${args2 ? ` ${args2}` : ""}`.slice(0, 160);
2134
+ }
2135
+ const args = summarizeArgs(input);
2136
+ return args.length > 160 ? `${args.slice(0, 160)}\u2026` : args;
2120
2137
  }
2121
2138
 
2122
2139
  // daemon/src/bots/connectors.ts