The Open Framework for Building Agents
feat(selfmod): prompt developers to install registry items (#2484)
prhab595a705d8f7
diff --git a/.changeset/selfmod-registry-installation-handoffs.md b/.changeset/selfmod-registry-installation-handoffs.mdnew file mode 100644index 000000000..2bd6dddc0--- /dev/null+++ b/.changeset/selfmod-registry-installation-handoffs.md@@ -0,0 +1,5 @@+---+"@eve/self-modification": patch+---++When a self-modification registry search finds an exact item in a local `eve dev` session, the subagent now directs you to install it with `/add <address>` instead of attempting the installation itself.diff --git a/packages/eve-self-modification/README.md b/packages/eve-self-modification/README.mdindex d519debaf..cc2e93101 100644--- a/packages/eve-self-modification/README.md+++ b/packages/eve-self-modification/README.md@@ -33,4 +33,8 @@ export { default } from "@eve/self-modification/sandbox";export { default } from "@eve/self-modification";```-Set `model` in the agent definition to choose the self-modification subagent's model; it defaults to `anthropic/claude-sonnet-5`. The sandbox mounts the application's authored `agent/` directory read-write at `/source` and the installed eve package's version-matched documentation read-only at `/eve-docs`. The extension contributes the `selfmod__edit_file` for one or more exact targeted edits to an existing file without rewriting it. Its instructions direct independent discovery calls to run concurrently and reserve `write_file` for new files or complete rewrites. The extension also contains `selfmod__search_registry` to search the eve registry for channels, connections, extensions, and other integrations the project can add. Registry search is read-only: it reports each item's address, whether the authored tree already holds it, and the eve version it requires, so the subagent recommends the user add the registry item (e.g. `eve add channel/slack`) instead of hand-writing an integration the registry already ships.+Set `model` in the agent definition to choose the self-modification subagent's model; it defaults to `anthropic/claude-sonnet-5`. The sandbox mounts the application's authored `agent/` directory read-write at `/source` and the installed eve package's version-matched documentation read-only at `/eve-docs`.++The extension contributes `selfmod__edit_file` for one or more exact targeted edits to an existing file without rewriting it. Its instructions direct independent discovery calls to run concurrently and reserve `write_file` for new files or complete rewrites.++The extension also provides `selfmod__search_registry` to search the eve registry for channels, connections, extensions, and other integrations the project can add. Registry search is read-only: it reports each item's address, whether the authored tree already holds it, and the eve version it requires. Registry installation is outside the source sandbox. In a local `eve dev` session, the subagent recommends `/add channel/slack`; you enter the command, review the item and its changes, and complete its setup prompts.diff --git a/packages/eve-self-modification/extension/instructions.ts b/packages/eve-self-modification/extension/instructions.tsindex 4dd67e788..7a423c466 100644--- a/packages/eve-self-modification/extension/instructions.ts+++ b/packages/eve-self-modification/extension/instructions.ts@@ -7,10 +7,10 @@ The source code of the eve agent is mounted read-write at /source. Use bash onlyUse selfmod__edit_file for precise changes to existing files; every edits[].oldText must match exactly. When changing multiple separate locations in one file, use one call with multiple entries in edits[]. Each oldText is matched against the original file, not after earlier edits are applied. Do not emit overlapping or nested edits; merge nearby changes into one edit. Keep oldText as small as possible while still being unique. Use write_file only for new files or complete rewrites.-When the developer asks what this agent can integrate with, or asks for a capability an existing integration may already provide, call selfmod__search_registry before writing anything by hand. Prefer a registry item: report its address and tell the developer to install it with the /add command in this eve dev session, and say when the project already has it. Write an integration yourself only when the registry has nothing that fits, or the developer asks for a custom implementation.-Group independent calls, including bash and reads, in one response.+Registry installation is outside the source sandbox. When the developer asks what this agent can integrate with, or asks for a capability an existing integration may already provide, call selfmod__search_registry before writing anything by hand. Prefer a registry item. When you find an exact item, report its address and stop: in a local eve dev session, tell the developer to run \`/add <address>\`, review its source and changes, and complete its setup prompts. Do not claim to have run the command, try to invoke it, or edit files as a substitute for installation. Say when the project already has an item. Write an integration yourself only when the registry has nothing that fits, or the developer asks for a custom implementation.+The eve framework documentation is mounted read-only at /eve-docs. Read the eve guide directly relevant to an unfamiliar public API. Prefer an existing local implementation pattern over broad documentation research.You cannot access application files outside the authored agent directory or run host binaries such as git, node, pnpm, or tsc.