> This `./AGENTS.md` file is generated by running `yarn agents:generate`. # Project Overview The Harvester UI Extension is a Rancher extension that provides the user interface for Harvester within the Rancher Dashboard. ``` Note: This extension is available starting from Rancher 2.10.0. Ensure your Rancher version is 2.10.0 or later to access Harvester integration. ``` # Personas ## Software Developer You are an expert Senior Software Engineer specializing in Vue.js and TypeScript. You have deep knowledge of Kubernetes and the Rancher ecosystem. - **Focus**: Writing clean, maintainable, and performant code. - **Priorities**: Adhering to the project's code style, ensuring type safety, and following best practices for component design. # Agents ## Boundaries - ✅ **Always:** - Write to `.github`, `docs/`, `pkg/harvester`, `scripts/`. - Make commits in a new branch (for a PR). - Run `yarn lint:fix` before commits. - Use conventional commit format: ``` (): ``` - Follow existing naming conventions (PascalCase for components, camelCase for functions). - After changing a Vue, JS, or TS file, make sure it's automatically formatted with ESLint. - After updating files in `docs/agents.md/`, run `yarn agents:generate` to update root `AGENTS.md`. - ⚠️ **Ask first:** - Adding dependencies - Upgrading dependencies - 🚫 **Never:** - Commit or log secrets, `.env`, `kubeconfig` or any API keys. - Edit `node_modules/`. - Commit directly to `main` (use PRs). - Skip git hooks with `--no-verify` flag. ## Tools ### Prerequisites - **Node.js**: `>= 24.0.0` (see `.nvmrc` for the pinned version: `24`) - **Package manager**: `yarn` (v1 classic) ### Common Commands | Command | Description | |---------|-------------| | `yarn install --frozen-lockfile` | Install dependencies (CI-safe, no lockfile changes) | | `RANCHER_ENV=harvester API=https:// yarn dev` | Start development server at `https://127.0.0.1:8005` | | `yarn build-pkg harvester` | Build the Harvester extension package | | `yarn serve-pkgs` | Serve the locally built extension for testing | | `yarn lint` | Run ESLint (zero warnings allowed) | | `yarn lint:fix` | Run ESLint with auto-fix | | `yarn clean` | Clean build artifacts | | `yarn agents:generate` | Regenerate `AGENTS.md` from `docs/agents.md/` sources | ### Development - **Start dev server**: ```bash RANCHER_ENV=harvester API=https://your-harvester-ip yarn dev ``` - `API` should point to a running Harvester cluster (e.g., `https://x.x.x.x`). - The dashboard will be available at `https://127.0.0.1:8005`. ### Building - **Build extension package**: ```bash yarn build-pkg harvester ``` - **Serve locally built extension** (for integration testing with a Rancher instance): ```bash yarn serve-pkgs ``` ### Linting - **Check** (must pass with zero warnings): ```bash yarn lint ``` - **Auto-fix**: ```bash yarn lint:fix ``` - ESLint covers `.js`, `.ts`, and `.vue` files. - Always run `yarn lint:fix` before committing. ### Commit Conventions - Commits are validated by [commitlint](https://commitlint.js.org/) via a Husky `commit-msg` hook. - Follow [Conventional Commits](https://www.conventionalcommits.org/) format (configured in `commitlint.config.js`). ### Agent Documentation - Source files live in `docs/agents.md/` (agents, contributors, personas subdirectories). - After editing any source file, regenerate the root `AGENTS.md`: ```bash yarn agents:generate ``` # Contributors Guide ## Getting Started Please see the [Harvester UI Extension README](https://github.com/harvester/harvester-ui-extension). To get started, follow the `Development Setup` section. ## Project Information - **Tech Stack:** - `Vue.js`: Framework - `Linting`: ESLint - `CSS`: SCSS should be used - `TypeScript`: Primary language for logic. - **Code Style and Standards:** - `Language`: TypeScript is preferred for new code. - `Vue.js`: - Composition API components are preferred over Options API. - Large pages with lots of code and styles should be avoided by breaking the page up into smaller Vue components. - Order the Single File Component blocks as `