Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

fix(eve): include subagents and schedules in eve info (#1013)

Railly Hugodad9472c6969
diff --git a/.changeset/info-subagents-schedules.md b/.changeset/info-subagents-schedules.md
new file mode 100644
index 000000000..860761f07
--- /dev/null
+++ b/.changeset/info-subagents-schedules.md
@@ -0,0 +1,5 @@
+---
+"eve": patch
+---
+
+`eve info` now reports discovered subagents and schedules in both the human table and the `--json` output, matching what the CLI reference already documented. Previously both surfaces silently omitted them even though discovery resolved them correctly.
diff --git a/packages/eve/src/cli/commands/info.test.ts b/packages/eve/src/cli/commands/info.test.ts
index e82203672..3b3fc11fc 100644
--- a/packages/eve/src/cli/commands/info.test.ts
+++ b/packages/eve/src/cli/commands/info.test.ts
@@ -2,7 +2,14 @@ import { describe, expect, test } from "vitest";
import { COMPILE_METADATA_KIND, COMPILE_METADATA_VERSION } from "#compiler/artifacts.js";
import type { CompileAgentResult } from "#compiler/compile-agent.js";
-import { createCompiledAgentManifest, type CompiledChannelEntry } from "#compiler/manifest.js";
+import {
+ createCompiledAgentManifest,
+ createCompiledAgentNodeManifest,
+ type CompiledChannelEntry,
+ type CompiledScheduleDefinition,
+ type CompiledSubagentNode,
+ ROOT_COMPILED_AGENT_NODE_ID,
+} from "#compiler/manifest.js";
import { getApplicationInfo } from "#internal/application/paths.js";
import { buildApplicationInfoJson } from "./info.js";
@@ -16,7 +23,45 @@ const MESSAGING = {
const APP_ROOT = "/virtual/app";
const AGENT_ROOT = "/virtual/app/agent";
-function makeCompiledState(): CompileAgentResult {
+function makeSchedule(name: string): CompiledScheduleDefinition {
+ return {
+ cron: "0 9 * * *",
+ hasRun: false,
+ logicalPath: `schedules/${name}.md`,
+ markdown: `# ${name}`,
+ name,
+ sourceId: `schedules/${name}.md`,
+ sourceKind: "markdown",
+ };
+}
+
+function makeSubagent(name: string): CompiledSubagentNode {
+ return {
+ agent: createCompiledAgentNodeManifest({
+ agentRoot: `${AGENT_ROOT}/subagents/${name}`,
+ appRoot: APP_ROOT,
+ config: {
+ model: {
+ id: "anthropic/claude-sonnet-5",
+ routing: { kind: "gateway", target: "anthropic" },
+ },
+ name,
+ },
+ }),
+ description: `${name} subagent description`,
+ entryPath: `subagents/${name}/agent.ts`,
+ logicalPath: `subagents/${name}`,
+ name,
+ nodeId: name,
+ rootPath: `subagents/${name}`,
+ sourceId: `subagents/${name}/agent.ts`,
+ sourceKind: "module",
+ };
+}
+
+function makeCompiledState(
+ options: { subagents?: CompiledSubagentNode[]; schedules?: CompiledScheduleDefinition[] } = {},
+): CompileAgentResult {
const channels: CompiledChannelEntry[] = [
{
kind: "channel",
@@ -60,6 +105,12 @@ function makeCompiledState(): CompileAgentResult {
sourceKind: "module",
},
],
+ schedules: options.schedules ?? [],
+ subagentEdges: (options.subagents ?? []).map((subagent) => ({
+ childNodeId: subagent.nodeId,
+ parentNodeId: ROOT_COMPILED_AGENT_NODE_ID,
+ })),
+ subagents: options.subagents ?? [],
});
const digest = { path: "x", sha256: "y" };
return {
@@ -104,6 +155,8 @@ describe("buildApplicationInfoJson", () => {
expect(json.model).toBe("anthropic/claude-sonnet-5");
expect(json.tools).toEqual(["create_ticket"]);
expect(json.skills).toEqual([]);
+ expect(json.subagents).toEqual([]);
+ expect(json.schedules).toEqual([]);
expect(json.diagnostics).toEqual({ errors: 0, warnings: 0 });
expect(json.channels).toEqual([
{ name: "slack", kind: "slack", method: "POST", urlPath: "/eve/v1/slack" },
@@ -113,6 +166,20 @@ describe("buildApplicationInfoJson", () => {
expect(json.artifacts?.compiledManifest).toContain("compiled-agent-manifest.json");
});
+ test("projects subagents and schedules into the JSON contract when present", () => {
+ const json = buildApplicationInfoJson({
+ application: getApplicationInfo(APP_ROOT),
+ compiledState: makeCompiledState({
+ schedules: [makeSchedule("morning-digest"), makeSchedule("weekly-report")],
+ subagents: [makeSubagent("research")],
+ }),
+ messaging: MESSAGING,
+ });
+
+ expect(json.subagents).toEqual(["research"]);
+ expect(json.schedules).toEqual(["morning-digest", "weekly-report"]);
+ });
+
test("reports an unavailable contract when the project is not compiled", () => {
const json = buildApplicationInfoJson({
application: getApplicationInfo(APP_ROOT),
@@ -128,6 +195,8 @@ describe("buildApplicationInfoJson", () => {
expect(json.channels).toEqual([]);
expect(json.tools).toEqual([]);
expect(json.skills).toEqual([]);
+ expect(json.subagents).toEqual([]);
+ expect(json.schedules).toEqual([]);
expect(json.appRoot).toBe(APP_ROOT);
expect(json.messaging.stream).toBe("/eve/v1/session/:id/stream");
});
diff --git a/packages/eve/src/cli/commands/info.ts b/packages/eve/src/cli/commands/info.ts
index 6221bb84c..b8fe39a8c 100644
--- a/packages/eve/src/cli/commands/info.ts
+++ b/packages/eve/src/cli/commands/info.ts
@@ -22,6 +22,8 @@ export interface ApplicationInfoJson {
instructions: string | null;
skills: string[];
tools: string[];
+ subagents: string[];
+ schedules: string[];
channels: { name: string; kind: string | null; method: string | null; urlPath: string | null }[];
messaging: { create: string; continue: string; stream: string };
artifacts: {
@@ -55,6 +57,8 @@ export function buildApplicationInfoJson(inspection: ApplicationInspection): App
instructions: compiledState?.manifest.instructions?.logicalPath ?? null,
skills: (compiledState?.manifest.skills ?? []).map((skill) => skill.name),
tools: (compiledState?.manifest.tools ?? []).map((tool) => tool.name),
+ subagents: (compiledState?.manifest.subagents ?? []).map((subagent) => subagent.name),
+ schedules: (compiledState?.manifest.schedules ?? []).map((schedule) => schedule.name),
channels: (compiledState?.manifest.channels ?? []).map((channel) =>
channel.kind === "channel"
? {
@@ -173,6 +177,14 @@ export async function printApplicationInfo(
label: "Skills",
value: pluralize(compiledState.manifest.skills.length, "skill"),
},
+ {
+ label: "Subagents",
+ value: pluralize(compiledState.manifest.subagents.length, "subagent"),
+ },
+ {
+ label: "Schedules",
+ value: pluralize(compiledState.manifest.schedules.length, "schedule"),
+ },
);
artifactRows.unshift(
{