# org.cairnsproto.draft.transform

> A Starlark script that turns a source into a derived source. It runs inside the interpreter check Cairns ships, so nothing decodes the source outside WASM.

- Kind: record
- Record key: tid
- Authority: draft.cairnsproto.org
- Lexicon: 1
- Published by [cairnsproto.org](https://lexicon.garden/identity/did:plc:np7ezqujtsry4bkogisaabul), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.transform)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.transform/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.transform/analytics)

## Record (`org.cairnsproto.draft.transform`)

Type: record · key tid

### Properties

- `accepts` (array, required): MIME types of the sources the script reads.
  - Constraints: minLength: 1, maxLength: 16
  - `items` (string)
    - Constraints: maxLength: 256
- `createdAt` (string · datetime, required)
- `description` (string)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `interpreter` (ref, required): The interpreter check, at the version the script was written for.
  - Reference: `com.atproto.repo.strongRef`
- `license` (string, required): SPDX expression or URL.
  - Constraints: maxLength: 512
- `name` (string, required)
  - Constraints: maxLength: 640, maxGraphemes: 64
- `output` (ref, required): Hash of the payload schema the output conforms to.
  - Reference: `org.cairnsproto.draft.defs#hash`
- `script` (string, required): Starlark source. It can't load other records.
  - Constraints: maxLength: 200000
- `tags` (array): Layouts the script handles, lowercase kebab-case, for discovery.
  - Constraints: maxLength: 10
  - `items` (string)
    - Constraints: maxLength: 64

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A Starlark script that turns a source into a derived source. It runs inside the interpreter check Cairns ships, so nothing decodes the source outside WASM.",
      "key": "tid",
      "record": {
        "properties": {
          "accepts": {
            "description": "MIME types of the sources the script reads.",
            "items": {
              "maxLength": 256,
              "type": "string"
            },
            "maxLength": 16,
            "minLength": 1,
            "type": "array"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "interpreter": {
            "description": "The interpreter check, at the version the script was written for.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "license": {
            "description": "SPDX expression or URL.",
            "maxLength": 512,
            "type": "string"
          },
          "name": {
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "output": {
            "description": "Hash of the payload schema the output conforms to.",
            "ref": "org.cairnsproto.draft.defs#hash",
            "type": "ref"
          },
          "script": {
            "description": "Starlark source. It can't load other records.",
            "maxLength": 200000,
            "type": "string"
          },
          "tags": {
            "description": "Layouts the script handles, lowercase kebab-case, for discovery.",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxLength": 10,
            "type": "array"
          }
        },
        "required": [
          "interpreter",
          "script",
          "accepts",
          "output",
          "name",
          "license",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "org.cairnsproto.draft.transform",
  "lexicon": 1
}
```
