@epoch-agent/cli 2.7.0 → 2.8.0

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.
Files changed (2) hide show
  1. package/dist/index.js +19 -16
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -959,7 +959,6 @@ import {
959
959
  addMarketplace,
960
960
  currentEpochVersion,
961
961
  installPlugin,
962
- inventoryTotal,
963
962
  isNonInteractive as isNonInteractive2,
964
963
  loadPlugins,
965
964
  packPlugin,
@@ -1071,10 +1070,9 @@ function printList2(verbose) {
1071
1070
  for (const plugin of artifacts.loaded) {
1072
1071
  log6(loadedLine(plugin));
1073
1072
  if (!verbose) continue;
1074
- for (const line of renderInventory(scanPluginDir(plugin.dir, plugin.name))) {
1075
- log6(` ${line}`);
1076
- }
1077
- log6("");
1073
+ const rows = renderInventory(scanPluginDir(plugin.dir, plugin.name));
1074
+ for (const line of rows) log6(` ${line}`);
1075
+ if (rows.length > 0) log6("");
1078
1076
  }
1079
1077
  for (const skipped of artifacts.skipped) log6(skippedLine(skipped));
1080
1078
  if (artifacts.skipped.length > 0) log6(`
@@ -1083,7 +1081,9 @@ ${markLegend()}`);
1083
1081
  \u26A0 ${detail}`);
1084
1082
  }
1085
1083
  function loadedLine(plugin) {
1086
- return ` \u2713 ${plugin.name}@${plugin.version} \u2190 ${plugin.source} ${countsLine(plugin.counts)}`;
1084
+ const head = ` \u2713 ${plugin.name}@${plugin.version} \u2190 ${plugin.source}`;
1085
+ const counts = countsLine(plugin.counts);
1086
+ return counts === "" ? head : `${head} ${counts}`;
1087
1087
  }
1088
1088
  function countsLine(counts) {
1089
1089
  const parts = [];
@@ -1096,7 +1096,7 @@ function countsLine(counts) {
1096
1096
  add(counts.hooks, "plugin.n_hooks");
1097
1097
  add(counts.denyRules, "plugin.n_deny");
1098
1098
  add(counts.mcpServers, "plugin.n_mcp");
1099
- return parts.length === 0 ? t8("plugin.brings_nothing") : parts.join(" \xB7 ");
1099
+ return parts.length === 0 ? "" : parts.join(" \xB7 ");
1100
1100
  }
1101
1101
  function markLegend() {
1102
1102
  return t8("plugin.mark_legend");
@@ -1172,9 +1172,12 @@ function renderPreview(preview2) {
1172
1172
  const { required, current } = preview2.versionUnmet;
1173
1173
  lines.push(` ${t8("plugin.preview_version_unmet", { required, current })}`);
1174
1174
  }
1175
- lines.push("");
1176
- lines.push(t8("plugin.brings_head_indented"));
1177
- for (const line of renderInventory(inventory)) lines.push(` ${line}`);
1175
+ const rows = renderInventory(inventory);
1176
+ if (rows.length > 0) {
1177
+ lines.push("");
1178
+ lines.push(t8("plugin.brings_head_indented"));
1179
+ for (const line of rows) lines.push(` ${line}`);
1180
+ }
1178
1181
  if (preview2.dependencies?.length) {
1179
1182
  lines.push("");
1180
1183
  lines.push(...renderDependencies(preview2.dependencies));
@@ -1218,9 +1221,6 @@ function depLabel(dep) {
1218
1221
  }
1219
1222
  function renderInventory(inv) {
1220
1223
  const lines = [];
1221
- if (inventoryTotal(inv) === 0) {
1222
- lines.push(t8("plugin.inventory_empty"));
1223
- }
1224
1224
  if (inv.commands.length > 0)
1225
1225
  lines.push(t8("plugin.inv_commands", { count: inv.commands.length, names: list(inv.commands) }));
1226
1226
  if (inv.roles.length > 0)
@@ -1327,10 +1327,13 @@ ${detail}`);
1327
1327
  log6(`\u2713 ${t8("plugin.validate_ok", { name: manifest.name, version: manifest.version })}`);
1328
1328
  if (manifest.epochVersion) log6(` epochVersion: ${manifest.epochVersion}`);
1329
1329
  for (const detail of issueDetails(read.issues)) log6(`\u26A0 ${detail}`);
1330
- log6(`
1331
- ${t8("plugin.brings_head")}`);
1332
1330
  const inventory = scanPluginDir(dir, manifest.name);
1333
- for (const line of renderInventory(inventory)) log6(` ${line}`);
1331
+ const rows = renderInventory(inventory);
1332
+ if (rows.length > 0) {
1333
+ log6(`
1334
+ ${t8("plugin.brings_head")}`);
1335
+ for (const line of rows) log6(` ${line}`);
1336
+ }
1334
1337
  if (inventory.issues.length > 0) {
1335
1338
  throw new CliError(t8("plugin.inv_issues", { count: inventory.issues.length }));
1336
1339
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epoch-agent/cli",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "private": false,
5
5
  "description": "epoch-agent CLI 入口",
6
6
  "repository": {
@@ -22,12 +22,12 @@
22
22
  "commander": "^15.0.0",
23
23
  "ink": "^7.1.1",
24
24
  "react": "^19.2.8",
25
- "@epoch-agent/core": "2.7.0",
26
- "@epoch-agent/infra": "2.7.0",
27
- "@epoch-agent/runtime": "2.7.0",
28
- "@epoch-agent/tui": "^2.7.0",
29
- "@epoch-agent/protocol": "2.7.0",
30
- "@epoch-agent/server": "2.7.0"
25
+ "@epoch-agent/core": "2.8.0",
26
+ "@epoch-agent/protocol": "2.8.0",
27
+ "@epoch-agent/runtime": "2.8.0",
28
+ "@epoch-agent/server": "2.8.0",
29
+ "@epoch-agent/infra": "2.8.0",
30
+ "@epoch-agent/tui": "^2.8.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^22.20.1",