Vite · Capability

Vite Frontend Build Workflow

Workflow capability for frontend developers using Vite. Combines the JavaScript API and Plugin API to support dev server management, production builds, preview serving, and editor integration in a unified interface. Targeted at build system integrators, CI/CD pipelines, and IDE plugins.

Run with Naftiko ViteBuild ToolsDev ServerFrontendHot Module ReplacementJavaScriptTypeScript

What You Can Do

GET
Ping dev server — Ping the Vite dev server to confirm it is running.
/v1/dev-server/ping
GET
Open in editor — Open a source file at a specific line/column in the IDE.
/v1/editor/open

MCP Tools

ping-vite-dev-server

Check whether the Vite development server is running and healthy.

read-only idempotent
open-source-file-in-editor

Open a Vite project source file at the specified line and column in the IDE. Useful for navigating to build errors.

read-only idempotent

APIs Used

vite-js-api

Capability Spec

frontend-build.yaml Raw ↑
naftiko: "1.0.0-alpha1"

info:
  label: "Vite Frontend Build Workflow"
  description: >-
    Workflow capability for frontend developers using Vite. Combines the
    JavaScript API and Plugin API to support dev server management, production
    builds, preview serving, and editor integration in a unified interface.
    Targeted at build system integrators, CI/CD pipelines, and IDE plugins.
  tags:
    - Vite
    - Build Tools
    - Dev Server
    - Frontend
    - Hot Module Replacement
    - JavaScript
    - TypeScript
  created: "2026-05-03"
  modified: "2026-05-03"

binds:
  - namespace: env
    keys:
      VITE_DEV_SERVER_HOST: VITE_DEV_SERVER_HOST

capability:
  consumes:
    - import: vite-js-api
      location: ./shared/javascript-api.yaml

  exposes:
    - type: rest
      port: 8080
      namespace: vite-build-api
      description: "Unified REST API for Vite frontend build and development workflows."
      resources:
        - path: /v1/dev-server/ping
          name: dev-server-health
          description: "Check Vite dev server health."
          operations:
            - method: GET
              name: ping-dev-server
              description: "Ping the Vite dev server to confirm it is running."
              call: "vite-js-api.ping-dev-server"
              outputParameters:
                - type: object
                  mapping: "$."

        - path: /v1/editor/open
          name: editor-integration
          description: "Open source files in the configured IDE."
          operations:
            - method: GET
              name: open-in-editor
              description: "Open a source file at a specific line/column in the IDE."
              call: "vite-js-api.open-in-editor"
              with:
                file: "rest.file"
                line: "rest.line"
                column: "rest.column"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      port: 9090
      namespace: vite-build-mcp
      transport: http
      description: "MCP server for AI-assisted Vite build and development tooling."
      tools:
        - name: ping-vite-dev-server
          description: "Check whether the Vite development server is running and healthy."
          hints:
            readOnly: true
            idempotent: true
          call: "vite-js-api.ping-dev-server"
          outputParameters:
            - type: object
              mapping: "$."

        - name: open-source-file-in-editor
          description: "Open a Vite project source file at the specified line and column in the IDE. Useful for navigating to build errors."
          hints:
            readOnly: true
            idempotent: true
          call: "vite-js-api.open-in-editor"
          with:
            file: "tools.file"
            line: "tools.line"
            column: "tools.column"
          outputParameters:
            - type: object
              mapping: "$."