@kairyou/agent-tools 0.13.1 → 0.13.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/dist/log/hook.mjs CHANGED
@@ -1182,9 +1182,9 @@ function dailyItemText(turn) {
1182
1182
  const outcome = String(turn.result_summary || "");
1183
1183
  if (!hasSubstantiveTurn(request, outcome) || isTrivialTurn(request, outcome)) return "";
1184
1184
  const source = outcome || request;
1185
- const firstLine = source.split("\n").map((line) => line.replace(/^[#>*\-\s`]+/, "").trim()).find((line) => line.length > 0);
1186
- if (!firstLine) return "";
1187
- return firstLine.length > DAILY_ITEM_MAX_CHARS ? `${firstLine.slice(0, DAILY_ITEM_MAX_CHARS - 3)}...` : firstLine;
1185
+ const flattened = source.split("\n").map((line) => line.replace(/^[#>*\-\s`|]+/, "").trim()).filter(Boolean).join(" ");
1186
+ if (!flattened) return "";
1187
+ return flattened.length > DAILY_ITEM_MAX_CHARS ? `${flattened.slice(0, DAILY_ITEM_MAX_CHARS - 3)}...` : flattened;
1188
1188
  }
1189
1189
  async function updateDailyFile(outputFile, day, items) {
1190
1190
  if (items.length === 0) return;
@@ -427,14 +427,17 @@ function dailyItemText(turn) {
427
427
  const outcome = String(turn.result_summary || "");
428
428
  if (!hasSubstantiveTurn(request, outcome) || isTrivialTurn(request, outcome)) return "";
429
429
  const source = outcome || request;
430
- const firstLine = source
430
+ // Flattened rather than first-line: a structured summary often opens with a
431
+ // preamble line, and the substance sits in the lines after it.
432
+ const flattened = source
431
433
  .split("\n")
432
- .map((line) => line.replace(/^[#>*\-\s`]+/, "").trim())
433
- .find((line) => line.length > 0);
434
- if (!firstLine) return "";
435
- return firstLine.length > DAILY_ITEM_MAX_CHARS
436
- ? `${firstLine.slice(0, DAILY_ITEM_MAX_CHARS - 3)}...`
437
- : firstLine;
434
+ .map((line) => line.replace(/^[#>*\-\s`|]+/, "").trim())
435
+ .filter(Boolean)
436
+ .join(" ");
437
+ if (!flattened) return "";
438
+ return flattened.length > DAILY_ITEM_MAX_CHARS
439
+ ? `${flattened.slice(0, DAILY_ITEM_MAX_CHARS - 3)}...`
440
+ : flattened;
438
441
  }
439
442
 
440
443
  async function updateDailyFile(outputFile, day, items) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kairyou/agent-tools",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "Reusable Agent Skills, plus integrations (statusline, provider usage, vision) that install into Codex, Claude Code, and opencode.",
5
5
  "license": "MIT",
6
6
  "repository": {