# gg.tk.explorer.lens

> Published by [tk.gg](https://lexicon.garden/identity/did:plc:t5cvelfm3ei2vcalcy7slrei)

✓ This is the authoritative definition for this NSID.

## Description

A lens: a small viewer, written by a model from a person's description, that changes how one kind of record or embed is drawn in Bluesky Explorer.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:t5cvelfm3ei2vcalcy7slrei/gg.tk.explorer.lens)
- [Documentation](https://lexicon.garden/lexicon/did:plc:t5cvelfm3ei2vcalcy7slrei/gg.tk.explorer.lens/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:t5cvelfm3ei2vcalcy7slrei/gg.tk.explorer.lens/examples)

## Definitions

### `gg.tk.explorer.lens`

**Type**: `record`

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `description` | `string` | No |  |
| `kitVersion` | `string` | Yes |  |
| `model` | `string` | No |  |
| `name` | `string` | Yes |  |
| `prompt` | `string` | No | What the author asked for, so others can see and adapt it. |
| `remixOf` | `ref` → `com.atproto.repo.strongRef` | No |  |
| `source` | `string` | Yes | ES module written against the Lens kit. Runs only in an isolated worker with no network access. |
| `target` | `ref` → `#target` | Yes |  |

### `gg.tk.explorer.lens#target`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `match` | `string` | No | For embeds: only apply when the embed's URL contains this text, e.g. a host name. |
| `nsid` | `string` (nsid) | Yes | Record collection or embed type this lens draws. |
| `slot` | `string` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "kitVersion": {
            "maxLength": 64,
            "type": "string"
          },
          "model": {
            "maxLength": 128,
            "type": "string"
          },
          "name": {
            "maxGraphemes": 60,
            "maxLength": 600,
            "type": "string"
          },
          "prompt": {
            "description": "What the author asked for, so others can see and adapt it.",
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "remixOf": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "source": {
            "description": "ES module written against the Lens kit. Runs only in an isolated worker with no network access.",
            "maxLength": 100000,
            "type": "string"
          },
          "target": {
            "ref": "#target",
            "type": "ref"
          }
        },
        "required": [
          "name",
          "target",
          "source",
          "kitVersion",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "target": {
      "properties": {
        "match": {
          "description": "For embeds: only apply when the embed's URL contains this text, e.g. a host name.",
          "maxLength": 256,
          "type": "string"
        },
        "nsid": {
          "description": "Record collection or embed type this lens draws.",
          "format": "nsid",
          "type": "string"
        },
        "slot": {
          "knownValues": [
            "record",
            "embed"
          ],
          "type": "string"
        }
      },
      "required": [
        "nsid",
        "slot"
      ],
      "type": "object"
    }
  },
  "description": "A lens: a small viewer, written by a model from a person's description, that changes how one kind of record or embed is drawn in Bluesky Explorer.",
  "id": "gg.tk.explorer.lens",
  "lexicon": 1
}
```
