{
  "schema": "hasna.service_contract.v1",
  "name": "events",
  "class": "service",
  "contractVersion": "v1",
  "kitVersion": "1.1.0",
  "description": "Event envelope libraries and explicit compatibility storage remain available. The separate events-serve intake API stores immutable tenant-scoped event receipts in PostgreSQL under registered producer grants; startup never adopts a tenant or creates a schema. Legacy spools do not constitute remote acceptance. Scoped consumer reads require events:consume and separate explicit key grants; signed cursors start from now and immutable feed ordering prevents missed concurrent commits.",
  "bins": [
    "events",
    "events-serve",
    "events-mcp"
  ],
  "hosting": [
    "user-hosted"
  ],
  "serviceSurfaces": [
    {
      "name": "events-cli",
      "kind": "cli",
      "status": "supported",
      "bin": "events",
      "authMode": "local-only"
    },
    {
      "name": "durable-intake-api",
      "kind": "api",
      "status": "supported",
      "bin": "events-serve",
      "authMode": "api-key",
      "apiBasePath": "/v1",
      "health": {
        "method": "GET",
        "path": "/health",
        "public": true
      },
      "readiness": {
        "method": "GET",
        "path": "/ready",
        "public": true
      },
      "version": {
        "method": "GET",
        "path": "/version",
        "public": true
      },
      "openApiPath": "/openapi.json"
    },
    {
      "name": "durable-intake-client",
      "kind": "sdk",
      "status": "supported",
      "authMode": "api-key",
      "exportSubpath": "./intake",
      "generatedFrom": "/openapi.json"
    },
    {
      "name": "intake-mcp",
      "kind": "mcp",
      "status": "supported",
      "mcpBin": "events-mcp",
      "authMode": "api-key"
    },
    {
      "name": "intake-cli",
      "kind": "cli",
      "status": "supported",
      "bin": "events",
      "authMode": "api-key"
    },
    {
      "name": "consumer-feed-client",
      "kind": "sdk",
      "status": "supported",
      "authMode": "api-key",
      "exportSubpath": "./feed",
      "generatedFrom": "/openapi.json"
    },
    {
      "name": "consumer-feed-cli",
      "kind": "cli",
      "status": "supported",
      "bin": "events",
      "authMode": "api-key"
    }
  ],
  "metadata": {
    "release": {
      "artifactScan": {
        "script": "artifact-scan"
      }
    },
    "compatibilityExports": [
      ".",
      "./sdk",
      "./storage",
      "./durable",
      "./durable-worker",
      "./durable-spool"
    ]
  },
  "storage": {
    "backend": "postgresql",
    "engines": [
      "postgresql"
    ],
    "envPrefix": "HASNA_EVENTS_",
    "pgTestGate": {
      "envVar": "EVENTS_TEST_DATABASE_URL",
      "command": "bun run test:postgres"
    }
  }
}
