agentflow-core 0.3.2 → 0.3.3

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.
@@ -1136,6 +1136,8 @@ function render(config) {
1136
1136
  function truncate(s, max) {
1137
1137
  return s.length > max ? s.slice(0, max - 1) + "\u2026" : s;
1138
1138
  }
1139
+ const termWidth = process.stdout.columns || 120;
1140
+ const detailWidth = Math.max(20, termWidth - 60);
1139
1141
  if (firstRender) {
1140
1142
  process.stdout.write("\x1B[2J");
1141
1143
  firstRender = false;
@@ -1163,7 +1165,7 @@ function render(config) {
1163
1165
  if (g.children.length === 0) {
1164
1166
  const name = truncate(g.name, 26).padEnd(26);
1165
1167
  const st = statusText(g);
1166
- const det = truncate(g.detail, 30);
1168
+ const det = truncate(g.detail, detailWidth);
1167
1169
  writeLine(L, ` ${icon} ${name} ${st.padEnd(20)} ${active.padEnd(20)} ${C.dim}${det}${C.reset}`);
1168
1170
  lineCount++;
1169
1171
  } else {
@@ -1181,7 +1183,7 @@ function render(config) {
1181
1183
  const cIcon = statusIcon(child.status, Date.now() - child.lastActive < 3e5);
1182
1184
  const cName = truncate(child.id, 22).padEnd(22);
1183
1185
  const cActive = `${C.dim}${timeStr(child.lastActive)}${C.reset}`;
1184
- const cDet = truncate(child.detail, 25);
1186
+ const cDet = truncate(child.detail, detailWidth - 5);
1185
1187
  writeLine(L, ` ${C.dim}${connector}${C.reset} ${cIcon} ${cName} ${cActive.padEnd(20)} ${C.dim}${cDet}${C.reset}`);
1186
1188
  lineCount++;
1187
1189
  }
@@ -1223,7 +1225,7 @@ function render(config) {
1223
1225
  const agent = truncate(r.id, 26).padEnd(26);
1224
1226
  const age = Math.floor((Date.now() - r.lastActive) / 1e3);
1225
1227
  const ageStr = age < 60 ? age + "s ago" : age < 3600 ? Math.floor(age / 60) + "m ago" : Math.floor(age / 3600) + "h ago";
1226
- const det = truncate(r.detail, 25);
1228
+ const det = truncate(r.detail, detailWidth);
1227
1229
  writeLine(L, ` ${icon} ${agent} ${C.dim}${t} ${ageStr.padStart(8)}${C.reset} ${C.dim}${det}${C.reset}`);
1228
1230
  }
1229
1231
  }
package/dist/cli.cjs CHANGED
@@ -1076,6 +1076,8 @@ function render(config) {
1076
1076
  function truncate(s, max) {
1077
1077
  return s.length > max ? s.slice(0, max - 1) + "\u2026" : s;
1078
1078
  }
1079
+ const termWidth = process.stdout.columns || 120;
1080
+ const detailWidth = Math.max(20, termWidth - 60);
1079
1081
  if (firstRender) {
1080
1082
  process.stdout.write("\x1B[2J");
1081
1083
  firstRender = false;
@@ -1103,7 +1105,7 @@ function render(config) {
1103
1105
  if (g.children.length === 0) {
1104
1106
  const name = truncate(g.name, 26).padEnd(26);
1105
1107
  const st = statusText(g);
1106
- const det = truncate(g.detail, 30);
1108
+ const det = truncate(g.detail, detailWidth);
1107
1109
  writeLine(L, ` ${icon} ${name} ${st.padEnd(20)} ${active.padEnd(20)} ${C.dim}${det}${C.reset}`);
1108
1110
  lineCount++;
1109
1111
  } else {
@@ -1121,7 +1123,7 @@ function render(config) {
1121
1123
  const cIcon = statusIcon(child.status, Date.now() - child.lastActive < 3e5);
1122
1124
  const cName = truncate(child.id, 22).padEnd(22);
1123
1125
  const cActive = `${C.dim}${timeStr(child.lastActive)}${C.reset}`;
1124
- const cDet = truncate(child.detail, 25);
1126
+ const cDet = truncate(child.detail, detailWidth - 5);
1125
1127
  writeLine(L, ` ${C.dim}${connector}${C.reset} ${cIcon} ${cName} ${cActive.padEnd(20)} ${C.dim}${cDet}${C.reset}`);
1126
1128
  lineCount++;
1127
1129
  }
@@ -1163,7 +1165,7 @@ function render(config) {
1163
1165
  const agent = truncate(r.id, 26).padEnd(26);
1164
1166
  const age = Math.floor((Date.now() - r.lastActive) / 1e3);
1165
1167
  const ageStr = age < 60 ? age + "s ago" : age < 3600 ? Math.floor(age / 60) + "m ago" : Math.floor(age / 3600) + "h ago";
1166
- const det = truncate(r.detail, 25);
1168
+ const det = truncate(r.detail, detailWidth);
1167
1169
  writeLine(L, ` ${icon} ${agent} ${C.dim}${t} ${ageStr.padStart(8)}${C.reset} ${C.dim}${det}${C.reset}`);
1168
1170
  }
1169
1171
  }
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  runTraced,
4
4
  startLive,
5
5
  startWatch
6
- } from "./chunk-VVWZJ63D.js";
6
+ } from "./chunk-M5CGDXAO.js";
7
7
 
8
8
  // src/cli.ts
9
9
  import { basename } from "path";
package/dist/index.cjs CHANGED
@@ -1183,6 +1183,8 @@ function render(config) {
1183
1183
  function truncate(s, max) {
1184
1184
  return s.length > max ? s.slice(0, max - 1) + "\u2026" : s;
1185
1185
  }
1186
+ const termWidth = process.stdout.columns || 120;
1187
+ const detailWidth = Math.max(20, termWidth - 60);
1186
1188
  if (firstRender) {
1187
1189
  process.stdout.write("\x1B[2J");
1188
1190
  firstRender = false;
@@ -1210,7 +1212,7 @@ function render(config) {
1210
1212
  if (g.children.length === 0) {
1211
1213
  const name = truncate(g.name, 26).padEnd(26);
1212
1214
  const st = statusText(g);
1213
- const det = truncate(g.detail, 30);
1215
+ const det = truncate(g.detail, detailWidth);
1214
1216
  writeLine(L, ` ${icon} ${name} ${st.padEnd(20)} ${active.padEnd(20)} ${C.dim}${det}${C.reset}`);
1215
1217
  lineCount++;
1216
1218
  } else {
@@ -1228,7 +1230,7 @@ function render(config) {
1228
1230
  const cIcon = statusIcon(child.status, Date.now() - child.lastActive < 3e5);
1229
1231
  const cName = truncate(child.id, 22).padEnd(22);
1230
1232
  const cActive = `${C.dim}${timeStr(child.lastActive)}${C.reset}`;
1231
- const cDet = truncate(child.detail, 25);
1233
+ const cDet = truncate(child.detail, detailWidth - 5);
1232
1234
  writeLine(L, ` ${C.dim}${connector}${C.reset} ${cIcon} ${cName} ${cActive.padEnd(20)} ${C.dim}${cDet}${C.reset}`);
1233
1235
  lineCount++;
1234
1236
  }
@@ -1270,7 +1272,7 @@ function render(config) {
1270
1272
  const agent = truncate(r.id, 26).padEnd(26);
1271
1273
  const age = Math.floor((Date.now() - r.lastActive) / 1e3);
1272
1274
  const ageStr = age < 60 ? age + "s ago" : age < 3600 ? Math.floor(age / 60) + "m ago" : Math.floor(age / 3600) + "h ago";
1273
- const det = truncate(r.detail, 25);
1275
+ const det = truncate(r.detail, detailWidth);
1274
1276
  writeLine(L, ` ${icon} ${agent} ${C.dim}${t} ${ageStr.padStart(8)}${C.reset} ${C.dim}${det}${C.reset}`);
1275
1277
  }
1276
1278
  }
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  startLive,
20
20
  startWatch,
21
21
  stitchTrace
22
- } from "./chunk-VVWZJ63D.js";
22
+ } from "./chunk-M5CGDXAO.js";
23
23
  export {
24
24
  createGraphBuilder,
25
25
  findWaitingOn,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentflow-core",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Monitor any AI agent system. Auto-detects failures, sends alerts. Zero config, zero dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",