refactor(appkit): relocate shared agent utilities into plugins/agents#296
Closed
MarioCadenas wants to merge 1 commit intoagent/5c-migrate-agent-app-docsfrom
Closed
refactor(appkit): relocate shared agent utilities into plugins/agents#296MarioCadenas wants to merge 1 commit intoagent/5c-migrate-agent-app-docsfrom
MarioCadenas wants to merge 1 commit intoagent/5c-migrate-agent-app-docsfrom
Conversation
The plugins/agent/ folder contained a mix of deprecated surface (the old
AgentPlugin + its config-loader) and still-current shared infrastructure
that the new agents() plugin imports directly. The folder name stopped
making sense once agent() was deprecated: readers couldn't tell which
files are deprecated vs. core.
Move the currently-used files under plugins/agents/ so the new plugin
colocates with its dependencies:
- plugins/agent/defaults.ts -> plugins/agents/defaults.ts
- plugins/agent/event-translator.ts -> plugins/agents/event-translator.ts
- plugins/agent/schemas.ts -> plugins/agents/schemas.ts
- plugins/agent/system-prompt.ts -> plugins/agents/system-prompt.ts
- plugins/agent/thread-store.ts -> plugins/agents/thread-store.ts
- plugins/agent/tools/ -> plugins/agents/tools/
- plugins/agent/tests/{event-translator,system-prompt,thread-store,
function-tool,hosted-tools,tool,define-tool,mcp-server-helper}.test.ts
-> plugins/agents/tests/
Used `git mv` so blame and history follow the files. Callers updated:
- plugins/agents/ siblings: `../agent/X` -> `./X`
- plugins/agent/agent.ts (still deprecated, needs the shared modules):
`./X` -> `../agents/X`
- plugins/agent/types.ts: `./tools/X` -> `../agents/tools/X`
- analytics/files/genie/lakebase plugin files:
`../agent/tools/define-tool` -> `../agents/tools/define-tool`
- core/create-agent.ts, core/run-agent.ts: likewise
- main index.ts re-exports: `./plugins/agent/tools` -> `./plugins/agents/tools`
Also update template/appkit.plugins.json (consumed by `databricks apps
init --features ...`) so picking the agent feature scaffolds the new
agents() plugin instead of the deprecated agent() factory: key renamed
`agent` -> `agents`, name field matched. The Go template at
template/server/server.ts expands $name into the import symbol and
factory call, so this propagates cleanly.
Tests updated: `../../agent/tools/X` -> `../tools/X` inside agents tests.
Left in plugins/agent/ (deprecated, untouched semantically): agent.ts,
types.ts, config-loader.ts, manifest.json, index.ts, tests/agent.test.ts,
tests/config-loader.test.ts. These only exist to keep the @deprecated
exports from the main index valid during the migration window.
No behavior change. 1301 tests still pass; `pnpm -r typecheck` clean.
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
This was referenced Apr 21, 2026
Collaborator
Author
|
Superseded by the v2 6-PR stack:
The v2 stack reorganizes the same work so no PR ships API that a later PR deletes. Start at #301 for the new entry point. Branches from this older stack are preserved unchanged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mechanical move: with the new
agents()plugin as the canonical home for all agent-related runtime code, the pre-existing shared utilities that lived in the oldplugins/agent/(singular, deprecated) folder move intoplugins/agents/(plural).Files moved:
defaults.ts,event-translator.ts,schemas.ts,system-prompt.ts,thread-store.tstools/subfolder (tool.ts,define-tool.ts,function-tool.ts,hosted-tools.ts,mcp-client.ts)build-toolkit.tsPlus the associated test files.
Import paths updated across all call sites. Public exports in
packages/appkit/src/index.tsandpackages/appkit/src/plugins/agents/index.tsre-point at the new locations. No behavior change.The old
plugins/agent/folder still exists in this branch — it's deleted in PR #299 once all consumers have migrated offcreateAgentApp.PR Stack
agents()plugin +createAgent(def)+.toolkit()— feat(appkit): add agents() plugin, createAgent() factory, and .toolkit() #294agents()— feat(appkit): migrate agent-app and docs to the new agents() plugin #295preparePluginsforwards eager instance — refactor(appkit): forward eager plugin instance through preparePlugins #297fromPlugin()API — feat(appkit): add fromPlugin() for referencing plugin tools in code-defined agents #298agent()+createAgentApp— chore(appkit): remove deprecated agent() plugin and createAgentApp shortcut #299toPluginWithInstance+ bug fixes — refactor(appkit): retire toPluginWithInstance; consolidate on fromPlugin + fix schema/routing bugs #300Test plan