# JSON Schemas

> The eight formal KSP v1.0 contracts and how to fetch them locally or from the edge.

Every configurable object in Kernuq is defined by a language-agnostic JSON Schema (KSP v1.0), so YAML seeds and runtime APIs never disagree.

| kind | Defines |
| --- | --- |
| `harness` | Rotors: provider / compute bindings, IO contract, loop |
| `formation` | Hybrid topologies: nodes, edges, fan-in/out, run limits |
| `compute` | Execution fields: local host / SSH / Cloudflare Sandbox |
| `resource-catalog` | Ten resource libraries: servers, platform accounts, databases, proxy pools, OpenAPI contracts… |
| `event` | KIEP interaction events |
| `hypertext-input` | KHLP hypertext capsule input |
| `sdui` | Server-driven UI: views, widgets and data bindings |
| `ui-widget` | Agent-built widgets: composite macros and sandboxed ESM bundles |

## Getting them

Locally:

```bash
kernuq schema formation > formation.schema.json
```

From the edge API (no install, CORS enabled):

```bash
curl -s https://kernuq.com/api/v1/schemas            # list
curl -s https://kernuq.com/api/v1/schemas/harness    # raw schema
```

## Editor completion

Declare the schema at the top of a YAML file for completion and validation in VS Code (YAML extension):

```yaml
# yaml-language-server: $schema=https://kernuq.com/api/v1/schemas/harness
uri: "harness://ops/log-analyzer"
```
