The Open Framework for Building Agents
fix(eve): show tool count in info output (#837)
Colton Paddenfc53a9fdb1f7
diff --git a/.changeset/quiet-tools-count.md b/.changeset/quiet-tools-count.mdnew file mode 100644index 000000000..ec5f8f622--- /dev/null+++ b/.changeset/quiet-tools-count.md@@ -0,0 +1,5 @@+---+"eve": patch+---++Show the number of discovered authored tools in the human-readable `eve info` output.diff --git a/packages/eve/src/cli/commands/info.test.ts b/packages/eve/src/cli/commands/info.test.tsindex 3b3fc11fc..58e642271 100644--- a/packages/eve/src/cli/commands/info.test.ts+++ b/packages/eve/src/cli/commands/info.test.ts@@ -1,4 +1,4 @@-import { describe, expect, test } from "vitest";+import { describe, expect, test, vi } from "vitest";import { COMPILE_METADATA_KIND, COMPILE_METADATA_VERSION } from "#compiler/artifacts.js";import type { CompileAgentResult } from "#compiler/compile-agent.js";@@ -11,8 +11,11 @@ import {ROOT_COMPILED_AGENT_NODE_ID,} from "#compiler/manifest.js";import { getApplicationInfo } from "#internal/application/paths.js";+import { inspectApplication } from "#services/inspect-application.js";-import { buildApplicationInfoJson } from "./info.js";+import { buildApplicationInfoJson, printApplicationInfo } from "./info.js";++vi.mock("#services/inspect-application.js", () => ({ inspectApplication: vi.fn() }));const MESSAGING = {createSessionRoutePath: "/eve/v1/session",@@ -201,3 +204,19 @@ describe("buildApplicationInfoJson", () => {expect(json.messaging.stream).toBe("/eve/v1/session/:id/stream");});});++describe("printApplicationInfo", () => {+ test("includes the authored tool count in text output", async () => {+ vi.mocked(inspectApplication).mockResolvedValue({+ application: getApplicationInfo(APP_ROOT),+ compiledState: makeCompiledState(),+ messaging: MESSAGING,+ });+ const output: string[] = [];++ await printApplicationInfo({ log: (message) => output.push(message) }, APP_ROOT);++ expect(output).toHaveLength(1);+ expect(output[0]).toMatch(/Tools\s+1 tool/);+ });+});diff --git a/packages/eve/src/cli/commands/info.ts b/packages/eve/src/cli/commands/info.tsindex b8fe39a8c..f4241a9af 100644--- a/packages/eve/src/cli/commands/info.ts+++ b/packages/eve/src/cli/commands/info.ts@@ -177,6 +177,10 @@ export async function printApplicationInfo(label: "Skills",value: pluralize(compiledState.manifest.skills.length, "skill"),},+ {+ label: "Tools",+ value: pluralize(compiledState.manifest.tools.length, "tool"),+ },{label: "Subagents",value: pluralize(compiledState.manifest.subagents.length, "subagent"),