{
  "name": "CLARA FOUNDRY",
  "publisher": "MineSpace Inc.",
  "version": "1.0.0-rc.1",
  "endpoint": "platform.cgi?service=foundry",
  "method": "POST",
  "authentication": "Bearer member for list; hosting administrator for mutations. No scoped token access.",
  "operations": {
    "list": {
      "fields": [
        "org"
      ],
      "returns": [
        "channels",
        "history",
        "releases"
      ]
    },
    "check": {
      "fields": [
        "org",
        "id"
      ],
      "returns": [
        "id",
        "sha256",
        "eligible",
        "report"
      ]
    },
    "promote": {
      "fields": [
        "org",
        "slug",
        "environment",
        "revision",
        "id"
      ],
      "returns": [
        "slug",
        "environment",
        "revision",
        "release",
        "visibility",
        "base"
      ]
    },
    "rollback": {
      "fields": [
        "org",
        "slug",
        "environment",
        "revision",
        "id"
      ],
      "returns": [
        "slug",
        "environment",
        "revision",
        "release",
        "visibility",
        "base"
      ]
    },
    "stage": {
      "fields": [
        "org",
        "visibility",
        "content",
        "sha256"
      ],
      "returns": [
        "id",
        "visibility",
        "sha256",
        "pending"
      ]
    },
    "api-key-issue": {
      "fields": [
        "org",
        "id",
        "label",
        "scope",
        "hours"
      ],
      "scopes": [
        "read",
        "write",
        "read-write"
      ],
      "hours": {
        "min": 1,
        "max": 720
      },
      "returns": [
        "id",
        "credential",
        "scope",
        "expires",
        "release"
      ]
    },
    "api-key-list": {
      "fields": [
        "org",
        "id"
      ],
      "returns": [
        "keys"
      ]
    },
    "api-key-revoke": {
      "fields": [
        "org",
        "id",
        "key"
      ],
      "returns": [
        "ok"
      ]
    }
  },
  "candidate": "FOUNDRY stage after local compile/tests; direct URL blocked until first promotion. Existing CONNECT direct deployments are unaffected.",
  "gate": "Server Python VM, uploaded bytecode, isolated scratch dataset, expected status and optional body substring. Privileged test context. Max 16 cases, 4-second suite deadline, 0.5 seconds per VM case. No independent source compilation or auth proof.",
  "channel": {
    "base": "live/{org}/{slug}/{environment}/api/",
    "environments": [
      "preview",
      "production"
    ],
    "slugPattern": "^[a-z][a-z0-9-]{0,39}$",
    "revision": "Compare and swap; 0 creates channel; stale revision returns 409",
    "visibility": "fixed after first promotion",
    "limits": "100 channels and 10000 history records per organization",
    "history": "last 100 transitions; rollback requires previous target in same channel plus active passing release",
    "data": "release-specific SQLite; no migration; preview and production pointing to same release share its storage",
    "revocation": "revoked target returns 404; no automatic fallback"
  },
  "privacy": "private release and history metadata visible only to organization members and hosting admin. Optional analytics only feature event names.",
  "mcp": "clara_foundry_spec (read-only public specification)",
  "applicationCredentials": {
    "prefix": "ca_",
    "authorization": "Bearer",
    "binding": "immutable release ID; no access to other releases or platform API",
    "storage": "SHA-256 hashed, secret returned once",
    "expiry": "1\u2013720 hours",
    "maxPerRelease": 20,
    "scope": "read permits GET; write permits mutation routes; read-write permits both",
    "promotion": "keys do not follow channels to another release",
    "public": "public unprotected GET remains available without a key"
  }
}
