{
  "name": "@opensip-cli/fitness",
  "version": "0.8.5",
  "license": "Apache-2.0",
  "description": "Fitness checks engine for OpenSIP CLI",
  "keywords": [
    "opensip-cli",
    "static-analysis",
    "code-quality",
    "fitness-functions",
    "linting",
    "architecture",
    "code-review"
  ],
  "repository": {
    "type": "git",
    "url": "https://github.com/opensip-ai/opensip-cli.git",
    "directory": "packages/fitness/engine"
  },
  "homepage": "https://github.com/opensip-ai/opensip-cli",
  "bugs": {
    "url": "https://github.com/opensip-ai/opensip-cli/issues"
  },
  "type": "module",
  "main": "./dist/index.js",
  "types": "./dist/index.d.ts",
  "exports": {
    ".": "./dist/index.js",
    "./internal": "./dist/internal.js"
  },
  "files": [
    "dist",
    "LICENSE",
    "NOTICE"
  ],
  "opensipTools": {
    "kind": "tool",
    "id": "fitness",
    "identity": {
      "name": "fitness",
      "aliases": [
        "fit"
      ],
      "layoutKey": "fit"
    },
    "stableId": "afd68bd3-ff3c-4935-a5b6-76d8fc7a5224",
    "apiVersion": 1,
    "requires": [
      {
        "resource": "filesystem",
        "reason": "Reads project files, config, and runtime state; exports baselines and reports through host seams"
      },
      {
        "resource": "subprocess",
        "reason": "Command-backed checks can execute external commands through the fitness command executor"
      }
    ],
    "commands": [
      {
        "name": "fitness",
        "description": "Run fitness checks",
        "aliases": [
          "fit"
        ],
        "commonFlags": [
          "json",
          "cwd",
          "quiet",
          "verbose",
          "debug",
          "reportTo",
          "apiKey",
          "open"
        ],
        "options": [
          {
            "flag": "--recipe",
            "value": "<name>",
            "description": "Use a named recipe (default, quick-smoke, backend, etc.)"
          },
          {
            "flag": "--check",
            "value": "<slug>",
            "description": "Run a single check by slug"
          },
          {
            "flag": "--tags",
            "value": "<tags>",
            "description": "Filter checks by tags (repeatable or comma-separated)",
            "arrayDefault": []
          },
          {
            "flag": "--list",
            "description": "List available checks",
            "default": false
          },
          {
            "flag": "--recipes",
            "description": "List available recipes",
            "default": false
          },
          {
            "flag": "--exclude",
            "value": "<slug>",
            "description": "Exclude check (repeatable)",
            "arrayDefault": []
          },
          {
            "flag": "--config",
            "value": "<path>",
            "description": "Path to opensip-cli.config.yml (overrides default root discovery)"
          },
          {
            "flag": "--show",
            "value": "<session>",
            "description": "Replay a stored fit session by id, or latest for the latest fit session"
          },
          {
            "flag": "--gate-save",
            "description": "Architecture-gate: save current findings as baseline in the project SQLite store (mutually exclusive with --gate-compare)",
            "default": false
          },
          {
            "flag": "--gate-compare",
            "description": "Architecture-gate: compare current findings against the saved baseline; exit 1 on regression",
            "default": false
          },
          {
            "flag": "--filter",
            "value": "<filter>",
            "description": "Agent filter (repeatable): errors-only, warnings-only, category:<name>, source:<slug>, file:<path>, high-impact, top:<n>",
            "arrayDefault": []
          },
          {
            "flag": "--top",
            "value": "<n>",
            "description": "Limit returned signals (sugar for --filter top:<n>)"
          },
          {
            "flag": "--raw",
            "description": "Emit unwrapped payload (no CommandOutcome wrapper)",
            "default": false
          },
          {
            "flag": "--changed",
            "description": "Run only checks whose targets intersect git-changed files",
            "default": false
          },
          {
            "flag": "--since",
            "value": "<ref>",
            "description": "Git ref base for --changed (diff <ref>...HEAD)"
          },
          {
            "flag": "--include-impacted",
            "description": "Expand changed set with graph-impacted files (requires a built catalog)",
            "default": false
          }
        ],
        "scope": "project",
        "output": "raw-stream",
        "rawStreamReason": "runtime-render-dispatch",
        "producesVerdict": true
      },
      {
        "name": "list",
        "description": "List available fitness checks",
        "parent": "fitness",
        "commonFlags": [
          "cwd",
          "json"
        ],
        "scope": "project",
        "output": "command-result"
      },
      {
        "name": "recipes",
        "description": "List available fitness recipes",
        "parent": "fitness",
        "commonFlags": [
          "cwd",
          "json"
        ],
        "scope": "project",
        "output": "command-result"
      },
      {
        "name": "export",
        "description": "Export fit artifacts: --format baseline (the SARIF-shaped gate baseline)",
        "parent": "fitness",
        "commonFlags": [
          "cwd",
          "json"
        ],
        "options": [
          {
            "flag": "--format",
            "value": "<fmt>",
            "description": "Export artifact: baseline (the SARIF-shaped gate baseline)",
            "required": true,
            "choices": [
              "baseline"
            ]
          },
          {
            "flag": "--out",
            "value": "<path>",
            "description": "Output file path for the SARIF baseline",
            "required": true
          }
        ],
        "scope": "project",
        "output": "raw-stream",
        "rawStreamReason": "file-export"
      },
      {
        "name": "fit-run-worker",
        "description": "[internal] Run fit headless and stream progress + result over IPC (forked by the live view)",
        "visibility": "internal",
        "commonFlags": [
          "cwd"
        ],
        "options": [
          {
            "flag": "--config",
            "value": "<path>",
            "description": "Resolved project config inherited from the parent run"
          }
        ],
        "args": [
          {
            "name": "specPath",
            "description": "Path to a JSON FitOptions spec file"
          }
        ],
        "scope": "project",
        "output": "raw-stream",
        "rawStreamReason": "worker-ipc"
      }
    ],
    "capabilities": [
      {
        "id": "fit-pack",
        "apiVersion": 1,
        "contributionKind": "module-export",
        "contributionSchema": {
          "requiredKeys": [
            "config",
            "run"
          ]
        },
        "discovery": {
          "discovery": {
            "mode": "marker",
            "markerKind": "fit-pack"
          },
          "exportName": "checks",
          "exportShape": "array",
          "configKeys": {
            "packages": "checkPackages"
          },
          "builtinScope": "@opensip-cli",
          "explicitListMode": "augment",
          "coContributions": [
            {
              "exportName": "recipes",
              "exportShape": "array",
              "domainId": "fit-recipe"
            }
          ]
        },
        "minSupportedApiVersion": 1
      },
      {
        "id": "fit-recipe",
        "apiVersion": 1,
        "contributionKind": "module-export",
        "contributionSchema": {
          "requiredKeys": [
            "id",
            "name"
          ]
        },
        "minSupportedApiVersion": 1
      }
    ],
    "pluginLayout": {
      "domain": "fit",
      "userSubdirs": [
        "checks",
        "recipes"
      ]
    }
  },
  "dependencies": {
    "@opentelemetry/api": "^1.9.1",
    "commander": "^15.0.0",
    "drizzle-orm": "^0.45.2",
    "glob": "^13.0.0",
    "minimatch": "^10.2.5",
    "react": "^19.2.7",
    "typescript": "~6.0.3",
    "zod": "^4.4.3",
    "@opensip-cli/cli-live": "0.8.5",
    "@opensip-cli/config": "0.8.5",
    "@opensip-cli/cli-ui": "0.8.5",
    "@opensip-cli/contracts": "0.8.5",
    "@opensip-cli/datastore": "0.8.5",
    "@opensip-cli/session-store": "0.8.5",
    "@opensip-cli/shared-analysis": "0.8.5",
    "@opensip-cli/core": "0.8.5",
    "@opensip-cli/targeting": "0.8.5"
  },
  "devDependencies": {
    "@types/node": "^24.13.3",
    "@types/react": "^19.2.17",
    "vitest": "^4.1.10",
    "@opensip-cli/lang-typescript": "0.8.5"
  },
  "scripts": {
    "build": "tsc",
    "test": "vitest run --passWithNoTests",
    "typecheck": "tsc --noEmit",
    "clean": "rm -rf dist"
  }
}