Repository navigation
feat: agent package - #1159
Merged
Merged
feat: agent package#1159
Conversation
Add @vue/devtools-agent: MCP tools over the kit runtime for apps, component tree and state, inspectors and Pinia, router, value expansion, and guarded state edits, plus Devframe page/host adapters and the vue-devtools-agent stdio MCP CLI. Kit: paginated state reads, component search, and an opt-in requireEditable flag on the edit commands. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for vue-devtools-docs canceled.
|
commit: |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved app-isolation and state-reading correctness issues prevent safe approval.
5 open findings
What changed in this PR
Adds @vue/devtools-agent, exposing Vue runtime inspection and guarded state editing through MCP on the Vite host.
Changes:
- Introduces agent tools, Devframe adapters, and a CLI connector.
- Extends runtime queries with pagination, direct field reads, and component search.
- Adds documentation, tests, and package integration.
| File | Description |
|---|---|
| vitest.config.ts | Resolves agent source for tests. |
| tests/unit/vite/dock-registration.test.ts | Tests host registration and cleanup. |
| tests/unit/vite/client-lifecycle.test.ts | Tests page registration lifecycle. |
| tests/unit/runtime/state-isolation.test.ts | Handles missing expansion results. |
| tests/smoke/agent.test.ts | Exercises end-to-end MCP integration. |
| tests/fixtures/vite-smoke/App.vue | Enables agent fixtures conditionally. |
| tests/fixtures/vite-smoke/AgentFixtures.vue | Adds large and editable state fixtures. |
| pnpm-workspace.yaml | Adds agent dependency catalog entries. |
| pnpm-lock.yaml | Records dependency resolutions. |
| packages/vite/src/utils/dock/registration.ts | Registers host tools and eager loading. |
| packages/vite/src/client.ts | Manages browser agent sessions. |
| packages/vite/package.json | Adds agent dependency and host requirement. |
| packages/kit/src/runtime/state/pagination.ts | Implements byte-budgeted state pages. |
| packages/kit/src/runtime/state/index.ts | Adds paginated and direct state reads. |
| packages/kit/src/runtime/handlers/shared.ts | Adds pagination and editability helpers. |
| packages/kit/src/runtime/handlers/inspectors.ts | Adds inspector field reads and edit guards. |
| packages/kit/src/runtime/handlers/components.ts | Registers new component query paths. |
| packages/kit/src/runtime/components.ts | Adds app-wide component search. |
| packages/kit/src/protocol/requests.ts | Extends runtime request contracts. |
| packages/kit/src/protocol/messages.ts | Defines pagination and field results. |
| packages/kit/src/codec/encode.ts | Supports collection offsets and selected keys. |
| packages/client/src/composables/devtools-state.ts | Handles missing expanded values. |
| packages/agent/tsdown.config.ts | Configures agent package builds. |
| packages/agent/tests/tools.test.ts | Tests tool contracts and routing. |
| packages/agent/tests/state-limits.test.ts | Tests state preview limits. |
| packages/agent/tests/state-fields.test.ts | Tests field reads and guarded edits. |
| packages/agent/tests/session.test.ts | Tests lazy session lifecycle. |
| packages/agent/tests/pagination.test.ts | Tests pagination and continuation behavior. |
| packages/agent/tests/handles.test.ts | Tests handle expiration and recovery. |
| packages/agent/tests/component-search.test.ts | Tests component search. |
| packages/agent/src/types.ts | Defines host connection types. |
| packages/agent/src/session.ts | Implements lazy runtime connections. |
| packages/agent/src/node.ts | Exports host registration. |
| packages/agent/src/mcp/tools.ts | Defines inspection and editing tools. |
| packages/agent/src/mcp/schemas.ts | Defines tool output schemas. |
| packages/agent/src/mcp/page.ts | Registers document-specific tools. |
| packages/agent/src/mcp/host.ts | Registers host discovery guidance. |
| packages/agent/src/index.ts | Exports the public agent API. |
| packages/agent/src/devframe.ts | Exports browser integration helpers. |
| packages/agent/src/cli.ts | Implements the stdio connector command. |
| packages/agent/README.md | Documents setup and tool usage. |
| packages/agent/package.json | Defines package exports and dependencies. |
| packages/agent/LICENSE | Adds the package license. |
| package.json | Integrates agent smoke testing. |
| docs/guide/agents.md | Adds the agent integration guide. |
| docs/.vitepress/config.ts | Links the new guide. |
| AGENTS.md | Documents agent architecture and scope. |
| .github/workflows/release-commit.yml | Includes agent commit releases. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.


No description provided.