{
  "schema": "hasna.service_contract.v1",
  "name": "projects",
  "class": "service",
  "contractVersion": "v1",
  "kitVersion": "0.14.0",
  "description": "High-level project/workspace management: CLI, MCP server, HTTP API (projects-serve), and typed SDK. The server uses SQLite by default and PostgreSQL when HASNA_PROJECTS_DATABASE_URL is configured; the serve process reads and writes the selected backend directly.",
  "bins": [
    "projects",
    "projects-mcp",
    "projects-serve"
  ],
  "hosting": [
    "user-hosted"
  ],
  "serviceSurfaces": [
    {
      "name": "http-api",
      "kind": "api",
      "status": "supported",
      "bin": "projects-serve",
      "authMode": "api-key",
      "health": {
        "method": "GET",
        "path": "/health",
        "public": true
      },
      "readiness": {
        "method": "GET",
        "path": "/ready",
        "public": false
      },
      "version": {
        "method": "GET",
        "path": "/version",
        "public": true
      },
      "apiBasePath": "/v1",
      "openApiPath": "/openapi.json"
    },
    {
      "name": "typescript-sdk",
      "kind": "sdk",
      "status": "supported",
      "authMode": "api-key",
      "exportSubpath": "./sdk",
      "generatedFrom": "/openapi.json"
    },
    {
      "name": "mcp",
      "kind": "mcp",
      "status": "supported",
      "mcpBin": "projects-mcp",
      "authMode": "local-only"
    },
    {
      "name": "cli",
      "kind": "cli",
      "status": "supported",
      "bin": "projects",
      "authMode": "local-only"
    }
  ],
  "storage": {
    "backend": "sqlite",
    "engines": [
      "sqlite",
      "postgresql"
    ],
    "envPrefix": "HASNA_PROJECTS_",
    "aliasEnvPrefix": "PROJECTS_",
    "sqlitePath": "~/.hasna/projects/projects.db",
    "pgTestGate": {
      "envVar": "PROJECTS_TEST_DATABASE_URL",
      "command": "bun test"
    }
  },
  "metadata": {
    "healthPath": "/health",
    "readyPath": "/ready",
    "versionPath": "/version",
    "apiBasePath": "/v1",
    "auth": "api-key",
    "authScopes": [
      "projects:read",
      "projects:write"
    ],
    "openapiPath": "/openapi.json",
    "release": {
      "artifactScan": {
        "script": "scan:artifact"
      }
    }
  }
}
