Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

Revert bundled development extensions (#3642)

prha46c98770e1ff
diff --git a/.changeset/bundled-self-modification-scaffold.md b/.changeset/bundled-self-modification-scaffold.md
deleted file mode 100644
index fb389ff48..000000000
--- a/.changeset/bundled-self-modification-scaffold.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"eve": patch
----
-
-Make the bundled self-modification subagent scaffold an authored mount before changing its model, reasoning, or policy.
diff --git a/.changeset/default-development-extensions.md b/.changeset/default-development-extensions.md
deleted file mode 100644
index c6e27cfa6..000000000
--- a/.changeset/default-development-extensions.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"eve": patch
----
-
-`eve dev` now mounts bundled development extensions by default, including the local self-modification subagent. Pass `--no-default-extensions` to run without them; production bundles do not initialize these development-only mounts.
diff --git a/docs/reference/cli.md b/docs/reference/cli.md
index a8192902d..6a9d5455e 100644
--- a/docs/reference/cli.md
+++ b/docs/reference/cli.md
@@ -223,7 +223,6 @@ Pass a bare URL and the UI connects to that server instead of booting a local on
| `-u, --url <url>` | string | none | Connect to an existing server URL instead of starting one |
| `-H, --header <header>` | string | none | Request header for a URL target, in `Name: value` form; repeat for multiple headers |
| `--no-ui` | flag | UI on | Start the server without an interactive UI |
-| `--no-default-extensions` | flag | extensions on | Do not mount bundled development extensions |
| `--name <name>` | string | app folder name | Title shown in the terminal UI |
| `--input <text>` | string | none | Pre-fill the prompt input |
| `--tools <mode>` | enum | `auto-collapsed` | Tool-call rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
@@ -234,8 +233,6 @@ Pass a bare URL and the UI connects to that server instead of booting a local on
| `--context-size <tokens>` | number | none | Model context window size, shown as a usage percentage |
| `--logs <mode>` | enum | `stderr` | Server/agent logs to show: `all` \| `stderr` \| `sandbox` \| `none` |
-Local development mounts bundled development extensions without adding files to your project. The default set includes the self-modification extension and its `self-modification__agent` subagent. Pass `--no-default-extensions` to disable the complete set for that server.
-
`eve acp` reserves stdin and stdout for newline-delimited JSON-RPC and sends diagnostics to stderr. Without a URL, it supervises an isolated local development server. With a URL, it bridges ACP to that server's existing eve HTTP API and accepts the same URL credentials and request headers as `eve dev <url>`. Pass `--scope <team>` when the active Vercel scope does not own the deployment; `EVE_VERCEL_SCOPE` provides the same value for managed harnesses. See [Agent Client Protocol (ACP)](../protocols/acp) for client configuration and capability limits.
A fresh `eve init` opens the TUI and reuses an available model connection or opens `/login`. No Vercel project, channels, integrations, or review step is required before chat. Use `/model` to change models and settings, and `/add` to install an addition. Other `--input` text stays editable in the prompt. See [Terminal UI](../guides/dev-tui) for credential precedence and login options.
diff --git a/docs/subagents/index.mdx b/docs/subagents/index.mdx
index 51518105f..19c0935e2 100644
--- a/docs/subagents/index.mdx
+++ b/docs/subagents/index.mdx
@@ -103,8 +103,6 @@ Every declared local or remote subagent runs as a durable background task: the c
A mounted extension can also contribute declared subagents from `extension/subagents/`. The mount namespace prefixes the subagent visible to the consuming agent node: mounting an extension as `crm` exposes its `reviewer` subagent as `crm__reviewer`. The contributed subagent keeps its own isolated tools, connections, skills, hooks, instructions, sandbox, and nested subagents, and its modules can read configuration from the extension handle. See [Extensions](./extensions#add-a-subagent) for the authoring and override behavior.
-Local `eve dev` mounts the bundled self-modification extension by default, which exposes the `self-modification__agent` subagent without adding files to your project. An authored extension mounted as `self-modification` takes its place. Pass `--no-default-extensions` to run without bundled development extensions. Production builds do not include development extensions unless you mount them in your agent.
-
### Vercel workspace peers
In a Vercel agent workspace, expose one other workspace member as a remote subagent with `defineWorkspaceAgent`. Create an ordinary file under the caller's `agent/subagents/` directory. Its filename gives the model-visible tool name; `name` identifies the peer under `agents/`.
diff --git a/packages/eve/src/cli/dev/command-options.ts b/packages/eve/src/cli/dev/command-options.ts
index 54397a855..7de44dbd0 100644
--- a/packages/eve/src/cli/dev/command-options.ts
+++ b/packages/eve/src/cli/dev/command-options.ts
@@ -9,7 +9,6 @@ export interface DevelopmentCliOptions {
assistantResponseStats?: AssistantResponseStatsMode;
connectionAuth?: TerminalPartDisplayMode;
contextSize?: number;
- defaultExtensions?: boolean;
header?: DevelopmentRequestHeaders;
host?: string;
input?: string;
diff --git a/packages/eve/src/cli/dev/command.ts b/packages/eve/src/cli/dev/command.ts
index 503ed661c..fed35f195 100644
--- a/packages/eve/src/cli/dev/command.ts
+++ b/packages/eve/src/cli/dev/command.ts
@@ -6,7 +6,6 @@ import { FORCED_EXIT_BACKSTOP_MS, installShutdownSignal } from "#cli/shutdown.js
import { startCliLiveRow } from "#cli/ui/live-row.js";
import { createCliTheme, renderCliTaggedLine } from "#cli/ui/output.js";
import type { EveCliTelemetry } from "#cli/telemetry/index.js";
-import { noDevelopmentExtensions } from "#compiler/development-extensions.js";
import type { DevelopmentServer, DevelopmentServerOptions } from "#internal/nitro/host/types.js";
import { createDevBootProgressReporter } from "./boot-progress.js";
@@ -88,7 +87,6 @@ export function registerDevelopmentCommand(input: {
parseDevelopmentHeaderOption,
)
.option("--no-ui", "Start the server without an interactive UI")
- .option("--no-default-extensions", "Do not mount default development extensions")
.option("--name <name>", "Title shown in the terminal UI (defaults to the app folder name)")
.option("--input <text>", "Pre-fill the prompt input")
.addOption(new Option("--onboard", "Start fresh-agent onboarding").hideHelp())
@@ -223,9 +221,6 @@ export function registerDevelopmentCommand(input: {
try {
const startHost = runtime.startHost ?? (await loadStartHost());
server = startHost(applicationContext.root, {
- ...(options.defaultExtensions === false
- ? { developmentExtensions: noDevelopmentExtensions() }
- : {}),
existing: mode === "tui" ? "attach-if-unconfigured" : "reject",
host: options.host,
onBootProgress,
diff --git a/packages/eve/src/cli/dev/local-server-child.ts b/packages/eve/src/cli/dev/local-server-child.ts
index a5441b2c4..9c74d28c6 100644
--- a/packages/eve/src/cli/dev/local-server-child.ts
+++ b/packages/eve/src/cli/dev/local-server-child.ts
@@ -5,7 +5,7 @@ import { reconcileCleanupIntents, recordCleanupIntent } from "#cli/dev/local-ser
const options = JSON.parse(process.argv[2] ?? "{}") as Pick<
DevelopmentServerOptions,
- "developmentExtensions" | "existing" | "host" | "port"
+ "existing" | "host" | "port"
>;
const server = createDevelopmentServer(process.cwd(), {
...options,
diff --git a/packages/eve/src/cli/dev/local-server-process.test.ts b/packages/eve/src/cli/dev/local-server-process.test.ts
index 0c96f5ed6..3ec368781 100644
--- a/packages/eve/src/cli/dev/local-server-process.test.ts
+++ b/packages/eve/src/cli/dev/local-server-process.test.ts
@@ -39,26 +39,6 @@ describe("createDevelopmentServer", () => {
expect(DEV_SERVER_CLOSE_BUDGET_MS).toBeLessThan(FORCED_EXIT_BACKSTOP_MS);
});
- it("passes development extension selection to the child", async () => {
- const developmentExtensions = { enabled: [] as const };
- const server = createDevelopmentServer("/tmp/app", { developmentExtensions });
- const started = server.start();
- await vi.waitFor(() => expect(mocks.fork).toHaveBeenCalled());
- expect(mocks.fork).toHaveBeenCalledWith(
- expect.any(String),
- [JSON.stringify({ developmentExtensions })],
- expect.any(Object),
- );
- child.emit("message", {
- type: "started",
- handle: { kind: "started", appRoot: "/tmp/app", url: "http://127.0.0.1:2000" },
- });
- await started;
- const closing = server.close();
- child.emit("exit", 0, null);
- await closing;
- });
-
it("starts and hands cleanup to the child", async () => {
const server = createDevelopmentServer("/tmp/app", { port: 2000 });
const started = server.start();
diff --git a/packages/eve/src/cli/dev/local-server-process.ts b/packages/eve/src/cli/dev/local-server-process.ts
index 56540a5b3..dbf4d2b4b 100644
--- a/packages/eve/src/cli/dev/local-server-process.ts
+++ b/packages/eve/src/cli/dev/local-server-process.ts
@@ -92,7 +92,6 @@ export function createDevelopmentServer(
childPath,
[
JSON.stringify({
- developmentExtensions: options.developmentExtensions,
existing: options.existing,
host: options.host,
port: options.port,
diff --git a/packages/eve/src/cli/run.test.ts b/packages/eve/src/cli/run.test.ts
index e17b0f110..e6922dec8 100644
--- a/packages/eve/src/cli/run.test.ts
+++ b/packages/eve/src/cli/run.test.ts
@@ -569,24 +569,6 @@ describe("eve dev --input", () => {
},
);
- it("passes the default extension opt-out to the local server", async () => {
- const startHost = vi.fn(() => ({
- start: async () => ({
- kind: "existing" as const,
- appRoot: "/canonical/app",
- url: "http://127.0.0.1:4321/",
- }),
- close: async () => {},
- }));
-
- await runInteractiveDev(["dev", "--no-default-extensions"], { startHost });
-
- expect(startHost).toHaveBeenCalledWith(
- expect.any(String),
- expect.objectContaining({ developmentExtensions: { enabled: [] } }),
- );
- });
-
it("forwards the internal init onboarding handoff to the local TUI", async () => {
const startHost = vi.fn(() => ({
start: async () => ({
diff --git a/packages/eve/src/compiler/artifacts.ts b/packages/eve/src/compiler/artifacts.ts
index 8ee675e8c..1cfaf90f2 100644
--- a/packages/eve/src/compiler/artifacts.ts
+++ b/packages/eve/src/compiler/artifacts.ts
@@ -21,7 +21,6 @@ import {
} from "#compiler/diagnostics.js";
import { createCompiledModuleMapSource } from "#compiler/module-map.js";
import { compileAgentManifest } from "#compiler/normalize-manifest.js";
-import type { DevelopmentExtensionSelection } from "#compiler/development-extensions.js";
import { materializeWorkspaceResources } from "#compiler/workspace-resources.js";
import { createSandboxPreparedArtifactsManifest } from "#shared/sandbox-prepared-artifacts.js";
@@ -120,7 +119,6 @@ export interface CompilerArtifactLocations {
*/
interface WriteCompilerArtifactsInput {
appRoot: string;
- developmentExtensions?: DevelopmentExtensionSelection;
artifactLocations: CompilerArtifactLocations;
diagnostics: readonly DiscoverDiagnostic[];
manifest: AgentSourceManifest;
@@ -246,10 +244,7 @@ export async function writeCompilerArtifacts(
);
const compiledManifest = await materializeWorkspaceResources({
compileDirectoryPath: paths.compileDirectoryPath,
- manifest: await compileAgentManifest(input.manifest, {
- developmentExtensions: input.developmentExtensions,
- diagnostics,
- }),
+ manifest: await compileAgentManifest(input.manifest, { diagnostics }),
});
const diagnosticsArtifact = createCompilerDiagnosticsArtifact(diagnostics);
const compiledManifestJson = serializeArtifactJson(compiledManifest);
diff --git a/packages/eve/src/compiler/bundled-extension.ts b/packages/eve/src/compiler/bundled-extension.ts
deleted file mode 100644
index 8c1af6f02..000000000
--- a/packages/eve/src/compiler/bundled-extension.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import { packageStateNamespace } from "#discover/extensions.js";
-import {
- defineProgrammaticExtensionMountDeclaration,
- type ProgrammaticAgentSource,
-} from "#compiler/source-graph.js";
-import { resolveInstalledPackageInfo, resolvePackageRoot } from "#internal/application/package.js";
-
-/** The small descriptor used for extensions shipped inside eve. */
-export interface BundledExtensionDescriptor {
- readonly loadMount: () => Promise<unknown>;
- readonly namespace: string;
- readonly sourceDirectory: string;
-}
-
-export interface BundledExtensionMount {
- readonly declaration: ProgrammaticAgentSource;
- readonly namespace: string;
- readonly packageName: string;
- readonly packageRoot: string;
- readonly sourceRoot: string;
- readonly specifier: string;
-}
-
-/** Adapts one bundled descriptor to the virtual extension mount consumed by discovery. */
-export function createBundledExtensionMount(
- descriptor: BundledExtensionDescriptor,
-): BundledExtensionMount {
- const packageInfo = resolveInstalledPackageInfo();
- const packageName = packageInfo.name;
- const packageRoot = resolvePackageRoot();
- const revision = `eve@${packageInfo.version}:development-extensions-v1`;
- const logicalPath = `extensions/${descriptor.namespace}.ts`;
- const declaration = defineProgrammaticExtensionMountDeclaration({
- id: `eve:development-extension:${descriptor.namespace}`,
- revision,
- modules: [
- {
- logicalPath,
- loadNamespace: async () => {
- const container = globalThis as Record<symbol, unknown>;
- const scopeSymbol = Symbol.for("eve.ext-config-scope");
- const previousScope = container[scopeSymbol];
- container[scopeSymbol] = packageStateNamespace(packageName);
- try {
- return { default: await descriptor.loadMount() };
- } finally {
- if (previousScope === undefined) delete container[scopeSymbol];
- else container[scopeSymbol] = previousScope;
- }
- },
- },
- ],
- });
-
- return Object.freeze({
- declaration,
- namespace: descriptor.namespace,
- packageName,
- packageRoot,
- sourceRoot: descriptor.sourceDirectory,
- specifier: `${packageName}/${descriptor.namespace}`,
- });
-}
diff --git a/packages/eve/src/compiler/compile-agent.ts b/packages/eve/src/compiler/compile-agent.ts
index 61d99602e..dfbb2de59 100644
--- a/packages/eve/src/compiler/compile-agent.ts
+++ b/packages/eve/src/compiler/compile-agent.ts
@@ -14,15 +14,12 @@ import {
} from "#compiler/artifacts.js";
import type { CompiledAgentManifest } from "#compiler/manifest.js";
import { summarizeCompilerDiagnostics, type CompilerDiagnostic } from "#compiler/diagnostics.js";
-import type { DevelopmentExtensionSelection } from "#compiler/development-extensions.js";
/**
* Input for compiling the current authored agent into framework-owned
* discovery artifacts.
*/
export interface CompileAgentInput {
- /** Development-only source extensions applied before source composition. */
- developmentExtensions?: DevelopmentExtensionSelection;
/**
* Optional {@link ProjectSource} used for discovery reads. Defaults to a
* disk-backed source so production callers keep their current behaviour.
@@ -94,20 +91,15 @@ export async function compileAgent(input: CompileAgentInput = {}): Promise<Compi
*/
export async function compileAgentInWorkspace(input: {
readonly artifactLocations: CompilerArtifactLocations;
- readonly developmentExtensions?: DevelopmentExtensionSelection;
readonly startPath: string;
}): Promise<CompileAgentResult> {
- const discovered = await discoverAgentForCompilation({
- developmentExtensions: input.developmentExtensions,
- startPath: input.startPath,
- });
+ const discovered = await discoverAgentForCompilation({ startPath: input.startPath });
const result = await writeAgentCompilation(discovered, input.artifactLocations);
return finishAgentCompilation(result, CompileAgentError.fromTransientArtifacts);
}
interface DiscoveredAgentCompilation {
- readonly developmentExtensions: DevelopmentExtensionSelection | undefined;
readonly diagnostics: DiscoverDiagnostic[];
readonly manifest: AgentSourceManifest;
readonly project: ResolvedDiscoveryProject;
@@ -121,7 +113,6 @@ async function discoverAgentForCompilation(
const discoveryResult = await discoverAgent({ ...project, source });
return {
- developmentExtensions: input.developmentExtensions,
diagnostics: discoveryResult.diagnostics,
manifest: discoveryResult.manifest,
project,
@@ -136,7 +127,6 @@ async function writeAgentCompilation(
appRoot: discovered.project.appRoot,
artifactLocations,
diagnostics: discovered.diagnostics,
- developmentExtensions: discovered.developmentExtensions,
manifest: discovered.manifest,
});
diff --git a/packages/eve/src/compiler/development-extensions.integration.test.ts b/packages/eve/src/compiler/development-extensions.integration.test.ts
deleted file mode 100644
index a197ad54b..000000000
--- a/packages/eve/src/compiler/development-extensions.integration.test.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-import { describe, expect, it } from "vitest";
-
-import {
- defaultDevelopmentExtensions,
- getDevelopmentExtensionSourceRegistry,
- prepareDevelopmentExtensions,
-} from "#compiler/development-extensions.js";
-import { createProgrammaticCompiledModuleMap } from "#compiler/module-map.js";
-import { compileAgentManifest } from "#compiler/normalize-manifest.js";
-import { validateCompiledModuleMap } from "#compiler/validate-artifact.js";
-import { createAgentSourceManifest } from "#discover/manifest.js";
-import { frameworkAgentSourceRegistry } from "#framework/sources/registry.js";
-
-function manifest() {
- return createAgentSourceManifest({
- agentId: "source-test",
- agentRoot: "/virtual/source-test/agent",
- appRoot: "/virtual/source-test",
- });
-}
-
-describe("development extensions", () => {
- it("mounts the built-in self-modification extension at the root", async () => {
- expect(
- frameworkAgentSourceRegistry.sources.has("eve:development-extension:self-modification"),
- ).toBe(false);
-
- const compiled = await compileAgentManifest(manifest(), {
- developmentExtensions: defaultDevelopmentExtensions(),
- });
- expect(compiled.subagents).toHaveLength(1);
- const subagent = compiled.subagents[0]!;
- expect(subagent.name).toBe("self-modification__agent");
-
- expect(compiled.extensionMounts).toMatchObject([
- {
- mountLogicalPath: "extensions/self-modification.ts",
- namespace: "self-modification",
- packageName: "eve",
- },
- ]);
- expect(subagent.agent.tools.map((tool) => tool.name)).toEqual(
- expect.arrayContaining(["edit_file", "search_models", "search_registry"]),
- );
- expect(subagent.agent.dynamicTools.map((tool) => tool.slug)).toEqual(
- expect.arrayContaining(["publish", "registry_add"]),
- );
- expect(subagent.agent.dynamicInstructions).toHaveLength(1);
-
- const moduleMap = await createProgrammaticCompiledModuleMap(compiled, [
- frameworkAgentSourceRegistry,
- getDevelopmentExtensionSourceRegistry(),
- ]);
- expect(() => validateCompiledModuleMap(compiled, moduleMap)).not.toThrow();
- });
-
- it("does not replace an authored self-modification mount", async () => {
- const authored = manifest();
- authored.extensions.push({
- logicalPath: "extensions/self-modification.ts",
- sourceId: "extensions/self-modification.ts",
- sourceKind: "module",
- });
-
- const prepared = await prepareDevelopmentExtensions({
- diagnostics: [],
- manifest: authored,
- nodeId: "root",
- selection: defaultDevelopmentExtensions(),
- });
-
- expect(prepared.manifest.resolvedExtensions).toEqual([]);
- expect(prepared.candidates).toEqual([]);
- });
-});
diff --git a/packages/eve/src/compiler/development-extensions.ts b/packages/eve/src/compiler/development-extensions.ts
deleted file mode 100644
index 3139d65f1..000000000
--- a/packages/eve/src/compiler/development-extensions.ts
+++ /dev/null
@@ -1,138 +0,0 @@
-import { projectDiscoverDiagnostic, type CompilerDiagnostic } from "#compiler/diagnostics.js";
-import {
- createBundledExtensionMount,
- type BundledExtensionDescriptor,
- type BundledExtensionMount,
-} from "#compiler/bundled-extension.js";
-import {
- createAgentSourceRegistry,
- createProgrammaticModuleCandidates,
- type AgentModuleCandidate,
- type AgentSourceRegistry,
- type ProgrammaticAgentSource,
-} from "#compiler/source-graph.js";
-import type { AgentSourceManifest } from "#discover/manifest.js";
-import { discoverBundledExtension } from "#discover/bundled-extension.js";
-import { mountRefNamespace } from "#discover/extensions.js";
-import { resolvePackageSourceDirectoryPath } from "#internal/application/package.js";
-
-// Keep this indirect so extension-contract declaration generation does not follow the dev-only mount.
-const SELF_MODIFICATION_EXTENSION_MODULE = "#self-modification/extension/extension.js";
-
-const DEVELOPMENT_EXTENSION_IDS = ["self-modification"] as const;
-
-export type DevelopmentExtensionId = (typeof DEVELOPMENT_EXTENSION_IDS)[number];
-
-export interface DevelopmentExtensionSelection {
- readonly enabled: readonly DevelopmentExtensionId[];
-}
-
-// Hosted bundles can retain compiler modules, so package-owned paths must stay unresolved
-// until a development extension is actually selected.
-let bundledExtensionById: ReadonlyMap<string, BundledExtensionMount> | undefined;
-let developmentSourceRegistry: AgentSourceRegistry | undefined;
-
-function getBundledExtensionById(): ReadonlyMap<string, BundledExtensionMount> {
- if (bundledExtensionById === undefined) {
- bundledExtensionById = new Map(
- (
- [
- {
- namespace: "self-modification",
- sourceDirectory: resolvePackageSourceDirectoryPath("src/self-modification/extension"),
- loadMount: async () => {
- const { default: extension } = await import(SELF_MODIFICATION_EXTENSION_MODULE);
- return extension({ local: { enabled: true } });
- },
- },
- ] as const satisfies readonly BundledExtensionDescriptor[]
- )
- .map(createBundledExtensionMount)
- .map((extension) => [extension.namespace, extension]),
- );
- }
- return bundledExtensionById;
-}
-
-/** Returns the registry used only by generated local-development module maps. */
-export function getDevelopmentExtensionSourceRegistry(): AgentSourceRegistry {
- developmentSourceRegistry ??= createAgentSourceRegistry([], {
- extensionDeclarations: [...getBundledExtensionById().values()].map(
- (extension): ProgrammaticAgentSource => extension.declaration,
- ),
- });
- return developmentSourceRegistry;
-}
-
-const DEFAULT_DEVELOPMENT_EXTENSION_IDS: readonly DevelopmentExtensionId[] =
- DEVELOPMENT_EXTENSION_IDS;
-const NO_DEVELOPMENT_EXTENSION_IDS: readonly DevelopmentExtensionId[] = [];
-
-export function defaultDevelopmentExtensions(): DevelopmentExtensionSelection {
- return { enabled: DEFAULT_DEVELOPMENT_EXTENSION_IDS };
-}
-
-export function noDevelopmentExtensions(): DevelopmentExtensionSelection {
- return { enabled: NO_DEVELOPMENT_EXTENSION_IDS };
-}
-
-/** Discovers selected bundled extensions and creates their root mount candidates. */
-export async function prepareDevelopmentExtensions(input: {
- readonly diagnostics: CompilerDiagnostic[];
- readonly manifest: AgentSourceManifest;
- readonly nodeId: string;
- readonly selection: DevelopmentExtensionSelection;
-}): Promise<{
- readonly candidates: readonly AgentModuleCandidate[];
- readonly manifest: AgentSourceManifest;
-}> {
- const existingNamespaces = new Set([
- ...input.manifest.extensions.map((extension) => mountRefNamespace(extension.logicalPath)),
- ...input.manifest.resolvedExtensions.map((extension) => extension.namespace),
- ]);
- const selected = new Map<string, BundledExtensionMount>();
- const extensionsById =
- input.selection.enabled.length === 0 ? undefined : getBundledExtensionById();
-
- for (const id of new Set(input.selection.enabled)) {
- const extension = extensionsById?.get(id);
- if (extension === undefined) throw new Error(`Unknown development extension "${id}".`);
- const existing = selected.get(extension.namespace);
- if (existing !== undefined && existing !== extension) {
- throw new Error(
- `Development extensions use namespace "${extension.namespace}" more than once.`,
- );
- }
- if (existingNamespaces.has(extension.namespace)) continue;
- existingNamespaces.add(extension.namespace);
- selected.set(extension.namespace, extension);
- }
-
- const resolvedExtensions = [...input.manifest.resolvedExtensions];
- const candidates: AgentModuleCandidate[] = [];
- for (const extension of selected.values()) {
- const discovered = await discoverBundledExtension({ mount: extension });
- input.diagnostics.push(
- ...discovered.diagnostics.map((diagnostic) =>
- projectDiscoverDiagnostic(diagnostic, input.nodeId),
- ),
- );
- resolvedExtensions.push(discovered.mount);
- candidates.push(
- ...createProgrammaticModuleCandidates({
- layer: "framework-default",
- nodeId: input.nodeId,
- owner: { feature: extension.declaration.id, kind: "framework" },
- registration: { applyTo: "root", source: extension.declaration },
- }),
- );
- }
-
- return {
- candidates,
- manifest: {
- ...input.manifest,
- resolvedExtensions,
- },
- };
-}
diff --git a/packages/eve/src/compiler/normalize-manifest-helpers.ts b/packages/eve/src/compiler/normalize-manifest-helpers.ts
index 8f7dfc61a..f57647325 100644
--- a/packages/eve/src/compiler/normalize-manifest-helpers.ts
+++ b/packages/eve/src/compiler/normalize-manifest-helpers.ts
@@ -181,9 +181,9 @@ export function compileExtensionMounts(
): CompiledExtensionMount[] {
const selected = collectSelectedSourceIds(composed);
return manifest.resolvedExtensions.flatMap((mount) => {
- const mountRef =
- mount.programmaticDeclaration ??
- manifest.extensions.find((entry) => mountRefNamespace(entry.logicalPath) === mount.namespace);
+ const mountRef = manifest.extensions.find(
+ (entry) => mountRefNamespace(entry.logicalPath) === mount.namespace,
+ );
if (mountRef === undefined || !selected.has(mountRef.sourceId)) return [];
return [
{
diff --git a/packages/eve/src/compiler/normalize-manifest-types.ts b/packages/eve/src/compiler/normalize-manifest-types.ts
deleted file mode 100644
index d1b7a462f..000000000
--- a/packages/eve/src/compiler/normalize-manifest-types.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import type { CompilerDiagnostic } from "#compiler/diagnostics.js";
-import type {
- AgentModuleCandidate,
- AgentSourceLayer,
- AgentSourceOwner,
- AgentSourceRegistry,
-} from "#compiler/source-graph.js";
-import type { DevelopmentExtensionSelection } from "#compiler/development-extensions.js";
-import type { AgentSourceManifest } from "#discover/manifest.js";
-
-export interface CompileAgentManifestOptions {
- readonly developmentExtensions?: DevelopmentExtensionSelection;
- readonly diagnostics?: CompilerDiagnostic[];
- readonly sourceRegistries?: readonly AgentSourceRegistry[];
-}
-
-export interface NodeCompileInput {
- readonly developmentExtensionCandidates?: readonly AgentModuleCandidate[];
- readonly extensionScope?: { readonly namespace: string; readonly sourceRoot: string };
- readonly inheritedExternalDependencies: readonly string[];
- readonly isRoot: boolean;
- readonly layer: AgentSourceLayer;
- readonly manifest: AgentSourceManifest;
- readonly nodeId: string;
- readonly owner: AgentSourceOwner;
- readonly parentNodeId?: string;
-}
diff --git a/packages/eve/src/compiler/normalize-manifest.ts b/packages/eve/src/compiler/normalize-manifest.ts
index b2099086d..62a78a0fb 100644
--- a/packages/eve/src/compiler/normalize-manifest.ts
+++ b/packages/eve/src/compiler/normalize-manifest.ts
@@ -90,6 +90,8 @@ import {
isAgentModuleCandidate,
type AgentModuleCandidate,
type AgentSourceCandidate,
+ type AgentSourceLayer,
+ type AgentSourceOwner,
type AgentSourceRegistry,
canonicalSourceSlot,
} from "#compiler/source-graph.js";
@@ -97,21 +99,29 @@ import {
frameworkAgentSourceRegistry,
memoryWrapperTemplate,
} from "#framework/sources/registry.js";
-import {
- noDevelopmentExtensions,
- prepareDevelopmentExtensions,
-} from "#compiler/development-extensions.js";
-import type {
- CompileAgentManifestOptions,
- NodeCompileInput,
-} from "#compiler/normalize-manifest-types.js";
-export type { CompileAgentManifestOptions } from "#compiler/normalize-manifest-types.js";
+
+export interface CompileAgentManifestOptions {
+ readonly diagnostics?: CompilerDiagnostic[];
+ readonly sourceRegistries?: readonly AgentSourceRegistry[];
+}
+
+interface NodeCompileInput {
+ readonly extensionScope?: { readonly namespace: string; readonly sourceRoot: string };
+ readonly inheritedExternalDependencies: readonly string[];
+ readonly isRoot: boolean;
+ readonly layer: AgentSourceLayer;
+ readonly manifest: AgentSourceManifest;
+ readonly nodeId: string;
+ readonly owner: AgentSourceOwner;
+ readonly parentNodeId?: string;
+}
interface CompiledLocalNodeResult {
readonly descendants: readonly CompiledSubagentNode[];
readonly manifest: CompiledAgentNodeManifest;
}
+/** Compiles one discovery graph through the canonical source composition pipeline. */
export async function compileAgentManifest(
manifest: AgentSourceManifest,
options: CompileAgentManifestOptions = {},
@@ -123,19 +133,12 @@ export async function compileAgentManifest(
registries,
};
const diagnostics = options.diagnostics ?? [];
- const developmentExtensions = await prepareDevelopmentExtensions({
- diagnostics,
- manifest,
- nodeId: ROOT_COMPILED_AGENT_NODE_ID,
- selection: options.developmentExtensions ?? noDevelopmentExtensions(),
- });
const compiler = new AgentGraphCompiler(context, registries, diagnostics);
const root = await compiler.compileStaticNode({
- developmentExtensionCandidates: developmentExtensions.candidates,
inheritedExternalDependencies: [],
isRoot: true,
layer: "application",
- manifest: developmentExtensions.manifest,
+ manifest,
nodeId: ROOT_COMPILED_AGENT_NODE_ID,
owner: { kind: "application" },
});
@@ -218,6 +221,7 @@ class AgentGraphCompiler {
const subagents = state.projected.subagents.filter((source) =>
selectedSourceIds.has(source.candidate.sourceId),
);
+
for (const projected of subagents) {
const source = projected.source;
const nodeId = createCompiledSubagentNodeId(input.nodeId, source.sourceId);
@@ -408,7 +412,6 @@ class AgentGraphCompiler {
});
const orderedCandidates: AgentSourceCandidate[] = [
...frameworkCandidates,
- ...(input.developmentExtensionCandidates ?? []),
...projected.candidates,
...memoryWrapperCandidates,
...applicationCandidates,
diff --git a/packages/eve/src/compiler/source-graph-paths.ts b/packages/eve/src/compiler/source-graph-paths.ts
deleted file mode 100644
index 58ad6fac3..000000000
--- a/packages/eve/src/compiler/source-graph-paths.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { isAbsolute, posix } from "node:path";
-
-import {
- getSupportedModuleBaseName,
- normalizeLogicalPath,
- stripLogicalPathExtension,
-} from "#discover/filesystem.js";
-
-export function validateProgrammaticLogicalPath(input: string): string {
- return validateProgrammaticLogicalPathInternal(input, false);
-}
-
-export function validateProgrammaticLogicalPathInternal(
- input: string,
- allowExtensionMount: boolean,
-): string {
- if (input.length === 0 || isAbsolute(input) || input.includes("\\")) {
- throw new Error(`Programmatic module logical path "${input}" must be a relative POSIX path.`);
- }
- const logicalPath = normalizeLogicalPath(input);
- if (
- logicalPath === "." ||
- logicalPath.startsWith("../") ||
- logicalPath.includes("/../") ||
- posix.normalize(logicalPath) !== logicalPath
- ) {
- throw new Error(`Programmatic module logical path "${input}" may not traverse directories.`);
- }
- const segments = logicalPath.split("/");
- const fileName = segments.at(-1)!;
- if (getSupportedModuleBaseName(fileName) === null) {
- throw new Error(
- `Programmatic module logical path "${input}" must use a supported JavaScript or TypeScript extension.`,
- );
- }
- const root = segments[0];
- const extensionless = stripLogicalPathExtension(logicalPath);
- const supported =
- (segments.length === 1 &&
- ["agent", "memory", "sandbox", "instrumentation"].includes(extensionless)) ||
- (root === "sandbox" &&
- segments.length === 2 &&
- getSupportedModuleBaseName(fileName) === "sandbox") ||
- ([
- "channels",
- "connections",
- "hooks",
- "instructions",
- "memory",
- "schedules",
- "skills",
- "tools",
- ].includes(root!) &&
- segments.length >= 2) ||
- (allowExtensionMount && root === "extensions" && segments.length === 2);
- if (!supported) {
- throw new Error(
- `Programmatic module logical path "${input}" does not select an eve module slot.`,
- );
- }
- return logicalPath;
-}
diff --git a/packages/eve/src/compiler/source-graph.test.ts b/packages/eve/src/compiler/source-graph.test.ts
index 5260711b6..dab9146fe 100644
--- a/packages/eve/src/compiler/source-graph.test.ts
+++ b/packages/eve/src/compiler/source-graph.test.ts
@@ -17,7 +17,6 @@ import {
type ProgrammaticAgentSource,
type ProgrammaticModuleLoadContext,
} from "#compiler/source-graph.js";
-import { createBundledExtensionMount } from "#compiler/bundled-extension.js";
import { materializeAuthoredModuleExport } from "#internal/authored-module.js";
function source(
@@ -45,46 +44,6 @@ function candidate(
})[0]!;
}
-describe("bundled extension declarations", () => {
- it("registers a configured extension declaration without enumerating contributions", async () => {
- const loadMount = vi.fn(async () => {
- expect((globalThis as Record<symbol, unknown>)[Symbol.for("eve.ext-config-scope")]).toBe(
- "eve",
- );
- return { config: { enabled: true }, mounted: true };
- });
- const mount = createBundledExtensionMount({
- loadMount,
- namespace: "example",
- sourceDirectory: "/packages/example/extension",
- });
- const registry = createAgentSourceRegistry([], {
- extensionDeclarations: [mount.declaration],
- });
- const declaration = mount.declaration.modules[0]!;
-
- expect(declaration.logicalPath).toBe("extensions/example.ts");
- expect(registry.sources.get(mount.declaration.id)).toMatchObject({
- id: mount.declaration.id,
- });
- await expect(
- loadProgrammaticModuleNamespace({
- backing: {
- kind: "programmatic",
- moduleId: declaration.logicalPath,
- registryId: mount.declaration.id,
- revision: mount.declaration.revision,
- },
- registries: [registry],
- }),
- ).resolves.toEqual({ default: { config: { enabled: true }, mounted: true } });
- expect(loadMount).toHaveBeenCalledOnce();
- expect(
- (globalThis as Record<symbol, unknown>)[Symbol.for("eve.ext-config-scope")],
- ).toBeUndefined();
- });
-});
-
describe("derived programmatic sources", () => {
it("memoizes definition factories within one module namespace", async () => {
const factory = vi.fn(() => ({ instance: Symbol("definition") }));
diff --git a/packages/eve/src/compiler/source-graph.ts b/packages/eve/src/compiler/source-graph.ts
index b00146185..3ff2fcb20 100644
--- a/packages/eve/src/compiler/source-graph.ts
+++ b/packages/eve/src/compiler/source-graph.ts
@@ -1,11 +1,10 @@
-import { posix } from "node:path";
+import { isAbsolute, posix } from "node:path";
-import { normalizeLogicalPath, stripLogicalPathExtension } from "#discover/filesystem.js";
import {
- validateProgrammaticLogicalPath,
- validateProgrammaticLogicalPathInternal,
-} from "#compiler/source-graph-paths.js";
-export { validateProgrammaticLogicalPath } from "#compiler/source-graph-paths.js";
+ getSupportedModuleBaseName,
+ normalizeLogicalPath,
+ stripLogicalPathExtension,
+} from "#discover/filesystem.js";
import { parseJsonObject, type JsonObject } from "#shared/json.js";
export type ProgrammaticModuleNamespace = Readonly<Record<string, unknown>>;
@@ -62,8 +61,6 @@ export interface AgentSourceRegistration {
}
export interface AgentSourceRegistryOptions {
- /** Programmatic extension declarations loaded by compiled virtual mounts. */
- readonly extensionDeclarations?: readonly ProgrammaticAgentSource[];
readonly templates?: readonly ProgrammaticAgentSource[];
}
@@ -260,22 +257,12 @@ const registeredProgrammaticTemplates = new WeakSet<RegisteredProgrammaticTempla
export function defineProgrammaticAgentSource(
input: ProgrammaticAgentSource,
-): ProgrammaticAgentSource {
- return defineProgrammaticAgentSourceInternal(input, false);
-}
-
-function defineProgrammaticAgentSourceInternal(
- input: ProgrammaticAgentSource,
- allowExtensionMount: boolean,
): ProgrammaticAgentSource {
const id = expectNonEmpty(input.id, "Programmatic agent source id");
const revision = expectNonEmpty(input.revision, `Programmatic agent source "${id}" revision`);
const logicalPaths = new Set<string>();
const modules = input.modules.map((module) => {
- const logicalPath = validateProgrammaticLogicalPathInternal(
- module.logicalPath,
- allowExtensionMount,
- );
+ const logicalPath = validateProgrammaticLogicalPath(module.logicalPath);
if (logicalPaths.has(logicalPath)) {
throw new Error(
`Programmatic agent source "${id}" declares "${logicalPath}" more than once.`,
@@ -300,23 +287,14 @@ function defineProgrammaticAgentSourceInternal(
return Object.freeze({ id, modules: Object.freeze(modules), revision });
}
-export function defineProgrammaticExtensionMountDeclaration(
- input: ProgrammaticAgentSource,
-): ProgrammaticAgentSource {
- return defineProgrammaticAgentSourceInternal(input, true);
-}
-
export function createAgentSourceRegistry(
registrations: readonly AgentSourceRegistration[],
options: AgentSourceRegistryOptions = {},
): AgentSourceRegistry {
const sources = new Map<string, ProgrammaticAgentSource>();
const templates = new Map<string, RegisteredProgrammaticTemplate>();
- const addSource = (
- inputSource: ProgrammaticAgentSource,
- allowExtensionMount = false,
- ): ProgrammaticAgentSource => {
- const source = defineProgrammaticAgentSourceInternal(inputSource, allowExtensionMount);
+ const addSource = (inputSource: ProgrammaticAgentSource): ProgrammaticAgentSource => {
+ const source = defineProgrammaticAgentSource(inputSource);
if (sources.has(source.id)) {
throw new Error(`Programmatic agent source id "${source.id}" is registered more than once.`);
}
@@ -327,9 +305,6 @@ export function createAgentSourceRegistry(
const source = addSource(registration.source);
return Object.freeze({ applyTo: registration.applyTo, source });
});
- for (const declaration of options.extensionDeclarations ?? []) {
- addSource(declaration, true);
- }
for (const inputTemplate of options.templates ?? []) {
const source = addSource(inputTemplate);
if (source.modules.length !== 1) {
@@ -623,6 +598,52 @@ export function canonicalSourceSlot(logicalPath: string): string {
return withoutExtension;
}
+export function validateProgrammaticLogicalPath(input: string): string {
+ if (input.length === 0 || isAbsolute(input) || input.includes("\\")) {
+ throw new Error(`Programmatic module logical path "${input}" must be a relative POSIX path.`);
+ }
+ const logicalPath = normalizeLogicalPath(input);
+ if (
+ logicalPath === "." ||
+ logicalPath.startsWith("../") ||
+ logicalPath.includes("/../") ||
+ posix.normalize(logicalPath) !== logicalPath
+ ) {
+ throw new Error(`Programmatic module logical path "${input}" may not traverse directories.`);
+ }
+ const segments = logicalPath.split("/");
+ const fileName = segments.at(-1)!;
+ if (getSupportedModuleBaseName(fileName) === null) {
+ throw new Error(
+ `Programmatic module logical path "${input}" must use a supported JavaScript or TypeScript extension.`,
+ );
+ }
+ const root = segments[0];
+ const extensionless = stripLogicalPathExtension(logicalPath);
+ const supported =
+ (segments.length === 1 && ["agent", "memory", "sandbox"].includes(extensionless)) ||
+ (root === "sandbox" &&
+ segments.length === 2 &&
+ getSupportedModuleBaseName(fileName) === "sandbox") ||
+ ([
+ "channels",
+ "connections",
+ "hooks",
+ "instructions",
+ "memory",
+ "schedules",
+ "skills",
+ "tools",
+ ].includes(root!) &&
+ segments.length >= 2);
+ if (!supported) {
+ throw new Error(
+ `Programmatic module logical path "${input}" does not select an eve module slot.`,
+ );
+ }
+ return logicalPath;
+}
+
export function describeAgentSourceCandidate(
candidate: AgentSourceCandidate,
): AgentSourceDescriptor {
diff --git a/packages/eve/src/discover/bundled-extension.test.ts b/packages/eve/src/discover/bundled-extension.test.ts
deleted file mode 100644
index 0bd21e4c5..000000000
--- a/packages/eve/src/discover/bundled-extension.test.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { describe, expect, it } from "vitest";
-
-import { createBundledExtensionMount } from "#compiler/bundled-extension.js";
-import { discoverBundledExtension } from "#discover/bundled-extension.js";
-import { createMemoryProjectSource } from "#discover/project-source.js";
-
-describe("discoverBundledExtension", () => {
- it("discovers the complete extension tree without declared file entries", async () => {
- const mount = createBundledExtensionMount({
- loadMount: async () => ({}),
- namespace: "example",
- sourceDirectory: "/package/extension",
- });
- const result = await discoverBundledExtension({
- mount,
- source: createMemoryProjectSource({
- files: {
- "/package/extension/instructions.ts": "export default {};",
- "/package/extension/tools/first.ts": "export default {};",
- "/package/extension/tools/nested/second.ts": "export default {};",
- },
- }),
- });
-
- expect(result.diagnostics).toEqual([]);
- expect(result.mount.manifest.instructions.map((source) => source.logicalPath)).toEqual([
- "instructions.ts",
- ]);
- expect(result.mount.manifest.tools.map((source) => source.logicalPath).sort()).toEqual([
- "tools/first.ts",
- "tools/nested/second.ts",
- ]);
- expect(result.mount.programmaticDeclaration).toEqual({
- logicalPath: "extensions/example.ts",
- sourceId: `${mount.declaration.id}:extensions/example.ts`,
- });
- });
-});
diff --git a/packages/eve/src/discover/bundled-extension.ts b/packages/eve/src/discover/bundled-extension.ts
deleted file mode 100644
index 44a369752..000000000
--- a/packages/eve/src/discover/bundled-extension.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import { discoverAgent } from "#discover/discover-agent.js";
-import { createDiskProjectSource, type ProjectSource } from "#discover/project-source.js";
-import type { DiscoverDiagnostic } from "#discover/diagnostics.js";
-import type { ResolvedExtensionMount } from "#discover/manifest.js";
-import type { BundledExtensionMount } from "#compiler/bundled-extension.js";
-
-export async function discoverBundledExtension(input: {
- readonly mount: BundledExtensionMount;
- readonly source?: ProjectSource;
-}): Promise<{
- readonly diagnostics: readonly DiscoverDiagnostic[];
- readonly mount: ResolvedExtensionMount;
-}> {
- const source = input.source ?? createDiskProjectSource();
- const result = await discoverAgent({
- agentRoot: input.mount.sourceRoot,
- appRoot: input.mount.packageRoot,
- role: "extension",
- source,
- });
- const declaration = input.mount.declaration.modules[0];
- if (declaration === undefined) {
- throw new Error(`Bundled extension "${input.mount.namespace}" has no declaration module.`);
- }
-
- return {
- diagnostics: result.diagnostics,
- mount: {
- externalDependencies: [],
- manifest: result.manifest,
- namespace: input.mount.namespace,
- packageName: input.mount.packageName,
- packageRoot: input.mount.packageRoot,
- programmaticDeclaration: {
- logicalPath: declaration.logicalPath,
- sourceId: `${input.mount.declaration.id}:${declaration.logicalPath}`,
- },
- sourceRoot: input.mount.sourceRoot,
- specifier: input.mount.specifier,
- },
- };
-}
diff --git a/packages/eve/src/discover/manifest.ts b/packages/eve/src/discover/manifest.ts
index 66158f2b1..0cacc1d27 100644
--- a/packages/eve/src/discover/manifest.ts
+++ b/packages/eve/src/discover/manifest.ts
@@ -147,11 +147,6 @@ export type ExtensionSourceRef = ModuleSourceRef;
* consuming agent, prefixing contributions with {@link namespace}.
*/
export interface ResolvedExtensionMount {
- /** Programmatic declaration used when the mount does not exist on disk. */
- readonly programmaticDeclaration?: {
- readonly logicalPath: string;
- readonly sourceId: string;
- };
/** Mount namespace derived from the mount filename (e.g. `crm`). */
readonly namespace: string;
/** Package specifier the mount imports (e.g. `@acme/crm`). */
diff --git a/packages/eve/src/evals/cli/eval.ts b/packages/eve/src/evals/cli/eval.ts
index 2fc717923..7fb52269b 100644
--- a/packages/eve/src/evals/cli/eval.ts
+++ b/packages/eve/src/evals/cli/eval.ts
@@ -8,7 +8,6 @@ import {
EVE_EVALUATION_ENV_FLAG,
EVE_EVALUATION_RUN_ID_ENV,
} from "#internal/application/dev-environment.js";
-import { noDevelopmentExtensions } from "#compiler/development-extensions.js";
import { createDevelopmentServer, type DevelopmentServer } from "#internal/nitro/host.js";
import { createEvalClient } from "#evals/cli/eval-client.js";
import { filterEvalsByTags } from "#evals/cli/filter.js";
@@ -152,11 +151,7 @@ export async function runEvalCommand(
// once at startup and never again.
process.env[EVE_EVALUATION_ENV_FLAG] = "1";
process.env[EVE_EVALUATION_RUN_ID_ENV] = randomUUID();
- devServer = createDevelopmentServer(appRoot, {
- developmentExtensions: noDevelopmentExtensions(),
- host: "127.0.0.1",
- port: 0,
- });
+ devServer = createDevelopmentServer(appRoot, { host: "127.0.0.1", port: 0 });
const started = await devServer.start();
client = await createEvalClient({ kind: "local", url: started.url });
target = await resolveEvalTargetHandle({
diff --git a/packages/eve/src/internal/application/package.ts b/packages/eve/src/internal/application/package.ts
index c2700b325..f8185f962 100644
--- a/packages/eve/src/internal/application/package.ts
+++ b/packages/eve/src/internal/application/package.ts
@@ -266,43 +266,7 @@ export function resolvePackageSourceDirectoryPath(relativeSourcePath: string): s
}
export function resolvePackageDependencyPath(specifier: string): string {
- try {
- return require.resolve(specifier);
- } catch (error) {
- const packageRoot = tryResolvePackageRoot();
- const sourcePath =
- packageRoot === undefined || !isSourceCheckout(packageRoot)
- ? undefined
- : resolveSourceCheckoutExport(packageRoot, specifier);
- if (sourcePath !== undefined) return sourcePath;
- throw error;
- }
-}
-
-function resolveSourceCheckoutExport(packageRoot: string, specifier: string): string | undefined {
- if (specifier !== EVE_PACKAGE_NAME && !specifier.startsWith(`${EVE_PACKAGE_NAME}/`)) {
- return undefined;
- }
- const exportKey =
- specifier === EVE_PACKAGE_NAME ? "." : `.${specifier.slice(EVE_PACKAGE_NAME.length)}`;
- try {
- const manifest = JSON.parse(readFileSync(join(packageRoot, "package.json"), "utf8")) as {
- exports?: Record<string, string | Record<string, string>>;
- };
- const declaration = manifest.exports?.[exportKey];
- const target =
- typeof declaration === "string"
- ? declaration
- : (declaration?.["eve-source"] ?? declaration?.import ?? declaration?.default);
- if (target === undefined) return undefined;
- const sourceRelativePath = target
- .replace(/^\.\/dist\/src\//, "src/")
- .replace(/\.[cm]?js$/u, ".ts");
- const sourcePath = join(packageRoot, sourceRelativePath);
- return existsSync(sourcePath) ? sourcePath : undefined;
- } catch {
- return undefined;
- }
+ return require.resolve(specifier);
}
/**
diff --git a/packages/eve/src/internal/authored-module-loader.ts b/packages/eve/src/internal/authored-module-loader.ts
index c55a0159f..0820e6b0d 100644
--- a/packages/eve/src/internal/authored-module-loader.ts
+++ b/packages/eve/src/internal/authored-module-loader.ts
@@ -282,9 +282,7 @@ export async function bundleAuthoredModuleMapForGeneration(input: {
}): Promise<AuthoredModuleMapBundle> {
const packageRoot = resolveAuthoredPackageRoot(input.manifest.agentRoot);
const programmaticLoaderImportSpecifier = resolvePackageSourceFilePath(
- usesDevelopmentExtensionModules(input.manifest)
- ? "src/internal/development-programmatic-source-loader.ts"
- : "src/internal/programmatic-source-loader.ts",
+ "src/internal/programmatic-source-loader.ts",
);
const externalDependencies = normalizeExternalDependencies([
...(input.manifest.config.build?.externalDependencies ?? []),
@@ -359,16 +357,6 @@ export async function bundleAuthoredModuleMapForGeneration(input: {
}
}
-function usesDevelopmentExtensionModules(manifest: CompiledAgentManifest): boolean {
- return [manifest, ...manifest.subagents.map((subagent) => subagent.agent)].some((node) =>
- Object.values(node.bindings).some(
- (binding) =>
- binding.backing.kind === "programmatic" &&
- binding.backing.registryId.startsWith("eve:development-extension:"),
- ),
- );
-}
-
function createExternalRuntimeImportPlugin(importSpecifier: string): Record<string, unknown> {
const normalizedImportSpecifier = normalizeEsmImportSpecifier(importSpecifier);
return {
diff --git a/packages/eve/src/internal/development-programmatic-source-loader.ts b/packages/eve/src/internal/development-programmatic-source-loader.ts
deleted file mode 100644
index 33183ecff..000000000
--- a/packages/eve/src/internal/development-programmatic-source-loader.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import {
- loadProgrammaticModuleNamespace,
- memoizeModuleNamespaceFactories,
- type AgentModuleBacking,
- type ProgrammaticModuleNamespace,
-} from "#compiler/source-graph.js";
-import { getDevelopmentExtensionSourceRegistry } from "#compiler/development-extensions.js";
-import { frameworkAgentSourceRegistry } from "#framework/sources/registry.js";
-
-/** Loads framework and development-extension programmatic modules for local dev maps. */
-export async function loadFrameworkProgrammaticModule(
- backing: Extract<AgentModuleBacking, { readonly kind: "programmatic" }>,
- dependencyNamespaces?: Readonly<Record<string, ProgrammaticModuleNamespace>>,
-): Promise<ProgrammaticModuleNamespace> {
- return memoizeModuleNamespaceFactories(
- await loadProgrammaticModuleNamespace({
- backing,
- dependencyNamespaces,
- registries: [frameworkAgentSourceRegistry, getDevelopmentExtensionSourceRegistry()],
- }),
- );
-}
-
-export { memoizeModuleNamespaceFactories } from "#compiler/source-graph.js";
diff --git a/packages/eve/src/internal/nitro/dev-runtime-artifacts.integration.test.ts b/packages/eve/src/internal/nitro/dev-runtime-artifacts.integration.test.ts
index 47abc3a5c..76377cab2 100644
--- a/packages/eve/src/internal/nitro/dev-runtime-artifacts.integration.test.ts
+++ b/packages/eve/src/internal/nitro/dev-runtime-artifacts.integration.test.ts
@@ -1033,14 +1033,9 @@ describe("development runtime artifact snapshots", () => {
{
agent: {
agentRoot: reviewerRoot,
- appRoot: packageRoot,
+ appRoot: extensionRoot,
extensionMounts: [{ sourceRoot: extensionRoot }],
},
- owner: {
- kind: "extension",
- namespace: "crm",
- packageName: "@acme/crm",
- },
},
],
};
@@ -1062,7 +1057,7 @@ describe("development runtime artifact snapshots", () => {
expect(rewrittenManifest.subagents[0]?.agent).toMatchObject({
agentRoot: join(
- snapshot.runtimeAppRoot,
+ snapshot.snapshotSourceRoot,
"node_modules",
"@acme",
"crm",
@@ -1071,7 +1066,14 @@ describe("development runtime artifact snapshots", () => {
"subagents",
"reviewer",
),
- appRoot: join(snapshot.runtimeAppRoot, "node_modules", "@acme", "crm"),
+ appRoot: join(
+ snapshot.snapshotSourceRoot,
+ "node_modules",
+ "@acme",
+ "crm",
+ "dist",
+ "extension",
+ ),
});
expect(
existsSync(
diff --git a/packages/eve/src/internal/nitro/dev-runtime-artifacts.ts b/packages/eve/src/internal/nitro/dev-runtime-artifacts.ts
index 834c7d34a..c36d59c53 100644
--- a/packages/eve/src/internal/nitro/dev-runtime-artifacts.ts
+++ b/packages/eve/src/internal/nitro/dev-runtime-artifacts.ts
@@ -111,11 +111,6 @@ export async function stageDevelopmentRuntimeArtifactsSnapshot(
);
await rewriteSnapshotCompiledManifest({
appRoot: compileResult.project.appRoot,
- extensionPackageRoots: (compileResult.manifest?.subagents ?? []).flatMap((subagent) =>
- subagent.owner.kind === "extension"
- ? [{ sourceRoot: subagent.agent.appRoot, packageName: subagent.owner.packageName }]
- : [],
- ),
manifestPath: join(
sourceSnapshotPlan.runtimeAppRoot,
".eve",
@@ -434,14 +429,8 @@ function readDevelopmentRuntimeArtifactsPointer(
}
}
-interface ExtensionPackageRoot {
- readonly sourceRoot: string;
- readonly packageName: string;
-}
-
async function rewriteSnapshotCompiledManifest(input: {
readonly appRoot: string;
- readonly extensionPackageRoots: readonly ExtensionPackageRoot[];
readonly manifestPath: string;
readonly runtimeAppRoot: string;
readonly snapshotSourceRoot: string;
@@ -450,7 +439,6 @@ async function rewriteSnapshotCompiledManifest(input: {
const manifest = JSON.parse(await readFile(input.manifestPath, "utf8")) as unknown;
const rewritten = rewriteManifestRoots({
appRoot: input.appRoot,
- extensionPackageRoots: input.extensionPackageRoots,
runtimeAppRoot: input.runtimeAppRoot,
snapshotSourceRoot: input.snapshotSourceRoot,
sourceRoot: input.sourceRoot,
@@ -462,7 +450,6 @@ async function rewriteSnapshotCompiledManifest(input: {
function rewriteManifestRoots(input: {
readonly appRoot: string;
- readonly extensionPackageRoots: readonly ExtensionPackageRoot[];
readonly runtimeAppRoot: string;
readonly snapshotSourceRoot: string;
readonly sourceRoot: string;
@@ -479,20 +466,17 @@ function rewriteManifestRoots(input: {
const rewritten: Record<string, unknown> = {};
for (const [key, value] of Object.entries(input.value)) {
if (typeof value === "string" && (key === "appRoot" || key === "agentRoot")) {
- rewritten[key] =
- isPathInsideOrEqual(value, input.appRoot) ||
- input.extensionPackageRoots.some((root) => isPathInsideOrEqual(value, root.sourceRoot))
- ? rewritePathWithinAppRoot({
- appRoot: input.appRoot,
- extensionPackageRoots: input.extensionPackageRoots,
- path: value,
- runtimeAppRoot: input.runtimeAppRoot,
- })
- : rewritePathWithinSourceRoot({
- path: value,
- snapshotSourceRoot: input.snapshotSourceRoot,
- sourceRoot: input.sourceRoot,
- });
+ rewritten[key] = isPathInsideOrEqual(value, input.appRoot)
+ ? rewritePathWithinAppRoot({
+ appRoot: input.appRoot,
+ path: value,
+ runtimeAppRoot: input.runtimeAppRoot,
+ })
+ : rewritePathWithinSourceRoot({
+ path: value,
+ snapshotSourceRoot: input.snapshotSourceRoot,
+ sourceRoot: input.sourceRoot,
+ });
continue;
}
@@ -507,7 +491,6 @@ function rewriteManifestRoots(input: {
rewritten[key] = rewriteManifestRoots({
appRoot: input.appRoot,
- extensionPackageRoots: input.extensionPackageRoots,
runtimeAppRoot: input.runtimeAppRoot,
snapshotSourceRoot: input.snapshotSourceRoot,
sourceRoot: input.sourceRoot,
@@ -536,24 +519,11 @@ function rewritePathWithinSourceRoot(input: {
function rewritePathWithinAppRoot(input: {
readonly appRoot: string;
- readonly extensionPackageRoots: readonly ExtensionPackageRoot[];
readonly path: string;
readonly runtimeAppRoot: string;
}): string {
if (!isPathInsideOrEqual(input.path, input.appRoot)) {
- // Extension subagents retain package-owned roots at compile time; runtime
- // code is materialized separately, but their metadata must be snapshot-local.
- const extension = input.extensionPackageRoots.find((root) =>
- isPathInsideOrEqual(input.path, root.sourceRoot),
- );
- return extension === undefined
- ? input.path
- : join(
- input.runtimeAppRoot,
- "node_modules",
- extension.packageName,
- relative(extension.sourceRoot, input.path),
- );
+ return input.path;
}
const relativePath = relative(input.appRoot, input.path);
diff --git a/packages/eve/src/internal/nitro/host/dev-authored-rebuild-coordinator.ts b/packages/eve/src/internal/nitro/host/dev-authored-rebuild-coordinator.ts
index 66a2a00e5..e6231cc3d 100644
--- a/packages/eve/src/internal/nitro/host/dev-authored-rebuild-coordinator.ts
+++ b/packages/eve/src/internal/nitro/host/dev-authored-rebuild-coordinator.ts
@@ -6,7 +6,6 @@ import { buildDevelopmentHostCandidate } from "#internal/nitro/host/dev-host-can
import { computeDevelopmentHostFingerprint } from "#internal/nitro/host/dev-host-fingerprint.js";
import { removeDevelopmentHostWorkspace } from "#internal/nitro/host/dev-host-workspace.js";
import { prepareDevelopmentApplicationHost } from "#internal/nitro/host/prepare-application-host.js";
-import type { DevelopmentExtensionSelection } from "#compiler/development-extensions.js";
import { DrainedNitroDevServer } from "#internal/nitro/host/drained-nitro-dev-server.js";
import { usesParentDevelopmentWorkflowWorld } from "#internal/workflow/development-world-protocol.js";
import type { PreparedDevelopmentApplicationHost } from "#internal/nitro/host/types.js";
@@ -56,13 +55,11 @@ export interface DevelopmentAuthoredRebuildCoordinator {
}
export async function createDevelopmentAuthoredRebuildCoordinator(input: {
- readonly developmentExtensions?: DevelopmentExtensionSelection;
readonly devServer: DrainedNitroDevServer;
readonly initialHost: PreparedDevelopmentApplicationHost;
}): Promise<DevelopmentAuthoredRebuildCoordinator> {
return new TransactionalDevelopmentAuthoredRebuildCoordinator({
currentHostFingerprint: await computeDevelopmentHostFingerprint(input.initialHost),
- developmentExtensions: input.developmentExtensions,
currentRuntimeFingerprint: input.initialHost.generation.fingerprint,
devServer: input.devServer,
initialHost: input.initialHost,
@@ -83,20 +80,17 @@ class TransactionalDevelopmentAuthoredRebuildCoordinator implements DevelopmentA
#currentHost: PreparedDevelopmentApplicationHost;
#currentHostFingerprint: string;
#currentRuntimeFingerprint: string;
- readonly #developmentExtensions: DevelopmentExtensionSelection | undefined;
readonly #devServer: DrainedNitroDevServer;
readonly #usesParentWorkflowWorld: boolean;
constructor(input: {
readonly currentHostFingerprint: string;
readonly currentRuntimeFingerprint: string;
- readonly developmentExtensions: DevelopmentExtensionSelection | undefined;
readonly devServer: DrainedNitroDevServer;
readonly initialHost: PreparedDevelopmentApplicationHost;
}) {
this.#currentHost = input.initialHost;
this.#currentHostFingerprint = input.currentHostFingerprint;
- this.#developmentExtensions = input.developmentExtensions;
this.#currentRuntimeFingerprint = input.currentRuntimeFingerprint;
this.#devServer = input.devServer;
this.#usesParentWorkflowWorld = usesParentDevelopmentWorkflowWorld(
@@ -118,7 +112,6 @@ class TransactionalDevelopmentAuthoredRebuildCoordinator implements DevelopmentA
try {
nextHost = await prepareDevelopmentApplicationHost(previousHost.appRoot, {
changedPaths: input.changedPaths,
- developmentExtensions: this.#developmentExtensions,
previousExtensions: previousHost.workspaceExtensions,
});
if (
diff --git a/packages/eve/src/internal/nitro/host/prepare-application-host.scenario.test.ts b/packages/eve/src/internal/nitro/host/prepare-application-host.scenario.test.ts
index a0032aa79..0654328d8 100644
--- a/packages/eve/src/internal/nitro/host/prepare-application-host.scenario.test.ts
+++ b/packages/eve/src/internal/nitro/host/prepare-application-host.scenario.test.ts
@@ -4,8 +4,6 @@ import { join } from "node:path";
import { afterEach, describe, expect, it, vi } from "vitest";
-import { defaultDevelopmentExtensions } from "#compiler/development-extensions.js";
-import { compiledAgentManifestSchema } from "#compiler/manifest.js";
import { normalizeEsmImportSpecifier } from "#internal/application/import-specifier.js";
import {
createApplicationBuildWorkspace,
@@ -79,33 +77,6 @@ describe("application host preparation", () => {
}
});
- it("stages the bundled development extension subagent outside the eve workspace", async () => {
- const { appRoot } = await createAppRoot("eve-bundled-dev-extension-", {
- files: {
- "agent/agent.mjs": 'export default { model: "openai/gpt-5.4" };\n',
- "agent/instructions.md": "Help Alice maintain her agent.",
- },
- packageName: "bundled-dev-extension",
- });
- const host = await prepareDevelopmentApplicationHost(appRoot, {
- developmentExtensions: defaultDevelopmentExtensions(),
- });
- const manifest = compiledAgentManifestSchema.parse(
- JSON.parse(
- await readFile(
- join(host.generation.runtimeAppRoot, ".eve", "compile", "compiled-agent-manifest.json"),
- "utf8",
- ),
- ),
- );
- const subagent = manifest.subagents.find((node) => node.name === "self-modification__agent");
- expect(subagent).toBeDefined();
- expect(subagent!.agent.appRoot).toBe(
- join(host.generation.runtimeAppRoot, "node_modules", "eve"),
- );
- expect(subagent!.agent.agentRoot.startsWith(`${subagent!.agent.appRoot}/`)).toBe(true);
- });
-
it("keeps Nitro host inputs outside retained runtime generations", async () => {
const { agentRoot, appRoot } = await createAppRoot("eve-stable-dev-host-artifacts-", {
files: {
diff --git a/packages/eve/src/internal/nitro/host/prepare-application-host.ts b/packages/eve/src/internal/nitro/host/prepare-application-host.ts
index 8ec7b740a..78c647dda 100644
--- a/packages/eve/src/internal/nitro/host/prepare-application-host.ts
+++ b/packages/eve/src/internal/nitro/host/prepare-application-host.ts
@@ -1,5 +1,4 @@
import { compileAgentInWorkspace, type CompileAgentResult } from "#compiler/compile-agent.js";
-import type { DevelopmentExtensionSelection } from "#compiler/development-extensions.js";
import { createScheduleRegistrations } from "#runtime/schedules/register.js";
import { resolveSchedules } from "#runtime/schedules/resolve-schedule.js";
import type { ResolvedScheduleDefinition } from "#runtime/types.js";
@@ -35,7 +34,6 @@ export async function prepareDevelopmentApplicationHost(
appRoot: string,
options: {
readonly changedPaths?: readonly string[];
- readonly developmentExtensions?: DevelopmentExtensionSelection;
readonly previousExtensions?: readonly DevelopmentWorkspaceExtension[];
} = {},
): Promise<PreparedDevelopmentApplicationHost> {
@@ -60,7 +58,6 @@ export async function prepareDevelopmentApplicationHost(
publishedRoot: join(appRoot, ".eve"),
writeRoot: workspace.compilerArtifactsDir,
},
- developmentExtensions: options.developmentExtensions,
startPath: appRoot,
});
const schedules = await resolveSchedules({ manifest: compileResult.manifest });
diff --git a/packages/eve/src/internal/nitro/host/start-development-server.test.ts b/packages/eve/src/internal/nitro/host/start-development-server.test.ts
index f7a966870..f85213930 100644
--- a/packages/eve/src/internal/nitro/host/start-development-server.test.ts
+++ b/packages/eve/src/internal/nitro/host/start-development-server.test.ts
@@ -392,9 +392,7 @@ describe("createDevelopmentServer", () => {
const server = await startDevelopmentServer("/tmp/eve-test");
- expect(mocks.prepareDevelopmentApplicationHost).toHaveBeenCalledWith("/tmp/eve-test", {
- developmentExtensions: { enabled: ["self-modification"] },
- });
+ expect(mocks.prepareDevelopmentApplicationHost).toHaveBeenCalledWith("/tmp/eve-test");
expect(mocks.startDevelopmentSandboxPrewarmInBackground).toHaveBeenCalledWith({
appRoot: "/tmp/eve-test",
compiledArtifactsSource: {
diff --git a/packages/eve/src/internal/nitro/host/start-development-server.ts b/packages/eve/src/internal/nitro/host/start-development-server.ts
index 3928f8860..a8e366fc7 100644
--- a/packages/eve/src/internal/nitro/host/start-development-server.ts
+++ b/packages/eve/src/internal/nitro/host/start-development-server.ts
@@ -1,6 +1,5 @@
import { handleDevelopmentModelCredentialRequest } from "#internal/model-auth/development-broker-server.js";
import { EVE_DEV_ENV_FLAG } from "#internal/application/optional-package-install.js";
-import { defaultDevelopmentExtensions } from "#compiler/development-extensions.js";
import type { Nitro } from "nitro/types";
@@ -391,17 +390,13 @@ async function startNitroDevelopmentServer(
// optional sandbox engine packages) can gate on it.
process.env[EVE_DEV_ENV_FLAG] ??= "1";
- const developmentExtensions = options.developmentExtensions ?? defaultDevelopmentExtensions();
const project = await resolveDiscoveryProject(rootDir);
await loadDevelopmentEnvironmentFiles(project.appRoot);
const environmentPort = readEnvironmentPort();
const requestedPort = options.port ?? environmentPort;
- const hasExplicitServerConfiguration =
- options.developmentExtensions !== undefined ||
- options.host !== undefined ||
- options.port !== undefined ||
- environmentPort !== undefined;
+ const hasExplicitEndpoint =
+ options.host !== undefined || options.port !== undefined || environmentPort !== undefined;
const state = new DevelopmentServerState(project);
const existingServerUrl = await state.read();
@@ -410,7 +405,7 @@ async function startNitroDevelopmentServer(
isLoopbackServerUrl(existingServerUrl) &&
(await isDevelopmentServerReady(existingServerUrl))
) {
- if (options.existing === "attach-if-unconfigured" && !hasExplicitServerConfiguration) {
+ if (options.existing === "attach-if-unconfigured" && !hasExplicitEndpoint) {
return {
handle: { kind: "existing", appRoot: project.appRoot, url: existingServerUrl },
close: undefined,
@@ -436,7 +431,7 @@ async function startNitroDevelopmentServer(
try {
const preparedHost = await devBootPhase(
"compiling agent",
- () => prepareDevelopmentApplicationHost(project.appRoot, { developmentExtensions }),
+ () => prepareDevelopmentApplicationHost(project.appRoot),
options.onBootProgress,
);
preparedDevelopmentHost = preparedHost;
@@ -537,7 +532,6 @@ async function startNitroDevelopmentServer(
await workflowWorld?.start();
const rebuildCoordinator = await createDevelopmentAuthoredRebuildCoordinator({
- developmentExtensions,
devServer: activeDevServer,
initialHost: preparedHost,
});
diff --git a/packages/eve/src/internal/nitro/host/types.ts b/packages/eve/src/internal/nitro/host/types.ts
index 7fa91842d..9290eeb3c 100644
--- a/packages/eve/src/internal/nitro/host/types.ts
+++ b/packages/eve/src/internal/nitro/host/types.ts
@@ -3,7 +3,6 @@ import type { ScheduleRegistration } from "#runtime/schedules/register.js";
import type { ResolvedScheduleDefinition } from "#runtime/types.js";
import type { GeneratedCompiledArtifactsFiles } from "#internal/application/compiled-artifacts.js";
import type { DevBootProgressReporter } from "#internal/dev-boot-progress.js";
-import type { DevelopmentExtensionSelection } from "#compiler/development-extensions.js";
import type { DevelopmentGeneration } from "#internal/nitro/development-generation.js";
import type { DevelopmentHostWorkspace } from "#internal/nitro/host/dev-host-workspace.js";
import type { DevelopmentWorkspaceExtension } from "#internal/nitro/host/dev-workspace-extensions.js";
@@ -63,8 +62,6 @@ export interface DevelopmentServer<H extends DevelopmentServerHandle = Developme
}
export interface DevelopmentServerOptions {
- /** Development-only source extensions. Defaults to the framework catalog. */
- readonly developmentExtensions?: DevelopmentExtensionSelection;
readonly existing?: "attach-if-unconfigured" | "reject";
readonly host?: string;
readonly onBootProgress?: DevBootProgressReporter;
diff --git a/packages/eve/src/self-modification/extension/subagents/agent/instructions.test.ts b/packages/eve/src/self-modification/extension/subagents/agent/instructions.test.ts
deleted file mode 100644
index 8b8d7a088..000000000
--- a/packages/eve/src/self-modification/extension/subagents/agent/instructions.test.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { describe, expect, it } from "vitest";
-
-import instructions from "./instructions.js";
-
-describe("self-modification subagent instructions", () => {
- it("handles a bundled mount that is not visible until the next turn", () => {
- const originalEveDev = process.env.EVE_DEV;
- process.env.EVE_DEV = "1";
- try {
- const resolved = instructions.events["session.started"]?.({ data: {} }, {} as never);
-
- expect(resolved).toMatchObject({
- markdown: expect.stringContaining(
- "first call registry_add with the exact address eve/self-modification",
- ),
- });
- expect(resolved).toMatchObject({
- markdown: expect.stringContaining("Check /source/extensions/self-modification.ts"),
- });
- } finally {
- if (originalEveDev === undefined) delete process.env.EVE_DEV;
- else process.env.EVE_DEV = originalEveDev;
- }
- });
-});
diff --git a/packages/eve/src/self-modification/extension/subagents/agent/instructions.ts b/packages/eve/src/self-modification/extension/subagents/agent/instructions.ts
index 57a5806aa..ee0323b15 100644
--- a/packages/eve/src/self-modification/extension/subagents/agent/instructions.ts
+++ b/packages/eve/src/self-modification/extension/subagents/agent/instructions.ts
@@ -73,11 +73,14 @@ The configured target branch is checked out as a disposable workspace under /wor
Complete all edits and registry installations before publication, and call publish by itself. Before publication, review and summarize the complete intended scope. Call publish once with a concise title and summary. A successful result is only a draft pull request. Return its URL and changed paths, and state that merge and deployment have not occurred.`;
-const packagedSubagentGuidance = `## Configure this subagent
+function packagedSubagentGuidance(event: unknown): string {
+ const invocation = (
+ event as { readonly data?: { readonly invocation?: { readonly kind?: string } } }
+ ).data?.invocation;
+ if (invocation?.kind !== "subagent") return "";
-Configure this self-modification subagent's model, reasoning, and policy only through its authored mount. Check /source/extensions/self-modification.ts and /source/extensions/self-modification/extension.ts; modify whichever exists. If neither file exists, this subagent is the bundled eve development default and is using the default settings: first call registry_add with the exact address eve/self-modification to scaffold the authored mount. This known scaffold does not require search_registry.
-
-After registry_add reports successful installation, try to read /source/extensions/self-modification.ts and /source/extensions/self-modification/extension.ts. If either is available, modify it. If neither is yet available, you may need to wait for the next turn, by asking the requester to confirm.`;
+ return "This self-modification subagent is implemented by the eve package, not an authored directory under /source. Configure its model, reasoning, and policy in /source/extensions/self-modification/extension.ts; do not search for or edit a child implementation directory.";
+}
function readTrace(
event: unknown,
@@ -114,7 +117,7 @@ export default defineDynamic({
markdown: renderInstructions([
role,
sourceWorkspace,
- packagedSubagentGuidance,
+ packagedSubagentGuidance(event),
sourceEditing,
toolAuthoring,
registryWorkflow,
diff --git a/packages/eve/src/self-modification/package-consumption.scenario.test.ts b/packages/eve/src/self-modification/package-consumption.scenario.test.ts
index 4f9e451b0..cff220d9e 100644
--- a/packages/eve/src/self-modification/package-consumption.scenario.test.ts
+++ b/packages/eve/src/self-modification/package-consumption.scenario.test.ts
@@ -143,22 +143,6 @@ describe("packed package consumption", () => {
appRoot,
);
await access(join(appRoot, "node_modules/eve/dist/src/self-modification/agent.js"));
- await writeAppFile(
- appRoot,
- "verify-development-extension.mjs",
- `import { defaultDevelopmentExtensions } from "./node_modules/eve/dist/src/compiler/development-extensions.js";
-import { compileAgentManifest } from "./node_modules/eve/dist/src/compiler/normalize-manifest.js";
-import { createAgentSourceManifest } from "./node_modules/eve/dist/src/discover/manifest.js";
-
-const manifest = createAgentSourceManifest({ agentId: "packed-dev", agentRoot: "/virtual/agent", appRoot: "/virtual" });
-const compiled = await compileAgentManifest(manifest, { developmentExtensions: defaultDevelopmentExtensions() });
-const subagent = compiled.subagents.find((entry) => entry.name === "self-modification__agent");
-if (compiled.subagents.length !== 1 || subagent === undefined || !subagent.agent.tools.some((tool) => tool.name === "edit_file")) {
- throw new Error("Packed eve did not discover the bundled self-modification extension.");
-}
-`,
- );
- await run("node", ["verify-development-extension.mjs"], appRoot);
const build = await run("pnpm", ["build"], appRoot);
const output = `${build.stdout}\n${build.stderr}`;
if (output.includes("Could not resolve '#shared/")) {
diff --git a/packages/eve/test/scenarios/app-runtime-dependencies.scenario.test.ts b/packages/eve/test/scenarios/app-runtime-dependencies.scenario.test.ts
index 1415e6d72..be6e66c03 100644
--- a/packages/eve/test/scenarios/app-runtime-dependencies.scenario.test.ts
+++ b/packages/eve/test/scenarios/app-runtime-dependencies.scenario.test.ts
@@ -859,20 +859,6 @@ describe("app runtime dependency tracing", () => {
// `DataDirAccessError`, and @workflow/core's runtime world factory
// (stubbed out at vendor time) names `WORKFLOW_LOCAL_DATA_DIR`.
expect(vercelFunctionsSource).not.toContain("[world-local]");
-
- vi.stubEnv("VERCEL_DEPLOYMENT_ID", "dpl_hosted_no_dev_runtime_test");
- const serverModule = (await import(
- `${pathToFileURL(join(outputDir, "functions", "__server.func", "index.mjs")).href}?test=${Date.now()}`
- )) as {
- default: {
- fetch(request: Request, context: { waitUntil(): void }): Promise<Response>;
- };
- };
- const healthResponse = await serverModule.default.fetch(
- new Request("https://example.com/eve/v1/health"),
- { waitUntil() {} },
- );
- expect(healthResponse.status).toBe(200);
}, 30_000);
it("loads instrumentation runtime dependencies from hosted Vercel output", async () => {
diff --git a/packages/eve/test/scenarios/dev-server-bun.scenario.test.ts b/packages/eve/test/scenarios/dev-server-bun.scenario.test.ts
index 84179a6b8..7cd0cf632 100644
--- a/packages/eve/test/scenarios/dev-server-bun.scenario.test.ts
+++ b/packages/eve/test/scenarios/dev-server-bun.scenario.test.ts
@@ -71,10 +71,7 @@ describe("eve dev server with bun", () => {
async () => {
const app = await scenarioApp(BUN_LAYOUT_DESCRIPTOR);
- const result = await runEveDevToExit(app.appRoot, {
- defaultExtensions: false,
- runtime: "bun",
- });
+ const result = await runEveDevToExit(app.appRoot, { runtime: "bun" });
expect(result.code).not.toBe(0);
expect(result.output).toContain("failed before readiness");
diff --git a/packages/eve/test/scenarios/dev-server-harness.ts b/packages/eve/test/scenarios/dev-server-harness.ts
index 0b49ac84f..336093102 100644
--- a/packages/eve/test/scenarios/dev-server-harness.ts
+++ b/packages/eve/test/scenarios/dev-server-harness.ts
@@ -32,7 +32,6 @@ export interface RunningEveDev {
}
export interface StartEveDevOptions {
- readonly defaultExtensions?: boolean;
readonly env?: Readonly<Record<string, string | undefined>>;
/** Runtime executing the CLI. Defaults to the current Node executable. */
readonly runtime?: "bun" | "node";
@@ -221,10 +220,7 @@ function spawnEveDev(
const eveBinPath = join(appRoot, "node_modules", "eve", "bin", "eve.js");
const command = options.runtime === "bun" ? "bun" : process.execPath;
- const args = [eveBinPath, "dev", "--no-ui", "--host", "127.0.0.1", "--port", "0"];
- if (options.defaultExtensions === false) args.push("--no-default-extensions");
-
- return spawn(command, args, {
+ return spawn(command, [eveBinPath, "dev", "--no-ui", "--host", "127.0.0.1", "--port", "0"], {
cwd: appRoot,
env: {
...process.env,