@mcpc-tech/unplugin-dev-inspector-mcp 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86613,13 +86613,23 @@ async function mcpc(serverConf, composeConf, setupCallback) {
86613
86613
  * Used by both server and client implementations
86614
86614
  */
86615
86615
  const PROMPT_SCHEMAS = {
86616
- capture_element: {
86617
- name: "capture_element",
86618
- title: "Capture Element Context",
86619
- description: "Capture context about a UI element for troubleshooting and investigation.",
86616
+ capture_element_context: {
86617
+ name: "capture_element_context",
86618
+ title: "Capture Element",
86619
+ description: "Capture single element context. Interactive (user clicks) or automated (selector param).",
86620
+ arguments: [{
86621
+ name: "selector",
86622
+ description: "CSS selector for automated capture (no user interaction).",
86623
+ required: false
86624
+ }]
86625
+ },
86626
+ capture_area_context: {
86627
+ name: "capture_area_context",
86628
+ title: "Capture Area",
86629
+ description: "Capture multiple elements in area. Interactive (user draws rectangle) or automated (containerSelector/bounds param).",
86620
86630
  arguments: [{
86621
- name: "automated",
86622
- description: "If true, the AI will automate the capture process (click/feedback/submit).",
86631
+ name: "containerSelector",
86632
+ description: "CSS selector for container - captures all child elements.",
86623
86633
  required: false
86624
86634
  }]
86625
86635
  },
@@ -86657,10 +86667,22 @@ const PROMPT_SCHEMAS = {
86657
86667
  description: "List stdio (stdout/stderr) messages from the server process. Always refreshes the list first.",
86658
86668
  arguments: []
86659
86669
  },
86670
+ capture_context: {
86671
+ name: "capture_context",
86672
+ title: "Capture Context",
86673
+ description: "[DEPRECATED] Use capture_element_context or capture_area_context.",
86674
+ arguments: []
86675
+ },
86676
+ capture_element: {
86677
+ name: "capture_element",
86678
+ title: "Capture Element Context",
86679
+ description: "[DEPRECATED] Use capture_element_context.",
86680
+ arguments: []
86681
+ },
86660
86682
  capture_area: {
86661
86683
  name: "capture_area",
86662
86684
  title: "Capture Area Context",
86663
- description: "Draw a rectangle on the page to capture multiple elements at once for troubleshooting.",
86685
+ description: "[DEPRECATED] Use capture_area_context.",
86664
86686
  arguments: []
86665
86687
  }
86666
86688
  };
@@ -86674,24 +86696,53 @@ const PROMPT_SCHEMAS = {
86674
86696
  const TOOL_SCHEMAS = {
86675
86697
  capture_element_context: {
86676
86698
  name: "capture_element_context",
86677
- description: `Capture element context for troubleshooting.
86699
+ description: `Capture single element context.
86678
86700
 
86679
- **Default (automated=false)**: Manual mode - activates visual selector for user interaction.
86701
+ **Modes**:
86702
+ 1. **Interactive (default)**: User clicks element to select
86703
+ 2. **Automated**: Use \`selector\` param for programmatic capture
86680
86704
 
86681
- **Automated (automated=true)**: AI controls capture by clicking elements programmatically. Only set to true when user needs automation.
86682
-
86683
- Returns: source location, DOM hierarchy, computed styles, dimensions, and user notes. Use \`list_inspections\` to view all captured elements.`,
86705
+ Returns: source location, DOM hierarchy, computed styles, dimensions, user notes, screenshot.`,
86684
86706
  inputSchema: {
86685
86707
  type: "object",
86686
- properties: { automated: {
86687
- type: "boolean",
86688
- description: "Set to true ONLY when user explicitly requests automated capture. Default is false (manual mode)."
86708
+ properties: { selector: {
86709
+ type: "string",
86710
+ description: "CSS selector for automated capture (no user interaction)."
86689
86711
  } }
86690
86712
  }
86691
86713
  },
86714
+ capture_area_context: {
86715
+ name: "capture_area_context",
86716
+ description: `Capture multiple elements in an area.
86717
+
86718
+ **Modes**:
86719
+ 1. **Interactive (default)**: User draws rectangle to select area
86720
+ 2. **Automated**: Use \`containerSelector\` or \`bounds\` param
86721
+
86722
+ Returns: array of element contexts (max 50).`,
86723
+ inputSchema: {
86724
+ type: "object",
86725
+ properties: {
86726
+ containerSelector: {
86727
+ type: "string",
86728
+ description: "CSS selector for container - captures all meaningful child elements."
86729
+ },
86730
+ bounds: {
86731
+ type: "object",
86732
+ properties: {
86733
+ x: { type: "number" },
86734
+ y: { type: "number" },
86735
+ width: { type: "number" },
86736
+ height: { type: "number" }
86737
+ },
86738
+ description: "Page coordinates - captures elements intersecting this area. Use get_page_info for context."
86739
+ }
86740
+ }
86741
+ }
86742
+ },
86692
86743
  list_inspections: {
86693
86744
  name: "list_inspections",
86694
- description: "List all captured inspections with ID, element details, source location, notes, and status (pending/in-progress/completed/failed). Use with chrome_devtools for additional context (Console.getMessages, Network.getHAR, Performance.getMetrics).",
86745
+ description: "List all captured inspections with ID, element details, source location, notes, and status (pending/in-progress/completed/failed).",
86695
86746
  inputSchema: {
86696
86747
  type: "object",
86697
86748
  properties: {}
@@ -86699,13 +86750,13 @@ Returns: source location, DOM hierarchy, computed styles, dimensions, and user n
86699
86750
  },
86700
86751
  update_inspection_status: {
86701
86752
  name: "update_inspection_status",
86702
- description: "Update inspection status with optional progress tracking.\n\n**Parameters**:\n- inspectionId: Optional (auto-detects if omitted)\n- status: 'in-progress' | 'completed' | 'failed' | 'deleted'\n- progress: Optional steps array [{id, title, status}]\n- message: REQUIRED for 'completed'/'failed' status\n\n**Example**:\n```javascript\nupdate_inspection_status({\n status: 'completed',\n message: 'Fixed: pointer-events: none blocking clicks'\n});\n// Or delete an inspection\nupdate_inspection_status({\n status: 'deleted'\n});\n```",
86753
+ description: "Update inspection status. Parameters: inspectionId (optional, auto-detects), status ('in-progress'|'completed'|'failed'|'deleted'), message (required for completed/failed).",
86703
86754
  inputSchema: {
86704
86755
  type: "object",
86705
86756
  properties: {
86706
86757
  inspectionId: {
86707
86758
  type: "string",
86708
- description: "Optional inspection ID. If not provided, uses the current active inspection."
86759
+ description: "Optional. If omitted, uses current active inspection."
86709
86760
  },
86710
86761
  status: {
86711
86762
  type: "string",
@@ -86715,39 +86766,11 @@ Returns: source location, DOM hierarchy, computed styles, dimensions, and user n
86715
86766
  "failed",
86716
86767
  "deleted"
86717
86768
  ],
86718
- description: "Current status: 'in-progress' for updates, 'completed' when resolved, 'failed' if unresolvable, 'deleted' to remove inspection"
86719
- },
86720
- progress: {
86721
- type: "object",
86722
- properties: { steps: {
86723
- type: "array",
86724
- items: {
86725
- type: "object",
86726
- properties: {
86727
- id: { type: "number" },
86728
- title: { type: "string" },
86729
- status: {
86730
- type: "string",
86731
- enum: [
86732
- "pending",
86733
- "in-progress",
86734
- "completed",
86735
- "failed"
86736
- ]
86737
- }
86738
- },
86739
- required: [
86740
- "id",
86741
- "title",
86742
- "status"
86743
- ]
86744
- }
86745
- } },
86746
- description: "Optional step-by-step progress tracking"
86769
+ description: "New status."
86747
86770
  },
86748
86771
  message: {
86749
86772
  type: "string",
86750
- description: "Summary of findings or resolution. REQUIRED when status is 'completed' or 'failed'"
86773
+ description: "Summary. Required for 'completed' or 'failed'."
86751
86774
  }
86752
86775
  },
86753
86776
  required: ["status"]
@@ -86755,81 +86778,56 @@ Returns: source location, DOM hierarchy, computed styles, dimensions, and user n
86755
86778
  },
86756
86779
  execute_page_script: {
86757
86780
  name: "execute_page_script",
86758
- description: "Execute JavaScript in browser context (synchronous only, must return value). Access: window, document, DOM APIs, React/Vue instances, localStorage. For deeper diagnostics, use chrome_devtools MCP (Network.getHAR, Console.getMessages, Performance.getMetrics, Debugger, HeapProfiler).",
86781
+ description: "Execute JavaScript in browser context. Access: window, document, DOM APIs, React/Vue instances, localStorage. Must return a value.",
86759
86782
  inputSchema: {
86760
86783
  type: "object",
86761
86784
  properties: { code: {
86762
86785
  type: "string",
86763
- description: "JavaScript code to execute in page context. Must return a value for diagnostic output."
86786
+ description: "JavaScript code to execute. Must return a value."
86764
86787
  } },
86765
86788
  required: ["code"]
86766
86789
  }
86767
86790
  },
86768
- capture_area_context: {
86769
- name: "capture_area_context",
86770
- description: `Capture area context by activating visual area selection mode.
86771
-
86772
- User draws a rectangle on the page to select multiple elements at once. After selection, returns context for all elements in the area including source locations, DOM info, and screenshot.
86773
-
86774
- **Flow**:
86775
- 1. Activates area selection mode (user sees crosshair cursor)
86776
- 2. User draws rectangle around target elements
86777
- 3. Returns: primary element + related elements with source locations, DOM hierarchy, and screenshot`,
86778
- inputSchema: {
86779
- type: "object",
86780
- properties: {}
86781
- }
86782
- },
86783
86791
  get_network_requests: {
86784
86792
  name: "get_network_requests",
86785
- description: `Get network requests from browser for debugging.
86786
-
86787
- Returns list of HTTP requests with ID, method, URL, and status code. Use reqid parameter to get full details of a specific request including headers, body, and timing.
86788
-
86789
- **Usage**:
86790
- - Call without parameters to list all requests
86791
- - Call with reqid to get specific request details`,
86793
+ description: `Get network requests from browser. Returns list with reqid, method, URL, status. Use reqid param to get full request/response details.`,
86792
86794
  inputSchema: {
86793
86795
  type: "object",
86794
86796
  properties: { reqid: {
86795
86797
  type: "number",
86796
- description: "Optional. Request ID to get full details. If omitted, returns list of all requests."
86798
+ description: "Request ID from list to get full details (headers, body, timing)."
86797
86799
  } }
86798
86800
  }
86799
86801
  },
86800
86802
  get_console_messages: {
86801
86803
  name: "get_console_messages",
86802
- description: `Get console messages from browser for debugging.
86803
-
86804
- Returns list of console logs with ID, level (log/warn/error/info), and message content. Use msgid parameter to get full details of a specific message.
86805
-
86806
- **Usage**:
86807
- - Call without parameters to list all messages
86808
- - Call with msgid to get specific message details`,
86804
+ description: `Get console messages from browser. Returns list with msgid, level (log/warn/error), message. Use msgid param to get full message details.`,
86809
86805
  inputSchema: {
86810
86806
  type: "object",
86811
86807
  properties: { msgid: {
86812
86808
  type: "number",
86813
- description: "Optional. Message ID to get full details. If omitted, returns list of all messages."
86809
+ description: "Message ID from list to get full details."
86814
86810
  } }
86815
86811
  }
86816
86812
  },
86817
86813
  get_stdio_messages: {
86818
86814
  name: "get_stdio_messages",
86819
- description: `Get stdio (stdout/stderr) terminal messages from dev server process.
86820
-
86821
- Returns list of terminal output with ID, stream type (stdout/stderr), and content. Use stdioid parameter to get full details of a specific message.
86822
-
86823
- **Usage**:
86824
- - Call without parameters to list all stdio messages
86825
- - Call with stdioid to get specific message details`,
86815
+ description: `Get dev server stdout/stderr. Returns list with stdioid, stream type, content. Use stdioid param to get full message.`,
86826
86816
  inputSchema: {
86827
86817
  type: "object",
86828
86818
  properties: { stdioid: {
86829
86819
  type: "number",
86830
- description: "Optional. Stdio message ID to get full details. If omitted, returns list of all messages."
86820
+ description: "Stdio ID from list to get full details."
86831
86821
  } }
86832
86822
  }
86823
+ },
86824
+ get_page_info: {
86825
+ name: "get_page_info",
86826
+ description: "Get page overview with accessibility tree. Returns URL, title, viewport, document size, and semantic structure (landmarks, headings, forms, links). Start here to understand the page.",
86827
+ inputSchema: {
86828
+ type: "object",
86829
+ properties: {}
86830
+ }
86833
86831
  }
86834
86832
  };
86835
86833
 
@@ -87043,7 +87041,8 @@ Default dev server URL: ${process.env.DEV_INSPECTOR_PUBLIC_BASE_URL || `http://$
87043
87041
  { ...TOOL_SCHEMAS.capture_area_context },
87044
87042
  { ...TOOL_SCHEMAS.list_inspections },
87045
87043
  { ...TOOL_SCHEMAS.update_inspection_status },
87046
- { ...TOOL_SCHEMAS.execute_page_script }
87044
+ { ...TOOL_SCHEMAS.execute_page_script },
87045
+ { ...TOOL_SCHEMAS.get_page_info }
87047
87046
  ]);
87048
87047
  mcpServer.setRequestHandler(ListPromptsRequestSchema, async (_request) => {
87049
87048
  const defaultUrl = process.env.DEV_INSPECTOR_PUBLIC_BASE_URL ? stripTrailingSlash(process.env.DEV_INSPECTOR_PUBLIC_BASE_URL) : `http://${serverContext?.host || "localhost"}:${serverContext?.port || 5173}`;
@@ -87053,9 +87052,8 @@ Default dev server URL: ${process.env.DEV_INSPECTOR_PUBLIC_BASE_URL || `http://$
87053
87052
  arguments: p$1.arguments
87054
87053
  }));
87055
87054
  const allDefaultPrompts = [
87056
- { ...PROMPT_SCHEMAS.capture_element },
87055
+ { ...PROMPT_SCHEMAS.capture_context },
87057
87056
  { ...PROMPT_SCHEMAS.list_inspections },
87058
- { ...PROMPT_SCHEMAS.capture_area },
87059
87057
  { ...PROMPT_SCHEMAS.get_stdio_messages },
87060
87058
  ...!chromeDisabled ? [{
87061
87059
  ...PROMPT_SCHEMAS.launch_chrome_devtools,
@@ -87067,7 +87065,9 @@ Default dev server URL: ${process.env.DEV_INSPECTOR_PUBLIC_BASE_URL || `http://$
87067
87065
  }]
87068
87066
  }] : [],
87069
87067
  { ...PROMPT_SCHEMAS.get_network_requests },
87070
- { ...PROMPT_SCHEMAS.get_console_messages }
87068
+ { ...PROMPT_SCHEMAS.get_console_messages },
87069
+ { ...PROMPT_SCHEMAS.capture_element },
87070
+ { ...PROMPT_SCHEMAS.capture_area }
87071
87071
  ];
87072
87072
  let filteredDefaultPrompts = [];
87073
87073
  if (defaultPrompts === true) filteredDefaultPrompts = allDefaultPrompts;
@@ -87102,8 +87102,7 @@ Default dev server URL: ${process.env.DEV_INSPECTOR_PUBLIC_BASE_URL || `http://$
87102
87102
  }).reverse().join("\n");
87103
87103
  mcpServer.setRequestHandler(ListPromptsRequestSchema, async (_request) => {
87104
87104
  return { prompts: [...filterPrompts([
87105
- { ...PROMPT_SCHEMAS.capture_element },
87106
- { ...PROMPT_SCHEMAS.capture_area },
87105
+ { ...PROMPT_SCHEMAS.capture_context },
87107
87106
  { ...PROMPT_SCHEMAS.list_inspections },
87108
87107
  {
87109
87108
  ...PROMPT_SCHEMAS.get_network_requests,
@@ -87172,9 +87171,8 @@ Default dev server URL: ${process.env.DEV_INSPECTOR_PUBLIC_BASE_URL || `http://$
87172
87171
  arguments: p$1.arguments
87173
87172
  }));
87174
87173
  return { prompts: [...filterPrompts([
87175
- { ...PROMPT_SCHEMAS.capture_element },
87174
+ { ...PROMPT_SCHEMAS.capture_context },
87176
87175
  { ...PROMPT_SCHEMAS.list_inspections },
87177
- { ...PROMPT_SCHEMAS.capture_area },
87178
87176
  ...!chromeDisabled ? [
87179
87177
  { ...PROMPT_SCHEMAS.launch_chrome_devtools },
87180
87178
  {
@@ -87418,9 +87416,8 @@ Default dev server URL: ${process.env.DEV_INSPECTOR_PUBLIC_BASE_URL || `http://$
87418
87416
  mcpServer.setRequestHandler(ListPromptsRequestSchema, async (_request) => {
87419
87417
  const defaultUrl = process.env.DEV_INSPECTOR_PUBLIC_BASE_URL ? stripTrailingSlash(process.env.DEV_INSPECTOR_PUBLIC_BASE_URL) : `http://${serverContext?.host || "localhost"}:${serverContext?.port || 5173}`;
87420
87418
  return { prompts: [
87421
- { ...PROMPT_SCHEMAS.capture_element },
87419
+ { ...PROMPT_SCHEMAS.capture_context },
87422
87420
  { ...PROMPT_SCHEMAS.list_inspections },
87423
- { ...PROMPT_SCHEMAS.capture_area },
87424
87421
  {
87425
87422
  ...PROMPT_SCHEMAS.get_stdio_messages,
87426
87423
  arguments: [{
@@ -89432,11 +89429,13 @@ CRITICAL WORKFLOW:
89432
89429
  - Otherwise -> Answer user's question first, then ask if they want to use the pending inspections.
89433
89430
 
89434
89431
  Available tools:
89435
- - **list_inspections**: Get pending user feedback context (do this first!)
89436
- - **capture_element_context**: Activate visual selector
89437
- - **update_inspection_status**: Update status
89432
+ - **get_page_info**: Get page overview with accessibility tree (start here to understand the page)
89433
+ - **list_inspections**: Get pending user feedback context
89434
+ - **capture_element_context**: Capture single element (interactive or via selector)
89435
+ - **capture_area_context**: Capture multiple elements in area (interactive or via containerSelector/bounds)
89436
+ - **update_inspection_status**: Update inspection status
89438
89437
  - **execute_page_script**: Run JS in browser
89439
- - **chrome_devtools**: Access network/console`;
89438
+ - **get_stdio_messages**: Get dev server terminal output (list or details by stdioid)`;
89440
89439
  /**
89441
89440
  * Get an active transport from the connection manager
89442
89441
  */
@@ -89654,7 +89653,8 @@ function setupAcpMiddleware(middlewares, serverContext, acpOptions) {
89654
89653
  type: "text",
89655
89654
  text: `<system_instructions>
89656
89655
  ${systemPrompt}
89657
- ${isAutomated ? "" : "Currently chrome devtools automation is disabled. You do not have access to Console/Network context."}
89656
+ ${isAutomated ? `- **chrome_devtools**: Access Chrome DevTools for network requests, console logs, page navigation, and element interaction` : `- **get_network_requests**: Get browser network requests (list or details by reqid) - uses local storage
89657
+ - **get_console_messages**: Get browser console logs (list or details by msgid) - uses local storage`}
89658
89658
  </system_instructions>
89659
89659
  `
89660
89660
  }, ...msg.content]
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { McpServer } from "@agentclientprotocol/sdk";
2
- import * as unplugin0 from "unplugin";
2
+ import * as unplugin1 from "unplugin";
3
3
 
4
4
  //#region src/utils/config-updater.d.ts
5
5
  type EditorId = "cursor" | "vscode" | "windsurf" | "claude-code" | "antigravity";
@@ -243,10 +243,10 @@ interface DevInspectorOptions extends McpConfigOptions, AcpOptions {
243
243
  }
244
244
  //#endregion
245
245
  //#region src/core.d.ts
246
- declare const unplugin: unplugin0.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
246
+ declare const unplugin: unplugin1.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
247
247
  //#endregion
248
248
  //#region src/core-external.d.ts
249
- declare const unpluginExternal: unplugin0.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
249
+ declare const unpluginExternal: unplugin1.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
250
250
  //#endregion
251
251
  //#region src/turbopack.d.ts
252
252
  interface TurbopackDevInspectorOptions extends DevInspectorOptions {
@@ -271,7 +271,7 @@ interface TurbopackDevInspectorOptions extends DevInspectorOptions {
271
271
  declare function turbopackDevInspector(options?: TurbopackDevInspectorOptions): any;
272
272
  //#endregion
273
273
  //#region src/index.d.ts
274
- declare const external: unplugin0.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
274
+ declare const external: unplugin1.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
275
275
  declare module "virtual:dev-inspector-mcp" {}
276
276
  //#endregion
277
277
  export { type CustomEditorConfig, type DevInspectorOptions, type EditorId, type McpConfigOptions, type TurbopackDevInspectorOptions, unplugin as default, unplugin, external, turbopackDevInspector, unpluginExternal };
@@ -142,6 +142,14 @@ interface PageInfo {
142
142
  height: number;
143
143
  };
144
144
  language: string;
145
+ scrollPosition?: {
146
+ x: number;
147
+ y: number;
148
+ };
149
+ documentSize?: {
150
+ width: number;
151
+ height: number;
152
+ };
145
153
  }
146
154
  //#endregion
147
155
  //#region client/hooks/useContextData.d.ts