# @harness-engineering/eslint-plugin

## 0.3.1

### Patch Changes

- e9f872c: Use the project root (the directory of `harness.config.json`) as the
  path-normalization anchor for `no-forbidden-imports` and
  `no-layer-violation`. Previously, both rules anchored to `/src/`, which
  collapsed `<monorepo>/packages/<x>/src/foo.ts` to `src/foo.ts` and destroyed
  the package prefix — making layer-based rules with `from: "packages/<x>/**"`
  patterns unable to match files inside `<package>/src/**`.

  `normalizePath` and `resolveImportPath` now accept an optional `projectRoot`
  parameter. When provided and the file lives under the root, the
  project-root-relative path is returned (preserving package identity).
  Otherwise the existing `/src/` heuristic is used unchanged, so
  single-package projects and any direct callers of the utilities are
  unaffected. A new `getConfigRoot(filePath)` helper in `config-loader`
  resolves the anchor from the nearest ancestor `harness.config.json`.

## 0.3.0

### Minor Changes

- f62d6ab: Add `no-process-env-in-spawn` ESLint rule and fix env leak in chat-proxy
  - New rule detects `process.env` passed directly to child process spawn calls, preventing environment variable leaks
  - Fix env leak in orchestrator chat-proxy identified by the new rule

### Patch Changes

- f62d6ab: Fix Math.random ID generation security vulnerability and API doc version drift
- f62d6ab: Supply chain audit — fix HIGH vulnerability, bump dependencies, migrate openai to v6

## 0.2.4

### Patch Changes

- Reduce Tier 2 structural violations and fix exactOptionalPropertyTypes errors

## 0.2.3

### Patch Changes

- Reduce cyclomatic complexity across rule implementations

## 0.2.2

### Patch Changes

- **New rule: `require-path-normalization`** — Requires path normalization for cross-platform compatibility. Detects raw `path.join()` and `path.resolve()` outputs used directly in comparisons or object keys without normalization.
- **README updated** — Added Cross-Platform Rules section documenting `no-unix-shell-command`, `no-hardcoded-path-separator`, and `require-path-normalization`.

## 0.2.1

### Patch Changes

- # Orchestrator Release & Workspace Hardening

  ## New Features
  - **Orchestrator Daemon**: Implemented a long-lived daemon for autonomous agent lifecycle management.
    - Pure state machine core for deterministic dispatch and reconciliation.
    - Multi-tracker support (Roadmap adapter implemented).
    - Isolated per-issue workspaces with deterministic path resolution.
    - Ink-based TUI and HTTP API for real-time observability.
  - **Harness Docs Pipeline**: Sequential pipeline for documentation health (drift detection, coverage audit, and auto-alignment).

  ## Improvements
  - **Documentation Coverage**: Increased project-wide documentation coverage to **84%**.
    - Comprehensive JSDoc/TSDoc for core APIs.
    - New Orchestrator Guide and API Reference.
    - Unified Source Map reference for all packages.
  - **Workspace Stability**: Resolved all pending lint errors and type mismatches in core packages.
  - **Graceful Shutdown**: Added signal handling and centralized resource cleanup for the orchestrator daemon.
  - **Hardened Security**: Restricted orchestrator HTTP API to localhost.

## 0.1.2

### Patch Changes

- Align dependency versions across workspace: `@types/node` ^22, `vitest` ^4, `minimatch` ^10, `typescript` ^5.3.3

## 0.1.1

### Patch Changes

- dc88a2e: Codebase hardening: normalize package scripts, deduplicate Result type, tighten API surface, expand test coverage, and fix documentation drift.

  **Breaking (core):** Removed 6 internal helpers from the entropy barrel export: `resolveEntryPoints`, `parseDocumentationFile`, `findPossibleMatches`, `levenshteinDistance`, `buildReachabilityMap`, `checkConfigPattern`. These were implementation details not used by any downstream package. If you imported them directly from `@harness-engineering/core`, import from the specific detector file instead (e.g., `@harness-engineering/core/src/entropy/detectors/drift`).

  **core:** `Result<T,E>` is now re-exported from `@harness-engineering/types` instead of being defined separately. No consumer-facing change.

  **All packages:** Normalized scripts (consistent `test`, `test:watch`, `lint`, `typecheck`, `clean`). Added mcp-server to root tsconfig references.

  **mcp-server:** Fixed 5 `no-explicit-any` lint errors in architecture, feedback, and validate tools.

  **Test coverage:** Added 96 new tests across 13 new test files (types, cli subcommands, mcp-server tools).

  **Documentation:** Rewrote cli.md and configuration.md to match actual implementation. Fixed 10 inaccuracies in AGENTS.md.
