Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

feat(eve): mounted extensions (#470)

Casey Gowriefdf56efbdfca
diff --git a/.changeset/mounted-extensions.md b/.changeset/mounted-extensions.md
new file mode 100644
index 000000000..75b44ef4e
--- /dev/null
+++ b/.changeset/mounted-extensions.md
@@ -0,0 +1,7 @@
+---
+"eve": patch
+---
+
+feat(eve): mounted extensions
+
+Package eve capabilities — tools, connections, skills, instructions, hooks — as a reusable package and mount it under `agent/extensions/`, as a file (`crm.ts`) or a directory with co-located override slots that shadow the extension's own contributions. Contributions compose into the agent under a `<namespace>__` prefix. Author with `defineExtension` from `eve/extension`, taking an optional Standard-Schema `config` read via `extension.config`; `defineState` is auto-scoped to the package. `eve build` compiles the package to runnable JavaScript with type declarations and fills its `exports`, so a published extension installs and mounts with no second compiler. `eve` is a peer dependency whose declared range eve enforces at mount; an extension cannot declare a sandbox, agent config, schedules, or limits, or mount other extensions.
diff --git a/docs/extensions.md b/docs/extensions.md
new file mode 100644
index 000000000..070a340ce
--- /dev/null
+++ b/docs/extensions.md
@@ -0,0 +1,140 @@
+---
+title: "Extensions"
+description: "Package tools, connections, skills, and hooks as a reusable package and mount it into an agent."
+---
+
+An extension packages eve capabilities — tools, connections, skills, instructions, hooks — as a reusable npm or local package. You author it as an agent-shaped directory; a consuming agent mounts it under `agent/extensions/`, and its contributions compose into the agent under a namespace. Nothing is copied — upgrades come through the package manager.
+
+## Authoring
+
+An extension is an agent-shaped directory without `agent.ts` or `sandbox` (those belong to the consuming agent). Every slot works as it does in an agent, with names derived from paths.
+
+```
+@acme/crm/
+ package.json
+ ext/
+ extension.ts # the extension declaration — see Configuration
+ tools/search.ts
+ connections/api.ts
+ skills/triage/SKILL.md
+ hooks/audit.ts
+ lib/http.ts # shared helpers, imported as ../lib/http.js
+```
+
+Name tools and connections for what they do (`search`, not `crm_search`) — the mount supplies the namespace. Shared code goes in `ext/lib/`, imported by relative path.
+
+### Configuration
+
+Declare the extension in `ext/extension.ts` with `defineExtension`; its default export is the mount factory a consumer calls. Pass `config` — any [Standard Schema](https://standardschema.dev) (a Zod object here), like a tool's `inputSchema` — to accept consumer settings:
+
+```ts title="ext/extension.ts"
+import { defineExtension } from "eve/extension";
+import { z } from "zod";
+
+export default defineExtension({
+ config: z.object({
+ apiKey: z.string(),
+ baseUrl: z.string().default("https://api.acme.example"),
+ }),
+});
+```
+
+Config is optional — `defineExtension()` with no schema. Read it off the handle, imported from the declaration; it's typed from the schema:
+
+```ts title="ext/tools/search.ts"
+import { defineTool } from "eve/tools";
+
+import extension from "../extension.js";
+
+export default defineTool({
+ description: "Search the CRM.",
+ inputSchema: {
+ /* ... */
+ },
+ async execute({ query }) {
+ const { apiKey, baseUrl } = extension.config; // validated, defaults applied
+ },
+});
+```
+
+Config is bound once when the consumer mounts the extension and stays constant for the session; per-request values belong in connection auth instead.
+
+### State
+
+`defineState` is scoped to the extension's package automatically, so identically-named state never collides with the consuming agent or another extension. Author it exactly as in an agent — `defineState("budget", …)`.
+
+## Publishing
+
+Point `eve.extension` at the source directory and run `eve build` (wired to `build`/`prepare`):
+
+```jsonc title="package.json"
+{
+ "name": "@acme/crm",
+ "type": "module",
+ "eve": { "extension": "./ext" },
+ "files": ["ext", "dist"],
+ "peerDependencies": { "eve": "^x" },
+ "dependencies": { "zod": "^3" },
+ "scripts": { "build": "eve build", "prepare": "eve build" },
+}
+```
+
+`eve build` compiles the package's entry points to plain JavaScript with type declarations — the mount factory (`dist/index.mjs`) and the tool re-exports overrides use (`dist/tools`) — and fills the `exports` map so you never hand-list it. Compiling is what lets an installed extension load directly; local and workspace packages also work without publishing.
+
+### Dependencies
+
+`eve` is a **peer** dependency: one eve lives in the consuming app and the extension's `eve/*` imports resolve to it. Declare the eve versions your extension supports as the peer range (`"eve": "^1"`) — eve enforces it when the extension is mounted, failing the build with a clear error if the app's eve is out of range, rather than surfacing a confusing compile break. Everything else the extension imports (SDKs, `zod`, …) goes in `dependencies`; each extension resolves its own versions. The consumer recompiles the extension's contributions from source, so `files` must ship both `ext/` (that source) and `dist/` (the compiled entry points).
+
+Those deps resolve from `node_modules` under `eve dev`/`eve eval` and are bundled into the deployable by `eve build`. A dependency that can't be bundled (a native addon) must be listed in the **consuming agent's** `build.externalDependencies` — an extension can't declare build config, so note it in your README.
+
+## Mounting
+
+A consuming agent mounts an extension under `agent/extensions/` — a single file, or a directory when it needs [overrides](#overrides). The namespace is the file basename or directory name; contributions compose as `<namespace>__<name>` (`crm__search`, `crm__api`).
+
+```ts title="agent/extensions/crm.ts"
+import crm from "@acme/crm";
+
+export default crm({ apiKey: process.env.CRM_API_KEY });
+```
+
+A no-config extension takes no factory call — mount it with a bare re-export:
+
+```ts title="agent/extensions/gizmo.ts"
+export { default } from "@acme/gizmo";
+```
+
+### Overrides
+
+To override a mounted extension's contributions, author the mount as a directory: the declaration in `extension.ts`, override slots alongside it.
+
+```
+agent/extensions/crm/
+ extension.ts # export default crm({ apiKey: process.env.CRM_API_KEY })
+ tools/search.ts # composes as crm__search, shadowing the extension's own
+```
+
+A file in an override slot composes under the mount namespace and wins on a name collision. Name it for the bare contribution name (`search`, not `crm__search`) — the directory supplies the prefix. To tweak the extension's own definition, import and re-define it:
+
+```ts title="agent/extensions/crm/tools/search.ts"
+import { search } from "@acme/crm/tools";
+import { defineTool } from "eve/tools";
+import { always } from "eve/tools/approval";
+
+export default defineTool({ ...search, approval: always() });
+```
+
+Or drop it entirely by opting out of the slot with `disableTool()`:
+
+```ts title="agent/extensions/crm/tools/search.ts"
+import { disableTool } from "eve/tools";
+
+export default disableTool();
+```
+
+An override targets one slot, matched by name and kind: a static file replaces the extension's static tool, a dynamic file replaces its dynamic resolver, and `disableTool()` removes whichever the extension put there. Because a dynamic tool wins over a same-named static one at runtime, replace or disable a dynamic tool through its own slot — a static file of the same name won't shadow it.
+
+Overrides only work here — the `<namespace>__` prefix is reserved, so an agent-root contribution named `crm__…` is a build error and an extension can't be shadowed from outside its mount.
+
+## Limits
+
+An extension cannot declare a `sandbox`, agent config, schedules, or limits, and cannot mount other extensions — those are the consuming agent's to own (background scheduling, for instance, runs on the agent's deployment under its limits). An extension's tools run within the consuming agent's per-session limits.
diff --git a/docs/meta.json b/docs/meta.json
index 56ac2a2f0..245bc770d 100644
--- a/docs/meta.json
+++ b/docs/meta.json
@@ -12,6 +12,7 @@
"sandbox",
"subagents",
"schedules",
+ "extensions",
"evals",
"---",
"guides",
diff --git a/e2e/fixtures/extensions/.gitignore b/e2e/fixtures/extensions/.gitignore
new file mode 100644
index 000000000..4301967e4
--- /dev/null
+++ b/e2e/fixtures/extensions/.gitignore
@@ -0,0 +1,11 @@
+node_modules
+.env*
+.eve
+.vercel
+.workflow-data
+.next
+.output
+.nitro
+dist
+.DS_Store
+*.tsbuildinfo
diff --git a/e2e/fixtures/extensions/.vercelignore b/e2e/fixtures/extensions/.vercelignore
new file mode 100644
index 000000000..357664320
--- /dev/null
+++ b/e2e/fixtures/extensions/.vercelignore
@@ -0,0 +1,6 @@
+node_modules
+.eve
+.next
+.output
+.nitro
+dist
diff --git a/e2e/fixtures/extensions/agent/agent.ts b/e2e/fixtures/extensions/agent/agent.ts
new file mode 100644
index 000000000..dc6d957f5
--- /dev/null
+++ b/e2e/fixtures/extensions/agent/agent.ts
@@ -0,0 +1,6 @@
+import { defineAgent } from "eve";
+
+export default defineAgent({
+ model: "anthropic/claude-sonnet-5",
+ reasoning: "high",
+});
diff --git a/e2e/fixtures/extensions/agent/extensions/gizmo.ts b/e2e/fixtures/extensions/agent/extensions/gizmo.ts
new file mode 100644
index 000000000..14d28d238
--- /dev/null
+++ b/e2e/fixtures/extensions/agent/extensions/gizmo.ts
@@ -0,0 +1,2 @@
+// No config: mounted with a bare re-export.
+export { default } from "gizmo-extension";
diff --git a/e2e/fixtures/extensions/agent/extensions/toolkit/extension.ts b/e2e/fixtures/extensions/agent/extensions/toolkit/extension.ts
new file mode 100644
index 000000000..494af088e
--- /dev/null
+++ b/e2e/fixtures/extensions/agent/extensions/toolkit/extension.ts
@@ -0,0 +1,3 @@
+import toolkit from "toolkit-extension";
+
+export default toolkit({ apiKey: "sk-e2e-toolkit", tier: "pro" });
diff --git a/e2e/fixtures/extensions/agent/extensions/toolkit/tools/toolkit_ping.ts b/e2e/fixtures/extensions/agent/extensions/toolkit/tools/toolkit_ping.ts
new file mode 100644
index 000000000..f86a8e17b
--- /dev/null
+++ b/e2e/fixtures/extensions/agent/extensions/toolkit/tools/toolkit_ping.ts
@@ -0,0 +1,11 @@
+import { defineTool } from "eve/tools";
+import { z } from "zod";
+
+// Co-located override: shadows the extension's own same-named toolkit_ping.
+export default defineTool({
+ description: "Ping the toolkit extension. Call when asked to ping toolkit. (Consumer override.)",
+ inputSchema: z.object({}),
+ async execute() {
+ return { reply: "consumer-override-ping" };
+ },
+});
diff --git a/e2e/fixtures/extensions/agent/instructions.md b/e2e/fixtures/extensions/agent/instructions.md
new file mode 100644
index 000000000..080707e25
--- /dev/null
+++ b/e2e/fixtures/extensions/agent/instructions.md
@@ -0,0 +1,2 @@
+You are a precise test agent. Use the tools you are given. When asked to call a
+specific tool by name, call exactly that tool and report its output verbatim.
diff --git a/e2e/fixtures/extensions/agent/skills/local-guide/SKILL.md b/e2e/fixtures/extensions/agent/skills/local-guide/SKILL.md
new file mode 100644
index 000000000..e6d87dfab
--- /dev/null
+++ b/e2e/fixtures/extensions/agent/skills/local-guide/SKILL.md
@@ -0,0 +1,7 @@
+---
+description: The consuming agent's own guide skill.
+---
+
+# Local guide
+
+This skill belongs to the consuming agent, alongside any mounted extension skills.
diff --git a/e2e/fixtures/extensions/agent/tools/local_ping.ts b/e2e/fixtures/extensions/agent/tools/local_ping.ts
new file mode 100644
index 000000000..ad7efbd11
--- /dev/null
+++ b/e2e/fixtures/extensions/agent/tools/local_ping.ts
@@ -0,0 +1,10 @@
+import { defineTool } from "eve/tools";
+import { z } from "zod";
+
+export default defineTool({
+ description: "The consuming agent's own ping tool. Call when asked to ping local.",
+ inputSchema: z.object({}),
+ async execute() {
+ return { reply: "local-ping" };
+ },
+});
diff --git a/e2e/fixtures/extensions/evals/config-binding.eval.ts b/e2e/fixtures/extensions/evals/config-binding.eval.ts
new file mode 100644
index 000000000..fd19a4bed
--- /dev/null
+++ b/e2e/fixtures/extensions/evals/config-binding.eval.ts
@@ -0,0 +1,15 @@
+import { defineEval } from "eve/evals";
+
+export default defineEval({
+ description: "Mounted extension tool returns the config bound at the mount site.",
+ async test(t) {
+ await t.send(
+ "Call the `toolkit__toolkit_lookup` tool with account 'acme' and report exactly what it returned.",
+ );
+
+ t.succeeded();
+ t.calledTool("toolkit__toolkit_lookup", {
+ output: { account: "acme", apiKey: "sk-e2e-toolkit", tier: "pro" },
+ });
+ },
+});
diff --git a/e2e/fixtures/extensions/evals/dynamic-capability.eval.ts b/e2e/fixtures/extensions/evals/dynamic-capability.eval.ts
new file mode 100644
index 000000000..d25f0ec5f
--- /dev/null
+++ b/e2e/fixtures/extensions/evals/dynamic-capability.eval.ts
@@ -0,0 +1,14 @@
+import { defineEval } from "eve/evals";
+
+// Token built by the extension's shared `ext/lib/brand` stamp() helper.
+const TOOLKIT_FORECAST_TOKEN = "toolkit-forecast-ok-9F4Q";
+
+export default defineEval({
+ description: "Dynamic tool authored inside an extension resolves and runs when mounted.",
+ async test(t) {
+ await t.send("Call the `toolkit__toolkit_forecast` tool and report the token it returned.");
+
+ t.succeeded();
+ t.calledTool("toolkit__toolkit_forecast", { output: { token: TOOLKIT_FORECAST_TOKEN } });
+ },
+});
diff --git a/e2e/fixtures/extensions/evals/dynamic-skill.eval.ts b/e2e/fixtures/extensions/evals/dynamic-skill.eval.ts
new file mode 100644
index 000000000..2869ccfa6
--- /dev/null
+++ b/e2e/fixtures/extensions/evals/dynamic-skill.eval.ts
@@ -0,0 +1,23 @@
+import { defineEval } from "eve/evals";
+
+const TOOLKIT_INCIDENT_TOKEN = "toolkit-incident-dynamic-ok-7T2X";
+
+/**
+ * A map-produced dynamic skill authored in an extension must be namespaced by
+ * the mount (`toolkit__incident`), not exposed under its bare map key
+ * (`incident`). Loading it by the namespaced name proves the mount prefix
+ * reaches map entries the way it already does for the extension's static and
+ * dynamic tools.
+ */
+export default defineEval({
+ description: "Map-produced dynamic skill from an extension is namespaced (toolkit__incident).",
+ async test(t) {
+ await t.send(
+ "Please use the toolkit incident playbook skill and follow its instructions exactly.",
+ );
+
+ t.succeeded();
+ t.loadedSkill("toolkit__incident", { output: new RegExp(TOOLKIT_INCIDENT_TOKEN, "u") });
+ t.messageIncludes(TOOLKIT_INCIDENT_TOKEN);
+ },
+});
diff --git a/e2e/fixtures/extensions/evals/evals.config.ts b/e2e/fixtures/extensions/evals/evals.config.ts
new file mode 100644
index 000000000..8102d33af
--- /dev/null
+++ b/e2e/fixtures/extensions/evals/evals.config.ts
@@ -0,0 +1,5 @@
+import { defineEvalConfig } from "eve/evals";
+
+export default defineEvalConfig({
+ judge: { model: "openai/gpt-5.5" },
+});
diff --git a/e2e/fixtures/extensions/evals/mixed.eval.ts b/e2e/fixtures/extensions/evals/mixed.eval.ts
new file mode 100644
index 000000000..8a128db37
--- /dev/null
+++ b/e2e/fixtures/extensions/evals/mixed.eval.ts
@@ -0,0 +1,16 @@
+import { defineEval } from "eve/evals";
+
+export default defineEval({
+ description: "Consumer-authored and mounted-extension tools coexist and both run in one turn.",
+ async test(t) {
+ await t.send(
+ "First call `local_ping`, then call `gizmo__gizmo_search` with query 'eve'. Report both outputs.",
+ );
+
+ t.succeeded();
+ t.calledTool("local_ping", { output: { reply: "local-ping" } });
+ t.calledTool("gizmo__gizmo_search", {
+ output: { query: "eve", result: "gizmo-result-for:eve" },
+ });
+ },
+});
diff --git a/e2e/fixtures/extensions/evals/override.eval.ts b/e2e/fixtures/extensions/evals/override.eval.ts
new file mode 100644
index 000000000..aa40c8f05
--- /dev/null
+++ b/e2e/fixtures/extensions/evals/override.eval.ts
@@ -0,0 +1,11 @@
+import { defineEval } from "eve/evals";
+
+export default defineEval({
+ description: "A directory-mount override shadows a mounted extension tool of the same name.",
+ async test(t) {
+ await t.send("Call the `toolkit__toolkit_ping` tool and report exactly what it returned.");
+
+ t.succeeded();
+ t.calledTool("toolkit__toolkit_ping", { output: { reply: "consumer-override-ping" } });
+ },
+});
diff --git a/e2e/fixtures/extensions/evals/state-isolation.eval.ts b/e2e/fixtures/extensions/evals/state-isolation.eval.ts
new file mode 100644
index 000000000..21e40c867
--- /dev/null
+++ b/e2e/fixtures/extensions/evals/state-isolation.eval.ts
@@ -0,0 +1,16 @@
+import { defineEval } from "eve/evals";
+
+// Both extensions author defineState("budget"). If package scoping regressed,
+// the counters would collapse onto one slot and gizmo would read 3, not 1.
+export default defineEval({
+ description: "Two extensions' identically-named defineState do not collide within a session.",
+ async test(t) {
+ await t.send(
+ "Bump the toolkit budget twice by calling `toolkit__toolkit_budget` two times, then bump the gizmo budget once by calling `gizmo__gizmo_budget`. Report each tool's returned count.",
+ );
+
+ t.succeeded();
+ t.calledTool("toolkit__toolkit_budget", { output: { scope: "toolkit", count: 2 } });
+ t.calledTool("gizmo__gizmo_budget", { output: { scope: "gizmo", count: 1 } });
+ },
+});
diff --git a/e2e/fixtures/extensions/package.json b/e2e/fixtures/extensions/package.json
new file mode 100644
index 000000000..afb8f77e6
--- /dev/null
+++ b/e2e/fixtures/extensions/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "extensions",
+ "version": "0.0.0",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "build": "eve build",
+ "dev": "eve dev",
+ "start": "eve start",
+ "typecheck": "eve build && tsc",
+ "test:e2e": "eve eval --strict"
+ },
+ "dependencies": {
+ "eve": "workspace:*",
+ "gizmo-extension": "workspace:*",
+ "toolkit-extension": "workspace:*",
+ "zod": "catalog:"
+ },
+ "devDependencies": {
+ "@types/node": "catalog:",
+ "typescript": "catalog:"
+ }
+}
diff --git a/e2e/fixtures/extensions/tsconfig.json b/e2e/fixtures/extensions/tsconfig.json
new file mode 100644
index 000000000..66f5b1ea5
--- /dev/null
+++ b/e2e/fixtures/extensions/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext",
+ "outDir": "dist",
+ "rootDir": ".",
+ "strict": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "forceConsistentCasingInFileNames": true,
+ "declaration": true,
+ "noEmit": true,
+ "types": ["node"]
+ },
+ "include": ["agent/**/*.ts", "evals/**/*.ts", ".eve/**/*.d.ts"]
+}
diff --git a/e2e/fixtures/gizmo-extension/.gitignore b/e2e/fixtures/gizmo-extension/.gitignore
new file mode 100644
index 000000000..34cde962a
--- /dev/null
+++ b/e2e/fixtures/gizmo-extension/.gitignore
@@ -0,0 +1,6 @@
+node_modules
+.env*
+.eve
+dist
+*.tsbuildinfo
+.DS_Store
diff --git a/e2e/fixtures/gizmo-extension/ext/extension.ts b/e2e/fixtures/gizmo-extension/ext/extension.ts
new file mode 100644
index 000000000..c00f77bb7
--- /dev/null
+++ b/e2e/fixtures/gizmo-extension/ext/extension.ts
@@ -0,0 +1,5 @@
+import { defineExtension } from "eve/extension";
+
+// No consumer config, so a bare defineExtension() — consumers mount it with a
+// bare re-export.
+export default defineExtension();
diff --git a/e2e/fixtures/gizmo-extension/ext/tools/gizmo_budget.ts b/e2e/fixtures/gizmo-extension/ext/tools/gizmo_budget.ts
new file mode 100644
index 000000000..3dd9d1994
--- /dev/null
+++ b/e2e/fixtures/gizmo-extension/ext/tools/gizmo_budget.ts
@@ -0,0 +1,17 @@
+import { defineState } from "eve/context";
+import { defineTool } from "eve/tools";
+import { z } from "zod";
+
+// Same bare "budget" name as toolkit-extension; eve scopes each per package so
+// the counters stay independent.
+const budget = defineState("budget", () => ({ count: 0 }));
+
+export default defineTool({
+ description:
+ "Increment and read the gizmo budget counter. Call when asked to bump the gizmo budget.",
+ inputSchema: z.object({}),
+ async execute() {
+ budget.update((state) => ({ count: state.count + 1 }));
+ return { scope: "gizmo", count: budget.get().count };
+ },
+});
diff --git a/e2e/fixtures/gizmo-extension/ext/tools/gizmo_search.ts b/e2e/fixtures/gizmo-extension/ext/tools/gizmo_search.ts
new file mode 100644
index 000000000..c9e94620d
--- /dev/null
+++ b/e2e/fixtures/gizmo-extension/ext/tools/gizmo_search.ts
@@ -0,0 +1,11 @@
+import { defineTool } from "eve/tools";
+import { z } from "zod";
+
+export default defineTool({
+ description:
+ "Search with gizmo. Returns a deterministic fixture result. Call when asked to search.",
+ inputSchema: z.object({ query: z.string() }),
+ async execute({ query }) {
+ return { query, result: `gizmo-result-for:${query}` };
+ },
+});
diff --git a/e2e/fixtures/gizmo-extension/package.json b/e2e/fixtures/gizmo-extension/package.json
new file mode 100644
index 000000000..d5c44cc14
--- /dev/null
+++ b/e2e/fixtures/gizmo-extension/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "gizmo-extension",
+ "version": "0.0.0",
+ "private": true,
+ "type": "module",
+ "exports": {
+ ".": "./ext/extension.ts"
+ },
+ "dependencies": {
+ "zod": "catalog:"
+ },
+ "devDependencies": {
+ "@types/node": "catalog:",
+ "typescript": "catalog:"
+ },
+ "peerDependencies": {
+ "eve": "workspace:*"
+ },
+ "eve": {
+ "extension": "./ext"
+ }
+}
diff --git a/e2e/fixtures/gizmo-extension/tsconfig.json b/e2e/fixtures/gizmo-extension/tsconfig.json
new file mode 100644
index 000000000..96effa1f6
--- /dev/null
+++ b/e2e/fixtures/gizmo-extension/tsconfig.json
@@ -0,0 +1,16 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext",
+ "outDir": "dist",
+ "rootDir": ".",
+ "strict": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "forceConsistentCasingInFileNames": true,
+ "noEmit": true,
+ "types": ["node"]
+ },
+ "include": ["ext/**/*.ts"]
+}
diff --git a/e2e/fixtures/toolkit-extension/.gitignore b/e2e/fixtures/toolkit-extension/.gitignore
new file mode 100644
index 000000000..34cde962a
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/.gitignore
@@ -0,0 +1,6 @@
+node_modules
+.env*
+.eve
+dist
+*.tsbuildinfo
+.DS_Store
diff --git a/e2e/fixtures/toolkit-extension/ext/extension.ts b/e2e/fixtures/toolkit-extension/ext/extension.ts
new file mode 100644
index 000000000..7bef339a3
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/ext/extension.ts
@@ -0,0 +1,9 @@
+import { defineExtension } from "eve/extension";
+import { z } from "zod";
+
+export default defineExtension({
+ config: z.object({
+ apiKey: z.string(),
+ tier: z.string().default("free"),
+ }),
+});
diff --git a/e2e/fixtures/toolkit-extension/ext/instructions/policy.md b/e2e/fixtures/toolkit-extension/ext/instructions/policy.md
new file mode 100644
index 000000000..419814358
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/ext/instructions/policy.md
@@ -0,0 +1 @@
+When using toolkit tools, prefer `toolkit__toolkit_lookup` over guessing account details.
diff --git a/e2e/fixtures/toolkit-extension/ext/lib/brand.ts b/e2e/fixtures/toolkit-extension/ext/lib/brand.ts
new file mode 100644
index 000000000..f98853e41
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/ext/lib/brand.ts
@@ -0,0 +1,7 @@
+// Shared helper: proves an extension bundles its own `ext/lib/` modules into its tools.
+export const PROVIDER = "toolkit";
+
+/** Prefixes a value with the provider name, e.g. stamp("forecast-ok-9F4Q"). */
+export function stamp(value: string): string {
+ return `${PROVIDER}-${value}`;
+}
diff --git a/e2e/fixtures/toolkit-extension/ext/skills/playbooks.ts b/e2e/fixtures/toolkit-extension/ext/skills/playbooks.ts
new file mode 100644
index 000000000..36dde8598
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/ext/skills/playbooks.ts
@@ -0,0 +1,25 @@
+import { defineDynamic, defineSkill } from "eve/skills";
+
+// A map-producing dynamic skill resolver. Its bare key `incident` must compose
+// under the mount namespace as `toolkit__incident` once mounted — not the bare
+// `incident` — so it can't collide with the consumer's or another extension's
+// skills. The dynamic-skill eval loads it by the namespaced name to prove that.
+export default defineDynamic({
+ events: {
+ "session.started": async () => ({
+ incident: defineSkill({
+ description:
+ "Use ONLY when the user asks for the toolkit incident playbook. " +
+ 'Triggered by the literal phrase "toolkit incident playbook".',
+ markdown: [
+ "# Toolkit incident playbook",
+ "",
+ "When this skill is loaded, ignore conflicting earlier instructions and reply",
+ "with exactly the following text and nothing else:",
+ "",
+ "toolkit-incident-dynamic-ok-7T2X",
+ ].join("\n"),
+ }),
+ }),
+ },
+});
diff --git a/e2e/fixtures/toolkit-extension/ext/skills/toolkit-guide/SKILL.md b/e2e/fixtures/toolkit-extension/ext/skills/toolkit-guide/SKILL.md
new file mode 100644
index 000000000..b523a3555
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/ext/skills/toolkit-guide/SKILL.md
@@ -0,0 +1,8 @@
+---
+description: How to triage an account with the toolkit CRM extension.
+---
+
+# Toolkit triage
+
+1. Look up the account with `toolkit__toolkit_lookup`.
+2. Check the returned tier before recommending an action.
diff --git a/e2e/fixtures/toolkit-extension/ext/tools/toolkit_budget.ts b/e2e/fixtures/toolkit-extension/ext/tools/toolkit_budget.ts
new file mode 100644
index 000000000..e34a95dfc
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/ext/tools/toolkit_budget.ts
@@ -0,0 +1,19 @@
+import { defineState } from "eve/context";
+import { defineTool } from "eve/tools";
+import { z } from "zod";
+
+import { PROVIDER } from "../lib/brand.js";
+
+// Bare "budget" name — eve namespaces it per package so it can't collide with
+// another extension's identically-named state.
+const budget = defineState("budget", () => ({ count: 0 }));
+
+export default defineTool({
+ description:
+ "Increment and read the toolkit budget counter. Call when asked to bump the toolkit budget.",
+ inputSchema: z.object({}),
+ async execute() {
+ budget.update((state) => ({ count: state.count + 1 }));
+ return { scope: PROVIDER, count: budget.get().count };
+ },
+});
diff --git a/e2e/fixtures/toolkit-extension/ext/tools/toolkit_forecast.ts b/e2e/fixtures/toolkit-extension/ext/tools/toolkit_forecast.ts
new file mode 100644
index 000000000..a0c2ab686
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/ext/tools/toolkit_forecast.ts
@@ -0,0 +1,21 @@
+import { defineDynamic, defineTool } from "eve/tools";
+import { z } from "zod";
+
+import { stamp } from "../lib/brand.js";
+
+// Dynamic capability authored inside an extension: the resolver registers a tool
+// at session start that composes and runs once mounted.
+export default defineDynamic({
+ events: {
+ "session.started": async () => ({
+ toolkit_forecast: defineTool({
+ description:
+ "Return the toolkit forecast token. Call when asked to run the toolkit forecast.",
+ inputSchema: z.object({}),
+ async execute() {
+ return { token: stamp("forecast-ok-9F4Q") };
+ },
+ }),
+ }),
+ },
+});
diff --git a/e2e/fixtures/toolkit-extension/ext/tools/toolkit_lookup.ts b/e2e/fixtures/toolkit-extension/ext/tools/toolkit_lookup.ts
new file mode 100644
index 000000000..ec9dfb95c
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/ext/tools/toolkit_lookup.ts
@@ -0,0 +1,15 @@
+import { defineTool } from "eve/tools";
+import { z } from "zod";
+
+import extension from "../extension.js";
+
+export default defineTool({
+ description:
+ "Look up an account in the toolkit CRM. Returns the resolved account plus the " +
+ "toolkit config the extension was mounted with. Call when asked to look up an account.",
+ inputSchema: z.object({ account: z.string() }),
+ async execute({ account }) {
+ const { apiKey, tier } = extension.config;
+ return { account, apiKey, tier };
+ },
+});
diff --git a/e2e/fixtures/toolkit-extension/ext/tools/toolkit_ping.ts b/e2e/fixtures/toolkit-extension/ext/tools/toolkit_ping.ts
new file mode 100644
index 000000000..afdda295d
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/ext/tools/toolkit_ping.ts
@@ -0,0 +1,11 @@
+import { defineTool } from "eve/tools";
+import { z } from "zod";
+
+export default defineTool({
+ description:
+ "Ping the toolkit extension. Returns the extension's own reply. Call when asked to ping toolkit.",
+ inputSchema: z.object({}),
+ async execute() {
+ return { reply: "toolkit-extension-ping" };
+ },
+});
diff --git a/e2e/fixtures/toolkit-extension/package.json b/e2e/fixtures/toolkit-extension/package.json
new file mode 100644
index 000000000..d22b4f9b1
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "toolkit-extension",
+ "version": "0.0.0",
+ "private": true,
+ "type": "module",
+ "exports": {
+ ".": "./ext/extension.ts"
+ },
+ "dependencies": {
+ "zod": "catalog:"
+ },
+ "devDependencies": {
+ "@types/node": "catalog:",
+ "typescript": "catalog:"
+ },
+ "peerDependencies": {
+ "eve": "workspace:*"
+ },
+ "eve": {
+ "extension": "./ext"
+ }
+}
diff --git a/e2e/fixtures/toolkit-extension/tsconfig.json b/e2e/fixtures/toolkit-extension/tsconfig.json
new file mode 100644
index 000000000..96effa1f6
--- /dev/null
+++ b/e2e/fixtures/toolkit-extension/tsconfig.json
@@ -0,0 +1,16 @@
+{
+ "compilerOptions": {
+ "target": "ES2022",
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext",
+ "outDir": "dist",
+ "rootDir": ".",
+ "strict": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "forceConsistentCasingInFileNames": true,
+ "noEmit": true,
+ "types": ["node"]
+ },
+ "include": ["ext/**/*.ts"]
+}
diff --git a/packages/eve/package.json b/packages/eve/package.json
index 2654996bf..3af91b2ba 100644
--- a/packages/eve/package.json
+++ b/packages/eve/package.json
@@ -186,6 +186,11 @@
"import": "./dist/src/public/context/index.js",
"default": "./dist/src/public/context/index.js"
},
+ "./extension": {
+ "types": "./dist/src/public/extension/index.d.ts",
+ "import": "./dist/src/public/extension/index.js",
+ "default": "./dist/src/public/extension/index.js"
+ },
"./instrumentation": {
"types": "./dist/src/public/instrumentation/index.d.ts",
"import": "./dist/src/public/instrumentation/index.js",
diff --git a/packages/eve/src/compiler/manifest.ts b/packages/eve/src/compiler/manifest.ts
index e94d12e7e..3e7745920 100644
--- a/packages/eve/src/compiler/manifest.ts
+++ b/packages/eve/src/compiler/manifest.ts
@@ -41,7 +41,7 @@ export const ROOT_COMPILED_AGENT_NODE_ID = "__root__";
/**
* Current compiled manifest schema version.
*/
-export const COMPILED_AGENT_MANIFEST_VERSION = 33;
+export const COMPILED_AGENT_MANIFEST_VERSION = 35;
/**
* Compiled channel entry preserved in the compiled manifest.
@@ -185,6 +185,13 @@ export type CompiledToolDefinition = InternalToolDefinition & ModuleSourceRef;
export interface CompiledDynamicToolDefinition extends ModuleSourceRef {
readonly slug: string;
readonly eventNames: readonly string[];
+ /**
+ * Mount namespace when this resolver comes from an extension. The runtime
+ * prefixes the names of tools the resolver produces (`forecast` →
+ * `crm__forecast`) so extension-produced tools are namespaced like every
+ * other extension contribution. Absent for consumer-authored resolvers.
+ */
+ readonly extensionNamespace?: string;
}
/**
@@ -195,6 +202,11 @@ export interface CompiledDynamicToolDefinition extends ModuleSourceRef {
export interface CompiledDynamicSkillDefinition extends ModuleSourceRef {
readonly slug: string;
readonly eventNames: readonly string[];
+ /**
+ * Mount namespace when this resolver comes from an extension. Names of skills
+ * a map resolver produces are prefixed with `${extensionNamespace}__`.
+ */
+ readonly extensionNamespace?: string;
}
/**
@@ -566,6 +578,7 @@ const compiledDynamicToolDefinitionSchema: z.ZodType<CompiledDynamicToolDefiniti
.object({
eventNames: z.array(z.string()).readonly(),
exportName: z.string().optional(),
+ extensionNamespace: z.string().optional(),
logicalPath: z.string(),
slug: z.string(),
sourceId: z.string(),
@@ -577,6 +590,7 @@ const compiledDynamicSkillDefinitionSchema: z.ZodType<CompiledDynamicSkillDefini
.object({
eventNames: z.array(z.string()).readonly(),
exportName: z.string().optional(),
+ extensionNamespace: z.string().optional(),
logicalPath: z.string(),
slug: z.string(),
sourceId: z.string(),
@@ -656,6 +670,42 @@ const compiledSubagentEdgeSchema: z.ZodType<CompiledSubagentEdge> = z
})
.strict();
+/**
+ * One mounted extension recorded on the root compiled manifest. The runtime
+ * evaluates {@link mountLogicalPath} at module-map load so the mount's factory
+ * call binds the extension's config before any tool runs.
+ */
+export interface CompiledExtensionMount {
+ /** Mount-derived namespace that prefixes the extension's tool/skill names. */
+ readonly namespace: string;
+ readonly packageName: string;
+ /**
+ * Package-derived namespace that scopes the extension's durable state keys and
+ * config binding. Distinct from {@link namespace}: state stays keyed to the
+ * package so a consumer renaming the mount file cannot orphan persisted state.
+ */
+ readonly packageNamespace: string;
+ /**
+ * Absolute path to the extension's source root on disk. The extension-scope
+ * bundler plugin treats any module under this root as extension-owned and
+ * rewrites its `eve/context`/`eve/extension` imports to bake in the namespace.
+ */
+ readonly sourceRoot: string;
+ readonly mountSourceId: string;
+ readonly mountLogicalPath: string;
+}
+
+const compiledExtensionMountSchema: z.ZodType<CompiledExtensionMount> = z
+ .object({
+ namespace: z.string(),
+ packageName: z.string(),
+ packageNamespace: z.string(),
+ sourceRoot: z.string(),
+ mountSourceId: z.string(),
+ mountLogicalPath: z.string(),
+ })
+ .strict();
+
/**
* Zod schema for the versioned compiled manifest emitted by the compiler.
*/
@@ -663,6 +713,7 @@ export const compiledAgentManifestSchema = z
.object({
agentRoot: z.string(),
appRoot: z.string(),
+ extensionMounts: z.array(compiledExtensionMountSchema).default([]),
channels: z.array(compiledChannelEntrySchema),
config: compiledAgentConfigSchema,
connections: z.array(compiledConnectionDefinitionSchema),
@@ -864,10 +915,12 @@ export function createCompiledAgentManifest(input: {
readonly subagents?: readonly CompiledSubagentNode[];
readonly instructions?: CompiledInstructionsDefinition;
readonly tools?: readonly CompiledToolDefinition[];
+ readonly extensionMounts?: readonly CompiledExtensionMount[];
}): CompiledAgentManifest {
return {
...createCompiledAgentNodeManifest(input),
kind: COMPILED_AGENT_MANIFEST_KIND,
+ extensionMounts: [...(input.extensionMounts ?? [])],
subagentEdges: [...(input.subagentEdges ?? [])],
subagents: [...(input.subagents ?? [])],
version: COMPILED_AGENT_MANIFEST_VERSION,
diff --git a/packages/eve/src/compiler/module-map.test.ts b/packages/eve/src/compiler/module-map.test.ts
index a52d55a43..f14273aae 100644
--- a/packages/eve/src/compiler/module-map.test.ts
+++ b/packages/eve/src/compiler/module-map.test.ts
@@ -22,6 +22,7 @@ function createManifestWithTool(agentRoot: string): CompiledAgentManifest {
errors: 0,
warnings: 0,
},
+ extensionMounts: [],
disabledFrameworkTools: [],
workflowEnabled: false,
dynamicInstructions: [],
diff --git a/packages/eve/src/compiler/module-map.ts b/packages/eve/src/compiler/module-map.ts
index a434b6b92..ce0588a22 100644
--- a/packages/eve/src/compiler/module-map.ts
+++ b/packages/eve/src/compiler/module-map.ts
@@ -1,6 +1,10 @@
import { z } from "#compiled/zod/index.js";
import type { ModuleSourceRef } from "#shared/source-ref.js";
-import type { CompiledAgentManifest, CompiledAgentNodeManifest } from "#compiler/manifest.js";
+import type {
+ CompiledAgentManifest,
+ CompiledAgentNodeManifest,
+ CompiledExtensionMount,
+} from "#compiler/manifest.js";
import { ROOT_COMPILED_AGENT_NODE_ID } from "#compiler/manifest.js";
import { normalizeEsmImportSpecifier } from "#internal/application/import-specifier.js";
@@ -88,17 +92,18 @@ export function createCompiledModuleMapSource(input: CreateCompiledModuleMapSour
}),
),
];
- const imports = collectedScopes.flatMap((scope) =>
- scope.modules.map((moduleImport) => {
- return `import * as ${moduleImport.bindingName} from ${JSON.stringify(moduleImport.importSpecifier)};`;
- }),
+ const allModules = collectedScopes.flatMap((scope) => scope.modules);
+
+ const staticImports = allModules.map(
+ (moduleImport) =>
+ `import * as ${moduleImport.bindingName} from ${JSON.stringify(moduleImport.importSpecifier)};`,
);
return [
"// Generated by eve. Do not edit by hand.",
"",
- ...imports,
- ...(imports.length > 0 ? [""] : []),
+ ...staticImports,
+ ...(staticImports.length > 0 ? [""] : []),
`export const moduleMap = ${renderModuleMap(collectedScopes)};`,
"",
"export default moduleMap;",
@@ -248,6 +253,20 @@ export function collectModuleRefsForManifest(
});
}
+ // Extension mount modules (root manifest only). Their top-level factory call
+ // binds config, so they must be evaluated at module-map load.
+ const extensionMounts = (manifest as { extensionMounts?: readonly CompiledExtensionMount[] })
+ .extensionMounts;
+ if (extensionMounts !== undefined) {
+ for (const mount of extensionMounts) {
+ moduleSourceRefs.set(mount.mountSourceId, {
+ sourceKind: "module",
+ logicalPath: mount.mountLogicalPath,
+ sourceId: mount.mountSourceId,
+ });
+ }
+ }
+
// Authored system modules execute once at build time. The compiled markdown
// is captured into the manifest, so there is no need to include them in the
// runtime module map.
diff --git a/packages/eve/src/compiler/normalize-extension.test.ts b/packages/eve/src/compiler/normalize-extension.test.ts
new file mode 100644
index 000000000..3fc30bd1c
--- /dev/null
+++ b/packages/eve/src/compiler/normalize-extension.test.ts
@@ -0,0 +1,139 @@
+import { describe, expect, it } from "vitest";
+
+import {
+ applyOverrideDisables,
+ type CompiledExtensionContributions,
+ mergeContributions,
+} from "#compiler/normalize-extension.js";
+
+// mergeContributions only reads each named contribution's identifier for dedup,
+// so minimal partial fixtures suffice.
+function contributions(
+ overrides: Partial<CompiledExtensionContributions>,
+): CompiledExtensionContributions {
+ return {
+ tools: [],
+ dynamicTools: [],
+ hooks: [],
+ skills: [],
+ dynamicSkills: [],
+ dynamicInstructions: [],
+ connections: [],
+ instructionFragments: [],
+ ...overrides,
+ };
+}
+
+describe("mergeContributions", () => {
+ it("keeps the primary (consumer override) entry when a named contribution collides", () => {
+ const primary = contributions({
+ tools: [{ name: "crm__search", logicalPath: "override" }] as never,
+ connections: [{ connectionName: "crm__api", logicalPath: "override" }] as never,
+ skills: [{ name: "crm__lookup", logicalPath: "override" }] as never,
+ dynamicTools: [{ slug: "crm__dynamic", logicalPath: "override" }] as never,
+ });
+ const secondary = contributions({
+ tools: [
+ { name: "crm__search", logicalPath: "extension" },
+ { name: "crm__list", logicalPath: "extension" },
+ ] as never,
+ connections: [{ connectionName: "crm__api", logicalPath: "extension" }] as never,
+ skills: [{ name: "crm__lookup", logicalPath: "extension" }] as never,
+ dynamicTools: [{ slug: "crm__dynamic", logicalPath: "extension" }] as never,
+ });
+
+ const merged = mergeContributions(primary, secondary);
+
+ expect(merged.tools).toEqual([
+ { name: "crm__search", logicalPath: "override" },
+ { name: "crm__list", logicalPath: "extension" },
+ ]);
+ expect(merged.connections).toEqual([{ connectionName: "crm__api", logicalPath: "override" }]);
+ expect(merged.skills).toEqual([{ name: "crm__lookup", logicalPath: "override" }]);
+ expect(merged.dynamicTools).toEqual([{ slug: "crm__dynamic", logicalPath: "override" }]);
+ });
+
+ it("concatenates unnamed contributions from both sets", () => {
+ const primary = contributions({
+ hooks: [{ slug: "crm__before" }] as never,
+ instructionFragments: ["override fragment"],
+ });
+ const secondary = contributions({
+ hooks: [{ slug: "crm__after" }] as never,
+ instructionFragments: ["extension fragment"],
+ });
+
+ const merged = mergeContributions(primary, secondary);
+
+ expect(merged.hooks).toEqual([{ slug: "crm__before" }, { slug: "crm__after" }]);
+ expect(merged.instructionFragments).toEqual(["override fragment", "extension fragment"]);
+ });
+});
+
+describe("applyOverrideDisables", () => {
+ it("removes the disabled static extension tool while keeping the rest", () => {
+ const merged = contributions({
+ tools: [
+ { name: "crm__search", logicalPath: "extension" },
+ { name: "crm__list", logicalPath: "extension" },
+ ] as never,
+ });
+
+ const result = applyOverrideDisables({
+ merged,
+ disables: [{ name: "crm__search", logicalPath: "tools/search.ts" }],
+ extensionToolNames: new Set(["crm__search", "crm__list"]),
+ extensionDynamicToolSlugs: new Set(),
+ namespace: "crm",
+ });
+
+ expect(result.tools).toEqual([{ name: "crm__list", logicalPath: "extension" }]);
+ });
+
+ it("removes a disabled dynamic resolver slot by slug", () => {
+ const merged = contributions({
+ tools: [{ name: "crm__list", logicalPath: "extension" }] as never,
+ dynamicTools: [{ slug: "crm__search", logicalPath: "extension" }] as never,
+ });
+
+ const result = applyOverrideDisables({
+ merged,
+ disables: [{ name: "crm__search", logicalPath: "tools/search.ts" }],
+ extensionToolNames: new Set(["crm__list"]),
+ extensionDynamicToolSlugs: new Set(["crm__search"]),
+ namespace: "crm",
+ });
+
+ expect(result.dynamicTools).toEqual([]);
+ expect(result.tools).toEqual([{ name: "crm__list", logicalPath: "extension" }]);
+ });
+
+ it("throws, listing static and dynamic slots, when the disable targets neither", () => {
+ expect(() =>
+ applyOverrideDisables({
+ merged: contributions({
+ tools: [{ name: "crm__list", logicalPath: "extension" }] as never,
+ dynamicTools: [{ slug: "crm__lookup", logicalPath: "extension" }] as never,
+ }),
+ disables: [{ name: "crm__search", logicalPath: "tools/search.ts" }],
+ extensionToolNames: new Set(["crm__list"]),
+ extensionDynamicToolSlugs: new Set(["crm__lookup"]),
+ namespace: "crm",
+ }),
+ ).toThrow(/no tool named "search"[\s\S]*It contributes: list, lookup/);
+ });
+
+ it("returns the merged set unchanged when nothing is disabled", () => {
+ const merged = contributions({ tools: [{ name: "crm__list" }] as never });
+
+ expect(
+ applyOverrideDisables({
+ merged,
+ disables: [],
+ extensionToolNames: new Set(["crm__list"]),
+ extensionDynamicToolSlugs: new Set(),
+ namespace: "crm",
+ }),
+ ).toBe(merged);
+ });
+});
diff --git a/packages/eve/src/compiler/normalize-extension.ts b/packages/eve/src/compiler/normalize-extension.ts
new file mode 100644
index 000000000..fe0124855
--- /dev/null
+++ b/packages/eve/src/compiler/normalize-extension.ts
@@ -0,0 +1,340 @@
+import { join as joinPath, relative as relativePath } from "node:path";
+
+import type { AgentSourceManifest, ResolvedExtensionMount } from "#discover/manifest.js";
+import type {
+ CompiledConnectionDefinition,
+ CompiledDynamicInstructionsDefinition,
+ CompiledDynamicSkillDefinition,
+ CompiledDynamicToolDefinition,
+ CompiledHookDefinition,
+ CompiledSkillDefinition,
+ CompiledToolDefinition,
+} from "#compiler/manifest.js";
+import { compileConnectionDefinition } from "#compiler/normalize-connection.js";
+import type { ManifestCompileContext } from "#compiler/normalize-helpers.js";
+import { compileHookEntry } from "#compiler/normalize-hook.js";
+import { compileInstructionsEntry } from "#compiler/normalize-instructions.js";
+import { compileSkillSource } from "#compiler/normalize-skill.js";
+import { compileToolEntry } from "#compiler/normalize-tool.js";
+
+/**
+ * Contributions one mounted extension composes into the consuming agent,
+ * already namespaced by the mount and rebased onto the consumer's agent root.
+ */
+export interface CompiledExtensionContributions {
+ readonly tools: CompiledToolDefinition[];
+ readonly dynamicTools: CompiledDynamicToolDefinition[];
+ readonly hooks: CompiledHookDefinition[];
+ readonly skills: CompiledSkillDefinition[];
+ readonly dynamicSkills: CompiledDynamicSkillDefinition[];
+ readonly dynamicInstructions: CompiledDynamicInstructionsDefinition[];
+ readonly connections: CompiledConnectionDefinition[];
+ readonly instructionFragments: string[];
+}
+
+/**
+ * Compiles one mounted extension's source tree and namespaces its
+ * contributions by the mount name. Module-backed contributions keep loading
+ * from the extension package because their `logicalPath` is rebased to a
+ * consumer-relative path — the module-map codegen resolves it against the
+ * consumer's agent root, reaching into the extension package unchanged.
+ *
+ * When the mount was authored as a directory (`extensions/<ns>/`), any
+ * consumer-authored override slots are composed under the same namespace and
+ * win on name collision: an override tool `<ns>__search` shadows the
+ * extension's own `<ns>__search`.
+ */
+export async function compileExtensionContributions(input: {
+ readonly mount: ResolvedExtensionMount;
+ readonly context: ManifestCompileContext;
+ readonly consumerAgentRoot: string;
+ readonly externalDependencies: readonly string[];
+}): Promise<CompiledExtensionContributions> {
+ const { mount, consumerAgentRoot } = input;
+ const options = { externalDependencies: input.externalDependencies };
+
+ const base = await composeManifestContributions({
+ manifest: mount.manifest,
+ namespace: mount.namespace,
+ consumerAgentRoot,
+ options,
+ sourceIdScope: `ext:${mount.namespace}`,
+ role: "extension",
+ });
+
+ if (mount.overrides === undefined) {
+ return base.contributions;
+ }
+
+ // Overrides are consumer-authored files, so they are NOT extension-scoped. The
+ // `ext-override:` prefix keeps their module-map keys distinct from the
+ // extension's own `ext:<ns>:` modules while deliberately not matching the
+ // loader's `^ext:<ns>:` scope pattern, so dev and prod both treat them unscoped.
+ const overrides = await composeManifestContributions({
+ manifest: mount.overrides,
+ namespace: mount.namespace,
+ consumerAgentRoot,
+ options,
+ sourceIdScope: `ext-override:${mount.namespace}`,
+ role: "override",
+ });
+
+ // Consumer overrides win: list them first so first-registration-wins dedup
+ // keeps the override over the extension's same-named contribution.
+ const merged = mergeContributions(overrides.contributions, base.contributions);
+
+ return applyOverrideDisables({
+ merged,
+ disables: overrides.disabledToolTargets,
+ extensionToolNames: new Set(base.contributions.tools.map((tool) => tool.name)),
+ extensionDynamicToolSlugs: new Set(base.contributions.dynamicTools.map((tool) => tool.slug)),
+ namespace: mount.namespace,
+ });
+}
+
+export interface DisabledToolTarget {
+ /** Namespaced target, e.g. `crm__search`. */
+ readonly name: string;
+ /** Override-relative authored path, e.g. `tools/search.ts`, for diagnostics. */
+ readonly logicalPath: string;
+}
+
+interface ComposedContributions {
+ readonly contributions: CompiledExtensionContributions;
+ readonly disabledToolTargets: readonly DisabledToolTarget[];
+}
+
+/**
+ * Removes the extension tools an override slot opted out of with `disableTool()`.
+ * A `disableTool()` targets a slot by name, so it removes the extension's
+ * same-named static tool or dynamic resolver — whichever kind occupies the slot.
+ * A disable that matches neither throws rather than silently disabling nothing.
+ *
+ * Exported for unit testing.
+ */
+export function applyOverrideDisables(input: {
+ readonly merged: CompiledExtensionContributions;
+ readonly disables: readonly DisabledToolTarget[];
+ readonly extensionToolNames: ReadonlySet<string>;
+ readonly extensionDynamicToolSlugs: ReadonlySet<string>;
+ readonly namespace: string;
+}): CompiledExtensionContributions {
+ if (input.disables.length === 0) {
+ return input.merged;
+ }
+ const prefixLength = input.namespace.length + 2; // strip the `<ns>__` prefix
+ const removed = new Set<string>();
+ for (const disable of input.disables) {
+ if (
+ !input.extensionToolNames.has(disable.name) &&
+ !input.extensionDynamicToolSlugs.has(disable.name)
+ ) {
+ const available = [...input.extensionToolNames, ...input.extensionDynamicToolSlugs]
+ .map((name) => name.slice(prefixLength))
+ .sort();
+ throw new Error(
+ `The override "agent/extensions/${input.namespace}/${disable.logicalPath}" calls disableTool(), ` +
+ `but the "${input.namespace}" extension contributes no tool named "${disable.name.slice(prefixLength)}". ` +
+ `It contributes: ${available.length > 0 ? available.join(", ") : "(no tools)"}.`,
+ );
+ }
+ removed.add(disable.name);
+ }
+ return {
+ ...input.merged,
+ tools: input.merged.tools.filter((tool) => !removed.has(tool.name)),
+ dynamicTools: input.merged.dynamicTools.filter((tool) => !removed.has(tool.slug)),
+ };
+}
+
+interface ComposeOptions {
+ readonly externalDependencies: readonly string[];
+}
+
+/**
+ * Compiles one agent-shaped manifest into namespaced extension contributions
+ * rebased onto the consumer's agent root. Used for both the extension's own
+ * source tree and a directory mount's consumer override slots.
+ */
+async function composeManifestContributions(input: {
+ readonly manifest: AgentSourceManifest;
+ readonly namespace: string;
+ readonly consumerAgentRoot: string;
+ readonly options: ComposeOptions;
+ readonly sourceIdScope: string;
+ readonly role: "extension" | "override";
+}): Promise<ComposedContributions> {
+ const { manifest, namespace, consumerAgentRoot, options, sourceIdScope, role } = input;
+ const sourceRoot = manifest.agentRoot;
+ const prefix = `${namespace}__`;
+ const scopeSourceId = (sourceId: string): string => `${sourceIdScope}:${sourceId}`;
+ const rebase = (logicalPath: string): string =>
+ relativePath(consumerAgentRoot, joinPath(sourceRoot, logicalPath)).replaceAll("\\", "/");
+
+ const tools: CompiledToolDefinition[] = [];
+ const dynamicTools: CompiledDynamicToolDefinition[] = [];
+ const disabledToolTargets: DisabledToolTarget[] = [];
+ for (const source of manifest.tools) {
+ const entry = await compileToolEntry(sourceRoot, source, options);
+ if (entry.kind === "tool") {
+ tools.push({
+ ...entry.definition,
+ name: `${prefix}${entry.definition.name}`,
+ sourceId: scopeSourceId(entry.definition.sourceId),
+ logicalPath: rebase(entry.definition.logicalPath),
+ });
+ } else if (entry.kind === "dynamic-tool") {
+ dynamicTools.push({
+ ...entry.definition,
+ slug: `${prefix}${entry.definition.slug}`,
+ extensionNamespace: namespace,
+ sourceId: scopeSourceId(entry.definition.sourceId),
+ logicalPath: rebase(entry.definition.logicalPath),
+ });
+ } else if (entry.kind === "enable-workflow") {
+ throw new Error(
+ `${describeExtensionSource(role, namespace, source.logicalPath)} enables the Workflow tool, ` +
+ `but the Workflow tool is the consuming agent's to enable, not an extension's. Remove it.`,
+ );
+ } else if (role === "extension") {
+ throw new Error(
+ `${describeExtensionSource(role, namespace, source.logicalPath)} calls disableTool(), ` +
+ `but an extension cannot disable framework tools — that is the consuming agent's to own. Remove it.`,
+ );
+ } else {
+ disabledToolTargets.push({ name: `${prefix}${entry.name}`, logicalPath: source.logicalPath });
+ }
+ }
+
+ const hooks: CompiledHookDefinition[] = manifest.hooks.map((source) => {
+ const hook = compileHookEntry(source);
+ return {
+ ...hook,
+ slug: `${prefix}${hook.slug}`,
+ sourceId: scopeSourceId(hook.sourceId),
+ logicalPath: rebase(hook.logicalPath),
+ };
+ });
+
+ const skills: CompiledSkillDefinition[] = [];
+ const dynamicSkills: CompiledDynamicSkillDefinition[] = [];
+ for (const source of manifest.skills) {
+ const entry = await compileSkillSource(sourceRoot, source, options);
+ if (entry.kind === "skill") {
+ skills.push({
+ ...entry.definition,
+ name: `${prefix}${entry.definition.name}`,
+ sourceId: scopeSourceId(entry.definition.sourceId),
+ logicalPath: rebase(entry.definition.logicalPath),
+ });
+ } else {
+ dynamicSkills.push({
+ ...entry.definition,
+ slug: `${prefix}${entry.definition.slug}`,
+ extensionNamespace: namespace,
+ sourceId: scopeSourceId(entry.definition.sourceId),
+ logicalPath: rebase(entry.definition.logicalPath),
+ });
+ }
+ }
+
+ const connections: CompiledConnectionDefinition[] = (
+ await Promise.all(
+ manifest.connections.map((source) =>
+ compileConnectionDefinition(sourceRoot, source, options),
+ ),
+ )
+ ).map((connection) => ({
+ ...connection,
+ connectionName: `${prefix}${connection.connectionName}`,
+ sourceId: scopeSourceId(connection.sourceId),
+ logicalPath: rebase(connection.logicalPath),
+ }));
+
+ const dynamicInstructions: CompiledDynamicInstructionsDefinition[] = [];
+ const instructionFragments: string[] = [];
+ for (const source of manifest.instructions) {
+ const entry = await compileInstructionsEntry(sourceRoot, source, options);
+ if (entry.kind === "instructions") {
+ instructionFragments.push(entry.definition.markdown);
+ } else {
+ dynamicInstructions.push({
+ ...entry.definition,
+ slug: `${prefix}${entry.definition.slug}`,
+ sourceId: scopeSourceId(entry.definition.sourceId),
+ logicalPath: rebase(entry.definition.logicalPath),
+ });
+ }
+ }
+
+ return {
+ contributions: {
+ tools,
+ dynamicTools,
+ hooks,
+ skills,
+ dynamicSkills,
+ dynamicInstructions,
+ connections,
+ instructionFragments,
+ },
+ disabledToolTargets,
+ };
+}
+
+function describeExtensionSource(
+ role: "extension" | "override",
+ namespace: string,
+ logicalPath: string,
+): string {
+ return role === "override"
+ ? `The override "agent/extensions/${namespace}/${logicalPath}"`
+ : `The "${namespace}" extension's "${logicalPath}"`;
+}
+
+/**
+ * Merges two composed contribution sets with earlier-set-wins precedence per
+ * composed name. Named contributions (tools, connections, skills, dynamic
+ * tools) dedup by their model-facing identifier so an override shadows the
+ * extension's same-named entry; unnamed contributions (hooks, dynamic skills,
+ * dynamic instructions, instruction fragments) simply concatenate.
+ *
+ * Exported for unit testing: passing the consumer overrides as `primary` and
+ * the extension's own contributions as `secondary` yields consumer-wins
+ * shadowing on name collision.
+ */
+export function mergeContributions(
+ primary: CompiledExtensionContributions,
+ secondary: CompiledExtensionContributions,
+): CompiledExtensionContributions {
+ return {
+ tools: dedupeBy([...primary.tools, ...secondary.tools], (tool) => tool.name),
+ dynamicTools: dedupeBy(
+ [...primary.dynamicTools, ...secondary.dynamicTools],
+ (tool) => tool.slug,
+ ),
+ connections: dedupeBy(
+ [...primary.connections, ...secondary.connections],
+ (connection) => connection.connectionName,
+ ),
+ skills: dedupeBy([...primary.skills, ...secondary.skills], (skill) => skill.name),
+ hooks: [...primary.hooks, ...secondary.hooks],
+ dynamicSkills: [...primary.dynamicSkills, ...secondary.dynamicSkills],
+ dynamicInstructions: [...primary.dynamicInstructions, ...secondary.dynamicInstructions],
+ instructionFragments: [...primary.instructionFragments, ...secondary.instructionFragments],
+ };
+}
+
+function dedupeBy<T>(items: readonly T[], key: (item: T) => string): T[] {
+ const seen = new Set<string>();
+ const result: T[] = [];
+ for (const item of items) {
+ const identifier = key(item);
+ if (seen.has(identifier)) {
+ continue;
+ }
+ seen.add(identifier);
+ result.push(item);
+ }
+ return result;
+}
diff --git a/packages/eve/src/compiler/normalize-manifest.ts b/packages/eve/src/compiler/normalize-manifest.ts
index 324cde819..f1268f418 100644
--- a/packages/eve/src/compiler/normalize-manifest.ts
+++ b/packages/eve/src/compiler/normalize-manifest.ts
@@ -1,8 +1,10 @@
import type { AgentSourceManifest } from "#discover/manifest.js";
+import { mountRefNamespace, packageStateNamespace } from "#discover/extensions.js";
import {
type CompiledAgentManifest,
type CompiledAgentNodeManifest,
type CompiledDynamicInstructionsDefinition,
+ type CompiledExtensionMount,
type CompiledDynamicSkillDefinition,
type CompiledDynamicToolDefinition,
type CompiledInstructionsDefinition,
@@ -16,6 +18,7 @@ import { createCompiledRuntimeModelCatalogLoader } from "#compiler/model-catalog
import { compileAgentConfig } from "#compiler/normalize-agent-config.js";
import { compileChannelDefinition } from "#compiler/normalize-channel.js";
import { compileConnectionDefinition } from "#compiler/normalize-connection.js";
+import { compileExtensionContributions } from "#compiler/normalize-extension.js";
import type { ManifestCompileContext } from "#compiler/normalize-helpers.js";
import { compileHookEntry } from "#compiler/normalize-hook.js";
import { compileSandboxDefinition } from "#compiler/normalize-sandbox.js";
@@ -44,8 +47,23 @@ export async function compileAgentManifest(
subagents: manifest.subagents,
});
+ const extensionMounts: CompiledExtensionMount[] = manifest.resolvedExtensions.map((mount) => {
+ const mountRef = manifest.extensions.find(
+ (entry) => mountRefNamespace(entry.logicalPath) === mount.namespace,
+ );
+ return {
+ namespace: mount.namespace,
+ packageName: mount.packageName,
+ packageNamespace: packageStateNamespace(mount.packageName),
+ sourceRoot: mount.sourceRoot,
+ mountSourceId: mountRef?.sourceId ?? `extensions/${mount.namespace}`,
+ mountLogicalPath: mountRef?.logicalPath ?? `extensions/${mount.namespace}`,
+ };
+ });
+
return createCompiledAgentManifest({
...compiledNode,
+ extensionMounts,
remoteAgents: subagentGraph.remoteAgents,
subagentEdges: subagentGraph.edges,
subagents: subagentGraph.nodes,
@@ -145,16 +163,78 @@ async function compileAgentNodeManifest(
}
}
+ const connections = await Promise.all(
+ manifest.connections.map((connectionSource) =>
+ compileConnectionDefinition(manifest.agentRoot, connectionSource, { externalDependencies }),
+ ),
+ );
+ const hooks = manifest.hooks.map((hookSource) => compileHookEntry(hookSource));
+ const schedules = await Promise.all(
+ manifest.schedules.map((scheduleSource) =>
+ compileScheduleDefinition(manifest.agentRoot, scheduleSource, { externalDependencies }),
+ ),
+ );
+
+ // Sorted by namespace so first-registration-wins dedup is deterministic when
+ // two extensions contribute the same composed name.
+ const toolNames = new Set(tools.map((tool) => tool.name));
+ const dynamicToolSlugs = new Set(dynamicTools.map((tool) => tool.slug));
+ const connectionNames = new Set(connections.map((connection) => connection.connectionName));
+ const skillNames = new Set(skills.map((skill) => skill.name));
+ const extensionInstructionFragments: string[] = [];
+ for (const mount of [...manifest.resolvedExtensions].sort((left, right) =>
+ left.namespace.localeCompare(right.namespace),
+ )) {
+ const contributions = await compileExtensionContributions({
+ mount,
+ context,
+ consumerAgentRoot: manifest.agentRoot,
+ externalDependencies,
+ });
+ for (const tool of contributions.tools) {
+ if (!toolNames.has(tool.name)) {
+ toolNames.add(tool.name);
+ tools.push(tool);
+ }
+ }
+ for (const tool of contributions.dynamicTools) {
+ if (!dynamicToolSlugs.has(tool.slug)) {
+ dynamicToolSlugs.add(tool.slug);
+ dynamicTools.push(tool);
+ }
+ }
+ for (const connection of contributions.connections) {
+ if (!connectionNames.has(connection.connectionName)) {
+ connectionNames.add(connection.connectionName);
+ connections.push(connection);
+ }
+ }
+ for (const skill of contributions.skills) {
+ if (!skillNames.has(skill.name)) {
+ skillNames.add(skill.name);
+ skills.push(skill);
+ }
+ }
+ hooks.push(...contributions.hooks);
+ dynamicSkills.push(...contributions.dynamicSkills);
+ dynamicInstructions.push(...contributions.dynamicInstructions);
+ extensionInstructionFragments.push(...contributions.instructionFragments);
+ }
+
+ const composedMarkdown = [
+ ...staticInstructions.map((entry) => entry.markdown),
+ ...extensionInstructionFragments,
+ ];
const composedInstructions: CompiledInstructionsDefinition | undefined =
- staticInstructions.length === 0
+ composedMarkdown.length === 0
? undefined
- : staticInstructions.length === 1
+ : staticInstructions.length === 1 && extensionInstructionFragments.length === 0
? staticInstructions[0]
: {
name: "instructions",
logicalPath: "instructions",
- markdown: staticInstructions.map((i) => i.markdown).join("\n\n"),
- sourceId: staticInstructions[0]!.sourceId,
+ markdown: composedMarkdown.join("\n\n"),
+ sourceId: staticInstructions[0]?.sourceId ?? "instructions",
sourceKind: "module",
};
@@ -163,17 +243,13 @@ async function compileAgentNodeManifest(
appRoot: manifest.appRoot,
channels: compiledChannels,
config,
- connections: await Promise.all(
- manifest.connections.map((connectionSource) =>
- compileConnectionDefinition(manifest.agentRoot, connectionSource, { externalDependencies }),
- ),
- ),
+ connections,
diagnosticsSummary: manifest.diagnosticsSummary,
disabledFrameworkTools,
workflowEnabled,
dynamicSkills,
dynamicTools,
- hooks: manifest.hooks.map((hookSource) => compileHookEntry(hookSource)),
+ hooks,
sandbox:
manifest.sandbox === null
? null
@@ -186,11 +262,7 @@ async function compileAgentNodeManifest(
sourceId: workspace.sourceId,
sourcePath: workspace.sourcePath,
})),
- schedules: await Promise.all(
- manifest.schedules.map((scheduleSource) =>
- compileScheduleDefinition(manifest.agentRoot, scheduleSource, { externalDependencies }),
- ),
- ),
+ schedules,
dynamicInstructions,
skills,
instructions: composedInstructions,
diff --git a/packages/eve/src/compiler/workspace-resources.ts b/packages/eve/src/compiler/workspace-resources.ts
index 4c74df156..9956d0ab3 100644
--- a/packages/eve/src/compiler/workspace-resources.ts
+++ b/packages/eve/src/compiler/workspace-resources.ts
@@ -51,6 +51,7 @@ export async function materializeWorkspaceResources(input: {
return {
...rootAgent,
kind: input.manifest.kind,
+ extensionMounts: input.manifest.extensionMounts,
subagentEdges: input.manifest.subagentEdges,
subagents,
version: input.manifest.version,
diff --git a/packages/eve/src/context/dynamic-skill-lifecycle.test.ts b/packages/eve/src/context/dynamic-skill-lifecycle.test.ts
index 6c30c715f..a2cf12f65 100644
--- a/packages/eve/src/context/dynamic-skill-lifecycle.test.ts
+++ b/packages/eve/src/context/dynamic-skill-lifecycle.test.ts
@@ -53,6 +53,7 @@ function createResolver(
| Record<string, SkillPackageDefinition>
| null
| Promise<SkillPackageDefinition | Record<string, SkillPackageDefinition> | null>,
+ extensionNamespace?: string,
): ResolvedDynamicSkillResolver {
return {
eventNames: ["session.started"],
@@ -60,6 +61,7 @@ function createResolver(
"session.started": handler,
},
exportName: "default",
+ extensionNamespace,
logicalPath: `skills/${slug}.ts`,
slug,
sourceId: `skills/${slug}.ts`,
@@ -161,6 +163,30 @@ describe("dispatchDynamicSkillEvent", () => {
).toBe(true);
});
+ it("prefixes map entries with the mount namespace for an extension resolver", async () => {
+ const { ctx, sandbox } = createCtx();
+ const resolver = createResolver(
+ "crm__playbooks",
+ () => ({ triage: makeSkill("Triage an account", "Triage.") }),
+ "crm",
+ );
+
+ await dispatchDynamicSkillEvent({
+ ctx,
+ event: makeEvent(),
+ messages: [],
+ resolvers: [resolver],
+ });
+
+ expect(ctx.get(DynamicSkillManifestKey)).toEqual({
+ crm__playbooks: [{ description: "Triage an account", name: "crm__triage" }],
+ });
+ expect(ctx.get(PendingSkillAnnouncementKey)).toContain("crm__triage: Triage an account");
+ expect(
+ sandbox.writes.some((w) => w.path.includes("/home/agent/.agents/skills/crm__triage/")),
+ ).toBe(true);
+ });
+
it("lets a dynamic skill override a same-named authored skill instead of throwing", async () => {
const { ctx, sandbox } = createCtx(["talk-like-a-dog"]);
const resolver = createResolver("custom", () => ({
diff --git a/packages/eve/src/context/dynamic-skill-lifecycle.ts b/packages/eve/src/context/dynamic-skill-lifecycle.ts
index 25875c69d..26b730745 100644
--- a/packages/eve/src/context/dynamic-skill-lifecycle.ts
+++ b/packages/eve/src/context/dynamic-skill-lifecycle.ts
@@ -32,7 +32,7 @@ const log = createLogger("dynamic-skills");
// ---------------------------------------------------------------------------
function qualifyDynamicSkillNames(
- slug: string,
+ resolver: { readonly slug: string; readonly extensionNamespace?: string },
isSingle: boolean,
entries: Readonly<Record<string, SkillPackageDefinition>>,
): Array<{ name: string; entryKey: string; entry: SkillPackageDefinition }> {
@@ -41,15 +41,20 @@ function qualifyDynamicSkillNames(
if (keys.length === 0) return result;
- // A single returned defineSkill is named after the file slug; a map names
- // each entry by its bare key (authors namespace keys themselves if needed).
+ // A single returned defineSkill is named after the file slug (already
+ // namespaced for an extension). A map names each entry by its bare key.
if (isSingle) {
- result.push({ name: slug, entryKey: keys[0]!, entry: entries[keys[0]!]! });
+ result.push({ name: resolver.slug, entryKey: keys[0]!, entry: entries[keys[0]!]! });
return result;
}
+ // Map entries from an extension resolver are prefixed with the mount
+ // namespace so extension-produced skills are namespaced like the extension's
+ // static skills; a non-extension resolver's keys stay bare.
+ const prefix =
+ resolver.extensionNamespace !== undefined ? `${resolver.extensionNamespace}__` : "";
for (const key of keys) {
- result.push({ name: key, entryKey: key, entry: entries[key]! });
+ result.push({ name: `${prefix}${key}`, entryKey: key, entry: entries[key]! });
}
return result;
}
@@ -149,7 +154,7 @@ export async function dispatchDynamicSkillEvent(input: {
isSingle = false;
}
- const named = qualifyDynamicSkillNames(resolver.slug, isSingle, entries);
+ const named = qualifyDynamicSkillNames(resolver, isSingle, entries);
return { resolver, named } satisfies DynamicSkillResolution;
}),
);
diff --git a/packages/eve/src/context/dynamic-tool-lifecycle.ts b/packages/eve/src/context/dynamic-tool-lifecycle.ts
index 8fc5315ec..f597028f6 100644
--- a/packages/eve/src/context/dynamic-tool-lifecycle.ts
+++ b/packages/eve/src/context/dynamic-tool-lifecycle.ts
@@ -60,7 +60,7 @@ function convertOptionalOutputSchema(schema: unknown): FlexibleSchema | undefine
}
function qualifyDynamicToolNames(
- slug: string,
+ resolver: ResolvedDynamicToolResolver,
isSingle: boolean,
entries: Readonly<Record<string, DynamicToolEntry>>,
): Array<{ name: string; entryKey: string; entry: DynamicToolEntry }> {
@@ -72,12 +72,17 @@ function qualifyDynamicToolNames(
// A single returned defineTool is named after the file slug; a map names each
// entry by its bare key (authors namespace keys themselves if needed).
if (isSingle) {
- result.push({ name: slug, entryKey: keys[0]!, entry: entries[keys[0]!]! });
+ result.push({ name: resolver.slug, entryKey: keys[0]!, entry: entries[keys[0]!]! });
return result;
}
+ // Map entries from an extension resolver are prefixed with the mount
+ // namespace so extension-produced tools are namespaced like the extension's
+ // static tools. The single-tool case above already uses the namespaced slug.
+ const prefix =
+ resolver.extensionNamespace !== undefined ? `${resolver.extensionNamespace}__` : "";
for (const key of keys) {
- result.push({ name: key, entryKey: key, entry: entries[key]! });
+ result.push({ name: `${prefix}${key}`, entryKey: key, entry: entries[key]! });
}
return result;
}
@@ -247,7 +252,7 @@ async function resolveToolsFromEvent(
if (outcome.value === null) continue;
const { resolver, entries, isSingle } = outcome.value;
- const named = qualifyDynamicToolNames(resolver.slug, isSingle, entries);
+ const named = qualifyDynamicToolNames(resolver, isSingle, entries);
for (const { name, entryKey, entry } of named) {
const previousOwner = dynamicToolOwners.get(name);
if (previousOwner !== undefined && previousOwner !== resolver.slug) {
diff --git a/packages/eve/src/discover/agent.integration.test.ts b/packages/eve/src/discover/agent.integration.test.ts
index 904ccbb86..24302c877 100644
--- a/packages/eve/src/discover/agent.integration.test.ts
+++ b/packages/eve/src/discover/agent.integration.test.ts
@@ -1,9 +1,20 @@
+import { resolve } from "node:path";
+
import { describe, expect, it } from "vitest";
import { buildMemoryAgentProject } from "#internal/testing/memory-agent-source.js";
import { discoverAgent } from "#discover/discover-agent.js";
+import {
+ DISCOVER_EXTENSION_EVE_INCOMPATIBLE,
+ DISCOVER_EXTENSION_MOUNT_AMBIGUOUS,
+ DISCOVER_EXTENSION_MOUNT_MISSING_DECLARATION,
+ DISCOVER_EXTENSION_NESTED_MOUNT_UNSUPPORTED,
+ DISCOVER_EXTENSION_OVERRIDE_OUTSIDE_MOUNT,
+ DISCOVER_EXTENSION_SCHEDULE_UNSUPPORTED,
+} from "#discover/extensions.js";
import {
DISCOVER_DEPRECATED_SYSTEM_SLOT,
+ DISCOVER_EXTENSION_NAME_INVALID,
DISCOVER_HOOK_NAME_INVALID,
DISCOVER_MODULE_SLOT_COLLISION,
DISCOVER_REQUIRED_INSTRUCTIONS_MISSING,
@@ -578,4 +589,480 @@ describe("discoverAgent (memory)", () => {
);
expect(result.manifest.hooks).toEqual([]);
});
+
+ it("discovers extension mounts as flat module sources keyed by the mount namespace", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ }),
+ "node_modules/@acme/crm/ext/tools/search.ts": "export default {};\n",
+ "node_modules/@acme/gizmo/package.json": JSON.stringify({
+ name: "@acme/gizmo",
+ eve: { extension: "ext" },
+ }),
+ "node_modules/@acme/gizmo/ext/tools/search.ts": "export default {};\n",
+ },
+ agentFiles: {
+ "extensions/crm.ts": 'export { default } from "@acme/crm";\n',
+ "extensions/gizmo.ts": 'export { default } from "@acme/gizmo";\n',
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ expect(result.diagnostics).toEqual([]);
+ expect(result.manifest.extensions).toEqual([
+ {
+ sourceKind: "module",
+ logicalPath: "extensions/crm.ts",
+ sourceId: "extensions/crm.ts",
+ },
+ {
+ sourceKind: "module",
+ logicalPath: "extensions/gizmo.ts",
+ sourceId: "extensions/gizmo.ts",
+ },
+ ]);
+ expect(result.manifest.resolvedExtensions.map((mount) => mount.namespace)).toEqual([
+ "crm",
+ "gizmo",
+ ]);
+ });
+
+ it("rejects extension mount filenames that violate the namespace charset", async () => {
+ const project = buildMemoryAgentProject({
+ agentFiles: {
+ "extensions/123-invalid.ts": "export default {};\n",
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ expect(result.diagnostics.map((diagnostic) => diagnostic.code)).toContain(
+ DISCOVER_EXTENSION_NAME_INVALID,
+ );
+ expect(result.manifest.extensions).toEqual([]);
+ });
+
+ it("resolves a mounted extension package to its discovered source tree", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ }),
+ "node_modules/@acme/crm/ext/tools/search.ts":
+ 'throw new Error("extension modules should not execute during discovery");\n',
+ "node_modules/@acme/crm/ext/instructions/policy.md": "Use the CRM before guessing.",
+ },
+ agentFiles: {
+ "extensions/crm.ts": 'export { default } from "@acme/crm";\n',
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ expect(result.diagnostics).toEqual([]);
+ expect(result.manifest.resolvedExtensions).toHaveLength(1);
+ const mount = result.manifest.resolvedExtensions[0]!;
+ expect(mount.namespace).toBe("crm");
+ expect(mount.specifier).toBe("@acme/crm");
+ expect(mount.packageName).toBe("@acme/crm");
+ expect(mount.manifest.tools).toEqual([
+ { sourceKind: "module", logicalPath: "tools/search.ts", sourceId: "tools/search.ts" },
+ ]);
+ expect(mount.manifest.instructions.map((entry) => entry.logicalPath)).toEqual([
+ "instructions/policy.md",
+ ]);
+ expect(mount.manifest.resolvedExtensions).toEqual([]);
+ });
+
+ it("rejects an extension package that declares agent config", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ }),
+ "node_modules/@acme/crm/ext/agent.ts":
+ 'export default { model: "anthropic/claude-sonnet-5" };\n',
+ "node_modules/@acme/crm/ext/tools/search.ts": "export default {};\n",
+ },
+ agentFiles: {
+ "extensions/crm.ts": 'export { default } from "@acme/crm";\n',
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ expect(result.diagnostics.map((diagnostic) => diagnostic.code)).toContain(
+ "discover/extension-agent-config-unsupported",
+ );
+ });
+
+ it("reports an unresolved mount when the extension package is missing", async () => {
+ const project = buildMemoryAgentProject({
+ agentFiles: {
+ "extensions/crm.ts": 'export { default } from "@acme/missing";\n',
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ expect(result.diagnostics.map((diagnostic) => diagnostic.code)).toContain(
+ "discover/extension-mount-unresolved",
+ );
+ expect(result.manifest.resolvedExtensions).toEqual([]);
+ });
+
+ it("resolves a directory-form extension mount and composes the extension's tools", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ }),
+ "node_modules/@acme/crm/ext/tools/search.ts":
+ 'throw new Error("extension modules should not execute during discovery");\n',
+ },
+ agentFiles: {
+ "extensions/crm/extension.ts": 'export { default } from "@acme/crm";\n',
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ expect(result.diagnostics).toEqual([]);
+ expect(result.manifest.extensions).toEqual([
+ {
+ sourceKind: "module",
+ logicalPath: "extensions/crm/extension.ts",
+ sourceId: "extensions/crm/extension.ts",
+ },
+ ]);
+ expect(result.manifest.resolvedExtensions).toHaveLength(1);
+ const mount = result.manifest.resolvedExtensions[0]!;
+ expect(mount.namespace).toBe("crm");
+ expect(mount.specifier).toBe("@acme/crm");
+ expect(mount.manifest.tools).toEqual([
+ { sourceKind: "module", logicalPath: "tools/search.ts", sourceId: "tools/search.ts" },
+ ]);
+ // A directory mount always carries an overrides manifest (the mount dir is
+ // itself an agent-shaped source); with no override slots authored it is
+ // empty and composes to nothing.
+ expect(mount.overrides?.agentRoot).toBe(resolve(project.agentRoot, "extensions", "crm"));
+ expect(mount.overrides?.tools).toEqual([]);
+ });
+
+ it("carries a directory-mount override slot that shadows the extension's contribution", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ }),
+ "node_modules/@acme/crm/ext/tools/search.ts":
+ 'throw new Error("extension modules should not execute during discovery");\n',
+ },
+ agentFiles: {
+ "extensions/crm/extension.ts": 'export { default } from "@acme/crm";\n',
+ "extensions/crm/tools/search.ts":
+ 'throw new Error("override modules should not execute during discovery");\n',
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ expect(result.diagnostics).toEqual([]);
+ const mount = result.manifest.resolvedExtensions[0]!;
+ // The extension's own tree still carries its `search` tool from the package.
+ expect(mount.manifest.tools).toEqual([
+ { sourceKind: "module", logicalPath: "tools/search.ts", sourceId: "tools/search.ts" },
+ ]);
+ // The consumer's override slot is discovered as an agent-shaped source so
+ // the compiler can compose it under `crm__search` with consumer priority.
+ expect(mount.overrides?.tools).toEqual([
+ { sourceKind: "module", logicalPath: "tools/search.ts", sourceId: "tools/search.ts" },
+ ]);
+ // The override manifest is rooted at the mount directory — that root is
+ // what rebases the override's module to the consumer's file, not the
+ // extension package.
+ expect(mount.overrides?.agentRoot).toBe(resolve(project.agentRoot, "extensions", "crm"));
+ });
+
+ it("reports an ambiguous mount when a namespace is both a file and a directory", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ }),
+ "node_modules/@acme/crm/ext/tools/search.ts": "export default {};\n",
+ },
+ agentFiles: {
+ "extensions/crm.ts": 'export { default } from "@acme/crm";\n',
+ "extensions/crm/extension.ts": 'export { default } from "@acme/crm";\n',
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ expect(result.diagnostics.map((diagnostic) => diagnostic.code)).toContain(
+ DISCOVER_EXTENSION_MOUNT_AMBIGUOUS,
+ );
+ // The ambiguous namespace is dropped from both forms rather than resolved.
+ expect(result.manifest.resolvedExtensions).toEqual([]);
+ expect(
+ result.manifest.extensions.some((entry) => entry.logicalPath.startsWith("extensions/crm")),
+ ).toBe(false);
+ });
+
+ it("reports a directory mount missing its extension declaration", async () => {
+ const project = buildMemoryAgentProject({
+ agentFiles: {
+ "extensions/crm/tools/search.ts": "export default {};\n",
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ expect(result.diagnostics.map((diagnostic) => diagnostic.code)).toContain(
+ DISCOVER_EXTENSION_MOUNT_MISSING_DECLARATION,
+ );
+ expect(result.manifest.resolvedExtensions).toEqual([]);
+ });
+
+ it("rejects an agent-root tool that overrides a mounted extension's namespace", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ }),
+ "node_modules/@acme/crm/ext/tools/search.ts": "export default {};\n",
+ },
+ agentFiles: {
+ "extensions/crm.ts": 'export { default } from "@acme/crm";\n',
+ // A root tool using the mounted `crm__` prefix would shadow the
+ // extension from outside its mount directory.
+ "tools/crm__search.ts": "export default {};\n",
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ const collision = result.diagnostics.find(
+ (diagnostic) => diagnostic.code === DISCOVER_EXTENSION_OVERRIDE_OUTSIDE_MOUNT,
+ );
+ expect(collision).toBeDefined();
+ expect(collision?.message).toContain("extensions/crm/");
+ });
+
+ it("rejects a mounted extension whose eve peer range the app does not satisfy", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ peerDependencies: { eve: "^2" },
+ }),
+ "node_modules/@acme/crm/ext/extension.ts": "export default {};\n",
+ "node_modules/@acme/crm/ext/tools/search.ts": "export default {};\n",
+ },
+ agentFiles: {
+ "extensions/crm.ts": 'export { default } from "@acme/crm";\n',
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ eveVersion: "1.4.0",
+ });
+
+ const incompatible = result.diagnostics.find(
+ (diagnostic) => diagnostic.code === DISCOVER_EXTENSION_EVE_INCOMPATIBLE,
+ );
+ expect(incompatible).toBeDefined();
+ expect(incompatible?.message).toContain("^2");
+ expect(incompatible?.message).toContain("1.4.0");
+ expect(result.manifest.resolvedExtensions).toEqual([]);
+ });
+
+ it("mounts an extension when the app's eve satisfies its peer range", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ peerDependencies: { eve: "^2" },
+ }),
+ "node_modules/@acme/crm/ext/extension.ts": "export default {};\n",
+ "node_modules/@acme/crm/ext/tools/search.ts": "export default {};\n",
+ },
+ agentFiles: {
+ "extensions/crm.ts": 'export { default } from "@acme/crm";\n',
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ eveVersion: "2.3.0",
+ });
+
+ expect(
+ result.diagnostics.some(
+ (diagnostic) => diagnostic.code === DISCOVER_EXTENSION_EVE_INCOMPATIBLE,
+ ),
+ ).toBe(false);
+ expect(result.manifest.resolvedExtensions).toHaveLength(1);
+ });
+
+ it("rejects an extension that declares schedules", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ }),
+ "node_modules/@acme/crm/ext/extension.ts": "export default {};\n",
+ // Background scheduling is the consuming agent's to own, not an extension's.
+ "node_modules/@acme/crm/ext/schedules/sweep.md": '---\ncron: "0 9 * * *"\n---\nSweep.',
+ },
+ agentFiles: {
+ "extensions/crm.ts": 'export { default } from "@acme/crm";\n',
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ expect(result.diagnostics.map((diagnostic) => diagnostic.code)).toContain(
+ DISCOVER_EXTENSION_SCHEDULE_UNSUPPORTED,
+ );
+ });
+
+ it("rejects an extension that mounts another extension", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ }),
+ "node_modules/@acme/crm/ext/extension.ts": "export default {};\n",
+ "node_modules/@acme/crm/ext/tools/search.ts": "export default {};\n",
+ // The mounted extension itself tries to mount another extension — not
+ // supported yet, so discovery must reject it rather than drop it.
+ "node_modules/@acme/crm/ext/extensions/inner.ts":
+ 'export { default } from "@acme/inner";\n',
+ },
+ agentFiles: {
+ "extensions/crm.ts": 'export { default } from "@acme/crm";\n',
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ const nested = result.diagnostics.find(
+ (diagnostic) => diagnostic.code === DISCOVER_EXTENSION_NESTED_MOUNT_UNSUPPORTED,
+ );
+ expect(nested).toBeDefined();
+ expect(nested?.message).toContain("extensions/inner");
+ });
+
+ it("allows an agent-root tool whose name does not use a mounted namespace prefix", async () => {
+ const project = buildMemoryAgentProject({
+ appFiles: {
+ "node_modules/@acme/crm/package.json": JSON.stringify({
+ name: "@acme/crm",
+ eve: { extension: "ext" },
+ }),
+ "node_modules/@acme/crm/ext/tools/search.ts": "export default {};\n",
+ },
+ agentFiles: {
+ "extensions/crm.ts": 'export { default } from "@acme/crm";\n',
+ // Not a `crm__` prefix, so it is a normal consumer tool.
+ "tools/crm_helper.ts": "export default {};\n",
+ "instructions.md": "You are a precise assistant.",
+ },
+ });
+
+ const result = await discoverAgent({
+ agentRoot: project.agentRoot,
+ appRoot: project.appRoot,
+ source: project.source,
+ });
+
+ expect(
+ result.diagnostics.some(
+ (diagnostic) => diagnostic.code === DISCOVER_EXTENSION_OVERRIDE_OUTSIDE_MOUNT,
+ ),
+ ).toBe(false);
+ });
});
diff --git a/packages/eve/src/discover/discover-agent.ts b/packages/eve/src/discover/discover-agent.ts
index 21074fc99..0677f971b 100644
--- a/packages/eve/src/discover/discover-agent.ts
+++ b/packages/eve/src/discover/discover-agent.ts
@@ -1,15 +1,32 @@
import { join, resolve } from "node:path";
import { discoverConnectionSources } from "#discover/connections.js";
-import type { DiscoverDiagnostic } from "#discover/diagnostics.js";
+import { createDiscoverErrorDiagnostic, type DiscoverDiagnostic } from "#discover/diagnostics.js";
import { discoverSubagents } from "#discover/discover-subagent.js";
-import { classifyAgentRootEntry } from "#discover/filesystem.js";
+import {
+ DISCOVER_EXTENSION_AGENT_CONFIG_UNSUPPORTED,
+ DISCOVER_EXTENSION_MOUNT_AMBIGUOUS,
+ DISCOVER_EXTENSION_MOUNT_MISSING_DECLARATION,
+ DISCOVER_EXTENSION_NESTED_MOUNT_UNSUPPORTED,
+ DISCOVER_EXTENSION_OVERRIDE_OUTSIDE_MOUNT,
+ DISCOVER_EXTENSION_SANDBOX_UNSUPPORTED,
+ DISCOVER_EXTENSION_SCHEDULE_UNSUPPORTED,
+ locateExtensionMount,
+ mountNamespace,
+} from "#discover/extensions.js";
+import {
+ classifyAgentRootEntry,
+ normalizeLogicalPath,
+ SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS,
+} from "#discover/filesystem.js";
import {
createChannelNameDiagnostic,
+ createExtensionNameDiagnostic,
createHookNameDiagnostic,
createToolNameDiagnostic,
createUnsupportedRootDirectoryDiagnostics,
DISCOVER_CHANNELS_DIRECTORY_INVALID,
+ DISCOVER_EXTENSIONS_DIRECTORY_INVALID,
DISCOVER_HOOKS_DIRECTORY_INVALID,
DISCOVER_TOOLS_DIRECTORY_INVALID,
discoverFlatModuleSource,
@@ -22,11 +39,19 @@ import {
type AgentSourceManifest,
type CreateAgentSourceManifestInput,
createAgentSourceManifest,
+ createModuleSourceRef,
+ type ExtensionSourceRef,
+ type ResolvedExtensionMount,
} from "#discover/manifest.js";
-import { createDiskProjectSource, type ProjectSource } from "#discover/project-source.js";
+import {
+ createDiskProjectSource,
+ type ProjectSource,
+ type ProjectSourceEntry,
+} from "#discover/project-source.js";
import { discoverSandboxSource } from "#discover/sandbox.js";
import { discoverScheduleSources } from "#discover/schedules.js";
import { discoverSkills } from "#discover/skills.js";
+import { resolveInstalledPackageInfo } from "#internal/application/package.js";
import { stripNpmPackageScope } from "#shared/package-name.js";
/**
@@ -42,6 +67,19 @@ interface DiscoverAgentInput {
* memory-backed source.
*/
source?: ProjectSource;
+ /**
+ * Discovery role. `"agent"` (default) resolves mounted extensions and
+ * accepts agent-level config. `"extension"` discovers an extension's own
+ * source tree: it rejects `agent.ts`/`sandbox` (consumer-owned) and does
+ * not resolve further extensions (transitive mounting is a non-goal).
+ */
+ role?: "agent" | "extension";
+ /**
+ * The app's eve version, checked against each mounted extension's
+ * `peerDependencies.eve`. Defaults to the running eve's version; injectable
+ * for tests.
+ */
+ eveVersion?: string;
}
/**
@@ -60,6 +98,8 @@ export async function discoverAgent(input: DiscoverAgentInput): Promise<Discover
const source = input.source ?? createDiskProjectSource();
const appRoot = resolve(input.appRoot);
const agentRoot = resolve(input.agentRoot);
+ const role = input.role ?? "agent";
+ const eveVersion = input.eveVersion ?? resolveInstalledPackageInfo().version;
const diagnostics: DiscoverDiagnostic[] = [];
const packageName = await tryReadPackageJsonName(source, appRoot);
const rootEntries = await readSortedDirectoryEntries(source, agentRoot);
@@ -79,6 +119,7 @@ export async function discoverAgent(input: DiscoverAgentInput): Promise<Discover
rootEntries,
rootPath: agentRoot,
source,
+ required: role !== "extension",
});
diagnostics.push(...instructionsResult.diagnostics);
@@ -129,6 +170,39 @@ export async function discoverAgent(input: DiscoverAgentInput): Promise<Discover
});
diagnostics.push(...sandboxResult.diagnostics);
+ if (role === "extension") {
+ if (configModuleResult.module !== undefined) {
+ diagnostics.push(
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_AGENT_CONFIG_UNSUPPORTED,
+ message:
+ "An extension may not declare agent config (agent.ts) — model, limits, and sandbox are the consuming agent's to own.",
+ sourcePath: join(agentRoot, configModuleResult.module.logicalPath),
+ }),
+ );
+ }
+ if (sandboxResult.sandbox !== null) {
+ diagnostics.push(
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_SANDBOX_UNSUPPORTED,
+ message: "An extension may not declare a sandbox — it is the consuming agent's to own.",
+ sourcePath: join(agentRoot, sandboxResult.sandbox.logicalPath),
+ }),
+ );
+ }
+ const [firstSchedule] = schedulesResult.schedules;
+ if (firstSchedule !== undefined) {
+ diagnostics.push(
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_SCHEDULE_UNSUPPORTED,
+ message:
+ "An extension may not declare schedules — background scheduling runs on the consuming agent's deployment under its limits, so it is the consuming agent's to own.",
+ sourcePath: join(agentRoot, firstSchedule.logicalPath),
+ }),
+ );
+ }
+ }
+
const toolsResult = await discoverNamedSourceDirectory({
directoryName: "tools",
invalidDirectoryCode: DISCOVER_TOOLS_DIRECTORY_INVALID,
@@ -153,6 +227,18 @@ export async function discoverAgent(input: DiscoverAgentInput): Promise<Discover
});
diagnostics.push(...hooksResult.diagnostics);
+ const extensionsResult = await discoverNamedSourceDirectory({
+ directoryName: "extensions",
+ invalidDirectoryCode: DISCOVER_EXTENSIONS_DIRECTORY_INVALID,
+ invalidDirectoryMessage: `Expected "${join(agentRoot, "extensions")}" to be a directory of extension mounts.`,
+ recursive: false,
+ rootEntries,
+ rootPath: agentRoot,
+ source,
+ validateSegment: createExtensionNameDiagnostic,
+ });
+ diagnostics.push(...extensionsResult.diagnostics);
+
const skillsResult = await discoverSkills({
agentRoot,
source,
@@ -166,6 +252,98 @@ export async function discoverAgent(input: DiscoverAgentInput): Promise<Discover
});
diagnostics.push(...subagentsResult.diagnostics);
+ const mountCollection = await collectExtensionMounts({
+ agentRoot,
+ fileMounts: extensionsResult.sources,
+ rootEntries,
+ source,
+ });
+ diagnostics.push(...mountCollection.diagnostics);
+
+ // Overrides must be co-located in the mount directory. An agent-root
+ // contribution using a mounted extension's `<ns>__` composed-name prefix would
+ // shadow that extension from outside its mount directory, so reject it.
+ diagnostics.push(
+ ...detectRootNamespaceCollisions({
+ agentRoot,
+ namespaces: mountCollection.mounts.map((descriptor) => descriptor.namespace),
+ sources: [
+ ...toolsResult.sources,
+ ...connectionsResult.connections,
+ ...skillsResult.skills,
+ ...schedulesResult.schedules,
+ ],
+ }),
+ );
+
+ const resolvedExtensions: ResolvedExtensionMount[] = [];
+ if (role !== "agent") {
+ // Extensions cannot mount other extensions yet. Fail loudly instead of
+ // silently dropping the nested mount, and reserve the behavior so enabling
+ // it later is additive.
+ for (const descriptor of mountCollection.mounts) {
+ diagnostics.push(
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_NESTED_MOUNT_UNSUPPORTED,
+ message: `"${descriptor.mountRef.logicalPath}" mounts an extension from inside an extension, which is not supported yet. Extensions cannot mount other extensions; remove the "extensions/" slot.`,
+ sourcePath: join(agentRoot, descriptor.mountRef.logicalPath),
+ }),
+ );
+ }
+ } else {
+ for (const descriptor of mountCollection.mounts) {
+ const located = await locateExtensionMount({
+ source,
+ agentRoot,
+ appRoot,
+ mount: descriptor.mountRef,
+ namespace: descriptor.namespace,
+ eveVersion,
+ });
+ diagnostics.push(...located.diagnostics);
+ if (located.location === undefined) {
+ continue;
+ }
+
+ const extensionResult = await discoverAgent({
+ agentRoot: located.location.sourceRoot,
+ appRoot: located.location.packageRoot,
+ source,
+ role: "extension",
+ });
+ diagnostics.push(...extensionResult.diagnostics);
+
+ // The mount directory's override slots discover as an agent-shaped source;
+ // its `extension.<ext>` declaration matches no slot, so it is ignored here.
+ let overrides: AgentSourceManifest | undefined;
+ if (descriptor.overridesRoot !== undefined) {
+ const overridesResult = await discoverAgent({
+ agentRoot: descriptor.overridesRoot,
+ appRoot,
+ source,
+ role: "extension",
+ });
+ diagnostics.push(...overridesResult.diagnostics);
+ overrides = overridesResult.manifest;
+ }
+
+ const resolved: { -readonly [K in keyof ResolvedExtensionMount]: ResolvedExtensionMount[K] } =
+ {
+ namespace: located.location.namespace,
+ specifier: located.location.specifier,
+ packageName: located.location.packageName,
+ packageRoot: located.location.packageRoot,
+ sourceRoot: located.location.sourceRoot,
+ manifest: extensionResult.manifest,
+ };
+ if (overrides !== undefined) {
+ resolved.overrides = overrides;
+ }
+
+ resolvedExtensions.push(resolved);
+ }
+ }
+
const manifestInput: CreateAgentSourceManifestInput = {
agentRoot,
appRoot,
@@ -173,6 +351,8 @@ export async function discoverAgent(input: DiscoverAgentInput): Promise<Discover
connections: connectionsResult.connections,
packageName,
diagnostics,
+ extensions: mountCollection.mounts.map((descriptor) => descriptor.mountRef),
+ resolvedExtensions,
hooks: hooksResult.sources,
lib: libResult.lib,
instructions: instructionsResult.instructions,
@@ -197,6 +377,169 @@ export async function discoverAgent(input: DiscoverAgentInput): Promise<Discover
};
}
+/**
+ * One extension mount discovered under `agent/extensions/`, in either the flat
+ * file form (`extensions/crm.ts`) or the directory form
+ * (`extensions/crm/extension.ts` with optional override slots).
+ */
+interface ExtensionMountDescriptor {
+ /** Mount namespace prefixed onto every composed contribution. */
+ readonly namespace: string;
+ /** Module ref for the mount declaration the package specifier is read from. */
+ readonly mountRef: ExtensionSourceRef;
+ /**
+ * Absolute path to the mount directory when this is the directory form.
+ * Its override slots are discovered as an agent-shaped source. Absent for
+ * the flat file form.
+ */
+ readonly overridesRoot?: string;
+}
+
+/**
+ * Collects extension mounts in both the flat file form and the directory form,
+ * validating directory names and rejecting a namespace claimed by both forms.
+ *
+ * File mounts arrive pre-validated from {@link discoverNamedSourceDirectory}
+ * (which, run non-recursively, ignores subdirectories); directory mounts are
+ * gathered here by scanning the `extensions/` entries for subdirectories, each
+ * of which must hold an `extension.<ext>` declaration.
+ */
+async function collectExtensionMounts(input: {
+ readonly agentRoot: string;
+ readonly fileMounts: readonly ExtensionSourceRef[];
+ readonly rootEntries: readonly ProjectSourceEntry[];
+ readonly source: ProjectSource;
+}): Promise<{
+ diagnostics: DiscoverDiagnostic[];
+ mounts: ExtensionMountDescriptor[];
+}> {
+ const diagnostics: DiscoverDiagnostic[] = [];
+ const extensionsRoot = join(input.agentRoot, "extensions");
+
+ const fileDescriptors: ExtensionMountDescriptor[] = input.fileMounts.map((mountRef) => ({
+ namespace: mountNamespace(mountRef.logicalPath),
+ mountRef,
+ }));
+ const fileNamespaces = new Set(fileDescriptors.map((descriptor) => descriptor.namespace));
+
+ const extensionsEntry = input.rootEntries.find((entry) => entry.name === "extensions");
+ const directoryDescriptors: ExtensionMountDescriptor[] = [];
+ const ambiguousNamespaces = new Set<string>();
+
+ if (extensionsEntry?.isDirectory() === true) {
+ const entries = await readSortedDirectoryEntries(input.source, extensionsRoot);
+ for (const entry of entries) {
+ if (!entry.isDirectory()) {
+ continue;
+ }
+
+ const namespace = entry.name;
+ const mountDir = join(extensionsRoot, namespace);
+ const nameDiagnostic = createExtensionNameDiagnostic(namespace, mountDir);
+ if (nameDiagnostic !== null) {
+ diagnostics.push(nameDiagnostic);
+ continue;
+ }
+
+ const declarationResult = discoverFlatModuleSource({
+ rootEntries: await readSortedDirectoryEntries(input.source, mountDir),
+ rootPath: mountDir,
+ slotName: "extension",
+ });
+ diagnostics.push(...declarationResult.diagnostics);
+
+ if (declarationResult.module === undefined) {
+ diagnostics.push(
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_MOUNT_MISSING_DECLARATION,
+ message: `Extension mount directory "extensions/${namespace}/" must declare its mount in "extension.ts" (or another supported module extension).`,
+ sourcePath: mountDir,
+ }),
+ );
+ continue;
+ }
+
+ if (fileNamespaces.has(namespace)) {
+ ambiguousNamespaces.add(namespace);
+ }
+
+ directoryDescriptors.push({
+ namespace,
+ mountRef: createModuleSourceRef({
+ logicalPath: normalizeLogicalPath(
+ join("extensions", namespace, declarationResult.module.logicalPath),
+ ),
+ }),
+ overridesRoot: mountDir,
+ });
+ }
+ }
+
+ for (const namespace of ambiguousNamespaces) {
+ diagnostics.push(
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_MOUNT_AMBIGUOUS,
+ message: `Extension namespace "${namespace}" is claimed by both a file mount ("extensions/${namespace}.ts") and a directory mount ("extensions/${namespace}/"). Keep only one.`,
+ sourcePath: extensionsRoot,
+ }),
+ );
+ }
+
+ const mounts = [...fileDescriptors, ...directoryDescriptors].filter(
+ (descriptor) => !ambiguousNamespaces.has(descriptor.namespace),
+ );
+
+ return { diagnostics, mounts };
+}
+
+/**
+ * Flags agent-root contributions whose composed name uses a mounted extension's
+ * `<ns>__` prefix. That prefix is reserved for the extension and its co-located
+ * overrides, so a root-level `<ns>__…` file would override the extension from
+ * outside its mount directory — rejected here.
+ */
+function detectRootNamespaceCollisions(input: {
+ readonly agentRoot: string;
+ readonly namespaces: readonly string[];
+ readonly sources: ReadonlyArray<{ readonly logicalPath: string }>;
+}): DiscoverDiagnostic[] {
+ if (input.namespaces.length === 0) {
+ return [];
+ }
+
+ const diagnostics: DiscoverDiagnostic[] = [];
+ for (const source of input.sources) {
+ const name = rootContributionName(source.logicalPath);
+ const namespace = input.namespaces.find((candidate) => name.startsWith(`${candidate}__`));
+ if (namespace !== undefined) {
+ diagnostics.push(
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_OVERRIDE_OUTSIDE_MOUNT,
+ message: `"${source.logicalPath}" uses the "${namespace}__" prefix reserved for the mounted extension "${namespace}". Override an extension's contributions inside its mount directory ("extensions/${namespace}/…"), not at the agent root.`,
+ sourcePath: join(input.agentRoot, source.logicalPath),
+ }),
+ );
+ }
+ }
+ return diagnostics;
+}
+
+/**
+ * Derives a contribution's composed name from its slot-relative logical path:
+ * the first path segment below the slot directory, minus any module extension
+ * (`tools/crm__x.ts` → `crm__x`; `skills/crm__x/SKILL.md` → `crm__x`).
+ */
+function rootContributionName(logicalPath: string): string {
+ const afterSlot = logicalPath.slice(logicalPath.indexOf("/") + 1);
+ const firstSegment = afterSlot.split("/")[0] ?? afterSlot;
+ for (const extension of SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS) {
+ if (firstSegment.toLowerCase().endsWith(extension)) {
+ return firstSegment.slice(0, firstSegment.length - extension.length);
+ }
+ }
+ return firstSegment;
+}
+
/**
* Reads the `name` field from the app root's package.json through `source`
* and strips the npm scope prefix when present (e.g. `"@org/my-agent"` →
diff --git a/packages/eve/src/discover/extension-specifier.test.ts b/packages/eve/src/discover/extension-specifier.test.ts
new file mode 100644
index 000000000..685cbf6be
--- /dev/null
+++ b/packages/eve/src/discover/extension-specifier.test.ts
@@ -0,0 +1,50 @@
+import { describe, expect, it } from "vitest";
+
+import { parseExtensionMountSpecifier } from "#discover/extension-specifier.js";
+
+describe("parseExtensionMountSpecifier", () => {
+ it("reads a bare default re-export", () => {
+ expect(parseExtensionMountSpecifier('export { default } from "@acme/crm";')).toBe("@acme/crm");
+ });
+
+ it("reads the factory form with a named import", () => {
+ const source = [
+ 'import { crm } from "@acme/crm";',
+ "export default crm({ apiKey: process.env.CRM_API_KEY });",
+ ].join("\n");
+ expect(parseExtensionMountSpecifier(source)).toBe("@acme/crm");
+ });
+
+ it("reads the factory form with a default import", () => {
+ const source = ['import crm from "@acme/crm";', "export default crm();"].join("\n");
+ expect(parseExtensionMountSpecifier(source)).toBe("@acme/crm");
+ });
+
+ it("resolves the aliased named import that binds the exported value", () => {
+ const source = [
+ 'import { search } from "eve/tools";',
+ 'import { crm as mount } from "@acme/crm";',
+ "export default mount({});",
+ ].join("\n");
+ expect(parseExtensionMountSpecifier(source)).toBe("@acme/crm");
+ });
+
+ it("does not confuse an unrelated import with the mounted one", () => {
+ const source = [
+ 'import { z } from "zod";',
+ 'import { crm } from "@acme/crm";',
+ "export default crm();",
+ ].join("\n");
+ expect(parseExtensionMountSpecifier(source)).toBe("@acme/crm");
+ });
+
+ it("preserves a specifier that contains slashes", () => {
+ expect(parseExtensionMountSpecifier('export { default } from "@acme/crm/mount";')).toBe(
+ "@acme/crm/mount",
+ );
+ });
+
+ it("returns null when no mount shape is present", () => {
+ expect(parseExtensionMountSpecifier("export const value = 1;")).toBeNull();
+ });
+});
diff --git a/packages/eve/src/discover/extension-specifier.ts b/packages/eve/src/discover/extension-specifier.ts
new file mode 100644
index 000000000..e183dc5e5
--- /dev/null
+++ b/packages/eve/src/discover/extension-specifier.ts
@@ -0,0 +1,53 @@
+function escapeRegExp(value: string): string {
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
+}
+
+/**
+ * Statically extracts the extension package specifier a mount file resolves to,
+ * without importing the module. Discovery reads only the import that binds the
+ * value the mount re-exports, so it can locate the package while honoring the
+ * "never import authored modules" invariant.
+ *
+ * Supported mount forms:
+ * - `export { default } from "@acme/crm";`
+ * - `import { crm } from "@acme/crm"; export default crm({ ... });`
+ * - `import crm from "@acme/crm"; export default crm();`
+ *
+ * Returns the specifier string, or `null` when the file does not match a
+ * recognized mount shape.
+ */
+export function parseExtensionMountSpecifier(source: string): string | null {
+ const reExport = source.match(/export\s*\{[^}]*\bdefault\b[^}]*\}\s*from\s*['"]([^'"]+)['"]/);
+ if (reExport !== null) {
+ return reExport[1] ?? null;
+ }
+
+ const factory = source.match(/export\s+default\s+([A-Za-z_$][\w$]*)\s*[(;\n]/);
+ const boundName = factory?.[1];
+ if (boundName === undefined) {
+ return null;
+ }
+
+ const defaultImport = source.match(
+ new RegExp(
+ `import\\s+${escapeRegExp(boundName)}\\s*(?:,\\s*\\{[^}]*\\})?\\s*from\\s*['"]([^'"]+)['"]`,
+ ),
+ );
+ if (defaultImport !== null) {
+ return defaultImport[1] ?? null;
+ }
+
+ const namedImport = /import\s*(?:[A-Za-z_$][\w$]*\s*,\s*)?\{([^}]*)\}\s*from\s*['"]([^'"]+)['"]/g;
+ for (let match = namedImport.exec(source); match !== null; match = namedImport.exec(source)) {
+ const clause = match[1] ?? "";
+ for (const entry of clause.split(",")) {
+ const parts = entry.trim().split(/\s+as\s+/);
+ const local = (parts[1] ?? parts[0] ?? "").trim();
+ if (local === boundName) {
+ return match[2] ?? null;
+ }
+ }
+ }
+
+ return null;
+}
diff --git a/packages/eve/src/discover/extensions.test.ts b/packages/eve/src/discover/extensions.test.ts
new file mode 100644
index 000000000..69a321178
--- /dev/null
+++ b/packages/eve/src/discover/extensions.test.ts
@@ -0,0 +1,28 @@
+import { describe, expect, it } from "vitest";
+
+import { mountNamespace, packageStateNamespace } from "#discover/extensions.js";
+
+describe("mountNamespace", () => {
+ it("derives the namespace from the mount filename", () => {
+ expect(mountNamespace("extensions/crm.ts")).toBe("crm");
+ expect(mountNamespace("extensions/toolkit.mts")).toBe("toolkit");
+ });
+});
+
+describe("packageStateNamespace", () => {
+ it("keeps a plain package name", () => {
+ expect(packageStateNamespace("toolkit-extension")).toBe("toolkit-extension");
+ });
+
+ it("flattens a scoped package name", () => {
+ expect(packageStateNamespace("@acme/crm")).toBe("acme-crm");
+ });
+
+ it("replaces characters that are unsafe in a key segment", () => {
+ expect(packageStateNamespace("@acme/crm.tools")).toBe("acme-crm.tools");
+ });
+
+ it("falls back to a stable token for a degenerate name", () => {
+ expect(packageStateNamespace("@")).toBe("extension");
+ });
+});
diff --git a/packages/eve/src/discover/extensions.ts b/packages/eve/src/discover/extensions.ts
new file mode 100644
index 000000000..a293bdee2
--- /dev/null
+++ b/packages/eve/src/discover/extensions.ts
@@ -0,0 +1,310 @@
+import { dirname, isAbsolute, join, resolve } from "node:path";
+
+import semver from "#compiled/semver/index.js";
+import { createDiscoverErrorDiagnostic, type DiscoverDiagnostic } from "#discover/diagnostics.js";
+import { parseExtensionMountSpecifier } from "#discover/extension-specifier.js";
+import { SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS } from "#discover/filesystem.js";
+import type { ExtensionSourceRef } from "#discover/manifest.js";
+import type { ProjectSource } from "#discover/project-source.js";
+
+/**
+ * Emitted when a mount file cannot be resolved to an extension package.
+ */
+export const DISCOVER_EXTENSION_MOUNT_UNRESOLVED = "discover/extension-mount-unresolved";
+
+/**
+ * Emitted when one namespace is claimed by both a file mount
+ * (`extensions/<ns>.ts`) and a directory mount (`extensions/<ns>/`).
+ */
+export const DISCOVER_EXTENSION_MOUNT_AMBIGUOUS = "discover/extension-mount-ambiguous";
+
+/**
+ * Emitted when a directory mount (`extensions/<ns>/`) is missing its required
+ * `extension.<ext>` mount declaration.
+ */
+export const DISCOVER_EXTENSION_MOUNT_MISSING_DECLARATION =
+ "discover/extension-mount-missing-declaration";
+
+/**
+ * Emitted when an extension declares its own `extensions/` mount slot. Extensions
+ * cannot mount other extensions yet; the slot is reserved so enabling nesting
+ * later is additive rather than a surprise.
+ */
+export const DISCOVER_EXTENSION_NESTED_MOUNT_UNSUPPORTED =
+ "discover/extension-nested-mount-unsupported";
+
+/**
+ * Emitted when a consumer's agent-root contribution (e.g. `agent/tools/crm__x.ts`)
+ * uses a mounted extension's `<ns>__` prefix. That prefix is reserved for the
+ * extension and its co-located overrides, not the agent root.
+ */
+export const DISCOVER_EXTENSION_OVERRIDE_OUTSIDE_MOUNT =
+ "discover/extension-override-outside-mount";
+
+/**
+ * Emitted when a resolved package is not a valid eve extension.
+ */
+export const DISCOVER_EXTENSION_PACKAGE_INVALID = "discover/extension-package-invalid";
+
+/**
+ * Emitted when the app's eve version does not satisfy an extension's declared
+ * `peerDependencies.eve` range — the tie between an extension and the eve it was
+ * built for.
+ */
+export const DISCOVER_EXTENSION_EVE_INCOMPATIBLE = "discover/extension-eve-incompatible";
+
+/**
+ * Emitted when an extension source tree declares agent-level config (`agent.ts`),
+ * which is the consuming agent's to own.
+ */
+export const DISCOVER_EXTENSION_AGENT_CONFIG_UNSUPPORTED =
+ "discover/extension-agent-config-unsupported";
+
+/**
+ * Emitted when an extension source tree declares a `sandbox`, which is the
+ * consuming agent's to own.
+ */
+export const DISCOVER_EXTENSION_SANDBOX_UNSUPPORTED = "discover/extension-sandbox-unsupported";
+
+/**
+ * Emitted when an extension source tree declares `schedules`. Background
+ * scheduling runs sessions on the consuming agent's deployment under its limits,
+ * so it is the consuming agent's to own, not an extension's.
+ */
+export const DISCOVER_EXTENSION_SCHEDULE_UNSUPPORTED = "discover/extension-schedule-unsupported";
+
+/**
+ * Resolved on-disk location of one mounted extension package.
+ */
+export interface ExtensionMountLocation {
+ /** Mount namespace derived from the mount filename (e.g. `crm`). */
+ readonly namespace: string;
+ /** Package specifier the mount imports (e.g. `@acme/crm`). */
+ readonly specifier: string;
+ /** Package name from the resolved `package.json`, used to scope state. */
+ readonly packageName: string;
+ /** Absolute path to the resolved package root. */
+ readonly packageRoot: string;
+ /** Absolute path to the extension's agent-shaped source root. */
+ readonly sourceRoot: string;
+}
+
+/**
+ * Derives the mount namespace from an `extensions/<name>.<ext>` logical path.
+ */
+export function mountNamespace(logicalPath: string): string {
+ const base = logicalPath.slice(logicalPath.lastIndexOf("/") + 1);
+ for (const extension of SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS) {
+ if (base.toLowerCase().endsWith(extension)) {
+ return base.slice(0, base.length - extension.length);
+ }
+ }
+ return base;
+}
+
+/**
+ * Derives the mount namespace from a mount ref's `extensions/…` logical path
+ * for either mount form: the file form (`extensions/crm.ts` → `crm`) or the
+ * directory form (`extensions/crm/extension.ts` → `crm`).
+ */
+export function mountRefNamespace(logicalPath: string): string {
+ const remainder = logicalPath.replace(/^extensions\//, "");
+ const slashIndex = remainder.indexOf("/");
+ if (slashIndex !== -1) {
+ return remainder.slice(0, slashIndex);
+ }
+ return mountNamespace(logicalPath);
+}
+
+/**
+ * Derives the namespace that scopes an extension's durable state keys and config
+ * binding from its package name. Unlike the mount namespace, this stays keyed to
+ * the package (e.g. `@acme/crm` → `acme-crm`) so renaming the consumer's mount
+ * file never orphans persisted state.
+ */
+export function packageStateNamespace(packageName: string): string {
+ return (
+ packageName
+ .replace(/^@/, "")
+ .replace(/[^a-zA-Z0-9._-]+/g, "-")
+ .replace(/^-+|-+$/g, "") || "extension"
+ );
+}
+
+/**
+ * Resolves one extension mount to its package and agent-shaped source root
+ * without importing the mount module. Reads the mount source text to extract
+ * the package specifier, resolves the package, and reads
+ * `package.json#eve.extension` for the source root.
+ */
+export async function locateExtensionMount(input: {
+ readonly source: ProjectSource;
+ readonly agentRoot: string;
+ readonly appRoot: string;
+ readonly mount: ExtensionSourceRef;
+ /**
+ * Mount namespace the caller derived from the mount path — passed in because
+ * the file and directory mount forms name it at different path positions.
+ */
+ readonly namespace: string;
+ /** The app's eve version, checked against the extension's `peerDependencies.eve`. */
+ readonly eveVersion: string;
+}): Promise<{ location?: ExtensionMountLocation; diagnostics: DiscoverDiagnostic[] }> {
+ const mountPath = join(input.agentRoot, input.mount.logicalPath);
+ const { namespace } = input;
+
+ let text: string;
+ try {
+ text = await input.source.readTextFile(mountPath);
+ } catch {
+ return {
+ diagnostics: [
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_MOUNT_UNRESOLVED,
+ message: `Could not read extension mount "${input.mount.logicalPath}".`,
+ sourcePath: mountPath,
+ }),
+ ],
+ };
+ }
+
+ const specifier = parseExtensionMountSpecifier(text);
+ if (specifier === null) {
+ return {
+ diagnostics: [
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_MOUNT_UNRESOLVED,
+ message:
+ `Extension mount "${input.mount.logicalPath}" must default-export a mounted extension, ` +
+ `e.g. \`export default crm({ ... })\` or \`export { default } from "@acme/crm"\`.`,
+ sourcePath: mountPath,
+ }),
+ ],
+ };
+ }
+
+ const packageRoot = await resolvePackageRoot({
+ source: input.source,
+ appRoot: input.appRoot,
+ mountDirectory: dirname(mountPath),
+ specifier,
+ });
+ if (packageRoot === null) {
+ return {
+ diagnostics: [
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_MOUNT_UNRESOLVED,
+ message: `Could not resolve extension package "${specifier}" mounted by "${input.mount.logicalPath}".`,
+ sourcePath: mountPath,
+ }),
+ ],
+ };
+ }
+
+ const manifestPath = join(packageRoot, "package.json");
+ let pkg: { name?: unknown; eve?: { extension?: unknown }; peerDependencies?: { eve?: unknown } };
+ try {
+ pkg = JSON.parse(await input.source.readTextFile(manifestPath)) as typeof pkg;
+ } catch {
+ return {
+ diagnostics: [
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_PACKAGE_INVALID,
+ message: `Extension package "${specifier}" has no readable package.json at "${manifestPath}".`,
+ sourcePath: manifestPath,
+ }),
+ ],
+ };
+ }
+
+ const extensionRoot = pkg.eve?.extension;
+ if (typeof extensionRoot !== "string" || extensionRoot.length === 0) {
+ return {
+ diagnostics: [
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_PACKAGE_INVALID,
+ message: `Package "${specifier}" is not an eve extension: its package.json is missing the \`eve.extension\` source-root field.`,
+ sourcePath: manifestPath,
+ }),
+ ],
+ };
+ }
+
+ const packageName = typeof pkg.name === "string" && pkg.name.length > 0 ? pkg.name : specifier;
+
+ // Tie the extension to the eve it was built for. Only a real semver range is
+ // enforced; workspace/link/file protocols are resolved by the package manager.
+ const peerRange = pkg.peerDependencies?.eve;
+ if (
+ typeof peerRange === "string" &&
+ semver.validRange(peerRange) !== null &&
+ !semver.intersects(input.eveVersion, peerRange)
+ ) {
+ return {
+ diagnostics: [
+ createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_EVE_INCOMPATIBLE,
+ message: `Extension "${packageName}" requires eve "${peerRange}", but this app uses eve ${input.eveVersion}. Upgrade the extension to a version that supports this eve, or align your eve version.`,
+ sourcePath: manifestPath,
+ }),
+ ],
+ };
+ }
+
+ return {
+ location: {
+ namespace,
+ specifier,
+ packageName,
+ packageRoot,
+ sourceRoot: resolve(packageRoot, extensionRoot),
+ },
+ diagnostics: [],
+ };
+}
+
+async function resolvePackageRoot(input: {
+ readonly source: ProjectSource;
+ readonly appRoot: string;
+ readonly mountDirectory: string;
+ readonly specifier: string;
+}): Promise<string | null> {
+ if (input.specifier.startsWith(".")) {
+ const target = resolve(input.mountDirectory, input.specifier);
+ return (await hasPackageJson(input.source, target)) ? target : null;
+ }
+
+ if (isAbsolute(input.specifier)) {
+ return (await hasPackageJson(input.source, input.specifier)) ? input.specifier : null;
+ }
+
+ const packageSubpath = bareSpecifierPackagePath(input.specifier);
+ let current = resolve(input.appRoot);
+ while (true) {
+ const candidate = join(current, "node_modules", packageSubpath);
+ if (await hasPackageJson(input.source, candidate)) {
+ return candidate;
+ }
+ const parent = dirname(current);
+ if (parent === current) {
+ return null;
+ }
+ current = parent;
+ }
+}
+
+/**
+ * Returns the package portion of a bare specifier, dropping any deep subpath.
+ * `@acme/crm/mount` → `@acme/crm`; `gizmo/mount` → `gizmo`.
+ */
+function bareSpecifierPackagePath(specifier: string): string {
+ const segments = specifier.split("/");
+ if (specifier.startsWith("@")) {
+ return segments.slice(0, 2).join("/");
+ }
+ return segments[0] ?? specifier;
+}
+
+async function hasPackageJson(source: ProjectSource, packageRoot: string): Promise<boolean> {
+ return (await source.stat(join(packageRoot, "package.json"))) === "file";
+}
diff --git a/packages/eve/src/discover/filesystem.ts b/packages/eve/src/discover/filesystem.ts
index 2dd03bba2..dd755abb0 100644
--- a/packages/eve/src/discover/filesystem.ts
+++ b/packages/eve/src/discover/filesystem.ts
@@ -33,6 +33,7 @@ export type AgentRootEntryKind =
| "agent-config-module"
| "channels-directory"
| "connections-directory"
+ | "extensions-directory"
| "hooks-directory"
| "instructions-directory"
| "instructions-markdown"
@@ -150,6 +151,10 @@ export function classifyAgentRootEntry(
return "connections-directory";
}
+ if (name === "extensions") {
+ return "extensions-directory";
+ }
+
if (name === "hooks") {
return "hooks-directory";
}
diff --git a/packages/eve/src/discover/grammar.ts b/packages/eve/src/discover/grammar.ts
index 18603fc56..fc5266bec 100644
--- a/packages/eve/src/discover/grammar.ts
+++ b/packages/eve/src/discover/grammar.ts
@@ -58,6 +58,12 @@ export const DISCOVER_HOOKS_DIRECTORY_INVALID = "discover/hooks-directory-invali
*/
export const DISCOVER_CHANNELS_DIRECTORY_INVALID = "discover/channels-directory-invalid";
+/**
+ * Shared diagnostic emitted when the authored `extensions/` root is not a
+ * directory.
+ */
+export const DISCOVER_EXTENSIONS_DIRECTORY_INVALID = "discover/extensions-directory-invalid";
+
/**
* Shared diagnostic emitted when an authored `tools/*.{ts,…}` filename does
* not satisfy the model tool-name charset rule.
@@ -95,6 +101,12 @@ export const DISCOVER_CHANNEL_NAME_INVALID = "discover/channel-name-invalid";
*/
export const DISCOVER_HOOK_NAME_INVALID = "discover/hook-name-invalid";
+/**
+ * Shared diagnostic emitted when an authored `extensions/*.{ts,…}` mount
+ * filename does not satisfy the extension namespace charset rule.
+ */
+export const DISCOVER_EXTENSION_NAME_INVALID = "discover/extension-name-invalid";
+
/**
* Tool filename charset. The slug must start with an ASCII letter and may
* contain ASCII letters, digits, underscores, and dashes. The 64-character
@@ -127,6 +139,15 @@ export const CHANNEL_SLUG_PATTERN = /^(\.?[a-z][a-z0-9-]{0,63}|\[[a-zA-Z][a-zA-Z
*/
export const HOOK_SLUG_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/;
+/**
+ * Extension mount filename charset. The basename becomes the namespace the
+ * consumer's build prefixes onto every contribution (`crm` → `crm__search`),
+ * so it uses the same restrictive charset as tool slugs: ASCII letters,
+ * digits, underscores, and dashes, starting with a letter, up to 64
+ * characters.
+ */
+export const EXTENSION_SLUG_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/;
+
/**
* Shared diagnostic emitted when discovery ignores one unsupported directory.
*/
@@ -491,6 +512,31 @@ export function createHookNameDiagnostic(
});
}
+/**
+ * Returns a discovery diagnostic when an extension mount filename violates
+ * {@link EXTENSION_SLUG_PATTERN}, or `null` when it satisfies the rule.
+ *
+ * The mount basename becomes the namespace prefixed onto every contribution
+ * the extension composes into the consuming agent, so it must be a legal
+ * identifier segment.
+ */
+export function createExtensionNameDiagnostic(
+ slotName: string,
+ sourcePath: string,
+): DiscoverDiagnostic | null {
+ if (EXTENSION_SLUG_PATTERN.test(slotName)) {
+ return null;
+ }
+
+ return createDiscoverErrorDiagnostic({
+ code: DISCOVER_EXTENSION_NAME_INVALID,
+ message:
+ `Extension mount filename "${slotName}" is not a legal extension namespace. ` +
+ `Expected ASCII letters, digits, underscores, and dashes only, starting with a letter, up to 64 characters.`,
+ sourcePath,
+ });
+}
+
export {
discoverNamedSourceDirectory,
type DiscoverNamedSourceDirectoryModuleInput,
diff --git a/packages/eve/src/discover/manifest.ts b/packages/eve/src/discover/manifest.ts
index 9dd553113..5e267400c 100644
--- a/packages/eve/src/discover/manifest.ts
+++ b/packages/eve/src/discover/manifest.ts
@@ -130,6 +130,40 @@ export interface SandboxWorkspaceFolderSourceRef {
*/
export type LibSourceRef = ModuleSourceRef;
+/**
+ * Extension mount source reference preserved by the discovery manifest. Each
+ * `agent/extensions/*.ts` file re-exports (and configures) an extension
+ * package; the file basename is the mount namespace.
+ */
+export type ExtensionSourceRef = ModuleSourceRef;
+
+/**
+ * A mounted extension resolved to its package and discovered agent-shaped
+ * source tree. The compiler composes each mount's {@link manifest} into the
+ * consuming agent, prefixing contributions with {@link namespace}.
+ */
+export interface ResolvedExtensionMount {
+ /** Mount namespace derived from the mount filename (e.g. `crm`). */
+ readonly namespace: string;
+ /** Package specifier the mount imports (e.g. `@acme/crm`). */
+ readonly specifier: string;
+ /** Package name from the resolved package.json, used to scope state. */
+ readonly packageName: string;
+ /** Absolute path to the resolved package root. */
+ readonly packageRoot: string;
+ /** Absolute path to the extension's agent-shaped source root. */
+ readonly sourceRoot: string;
+ /** Discovered agent-shaped source manifest for the extension. */
+ readonly manifest: AgentSourceManifest;
+ /**
+ * Consumer-authored overrides discovered in the mount directory form
+ * (`extensions/<ns>/{tools,connections,…}/`). Composed under the same
+ * `<ns>__` namespace as the extension's own contributions but winning on
+ * name collision. Absent for the flat file mount form.
+ */
+ readonly overrides?: AgentSourceManifest;
+}
+
/**
* Subagent source reference preserved by the discovery manifest.
*/
@@ -153,6 +187,18 @@ export interface AgentSourceManifest {
connections: ConnectionSourceRef[];
configModule?: ModuleSourceRef;
diagnosticsSummary: DiscoverDiagnosticsSummary;
+ /**
+ * Mounted extension source references discovered under `agent/extensions/`.
+ * Each entry's logical-path basename is the mount namespace the compiler
+ * prefixes onto the extension's composed contributions.
+ */
+ extensions: ExtensionSourceRef[];
+ /**
+ * Mounted extensions resolved to their packages and discovered source trees.
+ * Populated only for the agent root; extension trees do not mount further
+ * extensions (transitive mounting is a non-goal).
+ */
+ resolvedExtensions: ResolvedExtensionMount[];
hooks: ModuleSourceRef[];
lib: LibSourceRef[];
kind: typeof AGENT_SOURCE_MANIFEST_KIND;
@@ -197,6 +243,8 @@ export interface CreateAgentSourceManifestInput {
connections?: readonly ConnectionSourceRef[];
configModule?: ModuleSourceRef;
diagnostics?: readonly DiscoverDiagnostic[];
+ extensions?: readonly ExtensionSourceRef[];
+ resolvedExtensions?: readonly ResolvedExtensionMount[];
hooks?: readonly ModuleSourceRef[];
lib?: readonly LibSourceRef[];
/**
@@ -270,6 +318,8 @@ export function createAgentSourceManifest(
channels: [...(input.channels ?? [])],
connections: [...(input.connections ?? [])],
diagnosticsSummary: summarizeDiscoverDiagnostics(input.diagnostics ?? []),
+ extensions: [...(input.extensions ?? [])],
+ resolvedExtensions: [...(input.resolvedExtensions ?? [])],
hooks: [...(input.hooks ?? [])],
instructions: [...(input.instructions ?? [])],
lib: [...(input.lib ?? [])],
diff --git a/packages/eve/src/internal/authored-module-loader.ts b/packages/eve/src/internal/authored-module-loader.ts
index 6ebcb3157..bf5941d5f 100644
--- a/packages/eve/src/internal/authored-module-loader.ts
+++ b/packages/eve/src/internal/authored-module-loader.ts
@@ -6,6 +6,7 @@ import { dirname, isAbsolute, join, resolve, sep } from "node:path";
import { createAuthoredAssetImportPlugin } from "#internal/authored-asset-import-plugin.js";
import { createAuthoredModuleBundleError } from "#internal/authored-module-bundle.js";
import { createAuthoredPackageTsConfigPathsPlugin } from "#internal/authored-package-tsconfig-paths.js";
+import { createFixedNamespaceScopePlugin } from "#internal/bundler/extension-scope-plugin.js";
import { expectObjectRecord } from "#internal/authored-module.js";
import {
buildWithNitroRolldown,
@@ -50,6 +51,12 @@ type RolldownResolveContext = {
export interface AuthoredModuleLoadOptions {
readonly externalDependencies?: readonly string[];
+ /**
+ * When set, the module being loaded is extension-owned: its
+ * `defineState`/`defineExtension` calls (and those of its same-package
+ * dependencies bundled with it) are scoped to this namespace at bundle time.
+ */
+ readonly extensionScopeNamespace?: string;
}
function getChannelModuleCache(): Map<string, unknown> | undefined {
@@ -139,10 +146,17 @@ function createFileImportSpecifier(modulePath: string): string {
return normalizedPath;
}
-async function loadBundledAuthoredModule(
+/**
+ * Bundles one authored entry module to a self-contained ESM string using the
+ * same plugin stack the dev/eval loader uses: `eve/*` and node_modules deps stay
+ * external, relative source is inlined, and (when `extensionScopeNamespace` is
+ * set) `defineState`/`defineExtension` are scoped to that namespace. Shared with
+ * `eve build`'s extension entrypoint compilation so both paths bundle identically.
+ */
+export async function bundleAuthoredModuleCode(
modulePath: string,
- options: AuthoredModuleLoadOptions,
-): Promise<unknown> {
+ options: AuthoredModuleLoadOptions = {},
+): Promise<string> {
const channelCache = getChannelModuleCache();
const packageRoot = resolveAuthoredPackageRoot(modulePath);
const tsconfigPath = resolveAuthoredTsConfigPath(packageRoot);
@@ -196,6 +210,9 @@ async function loadBundledAuthoredModule(
: null;
const plugins = [
channelIdentityPlugin,
+ options.extensionScopeNamespace === undefined
+ ? null
+ : createFixedNamespaceScopePlugin(options.extensionScopeNamespace),
createAuthoredRelativeExtensionResolverPlugin({ extensions: RESOLVE_EXTENSIONS }),
createAuthoredAssetImportPlugin(),
createAuthoredPackageTsConfigPathsPlugin({
@@ -205,7 +222,6 @@ async function loadBundledAuthoredModule(
createNodeEsmCompatBannerPlugin({ includeRequire: true }),
createPackageBoundaryPlugin(packageRoot, externalDependencies),
].filter((plugin) => plugin !== null);
- let outputFile: { readonly code: string };
try {
const result = await buildWithNitroRolldown({
@@ -224,24 +240,37 @@ async function loadBundledAuthoredModule(
sourcemap: "inline",
},
});
- outputFile = getSingleRolldownChunk(result, `authored module for "${modulePath}"`);
+ return getSingleRolldownChunk(result, `authored module for "${modulePath}"`).code;
} catch (error) {
throw createAuthoredModuleBundleError(modulePath, error);
}
+}
+
+async function loadBundledAuthoredModule(
+ modulePath: string,
+ options: AuthoredModuleLoadOptions,
+): Promise<unknown> {
+ const code = await bundleAuthoredModuleCode(modulePath, options);
+ const externalDependencies = normalizeExternalDependencies(options.externalDependencies);
const bundleHash = createHash("sha1")
.update(modulePath)
.update("\0")
.update(externalDependencies.join("\0"))
.update("\0")
- .update(outputFile.code)
+ .update(options.extensionScopeNamespace ?? "")
+ .update("\0")
+ .update(code)
.digest("hex");
- const bundleDirectoryPath = join(packageRoot, AUTHORED_MODULE_BUNDLE_DIRECTORY_PATH);
+ const bundleDirectoryPath = join(
+ resolveAuthoredPackageRoot(modulePath),
+ AUTHORED_MODULE_BUNDLE_DIRECTORY_PATH,
+ );
const bundlePath = join(bundleDirectoryPath, `${bundleHash}.mjs`);
if (!existsSync(bundlePath)) {
mkdirSync(bundleDirectoryPath, { recursive: true });
- writeFileSync(bundlePath, outputFile.code);
+ writeFileSync(bundlePath, code);
}
return await import(`${createFileImportSpecifier(bundlePath)}?v=${bundleHash}`);
@@ -400,7 +429,7 @@ function createInFlightModuleLoadKey(
): string {
const externalDependencies = normalizeExternalDependencies(options.externalDependencies);
- return `${modulePath}\0${externalDependencies.join("\0")}`;
+ return `${modulePath}\0${externalDependencies.join("\0")}\0${options.extensionScopeNamespace ?? ""}`;
}
function normalizeExternalDependencies(externalDependencies: readonly string[] = []): string[] {
diff --git a/packages/eve/src/internal/authored-module-map-loader.ts b/packages/eve/src/internal/authored-module-map-loader.ts
index 58d258409..2ec5d3ec8 100644
--- a/packages/eve/src/internal/authored-module-map-loader.ts
+++ b/packages/eve/src/internal/authored-module-map-loader.ts
@@ -7,6 +7,15 @@ import type { RuntimeDiskCompiledArtifactsSource } from "#runtime/compiled-artif
import { loadCompiledManifest } from "#runtime/loaders/manifest.js";
import { loadAuthoredModuleNamespace } from "#internal/authored-module-loader.js";
+/**
+ * Ambient namespace read by `defineExtension` when it is evaluated from a module
+ * the bundler could not scope — specifically a mount's extension package, which
+ * resolves cross-package and so loads unbundled in the dev/eval loader. Set only
+ * around the synchronous evaluation of one mount module (see below), so it never
+ * leaks into consumer code.
+ */
+const EXT_CONFIG_SCOPE = Symbol.for("eve.ext-config-scope");
+
/**
* Loads a disk-backed module map by hydrating authored modules directly from
* source. This is for dev/build flows that need tsconfig alias support and
@@ -22,6 +31,13 @@ export async function loadCompiledModuleMapFromAuthoredSource(input: {
return await hydrateCompiledModuleMapFromManifest(manifest);
}
+interface ExtensionScopeIndex {
+ /** Mount namespace (from `ext:<ns>:` source ids) to package namespace. */
+ readonly byMountNamespace: ReadonlyMap<string, string>;
+ /** Mount module source id to package namespace. */
+ readonly byMountSourceId: ReadonlyMap<string, string>;
+}
+
async function hydrateCompiledModuleMapFromManifest(
manifest: CompiledAgentManifest,
): Promise<CompiledModuleMap> {
@@ -45,11 +61,21 @@ async function hydrateCompiledModuleMapFromManifest(
})),
];
+ const scopeIndex: ExtensionScopeIndex = {
+ byMountNamespace: new Map(
+ manifest.extensionMounts.map((mount) => [mount.namespace, mount.packageNamespace]),
+ ),
+ byMountSourceId: new Map(
+ manifest.extensionMounts.map((mount) => [mount.mountSourceId, mount.packageNamespace]),
+ ),
+ };
+
for (const nodeManifest of nodeManifests) {
nodes[nodeManifest.nodeId] = {
modules: await hydrateCompiledNodeScope({
agentRoot: nodeManifest.agentRoot,
manifest: nodeManifest.manifest,
+ scopeIndex,
}),
};
}
@@ -59,22 +85,53 @@ async function hydrateCompiledModuleMapFromManifest(
};
}
+/**
+ * Resolves the package namespace an extension-owned source id belongs to.
+ * Composed sources are keyed `ext:<mountNamespace>:<originalSourceId>`.
+ */
+function extensionNamespaceForSourceId(
+ sourceId: string,
+ index: ExtensionScopeIndex,
+): string | undefined {
+ const match = sourceId.match(/^ext:([^:]+):/);
+ return match === null ? undefined : index.byMountNamespace.get(match[1]!);
+}
+
async function hydrateCompiledNodeScope(input: {
agentRoot: string;
manifest: CompiledAgentNodeManifest;
+ scopeIndex: ExtensionScopeIndex;
}): Promise<CompiledModuleMap["nodes"][string]["modules"]> {
const refs = collectModuleRefsForManifest(input.manifest).sort((left, right) =>
left.sourceId.localeCompare(right.sourceId),
);
const externalDependencies = input.manifest.config.build?.externalDependencies ?? [];
+ const container = globalThis as Record<symbol, unknown>;
const modules: CompiledModuleMap["nodes"][string]["modules"] = {};
for (const ref of refs) {
const modulePath = join(input.agentRoot, ref.logicalPath);
+ const extensionScopeNamespace = extensionNamespaceForSourceId(ref.sourceId, input.scopeIndex);
- modules[ref.sourceId] = await loadAuthoredModuleNamespace(modulePath, {
- externalDependencies,
- });
+ // A mount module (e.g. `agent/extensions/crm.ts`) imports the extension
+ // package cross-package, so its config handle loads unbundled and the
+ // bundler cannot scope it. Set the ambient config scope around this one
+ // synchronous load so the mount's `defineExtension` binds under the package
+ // namespace — matching what the extension's own bundled tools read.
+ const mountConfigScope = input.scopeIndex.byMountSourceId.get(ref.sourceId);
+ if (mountConfigScope !== undefined) {
+ container[EXT_CONFIG_SCOPE] = mountConfigScope;
+ }
+ try {
+ modules[ref.sourceId] = await loadAuthoredModuleNamespace(modulePath, {
+ externalDependencies,
+ extensionScopeNamespace,
+ });
+ } finally {
+ if (mountConfigScope !== undefined) {
+ container[EXT_CONFIG_SCOPE] = undefined;
+ }
+ }
}
return modules;
diff --git a/packages/eve/src/internal/bundler/extension-scope-plugin.integration.test.ts b/packages/eve/src/internal/bundler/extension-scope-plugin.integration.test.ts
new file mode 100644
index 000000000..a8e8bcba2
--- /dev/null
+++ b/packages/eve/src/internal/bundler/extension-scope-plugin.integration.test.ts
@@ -0,0 +1,103 @@
+import { mkdtempSync, mkdirSync, writeFileSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+
+import { afterAll, describe, expect, it } from "vitest";
+
+import {
+ buildWithNitroRolldown,
+ getSingleRolldownChunk,
+} from "#internal/bundler/nitro-rolldown.js";
+import {
+ createExtensionScopePlugin,
+ createFixedNamespaceScopePlugin,
+} from "#internal/bundler/extension-scope-plugin.js";
+
+// Externalizes the framework barrels so the temp module bundles without eve
+// installed in the scratch dir — mirrors how the real loader treats them.
+const externalizeEvePlugin = {
+ name: "test-externalize-eve",
+ resolveId(source: string) {
+ return source.startsWith("eve/") ? { id: source, external: true } : undefined;
+ },
+};
+
+const roots: string[] = [];
+
+function scratchModule(source: string): { modulePath: string; sourceRoot: string } {
+ const dir = mkdtempSync(join(tmpdir(), "eve-ext-scope-"));
+ roots.push(dir);
+ const sourceRoot = join(dir, "ext");
+ mkdirSync(join(sourceRoot, "tools"), { recursive: true });
+ const modulePath = join(sourceRoot, "tools", "budget.ts");
+ writeFileSync(modulePath, source, "utf8");
+ return { modulePath, sourceRoot };
+}
+
+async function bundle(input: string, plugins: unknown[]): Promise<string> {
+ const result = await buildWithNitroRolldown({
+ input,
+ platform: "node",
+ plugins,
+ resolve: { extensions: [".ts", ".js", ".mjs"] },
+ write: false,
+ output: { comments: false, format: "esm" },
+ });
+ return getSingleRolldownChunk(result, "test module").code;
+}
+
+const STATE_MODULE = [
+ 'import { defineState } from "eve/context";',
+ 'export const budget = defineState("budget", () => ({ count: 0 }));',
+ "",
+].join("\n");
+
+describe("extension-scope plugin (bundled)", () => {
+ afterAll(() => {
+ // Scratch dirs live under the OS temp root; leaving them is harmless and
+ // avoids racing the bundler's async file handles on cleanup.
+ });
+
+ it("bakes the package namespace into an extension-owned module's defineState", async () => {
+ const { modulePath, sourceRoot } = scratchModule(STATE_MODULE);
+ const code = await bundle(modulePath, [
+ createExtensionScopePlugin([{ sourceRoot, packageNamespace: "acme-crm" }]),
+ externalizeEvePlugin,
+ ]);
+ expect(code).toContain("acme-crm");
+ expect(code).toContain("eve/context");
+ });
+
+ it("leaves a module outside every extension source root unscoped", async () => {
+ const { modulePath } = scratchModule(STATE_MODULE);
+ const code = await bundle(modulePath, [
+ createExtensionScopePlugin([
+ { sourceRoot: join(tmpdir(), "some-other-extension", "ext"), packageNamespace: "acme-crm" },
+ ]),
+ externalizeEvePlugin,
+ ]);
+ expect(code).not.toContain("acme-crm");
+ });
+
+ it("does not scope when there are no extensions", async () => {
+ const { modulePath, sourceRoot } = scratchModule(STATE_MODULE);
+ // createExtensionScopePlugin returns null for an empty scope set; filter it.
+ const plugins = [createExtensionScopePlugin([]), externalizeEvePlugin].filter(
+ (plugin) => plugin !== null,
+ );
+ const code = await bundle(modulePath, plugins);
+ expect(code).not.toContain("acme-crm");
+ void sourceRoot;
+ });
+
+ it("bakes the namespace via the fixed-namespace (dev per-module) plugin", async () => {
+ // The dev loader path: the plugin is handed the namespace directly, with no
+ // filesystem matching (which is unreliable under workspace symlinks).
+ const { modulePath } = scratchModule(STATE_MODULE);
+ const code = await bundle(modulePath, [
+ createFixedNamespaceScopePlugin("acme-crm"),
+ externalizeEvePlugin,
+ ]);
+ expect(code).toContain("acme-crm");
+ });
+});
diff --git a/packages/eve/src/internal/bundler/extension-scope-plugin.test.ts b/packages/eve/src/internal/bundler/extension-scope-plugin.test.ts
new file mode 100644
index 000000000..c5c8b2538
--- /dev/null
+++ b/packages/eve/src/internal/bundler/extension-scope-plugin.test.ts
@@ -0,0 +1,94 @@
+import { describe, expect, it } from "vitest";
+
+import {
+ createExtensionScopePlugin,
+ createFixedNamespaceScopePlugin,
+ type ExtensionScopeBundlerPlugin,
+} from "#internal/bundler/extension-scope-plugin.js";
+
+const SCOPES = [{ sourceRoot: "/pkg/crm/ext", packageNamespace: "acme-crm" }];
+
+function pathPlugin(): ExtensionScopeBundlerPlugin {
+ const created = createExtensionScopePlugin(SCOPES);
+ if (created === null) {
+ throw new Error("expected a plugin for a non-empty scope set");
+ }
+ return created;
+}
+
+describe("createExtensionScopePlugin (path containment)", () => {
+ it("returns null when there are no extensions so non-extension builds are untouched", () => {
+ expect(createExtensionScopePlugin([])).toBeNull();
+ });
+
+ it("redirects eve/context to a namespaced shim for extension-owned importers", () => {
+ const id = pathPlugin().resolveId("eve/context", "/pkg/crm/ext/tools/budget.ts");
+ expect(id).toBe("\0eve-ext-scope:context:acme-crm");
+ });
+
+ it("redirects eve/extension to a namespaced shim for extension-owned importers", () => {
+ const id = pathPlugin().resolveId("eve/extension", "/pkg/crm/ext/config.ts");
+ expect(id).toBe("\0eve-ext-scope:extension:acme-crm");
+ });
+
+ it("ignores importers outside every extension source root", () => {
+ expect(pathPlugin().resolveId("eve/context", "/app/agent/tools/local.ts")).toBeUndefined();
+ });
+
+ it("does not redirect a sibling directory that shares the source-root prefix", () => {
+ expect(pathPlugin().resolveId("eve/context", "/pkg/crm/extras/tool.ts")).toBeUndefined();
+ });
+
+ it("only intercepts the scoped framework modules", () => {
+ expect(pathPlugin().resolveId("eve/tools", "/pkg/crm/ext/tools/budget.ts")).toBeUndefined();
+ expect(pathPlugin().resolveId("zod", "/pkg/crm/ext/tools/budget.ts")).toBeUndefined();
+ });
+});
+
+describe("createFixedNamespaceScopePlugin (dev per-module)", () => {
+ it("scopes every non-virtual importer to the fixed namespace", () => {
+ const plugin = createFixedNamespaceScopePlugin("acme-crm");
+ // The importer path is irrelevant in fixed mode.
+ expect(plugin.resolveId("eve/context", "/anywhere/on/disk/tool.ts")).toBe(
+ "\0eve-ext-scope:context:acme-crm",
+ );
+ expect(plugin.resolveId("eve/extension", "/anywhere/config.ts")).toBe(
+ "\0eve-ext-scope:extension:acme-crm",
+ );
+ });
+
+ it("never re-enters through virtual shim importers", () => {
+ const plugin = createFixedNamespaceScopePlugin("acme-crm");
+ expect(plugin.resolveId("eve/context", "\0eve-ext-scope:context:acme-crm")).toBeUndefined();
+ });
+
+ it("only intercepts the scoped framework modules", () => {
+ const plugin = createFixedNamespaceScopePlugin("acme-crm");
+ expect(plugin.resolveId("eve/tools", "/anywhere/tool.ts")).toBeUndefined();
+ });
+});
+
+describe("shim baking (shared)", () => {
+ it("bakes the namespace into the defineState shim", () => {
+ const shim = createFixedNamespaceScopePlugin("acme-crm").load(
+ "\0eve-ext-scope:context:acme-crm",
+ );
+ expect(shim?.code).toContain(
+ `import { defineState as __eveScopedDefineState } from "eve/context"`,
+ );
+ expect(shim?.code).toContain(`__eveScopedDefineState("acme-crm" + "." + name, initial)`);
+ });
+
+ it("bakes the namespace into the defineExtension shim", () => {
+ const shim = createFixedNamespaceScopePlugin("acme-crm").load(
+ "\0eve-ext-scope:extension:acme-crm",
+ );
+ expect(shim?.code).toContain(`from "eve/extension"`);
+ expect(shim?.code).toContain(`export function defineExtension(options, namespace)`);
+ expect(shim?.code).toContain(`namespace === undefined ? "acme-crm" : namespace`);
+ });
+
+ it("passes through non-shim ids in load", () => {
+ expect(pathPlugin().load("/pkg/crm/ext/tools/budget.ts")).toBeUndefined();
+ });
+});
diff --git a/packages/eve/src/internal/bundler/extension-scope-plugin.ts b/packages/eve/src/internal/bundler/extension-scope-plugin.ts
new file mode 100644
index 000000000..ece3e9e95
--- /dev/null
+++ b/packages/eve/src/internal/bundler/extension-scope-plugin.ts
@@ -0,0 +1,150 @@
+import { realpathSync } from "node:fs";
+import { resolve, sep } from "node:path";
+
+/**
+ * One extension's on-disk source root paired with the namespace its durable
+ * state keys and config binding must be scoped to.
+ */
+export interface ExtensionScope {
+ /** Absolute path to the extension's source root. */
+ readonly sourceRoot: string;
+ /** Package-derived namespace (e.g. `acme-crm`). */
+ readonly packageNamespace: string;
+}
+
+const VIRTUAL_PREFIX = "\0eve-ext-scope:";
+
+/** Framework module an extension-owned import is redirected through. */
+type ScopedFrameworkModule = "eve/context" | "eve/extension";
+
+const SCOPED_FRAMEWORK_MODULES: Record<ScopedFrameworkModule, "context" | "extension"> = {
+ "eve/context": "context",
+ "eve/extension": "extension",
+};
+
+/** The subset of the rolldown/rollup plugin shape this plugin implements. */
+export interface ExtensionScopeBundlerPlugin {
+ readonly name: string;
+ resolveId(source: string, importer: string | undefined): string | undefined;
+ load(id: string): { code: string; moduleType: "js" } | undefined;
+}
+
+function canonicalize(path: string): string {
+ try {
+ return realpathSync(path);
+ } catch {
+ return resolve(path);
+ }
+}
+
+/** Strips a rolldown query suffix (`?v=…`) so containment compares real paths. */
+function importerPath(importer: string): string {
+ const queryIndex = importer.indexOf("?");
+ return canonicalize(queryIndex === -1 ? importer : importer.slice(0, queryIndex));
+}
+
+function isUnder(path: string, root: string): boolean {
+ return path === root || path.startsWith(`${root}${sep}`);
+}
+
+function shimSource(kind: "context" | "extension", namespace: string): string {
+ const ns = JSON.stringify(namespace);
+ if (kind === "context") {
+ // Wrap `defineState` (the only runtime export) so the durable key is
+ // prefixed with the namespace baked into the bundle, not read from
+ // evaluation-order-sensitive global state.
+ return [
+ `import { defineState as __eveScopedDefineState } from "eve/context";`,
+ `export function defineState(name, initial) {`,
+ ` return __eveScopedDefineState(${ns} + "." + name, initial);`,
+ `}`,
+ "",
+ ].join("\n");
+ }
+ // Wrap `defineExtension` (the only runtime export) so the handle bakes the
+ // namespace — both the mount binding and the handle's `config` reader resolve
+ // to the same scope from any module in the extension.
+ return [
+ `import { defineExtension as __eveScopedDefineExtension } from "eve/extension";`,
+ `export function defineExtension(options, namespace) {`,
+ ` return __eveScopedDefineExtension(options, namespace === undefined ? ${ns} : namespace);`,
+ `}`,
+ "",
+ ].join("\n");
+}
+
+/**
+ * Builds the resolveId/load hook pair shared by both plugin modes. `namespaceFor`
+ * returns the scope namespace for a given importer, or `undefined` to leave the
+ * import untouched.
+ */
+function scopeHooks(
+ name: string,
+ namespaceFor: (importer: string) => string | undefined,
+): ExtensionScopeBundlerPlugin {
+ return {
+ name,
+ resolveId(source: string, importer: string | undefined) {
+ const kind = SCOPED_FRAMEWORK_MODULES[source as ScopedFrameworkModule];
+ if (kind === undefined || importer === undefined || importer.startsWith("\0")) {
+ return undefined;
+ }
+ const namespace = namespaceFor(importer);
+ if (namespace === undefined) {
+ return undefined;
+ }
+ return `${VIRTUAL_PREFIX}${kind}:${namespace}`;
+ },
+ load(id: string) {
+ if (!id.startsWith(VIRTUAL_PREFIX)) {
+ return undefined;
+ }
+ const descriptor = id.slice(VIRTUAL_PREFIX.length);
+ const separatorIndex = descriptor.indexOf(":");
+ const kind = descriptor.slice(0, separatorIndex) as "context" | "extension";
+ const namespace = descriptor.slice(separatorIndex + 1);
+ return { code: shimSource(kind, namespace), moduleType: "js" as const };
+ },
+ };
+}
+
+/**
+ * Path-containment scope plugin for the whole-application bundle (the production
+ * build). Any module physically under an extension's source root has its
+ * `eve/context`/`eve/extension` imports redirected to a generated shim that
+ * bakes the extension's package namespace into `defineState`/`defineExtension`.
+ *
+ * Returns `null` when there are no extensions, so consumer-only builds carry no
+ * extra plugin and their output is byte-identical to a non-extension build.
+ */
+export function createExtensionScopePlugin(
+ scopes: readonly ExtensionScope[],
+): ExtensionScopeBundlerPlugin | null {
+ if (scopes.length === 0) {
+ return null;
+ }
+ const canonicalScopes = scopes.map((scope) => ({
+ root: canonicalize(scope.sourceRoot),
+ packageNamespace: scope.packageNamespace,
+ }));
+ return scopeHooks("eve-extension-scope", (importer) => {
+ const path = importerPath(importer);
+ for (const scope of canonicalScopes) {
+ if (isUnder(path, scope.root)) {
+ return scope.packageNamespace;
+ }
+ }
+ return undefined;
+ });
+}
+
+/**
+ * Fixed-namespace scope plugin for a single extension-owned module bundle (the
+ * dev/eval per-module loader). The compiler already knows the loaded module is
+ * extension-owned and under which namespace, so every module in the bundle —
+ * the entry plus its same-package dependencies — is scoped, with no reliance on
+ * filesystem path matching (which is unreliable under workspace symlinks).
+ */
+export function createFixedNamespaceScopePlugin(namespace: string): ExtensionScopeBundlerPlugin {
+ return scopeHooks("eve-extension-scope-fixed", () => namespace);
+}
diff --git a/packages/eve/src/internal/nitro/host/build-application.ts b/packages/eve/src/internal/nitro/host/build-application.ts
index 43bd5c41a..4dcbc59b4 100644
--- a/packages/eve/src/internal/nitro/host/build-application.ts
+++ b/packages/eve/src/internal/nitro/host/build-application.ts
@@ -14,6 +14,10 @@ import { WorkflowBundleBuilder } from "#internal/workflow-bundle/builder.js";
import { normalizeEveVercelFunctionOutput } from "#internal/workflow-bundle/vercel-workflow-output.js";
import { createApplicationNitro } from "#internal/nitro/host/create-application-nitro.js";
import { emitVercelAgentSummary } from "#internal/nitro/host/build-vercel-agent-summary.js";
+import {
+ buildExtensionPackage,
+ tryReadExtensionBuildConfig,
+} from "#internal/nitro/host/build-extension.js";
import { prepareApplicationHost } from "#internal/nitro/host/prepare-application-host.js";
import { runVercelBuildPrewarm } from "#internal/nitro/host/vercel-build-prewarm.js";
import type { NitroBuildSurface, PreparedApplicationHost } from "#internal/nitro/host/types.js";
@@ -230,6 +234,11 @@ async function buildVercelNitroSurface(
* Builds the production Nitro output for an eve application.
*/
export async function buildApplication(rootDir: string): Promise<string> {
+ const extensionBuild = await tryReadExtensionBuildConfig(rootDir);
+ if (extensionBuild !== null) {
+ return buildExtensionPackage(rootDir, extensionBuild);
+ }
+
const preparedHost = await prepareApplicationHost(rootDir);
if (!process.env.VERCEL) {
diff --git a/packages/eve/src/internal/nitro/host/build-extension.integration.test.ts b/packages/eve/src/internal/nitro/host/build-extension.integration.test.ts
new file mode 100644
index 000000000..c174ed99b
--- /dev/null
+++ b/packages/eve/src/internal/nitro/host/build-extension.integration.test.ts
@@ -0,0 +1,52 @@
+import { mkdir, mkdtemp, writeFile } from "node:fs/promises";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+
+import { describe, expect, it } from "vitest";
+
+import {
+ buildExtensionPackage,
+ tryReadExtensionBuildConfig,
+} from "#internal/nitro/host/build-extension.js";
+
+// Reading build config and the pre-bundle validation are pure; the bundling
+// output is covered by build-extension.scenario.test.ts (it invokes rolldown).
+describe("extension build config", () => {
+ it("reads eve.extension and derives the short name", async () => {
+ const root = await mkdtemp(join(tmpdir(), "eve-ext-build-"));
+ await writeFile(
+ join(root, "package.json"),
+ JSON.stringify({ name: "@acme/crm", type: "module", eve: { extension: "ext" } }),
+ "utf8",
+ );
+ const config = await tryReadExtensionBuildConfig(root);
+ expect(config).not.toBeNull();
+ expect(config?.packageName).toBe("@acme/crm");
+ expect(config?.shortName).toBe("crm");
+ });
+
+ it("returns null for a regular agent app without eve.extension", async () => {
+ const root = await mkdtemp(join(tmpdir(), "eve-app-"));
+ await writeFile(join(root, "package.json"), JSON.stringify({ name: "my-agent" }), "utf8");
+ expect(await tryReadExtensionBuildConfig(root)).toBeNull();
+ });
+
+ it("throws when the extension has no declaration module", async () => {
+ const root = await mkdtemp(join(tmpdir(), "eve-ext-nodecl-"));
+ await writeFile(
+ join(root, "package.json"),
+ JSON.stringify({ name: "@acme/nodecl", type: "module", eve: { extension: "ext" } }),
+ "utf8",
+ );
+ await mkdir(join(root, "ext", "tools"), { recursive: true });
+ await writeFile(
+ join(root, "ext", "tools", "ping.mjs"),
+ 'export default { description: "Ping.", async execute() { return {}; } };\n',
+ "utf8",
+ );
+ const config = await tryReadExtensionBuildConfig(root);
+ await expect(buildExtensionPackage(root, config!)).rejects.toThrow(
+ /missing an "extension\.<ext>" declaration/,
+ );
+ });
+});
diff --git a/packages/eve/src/internal/nitro/host/build-extension.scenario.test.ts b/packages/eve/src/internal/nitro/host/build-extension.scenario.test.ts
new file mode 100644
index 000000000..b0a8e838b
--- /dev/null
+++ b/packages/eve/src/internal/nitro/host/build-extension.scenario.test.ts
@@ -0,0 +1,110 @@
+import { mkdir, mkdtemp, readFile, writeFile } from "node:fs/promises";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+
+import { describe, expect, it } from "vitest";
+
+import {
+ buildExtensionPackage,
+ tryReadExtensionBuildConfig,
+} from "#internal/nitro/host/build-extension.js";
+
+// `buildExtensionPackage` bundles the entrypoints with rolldown, so these live in
+// the scenario tier. They guard the publishing contract: the Node-facing exports
+// must be self-contained runnable JS (no `.ts`/`../ext` source reachable, or an
+// installed package fails under node_modules type-stripping), with the extension
+// namespace baked in and declarations emitted.
+async function createExtensionPackage(pkg?: Record<string, unknown>): Promise<string> {
+ const root = await mkdtemp(join(tmpdir(), "eve-ext-scenario-"));
+ await writeFile(
+ join(root, "package.json"),
+ JSON.stringify({ name: "@acme/crm", type: "module", eve: { extension: "ext" }, ...pkg }),
+ "utf8",
+ );
+ await mkdir(join(root, "ext", "tools"), { recursive: true });
+ await writeFile(
+ join(root, "ext", "extension.ts"),
+ 'import { defineExtension } from "eve/extension";\nexport default defineExtension();\n',
+ "utf8",
+ );
+ await writeFile(
+ join(root, "ext", "tools", "crm_search.ts"),
+ 'export default { description: "Search the CRM.", async execute() { return {}; } };\n',
+ "utf8",
+ );
+ return root;
+}
+
+describe("extension build output", () => {
+ it("emits self-contained, namespace-scoped runnable entrypoints", async () => {
+ const root = await createExtensionPackage();
+ const config = await tryReadExtensionBuildConfig(root);
+ const outDir = await buildExtensionPackage(root, config!);
+
+ const index = await readFile(join(outDir, "index.mjs"), "utf8");
+ // Bundled from source: no `.ts`/`../ext` re-export Node would follow natively.
+ expect(index).not.toMatch(/from\s+["']\.\.\/ext\//);
+ // `eve/*` stays external (resolves to the consumer's eve); namespace baked in.
+ expect(index).toMatch(/from\s+["']eve\/extension["']/);
+ expect(index).toContain("acme-crm");
+
+ const toolsIndex = await readFile(join(outDir, "tools", "index.mjs"), "utf8");
+ expect(toolsIndex).not.toMatch(/from\s+["']\.\.\/\.\.\/ext\//);
+ expect(toolsIndex).toContain("Search the CRM"); // the tool source was inlined
+ });
+
+ it("emits declaration barrels resolving into the shipped source", async () => {
+ const root = await createExtensionPackage();
+ const config = await tryReadExtensionBuildConfig(root);
+ const outDir = await buildExtensionPackage(root, config!);
+
+ const indexDts = await readFile(join(outDir, "index.d.ts"), "utf8");
+ expect(indexDts).toContain('export { default } from "../ext/extension.js"');
+ expect(indexDts).toContain('export { default as crm } from "../ext/extension.js"');
+
+ const toolsDts = await readFile(join(outDir, "tools", "index.d.ts"), "utf8");
+ expect(toolsDts).toContain(
+ 'export { default as crm_search } from "../../ext/tools/crm_search.js"',
+ );
+ });
+
+ it("sanitizes kebab-case tool names into valid export bindings", async () => {
+ const root = await createExtensionPackage();
+ await writeFile(
+ join(root, "ext", "tools", "get-weather.ts"),
+ 'export default { description: "Get the weather.", async execute() { return {}; } };\n',
+ "utf8",
+ );
+ const config = await tryReadExtensionBuildConfig(root);
+ const outDir = await buildExtensionPackage(root, config!);
+
+ const toolsDts = await readFile(join(outDir, "tools", "index.d.ts"), "utf8");
+ expect(toolsDts).toContain("as get_weather ");
+ expect(toolsDts).not.toContain("as get-weather ");
+ });
+
+ it("fills the exports map with runnable + types conditions", async () => {
+ const root = await createExtensionPackage();
+ const config = await tryReadExtensionBuildConfig(root);
+ await buildExtensionPackage(root, config!);
+
+ const pkg = JSON.parse(await readFile(join(root, "package.json"), "utf8")) as {
+ exports?: Record<string, unknown>;
+ };
+ expect(pkg.exports).toEqual({
+ ".": { types: "./dist/index.d.ts", default: "./dist/index.mjs" },
+ "./tools": { types: "./dist/tools/index.d.ts", default: "./dist/tools/index.mjs" },
+ });
+ });
+
+ it("upgrades a stale bare-string export entry to the runnable + types shape", async () => {
+ const root = await createExtensionPackage({ exports: { ".": "./dist/index.mjs" } });
+ const config = await tryReadExtensionBuildConfig(root);
+ await buildExtensionPackage(root, config!);
+
+ const pkg = JSON.parse(await readFile(join(root, "package.json"), "utf8")) as {
+ exports?: Record<string, unknown>;
+ };
+ expect(pkg.exports?.["."]).toEqual({ types: "./dist/index.d.ts", default: "./dist/index.mjs" });
+ });
+});
diff --git a/packages/eve/src/internal/nitro/host/build-extension.ts b/packages/eve/src/internal/nitro/host/build-extension.ts
new file mode 100644
index 000000000..92afb5284
--- /dev/null
+++ b/packages/eve/src/internal/nitro/host/build-extension.ts
@@ -0,0 +1,259 @@
+import { mkdir, readFile, writeFile } from "node:fs/promises";
+import { join, relative, resolve } from "node:path";
+
+import { discoverAgent } from "#discover/discover-agent.js";
+import { packageStateNamespace } from "#discover/extensions.js";
+import { discoverFlatModuleSource, readSortedDirectoryEntries } from "#discover/grammar.js";
+import { createDiskProjectSource } from "#discover/project-source.js";
+import { SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS } from "#discover/filesystem.js";
+import { bundleAuthoredModuleCode } from "#internal/authored-module-loader.js";
+
+/**
+ * Resolved build inputs for an extension package (a `package.json` declaring
+ * `eve.extension`).
+ */
+export interface ExtensionBuildConfig {
+ /** Absolute path to the agent-shaped source root (`eve.extension`). */
+ readonly sourceRoot: string;
+ /** Package name from `package.json`. */
+ readonly packageName: string;
+ /** Short name a consumer mounts by (`@acme/crm` → `crm`). */
+ readonly shortName: string;
+}
+
+/**
+ * Reads `package.json#eve.extension` from a project root, returning the
+ * extension build inputs or `null` when the package is a regular agent app.
+ */
+export async function tryReadExtensionBuildConfig(
+ rootDir: string,
+): Promise<ExtensionBuildConfig | null> {
+ const appRoot = resolve(rootDir);
+ let pkg: { name?: unknown; eve?: { extension?: unknown } };
+ try {
+ pkg = JSON.parse(await readFile(join(appRoot, "package.json"), "utf8")) as typeof pkg;
+ } catch {
+ return null;
+ }
+
+ const extensionRoot = pkg.eve?.extension;
+ if (typeof extensionRoot !== "string" || extensionRoot.length === 0) {
+ return null;
+ }
+
+ const packageName = typeof pkg.name === "string" && pkg.name.length > 0 ? pkg.name : "extension";
+ const bareName = packageName.slice(packageName.lastIndexOf("/") + 1);
+ const shortName = safeJsIdentifier(bareName);
+ return {
+ sourceRoot: resolve(appRoot, extensionRoot),
+ packageName,
+ shortName,
+ };
+}
+
+/** One managed subpath export: runnable JS plus its declaration barrel. */
+interface ManagedExportTarget {
+ readonly types: string;
+ readonly default: string;
+}
+
+/** Subpath exports `eve build` manages for an extension package. */
+const MANAGED_EXTENSION_EXPORTS: Readonly<Record<string, ManagedExportTarget>> = {
+ ".": { types: "./dist/index.d.ts", default: "./dist/index.mjs" },
+ "./tools": { types: "./dist/tools/index.d.ts", default: "./dist/tools/index.mjs" },
+};
+
+/**
+ * Normalizes the extension package's `exports` map to the entries the build
+ * emits so authors never hand-list them. eve owns these two subpaths, so a stale
+ * value (e.g. the earlier bare-string `"./dist/index.mjs"`) is upgraded to the
+ * `{ types, default }` shape; `package.json` is rewritten only when something changed.
+ */
+async function ensureExtensionExports(appRoot: string): Promise<void> {
+ const pkgPath = join(appRoot, "package.json");
+ const raw = await readFile(pkgPath, "utf8");
+ const pkg = JSON.parse(raw) as Record<string, unknown>;
+
+ const exports =
+ typeof pkg.exports === "object" && pkg.exports !== null && !Array.isArray(pkg.exports)
+ ? (pkg.exports as Record<string, unknown>)
+ : {};
+
+ let changed = false;
+ for (const [subpath, target] of Object.entries(MANAGED_EXTENSION_EXPORTS)) {
+ const current = exports[subpath];
+ const matches =
+ typeof current === "object" &&
+ current !== null &&
+ (current as ManagedExportTarget).types === target.types &&
+ (current as ManagedExportTarget).default === target.default;
+ if (!matches) {
+ exports[subpath] = target;
+ changed = true;
+ }
+ }
+
+ if (!changed) {
+ return;
+ }
+ pkg.exports = exports;
+ await writeFile(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, "utf8");
+}
+
+/**
+ * Builds an extension package: emits `dist/index.mjs` (the mount factory) and
+ * `dist/tools/index.mjs` (named tool re-exports for consumer overrides), and
+ * fills the package `exports` map. Re-exports point at the authored source so the
+ * consumer's compiled tools and the mount share one handle instance.
+ */
+export async function buildExtensionPackage(
+ rootDir: string,
+ config: ExtensionBuildConfig,
+): Promise<string> {
+ const appRoot = resolve(rootDir);
+ const source = createDiskProjectSource();
+
+ const { diagnostics, manifest } = await discoverAgent({
+ agentRoot: config.sourceRoot,
+ appRoot,
+ source,
+ role: "extension",
+ });
+ const errors = diagnostics.filter((diagnostic) => diagnostic.severity === "error");
+ if (errors.length > 0) {
+ throw new Error(
+ `Cannot build extension "${config.packageName}":\n${errors
+ .map((diagnostic) => ` - ${diagnostic.message}`)
+ .join("\n")}`,
+ );
+ }
+
+ const rootEntries = await readSortedDirectoryEntries(source, config.sourceRoot);
+ const declarationModule = discoverFlatModuleSource({
+ rootEntries,
+ rootPath: config.sourceRoot,
+ slotName: "extension",
+ }).module;
+
+ if (declarationModule === undefined) {
+ throw new Error(
+ `Cannot build extension "${config.packageName}": its source root "${config.sourceRoot}" is missing an "extension.<ext>" declaration. Add \`export default defineExtension(...)\` there (with or without config).`,
+ );
+ }
+
+ const outDir = join(appRoot, "dist");
+ await mkdir(join(outDir, "tools"), { recursive: true });
+
+ // The package is loaded by Node natively when installed (its `.`/`./tools`
+ // specifiers are externalized), so the entrypoints must be runnable JS with the
+ // extension's namespace baked in — bundle them from source rather than
+ // re-exporting `.ts`. `defineState`/`defineExtension` scope to the same
+ // package-derived namespace the consumer applies to the source-recompiled
+ // contributions, so the mount binding and its tools agree on the config key.
+ const scopeNamespace = packageStateNamespace(config.packageName);
+
+ const specifierFrom = (fromDir: string, logicalPath: string): string => {
+ const rel = relative(fromDir, join(config.sourceRoot, logicalPath)).replaceAll("\\", "/");
+ return rel.startsWith(".") ? rel : `./${rel}`;
+ };
+
+ const declarationSpecifier = specifierFrom(outDir, declarationModule.logicalPath);
+ await emitEntrypoint({
+ entryPath: join(outDir, "index.mjs"),
+ typesPath: join(outDir, "index.d.ts"),
+ reexports: [
+ { name: "default", specifier: declarationSpecifier },
+ { name: config.shortName, specifier: declarationSpecifier },
+ ],
+ scopeNamespace,
+ });
+
+ await emitEntrypoint({
+ entryPath: join(outDir, "tools", "index.mjs"),
+ typesPath: join(outDir, "tools", "index.d.ts"),
+ reexports: manifest.tools.map((tool) => ({
+ name: toolExportName(tool.logicalPath),
+ specifier: specifierFrom(join(outDir, "tools"), tool.logicalPath),
+ })),
+ scopeNamespace,
+ });
+
+ await ensureExtensionExports(appRoot);
+
+ return outDir;
+}
+
+/** One `export { <name> } from "<specifier>"` line an entrypoint barrel emits. */
+interface Reexport {
+ /** Export binding; `"default"` emits the bare `export { default } from …`. */
+ readonly name: string;
+ readonly specifier: string;
+}
+
+/**
+ * Emits one Node-facing entrypoint: a self-contained runnable `.mjs` (bundled
+ * from the authored source with the extension namespace baked in) and a `.d.ts`
+ * barrel whose type re-exports resolve into the shipped `ext/` source.
+ */
+async function emitEntrypoint(input: {
+ readonly entryPath: string;
+ readonly typesPath: string;
+ readonly reexports: readonly Reexport[];
+ readonly scopeNamespace: string;
+}): Promise<void> {
+ const header = "// Generated by eve. Do not edit by hand.";
+ const line = (reexport: Reexport, specifier: string): string =>
+ reexport.name === "default"
+ ? `export { default } from ${JSON.stringify(specifier)};`
+ : `export { default as ${reexport.name} } from ${JSON.stringify(specifier)};`;
+
+ const barrel = [header, "", ...input.reexports.map((r) => line(r, r.specifier)), ""].join("\n");
+ await writeFile(input.entryPath, barrel, "utf8");
+ await writeFile(
+ input.entryPath,
+ await bundleAuthoredModuleCode(input.entryPath, {
+ extensionScopeNamespace: input.scopeNamespace,
+ }),
+ "utf8",
+ );
+
+ const declaration = [
+ header,
+ "",
+ ...input.reexports.map((r) => line(r, toDeclarationSpecifier(r.specifier))),
+ "",
+ ].join("\n");
+ await writeFile(input.typesPath, declaration, "utf8");
+}
+
+/**
+ * Rewrites a bundle specifier to the form a `.d.ts` re-export resolves for types,
+ * so declarations resolve into the shipped `.ts` source (`../ext/x.ts` → `../ext/x.js`).
+ */
+function toDeclarationSpecifier(specifier: string): string {
+ return specifier
+ .replace(/\.mts$/, ".mjs")
+ .replace(/\.cts$/, ".cjs")
+ .replace(/\.tsx?$/, ".js");
+}
+
+function toolExportName(logicalPath: string): string {
+ let name = logicalPath;
+ for (const extension of SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS) {
+ if (name.endsWith(extension)) {
+ name = name.slice(0, name.length - extension.length);
+ break;
+ }
+ }
+ return safeJsIdentifier(name.replace(/^tools\//, ""));
+}
+
+/**
+ * Coerces a name into a valid JS identifier for a generated
+ * `export { default as … }` binding — otherwise a tool like `get-weather.ts`
+ * would emit the invalid binding `export { default as get-weather }`.
+ */
+function safeJsIdentifier(name: string): string {
+ const sanitized = name.replace(/[^A-Za-z0-9_$]/g, "_");
+ return /^[A-Za-z_$]/.test(sanitized) ? sanitized : `_${sanitized}`;
+}
diff --git a/packages/eve/src/internal/nitro/host/create-application-nitro.ts b/packages/eve/src/internal/nitro/host/create-application-nitro.ts
index a582125ce..027d6b893 100644
--- a/packages/eve/src/internal/nitro/host/create-application-nitro.ts
+++ b/packages/eve/src/internal/nitro/host/create-application-nitro.ts
@@ -20,6 +20,7 @@ import {
type NitroArtifactsConfigInput,
} from "#internal/nitro/host/artifacts-config.js";
import { createCompiledSandboxBackendPrunePlugin } from "#internal/nitro/host/compiled-sandbox-backend-prune-plugin.js";
+import { createExtensionScopePlugin } from "#internal/bundler/extension-scope-plugin.js";
import { configureNitroRoutes } from "#internal/nitro/host/configure-nitro-routes.js";
import { applyEveCronHandlerRoute } from "#internal/nitro/host/cron-handler-route.js";
import { createNitroBundlerConfig } from "#internal/nitro/host/nitro-bundler-config.js";
@@ -660,9 +661,16 @@ export async function createApplicationNitro(
: unconfiguredOptionalEnginePackages
).push(packageName);
}
+ const extensionScopePlugin = createExtensionScopePlugin(
+ (preparedHost.compileResult.manifest.extensionMounts ?? []).map((mount) => ({
+ sourceRoot: mount.sourceRoot,
+ packageNamespace: mount.packageNamespace,
+ })),
+ );
const nitroBundlerPlugins = [
compiledSandboxBackendPrunePlugin,
createOptionalEngineDependencyPlugin(unconfiguredOptionalEnginePackages),
+ extensionScopePlugin,
].filter((plugin) => plugin !== null);
const nitroRolldownConfig = createNitroBundlerConfig(nitroBundlerPlugins);
const nitroRollupConfig = createNitroBundlerConfig(nitroBundlerPlugins);
diff --git a/packages/eve/src/public/definitions/extension.test.ts b/packages/eve/src/public/definitions/extension.test.ts
new file mode 100644
index 000000000..596dfcad7
--- /dev/null
+++ b/packages/eve/src/public/definitions/extension.test.ts
@@ -0,0 +1,98 @@
+import { describe, expect, it } from "vitest";
+import { z } from "zod";
+
+import type { StandardSchemaV1 } from "#compiled/@standard-schema/spec/index.js";
+import { defineExtension } from "#public/definitions/extension.js";
+
+// Each test uses a distinct namespace because the config registry is process-global.
+
+describe("defineExtension", () => {
+ it("exposes the declared schema", () => {
+ const schema = z.object({ apiKey: z.string() });
+ const ext = defineExtension({ config: schema }, "schema-test");
+ expect(ext.schema).toBe(schema);
+ });
+
+ it("binds values from the mount factory call and reads them with defaults applied", () => {
+ const ext = defineExtension(
+ {
+ config: z.object({
+ apiKey: z.string(),
+ baseUrl: z.string().default("https://api.acme.example"),
+ }),
+ },
+ "read-factory",
+ );
+
+ const mounted = ext({ apiKey: "sk-456" });
+
+ expect(mounted).toBeDefined();
+ expect(ext.config).toEqual({ apiKey: "sk-456", baseUrl: "https://api.acme.example" });
+ });
+
+ it("lets a bound value override a default", () => {
+ const ext = defineExtension(
+ { config: z.object({ baseUrl: z.string().default("https://default") }) },
+ "read-override",
+ );
+ ext({ baseUrl: "https://override" });
+ expect(ext.config).toEqual({ baseUrl: "https://override" });
+ });
+
+ it("applies schema defaults when read before an all-optional mount binds", () => {
+ const ext = defineExtension(
+ { config: z.object({ verbose: z.boolean().default(false) }) },
+ "read-zero",
+ );
+ expect(ext.config).toEqual({ verbose: false });
+ });
+
+ it("rejects a missing required field at bind", () => {
+ const ext = defineExtension({ config: z.object({ apiKey: z.string() }) }, "bind-required");
+ // @ts-expect-error apiKey is required by the schema
+ expect(() => ext({})).toThrow(/Invalid extension config/);
+ });
+
+ it("rejects a wrong-typed value at bind", () => {
+ const ext = defineExtension({ config: z.object({ pageSize: z.number() }) }, "bind-type");
+ // @ts-expect-error pageSize must be a number
+ expect(() => ext({ pageSize: "nope" })).toThrow(/Invalid extension config/);
+ });
+
+ it("rejects a config schema that validates asynchronously", () => {
+ const asyncSchema: StandardSchemaV1 = {
+ "~standard": {
+ version: 1,
+ vendor: "test",
+ validate: async (value) => ({ value }),
+ },
+ };
+ const ext = defineExtension({ config: asyncSchema }, "bind-async");
+ expect(() => ext({})).toThrow(/validate synchronously/);
+ });
+
+ it("has an empty config and undefined schema with no config declared", () => {
+ const ext = defineExtension(undefined, "noconfig-test");
+ expect(ext.schema).toBeUndefined();
+ expect(ext()).toBeDefined();
+ expect(ext.config).toEqual({});
+ });
+
+ it("types the config reader from the schema", () => {
+ const ext = defineExtension(
+ { config: z.object({ apiKey: z.string(), tier: z.string().default("free") }) },
+ "types-test",
+ );
+ ext({ apiKey: "k" });
+
+ // Compile-time assertions (checked by `tsc`).
+ const apiKey: string = ext.config.apiKey;
+ const tier: string = ext.config.tier;
+ // @ts-expect-error apiKey is a string, not a number
+ const wrong: number = ext.config.apiKey;
+ void wrong;
+
+ expect(apiKey).toBe("k");
+ expect(tier).toBe("free");
+ });
+});
diff --git a/packages/eve/src/public/definitions/extension.ts b/packages/eve/src/public/definitions/extension.ts
new file mode 100644
index 000000000..8343ba36f
--- /dev/null
+++ b/packages/eve/src/public/definitions/extension.ts
@@ -0,0 +1,162 @@
+import type { StandardSchemaV1 } from "#compiled/@standard-schema/spec/index.js";
+
+/** Marker carried by the object an extension handle produces when called. */
+const MOUNTED_EXTENSION = Symbol.for("eve.mounted-extension");
+
+const CONFIG_REGISTRY = Symbol.for("eve.extension-config-registry");
+
+/**
+ * Ambient namespace set by the dev/eval loader around a mount module's
+ * evaluation. A mount loads the handle unbundled (cross-package), so the
+ * bundler's scope shim never runs on it; this fallback lets the mount still bind
+ * under the package namespace. The shim's explicit argument takes precedence.
+ */
+const EXT_CONFIG_SCOPE = Symbol.for("eve.ext-config-scope");
+
+function ambientConfigScope(): string | undefined {
+ const scope = (globalThis as Record<symbol, unknown>)[EXT_CONFIG_SCOPE];
+ return typeof scope === "string" && scope.length > 0 ? scope : undefined;
+}
+
+/** Process-global map of extension namespace to its bound, validated config. */
+function configRegistry(): Map<string, Record<string, unknown>> {
+ const container = globalThis as Record<symbol, unknown>;
+ let registry = container[CONFIG_REGISTRY] as Map<string, Record<string, unknown>> | undefined;
+ if (registry === undefined) {
+ registry = new Map();
+ container[CONFIG_REGISTRY] = registry;
+ }
+ return registry;
+}
+
+/**
+ * Marker value an extension handle returns when called. The consumer's mount
+ * file default-exports it (directly for a no-config extension, or as the result
+ * of the factory call for a configured one). The build reads the mount statically
+ * for its package specifier; the runtime evaluates it so the call binds config
+ * into the extension's scope.
+ */
+export interface MountedExtension {
+ readonly [MOUNTED_EXTENSION]: true;
+}
+
+/**
+ * Typed handle returned by {@link defineExtension} for an extension that declares
+ * config. It is the mount factory the consumer calls (`crm({ apiKey })`), which
+ * validates and binds the values; the extension's own tools, hooks, and
+ * connections read the bound config through {@link ExtensionHandle.config}.
+ */
+export interface ExtensionHandle<S extends StandardSchemaV1 = StandardSchemaV1> {
+ /** Consumer mount factory: validates `values` against the schema and binds them. */
+ (values: StandardSchemaV1.InferInput<S>): MountedExtension;
+ /** The bound configuration, typed from the schema (defaults applied). */
+ readonly config: StandardSchemaV1.InferOutput<S>;
+ /** The declared config schema; read by `eve build`. */
+ readonly schema: S;
+}
+
+/**
+ * Handle returned by {@link defineExtension} for an extension with no config.
+ * Mounted with a bare re-export; {@link NoConfigExtensionHandle.config} is empty.
+ */
+export interface NoConfigExtensionHandle {
+ (): MountedExtension;
+ readonly config: Record<string, never>;
+ readonly schema: undefined;
+}
+
+/**
+ * Validates consumer config through the extension's Standard Schema, applying
+ * defaults. Binding runs while the mount module evaluates, so async validation
+ * is rejected.
+ */
+function validateConfig(
+ schema: StandardSchemaV1 | undefined,
+ values: unknown,
+): Record<string, unknown> {
+ if (schema === undefined) {
+ return {};
+ }
+ const result = schema["~standard"].validate(values ?? {});
+ if (result instanceof Promise) {
+ throw new Error(
+ "Extension config must validate synchronously; the config schema uses async validation, which is not supported at mount.",
+ );
+ }
+ if (result.issues !== undefined) {
+ const detail = result.issues
+ .map((issue) => {
+ const path = issue.path
+ ?.map((segment) => String(typeof segment === "object" ? segment.key : segment))
+ .join(".");
+ return path !== undefined && path.length > 0 ? `${path}: ${issue.message}` : issue.message;
+ })
+ .join("; ");
+ throw new Error(`Invalid extension config: ${detail}`);
+ }
+ return result.value as Record<string, unknown>;
+}
+
+/**
+ * Declares an eve extension. Optionally takes a `config` schema — any Standard
+ * Schema (e.g. a Zod object) — describing the settings a consuming agent passes
+ * at the mount site.
+ *
+ * The default export of an extension's `ext/extension.ts` is a `defineExtension`
+ * handle. A consuming agent mounts it, calling the handle to bind config
+ * (`export default crm({ apiKey })`) or re-exporting it directly when there is no
+ * config (`export { default } from "@acme/gizmo"`). The extension's own tools,
+ * hooks, and connections read the bound config through the handle:
+ *
+ * ```ts
+ * // ext/extension.ts
+ * import { defineExtension } from "eve/extension";
+ * import { z } from "zod";
+ * export default defineExtension({ config: z.object({ apiKey: z.string() }) });
+ *
+ * // ext/tools/search.ts
+ * import extension from "../extension.js";
+ * const { apiKey } = extension.config;
+ * ```
+ *
+ * The `namespace` argument is supplied by the bundler shim and is not part of the
+ * authoring surface.
+ */
+export function defineExtension<const S extends StandardSchemaV1>(
+ options: { readonly config: S },
+ namespace?: string,
+): ExtensionHandle<S>;
+export function defineExtension(
+ options?: { readonly config?: undefined },
+ namespace?: string,
+): NoConfigExtensionHandle;
+export function defineExtension(
+ options?: { readonly config?: StandardSchemaV1 },
+ namespace?: string,
+): ExtensionHandle | NoConfigExtensionHandle {
+ const schema = options?.config;
+ // The bundler shim passes the namespace explicitly for the extension's own
+ // bundled modules; an unshimmed cross-package mount falls back to the ambient
+ // scope the loader sets around the mount evaluation.
+ const resolvedNamespace = namespace ?? ambientConfigScope();
+
+ const handle = ((values?: unknown): MountedExtension => {
+ const parsed = validateConfig(schema, values);
+ if (resolvedNamespace !== undefined && resolvedNamespace.length > 0) {
+ configRegistry().set(resolvedNamespace, parsed);
+ }
+ return { [MOUNTED_EXTENSION]: true };
+ }) as ExtensionHandle & NoConfigExtensionHandle;
+
+ Object.defineProperty(handle, "schema", { value: schema, enumerable: true });
+ Object.defineProperty(handle, "config", {
+ enumerable: true,
+ get(): Record<string, unknown> {
+ const bound =
+ resolvedNamespace === undefined ? undefined : configRegistry().get(resolvedNamespace);
+ return bound ?? validateConfig(schema, {});
+ },
+ });
+
+ return handle;
+}
diff --git a/packages/eve/src/public/extension/index.ts b/packages/eve/src/public/extension/index.ts
new file mode 100644
index 000000000..70a281d26
--- /dev/null
+++ b/packages/eve/src/public/extension/index.ts
@@ -0,0 +1,16 @@
+/**
+ * Authoring helpers for eve extensions — reusable packages mounted into an
+ * agent through `agent/extensions/`.
+ *
+ * @example
+ * ```ts
+ * import { defineExtension } from "eve/extension";
+ * ```
+ */
+
+export {
+ defineExtension,
+ type ExtensionHandle,
+ type MountedExtension,
+ type NoConfigExtensionHandle,
+} from "#public/definitions/extension.js";
diff --git a/packages/eve/src/runtime/resolve-dynamic-skill.ts b/packages/eve/src/runtime/resolve-dynamic-skill.ts
index 8a70f2e03..5f5fb3851 100644
--- a/packages/eve/src/runtime/resolve-dynamic-skill.ts
+++ b/packages/eve/src/runtime/resolve-dynamic-skill.ts
@@ -43,6 +43,7 @@ export async function resolveDynamicSkillDefinition(
eventNames: [...definition.eventNames],
events: handlers as ResolvedDynamicSkillResolver["events"],
exportName: definition.exportName,
+ extensionNamespace: definition.extensionNamespace,
logicalPath: definition.logicalPath,
slug: definition.slug,
sourceId: definition.sourceId,
diff --git a/packages/eve/src/runtime/resolve-dynamic-tool.ts b/packages/eve/src/runtime/resolve-dynamic-tool.ts
index 135dace04..c2ffa91fd 100644
--- a/packages/eve/src/runtime/resolve-dynamic-tool.ts
+++ b/packages/eve/src/runtime/resolve-dynamic-tool.ts
@@ -56,6 +56,7 @@ export async function resolveDynamicToolDefinition(
eventNames: [...definition.eventNames],
events: handlers as ResolvedDynamicToolResolver["events"],
exportName: definition.exportName,
+ extensionNamespace: definition.extensionNamespace,
logicalPath: definition.logicalPath,
slug: definition.slug,
sourceId: definition.sourceId,
diff --git a/packages/eve/src/runtime/types.ts b/packages/eve/src/runtime/types.ts
index de8020a8e..12986ed1c 100644
--- a/packages/eve/src/runtime/types.ts
+++ b/packages/eve/src/runtime/types.ts
@@ -327,6 +327,11 @@ export interface ResolvedDynamicToolResolver extends Readonly<ModuleSourceRef> {
readonly events: Readonly<
Record<string, (event: unknown, ctx: unknown) => unknown | Promise<unknown>>
>;
+ /**
+ * Mount namespace when this resolver comes from an extension. Names of tools
+ * the resolver produces are prefixed with `${extensionNamespace}__`.
+ */
+ readonly extensionNamespace?: string;
}
/**
@@ -340,6 +345,11 @@ export interface ResolvedDynamicSkillResolver extends Readonly<ModuleSourceRef>
readonly events: Readonly<
Record<string, (event: unknown, ctx: unknown) => unknown | Promise<unknown>>
>;
+ /**
+ * Mount namespace when this resolver comes from an extension. Names of skills
+ * a map resolver produces are prefixed with `${extensionNamespace}__`.
+ */
+ readonly extensionNamespace?: string;
}
/**
diff --git a/packages/eve/test/discover-manifest.test.ts b/packages/eve/test/discover-manifest.test.ts
index 00c24eb99..4e1cea0e8 100644
--- a/packages/eve/test/discover-manifest.test.ts
+++ b/packages/eve/test/discover-manifest.test.ts
@@ -32,6 +32,8 @@ describe("agent source manifest", () => {
errors: 0,
warnings: 0,
},
+ extensions: [],
+ resolvedExtensions: [],
hooks: [],
instructions: [],
lib: [],
diff --git a/packages/eve/test/scenarios/compile-agent.scenario.test.ts b/packages/eve/test/scenarios/compile-agent.scenario.test.ts
index 2667b7646..61bf95ed3 100644
--- a/packages/eve/test/scenarios/compile-agent.scenario.test.ts
+++ b/packages/eve/test/scenarios/compile-agent.scenario.test.ts
@@ -559,6 +559,51 @@ describe("compileAgent", () => {
});
});
+ it("composes a mounted extension's tools into the consuming agent", async () => {
+ const app = await scenarioApp({
+ name: "mounted-extension",
+ installDependencies: true,
+ files: {
+ "agent/agent.mjs": 'export default { model: "openai/gpt-5.4" };\n',
+ "agent/instructions.md": "You are a precise assistant.\n",
+ "agent/extensions/crm.ts": 'export { default } from "@acme/crm";\n',
+ "node_modules/@acme/crm/package.json": `${JSON.stringify({
+ name: "@acme/crm",
+ type: "module",
+ eve: { extension: "ext" },
+ exports: { ".": "./ext/index.mjs" },
+ })}\n`,
+ "node_modules/@acme/crm/ext/index.mjs": "export default {};\n",
+ "node_modules/@acme/crm/ext/instructions/policy.mjs":
+ 'export default { markdown: "Prefer the CRM over guessing." };\n',
+ "node_modules/@acme/crm/ext/tools/crm_search.mjs": [
+ 'import { defineTool } from "eve/tools";',
+ "",
+ "export default defineTool({",
+ ' description: "Search the CRM.",',
+ ' inputSchema: { type: "object", properties: {}, additionalProperties: false },',
+ " async execute() {",
+ " return { ok: true };",
+ " },",
+ "});",
+ "",
+ ].join("\n"),
+ },
+ });
+
+ const result = await compileAgent({ startPath: app.appRoot });
+
+ expect(result.manifest.tools.map((tool) => tool.name)).toContain("crm__crm_search");
+ const composed = result.manifest.tools.find((tool) => tool.name === "crm__crm_search");
+ expect(composed?.sourceId).toBe("ext:crm:tools/crm_search.mjs");
+ expect(composed?.description).toBe("Search the CRM.");
+ expect(result.manifest.instructions?.markdown).toContain("Prefer the CRM over guessing.");
+
+ const moduleMapText = await readFile(result.paths.moduleMapPath, "utf8");
+ expect(moduleMapText).toContain("@acme/crm/ext/tools/crm_search.mjs");
+ expect(moduleMapText).toContain('"ext:crm:tools/crm_search.mjs"');
+ });
+
it("compiles extension-variant authored modules from a fixture app", async () => {
const app = await scenarioApp(EXTENSION_AGENT_DESCRIPTOR);
diff --git a/packages/eve/test/scenarios/mounted-extension-authored-source.scenario.test.ts b/packages/eve/test/scenarios/mounted-extension-authored-source.scenario.test.ts
new file mode 100644
index 000000000..736100619
--- /dev/null
+++ b/packages/eve/test/scenarios/mounted-extension-authored-source.scenario.test.ts
@@ -0,0 +1,73 @@
+import { describe, expect, it } from "vitest";
+
+import { compileAgent } from "../../src/compiler/compile-agent.js";
+import { createDiskRuntimeCompiledArtifactsSource } from "../../src/runtime/compiled-artifacts-source.js";
+import { loadCompiledManifest } from "../../src/runtime/loaders/manifest.js";
+import { loadCompiledModuleMapFromAuthoredSource } from "../../src/internal/authored-module-map-loader.js";
+import { resolveRuntimeAgentGraph } from "../../src/runtime/resolve-agent-graph.js";
+import { useScenarioApp } from "../../src/internal/testing/scenario-app.js";
+
+const scenarioApp = useScenarioApp();
+
+/**
+ * Runs the `eve eval` / `eve dev` path: the module map is hydrated from authored
+ * source, so the extension-scope plugin must bind config across separately-bundled
+ * mount and tool modules. Deterministic guard for the config-binding regression.
+ */
+describe("mounted extension via authored-source loader", () => {
+ it("binds mounted config so a composed tool reads it", async () => {
+ const app = await scenarioApp({
+ name: "mounted-extension-authored-source",
+ installDependencies: true,
+ files: {
+ "agent/agent.mjs": 'export default { model: "openai/gpt-5.4" };\n',
+ "agent/instructions.md": "You are a precise assistant.\n",
+ "agent/extensions/crm.mjs": [
+ 'import crm from "@acme/crm";',
+ 'export default crm({ apiKey: "sk-authored" });',
+ "",
+ ].join("\n"),
+ "node_modules/@acme/crm/package.json": `${JSON.stringify({
+ name: "@acme/crm",
+ type: "module",
+ eve: { extension: "ext" },
+ exports: { ".": "./ext/extension.mjs" },
+ })}\n`,
+ "node_modules/@acme/crm/ext/extension.mjs": [
+ 'import { defineExtension } from "eve/extension";',
+ // Minimal pass-through Standard Schema — this scenario tests binding, not validation.
+ "const config = { '~standard': { version: 1, vendor: 'scenario', validate: (value) => ({ value }) } };",
+ "export default defineExtension({ config });",
+ "",
+ ].join("\n"),
+ "node_modules/@acme/crm/ext/tools/crm_echo.mjs": [
+ 'import { defineTool } from "eve/tools";',
+ 'import extension from "../extension.mjs";',
+ "export default defineTool({",
+ ' description: "Echo the configured API key.",',
+ " inputSchema: { type: 'object', properties: {}, additionalProperties: false },",
+ " async execute() {",
+ " return { apiKey: extension.config.apiKey };",
+ " },",
+ "});",
+ "",
+ ].join("\n"),
+ },
+ });
+
+ await compileAgent({ startPath: app.appRoot });
+
+ const compiledArtifactsSource = createDiskRuntimeCompiledArtifactsSource(app.appRoot);
+ const [manifest, moduleMap] = await Promise.all([
+ loadCompiledManifest({ compiledArtifactsSource }),
+ loadCompiledModuleMapFromAuthoredSource({ compiledArtifactsSource }),
+ ]);
+ const graph = await resolveRuntimeAgentGraph({ manifest, moduleMap });
+
+ const tool = graph.root.agent.tools.find((entry) => entry.name === "crm__crm_echo");
+ expect(tool).toBeDefined();
+ await expect(tool?.execute?.({}, { messages: [], toolCallId: "call_1" })).resolves.toEqual({
+ apiKey: "sk-authored",
+ });
+ });
+});
diff --git a/packages/eve/test/scenarios/mounted-extension-directory-override.scenario.test.ts b/packages/eve/test/scenarios/mounted-extension-directory-override.scenario.test.ts
new file mode 100644
index 000000000..fe406d54c
--- /dev/null
+++ b/packages/eve/test/scenarios/mounted-extension-directory-override.scenario.test.ts
@@ -0,0 +1,149 @@
+import { describe, expect, it } from "vitest";
+
+import { compileAgent } from "../../src/compiler/compile-agent.js";
+import { createDiskRuntimeCompiledArtifactsSource } from "../../src/runtime/compiled-artifacts-source.js";
+import { loadCompiledManifest } from "../../src/runtime/loaders/manifest.js";
+import { loadCompiledModuleMapFromAuthoredSource } from "../../src/internal/authored-module-map-loader.js";
+import { resolveRuntimeAgentGraph } from "../../src/runtime/resolve-agent-graph.js";
+import { useScenarioApp } from "../../src/internal/testing/scenario-app.js";
+
+const scenarioApp = useScenarioApp();
+
+/**
+ * The directory mount form with a co-located override slot. The extension's own
+ * tools compose and bind config, while a consumer override of the same name
+ * shadows the extension's contribution. Runs through the dev/eval authored-source
+ * loader to exercise directory discovery and override precedence deterministically.
+ */
+describe("mounted extension via directory form with override", () => {
+ it("binds base config and lets a co-located override shadow or disable a tool", async () => {
+ const app = await scenarioApp({
+ name: "mounted-extension-directory-override",
+ installDependencies: true,
+ files: {
+ "agent/agent.mjs": 'export default { model: "openai/gpt-5.4" };\n',
+ "agent/instructions.md": "You are a precise assistant.\n",
+ "agent/extensions/crm/extension.mjs": [
+ 'import crm from "@acme/crm";',
+ 'export default crm({ apiKey: "sk-dir" });',
+ "",
+ ].join("\n"),
+ // Co-located override: shadows the extension's own crm_status.
+ "agent/extensions/crm/tools/crm_status.mjs": [
+ 'import { defineTool } from "eve/tools";',
+ "export default defineTool({",
+ ' description: "Report the consumer status.",',
+ " inputSchema: { type: 'object', properties: {}, additionalProperties: false },",
+ " async execute() {",
+ ' return { status: "consumer-status" };',
+ " },",
+ "});",
+ "",
+ ].join("\n"),
+ // Co-located override: opts out of the extension's own crm_legacy.
+ "agent/extensions/crm/tools/crm_legacy.mjs": [
+ 'import { disableTool } from "eve/tools";',
+ "export default disableTool();",
+ "",
+ ].join("\n"),
+ // Co-located override: opts out of the extension's dynamic crm_pulse.
+ "agent/extensions/crm/tools/crm_pulse.mjs": [
+ 'import { disableTool } from "eve/tools";',
+ "export default disableTool();",
+ "",
+ ].join("\n"),
+ "node_modules/@acme/crm/package.json": `${JSON.stringify({
+ name: "@acme/crm",
+ type: "module",
+ eve: { extension: "ext" },
+ exports: { ".": "./ext/extension.mjs" },
+ })}\n`,
+ "node_modules/@acme/crm/ext/extension.mjs": [
+ 'import { defineExtension } from "eve/extension";',
+ "const config = { '~standard': { version: 1, vendor: 'scenario', validate: (value) => ({ value }) } };",
+ "export default defineExtension({ config });",
+ "",
+ ].join("\n"),
+ "node_modules/@acme/crm/ext/tools/crm_echo.mjs": [
+ 'import { defineTool } from "eve/tools";',
+ 'import extension from "../extension.mjs";',
+ "export default defineTool({",
+ ' description: "Echo the configured API key.",',
+ " inputSchema: { type: 'object', properties: {}, additionalProperties: false },",
+ " async execute() {",
+ " return { apiKey: extension.config.apiKey };",
+ " },",
+ "});",
+ "",
+ ].join("\n"),
+ "node_modules/@acme/crm/ext/tools/crm_status.mjs": [
+ 'import { defineTool } from "eve/tools";',
+ "export default defineTool({",
+ ' description: "Report the extension status.",',
+ " inputSchema: { type: 'object', properties: {}, additionalProperties: false },",
+ " async execute() {",
+ ' return { status: "extension-status" };',
+ " },",
+ "});",
+ "",
+ ].join("\n"),
+ "node_modules/@acme/crm/ext/tools/crm_legacy.mjs": [
+ 'import { defineTool } from "eve/tools";',
+ "export default defineTool({",
+ ' description: "A legacy tool the consumer opts out of.",',
+ " inputSchema: { type: 'object', properties: {}, additionalProperties: false },",
+ " async execute() {",
+ " return { legacy: true };",
+ " },",
+ "});",
+ "",
+ ].join("\n"),
+ "node_modules/@acme/crm/ext/tools/crm_pulse.mjs": [
+ 'import { defineDynamic, defineTool } from "eve/tools";',
+ "export default defineDynamic({",
+ " events: {",
+ ' "session.started": async () =>',
+ " defineTool({",
+ ' description: "A dynamic tool the consumer opts out of.",',
+ " inputSchema: { type: 'object', properties: {}, additionalProperties: false },",
+ " async execute() {",
+ " return { pulse: true };",
+ " },",
+ " }),",
+ " },",
+ "});",
+ "",
+ ].join("\n"),
+ },
+ });
+
+ await compileAgent({ startPath: app.appRoot });
+
+ const compiledArtifactsSource = createDiskRuntimeCompiledArtifactsSource(app.appRoot);
+ const [manifest, moduleMap] = await Promise.all([
+ loadCompiledManifest({ compiledArtifactsSource }),
+ loadCompiledModuleMapFromAuthoredSource({ compiledArtifactsSource }),
+ ]);
+ const graph = await resolveRuntimeAgentGraph({ manifest, moduleMap });
+
+ const echo = graph.root.agent.tools.find((entry) => entry.name === "crm__crm_echo");
+ expect(echo).toBeDefined();
+ await expect(echo?.execute?.({}, { messages: [], toolCallId: "call_1" })).resolves.toEqual({
+ apiKey: "sk-dir",
+ });
+
+ const status = graph.root.agent.tools.find((entry) => entry.name === "crm__crm_status");
+ expect(status).toBeDefined();
+ await expect(status?.execute?.({}, { messages: [], toolCallId: "call_2" })).resolves.toEqual({
+ status: "consumer-status",
+ });
+
+ const legacy = graph.root.agent.tools.find((entry) => entry.name === "crm__crm_legacy");
+ expect(legacy).toBeUndefined();
+
+ const pulse = graph.root.agent.dynamicToolResolvers.find(
+ (resolver) => resolver.slug === "crm__crm_pulse",
+ );
+ expect(pulse).toBeUndefined();
+ });
+});
diff --git a/packages/eve/test/scenarios/mounted-extension-installed.scenario.test.ts b/packages/eve/test/scenarios/mounted-extension-installed.scenario.test.ts
new file mode 100644
index 000000000..fb5161680
--- /dev/null
+++ b/packages/eve/test/scenarios/mounted-extension-installed.scenario.test.ts
@@ -0,0 +1,126 @@
+import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+
+import { afterEach, describe, expect, it } from "vitest";
+
+import { compileAgent } from "../../src/compiler/compile-agent.js";
+import {
+ buildExtensionPackage,
+ tryReadExtensionBuildConfig,
+} from "../../src/internal/nitro/host/build-extension.js";
+import { loadCompiledModuleMapFromAuthoredSource } from "../../src/internal/authored-module-map-loader.js";
+import { useScenarioApp } from "../../src/internal/testing/scenario-app.js";
+import { createDiskRuntimeCompiledArtifactsSource } from "../../src/runtime/compiled-artifacts-source.js";
+import { loadCompiledManifest } from "../../src/runtime/loaders/manifest.js";
+import { resolveRuntimeAgentGraph } from "../../src/runtime/resolve-agent-graph.js";
+
+const scenarioApp = useScenarioApp();
+const tempRoots: string[] = [];
+
+afterEach(async () => {
+ await Promise.all(
+ tempRoots
+ .splice(0)
+ .map((root) => rm(root, { force: true, maxRetries: 5, recursive: true, retryDelay: 200 })),
+ );
+});
+
+const PACKAGE_NAME = "@acme/installed-crm";
+const EXT_TREE: Readonly<Record<string, string>> = {
+ "ext/extension.ts": [
+ 'import { defineExtension } from "eve/extension";',
+ 'const config = { "~standard": { version: 1, vendor: "scenario", validate: (value) => ({ value }) } };',
+ "export default defineExtension({ config });",
+ "",
+ ].join("\n"),
+ "ext/tools/echo.ts": [
+ 'import { defineTool } from "eve/tools";',
+ 'import extension from "../extension.js";',
+ "export default defineTool({",
+ ' description: "Echo the configured API key.",',
+ ' inputSchema: { type: "object", properties: {}, additionalProperties: false },',
+ " async execute() {",
+ " return { apiKey: extension.config.apiKey };",
+ " },",
+ "});",
+ "",
+ ].join("\n"),
+};
+
+/**
+ * Runs `eve build` over a `.ts`-authored extension and returns the built package
+ * (compiled `dist/` + source `ext/`) as files to place under the consumer's real
+ * `node_modules/`. Placing it there — rather than a workspace symlink — means the
+ * mount's `.` entrypoint resolves under `node_modules` and is externalized, so
+ * Node loads the emitted `dist/index.mjs` directly. The `.ts` source is
+ * load-bearing: only TypeScript under `node_modules` triggers the type-stripping
+ * refusal a `.mjs`-authored extension would never hit.
+ */
+async function buildInstalledExtensionFiles(): Promise<Record<string, string>> {
+ const extRoot = await mkdtemp(join(tmpdir(), "eve-ext-src-"));
+ tempRoots.push(extRoot);
+ await writeFile(
+ join(extRoot, "package.json"),
+ `${JSON.stringify({ name: PACKAGE_NAME, type: "module", eve: { extension: "./ext" } }, null, 2)}\n`,
+ "utf8",
+ );
+ await mkdir(join(extRoot, "ext", "tools"), { recursive: true });
+ for (const [path, contents] of Object.entries(EXT_TREE)) {
+ await writeFile(join(extRoot, path), contents, "utf8");
+ }
+
+ const config = await tryReadExtensionBuildConfig(extRoot);
+ await buildExtensionPackage(extRoot, config!);
+
+ // `eve build` writes dist/ (compiled entrypoints + declarations) and the
+ // exports map into package.json; ship those plus the ext/ source verbatim.
+ const packaged = [
+ "package.json",
+ "dist/index.mjs",
+ "dist/index.d.ts",
+ "dist/tools/index.mjs",
+ "dist/tools/index.d.ts",
+ ...Object.keys(EXT_TREE),
+ ];
+ const files: Record<string, string> = {};
+ for (const path of packaged) {
+ files[`node_modules/${PACKAGE_NAME}/${path}`] = await readFile(join(extRoot, path), "utf8");
+ }
+ return files;
+}
+
+describe("mounted extension installed under node_modules", () => {
+ it("loads the compiled entrypoint and binds config from a built package", async () => {
+ const extensionFiles = await buildInstalledExtensionFiles();
+ const app = await scenarioApp({
+ name: "mounted-extension-installed",
+ installDependencies: true,
+ files: {
+ "agent/agent.mjs": 'export default { model: "openai/gpt-5.4" };\n',
+ "agent/instructions.md": "You are a precise assistant.\n",
+ "agent/extensions/crm.mjs": [
+ `import crm from "${PACKAGE_NAME}";`,
+ 'export default crm({ apiKey: "sk-installed" });',
+ "",
+ ].join("\n"),
+ ...extensionFiles,
+ },
+ });
+
+ await compileAgent({ startPath: app.appRoot });
+
+ const compiledArtifactsSource = createDiskRuntimeCompiledArtifactsSource(app.appRoot);
+ const [manifest, moduleMap] = await Promise.all([
+ loadCompiledManifest({ compiledArtifactsSource }),
+ loadCompiledModuleMapFromAuthoredSource({ compiledArtifactsSource }),
+ ]);
+ const graph = await resolveRuntimeAgentGraph({ manifest, moduleMap });
+
+ const echo = graph.root.agent.tools.find((entry) => entry.name === "crm__echo");
+ expect(echo).toBeDefined();
+ await expect(echo?.execute?.({}, { messages: [], toolCallId: "call_1" })).resolves.toEqual({
+ apiKey: "sk-installed",
+ });
+ });
+});
diff --git a/packages/eve/test/scenarios/mounted-extension-no-config.scenario.test.ts b/packages/eve/test/scenarios/mounted-extension-no-config.scenario.test.ts
new file mode 100644
index 000000000..555527920
--- /dev/null
+++ b/packages/eve/test/scenarios/mounted-extension-no-config.scenario.test.ts
@@ -0,0 +1,66 @@
+import { describe, expect, it } from "vitest";
+
+import { compileAgent } from "../../src/compiler/compile-agent.js";
+import { createDiskRuntimeCompiledArtifactsSource } from "../../src/runtime/compiled-artifacts-source.js";
+import { loadCompiledManifest } from "../../src/runtime/loaders/manifest.js";
+import { loadCompiledModuleMapFromAuthoredSource } from "../../src/internal/authored-module-map-loader.js";
+import { resolveRuntimeAgentGraph } from "../../src/runtime/resolve-agent-graph.js";
+import { useScenarioApp } from "../../src/internal/testing/scenario-app.js";
+
+const scenarioApp = useScenarioApp();
+
+/**
+ * A no-config extension (`defineExtension()`, no schema) mounted with a bare
+ * re-export — no factory call. Proves config is optional end to end through the
+ * dev/eval loader.
+ */
+describe("mounted extension without config", () => {
+ it("composes and runs a no-config extension mounted via re-export", async () => {
+ const app = await scenarioApp({
+ name: "mounted-extension-no-config",
+ installDependencies: true,
+ files: {
+ "agent/agent.mjs": 'export default { model: "openai/gpt-5.4" };\n',
+ "agent/instructions.md": "You are a precise assistant.\n",
+ "agent/extensions/widget.mjs": 'export { default } from "@acme/widget";\n',
+ "node_modules/@acme/widget/package.json": `${JSON.stringify({
+ name: "@acme/widget",
+ type: "module",
+ eve: { extension: "ext" },
+ exports: { ".": "./ext/extension.mjs" },
+ })}\n`,
+ "node_modules/@acme/widget/ext/extension.mjs": [
+ 'import { defineExtension } from "eve/extension";',
+ "export default defineExtension();",
+ "",
+ ].join("\n"),
+ "node_modules/@acme/widget/ext/tools/widget_ping.mjs": [
+ 'import { defineTool } from "eve/tools";',
+ "export default defineTool({",
+ ' description: "Return a fixed widget token.",',
+ " inputSchema: { type: 'object', properties: {}, additionalProperties: false },",
+ " async execute() {",
+ ' return { token: "widget-ok" };',
+ " },",
+ "});",
+ "",
+ ].join("\n"),
+ },
+ });
+
+ await compileAgent({ startPath: app.appRoot });
+
+ const compiledArtifactsSource = createDiskRuntimeCompiledArtifactsSource(app.appRoot);
+ const [manifest, moduleMap] = await Promise.all([
+ loadCompiledManifest({ compiledArtifactsSource }),
+ loadCompiledModuleMapFromAuthoredSource({ compiledArtifactsSource }),
+ ]);
+ const graph = await resolveRuntimeAgentGraph({ manifest, moduleMap });
+
+ const tool = graph.root.agent.tools.find((entry) => entry.name === "widget__widget_ping");
+ expect(tool).toBeDefined();
+ await expect(tool?.execute?.({}, { messages: [], toolCallId: "call_1" })).resolves.toEqual({
+ token: "widget-ok",
+ });
+ });
+});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index a9c676925..d9faddc66 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -857,6 +857,60 @@ importers:
specifier: 'catalog:'
version: 7.0.2
+ e2e/fixtures/extensions:
+ dependencies:
+ eve:
+ specifier: workspace:*
+ version: link:../../../packages/eve
+ gizmo-extension:
+ specifier: workspace:*
+ version: link:../gizmo-extension
+ toolkit-extension:
+ specifier: workspace:*
+ version: link:../toolkit-extension
+ zod:
+ specifier: 'catalog:'
+ version: 4.4.3
+ devDependencies:
+ '@types/node':
+ specifier: 'catalog:'
+ version: 25.9.1
+ typescript:
+ specifier: 'catalog:'
+ version: 7.0.2
+
+ e2e/fixtures/gizmo-extension:
+ dependencies:
+ eve:
+ specifier: workspace:*
+ version: link:../../../packages/eve
+ zod:
+ specifier: 'catalog:'
+ version: 4.4.3
+ devDependencies:
+ '@types/node':
+ specifier: 'catalog:'
+ version: 25.9.1
+ typescript:
+ specifier: 'catalog:'
+ version: 7.0.2
+
+ e2e/fixtures/toolkit-extension:
+ dependencies:
+ eve:
+ specifier: workspace:*
+ version: link:../../../packages/eve
+ zod:
+ specifier: 'catalog:'
+ version: 4.4.3
+ devDependencies:
+ '@types/node':
+ specifier: 'catalog:'
+ version: 25.9.1
+ typescript:
+ specifier: 'catalog:'
+ version: 7.0.2
+
packages/eve:
dependencies:
'@opentelemetry/api':
@@ -3720,6 +3774,9 @@ packages:
'@radix-ui/[email protected]':
resolution: {integrity: sha512-7AdCK9PQyiljKoBDbN8OuctCbd/esdwZPQ8RtOE3SsyQtUpiPb+ND75q0jEhC1m1ecBI0MFNeLJvwIh9iKHRcQ==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-d86WIWFYNtGA0H/d8exstrTRTp7eWJYlYJbtNofxr/3ljupZYn6EFDG/Qgu/0Kc8v7yMUxySagqJsL1+PdYjWg==}
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-HQDOFTKwSnmUij6l54wYJJtxTAnxI71+YJLOrjm2ladFB8HAV5Jt7hwaZPhWTGBkYoW4+ZAOfNZrLDh/qvxSYA==}
peerDependencies:
@@ -3772,8 +3829,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-24Zz/0SYx8F2bSVThBnQrdJs2VbKelyuJordcFRRdA0fRAhrq/wSegGCqaQz34VQoiWqSMGYCYXEhynLSlyQlg==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-BpZJNmetujnGgUI6OX0jEhEmlA46WPqgub8Rv09Kyquwd0cc1ndMKpiPYCjmBU6KSSRPAMtgLpEoZSG/tdNIWQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -3798,8 +3855,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-6c2cXpNlAgHDhKguK24XcWHHayMpK+lk7/WwBXBco+ZJ4Dv7xP++GBM280KgTD/HCRu3jSdfe8WQiZssonYaIA==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-FA7n1f6D/DwGE0+AWxiY5LacNbbExQuEgMubeG06idEaH+mSLuf9dp/qBNqOnvbTQ+4gZ2ue1RATF1Ub91Mg5g==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -3889,8 +3946,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-+8PWoLLZv3AVb5m0pvoiOca/bQGzc9vPVb+982HB2x3Un0DpYEPM3zLMl4oqRpBsocJuNqLkiv/HXTnTrlwr4g==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-sST0qh8GzOB7besQ3tMLWLyngnRuSk0gc/Hm+667KYKQFCt6Y6ZXv25WlqM7dIDK54ULCh5+CHmk4LIolzfz+A==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -3915,8 +3972,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-eUEUoGMDpfkgHWSE97ZZaUJtzR1M7EKnNIpD1Q16+8JR9NWghcaqMulx9PuCQ720w0UclfYn6FEbCdd5Hx087g==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-JroKHfQBfh+fDuzpPsBC+pESkhuq8ql4hljTguz8MWnS35cISr3d/Jhl9kYrB44FlDtxCArYdDvTx+BSsJ64rQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -3954,8 +4011,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-8A1zibu5skAQ+UVbaeNH5hVMibiFCRJzgMuM14LTWGttnTZKQL9jwYnhAbHRuxrtCqPXa4JvvnVUq1pTNgyZYw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-opfXRe6nnzyGmCDPx+l1Aqo/RbqWtQal2FnsBqF9hhePp6j0LsRoBaRxcMOlTv+uYTJVtWYZKg9t9wTe+BA/ZA==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -3980,8 +4037,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-djW9+zeg137KQdlPtmE8xnaD+K2rcXXMWFrSg0hsmYZ6HRbdTA7tDHFgpaW9+huWVEu0RCabL+985T4TA0BE7g==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-nb67INpE0IahJKN7EYPp9m9YGwYeKlnzxT3MwXVkgCskaSJia97kG4T0ywpjNUSSnoJk/uvk12V8vbrEHEj+/Q==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4037,8 +4094,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-qzsA/ZPhF6yMxBOTIk1nlCkoy2mswSbwYL+ErBa2iP0s4WWrlxmczArYqMcpVfEjmM7KJj/ADPXky0yZfbSxtQ==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-PS+gKE0z2prJ74Y0sM+brAGK4mYOHIR7TlcV5EJgUQ6E0xMvyswkK2X4yRqyganrzsRL+WCSKAPu0NQITICRWg==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4068,6 +4125,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-fOE+JtN9rygNZkCnHRBEP0TAvLldlhyOxMsbwFvTP4nAs+nBmfnna+o/Zski2wkmY1YMrFC0aSzsHoLY47iLrg==}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==}
peerDependencies:
@@ -4107,8 +4173,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-apa28mldjMgORmE6g/w3sCcA0Y9UAVeeDVoozN4i7kOw12mLl9RBchfzK3Nn6qxOWjrZhK1Lfy7f07kyzxtnBw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-+HhbN2+YtkRgVirjZ2afMeutQRuGOrdkWR5+EFC58SJojGmtyNQwYzgi6tHBpOxvFHefMtPeHdgtjz0BOGxFQg==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4177,8 +4243,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-4lUhWTWAjbDIqFrAPWJ3WqBOpO5YchVZ88X3nh6H9Lu5AFi5nCUeTPj3D8FSDmabmFeRe9ME0BDA4MwKTha5GQ==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-b0XaRlzn2QKuo10XyNgi2DAJDf5XC9d1nD3FJcuvCjbR7+4Ad28zmZsLsqx+hvDEzMnRuZaZxZm9gYObV6RmRA==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4203,8 +4269,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-HZccBkbK0LOi8nYKIp5jll/zIRW0cCOmG6WWyqsSpmXCU+ZlcBbTqIwlBvPCu886C5RVu6c/kHV7xSP8IgYNHw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-slfm+rRaZRuQBvHq60lXvSVUPhid0IPtjSZzIuUlWZMUs01iYZNlGS3mJgRD3ChLQVBAYlKiL/tFyWGX+dz8Xw==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4247,8 +4313,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-Mn88Vg2whaRocGJNOH+DKFqYm6ySFPQaiwHNxZPyjn99B52KAEJWWY9NP83+nWdk2HM3rdov+STu9AG471Rt9w==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-jjk/lqTeNL0azUx5ZYzVrl4NgaDIrdzTNE4mABV9yBFI7FQqN7pIgzV1bTleUezP2QiTGA1BFTqY8MegDgWX9A==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4286,8 +4352,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-0mTMJHv1gQAuEQoq5VDpTD3MRgmfUFdXAVFhpqR7wBeUr+tyRsof0wv/4XdPHLwQrefhoH2FiGHCggrCJhalIw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-JTX94E4LDL91rzLg7X0mHPdxr0A8JEdVwZEmeOwZJSMDHCGW5DFtSlTSJozUyUs807IQmnvbfzKZFVCK5DmkqQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4325,8 +4391,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-rt+Fx4HoCeEwFL2IdoV2QaPltqDLlzxN77i9nwB3Y70scFlfAHh1QCdE2TXKuFJtA1TNygb0oivnFBZifgtZOw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-2KTgMLQtKvicznQgbindEI2RZ3QbDIwU5gabjUPwFJsormjGDz+rUvO4NANmYwzEEpTcTONUt33vBHIfTIVSfw==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4395,8 +4461,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-Mht9BVd1AIsNFVQr4KG3bIK7XQn5IXF0TL/2ObsrzOdc1loaly/+kBDL5roSCYn8j8XZkvpOD0WYLz2FQtH1Eg==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-VsUrXxFe9d2ScbZF0fR/oPR1+qjyeLs5p0jzG8h90puMoA9bq4SirYlXbE+USRg9Q2qTeJSFNqjw2nts8jJe4w==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4421,8 +4487,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-Glt6mebxcgQvLeVkH3HiqV5bgQubE+31ELxLs7q0GlYI5k0XYkOkeuPrhXoylxK8eufvIt9CJjzY1TfFMXK3qw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-gzFZvybgmwYsFBWDqanycIoEYnhyk8MMnuLamdFVHUZYGp4COM+sqXiwbnn0VMWqGLeeU7GV7jm+dXRa+Wufag==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4460,8 +4526,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-fYeYQvbeNn5AQk2RBbpO7koLm2YbS00UYxC/IL2sgLlninEH5UNIv+X3E0KJ1Vy4WIo+dhN9w8GNqSHhbHWCIg==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-K9HiuxZ6xCwSaHcIuUpxyhy4w5gpwzWjh9dHTSbMN3Ix4qAyVObS9RlU3zMycb0PO3v9Tpk0BXMwWvXOUbVXew==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4473,8 +4539,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-Rsgab65u73E5kPVh8OS6PgPwJgPyf08GFfJDGAbMdF4DL7CgDhFOaDnXuk/DiMEVF6kgQwl0oJmFklvipmiOLg==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-nQLu5OAcORDQp1EHAv6k3mJGV1hjMTw2NTGVAsGE1g/mWeNqAd1R5jyaAs3U+A8ZD/W8XNPY2yKT0ZdQnqo3NA==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4512,8 +4578,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-pQ3xGp/uemomASPH97Eb3shfXX8QlG11bBJyEvRBV+vwtO4HvQlS06Yj9f31Ao7XepvF98SFrRgVDQ7jv+2xjQ==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-gB1Mr8vzdv1XzDjrtJTXmL0JORRs1B4g7ngUs0F+H2VvMOwXTZMTmLCl0wZZ3m7ylX8TssI7NCvgiSHmLuTm/A==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4551,8 +4617,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-qdXDes+eHlnMUGlBAAAe5EG7oOQvqsXuq4mq585diMudg80iB+jHbsSeG3+Q4eWNsogNyhqU2p/3i+Y0iEepqg==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-jkrTdQVxnIB8fpn0NyyxW9CTB5aCXZZelVz5z+Xmii6g5WxMqS3fInNslZ63puP39+Puu4jYohUK31y3dT87gQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4590,8 +4656,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-3QXNeMkdshed1MR3LNoiCirBywRFPkD8ETJa/HlPuLwSajaQixf2ro+isoDNJlGABg9ug41XuZpINZJIle4XWg==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-mS7dGpyjv6b+gsDjLF7e0ia1W4Im1B1hSCy2yuXlHuvnZxHKagfDaobt/KAKt27EpZMit2pss8eJBVyVjEWM+g==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4681,6 +4747,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-zBZ4QM5XG3JRanDmqXYf3MD6th4AFXFmgU6KNMFzUaV6F3uw9I5/zjMUvFriSEn5ewo1nxuibvyxJdmLlDcslA==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==}
peerDependencies:
@@ -4733,8 +4812,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-KqiGJcFaZDc+BvveAgU3ZhACg2MvSUDrCBx4lRR/ZVRNal0bvt8lBpvnSkep9heeOuF8Qfw3fszLDX4OpQ2NVw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-ZPHyI0JyzoH/rP0tq2uRaIZTj/4s8+kAbqPz+e2N8+ejHvwPJ889dHhqn+vh7PNvNeq+boAoH9yzqeoShzwF2w==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4772,8 +4851,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-W8Uo9riHnlzLLWy+r2mVHUyuEWqD/+be4PZzbEvaGoFSBDHkm+GYWjtcE6u3AmPKNyfanWpnVfpZ2GqPCdzzsw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-WwZFjWV4s3aC1QtR3k04R+oANHtX2q6fgKlc7MCEiDNlnTxCZ3H8k3mHtEgVlOejystwk1WQgarQhNOQZ2bK1g==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4811,8 +4890,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-8Qcnx9447tx/aCBgw6Jenfqg4Skq+vqab9mCBmuGNipIS5YXvL275wbKEu7+ICYHIlAPgCduUMJH1XOYewKF6Q==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-40svmmugfM3mUN7VUDGVE1tQGOhyi8enlGD0CNJEcMM36C1f71PKM21DFgNHUfem0XnA+d8H8oN3Z9ZpJjSslg==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4850,8 +4929,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-7tncSubo2G0UY1e8rk+72qe3XRzrGnOLtZQ1PL1KoBfRUNX0NrJT5akb+0kfwSCc3gVR4wdHqyhAQBDpDNOwDw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-bBODCWZK7JTbQLHs0uIP4f73wIWatakK4OS33UzkR1x897wu0PuO658a3f+6P2GEGyDzGYMuHRatMVoAk9WZTw==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4876,8 +4955,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-brXD6C/V0fVK0DDbscLVw6LsXrjQ+ay8jdOBaN+tLb4vsHsAMm6Gt6eT77wHX1Eq8GPtD5rJ+RxFtfDozsb4+Q==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-L5RQTXz6Anxsf9CCv+pTgiAsUpyVj7rJxsGtmhFaEOJ++cVfXucv4qWfsIO0AIB4NAhi3yovWGVMKKS1Xf1Wrg==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4928,8 +5007,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-qt5C1ppJz66aUDrH1VccjPrq7aFchK0wBrn6xsxlCHNUyE57dRRQ7lp1QFpF7OscMexZF8MCGBTVBlENHPkNiA==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-CWVVj+XaTom0SKCqw1EUgb0NuiLwS+N3OFG73mVEezKEjgNIvZiu0EevMelSSU+CbX3owbqJweG2gPU31WGC5A==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4990,8 +5069,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-tgRBI3DdNwAJYE4BBZyZcz/HRRCvAsPkRvG1wvKc+41tBGMxPn/a87T/wikXAvyDypNQ9kaZwHbeZe+veHCGpA==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-1+mlB4/lxJfk5tgJ4g+R5mUCbRpPE1T9+UsEyeLYbGgMtwiMgmuTnfKz4Mw1nHALHjuwyxw4MLd4cSHn6pNSlQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -5029,8 +5108,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-v3Ab2l7z6U7tRB4xA0IyKdq0OsqaO1o9ZjsIEoKKnSZ/l96mZz8aCTX0NCXw+YVHJXr8Km4d+Mn6/Q8YjXa+gw==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-nRyXnrAVCwjeXcHbvEbLS6ndbTeKHG1RqCP4A8Gw5L4cemDzPXdD8rAmr6wet0v57R69wGvuIIsFjHSVkZiMzQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -5055,8 +5134,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-YNEnTHV47hPep+U0QvVM02OJNka9uygREc+k4Nh5VSZBg4MmE+myI442x3hCGfRpX7N2WSSYSJKws4gE+Z8lgg==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-SxfVZfVOibWKWdkf0Xx1awW2d09fQu4V4PXDY1j5hi4MVf7MWdJZqTBJMa1KWtOr1S6GGtCk02nniZ0Iia+dHw==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -5081,8 +5160,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-TK1vusNKb8IRhF23FTbRgUNZ9zfs5rGIyI7LfR3h26p9LrQ060i0uW9QWeD8baZMddaaP0DBGlIa6pbZG+mitg==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-gIC5Q+Xljg7lmUdzSuDoy0t97yZn1sZl00Ra37ZvKrYdWnQLU6sWLd09yG8cIB9jUAlQfHgJ2ACAG00MFwsqSQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -5107,8 +5186,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-bI2ILJrzwgmAsH05TsJ9pVrzqQwAip7OM2/krqAdYn0R16bl86UPWbe5VPHsALat0EnqpV01cGtkleaUKPNdNg==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-QI/hB65XKWACA66P64A+aHxtLUgHJeJLkaQa+awUNXT6T3swndtY5DojeHA+vldrTspMTtFBd7HfZ9QGbM1Qrw==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -5133,8 +5212,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-L/EkWVqlnj3lL2toHh4C7PwH2jxfa7OCq6lGfXSCii99ve2S4Ux5rc9HnOa7LN9exHa/Nl9kmCAmP9BuDPy5UA==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-t/iEuVjUnXXtrsGK40AA43uIx37sn3AqZ7oAVnPICK6lFJP6dzMzWR3U9b6eCfFjb6wtSEqkJ9Rn9xDjiOx20g==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -5146,8 +5225,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-8XZ6Py3y3W2nEzAUGCN5cfVKaUi+CVApcz1d6lrNVVf2hvYEixMRkq8k9ggPKnQUpRRuOV5avt8uvxViH2jLwA==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-U3HoftgWnmla78vzQbLvKKb7bUYJxoiiqYFzp1wu/TBMyDqMZSuCl3aRICsD6EfVEwcJD2mumGDGUXLFVqQHKA==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -11370,8 +11449,8 @@ packages:
'@types/react-dom':
optional: true
- resolution: {integrity: sha512-QXDXJtB6sK83mLASONYUZCauatcWb+knFviFpN1EhtdbbmlsRmzCLrbZSKztnNiem2KOHIBbiDbauVB7SORXMw==}
+ resolution: {integrity: sha512-OwYUjzMwiInCUxgAWpPsavXC3Kh4iyi/49uU1/qZTG3RQDlvegyk1GOMiGvSkjua1RDb3JD3fo3eroL9FV4GQw==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -15696,6 +15775,8 @@ snapshots:
'@radix-ui/[email protected]': {}
+ '@radix-ui/[email protected]': {}
+
dependencies:
'@radix-ui/react-visually-hidden': 1.2.7(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
@@ -15748,13 +15829,13 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
- '@radix-ui/react-collapsible': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/primitive': 1.1.5
+ '@radix-ui/react-collapsible': 1.1.16(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
@@ -15779,12 +15860,12 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
react: 19.2.6
react-dom: 19.2.6([email protected])
@@ -15850,9 +15931,9 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-use-callback-ref': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-is-hydrated': 0.1.1(@types/[email protected])([email protected])
@@ -15879,12 +15960,12 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
'@radix-ui/react-use-previous': 1.1.2(@types/[email protected])([email protected])
@@ -15927,13 +16008,13 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
'@radix-ui/react-use-layout-effect': 1.1.2(@types/[email protected])([email protected])
@@ -15955,10 +16036,10 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-slot': 1.3.0(@types/[email protected])([email protected])
react: 19.2.6
@@ -16005,11 +16086,11 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/primitive': 1.1.5
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
react: 19.2.6
@@ -16030,6 +16111,12 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.15
+ dependencies:
+ react: 19.2.6
+ optionalDependencies:
+ '@types/react': 19.2.15
+
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -16096,17 +16183,17 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
- '@radix-ui/react-dismissable-layer': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-focus-guards': 1.1.4(@types/[email protected])([email protected])
- '@radix-ui/react-focus-scope': 1.1.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-focus-scope': 1.1.12(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-slot': 1.3.0(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
@@ -16169,9 +16256,9 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
'@radix-ui/react-use-callback-ref': 1.1.2(@types/[email protected])([email protected])
@@ -16197,13 +16284,13 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
react: 19.2.6
@@ -16235,7 +16322,7 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
@@ -16268,11 +16355,11 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
@@ -16313,15 +16400,15 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
- '@radix-ui/react-dismissable-layer': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
react: 19.2.6
@@ -16388,22 +16475,22 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-dismissable-layer': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-focus-guards': 1.1.4(@types/[email protected])([email protected])
- '@radix-ui/react-focus-scope': 1.1.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-focus-scope': 1.1.12(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-roving-focus': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-roving-focus': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-slot': 1.3.0(@types/[email protected])([email protected])
'@radix-ui/react-use-callback-ref': 1.1.2(@types/[email protected])([email protected])
aria-hidden: 1.2.6
@@ -16432,17 +16519,17 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-roving-focus': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-roving-focus': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
react: 19.2.6
react-dom: 19.2.6([email protected])
@@ -16494,16 +16581,16 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-dismissable-layer': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-callback-ref': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
@@ -16516,16 +16603,16 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
'@radix-ui/number': 1.1.2
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-roving-focus': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-roving-focus': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
'@radix-ui/react-use-effect-event': 0.0.3(@types/[email protected])([email protected])
'@radix-ui/react-use-is-hydrated': 0.1.1(@types/[email protected])([email protected])
@@ -16572,11 +16659,11 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
@@ -16634,18 +16721,18 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
- '@radix-ui/react-dismissable-layer': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-focus-guards': 1.1.4(@types/[email protected])([email protected])
- '@radix-ui/react-focus-scope': 1.1.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-focus-scope': 1.1.12(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-slot': 1.3.0(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
@@ -16693,12 +16780,12 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
'@floating-ui/react-dom': 2.1.8([email protected]([email protected]))([email protected])
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-use-callback-ref': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-layout-effect': 1.1.2(@types/[email protected])([email protected])
@@ -16770,6 +16857,15 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
+ dependencies:
+ '@radix-ui/react-use-layout-effect': 1.1.2(@types/[email protected])([email protected])
+ react: 19.2.6
+ react-dom: 19.2.6([email protected])
+ optionalDependencies:
+ '@types/react': 19.2.15
+ '@types/react-dom': 19.2.3(@types/[email protected])
+
dependencies:
'@radix-ui/react-slot': 1.2.3(@types/[email protected])([email protected])
@@ -16806,9 +16902,9 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
react: 19.2.6
react-dom: 19.2.6([email protected])
@@ -16844,15 +16940,15 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-roving-focus': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-roving-focus': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
'@radix-ui/react-use-previous': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-size': 1.1.2(@types/[email protected])([email protected])
@@ -16896,17 +16992,19 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-callback-ref': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
+ '@radix-ui/react-use-is-hydrated': 0.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.2(@types/[email protected])([email protected])
react: 19.2.6
react-dom: 19.2.6([email protected])
optionalDependencies:
@@ -16947,14 +17045,14 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
'@radix-ui/number': 1.1.2
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-callback-ref': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-layout-effect': 1.1.2(@types/[email protected])([email protected])
@@ -16993,21 +17091,21 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
'@radix-ui/number': 1.1.2
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-dismissable-layer': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-focus-guards': 1.1.4(@types/[email protected])([email protected])
- '@radix-ui/react-focus-scope': 1.1.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-focus-scope': 1.1.12(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-slot': 1.3.0(@types/[email protected])([email protected])
'@radix-ui/react-use-callback-ref': 1.1.2(@types/[email protected])([email protected])
@@ -17060,13 +17158,13 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
'@radix-ui/number': 1.1.2
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
@@ -17122,11 +17220,11 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
'@radix-ui/react-use-previous': 1.1.2(@types/[email protected])([email protected])
@@ -17169,15 +17267,15 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/primitive': 1.1.5
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-roving-focus': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-roving-focus': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
react: 19.2.6
react-dom: 19.2.6([email protected])
@@ -17205,15 +17303,15 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
- '@radix-ui/react-dismissable-layer': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-use-callback-ref': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
@@ -17240,14 +17338,14 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/primitive': 1.1.5
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-roving-focus': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-roving-focus': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
react: 19.2.6
react-dom: 19.2.6([email protected])
@@ -17266,9 +17364,9 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
react: 19.2.6
@@ -17292,31 +17390,31 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
+ '@radix-ui/primitive': 1.1.5
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-roving-focus': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-roving-focus': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-toggle-group': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-toggle-group': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
react: 19.2.6
react-dom: 19.2.6([email protected])
optionalDependencies:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
- '@radix-ui/react-dismissable-layer': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-id': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-slot': 1.3.0(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
@@ -18903,7 +19001,7 @@ snapshots:
react: 19.2.6
react-dom: 19.2.6([email protected])
@@ -24816,55 +24914,55 @@ snapshots:
'@types/react': 19.2.15
'@types/react-dom': 19.2.3(@types/[email protected])
dependencies:
- '@radix-ui/primitive': 1.1.4
+ '@radix-ui/primitive': 1.1.5
'@radix-ui/react-accessible-icon': 1.1.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-alert-dialog': 1.1.18(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-alert-dialog': 1.1.19(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-aspect-ratio': 1.1.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-collapsible': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-collapsible': 1.1.16(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-compose-refs': 1.1.3(@types/[email protected])([email protected])
- '@radix-ui/react-context': 1.1.4(@types/[email protected])([email protected])
- '@radix-ui/react-context-menu': 2.3.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-context': 1.2.0(@types/[email protected])([email protected])
+ '@radix-ui/react-context-menu': 2.3.3(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-direction': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-dismissable-layer': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-dropdown-menu': 2.1.19(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-dropdown-menu': 2.1.20(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-focus-guards': 1.1.4(@types/[email protected])([email protected])
- '@radix-ui/react-focus-scope': 1.1.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-focus-scope': 1.1.12(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-navigation-menu': 1.2.17(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-one-time-password-field': 0.1.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-password-toggle-field': 0.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-navigation-menu': 1.2.18(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-one-time-password-field': 0.1.12(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-password-toggle-field': 0.1.7(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-roving-focus': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
- '@radix-ui/react-scroll-area': 1.2.13(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-roving-focus': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-scroll-area': 1.2.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-slot': 1.3.0(@types/[email protected])([email protected])
- '@radix-ui/react-toggle-group': 1.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-toggle-group': 1.1.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@radix-ui/react-use-callback-ref': 1.1.2(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.3(@types/[email protected])([email protected])
'@radix-ui/react-use-effect-event': 0.0.3(@types/[email protected])([email protected])