@vendian/cli 0.0.14 → 0.0.15

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/cli-wrapper.mjs +68 -4
  2. package/package.json +1 -1
package/cli-wrapper.mjs CHANGED
@@ -36779,7 +36779,7 @@ import fs12 from "node:fs";
36779
36779
  import readlinePromises from "node:readline/promises";
36780
36780
 
36781
36781
  // src/version.js
36782
- var CLI_VERSION = true ? "0.0.14" : process.env.npm_package_version || "0.0.0-dev";
36782
+ var CLI_VERSION = true ? "0.0.15" : process.env.npm_package_version || "0.0.0-dev";
36783
36783
 
36784
36784
  // src/npm-update.js
36785
36785
  var NPM_CHECK_INTERVAL_MS = 30 * 60 * 1e3;
@@ -38733,6 +38733,64 @@ function runtimeStatusIcon(status) {
38733
38733
  if (status === "error") return fig.cross;
38734
38734
  return fig.dotEmpty;
38735
38735
  }
38736
+ function agentStatusReason(agent) {
38737
+ const status = agent.status?.status;
38738
+ if (status === "error") {
38739
+ const msg = agent.status?.run?.errorMessage || agent.status?.run?.disabledReason || "";
38740
+ return msg || "Setup failed";
38741
+ }
38742
+ if (status === "disabled") {
38743
+ const msg = agent.status?.disabledReason || agent.status?.run?.disabledReason || "";
38744
+ return msg || "Deps not met locally";
38745
+ }
38746
+ return "";
38747
+ }
38748
+ function agentDetailStatusBlock(runtime, agent, agentRunState, relativePath) {
38749
+ const runState = (agentRunState || {})[relativePath];
38750
+ const lines = [];
38751
+ if (runtime.status === "error") {
38752
+ const errorMsg = runState?.errorMessage || agent?.errorMessage || "Unknown error during agent setup";
38753
+ lines.push(
38754
+ h(
38755
+ Text2,
38756
+ { key: "err-header", color: colors.error, bold: true },
38757
+ ` ${fig.cross} Error: Agent failed to prepare`
38758
+ )
38759
+ );
38760
+ lines.push(
38761
+ h(
38762
+ Text2,
38763
+ { key: "err-msg", color: colors.error },
38764
+ ` ${errorMsg}`
38765
+ )
38766
+ );
38767
+ lines.push(h(Text2, { key: "err-spacer" }, ""));
38768
+ } else if (runtime.status === "disabled") {
38769
+ const reason = runState?.disabledReason || runtime.disabledReason || agent?.disabledReason || "System dependency not met locally";
38770
+ const hints = runState?.resolutionHints || runtime.resolutionHints || agent?.resolutionHints || [];
38771
+ lines.push(
38772
+ h(
38773
+ Text2,
38774
+ { key: "dis-header", color: colors.warning, bold: true },
38775
+ ` ${fig.warning} Disabled: ${reason}`
38776
+ )
38777
+ );
38778
+ if (hints.length > 0) {
38779
+ for (let i = 0; i < Math.min(hints.length, 3); i++) {
38780
+ lines.push(
38781
+ h(
38782
+ Text2,
38783
+ { key: `dis-hint-${i}`, color: colors.muted },
38784
+ ` ${fig.arrowRight} ${hints[i]}`
38785
+ )
38786
+ );
38787
+ }
38788
+ }
38789
+ lines.push(h(Text2, { key: "dis-spacer" }, ""));
38790
+ }
38791
+ if (lines.length === 0) return null;
38792
+ return h(Box2, { flexDirection: "column" }, ...lines);
38793
+ }
38736
38794
  function FooterBar({ items }) {
38737
38795
  if (!items || !items.length) return null;
38738
38796
  return h(
@@ -38819,7 +38877,8 @@ function AgentLogPicker({ agents, agentLogs, agentRunState = {}, onSelectAgent,
38819
38877
  ...agentList.map((agent, i) => {
38820
38878
  const isActive = i === selectedIndex;
38821
38879
  const logCountColor = agent.hasErrors ? colors.error : agent.logCount > 0 ? colors.success : colors.muted;
38822
- const lastEvent = agent.lastLog ? formatAgentLogEntry(agent.lastLog) : "No logs";
38880
+ const lastEvent = agent.lastLog ? formatAgentLogEntry(agent.lastLog) : agentStatusReason(agent) || "No logs";
38881
+ const lastEventColor = agent.lastLog ? colors.muted : agent.status.status === "error" ? colors.error : agent.status.status === "disabled" ? colors.warning : colors.muted;
38823
38882
  return h(
38824
38883
  Text2,
38825
38884
  { key: agent.path },
@@ -38827,7 +38886,7 @@ function AgentLogPicker({ agents, agentLogs, agentRunState = {}, onSelectAgent,
38827
38886
  h(Text2, { bold: isActive }, clip(agent.name, nameW - 2).padEnd(nameW)),
38828
38887
  h(Text2, { color: runtimeStatusColor(agent.status.status) }, `${runtimeStatusIcon(agent.status.status)} ${agent.status.label}`.padEnd(statusW)),
38829
38888
  h(Text2, { color: logCountColor }, String(agent.logCount).padEnd(6)),
38830
- h(Text2, { color: colors.muted }, clip(lastEvent, 36))
38889
+ h(Text2, { color: lastEventColor }, clip(lastEvent, 36))
38831
38890
  );
38832
38891
  }),
38833
38892
  h(Text2, null, ""),
@@ -38873,7 +38932,12 @@ function AgentLogDetail({ relativePath, agentLogs, agentRunState = {}, agents, o
38873
38932
  h(Text2, { color: runtimeStatusColor(runtime.status) }, `${runtimeStatusIcon(runtime.status)} ${runtime.label}`)
38874
38933
  ),
38875
38934
  h(Text2, null, ""),
38876
- logs.length === 0 ? h(Text2, { color: colors.muted }, " No logs recorded yet for this agent. Logs appear during runs.") : h(
38935
+ logs.length === 0 ? h(
38936
+ Box2,
38937
+ { flexDirection: "column" },
38938
+ agentDetailStatusBlock(runtime, agent, agentRunState, relativePath),
38939
+ h(Text2, { color: colors.muted }, " No run logs recorded yet. Logs appear during runs.")
38940
+ ) : h(
38877
38941
  Box2,
38878
38942
  { flexDirection: "column" },
38879
38943
  ...visibleRows.map((row, i) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendian/cli",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "Public Vendian CLI bootstrapper and launcher",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,