{
  "name": "psyche-behavior-engine",
  "$schema": "../../../node_modules/nx/schemas/project-schema.json",
  "sourceRoot": "apps/psyche/behavior-engine/src",
  "projectType": "application",
  "tags": ["scope:psyche", "layer:service", "type:python", "runtime:fastapi", "gpu:optional"],
  "targets": {
    "serve": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/behavior-engine",
        "command": "poetry run uvicorn behavior_engine.main:app --reload --host 0.0.0.0 --port 8003"
      }
    },
    "serve-prod": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/behavior-engine",
        "command": "poetry run uvicorn behavior_engine.main:app --host 0.0.0.0 --port 8003 --workers 4"
      }
    },
    "build": {
      "executor": "nx:run-commands",
      "outputs": ["{projectRoot}/dist"],
      "options": {
        "cwd": "apps/psyche/behavior-engine",
        "commands": ["poetry build"]
      }
    },
    "install": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/behavior-engine",
        "command": "poetry install"
      }
    },
    "lint": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/behavior-engine",
        "commands": ["poetry run ruff check src/", "poetry run mypy src/"]
      }
    },
    "format": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/behavior-engine",
        "commands": ["poetry run black src/", "poetry run ruff check --fix src/"]
      }
    },
    "test": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/behavior-engine",
        "command": "poetry run pytest"
      }
    },
    "test-cov": {
      "executor": "nx:run-commands",
      "outputs": ["{projectRoot}/htmlcov"],
      "options": {
        "cwd": "apps/psyche/behavior-engine",
        "command": "poetry run pytest --cov=behavior_engine --cov-report=html"
      }
    },
    "docker-build": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/behavior-engine",
        "command": "docker build -t psyche-behavior-engine:latest ."
      }
    },
    "docker-run": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/psyche/behavior-engine",
        "command": "docker run --gpus all -p 8003:8003 --env-file .env psyche-behavior-engine:latest"
      }
    }
  }
}
