# schema/ — the public schema set

Generated by `Tools/Sui.ManifestGenerator` (`dotnet run --project Tools/Sui.ManifestGenerator -- --only public`);
never edit by hand. `PublicSchemaSetFreshnessTests` fails when this folder differs from a rebuild.

This folder is the platform's **public authoring contract**: the definition dialects, their vocabularies, the
published formats, the platform catalog and the public wire contracts a remote party is held to, each at the
path its `$id` names, so the gateway serves
`https://suizi.app/schema/<path>` from `schema/<path>` with no rewrite. Every file is a byte-for-byte copy of its
`ts/` source; only formats whose status is `published` cross.

Served at `https://suizi.app/schema/` once the apex listener is on; on `api.{env}.suizi.app/schema/` today.

**Shape here, values from the API, proof by import.** These files say what an authored document may contain.
What a tenant has — its definitions, its catalog composition, its settings — is read from the API, whose
contract is the OpenAPI document. Whether a document is accepted is proven by importing it.

`ts/` is the internal set the frontend builds against; see `ts/README.md` for the long form. The two never
share a folder.

## Addresses

| Address | Source |
| --- | --- |
| `https://suizi.app/schema/dialect/core/1` | `ts/dialect/kinds/core.schema.json` |
| `https://suizi.app/schema/dialect/document-definition/1` | `ts/dialect/kinds/document-definition.schema.json` |
| `https://suizi.app/schema/dialect/document-set-type/1` | `ts/dialect/kinds/document-set-type.schema.json` |
| `https://suizi.app/schema/dialect/entity-type/1` | `ts/dialect/kinds/entity-type.schema.json` |
| `https://suizi.app/schema/semantic-type-grammars/1` | `ts/dialect/semantic-type-grammars.json` |
| `https://suizi.app/schema/vocab/sp-core/1` | `ts/dialect/vocabularies/sp-core.schema.json` |
| `https://suizi.app/schema/vocab/sp-extraction/1` | `ts/dialect/vocabularies/sp-extraction.schema.json` |
| `https://suizi.app/schema/vocab/sp-format/1` | `ts/dialect/vocabularies/sp-format.schema.json` |
| `https://suizi.app/schema/vocab/sp-records/1` | `ts/dialect/vocabularies/sp-records.schema.json` |
| `https://suizi.app/schema/vocab/sp-sets/1` | `ts/dialect/vocabularies/sp-sets.schema.json` |
| `https://suizi.app/schema/format/agent/1` | `ts/formats/agent/agent.schema.json` |
| `https://suizi.app/schema/format/arrival-configuration/2` | `ts/formats/arrival-configuration/arrival-configuration.schema.json` |
| `https://suizi.app/schema/format/document-configuration/1` | `ts/formats/document-configuration/document-configuration.schema.json` |
| `https://suizi.app/schema/format/document-set-configuration/1` | `ts/formats/document-set-configuration/document-set-configuration.schema.json` |
| `https://suizi.app/schema/format/harness/1` | `ts/formats/harness/harness.schema.json` |
| `https://suizi.app/schema/format/mail-ingestion-configuration/3` | `ts/formats/mail-ingestion-configuration/mail-ingestion-configuration.schema.json` |
| `https://suizi.app/schema/format/rule-set/1` | `ts/formats/rule-set/rule-set.schema.json` |
| `https://suizi.app/schema/format/skill-pack/1` | `ts/formats/skill-pack/skill-pack.schema.json` |
| `https://suizi.app/schema/format/solution/1` | `ts/formats/solution/solution.schema.json` |
| `https://suizi.app/schema/format/workflow/2` | `ts/formats/workflow/workflow.schema.json` |
| `https://suizi.app/schema/catalog/2` | `ts/catalog/catalog.json` |
| `https://suizi.app/schema/wire/validation-answer/1` | `ts/wire/validation-answer/validation-answer.schema.json` |
| `https://suizi.app/schema/wire/validation-request/1` | `ts/wire/validation-request/validation-request.schema.json` |
| `https://suizi.app/schema/contract/document-set.captured/1` | `ts/contracts/document-set.captured/1.schema.json` |
| `https://suizi.app/schema/contract/document-set.compiled/1` | `ts/contracts/document-set.compiled/1.schema.json` |
| `https://suizi.app/schema/contract/document-set.delivered/1` | `ts/contracts/document-set.delivered/1.schema.json` |
| `https://suizi.app/schema/contract/document-set.exported/1` | `ts/contracts/document-set.exported/1.schema.json` |
| `https://suizi.app/schema/contract/document-set.indexed/1` | `ts/contracts/document-set.indexed/1.schema.json` |
| `https://suizi.app/schema/contract/document-set.verified/1` | `ts/contracts/document-set.verified/1.schema.json` |
| `https://suizi.app/schema/contract/document.captured/1` | `ts/contracts/document.captured/1.schema.json` |
| `https://suizi.app/schema/contract/document.decision.required/1` | `ts/contracts/document.decision.required/1.schema.json` |
| `https://suizi.app/schema/contract/document.indexed/1` | `ts/contracts/document.indexed/1.schema.json` |
| `https://suizi.app/schema/contract/document.verified/1` | `ts/contracts/document.verified/1.schema.json` |
| `https://suizi.app/schema/contract/file.delivery.received/1` | `ts/contracts/file.delivery.received/1.schema.json` |
| `https://suizi.app/schema/contract/file.received/1` | `ts/contracts/file.received/1.schema.json` |
| `https://suizi.app/schema/contract/mail.attachment.received/1` | `ts/contracts/mail.attachment.received/1.schema.json` |
| `https://suizi.app/schema/contract/mail.message.received/1` | `ts/contracts/mail.message.received/1.schema.json` |
| `https://suizi.app/schema/contract/workflow.event/1` | `ts/contracts/workflow.event/1.schema.json` |
| `https://suizi.app/schema/contract/workflow.run.completed/1` | `ts/contracts/workflow.run.completed/1.schema.json` |
| `https://suizi.app/schema/contract/workflow.started/1` | `ts/contracts/workflow.started/1.schema.json` |

## Examples

Authored documents, each a copy of a fixture under `ts/fixtures/`: one or more per published format, and the
vocabulary tours — document schemas that walk the `x-sp` vocabularies.

- `examples/agent/configured-everywhere.json` — `ts/fixtures/definitions/agent/configured-everywhere.json`
- `examples/agent/invoice-assistant.json` — `ts/fixtures/definitions/agent/invoice-assistant.json`
- `examples/agent/invoice-review-group.json` — `ts/fixtures/definitions/agent/invoice-review-group.json`
- `examples/agent/example-event-logger.json` — `ts/fixtures/definitions/agent/example-event-logger.json`
- `examples/arrival-configuration/ap-inbox.json` — `ts/fixtures/definitions/arrival-configuration/ap-inbox.json`
- `examples/document-configuration/tenant-a.json` — `ts/fixtures/definitions/document-configuration/tenant-a.json`
- `examples/document-configuration/tenant-b.json` — `ts/fixtures/definitions/document-configuration/tenant-b.json`
- `examples/document-set-configuration/invoice-package.json` — `ts/fixtures/definitions/document-set-configuration/invoice-package.json`
- `examples/harness/assistant.json` — `ts/fixtures/definitions/harness/assistant.json`
- `examples/harness/extractor.json` — `ts/fixtures/definitions/harness/extractor.json`
- `examples/harness/triage.json` — `ts/fixtures/definitions/harness/triage.json`
- `examples/skill-pack/csv-toolkit.json` — `ts/fixtures/definitions/skill-pack/csv-toolkit.json`
- `examples/solution/accounts-payable.json` — `ts/fixtures/definitions/solution/accounts-payable.json`
- `examples/workflow/ap-approve-and-post.json` — `ts/fixtures/definitions/workflow/ap-approve-and-post.json`
- `examples/workflow/export-template.json` — `ts/fixtures/definitions/workflow/export-template.json`
- `examples/workflow/inferred-edges.json` — `ts/fixtures/definitions/workflow/inferred-edges.json`
- `examples/workflow/reaction.json` — `ts/fixtures/definitions/workflow/reaction.json`
- `examples/workflow/set-members-fan-out.json` — `ts/fixtures/definitions/workflow/set-members-fan-out.json`
- `examples/vocabulary-tour/extraction.json` — `ts/fixtures/schemas/vocabulary-tour-extraction.json`
- `examples/vocabulary-tour/fields.json` — `ts/fixtures/schemas/vocabulary-tour-fields.json`
- `examples/vocabulary-tour/format.json` — `ts/fixtures/schemas/vocabulary-tour-format.json`
- `examples/vocabulary-tour/rules.json` — `ts/fixtures/schemas/vocabulary-tour-rules.json`

## Editors

`schema-catalog.json` is a [SchemaStore](https://www.schemastore.org/) catalog: one entry per dialect kind and per
published format, each with the file names it matches. This repository's `.vscode/settings.json` carries the
same associations, pointed at the local files, and one per seed definition folder: a seed file wraps its document
as `content`, so a wrapper under `.vscode/seed-content/` validates the `content` against the kind's format.

A file that names its own `$schema` is validated against that address, not the association. A file naming a
`https://suizi.app/schema/` address shows a load warning until that address is served somewhere the editor can reach;
a file naming the stock JSON Schema dialect is checked against the stock dialect only.
