eve-hub 0.6.3 → 0.6.4

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
@@ -1,5 +1,11 @@
1
1
  # eve-hub
2
2
 
3
+ ## 0.6.4
4
+
5
+ ### Patch Changes
6
+
7
+ - A running tool's input in the live activity keeps every field when it's long: long string values are cut before the input is stringified, so the JSON still parses.
8
+
3
9
  ## 0.6.3
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve-hub",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Bot-side code shared by every hub agent: registry tools, the roster hook, the eve channel, the host sandbox and browser, and model helpers.",
6
6
  "type": "module",
package/world.mjs CHANGED
@@ -357,7 +357,11 @@ function summarize(input2) {
357
357
  if (input2 == null) return "";
358
358
  if (typeof input2 === "string") return input2.slice(0, 160);
359
359
  const value = input2.message ?? input2.command ?? input2.query ?? input2.path ?? input2.title ?? input2.url;
360
- return String(value ?? JSON.stringify(input2)).slice(0, 2e3);
360
+ if (value != null) return String(value).slice(0, 2e3);
361
+ for (let cap = 2e3; ; cap = Math.floor(cap / 2)) {
362
+ const json2 = JSON.stringify(input2, (_, v) => typeof v === "string" && v.length > cap ? v.slice(0, cap) + "\u2026" : v);
363
+ if (json2.length <= 2e3 || cap < 16) return json2;
364
+ }
361
365
  }
362
366
  function reduceChild(member, { type, data = {}, meta: meta4 }, at = Date.parse(meta4?.at ?? "") || Date.now(), onCutOff) {
363
367
  member.card ??= emptyCard();